Method: Ionoscloud::PrivateCrossConnectsApi#pccs_patch_with_http_info

Defined in:
lib/ionoscloud/api/private_cross_connects_api.rb

#pccs_patch_with_http_info(pcc_id, pcc, opts = {}) ⇒ Array<(PrivateCrossConnect, Integer, Hash)>

Partially modify private Cross-Connects Update the properties of the specified private Cross-Connect.

Parameters:

  • pcc_id (String)

    The unique ID of the private Cross-Connect.

  • pcc (PrivateCrossConnectProperties)

    The properties of the private Cross-Connect to be updated.

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

    the optional parameters

Options Hash (opts):

  • :pretty (Boolean)

    Controls whether the response is pretty-printed (with indentations and new lines).

  • :depth (Integer)

    Controls the detail depth of the response objects. GET /datacenters/ - depth&#x3D;0: Only direct properties are included; children (servers and other elements) are not included. - depth&#x3D;1: Direct properties and children references are included. - depth&#x3D;2: Direct properties and children properties are included. - depth&#x3D;3: Direct properties and children properties and children&#39;s children are included. - depth&#x3D;… and so on

  • :x_contract_number (Integer)

    Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Returns:

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

    PrivateCrossConnect data, response status code and response headers



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
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
# File 'lib/ionoscloud/api/private_cross_connects_api.rb', line 279

def pccs_patch_with_http_info(pcc_id, pcc, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PrivateCrossConnectsApi.pccs_patch ...'
  end
  # verify the required parameter 'pcc_id' is set
  if @api_client.config.client_side_validation && pcc_id.nil?
    fail ArgumentError, "Missing the required parameter 'pcc_id' when calling PrivateCrossConnectsApi.pccs_patch"
  end
  # verify the required parameter 'pcc' is set
  if @api_client.config.client_side_validation && pcc.nil?
    fail ArgumentError, "Missing the required parameter 'pcc' when calling PrivateCrossConnectsApi.pccs_patch"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling PrivateCrossConnectsApi.pccs_patch, must be smaller than or equal to 10.'
  end

  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling PrivateCrossConnectsApi.pccs_patch, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/pccs/{pccId}'.sub('{' + 'pccId' + '}', CGI.escape(pcc_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
  query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?

  # 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'])
  header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(pcc)

  # return_type
  return_type = opts[:debug_return_type] || 'PrivateCrossConnect'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']

  new_options = opts.merge(
    :operation => :"PrivateCrossConnectsApi.pccs_patch",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PrivateCrossConnectsApi#pccs_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end