Class: DatadogAPIClient::V2::RumRetentionFiltersAPI

Inherits:
Object
  • Object
show all
Defined in:
lib/datadog_api_client/v2/api/rum_retention_filters_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = DatadogAPIClient::APIClient.default) ⇒ RumRetentionFiltersAPI

Returns a new instance of RumRetentionFiltersAPI.



22
23
24
# File 'lib/datadog_api_client/v2/api/rum_retention_filters_api.rb', line 22

def initialize(api_client = DatadogAPIClient::APIClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



20
21
22
# File 'lib/datadog_api_client/v2/api/rum_retention_filters_api.rb', line 20

def api_client
  @api_client
end

Instance Method Details

#create_exclusion_filter(app_id, body, opts = {}) ⇒ Object

Create a RUM exclusion filter.



29
30
31
32
# File 'lib/datadog_api_client/v2/api/rum_retention_filters_api.rb', line 29

def create_exclusion_filter(app_id, body, opts = {})
  data, _status_code, _headers = create_exclusion_filter_with_http_info(app_id, body, opts)
  data
end

#create_exclusion_filter_with_http_info(app_id, body, opts = {}) ⇒ Array<(RumExclusionFilterResponse, Integer, Hash)>

Create a RUM exclusion filter.

Create an exclusion filter for a RUM application. Returns the created exclusion filter when the request is successful.

Parameters:

  • app_id (String)

    RUM application ID.

  • body (RumExclusionFilterCreateRequest)

    The definition of the new RUM exclusion filter.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(RumExclusionFilterResponse, Integer, Hash)>)

    RumExclusionFilterResponse data, response status code and response headers



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
100
101
102
103
# File 'lib/datadog_api_client/v2/api/rum_retention_filters_api.rb', line 43

def create_exclusion_filter_with_http_info(app_id, body, opts = {})
  unstable_enabled = @api_client.config.unstable_operations["v2.create_exclusion_filter".to_sym]
  if unstable_enabled
    @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_exclusion_filter")
  else
    raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_exclusion_filter"))
  end

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RumRetentionFiltersAPI.create_exclusion_filter ...'
  end
  # verify the required parameter 'app_id' is set
  if @api_client.config.client_side_validation && app_id.nil?
    fail ArgumentError, "Missing the required parameter 'app_id' when calling RumRetentionFiltersAPI.create_exclusion_filter"
  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 RumRetentionFiltersAPI.create_exclusion_filter"
  end
  # resource path
  local_var_path = '/api/v2/rum/applications/{app_id}/retention_filters/exclusion'.sub('{app_id}', CGI.escape(app_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] || 'RumExclusionFilterResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :create_exclusion_filter,
    :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, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RumRetentionFiltersAPI#create_exclusion_filter\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_retention_filter(app_id, body, opts = {}) ⇒ Object

Create a RUM retention filter.



108
109
110
111
# File 'lib/datadog_api_client/v2/api/rum_retention_filters_api.rb', line 108

def create_retention_filter(app_id, body, opts = {})
  data, _status_code, _headers = create_retention_filter_with_http_info(app_id, body, opts)
  data
end

#create_retention_filter_with_http_info(app_id, body, opts = {}) ⇒ Array<(RumRetentionFilterResponse, Integer, Hash)>

Create a RUM retention filter.

Create a RUM retention filter for a RUM application. Returns RUM retention filter objects from the request body when the request is successful.

Parameters:

  • app_id (String)

    RUM application ID.

  • body (RumRetentionFilterCreateRequest)

    The definition of the new RUM retention filter.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(RumRetentionFilterResponse, Integer, Hash)>)

    RumRetentionFilterResponse data, response status code and response headers



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
165
166
167
168
169
170
171
172
173
174
175
176
# File 'lib/datadog_api_client/v2/api/rum_retention_filters_api.rb', line 122

def create_retention_filter_with_http_info(app_id, body, opts = {})

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RumRetentionFiltersAPI.create_retention_filter ...'
  end
  # verify the required parameter 'app_id' is set
  if @api_client.config.client_side_validation && app_id.nil?
    fail ArgumentError, "Missing the required parameter 'app_id' when calling RumRetentionFiltersAPI.create_retention_filter"
  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 RumRetentionFiltersAPI.create_retention_filter"
  end
  # resource path
  local_var_path = '/api/v2/rum/applications/{app_id}/retention_filters'.sub('{app_id}', CGI.escape(app_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] || 'RumRetentionFilterResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :create_retention_filter,
    :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, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RumRetentionFiltersAPI#create_retention_filter\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_exclusion_filter(app_id, ef_id, opts = {}) ⇒ Object

Delete a RUM exclusion filter.



181
182
183
184
# File 'lib/datadog_api_client/v2/api/rum_retention_filters_api.rb', line 181

def delete_exclusion_filter(app_id, ef_id, opts = {})
  delete_exclusion_filter_with_http_info(app_id, ef_id, opts)
  nil
end

#delete_exclusion_filter_with_http_info(app_id, ef_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete a RUM exclusion filter.

Delete an exclusion filter for a RUM application. The built-in Error Tracking exclusion filter (error_tracking_exclusion_filter) cannot be deleted; attempting to do so returns a 405 Method Not Allowed response.

Parameters:

  • app_id (String)

    RUM application ID.

  • ef_id (String)

    Exclusion filter ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



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
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
# File 'lib/datadog_api_client/v2/api/rum_retention_filters_api.rb', line 196

def delete_exclusion_filter_with_http_info(app_id, ef_id, opts = {})
  unstable_enabled = @api_client.config.unstable_operations["v2.delete_exclusion_filter".to_sym]
  if unstable_enabled
    @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_exclusion_filter")
  else
    raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_exclusion_filter"))
  end

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RumRetentionFiltersAPI.delete_exclusion_filter ...'
  end
  # verify the required parameter 'app_id' is set
  if @api_client.config.client_side_validation && app_id.nil?
    fail ArgumentError, "Missing the required parameter 'app_id' when calling RumRetentionFiltersAPI.delete_exclusion_filter"
  end
  # verify the required parameter 'ef_id' is set
  if @api_client.config.client_side_validation && ef_id.nil?
    fail ArgumentError, "Missing the required parameter 'ef_id' when calling RumRetentionFiltersAPI.delete_exclusion_filter"
  end
  # resource path
  local_var_path = '/api/v2/rum/applications/{app_id}/retention_filters/exclusion/{ef_id}'.sub('{app_id}', CGI.escape(app_id.to_s).gsub('%2F', '/')).sub('{ef_id}', CGI.escape(ef_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(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :delete_exclusion_filter,
    :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, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RumRetentionFiltersAPI#delete_exclusion_filter\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_retention_filter(app_id, rf_id, opts = {}) ⇒ Object

Delete a RUM retention filter.



259
260
261
262
# File 'lib/datadog_api_client/v2/api/rum_retention_filters_api.rb', line 259

def delete_retention_filter(app_id, rf_id, opts = {})
  delete_retention_filter_with_http_info(app_id, rf_id, opts)
  nil
end

#delete_retention_filter_with_http_info(app_id, rf_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete a RUM retention filter.

Delete a RUM retention filter for a RUM application.

Parameters:

  • app_id (String)

    RUM application ID.

  • rf_id (String)

    Retention filter ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



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
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
# File 'lib/datadog_api_client/v2/api/rum_retention_filters_api.rb', line 272

def delete_retention_filter_with_http_info(app_id, rf_id, opts = {})

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RumRetentionFiltersAPI.delete_retention_filter ...'
  end
  # verify the required parameter 'app_id' is set
  if @api_client.config.client_side_validation && app_id.nil?
    fail ArgumentError, "Missing the required parameter 'app_id' when calling RumRetentionFiltersAPI.delete_retention_filter"
  end
  # verify the required parameter 'rf_id' is set
  if @api_client.config.client_side_validation && rf_id.nil?
    fail ArgumentError, "Missing the required parameter 'rf_id' when calling RumRetentionFiltersAPI.delete_retention_filter"
  end
  # resource path
  local_var_path = '/api/v2/rum/applications/{app_id}/retention_filters/{rf_id}'.sub('{app_id}', CGI.escape(app_id.to_s).gsub('%2F', '/')).sub('{rf_id}', CGI.escape(rf_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(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :delete_retention_filter,
    :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, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RumRetentionFiltersAPI#delete_retention_filter\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_exclusion_filter(app_id, ef_id, opts = {}) ⇒ Object

Get a RUM exclusion filter.



329
330
331
332
# File 'lib/datadog_api_client/v2/api/rum_retention_filters_api.rb', line 329

def get_exclusion_filter(app_id, ef_id, opts = {})
  data, _status_code, _headers = get_exclusion_filter_with_http_info(app_id, ef_id, opts)
  data
end

#get_exclusion_filter_with_http_info(app_id, ef_id, opts = {}) ⇒ Array<(RumExclusionFilterResponse, Integer, Hash)>

Get a RUM exclusion filter.

Get a single exclusion filter for a RUM application.

Parameters:

  • app_id (String)

    RUM application ID.

  • ef_id (String)

    Exclusion filter ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(RumExclusionFilterResponse, Integer, Hash)>)

    RumExclusionFilterResponse data, response status code and response headers



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
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
# File 'lib/datadog_api_client/v2/api/rum_retention_filters_api.rb', line 342

def get_exclusion_filter_with_http_info(app_id, ef_id, opts = {})
  unstable_enabled = @api_client.config.unstable_operations["v2.get_exclusion_filter".to_sym]
  if unstable_enabled
    @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_exclusion_filter")
  else
    raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_exclusion_filter"))
  end

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RumRetentionFiltersAPI.get_exclusion_filter ...'
  end
  # verify the required parameter 'app_id' is set
  if @api_client.config.client_side_validation && app_id.nil?
    fail ArgumentError, "Missing the required parameter 'app_id' when calling RumRetentionFiltersAPI.get_exclusion_filter"
  end
  # verify the required parameter 'ef_id' is set
  if @api_client.config.client_side_validation && ef_id.nil?
    fail ArgumentError, "Missing the required parameter 'ef_id' when calling RumRetentionFiltersAPI.get_exclusion_filter"
  end
  # resource path
  local_var_path = '/api/v2/rum/applications/{app_id}/retention_filters/exclusion/{ef_id}'.sub('{app_id}', CGI.escape(app_id.to_s).gsub('%2F', '/')).sub('{ef_id}', CGI.escape(ef_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] || 'RumExclusionFilterResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :get_exclusion_filter,
    :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, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RumRetentionFiltersAPI#get_exclusion_filter\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_permanent_retention_filter(app_id, permanent_rf_id, opts = {}) ⇒ Object

Get a permanent RUM retention filter.



405
406
407
408
# File 'lib/datadog_api_client/v2/api/rum_retention_filters_api.rb', line 405

def get_permanent_retention_filter(app_id, permanent_rf_id, opts = {})
  data, _status_code, _headers = get_permanent_retention_filter_with_http_info(app_id, permanent_rf_id, opts)
  data
end

#get_permanent_retention_filter_with_http_info(app_id, permanent_rf_id, opts = {}) ⇒ Array<(RumPermanentRetentionFilterResponse, Integer, Hash)>

Get a permanent RUM retention filter.

Get a permanent RUM retention filter for a RUM application by its identifier.

Parameters:

  • app_id (String)

    RUM application ID.

  • permanent_rf_id (RumPermanentRetentionFilterID)

    The identifier of the permanent RUM retention filter.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



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
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
# File 'lib/datadog_api_client/v2/api/rum_retention_filters_api.rb', line 418

def get_permanent_retention_filter_with_http_info(app_id, permanent_rf_id, opts = {})

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RumRetentionFiltersAPI.get_permanent_retention_filter ...'
  end
  # verify the required parameter 'app_id' is set
  if @api_client.config.client_side_validation && app_id.nil?
    fail ArgumentError, "Missing the required parameter 'app_id' when calling RumRetentionFiltersAPI.get_permanent_retention_filter"
  end
  # verify the required parameter 'permanent_rf_id' is set
  if @api_client.config.client_side_validation && permanent_rf_id.nil?
    fail ArgumentError, "Missing the required parameter 'permanent_rf_id' when calling RumRetentionFiltersAPI.get_permanent_retention_filter"
  end
  # verify enum value
  allowable_values = ['rum_apm_flat_sampling', 'synthetics_sessions', 'forced_replay_sessions']
  if @api_client.config.client_side_validation && !allowable_values.include?(permanent_rf_id)
    fail ArgumentError, "invalid value for \"permanent_rf_id\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/api/v2/rum/applications/{app_id}/retention_filters/permanent/{permanent_rf_id}'.sub('{app_id}', CGI.escape(app_id.to_s).gsub('%2F', '/')).sub('{permanent_rf_id}', CGI.escape(permanent_rf_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] || 'RumPermanentRetentionFilterResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :get_permanent_retention_filter,
    :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, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RumRetentionFiltersAPI#get_permanent_retention_filter\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_retention_filter(app_id, rf_id, opts = {}) ⇒ Object

Get a RUM retention filter.



480
481
482
483
# File 'lib/datadog_api_client/v2/api/rum_retention_filters_api.rb', line 480

def get_retention_filter(app_id, rf_id, opts = {})
  data, _status_code, _headers = get_retention_filter_with_http_info(app_id, rf_id, opts)
  data
end

#get_retention_filter_with_http_info(app_id, rf_id, opts = {}) ⇒ Array<(RumRetentionFilterResponse, Integer, Hash)>

Get a RUM retention filter.

Get a RUM retention filter for a RUM application.

Parameters:

  • app_id (String)

    RUM application ID.

  • rf_id (String)

    Retention filter ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(RumRetentionFilterResponse, Integer, Hash)>)

    RumRetentionFilterResponse data, response status code and response headers



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
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
# File 'lib/datadog_api_client/v2/api/rum_retention_filters_api.rb', line 493

def get_retention_filter_with_http_info(app_id, rf_id, opts = {})

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RumRetentionFiltersAPI.get_retention_filter ...'
  end
  # verify the required parameter 'app_id' is set
  if @api_client.config.client_side_validation && app_id.nil?
    fail ArgumentError, "Missing the required parameter 'app_id' when calling RumRetentionFiltersAPI.get_retention_filter"
  end
  # verify the required parameter 'rf_id' is set
  if @api_client.config.client_side_validation && rf_id.nil?
    fail ArgumentError, "Missing the required parameter 'rf_id' when calling RumRetentionFiltersAPI.get_retention_filter"
  end
  # resource path
  local_var_path = '/api/v2/rum/applications/{app_id}/retention_filters/{rf_id}'.sub('{app_id}', CGI.escape(app_id.to_s).gsub('%2F', '/')).sub('{rf_id}', CGI.escape(rf_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] || 'RumRetentionFilterResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :get_retention_filter,
    :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, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RumRetentionFiltersAPI#get_retention_filter\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_exclusion_filters(app_id, opts = {}) ⇒ Object

Get all RUM exclusion filters.



550
551
552
553
# File 'lib/datadog_api_client/v2/api/rum_retention_filters_api.rb', line 550

def list_exclusion_filters(app_id, opts = {})
  data, _status_code, _headers = list_exclusion_filters_with_http_info(app_id, opts)
  data
end

#list_exclusion_filters_with_http_info(app_id, opts = {}) ⇒ Array<(RumExclusionFiltersResponse, Integer, Hash)>

Get all RUM exclusion filters.

Get the list of exclusion filters for a RUM application. The built-in Error Tracking exclusion filter (error_tracking_exclusion_filter) is always returned first.

Parameters:

  • app_id (String)

    RUM application ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(RumExclusionFiltersResponse, Integer, Hash)>)

    RumExclusionFiltersResponse data, response status code and response headers



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
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
# File 'lib/datadog_api_client/v2/api/rum_retention_filters_api.rb', line 563

def list_exclusion_filters_with_http_info(app_id, opts = {})
  unstable_enabled = @api_client.config.unstable_operations["v2.list_exclusion_filters".to_sym]
  if unstable_enabled
    @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_exclusion_filters")
  else
    raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_exclusion_filters"))
  end

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RumRetentionFiltersAPI.list_exclusion_filters ...'
  end
  # verify the required parameter 'app_id' is set
  if @api_client.config.client_side_validation && app_id.nil?
    fail ArgumentError, "Missing the required parameter 'app_id' when calling RumRetentionFiltersAPI.list_exclusion_filters"
  end
  # resource path
  local_var_path = '/api/v2/rum/applications/{app_id}/retention_filters/exclusion'.sub('{app_id}', CGI.escape(app_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] || 'RumExclusionFiltersResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :list_exclusion_filters,
    :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, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RumRetentionFiltersAPI#list_exclusion_filters\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_permanent_retention_filters(app_id, opts = {}) ⇒ Object

Get all permanent RUM retention filters.



622
623
624
625
# File 'lib/datadog_api_client/v2/api/rum_retention_filters_api.rb', line 622

def list_permanent_retention_filters(app_id, opts = {})
  data, _status_code, _headers = list_permanent_retention_filters_with_http_info(app_id, opts)
  data
end

#list_permanent_retention_filters_with_http_info(app_id, opts = {}) ⇒ Array<(RumPermanentRetentionFiltersResponse, Integer, Hash)>

Get all permanent RUM retention filters.

Get the list of permanent RUM retention filters for a RUM application. Permanent retention filters are predefined filters that cannot be created or deleted. For each filter, the editability block indicates which cross-product fields can be updated.

Parameters:

  • app_id (String)

    RUM application ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



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
672
673
674
675
676
677
678
679
680
681
682
683
684
# File 'lib/datadog_api_client/v2/api/rum_retention_filters_api.rb', line 636

def list_permanent_retention_filters_with_http_info(app_id, opts = {})

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RumRetentionFiltersAPI.list_permanent_retention_filters ...'
  end
  # verify the required parameter 'app_id' is set
  if @api_client.config.client_side_validation && app_id.nil?
    fail ArgumentError, "Missing the required parameter 'app_id' when calling RumRetentionFiltersAPI.list_permanent_retention_filters"
  end
  # resource path
  local_var_path = '/api/v2/rum/applications/{app_id}/retention_filters/permanent'.sub('{app_id}', CGI.escape(app_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] || 'RumPermanentRetentionFiltersResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :list_permanent_retention_filters,
    :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, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RumRetentionFiltersAPI#list_permanent_retention_filters\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_retention_filters(app_id, opts = {}) ⇒ Object

Get all RUM retention filters.



689
690
691
692
# File 'lib/datadog_api_client/v2/api/rum_retention_filters_api.rb', line 689

def list_retention_filters(app_id, opts = {})
  data, _status_code, _headers = list_retention_filters_with_http_info(app_id, opts)
  data
end

#list_retention_filters_with_http_info(app_id, opts = {}) ⇒ Array<(RumRetentionFiltersResponse, Integer, Hash)>

Get all RUM retention filters.

Get the list of RUM retention filters for a RUM application.

Parameters:

  • app_id (String)

    RUM application ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(RumRetentionFiltersResponse, Integer, Hash)>)

    RumRetentionFiltersResponse data, response status code and response headers



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
# File 'lib/datadog_api_client/v2/api/rum_retention_filters_api.rb', line 701

def list_retention_filters_with_http_info(app_id, opts = {})

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RumRetentionFiltersAPI.list_retention_filters ...'
  end
  # verify the required parameter 'app_id' is set
  if @api_client.config.client_side_validation && app_id.nil?
    fail ArgumentError, "Missing the required parameter 'app_id' when calling RumRetentionFiltersAPI.list_retention_filters"
  end
  # resource path
  local_var_path = '/api/v2/rum/applications/{app_id}/retention_filters'.sub('{app_id}', CGI.escape(app_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] || 'RumRetentionFiltersResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :list_retention_filters,
    :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, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RumRetentionFiltersAPI#list_retention_filters\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#order_retention_filters(app_id, body, opts = {}) ⇒ Object

Order RUM retention filters.



754
755
756
757
# File 'lib/datadog_api_client/v2/api/rum_retention_filters_api.rb', line 754

def order_retention_filters(app_id, body, opts = {})
  data, _status_code, _headers = order_retention_filters_with_http_info(app_id, body, opts)
  data
end

#order_retention_filters_with_http_info(app_id, body, opts = {}) ⇒ Array<(RumRetentionFiltersOrderResponse, Integer, Hash)>

Order RUM retention filters.

Order RUM retention filters for a RUM application. Returns RUM retention filter objects without attributes from the request body when the request is successful.

Parameters:

  • app_id (String)

    RUM application ID.

  • body (RumRetentionFiltersOrderRequest)

    New definition of the RUM retention filter.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



768
769
770
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
# File 'lib/datadog_api_client/v2/api/rum_retention_filters_api.rb', line 768

def order_retention_filters_with_http_info(app_id, body, opts = {})

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RumRetentionFiltersAPI.order_retention_filters ...'
  end
  # verify the required parameter 'app_id' is set
  if @api_client.config.client_side_validation && app_id.nil?
    fail ArgumentError, "Missing the required parameter 'app_id' when calling RumRetentionFiltersAPI.order_retention_filters"
  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 RumRetentionFiltersAPI.order_retention_filters"
  end
  # resource path
  local_var_path = '/api/v2/rum/applications/{app_id}/relationships/retention_filters'.sub('{app_id}', CGI.escape(app_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] || 'RumRetentionFiltersOrderResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :order_retention_filters,
    :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, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RumRetentionFiltersAPI#order_retention_filters\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_exclusion_filter(app_id, ef_id, body, opts = {}) ⇒ Object

Update a RUM exclusion filter.



827
828
829
830
# File 'lib/datadog_api_client/v2/api/rum_retention_filters_api.rb', line 827

def update_exclusion_filter(app_id, ef_id, body, opts = {})
  data, _status_code, _headers = update_exclusion_filter_with_http_info(app_id, ef_id, body, opts)
  data
end

#update_exclusion_filter_with_http_info(app_id, ef_id, body, opts = {}) ⇒ Array<(RumExclusionFilterResponse, Integer, Hash)>

Update a RUM exclusion filter.

Update an exclusion filter for a RUM application. For the built-in Error Tracking exclusion filter (error_tracking_exclusion_filter), only enabled can be updated; name, event_type, and query must be omitted. Returns the updated exclusion filter when the request is successful.

Parameters:

  • app_id (String)

    RUM application ID.

  • ef_id (String)

    Exclusion filter ID.

  • body (RumExclusionFilterUpdateRequest)

    New definition of the RUM exclusion filter.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(RumExclusionFilterResponse, Integer, Hash)>)

    RumExclusionFilterResponse data, response status code and response headers



844
845
846
847
848
849
850
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
# File 'lib/datadog_api_client/v2/api/rum_retention_filters_api.rb', line 844

def update_exclusion_filter_with_http_info(app_id, ef_id, body, opts = {})
  unstable_enabled = @api_client.config.unstable_operations["v2.update_exclusion_filter".to_sym]
  if unstable_enabled
    @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_exclusion_filter")
  else
    raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_exclusion_filter"))
  end

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RumRetentionFiltersAPI.update_exclusion_filter ...'
  end
  # verify the required parameter 'app_id' is set
  if @api_client.config.client_side_validation && app_id.nil?
    fail ArgumentError, "Missing the required parameter 'app_id' when calling RumRetentionFiltersAPI.update_exclusion_filter"
  end
  # verify the required parameter 'ef_id' is set
  if @api_client.config.client_side_validation && ef_id.nil?
    fail ArgumentError, "Missing the required parameter 'ef_id' when calling RumRetentionFiltersAPI.update_exclusion_filter"
  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 RumRetentionFiltersAPI.update_exclusion_filter"
  end
  # resource path
  local_var_path = '/api/v2/rum/applications/{app_id}/retention_filters/exclusion/{ef_id}'.sub('{app_id}', CGI.escape(app_id.to_s).gsub('%2F', '/')).sub('{ef_id}', CGI.escape(ef_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] || 'RumExclusionFilterResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :update_exclusion_filter,
    :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, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RumRetentionFiltersAPI#update_exclusion_filter\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_permanent_retention_filter(app_id, permanent_rf_id, body, opts = {}) ⇒ Object

Update a permanent RUM retention filter.



913
914
915
916
# File 'lib/datadog_api_client/v2/api/rum_retention_filters_api.rb', line 913

def update_permanent_retention_filter(app_id, permanent_rf_id, body, opts = {})
  data, _status_code, _headers = update_permanent_retention_filter_with_http_info(app_id, permanent_rf_id, body, opts)
  data
end

#update_permanent_retention_filter_with_http_info(app_id, permanent_rf_id, body, opts = {}) ⇒ Array<(RumPermanentRetentionFilterResponse, Integer, Hash)>

Update a permanent RUM retention filter.

Update the cross-product sampling configuration of a permanent RUM retention filter for a RUM application. Only fields marked as editable in the editability block of the filter can be updated. Updating a non-editable field returns a 400 response.

Parameters:

Returns:



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
986
987
988
989
990
991
992
# File 'lib/datadog_api_client/v2/api/rum_retention_filters_api.rb', line 929

def update_permanent_retention_filter_with_http_info(app_id, permanent_rf_id, body, opts = {})

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RumRetentionFiltersAPI.update_permanent_retention_filter ...'
  end
  # verify the required parameter 'app_id' is set
  if @api_client.config.client_side_validation && app_id.nil?
    fail ArgumentError, "Missing the required parameter 'app_id' when calling RumRetentionFiltersAPI.update_permanent_retention_filter"
  end
  # verify the required parameter 'permanent_rf_id' is set
  if @api_client.config.client_side_validation && permanent_rf_id.nil?
    fail ArgumentError, "Missing the required parameter 'permanent_rf_id' when calling RumRetentionFiltersAPI.update_permanent_retention_filter"
  end
  # verify enum value
  allowable_values = ['rum_apm_flat_sampling', 'synthetics_sessions', 'forced_replay_sessions']
  if @api_client.config.client_side_validation && !allowable_values.include?(permanent_rf_id)
    fail ArgumentError, "invalid value for \"permanent_rf_id\", must be one of #{allowable_values}"
  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 RumRetentionFiltersAPI.update_permanent_retention_filter"
  end
  # resource path
  local_var_path = '/api/v2/rum/applications/{app_id}/retention_filters/permanent/{permanent_rf_id}'.sub('{app_id}', CGI.escape(app_id.to_s).gsub('%2F', '/')).sub('{permanent_rf_id}', CGI.escape(permanent_rf_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] || 'RumPermanentRetentionFilterResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :update_permanent_retention_filter,
    :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, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RumRetentionFiltersAPI#update_permanent_retention_filter\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_retention_filter(app_id, rf_id, body, opts = {}) ⇒ Object

Update a RUM retention filter.



997
998
999
1000
# File 'lib/datadog_api_client/v2/api/rum_retention_filters_api.rb', line 997

def update_retention_filter(app_id, rf_id, body, opts = {})
  data, _status_code, _headers = update_retention_filter_with_http_info(app_id, rf_id, body, opts)
  data
end

#update_retention_filter_with_http_info(app_id, rf_id, body, opts = {}) ⇒ Array<(RumRetentionFilterResponse, Integer, Hash)>

Update a RUM retention filter.

Update a RUM retention filter for a RUM application. Returns RUM retention filter objects from the request body when the request is successful.

Parameters:

  • app_id (String)

    RUM application ID.

  • rf_id (String)

    Retention filter ID.

  • body (RumRetentionFilterUpdateRequest)

    New definition of the RUM retention filter.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(RumRetentionFilterResponse, Integer, Hash)>)

    RumRetentionFilterResponse data, response status code and response headers



1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
# File 'lib/datadog_api_client/v2/api/rum_retention_filters_api.rb', line 1012

def update_retention_filter_with_http_info(app_id, rf_id, body, opts = {})

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RumRetentionFiltersAPI.update_retention_filter ...'
  end
  # verify the required parameter 'app_id' is set
  if @api_client.config.client_side_validation && app_id.nil?
    fail ArgumentError, "Missing the required parameter 'app_id' when calling RumRetentionFiltersAPI.update_retention_filter"
  end
  # verify the required parameter 'rf_id' is set
  if @api_client.config.client_side_validation && rf_id.nil?
    fail ArgumentError, "Missing the required parameter 'rf_id' when calling RumRetentionFiltersAPI.update_retention_filter"
  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 RumRetentionFiltersAPI.update_retention_filter"
  end
  # resource path
  local_var_path = '/api/v2/rum/applications/{app_id}/retention_filters/{rf_id}'.sub('{app_id}', CGI.escape(app_id.to_s).gsub('%2F', '/')).sub('{rf_id}', CGI.escape(rf_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] || 'RumRetentionFilterResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :update_retention_filter,
    :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, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RumRetentionFiltersAPI#update_retention_filter\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end