class Ionoscloud::PrivateCrossConnectApi
Attributes
Public Class Methods
# File lib/ionoscloud/api/private_cross_connect_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Delete a Private Cross-Connect Delete a private cross-connect if no datacenters are joined to the given PCC @param pcc_id [String] The unique ID of the private cross-connect @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=… and so on (default to 0) @option opts [Integer] :x_contract_number Users
having more than 1 contract need to provide contract number, against which all API requests should be executed @return [Object]
# File lib/ionoscloud/api/private_cross_connect_api.rb, line 30 def pccs_delete(pcc_id, opts = {}) data, _status_code, _headers = pccs_delete_with_http_info(pcc_id, opts) data end
Delete a Private Cross-Connect Delete a private cross-connect if no datacenters are joined to the given PCC @param pcc_id [String] The unique ID of the private cross-connect @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=… and so on @option opts [Integer] :x_contract_number Users
having more than 1 contract need to provide contract number, against which all API requests should be executed @return [Array<(Object
, Integer, Hash)>] Object
data, response status code and response headers
# File lib/ionoscloud/api/private_cross_connect_api.rb, line 43 def pccs_delete_with_http_info(pcc_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PrivateCrossConnectApi.pccs_delete ...' 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 PrivateCrossConnectApi.pccs_delete" end if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10 fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling PrivateCrossConnectApi.pccs_delete, 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 PrivateCrossConnectApi.pccs_delete, 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']) 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] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication'] new_options = opts.merge( :operation => :"PrivateCrossConnectApi.pccs_delete", :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(:DELETE, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: PrivateCrossConnectApi#pccs_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieve a Private Cross-Connect You can retrieve a private cross-connect by using the resource's ID. This value can be found in the response body when a private cross-connect is created or when you GET a list of private cross-connects. @param pcc_id [String] The unique ID of the private cross-connect @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=… and so on (default to 0) @option opts [Integer] :x_contract_number Users
having more than 1 contract need to provide contract number, against which all API requests should be executed @return [PrivateCrossConnect]
# File lib/ionoscloud/api/private_cross_connect_api.rb, line 110 def pccs_find_by_id(pcc_id, opts = {}) data, _status_code, _headers = pccs_find_by_id_with_http_info(pcc_id, opts) data end
Retrieve a Private Cross-Connect You can retrieve a private cross-connect by using the resource's ID. This value can be found in the response body when a private cross-connect is created or when you GET a list of private cross-connects. @param pcc_id [String] The unique ID of the private cross-connect @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=… and so on @option opts [Integer] :x_contract_number Users
having more than 1 contract need to provide contract number, against which all API requests should be executed @return [Array<(PrivateCrossConnect
, Integer, Hash)>] PrivateCrossConnect
data, response status code and response headers
# File lib/ionoscloud/api/private_cross_connect_api.rb, line 123 def pccs_find_by_id_with_http_info(pcc_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PrivateCrossConnectApi.pccs_find_by_id ...' 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 PrivateCrossConnectApi.pccs_find_by_id" end if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10 fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling PrivateCrossConnectApi.pccs_find_by_id, 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 PrivateCrossConnectApi.pccs_find_by_id, 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']) 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] # 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 => :"PrivateCrossConnectApi.pccs_find_by_id", :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(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: PrivateCrossConnectApi#pccs_find_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
List Private Cross-Connects You can retrieve a complete list of private cross-connects provisioned under your account @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=… and so on (default to 0) @option opts [Integer] :x_contract_number Users
having more than 1 contract need to provide contract number, against which all API requests should be executed @return [PrivateCrossConnects]
# File lib/ionoscloud/api/private_cross_connect_api.rb, line 189 def pccs_get(opts = {}) data, _status_code, _headers = pccs_get_with_http_info(opts) data end
List Private Cross-Connects You can retrieve a complete list of private cross-connects provisioned under your account @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=… and so on @option opts [Integer] :x_contract_number Users
having more than 1 contract need to provide contract number, against which all API requests should be executed @return [Array<(PrivateCrossConnects
, Integer, Hash)>] PrivateCrossConnects
data, response status code and response headers
# File lib/ionoscloud/api/private_cross_connect_api.rb, line 201 def pccs_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PrivateCrossConnectApi.pccs_get ...' end if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10 fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling PrivateCrossConnectApi.pccs_get, 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 PrivateCrossConnectApi.pccs_get, must be greater than or equal to 0.' end # resource path local_var_path = '/pccs' # 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']) 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] # return_type return_type = opts[:debug_return_type] || 'PrivateCrossConnects' # auth_names auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication'] new_options = opts.merge( :operation => :"PrivateCrossConnectApi.pccs_get", :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(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: PrivateCrossConnectApi#pccs_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Partially modify a private cross-connect You can use update private cross-connect to re-name or update its description @param pcc_id [String] The unique ID of the private cross-connect @param pcc [PrivateCrossConnectProperties] Modified properties of private cross-connect @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=… and so on (default to 0) @option opts [Integer] :x_contract_number Users
having more than 1 contract need to provide contract number, against which all API requests should be executed @return [PrivateCrossConnect]
# File lib/ionoscloud/api/private_cross_connect_api.rb, line 265 def pccs_patch(pcc_id, pcc, opts = {}) data, _status_code, _headers = pccs_patch_with_http_info(pcc_id, pcc, opts) data end
Partially modify a private cross-connect You can use update private cross-connect to re-name or update its description @param pcc_id [String] The unique ID of the private cross-connect @param pcc [PrivateCrossConnectProperties] Modified properties of private cross-connect @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=… and so on @option opts [Integer] :x_contract_number Users
having more than 1 contract need to provide contract number, against which all API requests should be executed @return [Array<(PrivateCrossConnect
, Integer, Hash)>] PrivateCrossConnect
data, response status code and response headers
# File lib/ionoscloud/api/private_cross_connect_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: PrivateCrossConnectApi.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 PrivateCrossConnectApi.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 PrivateCrossConnectApi.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 PrivateCrossConnectApi.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 PrivateCrossConnectApi.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 => :"PrivateCrossConnectApi.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: PrivateCrossConnectApi#pccs_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Create a Private Cross-Connect You can use this POST method to create a private cross-connect @param pcc [PrivateCrossConnect] Private Cross-Connect to be created @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=… and so on (default to 0) @option opts [Integer] :x_contract_number Users
having more than 1 contract need to provide contract number, against which all API requests should be executed @return [PrivateCrossConnect]
# File lib/ionoscloud/api/private_cross_connect_api.rb, line 352 def pccs_post(pcc, opts = {}) data, _status_code, _headers = pccs_post_with_http_info(pcc, opts) data end
Create a Private Cross-Connect You can use this POST method to create a private cross-connect @param pcc [PrivateCrossConnect] Private Cross-Connect to be created @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=… and so on @option opts [Integer] :x_contract_number Users
having more than 1 contract need to provide contract number, against which all API requests should be executed @return [Array<(PrivateCrossConnect
, Integer, Hash)>] PrivateCrossConnect
data, response status code and response headers
# File lib/ionoscloud/api/private_cross_connect_api.rb, line 365 def pccs_post_with_http_info(pcc, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PrivateCrossConnectApi.pccs_post ...' 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 PrivateCrossConnectApi.pccs_post" end if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10 fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling PrivateCrossConnectApi.pccs_post, 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 PrivateCrossConnectApi.pccs_post, must be greater than or equal to 0.' end # resource path local_var_path = '/pccs' # 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 => :"PrivateCrossConnectApi.pccs_post", :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(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: PrivateCrossConnectApi#pccs_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end