Method: IbmCloudPower::PCloudCloudConnectionsApi#pcloud_cloudconnections_networks_put_with_http_info
- Defined in:
- lib/ibm_cloud_power/api/p_cloud_cloud_connections_api.rb
#pcloud_cloudconnections_networks_put_with_http_info(cloud_instance_id, cloud_connection_id, network_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Add a network to the cloud connection
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 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 |
# File 'lib/ibm_cloud_power/api/p_cloud_cloud_connections_api.rb', line 307 def pcloud_cloudconnections_networks_put_with_http_info(cloud_instance_id, cloud_connection_id, network_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudCloudConnectionsApi.pcloud_cloudconnections_networks_put ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudCloudConnectionsApi.pcloud_cloudconnections_networks_put" end # verify the required parameter 'cloud_connection_id' is set if @api_client.config.client_side_validation && cloud_connection_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_connection_id' when calling PCloudCloudConnectionsApi.pcloud_cloudconnections_networks_put" end # verify the required parameter 'network_id' is set if @api_client.config.client_side_validation && network_id.nil? fail ArgumentError, "Missing the required parameter 'network_id' when calling PCloudCloudConnectionsApi.pcloud_cloudconnections_networks_put" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'cloud_connection_id' + '}', CGI.escape(cloud_connection_id.to_s)).sub('{' + 'network_id' + '}', CGI.escape(network_id.to_s)) # 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] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"PCloudCloudConnectionsApi.pcloud_cloudconnections_networks_put", :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(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PCloudCloudConnectionsApi#pcloud_cloudconnections_networks_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |