Class: DatadogAPIClient::V2::SyntheticsAPI

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of SyntheticsAPI.



22
23
24
# File 'lib/datadog_api_client/v2/api/synthetics_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/synthetics_api.rb', line 20

def api_client
  @api_client
end

Instance Method Details

#create_synthetics_suite(body, opts = {}) ⇒ Object

Synthetics: Create a test suite.



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

def create_synthetics_suite(body, opts = {})
  data, _status_code, _headers = create_synthetics_suite_with_http_info(body, opts)
  data
end

#create_synthetics_suite_with_http_info(body, opts = {}) ⇒ Array<(SyntheticsSuiteResponse, Integer, Hash)>

Synthetics: Create a test suite.

Parameters:

Returns:

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

    SyntheticsSuiteResponse data, response status code and response headers



38
39
40
41
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
# File 'lib/datadog_api_client/v2/api/synthetics_api.rb', line 38

def create_synthetics_suite_with_http_info(body, opts = {})

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SyntheticsAPI.create_synthetics_suite ...'
  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 SyntheticsAPI.create_synthetics_suite"
  end
  # resource path
  local_var_path = '/api/v2/synthetics/suites'

  # 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] || 'SyntheticsSuiteResponse'

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

  new_options = opts.merge(
    :operation => :create_synthetics_suite,
    :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: SyntheticsAPI#create_synthetics_suite\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_synthetics_suites(body, opts = {}) ⇒ Object

Synthetics: Bulk delete suites.



93
94
95
96
# File 'lib/datadog_api_client/v2/api/synthetics_api.rb', line 93

def delete_synthetics_suites(body, opts = {})
  data, _status_code, _headers = delete_synthetics_suites_with_http_info(body, opts)
  data
end

#delete_synthetics_suites_with_http_info(body, opts = {}) ⇒ Array<(DeletedSuitesResponse, Integer, Hash)>

Synthetics: Bulk delete suites.

Parameters:

Returns:

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

    DeletedSuitesResponse data, response status code and response headers



102
103
104
105
106
107
108
109
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
# File 'lib/datadog_api_client/v2/api/synthetics_api.rb', line 102

def delete_synthetics_suites_with_http_info(body, opts = {})

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SyntheticsAPI.delete_synthetics_suites ...'
  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 SyntheticsAPI.delete_synthetics_suites"
  end
  # resource path
  local_var_path = '/api/v2/synthetics/suites/bulk-delete'

  # 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] || 'DeletedSuitesResponse'

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

  new_options = opts.merge(
    :operation => :delete_synthetics_suites,
    :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: SyntheticsAPI#delete_synthetics_suites\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#edit_synthetics_suite(public_id, body, opts = {}) ⇒ Object

Synthetics: Edit a test suite.



157
158
159
160
# File 'lib/datadog_api_client/v2/api/synthetics_api.rb', line 157

def edit_synthetics_suite(public_id, body, opts = {})
  data, _status_code, _headers = edit_synthetics_suite_with_http_info(public_id, body, opts)
  data
end

#edit_synthetics_suite_with_http_info(public_id, body, opts = {}) ⇒ Array<(SyntheticsSuiteResponse, Integer, Hash)>

Synthetics: Edit a test suite.

Parameters:

  • public_id (String)

    The public ID of the suite to edit.

  • body (SuiteCreateEditRequest)

    New suite details to be saved.

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

    the optional parameters

Returns:

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

    SyntheticsSuiteResponse data, response status code and response headers



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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
# File 'lib/datadog_api_client/v2/api/synthetics_api.rb', line 167

def edit_synthetics_suite_with_http_info(public_id, body, opts = {})

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SyntheticsAPI.edit_synthetics_suite ...'
  end
  # verify the required parameter 'public_id' is set
  if @api_client.config.client_side_validation && public_id.nil?
    fail ArgumentError, "Missing the required parameter 'public_id' when calling SyntheticsAPI.edit_synthetics_suite"
  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 SyntheticsAPI.edit_synthetics_suite"
  end
  # resource path
  local_var_path = '/api/v2/synthetics/suites/{public_id}'.sub('{public_id}', CGI.escape(public_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] || 'SyntheticsSuiteResponse'

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

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

#get_on_demand_concurrency_cap(opts = {}) ⇒ Object

Get the on-demand concurrency cap.



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

def get_on_demand_concurrency_cap(opts = {})
  data, _status_code, _headers = get_on_demand_concurrency_cap_with_http_info(opts)
  data
end

#get_on_demand_concurrency_cap_with_http_info(opts = {}) ⇒ Array<(OnDemandConcurrencyCapResponse, Integer, Hash)>

Get the on-demand concurrency cap.

Get the on-demand concurrency cap.

Parameters:

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

    the optional parameters

Returns:



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

def get_on_demand_concurrency_cap_with_http_info(opts = {})

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SyntheticsAPI.get_on_demand_concurrency_cap ...'
  end
  # resource path
  local_var_path = '/api/v2/synthetics/settings/on_demand_concurrency_cap'

  # 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] || 'OnDemandConcurrencyCapResponse'

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

  new_options = opts.merge(
    :operation => :get_on_demand_concurrency_cap,
    :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: SyntheticsAPI#get_on_demand_concurrency_cap\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_synthetics_suite(public_id, opts = {}) ⇒ Object

Synthetics: Get a suite.



286
287
288
289
# File 'lib/datadog_api_client/v2/api/synthetics_api.rb', line 286

def get_synthetics_suite(public_id, opts = {})
  data, _status_code, _headers = get_synthetics_suite_with_http_info(public_id, opts)
  data
end

#get_synthetics_suite_with_http_info(public_id, opts = {}) ⇒ Array<(SyntheticsSuiteResponse, Integer, Hash)>

Synthetics: Get a suite.

Parameters:

  • public_id (String)

    The public ID of the suite to get details from.

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

    the optional parameters

Returns:

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

    SyntheticsSuiteResponse data, response status code and response headers



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

def get_synthetics_suite_with_http_info(public_id, opts = {})

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SyntheticsAPI.get_synthetics_suite ...'
  end
  # verify the required parameter 'public_id' is set
  if @api_client.config.client_side_validation && public_id.nil?
    fail ArgumentError, "Missing the required parameter 'public_id' when calling SyntheticsAPI.get_synthetics_suite"
  end
  # resource path
  local_var_path = '/api/v2/synthetics/suites/{public_id}'.sub('{public_id}', CGI.escape(public_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] || 'SyntheticsSuiteResponse'

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

  new_options = opts.merge(
    :operation => :get_synthetics_suite,
    :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: SyntheticsAPI#get_synthetics_suite\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#patch_global_variable(variable_id, body, opts = {}) ⇒ Object

Patch a global variable.



348
349
350
351
# File 'lib/datadog_api_client/v2/api/synthetics_api.rb', line 348

def patch_global_variable(variable_id, body, opts = {})
  data, _status_code, _headers = patch_global_variable_with_http_info(variable_id, body, opts)
  data
end

#patch_global_variable_with_http_info(variable_id, body, opts = {}) ⇒ Array<(GlobalVariableResponse, Integer, Hash)>

Patch a global variable.

Patch a global variable using JSON Patch (RFC 6902). This endpoint allows partial updates to a global variable by specifying only the fields to modify.

Common operations include:

  • Replace field values: {"op": "replace", "path": "/name", "value": "new_name"}
  • Update nested values: {"op": "replace", "path": "/value/value", "value": "new_value"}
  • Add/update tags: {"op": "add", "path": "/tags/-", "value": "new_tag"}
  • Remove fields: {"op": "remove", "path": "/description"}

Parameters:

  • variable_id (String)

    The ID of the global variable.

  • body (GlobalVariableJsonPatchRequest)

    JSON Patch document with operations to apply.

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

    the optional parameters

Returns:

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

    GlobalVariableResponse data, response status code and response headers



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
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
# File 'lib/datadog_api_client/v2/api/synthetics_api.rb', line 368

def patch_global_variable_with_http_info(variable_id, body, opts = {})

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SyntheticsAPI.patch_global_variable ...'
  end
  # verify the required parameter 'variable_id' is set
  if @api_client.config.client_side_validation && variable_id.nil?
    fail ArgumentError, "Missing the required parameter 'variable_id' when calling SyntheticsAPI.patch_global_variable"
  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 SyntheticsAPI.patch_global_variable"
  end
  # resource path
  local_var_path = '/api/v2/synthetics/variables/{variable_id}/jsonpatch'.sub('{variable_id}', CGI.escape(variable_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] || 'GlobalVariableResponse'

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

  new_options = opts.merge(
    :operation => :patch_global_variable,
    :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: SyntheticsAPI#patch_global_variable\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#search_suites(opts = {}) ⇒ Object

Search Synthetics suites.



427
428
429
430
# File 'lib/datadog_api_client/v2/api/synthetics_api.rb', line 427

def search_suites(opts = {})
  data, _status_code, _headers = search_suites_with_http_info(opts)
  data
end

#search_suites_with_http_info(opts = {}) ⇒ Array<(SyntheticsSuiteSearchResponse, Integer, Hash)>

Search Synthetics suites.

Search for Synthetics suites.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :query (String)

    The search query.

  • :sort (String)

    The sort order for the results (e.g., name,asc or name,desc).

  • :facets_only (Boolean)

    If true, return only facets instead of full test details.

  • :start (Integer)

    The offset from which to start returning results.

  • :count (Integer)

    The maximum number of results to return.

Returns:



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
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
# File 'lib/datadog_api_client/v2/api/synthetics_api.rb', line 443

def search_suites_with_http_info(opts = {})

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SyntheticsAPI.search_suites ...'
  end
  # resource path
  local_var_path = '/api/v2/synthetics/suites/search'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'facets_only'] = opts[:'facets_only'] if !opts[:'facets_only'].nil?
  query_params[:'start'] = opts[:'start'] if !opts[:'start'].nil?
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].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] || 'SyntheticsSuiteSearchResponse'

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

  new_options = opts.merge(
    :operation => :search_suites,
    :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: SyntheticsAPI#search_suites\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#set_on_demand_concurrency_cap(body, opts = {}) ⇒ Object

Save new value for on-demand concurrency cap.



89
90
91
92
# File 'lib/datadog_api_client/v2/api/synthetics_api.rb', line 89

def set_on_demand_concurrency_cap(body, opts = {})
  data, _status_code, _headers = set_on_demand_concurrency_cap_with_http_info(body, opts)
  data
end

#set_on_demand_concurrency_cap_with_http_info(body, opts = {}) ⇒ Array<(OnDemandConcurrencyCapResponse, Integer, Hash)>

Save new value for on-demand concurrency cap.

Save new value for on-demand concurrency cap.

Parameters:

Returns:



101
102
103
104
105
106
107
108
109
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
# File 'lib/datadog_api_client/v2/api/synthetics_api.rb', line 101

def set_on_demand_concurrency_cap_with_http_info(body, opts = {})

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SyntheticsAPI.set_on_demand_concurrency_cap ...'
  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 SyntheticsAPI.set_on_demand_concurrency_cap"
  end
  # resource path
  local_var_path = '/api/v2/synthetics/settings/on_demand_concurrency_cap'

  # 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] || 'OnDemandConcurrencyCapResponse'

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

  new_options = opts.merge(
    :operation => :set_on_demand_concurrency_cap,
    :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: SyntheticsAPI#set_on_demand_concurrency_cap\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end