Class: LinodeOpenapiClient::NetworkingApi

Inherits:
Object
  • Object
show all
Defined in:
lib/linode_openapi_client/api/networking_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ NetworkingApi

Returns a new instance of NetworkingApi.



19
20
21
# File 'lib/linode_openapi_client/api/networking_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/linode_openapi_client/api/networking_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#delete_firewall(api_version, firewall_id, opts = {}) ⇒ Object

Delete a firewall Delete a Firewall resource by its ID. This removes all of the Firewall’s Rules from any services that the Firewall was assigned to. - Assigned Linodes must not have any ongoing live migrations. - A ‘firewall_delete` Event is generated when this operation returns successfully. <<LB>> — - __CLI__. “` linode-cli firewalls delete 123 “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` firewall:read_write “` [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • firewall_id (Integer)

    ID of the Firewall to access.

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

    the optional parameters

Returns:

  • (Object)


28
29
30
31
# File 'lib/linode_openapi_client/api/networking_api.rb', line 28

def delete_firewall(api_version, firewall_id, opts = {})
  data, _status_code, _headers = delete_firewall_with_http_info(api_version, firewall_id, opts)
  data
end

#delete_firewall_device(api_version, firewall_id, device_id, opts = {}) ⇒ Object

Delete a firewall device Removes a Firewall Device, which removes a Firewall from the service it was assigned to by the Device. This removes all of the Firewall’s Rules from the service. If any other Firewalls have been assigned to the service, then those Rules remain in effect. - Assigned Linodes must not have any ongoing live migrations. - A ‘firewall_device_remove` Event is generated when the Firewall Device is removed successfully. <<LB>> — - __CLI__. “` linode-cli firewalls device-delete 123 456 “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` firewall:read_write “` [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • firewall_id (Integer)

    ID of the Firewall to access.

  • device_id (Integer)

    ID of the Firewall Device to access.

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

    the optional parameters

Returns:

  • (Object)


103
104
105
106
# File 'lib/linode_openapi_client/api/networking_api.rb', line 103

def delete_firewall_device(api_version, firewall_id, device_id, opts = {})
  data, _status_code, _headers = delete_firewall_device_with_http_info(api_version, firewall_id, device_id, opts)
  data
end

#delete_firewall_device_with_http_info(api_version, firewall_id, device_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Delete a firewall device Removes a Firewall Device, which removes a Firewall from the service it was assigned to by the Device. This removes all of the Firewall&#39;s Rules from the service. If any other Firewalls have been assigned to the service, then those Rules remain in effect. - Assigned Linodes must not have any ongoing live migrations. - A &#x60;firewall_device_remove&#x60; Event is generated when the Firewall Device is removed successfully. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli firewalls device-delete 123 456 &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; firewall:read_write &#x60;&#x60;&#x60; [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • firewall_id (Integer)

    ID of the Firewall to access.

  • device_id (Integer)

    ID of the Firewall Device to access.

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

    the optional parameters

Returns:

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

    Object data, response status code and response headers



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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# File 'lib/linode_openapi_client/api/networking_api.rb', line 115

def delete_firewall_device_with_http_info(api_version, firewall_id, device_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NetworkingApi.delete_firewall_device ...'
  end
  # verify the required parameter 'api_version' is set
  if @api_client.config.client_side_validation && api_version.nil?
    fail ArgumentError, "Missing the required parameter 'api_version' when calling NetworkingApi.delete_firewall_device"
  end
  # verify enum value
  allowable_values = ["v4", "v4beta"]
  if @api_client.config.client_side_validation && !allowable_values.include?(api_version)
    fail ArgumentError, "invalid value for \"api_version\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'firewall_id' is set
  if @api_client.config.client_side_validation && firewall_id.nil?
    fail ArgumentError, "Missing the required parameter 'firewall_id' when calling NetworkingApi.delete_firewall_device"
  end
  # verify the required parameter 'device_id' is set
  if @api_client.config.client_side_validation && device_id.nil?
    fail ArgumentError, "Missing the required parameter 'device_id' when calling NetworkingApi.delete_firewall_device"
  end
  # resource path
  local_var_path = '/{apiVersion}/networking/firewalls/{firewallId}/devices/{deviceId}'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.to_s)).sub('{' + 'firewallId' + '}', CGI.escape(firewall_id.to_s)).sub('{' + 'deviceId' + '}', CGI.escape(device_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']) unless header_params['Accept']

  # 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] || ['personalAccessToken', 'oauth']

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

#delete_firewall_with_http_info(api_version, firewall_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Delete a firewall Delete a Firewall resource by its ID. This removes all of the Firewall&#39;s Rules from any services that the Firewall was assigned to. - Assigned Linodes must not have any ongoing live migrations. - A &#x60;firewall_delete&#x60; Event is generated when this operation returns successfully. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli firewalls delete 123 &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; firewall:read_write &#x60;&#x60;&#x60; [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • firewall_id (Integer)

    ID of the Firewall to access.

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

    the optional parameters

Returns:

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

    Object data, response status code and response headers



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
89
90
91
92
93
94
# File 'lib/linode_openapi_client/api/networking_api.rb', line 39

def delete_firewall_with_http_info(api_version, firewall_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NetworkingApi.delete_firewall ...'
  end
  # verify the required parameter 'api_version' is set
  if @api_client.config.client_side_validation && api_version.nil?
    fail ArgumentError, "Missing the required parameter 'api_version' when calling NetworkingApi.delete_firewall"
  end
  # verify enum value
  allowable_values = ["v4", "v4beta"]
  if @api_client.config.client_side_validation && !allowable_values.include?(api_version)
    fail ArgumentError, "invalid value for \"api_version\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'firewall_id' is set
  if @api_client.config.client_side_validation && firewall_id.nil?
    fail ArgumentError, "Missing the required parameter 'firewall_id' when calling NetworkingApi.delete_firewall"
  end
  # resource path
  local_var_path = '/{apiVersion}/networking/firewalls/{firewallId}'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.to_s)).sub('{' + 'firewallId' + '}', CGI.escape(firewall_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']) unless header_params['Accept']

  # 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] || ['personalAccessToken', 'oauth']

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

#delete_ipv6_range(api_version, range, opts = {}) ⇒ Object

Delete an IPv6 range

Removes this IPv6 range from your account and disconnects the range from any assigned Linodes. __Note__. Shared IPv6 ranges cannot be deleted at this time. Please contact Customer Support for assistance. <<LB>> — - __CLI__. “‘ linode-cli networking v6-range-delete 2001:0db8

“‘ [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` ips:read_write “` [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • range (String)

    The IPv6 range to access. Corresponds to the &#x60;range&#x60; property of objects returned from the [List IPv6 ranges](techdocs.akamai.com/linode-api/reference/get-ipv6-ranges) operation. __Note__. Omit the prefix length of the IPv6 range.

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

    the optional parameters

Returns:

  • (Object)


182
183
184
185
# File 'lib/linode_openapi_client/api/networking_api.rb', line 182

def delete_ipv6_range(api_version, range, opts = {})
  data, _status_code, _headers = delete_ipv6_range_with_http_info(api_version, range, opts)
  data
end

#delete_ipv6_range_with_http_info(api_version, range, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Delete an IPv6 range

Removes this IPv6 range from your account and disconnects the range from any assigned Linodes. __Note__. Shared IPv6 ranges cannot be deleted at this time. Please contact Customer Support for assistance. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli networking v6-range-delete 2001:0db8

&#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; ips:read_write &#x60;&#x60;&#x60; [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • range (String)

    The IPv6 range to access. Corresponds to the &#x60;range&#x60; property of objects returned from the [List IPv6 ranges](techdocs.akamai.com/linode-api/reference/get-ipv6-ranges) operation. __Note__. Omit the prefix length of the IPv6 range.

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

    the optional parameters

Returns:

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

    Object data, response status code and response headers



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
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
# File 'lib/linode_openapi_client/api/networking_api.rb', line 193

def delete_ipv6_range_with_http_info(api_version, range, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NetworkingApi.delete_ipv6_range ...'
  end
  # verify the required parameter 'api_version' is set
  if @api_client.config.client_side_validation && api_version.nil?
    fail ArgumentError, "Missing the required parameter 'api_version' when calling NetworkingApi.delete_ipv6_range"
  end
  # verify enum value
  allowable_values = ["v4", "v4beta"]
  if @api_client.config.client_side_validation && !allowable_values.include?(api_version)
    fail ArgumentError, "invalid value for \"api_version\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'range' is set
  if @api_client.config.client_side_validation && range.nil?
    fail ArgumentError, "Missing the required parameter 'range' when calling NetworkingApi.delete_ipv6_range"
  end
  # resource path
  local_var_path = '/{apiVersion}/networking/ipv6/ranges/{range}'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.to_s)).sub('{' + 'range' + '}', CGI.escape(range.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']) unless header_params['Accept']

  # 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] || ['personalAccessToken', 'oauth']

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

#get_firewall(api_version, firewall_id, opts = {}) ⇒ GetFirewall200Response

Get a firewall Get a specific Firewall resource by its ID. The Firewall’s Devices will not be returned in the response. Instead, run the [List firewall devices](techdocs.akamai.com/linode-api/reference/get-firewall-devices) operation to review them. <<LB>> — - __CLI__. “‘ linode-cli firewalls view 123 “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` firewall:read_only “` [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • firewall_id (Integer)

    ID of the Firewall to access.

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

    the optional parameters

Returns:



256
257
258
259
# File 'lib/linode_openapi_client/api/networking_api.rb', line 256

def get_firewall(api_version, firewall_id, opts = {})
  data, _status_code, _headers = get_firewall_with_http_info(api_version, firewall_id, opts)
  data
end

#get_firewall_device(api_version, firewall_id, device_id, opts = {}) ⇒ GetFirewallDevice200Response

Get a firewall device Returns information for a Firewall Device, which assigns a Firewall to a service (referred to as the Device’s ‘entity`). <<LB>> — - __CLI__. “` linode-cli firewalls device-view \ 123 456 “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` firewall:read_only “` [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • firewall_id (Integer)

    ID of the Firewall to access.

  • device_id (Integer)

    ID of the Firewall Device to access.

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

    the optional parameters

Returns:



331
332
333
334
# File 'lib/linode_openapi_client/api/networking_api.rb', line 331

def get_firewall_device(api_version, firewall_id, device_id, opts = {})
  data, _status_code, _headers = get_firewall_device_with_http_info(api_version, firewall_id, device_id, opts)
  data
end

#get_firewall_device_with_http_info(api_version, firewall_id, device_id, opts = {}) ⇒ Array<(GetFirewallDevice200Response, Integer, Hash)>

Get a firewall device Returns information for a Firewall Device, which assigns a Firewall to a service (referred to as the Device&#39;s &#x60;entity&#x60;). &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli firewalls device-view \ 123 456 &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; firewall:read_only &#x60;&#x60;&#x60; [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • firewall_id (Integer)

    ID of the Firewall to access.

  • device_id (Integer)

    ID of the Firewall Device to access.

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

    the optional parameters

Returns:



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
401
402
# File 'lib/linode_openapi_client/api/networking_api.rb', line 343

def get_firewall_device_with_http_info(api_version, firewall_id, device_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NetworkingApi.get_firewall_device ...'
  end
  # verify the required parameter 'api_version' is set
  if @api_client.config.client_side_validation && api_version.nil?
    fail ArgumentError, "Missing the required parameter 'api_version' when calling NetworkingApi.get_firewall_device"
  end
  # verify enum value
  allowable_values = ["v4", "v4beta"]
  if @api_client.config.client_side_validation && !allowable_values.include?(api_version)
    fail ArgumentError, "invalid value for \"api_version\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'firewall_id' is set
  if @api_client.config.client_side_validation && firewall_id.nil?
    fail ArgumentError, "Missing the required parameter 'firewall_id' when calling NetworkingApi.get_firewall_device"
  end
  # verify the required parameter 'device_id' is set
  if @api_client.config.client_side_validation && device_id.nil?
    fail ArgumentError, "Missing the required parameter 'device_id' when calling NetworkingApi.get_firewall_device"
  end
  # resource path
  local_var_path = '/{apiVersion}/networking/firewalls/{firewallId}/devices/{deviceId}'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.to_s)).sub('{' + 'firewallId' + '}', CGI.escape(firewall_id.to_s)).sub('{' + 'deviceId' + '}', CGI.escape(device_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']) unless header_params['Accept']

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

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

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['personalAccessToken', 'oauth']

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

#get_firewall_devices(api_version, firewall_id, opts = {}) ⇒ GetFirewallDevices200Response

List firewall devices Returns a paginated list of a Firewall’s Devices. A Firewall Device assigns a Firewall to a service (referred to as the Device’s ‘entity`). <<LB>> — - __CLI__. “` linode-cli firewalls devices-list 123 “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` firewall:read_only “` [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • firewall_id (Integer)

    ID of the Firewall to access.

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    The page of a collection to return. (default to 1)

  • :page_size (Integer)

    The number of items to return per page. (default to 100)

Returns:



412
413
414
415
# File 'lib/linode_openapi_client/api/networking_api.rb', line 412

def get_firewall_devices(api_version, firewall_id, opts = {})
  data, _status_code, _headers = get_firewall_devices_with_http_info(api_version, firewall_id, opts)
  data
end

#get_firewall_devices_with_http_info(api_version, firewall_id, opts = {}) ⇒ Array<(GetFirewallDevices200Response, Integer, Hash)>

List firewall devices Returns a paginated list of a Firewall&#39;s Devices. A Firewall Device assigns a Firewall to a service (referred to as the Device&#39;s &#x60;entity&#x60;). &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli firewalls devices-list 123 &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; firewall:read_only &#x60;&#x60;&#x60; [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • firewall_id (Integer)

    ID of the Firewall to access.

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    The page of a collection to return. (default to 1)

  • :page_size (Integer)

    The number of items to return per page. (default to 100)

Returns:



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
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
# File 'lib/linode_openapi_client/api/networking_api.rb', line 425

def get_firewall_devices_with_http_info(api_version, firewall_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NetworkingApi.get_firewall_devices ...'
  end
  # verify the required parameter 'api_version' is set
  if @api_client.config.client_side_validation && api_version.nil?
    fail ArgumentError, "Missing the required parameter 'api_version' when calling NetworkingApi.get_firewall_devices"
  end
  # verify enum value
  allowable_values = ["v4", "v4beta"]
  if @api_client.config.client_side_validation && !allowable_values.include?(api_version)
    fail ArgumentError, "invalid value for \"api_version\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'firewall_id' is set
  if @api_client.config.client_side_validation && firewall_id.nil?
    fail ArgumentError, "Missing the required parameter 'firewall_id' when calling NetworkingApi.get_firewall_devices"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling NetworkingApi.get_firewall_devices, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 500
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling NetworkingApi.get_firewall_devices, must be smaller than or equal to 500.'
  end

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

  # resource path
  local_var_path = '/{apiVersion}/networking/firewalls/{firewallId}/devices'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.to_s)).sub('{' + 'firewallId' + '}', CGI.escape(firewall_id.to_s))

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

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

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

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

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['personalAccessToken', 'oauth']

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

#get_firewall_rules(api_version, firewall_id, opts = {}) ⇒ GetFirewallRules200Response

List firewall rules Returns the inbound and outbound Rules for a Firewall. <<LB>> — - __CLI__. “‘ linode-cli firewalls rules-list 123 “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` firewall:read_only “` [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • firewall_id (Integer)

    ID of the Firewall to access.

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

    the optional parameters

Returns:



502
503
504
505
# File 'lib/linode_openapi_client/api/networking_api.rb', line 502

def get_firewall_rules(api_version, firewall_id, opts = {})
  data, _status_code, _headers = get_firewall_rules_with_http_info(api_version, firewall_id, opts)
  data
end

#get_firewall_rules_with_http_info(api_version, firewall_id, opts = {}) ⇒ Array<(GetFirewallRules200Response, Integer, Hash)>

List firewall rules Returns the inbound and outbound Rules for a Firewall. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli firewalls rules-list 123 &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; firewall:read_only &#x60;&#x60;&#x60; [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • firewall_id (Integer)

    ID of the Firewall to access.

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

    the optional parameters

Returns:

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

    GetFirewallRules200Response data, response status code and response headers



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
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
# File 'lib/linode_openapi_client/api/networking_api.rb', line 513

def get_firewall_rules_with_http_info(api_version, firewall_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NetworkingApi.get_firewall_rules ...'
  end
  # verify the required parameter 'api_version' is set
  if @api_client.config.client_side_validation && api_version.nil?
    fail ArgumentError, "Missing the required parameter 'api_version' when calling NetworkingApi.get_firewall_rules"
  end
  # verify enum value
  allowable_values = ["v4", "v4beta"]
  if @api_client.config.client_side_validation && !allowable_values.include?(api_version)
    fail ArgumentError, "invalid value for \"api_version\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'firewall_id' is set
  if @api_client.config.client_side_validation && firewall_id.nil?
    fail ArgumentError, "Missing the required parameter 'firewall_id' when calling NetworkingApi.get_firewall_rules"
  end
  # resource path
  local_var_path = '/{apiVersion}/networking/firewalls/{firewallId}/rules'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.to_s)).sub('{' + 'firewallId' + '}', CGI.escape(firewall_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']) unless header_params['Accept']

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

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

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['personalAccessToken', 'oauth']

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

#get_firewall_with_http_info(api_version, firewall_id, opts = {}) ⇒ Array<(GetFirewall200Response, Integer, Hash)>

Get a firewall Get a specific Firewall resource by its ID. The Firewall&#39;s Devices will not be returned in the response. Instead, run the [List firewall devices](techdocs.akamai.com/linode-api/reference/get-firewall-devices) operation to review them. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli firewalls view 123 &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; firewall:read_only &#x60;&#x60;&#x60; [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • firewall_id (Integer)

    ID of the Firewall to access.

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

    the optional parameters

Returns:

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

    GetFirewall200Response data, response status code and response headers



267
268
269
270
271
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
# File 'lib/linode_openapi_client/api/networking_api.rb', line 267

def get_firewall_with_http_info(api_version, firewall_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NetworkingApi.get_firewall ...'
  end
  # verify the required parameter 'api_version' is set
  if @api_client.config.client_side_validation && api_version.nil?
    fail ArgumentError, "Missing the required parameter 'api_version' when calling NetworkingApi.get_firewall"
  end
  # verify enum value
  allowable_values = ["v4", "v4beta"]
  if @api_client.config.client_side_validation && !allowable_values.include?(api_version)
    fail ArgumentError, "invalid value for \"api_version\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'firewall_id' is set
  if @api_client.config.client_side_validation && firewall_id.nil?
    fail ArgumentError, "Missing the required parameter 'firewall_id' when calling NetworkingApi.get_firewall"
  end
  # resource path
  local_var_path = '/{apiVersion}/networking/firewalls/{firewallId}'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.to_s)).sub('{' + 'firewallId' + '}', CGI.escape(firewall_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']) unless header_params['Accept']

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

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

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['personalAccessToken', 'oauth']

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

#get_firewalls(api_version, opts = {}) ⇒ GetFirewalls200Response

List firewalls Returns a paginated list of accessible Firewalls. <<LB>> — - __CLI__. “‘ linode-cli firewalls list “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` firewall:read_only “` [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    The page of a collection to return. (default to 1)

  • :page_size (Integer)

    The number of items to return per page. (default to 100)

Returns:



577
578
579
580
# File 'lib/linode_openapi_client/api/networking_api.rb', line 577

def get_firewalls(api_version, opts = {})
  data, _status_code, _headers = get_firewalls_with_http_info(api_version, opts)
  data
end

#get_firewalls_with_http_info(api_version, opts = {}) ⇒ Array<(GetFirewalls200Response, Integer, Hash)>

List firewalls Returns a paginated list of accessible Firewalls. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli firewalls list &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; firewall:read_only &#x60;&#x60;&#x60; [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    The page of a collection to return. (default to 1)

  • :page_size (Integer)

    The number of items to return per page. (default to 100)

Returns:

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

    GetFirewalls200Response data, response status code and response headers



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
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
# File 'lib/linode_openapi_client/api/networking_api.rb', line 589

def get_firewalls_with_http_info(api_version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NetworkingApi.get_firewalls ...'
  end
  # verify the required parameter 'api_version' is set
  if @api_client.config.client_side_validation && api_version.nil?
    fail ArgumentError, "Missing the required parameter 'api_version' when calling NetworkingApi.get_firewalls"
  end
  # verify enum value
  allowable_values = ["v4", "v4beta"]
  if @api_client.config.client_side_validation && !allowable_values.include?(api_version)
    fail ArgumentError, "invalid value for \"api_version\", must be one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling NetworkingApi.get_firewalls, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 500
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling NetworkingApi.get_firewalls, must be smaller than or equal to 500.'
  end

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

  # resource path
  local_var_path = '/{apiVersion}/networking/firewalls'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.to_s))

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

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

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

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

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['personalAccessToken', 'oauth']

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

#get_ip(api_version, address, opts = {}) ⇒ GetIp200Response

Get an IP address Returns information about a single IP Address on your Account. <<LB>> — - __CLI__. “‘ linode-cli networking ip-view 97.107.143.141 “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` ips:read_only “` [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • address (String)

    The address to operate on.

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

    the optional parameters

Returns:



662
663
664
665
# File 'lib/linode_openapi_client/api/networking_api.rb', line 662

def get_ip(api_version, address, opts = {})
  data, _status_code, _headers = get_ip_with_http_info(api_version, address, opts)
  data
end

#get_ip_with_http_info(api_version, address, opts = {}) ⇒ Array<(GetIp200Response, Integer, Hash)>

Get an IP address Returns information about a single IP Address on your Account. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli networking ip-view 97.107.143.141 &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; ips:read_only &#x60;&#x60;&#x60; [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • address (String)

    The address to operate on.

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

    the optional parameters

Returns:

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

    GetIp200Response data, response status code and response headers



673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
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
# File 'lib/linode_openapi_client/api/networking_api.rb', line 673

def get_ip_with_http_info(api_version, address, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NetworkingApi.get_ip ...'
  end
  # verify the required parameter 'api_version' is set
  if @api_client.config.client_side_validation && api_version.nil?
    fail ArgumentError, "Missing the required parameter 'api_version' when calling NetworkingApi.get_ip"
  end
  # verify enum value
  allowable_values = ["v4", "v4beta"]
  if @api_client.config.client_side_validation && !allowable_values.include?(api_version)
    fail ArgumentError, "invalid value for \"api_version\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'address' is set
  if @api_client.config.client_side_validation && address.nil?
    fail ArgumentError, "Missing the required parameter 'address' when calling NetworkingApi.get_ip"
  end
  # resource path
  local_var_path = '/{apiVersion}/networking/ips/{address}'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.to_s)).sub('{' + 'address' + '}', CGI.escape(address.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']) unless header_params['Accept']

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

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

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['personalAccessToken', 'oauth']

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

#get_ips(api_version, opts = {}) ⇒ GetIps200Response

List IP addresses Returns a paginated list of IP addresses on your account, excluding private addresses. __Note__. Use the ‘skip_ipv6_rdns` query string to improve performance if your application frequently accesses this operation and doesn’t require IPv6 RDNS data. <<LB>> — - __CLI__. “‘ linode-cli networking ips-list “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` ips:read_only “` [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

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

    the optional parameters

Options Hash (opts):

  • :skip_ipv6_rdns (Boolean)

    When &#x60;true&#x60;, the &#x60;rdns&#x60; property for any &#x60;ipv6&#x60; type addresses always returns &#x60;null&#x60; regardless of whether RDNS data exists for the address. (default to false)

Returns:



736
737
738
739
# File 'lib/linode_openapi_client/api/networking_api.rb', line 736

def get_ips(api_version, opts = {})
  data, _status_code, _headers = get_ips_with_http_info(api_version, opts)
  data
end

#get_ips_with_http_info(api_version, opts = {}) ⇒ Array<(GetIps200Response, Integer, Hash)>

List IP addresses Returns a paginated list of IP addresses on your account, excluding private addresses. __Note__. Use the &#x60;skip_ipv6_rdns&#x60; query string to improve performance if your application frequently accesses this operation and doesn&#39;t require IPv6 RDNS data. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli networking ips-list &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; ips:read_only &#x60;&#x60;&#x60; [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

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

    the optional parameters

Options Hash (opts):

  • :skip_ipv6_rdns (Boolean)

    When &#x60;true&#x60;, the &#x60;rdns&#x60; property for any &#x60;ipv6&#x60; type addresses always returns &#x60;null&#x60; regardless of whether RDNS data exists for the address. (default to false)

Returns:

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

    GetIps200Response data, response status code and response headers



747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
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
# File 'lib/linode_openapi_client/api/networking_api.rb', line 747

def get_ips_with_http_info(api_version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NetworkingApi.get_ips ...'
  end
  # verify the required parameter 'api_version' is set
  if @api_client.config.client_side_validation && api_version.nil?
    fail ArgumentError, "Missing the required parameter 'api_version' when calling NetworkingApi.get_ips"
  end
  # verify enum value
  allowable_values = ["v4", "v4beta"]
  if @api_client.config.client_side_validation && !allowable_values.include?(api_version)
    fail ArgumentError, "invalid value for \"api_version\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/{apiVersion}/networking/ips'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.to_s))

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

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

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

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

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['personalAccessToken', 'oauth']

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

#get_ipv6_pools(api_version, opts = {}) ⇒ GetIpv6Pools200Response

List IPv6 pools Displays the IPv6 pools on your Account. A pool of IPv6 addresses are routed to all of your Linodes in a single [region](techdocs.akamai.com/linode-api/reference/get-regions). Any Linode on your Account may bring up any address in this pool at any time, with no external configuration required. <<LB>> — - __CLI__. “‘ linode-cli networking v6-pools “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` ips:read_only “` [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    The page of a collection to return. (default to 1)

  • :page_size (Integer)

    The number of items to return per page. (default to 100)

Returns:



808
809
810
811
# File 'lib/linode_openapi_client/api/networking_api.rb', line 808

def get_ipv6_pools(api_version, opts = {})
  data, _status_code, _headers = get_ipv6_pools_with_http_info(api_version, opts)
  data
end

#get_ipv6_pools_with_http_info(api_version, opts = {}) ⇒ Array<(GetIpv6Pools200Response, Integer, Hash)>

List IPv6 pools Displays the IPv6 pools on your Account. A pool of IPv6 addresses are routed to all of your Linodes in a single [region](techdocs.akamai.com/linode-api/reference/get-regions). Any Linode on your Account may bring up any address in this pool at any time, with no external configuration required. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli networking v6-pools &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; ips:read_only &#x60;&#x60;&#x60; [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    The page of a collection to return. (default to 1)

  • :page_size (Integer)

    The number of items to return per page. (default to 100)

Returns:

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

    GetIpv6Pools200Response data, response status code and response headers



820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
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
# File 'lib/linode_openapi_client/api/networking_api.rb', line 820

def get_ipv6_pools_with_http_info(api_version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NetworkingApi.get_ipv6_pools ...'
  end
  # verify the required parameter 'api_version' is set
  if @api_client.config.client_side_validation && api_version.nil?
    fail ArgumentError, "Missing the required parameter 'api_version' when calling NetworkingApi.get_ipv6_pools"
  end
  # verify enum value
  allowable_values = ["v4", "v4beta"]
  if @api_client.config.client_side_validation && !allowable_values.include?(api_version)
    fail ArgumentError, "invalid value for \"api_version\", must be one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling NetworkingApi.get_ipv6_pools, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 500
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling NetworkingApi.get_ipv6_pools, must be smaller than or equal to 500.'
  end

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

  # resource path
  local_var_path = '/{apiVersion}/networking/ipv6/pools'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.to_s))

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

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

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

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

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['personalAccessToken', 'oauth']

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

#get_ipv6_range(api_version, range, opts = {}) ⇒ GetIpv6Range200Response

Get an IPv6 range

View IPv6 range information. <<LB>> — - __CLI__. “‘ linode-cli networking v6-range-view 2001:0db8

“‘ [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` ips:read “` [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • range (String)

    The IPv6 range to access. Corresponds to the &#x60;range&#x60; property of objects returned from the [List IPv6 ranges](techdocs.akamai.com/linode-api/reference/get-ipv6-ranges) operation. __Note__. Omit the prefix length of the IPv6 range.

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

    the optional parameters

Returns:



893
894
895
896
# File 'lib/linode_openapi_client/api/networking_api.rb', line 893

def get_ipv6_range(api_version, range, opts = {})
  data, _status_code, _headers = get_ipv6_range_with_http_info(api_version, range, opts)
  data
end

#get_ipv6_range_with_http_info(api_version, range, opts = {}) ⇒ Array<(GetIpv6Range200Response, Integer, Hash)>

Get an IPv6 range

View IPv6 range information. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli networking v6-range-view 2001:0db8

&#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; ips:read &#x60;&#x60;&#x60; [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • range (String)

    The IPv6 range to access. Corresponds to the &#x60;range&#x60; property of objects returned from the [List IPv6 ranges](techdocs.akamai.com/linode-api/reference/get-ipv6-ranges) operation. __Note__. Omit the prefix length of the IPv6 range.

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

    the optional parameters

Returns:

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

    GetIpv6Range200Response data, response status code and response headers



904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
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
# File 'lib/linode_openapi_client/api/networking_api.rb', line 904

def get_ipv6_range_with_http_info(api_version, range, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NetworkingApi.get_ipv6_range ...'
  end
  # verify the required parameter 'api_version' is set
  if @api_client.config.client_side_validation && api_version.nil?
    fail ArgumentError, "Missing the required parameter 'api_version' when calling NetworkingApi.get_ipv6_range"
  end
  # verify enum value
  allowable_values = ["v4", "v4beta"]
  if @api_client.config.client_side_validation && !allowable_values.include?(api_version)
    fail ArgumentError, "invalid value for \"api_version\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'range' is set
  if @api_client.config.client_side_validation && range.nil?
    fail ArgumentError, "Missing the required parameter 'range' when calling NetworkingApi.get_ipv6_range"
  end
  # resource path
  local_var_path = '/{apiVersion}/networking/ipv6/ranges/{range}'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.to_s)).sub('{' + 'range' + '}', CGI.escape(range.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']) unless header_params['Accept']

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

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

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['personalAccessToken', 'oauth']

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

#get_ipv6_ranges(api_version, opts = {}) ⇒ GetIpv6Ranges200Response

List IPv6 ranges Displays the IPv6 ranges on your Account. - An IPv6 range is a ‘/64` or `/54` block of IPv6 addresses routed to a single Linode in a given [region](techdocs.akamai.com/linode-api/reference/get-regions). - Your Linode is responsible for routing individual addresses in the range, or handling traffic for all the addresses in the range. - Run the [Create an IPv6 range](techdocs.akamai.com/linode-api/reference/post-ipv6-range) operation to add a `/64` or `/56` block of IPv6 addresses to your account. <<LB>> — - __CLI__. “` linode-cli networking v6-ranges “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` ips:read_only “` [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    The page of a collection to return. (default to 1)

  • :page_size (Integer)

    The number of items to return per page. (default to 100)

Returns:



968
969
970
971
# File 'lib/linode_openapi_client/api/networking_api.rb', line 968

def get_ipv6_ranges(api_version, opts = {})
  data, _status_code, _headers = get_ipv6_ranges_with_http_info(api_version, opts)
  data
end

#get_ipv6_ranges_with_http_info(api_version, opts = {}) ⇒ Array<(GetIpv6Ranges200Response, Integer, Hash)>

List IPv6 ranges Displays the IPv6 ranges on your Account. - An IPv6 range is a &#x60;/64&#x60; or &#x60;/54&#x60; block of IPv6 addresses routed to a single Linode in a given [region](techdocs.akamai.com/linode-api/reference/get-regions). - Your Linode is responsible for routing individual addresses in the range, or handling traffic for all the addresses in the range. - Run the [Create an IPv6 range](techdocs.akamai.com/linode-api/reference/post-ipv6-range) operation to add a &#x60;/64&#x60; or &#x60;/56&#x60; block of IPv6 addresses to your account. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli networking v6-ranges &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; ips:read_only &#x60;&#x60;&#x60; [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    The page of a collection to return. (default to 1)

  • :page_size (Integer)

    The number of items to return per page. (default to 100)

Returns:

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

    GetIpv6Ranges200Response data, response status code and response headers



980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
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
# File 'lib/linode_openapi_client/api/networking_api.rb', line 980

def get_ipv6_ranges_with_http_info(api_version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NetworkingApi.get_ipv6_ranges ...'
  end
  # verify the required parameter 'api_version' is set
  if @api_client.config.client_side_validation && api_version.nil?
    fail ArgumentError, "Missing the required parameter 'api_version' when calling NetworkingApi.get_ipv6_ranges"
  end
  # verify enum value
  allowable_values = ["v4", "v4beta"]
  if @api_client.config.client_side_validation && !allowable_values.include?(api_version)
    fail ArgumentError, "invalid value for \"api_version\", must be one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling NetworkingApi.get_ipv6_ranges, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 500
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling NetworkingApi.get_ipv6_ranges, must be smaller than or equal to 500.'
  end

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

  # resource path
  local_var_path = '/{apiVersion}/networking/ipv6/ranges'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.to_s))

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

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

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

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

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['personalAccessToken', 'oauth']

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

#get_vlans(api_version, opts = {}) ⇒ GetVlans200Response

List VLANs Returns a list of all Virtual Local Area Networks (VLANs) on your Account. VLANs provide a mechanism for secure communication between two or more Linodes that are assigned to the same VLAN and are both within the same Layer 2 broadcast domain. VLANs are created and attached to Linodes by using the ‘interfaces` property for the following operations: - [Create a Linode](techdocs.akamai.com/linode-api/reference/post-linode-instance) - [Create a config profile](techdocs.akamai.com/linode-api/reference/post-add-linode-config) - [Update a config profile](techdocs.akamai.com/linode-api/reference/put-linode-config) There are several ways to detach a VLAN from a Linode: - [Update](techdocs.akamai.com/linode-api/reference/put-linode-config) the active Configuration Profile to remove the VLAN Interface, then [reboot](techdocs.akamai.com/linode-api/reference/post-reboot-linode-instance) the Linode. - [Create a config profile](techdocs.akamai.com/linode-api/reference/post-add-linode-config) without the VLAN Interface, then [reboot](techdocs.akamai.com/linode-api/reference/post-reboot-linode-instance) the Linode into the new Configuration Profile. - [Delete](techdocs.akamai.com/linode-api/reference/delete-linode-instance) the Linode. __Note__. Only Next Generation Network (NGN) data centers support VLANs. Run the [List regions](techdocs.akamai.com/linode-api/reference/get-regions) operation to view the capabilities of data center regions. If a VLAN is attached to your Linode and you attempt to migrate or clone it to a non-NGN data center, the migration or cloning will not initiate. If a Linode cannot be migrated because of an incompatibility, you will be prompted to select a different data center or contact support. __Note__. See the [VLANs Overview](www.linode.com/docs/products/networking/vlans/#technical-specifications) to view additional specifications and limitations. <<LB>> — - __CLI__. “` linode-cli vlans list “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` linodes:read_only “` [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    The page of a collection to return. (default to 1)

  • :page_size (Integer)

    The number of items to return per page. (default to 100)

Returns:



1054
1055
1056
1057
# File 'lib/linode_openapi_client/api/networking_api.rb', line 1054

def get_vlans(api_version, opts = {})
  data, _status_code, _headers = get_vlans_with_http_info(api_version, opts)
  data
end

#get_vlans_with_http_info(api_version, opts = {}) ⇒ Array<(GetVlans200Response, Integer, Hash)>

List VLANs Returns a list of all Virtual Local Area Networks (VLANs) on your Account. VLANs provide a mechanism for secure communication between two or more Linodes that are assigned to the same VLAN and are both within the same Layer 2 broadcast domain. VLANs are created and attached to Linodes by using the &#x60;interfaces&#x60; property for the following operations: - [Create a Linode](techdocs.akamai.com/linode-api/reference/post-linode-instance) - [Create a config profile](techdocs.akamai.com/linode-api/reference/post-add-linode-config) - [Update a config profile](techdocs.akamai.com/linode-api/reference/put-linode-config) There are several ways to detach a VLAN from a Linode: - [Update](techdocs.akamai.com/linode-api/reference/put-linode-config) the active Configuration Profile to remove the VLAN Interface, then [reboot](techdocs.akamai.com/linode-api/reference/post-reboot-linode-instance) the Linode. - [Create a config profile](techdocs.akamai.com/linode-api/reference/post-add-linode-config) without the VLAN Interface, then [reboot](techdocs.akamai.com/linode-api/reference/post-reboot-linode-instance) the Linode into the new Configuration Profile. - [Delete](techdocs.akamai.com/linode-api/reference/delete-linode-instance) the Linode. __Note__. Only Next Generation Network (NGN) data centers support VLANs. Run the [List regions](techdocs.akamai.com/linode-api/reference/get-regions) operation to view the capabilities of data center regions. If a VLAN is attached to your Linode and you attempt to migrate or clone it to a non-NGN data center, the migration or cloning will not initiate. If a Linode cannot be migrated because of an incompatibility, you will be prompted to select a different data center or contact support. __Note__. See the [VLANs Overview](www.linode.com/docs/products/networking/vlans/#technical-specifications) to view additional specifications and limitations. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli vlans list &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; linodes:read_only &#x60;&#x60;&#x60; [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    The page of a collection to return. (default to 1)

  • :page_size (Integer)

    The number of items to return per page. (default to 100)

Returns:

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

    GetVlans200Response data, response status code and response headers



1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
# File 'lib/linode_openapi_client/api/networking_api.rb', line 1066

def get_vlans_with_http_info(api_version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NetworkingApi.get_vlans ...'
  end
  # verify the required parameter 'api_version' is set
  if @api_client.config.client_side_validation && api_version.nil?
    fail ArgumentError, "Missing the required parameter 'api_version' when calling NetworkingApi.get_vlans"
  end
  # verify enum value
  allowable_values = ["v4", "v4beta"]
  if @api_client.config.client_side_validation && !allowable_values.include?(api_version)
    fail ArgumentError, "invalid value for \"api_version\", must be one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling NetworkingApi.get_vlans, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 500
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling NetworkingApi.get_vlans, must be smaller than or equal to 500.'
  end

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

  # resource path
  local_var_path = '/{apiVersion}/networking/vlans'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.to_s))

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

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

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

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

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['personalAccessToken', 'oauth']

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

#post_allocate_ip(api_version, post_allocate_ip_request, opts = {}) ⇒ PostAllocateIp200Response

Allocate an IP address Allocates a new IPv4 Address on your Account. The Linode must be configured to support additional addresses - please [Open a support ticket](techdocs.akamai.com/linode-api/reference/post-ticket) requesting additional addresses before attempting allocation. <<LB>> — - __CLI__. “‘ linode-cli networking ip-add \ –type ipv4 \ –public true \ –linode_id 123 “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` ips:read_write linodes:read_write “` [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • post_allocate_ip_request (PostAllocateIpRequest)

    Information about the address you are creating.

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

    the optional parameters

Returns:



1139
1140
1141
1142
# File 'lib/linode_openapi_client/api/networking_api.rb', line 1139

def post_allocate_ip(api_version, post_allocate_ip_request, opts = {})
  data, _status_code, _headers = post_allocate_ip_with_http_info(api_version, post_allocate_ip_request, opts)
  data
end

#post_allocate_ip_with_http_info(api_version, post_allocate_ip_request, opts = {}) ⇒ Array<(PostAllocateIp200Response, Integer, Hash)>

Allocate an IP address Allocates a new IPv4 Address on your Account. The Linode must be configured to support additional addresses - please [Open a support ticket](techdocs.akamai.com/linode-api/reference/post-ticket) requesting additional addresses before attempting allocation. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli networking ip-add \ –type ipv4 \ –public true \ –linode_id 123 &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; ips:read_write linodes:read_write &#x60;&#x60;&#x60; [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • post_allocate_ip_request (PostAllocateIpRequest)

    Information about the address you are creating.

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

    the optional parameters

Returns:

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

    PostAllocateIp200Response data, response status code and response headers



1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
# File 'lib/linode_openapi_client/api/networking_api.rb', line 1150

def post_allocate_ip_with_http_info(api_version, post_allocate_ip_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NetworkingApi.post_allocate_ip ...'
  end
  # verify the required parameter 'api_version' is set
  if @api_client.config.client_side_validation && api_version.nil?
    fail ArgumentError, "Missing the required parameter 'api_version' when calling NetworkingApi.post_allocate_ip"
  end
  # verify enum value
  allowable_values = ["v4", "v4beta"]
  if @api_client.config.client_side_validation && !allowable_values.include?(api_version)
    fail ArgumentError, "invalid value for \"api_version\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'post_allocate_ip_request' is set
  if @api_client.config.client_side_validation && post_allocate_ip_request.nil?
    fail ArgumentError, "Missing the required parameter 'post_allocate_ip_request' when calling NetworkingApi.post_allocate_ip"
  end
  # resource path
  local_var_path = '/{apiVersion}/networking/ips'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['personalAccessToken', 'oauth']

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

#post_assign_ips(api_version, post_assign_ips_request, opts = {}) ⇒ Object

Assign IP addresses Assign multiple IPv4 addresses and/or IPv6 ranges to multiple Linodes in one Region. This allows swapping, shuffling, or otherwise reorganizing IPs to your Linodes. The following restrictions apply: - All Linodes involved must have at least one public IPv4 address after assignment. - Linodes may have no more than one assigned private IPv4 address. - Linodes may have no more than one assigned IPv6 range. - Shared IP addresses cannot be swapped between Linodes. [Open a support ticket](techdocs.akamai.com/linode-api/reference/post-ticket) to request additional IPv4 addresses or IPv6 ranges beyond standard account limits. __Note__. Removing an IP address that has been set as a Managed Linode’s ‘ssh.ip` causes the Managed Linode’s SSH access settings to reset to their default values. To view and configure Managed Linode SSH settings, use the following operations: - [Get a Linode’s managed settings](techdocs.akamai.com/linode-api/reference/get-managed-linode-setting) - [Update a Linode’s managed settings](techdocs.akamai.com/linode-api/reference/put-managed-linode-setting) __Note__. Addresses with an active 1:1 NAT to a VPC Interface address cannot be assigned to other Linodes. <<LB>> — - __CLI__. “‘ linode-cli networking ip-assign \ –region us-east \ –assignments.address 192.0.2.1 \ –assignments.linode_id 123 \ –assignments.address 2001:db8:3c4d:15::/64 \ –assignments.linode_id 234 “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` ips:read_write linodes:read_write “` [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • post_assign_ips_request (PostAssignIpsRequest)

    Information about what IPv4 address or IPv6 range to assign, and to which Linode.

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

    the optional parameters

Returns:

  • (Object)


1218
1219
1220
1221
# File 'lib/linode_openapi_client/api/networking_api.rb', line 1218

def post_assign_ips(api_version, post_assign_ips_request, opts = {})
  data, _status_code, _headers = post_assign_ips_with_http_info(api_version, post_assign_ips_request, opts)
  data
end

#post_assign_ips_with_http_info(api_version, post_assign_ips_request, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Assign IP addresses Assign multiple IPv4 addresses and/or IPv6 ranges to multiple Linodes in one Region. This allows swapping, shuffling, or otherwise reorganizing IPs to your Linodes. The following restrictions apply: - All Linodes involved must have at least one public IPv4 address after assignment. - Linodes may have no more than one assigned private IPv4 address. - Linodes may have no more than one assigned IPv6 range. - Shared IP addresses cannot be swapped between Linodes. [Open a support ticket](techdocs.akamai.com/linode-api/reference/post-ticket) to request additional IPv4 addresses or IPv6 ranges beyond standard account limits. __Note__. Removing an IP address that has been set as a Managed Linode&#39;s &#x60;ssh.ip&#x60; causes the Managed Linode&#39;s SSH access settings to reset to their default values. To view and configure Managed Linode SSH settings, use the following operations: - [Get a Linode&#39;s managed settings](techdocs.akamai.com/linode-api/reference/get-managed-linode-setting) - [Update a Linode&#39;s managed settings](techdocs.akamai.com/linode-api/reference/put-managed-linode-setting) __Note__. Addresses with an active 1:1 NAT to a VPC Interface address cannot be assigned to other Linodes. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli networking ip-assign \ –region us-east \ –assignments.address 192.0.2.1 \ –assignments.linode_id 123 \ –assignments.address 2001:db8:3c4d:15::/64 \ –assignments.linode_id 234 &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; ips:read_write linodes:read_write &#x60;&#x60;&#x60; [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • post_assign_ips_request (PostAssignIpsRequest)

    Information about what IPv4 address or IPv6 range to assign, and to which Linode.

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

    the optional parameters

Returns:

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

    Object data, response status code and response headers



1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
# File 'lib/linode_openapi_client/api/networking_api.rb', line 1229

def post_assign_ips_with_http_info(api_version, post_assign_ips_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NetworkingApi.post_assign_ips ...'
  end
  # verify the required parameter 'api_version' is set
  if @api_client.config.client_side_validation && api_version.nil?
    fail ArgumentError, "Missing the required parameter 'api_version' when calling NetworkingApi.post_assign_ips"
  end
  # verify enum value
  allowable_values = ["v4", "v4beta"]
  if @api_client.config.client_side_validation && !allowable_values.include?(api_version)
    fail ArgumentError, "invalid value for \"api_version\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'post_assign_ips_request' is set
  if @api_client.config.client_side_validation && post_assign_ips_request.nil?
    fail ArgumentError, "Missing the required parameter 'post_assign_ips_request' when calling NetworkingApi.post_assign_ips"
  end
  # resource path
  local_var_path = '/{apiVersion}/networking/ips/assign'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['personalAccessToken', 'oauth']

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

#post_assign_ipv4s(api_version, post_assign_ipv4s_request, opts = {}) ⇒ Object

Assign IPv4s to Linodes This operation is equivalent to [Assign IP addresses](techdocs.akamai.com/linode-api/reference/post-assign-ips). Assign multiple IPv4 addresses and/or IPv6 ranges to multiple Linodes in one Region. This allows swapping, shuffling, or otherwise reorganizing IPs to your Linodes. The following restrictions apply: - All Linodes involved must have at least one public IPv4 address after assignment. - Linodes may have no more than one assigned private IPv4 address. - Linodes may have no more than one assigned IPv6 range. [Open a support ticket](techdocs.akamai.com/linode-api/reference/post-ticket) to request additional IPv4 addresses or IPv6 ranges beyond standard account limits. __Note__. Removing an IP address that has been set as a Managed Linode’s ‘ssh.ip` causes the Managed Linode’s SSH access settings to reset to their default values. To view and configure Managed Linode SSH settings, use the following operations: - [Get a Linode’s managed settings](techdocs.akamai.com/linode-api/reference/get-managed-linode-setting) - [Update a Linode’s managed settings](techdocs.akamai.com/linode-api/reference/put-managed-linode-setting) <<LB>> — - __CLI__. “‘ linode-cli networking ip-assign \ –region us-east \ –assignments.address 192.0.2.1 \ –assignments.linode_id 123 \ –assignments.address 2001:db8:3c4d:15::/64 \ –assignments.linode_id 234 “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` ips:read_write linodes:read_write “` [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • post_assign_ipv4s_request (PostAssignIpv4sRequest)

    Information about what IPv4 address to assign, and to which Linode.

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

    the optional parameters

Returns:

  • (Object)


1297
1298
1299
1300
# File 'lib/linode_openapi_client/api/networking_api.rb', line 1297

def post_assign_ipv4s(api_version, post_assign_ipv4s_request, opts = {})
  data, _status_code, _headers = post_assign_ipv4s_with_http_info(api_version, post_assign_ipv4s_request, opts)
  data
end

#post_assign_ipv4s_with_http_info(api_version, post_assign_ipv4s_request, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Assign IPv4s to Linodes This operation is equivalent to [Assign IP addresses](techdocs.akamai.com/linode-api/reference/post-assign-ips). Assign multiple IPv4 addresses and/or IPv6 ranges to multiple Linodes in one Region. This allows swapping, shuffling, or otherwise reorganizing IPs to your Linodes. The following restrictions apply: - All Linodes involved must have at least one public IPv4 address after assignment. - Linodes may have no more than one assigned private IPv4 address. - Linodes may have no more than one assigned IPv6 range. [Open a support ticket](techdocs.akamai.com/linode-api/reference/post-ticket) to request additional IPv4 addresses or IPv6 ranges beyond standard account limits. __Note__. Removing an IP address that has been set as a Managed Linode&#39;s &#x60;ssh.ip&#x60; causes the Managed Linode&#39;s SSH access settings to reset to their default values. To view and configure Managed Linode SSH settings, use the following operations: - [Get a Linode&#39;s managed settings](techdocs.akamai.com/linode-api/reference/get-managed-linode-setting) - [Update a Linode&#39;s managed settings](techdocs.akamai.com/linode-api/reference/put-managed-linode-setting) &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli networking ip-assign \ –region us-east \ –assignments.address 192.0.2.1 \ –assignments.linode_id 123 \ –assignments.address 2001:db8:3c4d:15::/64 \ –assignments.linode_id 234 &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; ips:read_write linodes:read_write &#x60;&#x60;&#x60; [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • post_assign_ipv4s_request (PostAssignIpv4sRequest)

    Information about what IPv4 address to assign, and to which Linode.

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

    the optional parameters

Returns:

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

    Object data, response status code and response headers



1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
# File 'lib/linode_openapi_client/api/networking_api.rb', line 1308

def post_assign_ipv4s_with_http_info(api_version, post_assign_ipv4s_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NetworkingApi.post_assign_ipv4s ...'
  end
  # verify the required parameter 'api_version' is set
  if @api_client.config.client_side_validation && api_version.nil?
    fail ArgumentError, "Missing the required parameter 'api_version' when calling NetworkingApi.post_assign_ipv4s"
  end
  # verify enum value
  allowable_values = ["v4", "v4beta"]
  if @api_client.config.client_side_validation && !allowable_values.include?(api_version)
    fail ArgumentError, "invalid value for \"api_version\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'post_assign_ipv4s_request' is set
  if @api_client.config.client_side_validation && post_assign_ipv4s_request.nil?
    fail ArgumentError, "Missing the required parameter 'post_assign_ipv4s_request' when calling NetworkingApi.post_assign_ipv4s"
  end
  # resource path
  local_var_path = '/{apiVersion}/networking/ipv4/assign'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['personalAccessToken', 'oauth']

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

#post_firewall_device(api_version, firewall_id, opts = {}) ⇒ PostFirewallDevice200Response

Create a firewall device Creates a Firewall Device, which assigns a Firewall to a service (referred to as the Device’s ‘entity`) and applies the Firewall’s Rules to the device. - Currently, Devices with ‘linode` and `nodebalancer` entity types are accepted. - Firewalls only apply to inbound TCP traffic to NodeBalancers. - A Firewall can be assigned to multiple services at a time. - A service can have one active, assigned Firewall at a time. Additional disabled Firewalls can be assigned to a service, but they cannot be enabled if another active Firewall is already assigned to the same service. - Assigned Linodes must not have any ongoing live migrations. - A `firewall_device_add` Event is generated when the Firewall Device is added successfully. <<LB>> — - __CLI__. “` linode-cli firewalls device-create 123 \ –id 456 \ –type "linode" “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` firewall:read_write “` [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • firewall_id (Integer)

    ID of the Firewall to access.

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

    the optional parameters

Options Hash (opts):

Returns:



1377
1378
1379
1380
# File 'lib/linode_openapi_client/api/networking_api.rb', line 1377

def post_firewall_device(api_version, firewall_id, opts = {})
  data, _status_code, _headers = post_firewall_device_with_http_info(api_version, firewall_id, opts)
  data
end

#post_firewall_device_with_http_info(api_version, firewall_id, opts = {}) ⇒ Array<(PostFirewallDevice200Response, Integer, Hash)>

Create a firewall device Creates a Firewall Device, which assigns a Firewall to a service (referred to as the Device&#39;s &#x60;entity&#x60;) and applies the Firewall&#39;s Rules to the device. - Currently, Devices with &#x60;linode&#x60; and &#x60;nodebalancer&#x60; entity types are accepted. - Firewalls only apply to inbound TCP traffic to NodeBalancers. - A Firewall can be assigned to multiple services at a time. - A service can have one active, assigned Firewall at a time. Additional disabled Firewalls can be assigned to a service, but they cannot be enabled if another active Firewall is already assigned to the same service. - Assigned Linodes must not have any ongoing live migrations. - A &#x60;firewall_device_add&#x60; Event is generated when the Firewall Device is added successfully. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli firewalls device-create 123 \ –id 456 \ –type &quot;linode&quot; &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; firewall:read_write &#x60;&#x60;&#x60; [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • firewall_id (Integer)

    ID of the Firewall to access.

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

    the optional parameters

Options Hash (opts):

Returns:



1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
# File 'lib/linode_openapi_client/api/networking_api.rb', line 1389

def post_firewall_device_with_http_info(api_version, firewall_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NetworkingApi.post_firewall_device ...'
  end
  # verify the required parameter 'api_version' is set
  if @api_client.config.client_side_validation && api_version.nil?
    fail ArgumentError, "Missing the required parameter 'api_version' when calling NetworkingApi.post_firewall_device"
  end
  # verify enum value
  allowable_values = ["v4", "v4beta"]
  if @api_client.config.client_side_validation && !allowable_values.include?(api_version)
    fail ArgumentError, "invalid value for \"api_version\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'firewall_id' is set
  if @api_client.config.client_side_validation && firewall_id.nil?
    fail ArgumentError, "Missing the required parameter 'firewall_id' when calling NetworkingApi.post_firewall_device"
  end
  # resource path
  local_var_path = '/{apiVersion}/networking/firewalls/{firewallId}/devices'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.to_s)).sub('{' + 'firewallId' + '}', CGI.escape(firewall_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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['personalAccessToken', 'oauth']

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

#post_firewalls(api_version, opts = {}) ⇒ PostFirewalls200Response

Create a firewall Creates a Firewall to filter network traffic. - Use the ‘rules` property to create inbound and outbound access rules. - Use the `devices` property to assign the Firewall to a service and apply its Rules to the device. Requires `read_write` [user grant](techdocs.akamai.com/linode-api/reference/get-user-grants) to the device. Currently, Firewalls can be assigned to Linode compute instances and NodeBalancers. - A Firewall can be assigned to multiple services at a time. - A Firewall can be assigned during Linode creation by utilizing the `firewall_id` [Create a Linode](techdocs.akamai.com/linode-api/reference/post-linode-instance) property. - A service can have one active, assigned Firewall at a time. Additional disabled Firewalls can be assigned to a service, but they cannot be enabled if another active Firewall is already assigned to the same service. - Firewalls apply to all of a Linode’s non-‘vlan` purpose Configuration Profile Interfaces. - Assigned Linodes must not have any ongoing live migrations. - A `firewall_create` Event is generated when this operation succeeds. <<LB>> — - __CLI__. “` linode-cli firewalls create \ –label example-firewall \ –rules.outbound_policy ACCEPT \ –rules.inbound_policy DROP \ –rules.inbound ’["TCP", "ports": "22, 80, 8080, 443", "addresses": {"ipv4": ["192.0.2.0/24", "198.51.100.2/32"], "ipv6": ["2001:DB8::/128"], "action": "ACCEPT"}]‘ \ –rules.outbound ’["TCP", "ports": "49152-65535", "addresses": {"ipv4": ["192.0.2.0/24", "198.51.100.2/32"],"ipv6": ["2001:DB8::/128"], "action": "DROP", "label": "outbound-rule123", "description": "An example outbound rule description."}]‘ “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` firewall:read_write “` [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

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

    the optional parameters

Options Hash (opts):

  • :post_firewalls_request (PostFirewallsRequest)

    Creates a Firewall object that can be applied to a service to filter the service&#39;s network traffic.

Returns:



1457
1458
1459
1460
# File 'lib/linode_openapi_client/api/networking_api.rb', line 1457

def post_firewalls(api_version, opts = {})
  data, _status_code, _headers = post_firewalls_with_http_info(api_version, opts)
  data
end

#post_firewalls_with_http_info(api_version, opts = {}) ⇒ Array<(PostFirewalls200Response, Integer, Hash)>

Create a firewall Creates a Firewall to filter network traffic. - Use the &#x60;rules&#x60; property to create inbound and outbound access rules. - Use the &#x60;devices&#x60; property to assign the Firewall to a service and apply its Rules to the device. Requires &#x60;read_write&#x60; [user grant](techdocs.akamai.com/linode-api/reference/get-user-grants) to the device. Currently, Firewalls can be assigned to Linode compute instances and NodeBalancers. - A Firewall can be assigned to multiple services at a time. - A Firewall can be assigned during Linode creation by utilizing the &#x60;firewall_id&#x60; [Create a Linode](techdocs.akamai.com/linode-api/reference/post-linode-instance) property. - A service can have one active, assigned Firewall at a time. Additional disabled Firewalls can be assigned to a service, but they cannot be enabled if another active Firewall is already assigned to the same service. - Firewalls apply to all of a Linode&#39;s non-&#x60;vlan&#x60; purpose Configuration Profile Interfaces. - Assigned Linodes must not have any ongoing live migrations. - A &#x60;firewall_create&#x60; Event is generated when this operation succeeds. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli firewalls create \ –label example-firewall \ –rules.outbound_policy ACCEPT \ –rules.inbound_policy DROP \ –rules.inbound &#39;[&quot;TCP&quot;, &quot;ports&quot;: &quot;22, 80, 8080, 443&quot;, &quot;addresses&quot;: {&quot;ipv4&quot;: [&quot;192.0.2.0/24&quot;, &quot;198.51.100.2/32&quot;], &quot;ipv6&quot;: [&quot;2001:DB8::/128&quot;], &quot;action&quot;: &quot;ACCEPT&quot;}]&#39; \ –rules.outbound &#39;[&quot;TCP&quot;, &quot;ports&quot;: &quot;49152-65535&quot;, &quot;addresses&quot;: {&quot;ipv4&quot;: [&quot;192.0.2.0/24&quot;, &quot;198.51.100.2/32&quot;],&quot;ipv6&quot;: [&quot;2001:DB8::/128&quot;], &quot;action&quot;: &quot;DROP&quot;, &quot;label&quot;: &quot;outbound-rule123&quot;, &quot;description&quot;: &quot;An example outbound rule description.&quot;}]&#39; &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; firewall:read_write &#x60;&#x60;&#x60; [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

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

    the optional parameters

Options Hash (opts):

  • :post_firewalls_request (PostFirewallsRequest)

    Creates a Firewall object that can be applied to a service to filter the service&#39;s network traffic.

Returns:

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

    PostFirewalls200Response data, response status code and response headers



1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
# File 'lib/linode_openapi_client/api/networking_api.rb', line 1468

def post_firewalls_with_http_info(api_version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NetworkingApi.post_firewalls ...'
  end
  # verify the required parameter 'api_version' is set
  if @api_client.config.client_side_validation && api_version.nil?
    fail ArgumentError, "Missing the required parameter 'api_version' when calling NetworkingApi.post_firewalls"
  end
  # verify enum value
  allowable_values = ["v4", "v4beta"]
  if @api_client.config.client_side_validation && !allowable_values.include?(api_version)
    fail ArgumentError, "invalid value for \"api_version\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/{apiVersion}/networking/firewalls'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['personalAccessToken', 'oauth']

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

#post_ipv6_range(api_version, post_ipv6_range_request, opts = {}) ⇒ PostIpv6Range200Response

Create an IPv6 range Creates an IPv6 Range and assigns it based on the provided Linode or route target IPv6 SLAAC address. See the ‘ipv6` property when running the [Get a Linode](techdocs.akamai.com/linode-api/reference/get-linode-instance) operation to view a Linode’s IPv6 SLAAC address. - Either ‘linode_id` or `route_target` is required in a request. - `linode_id` and `route_target` are mutually exclusive. Submitting values for both properties in a request results in an error. - Upon a successful request, an IPv6 range is created in the [region](techdocs.akamai.com/linode-api/reference/get-regions) that corresponds to the provided `linode_id` or `route_target`. - Your Linode is responsible for routing individual addresses in the range, or handling traffic for all the addresses in the range. - Run the [Assign IP addresses](techdocs.akamai.com/linode-api/reference/post-assign-ips) operation to re-assign IPv6 Ranges to your Linodes. __Note__. The following restrictions apply: - A Linode can only have one IPv6 range targeting its SLAAC address. - An account can only have one IPv6 range in each [region](techdocs.akamai.com/linode-api/reference/get-regions). - [Open a support ticket](techdocs.akamai.com/linode-api/reference/post-ticket) to request expansion of these restrictions. <<LB>> — - __CLI__. “` linode-cli networking v6-range-create \ –linode_id 123 \ –prefix_length 64 “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` ips:read_write linodes:read_write “` [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • post_ipv6_range_request (PostIpv6RangeRequest)

    Information about the IPv6 range to create.

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

    the optional parameters

Returns:



1532
1533
1534
1535
# File 'lib/linode_openapi_client/api/networking_api.rb', line 1532

def post_ipv6_range(api_version, post_ipv6_range_request, opts = {})
  data, _status_code, _headers = post_ipv6_range_with_http_info(api_version, post_ipv6_range_request, opts)
  data
end

#post_ipv6_range_with_http_info(api_version, post_ipv6_range_request, opts = {}) ⇒ Array<(PostIpv6Range200Response, Integer, Hash)>

Create an IPv6 range Creates an IPv6 Range and assigns it based on the provided Linode or route target IPv6 SLAAC address. See the &#x60;ipv6&#x60; property when running the [Get a Linode](techdocs.akamai.com/linode-api/reference/get-linode-instance) operation to view a Linode&#39;s IPv6 SLAAC address. - Either &#x60;linode_id&#x60; or &#x60;route_target&#x60; is required in a request. - &#x60;linode_id&#x60; and &#x60;route_target&#x60; are mutually exclusive. Submitting values for both properties in a request results in an error. - Upon a successful request, an IPv6 range is created in the [region](techdocs.akamai.com/linode-api/reference/get-regions) that corresponds to the provided &#x60;linode_id&#x60; or &#x60;route_target&#x60;. - Your Linode is responsible for routing individual addresses in the range, or handling traffic for all the addresses in the range. - Run the [Assign IP addresses](techdocs.akamai.com/linode-api/reference/post-assign-ips) operation to re-assign IPv6 Ranges to your Linodes. __Note__. The following restrictions apply: - A Linode can only have one IPv6 range targeting its SLAAC address. - An account can only have one IPv6 range in each [region](techdocs.akamai.com/linode-api/reference/get-regions). - [Open a support ticket](techdocs.akamai.com/linode-api/reference/post-ticket) to request expansion of these restrictions. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli networking v6-range-create \ –linode_id 123 \ –prefix_length 64 &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; ips:read_write linodes:read_write &#x60;&#x60;&#x60; [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • post_ipv6_range_request (PostIpv6RangeRequest)

    Information about the IPv6 range to create.

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

    the optional parameters

Returns:

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

    PostIpv6Range200Response data, response status code and response headers



1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
# File 'lib/linode_openapi_client/api/networking_api.rb', line 1543

def post_ipv6_range_with_http_info(api_version, post_ipv6_range_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NetworkingApi.post_ipv6_range ...'
  end
  # verify the required parameter 'api_version' is set
  if @api_client.config.client_side_validation && api_version.nil?
    fail ArgumentError, "Missing the required parameter 'api_version' when calling NetworkingApi.post_ipv6_range"
  end
  # verify enum value
  allowable_values = ["v4", "v4beta"]
  if @api_client.config.client_side_validation && !allowable_values.include?(api_version)
    fail ArgumentError, "invalid value for \"api_version\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'post_ipv6_range_request' is set
  if @api_client.config.client_side_validation && post_ipv6_range_request.nil?
    fail ArgumentError, "Missing the required parameter 'post_ipv6_range_request' when calling NetworkingApi.post_ipv6_range"
  end
  # resource path
  local_var_path = '/{apiVersion}/networking/ipv6/ranges'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['personalAccessToken', 'oauth']

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

#post_share_ips(api_version, post_share_ips_request, opts = {}) ⇒ Object

Share IP addresses

Configure shared IPs. IP sharing allows IP address reassignment (also referred to as IP failover) from one Linode to another if the primary Linode becomes unresponsive. This means that requests to the primary Linode’s IP address can be automatically rerouted to secondary Linodes at the configured shared IP addresses. IP failover requires configuration of a failover service (such as [Keepalived](www.linode.com/docs/guides/ip-failover-keepalived)) within the internal system of the primary Linode. __Note__. A public IPv4 address cannot be shared if it is configured for a 1:1 NAT on a ‘vpc` purpose Configuration Profile Interface. <<LB>> — - __CLI__. “` linode-cli networking ip-share \ –linode_id 123 \ –ips 192.0.2.1 \ –ips 2001:db8:3c4d:15

“‘ [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` ips:read_write linodes:read_write “` [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • post_share_ips_request (PostShareIpsRequest)

    Information about what IPs to share with which Linode.

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

    the optional parameters

Returns:

  • (Object)


1611
1612
1613
1614
# File 'lib/linode_openapi_client/api/networking_api.rb', line 1611

def post_share_ips(api_version, post_share_ips_request, opts = {})
  data, _status_code, _headers = post_share_ips_with_http_info(api_version, post_share_ips_request, opts)
  data
end

#post_share_ips_with_http_info(api_version, post_share_ips_request, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Share IP addresses

Configure shared IPs. IP sharing allows IP address reassignment (also referred to as IP failover) from one Linode to another if the primary Linode becomes unresponsive. This means that requests to the primary Linode&#39;s IP address can be automatically rerouted to secondary Linodes at the configured shared IP addresses. IP failover requires configuration of a failover service (such as [Keepalived](www.linode.com/docs/guides/ip-failover-keepalived)) within the internal system of the primary Linode. __Note__. A public IPv4 address cannot be shared if it is configured for a 1:1 NAT on a &#x60;vpc&#x60; purpose Configuration Profile Interface. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli networking ip-share \ –linode_id 123 \ –ips 192.0.2.1 \ –ips 2001:db8:3c4d:15

&#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; ips:read_write linodes:read_write &#x60;&#x60;&#x60; [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • post_share_ips_request (PostShareIpsRequest)

    Information about what IPs to share with which Linode.

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

    the optional parameters

Returns:

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

    Object data, response status code and response headers



1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
# File 'lib/linode_openapi_client/api/networking_api.rb', line 1622

def post_share_ips_with_http_info(api_version, post_share_ips_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NetworkingApi.post_share_ips ...'
  end
  # verify the required parameter 'api_version' is set
  if @api_client.config.client_side_validation && api_version.nil?
    fail ArgumentError, "Missing the required parameter 'api_version' when calling NetworkingApi.post_share_ips"
  end
  # verify enum value
  allowable_values = ["v4", "v4beta"]
  if @api_client.config.client_side_validation && !allowable_values.include?(api_version)
    fail ArgumentError, "invalid value for \"api_version\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'post_share_ips_request' is set
  if @api_client.config.client_side_validation && post_share_ips_request.nil?
    fail ArgumentError, "Missing the required parameter 'post_share_ips_request' when calling NetworkingApi.post_share_ips"
  end
  # resource path
  local_var_path = '/{apiVersion}/networking/ips/share'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['personalAccessToken', 'oauth']

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

#post_share_ipv4s(api_version, post_share_ips_request, opts = {}) ⇒ Object

Configure IPv4 sharing This operation is equivalent to [Share IP addresses](techdocs.akamai.com/linode-api/reference/post-share-ips). Configure shared IPs. IP sharing allows IP address reassignment (also referred to as IP failover) from one Linode to another if the primary Linode becomes unresponsive. This means that requests to the primary Linode’s IP address can be automatically rerouted to secondary Linodes at the configured shared IP addresses. IP failover requires configuration of a failover service (such as [Keepalived](www.linode.com/docs/guides/ip-failover-keepalived)) within the internal system of the primary Linode. <<LB>> — - __CLI__. “‘ linode-cli networking ip-share \ –linode_id 123 \ –ips 192.0.2.1 \ –ips 192.0.2.2 “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` ips:read_write linodes:read_write “` [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • post_share_ips_request (PostShareIpsRequest)

    Information about what IPs to share with which Linode.

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

    the optional parameters

Returns:

  • (Object)


1690
1691
1692
1693
# File 'lib/linode_openapi_client/api/networking_api.rb', line 1690

def post_share_ipv4s(api_version, post_share_ips_request, opts = {})
  data, _status_code, _headers = post_share_ipv4s_with_http_info(api_version, post_share_ips_request, opts)
  data
end

#post_share_ipv4s_with_http_info(api_version, post_share_ips_request, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Configure IPv4 sharing This operation is equivalent to [Share IP addresses](techdocs.akamai.com/linode-api/reference/post-share-ips). Configure shared IPs. IP sharing allows IP address reassignment (also referred to as IP failover) from one Linode to another if the primary Linode becomes unresponsive. This means that requests to the primary Linode&#39;s IP address can be automatically rerouted to secondary Linodes at the configured shared IP addresses. IP failover requires configuration of a failover service (such as [Keepalived](www.linode.com/docs/guides/ip-failover-keepalived)) within the internal system of the primary Linode. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli networking ip-share \ –linode_id 123 \ –ips 192.0.2.1 \ –ips 192.0.2.2 &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; ips:read_write linodes:read_write &#x60;&#x60;&#x60; [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • post_share_ips_request (PostShareIpsRequest)

    Information about what IPs to share with which Linode.

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

    the optional parameters

Returns:

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

    Object data, response status code and response headers



1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
# File 'lib/linode_openapi_client/api/networking_api.rb', line 1701

def post_share_ipv4s_with_http_info(api_version, post_share_ips_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NetworkingApi.post_share_ipv4s ...'
  end
  # verify the required parameter 'api_version' is set
  if @api_client.config.client_side_validation && api_version.nil?
    fail ArgumentError, "Missing the required parameter 'api_version' when calling NetworkingApi.post_share_ipv4s"
  end
  # verify enum value
  allowable_values = ["v4", "v4beta"]
  if @api_client.config.client_side_validation && !allowable_values.include?(api_version)
    fail ArgumentError, "invalid value for \"api_version\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'post_share_ips_request' is set
  if @api_client.config.client_side_validation && post_share_ips_request.nil?
    fail ArgumentError, "Missing the required parameter 'post_share_ips_request' when calling NetworkingApi.post_share_ipv4s"
  end
  # resource path
  local_var_path = '/{apiVersion}/networking/ipv4/share'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['personalAccessToken', 'oauth']

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

#put_firewall(api_version, firewall_id, opts = {}) ⇒ PutFirewall200Response

Update a firewall Updates information for a Firewall. - Assigned Linodes must not have any ongoing live migrations. - If a Firewall’s status is changed with this operation, a corresponding ‘firewall_enable` or `firewall_disable` Event will be generated. Some parts of a Firewall’s configuration cannot be manipulated by this operation: - A Firewall’s Devices cannot be set with this operation. Instead, run the [Create a firewall device](techdocs.akamai.com/linode-api/reference/post-firewall-device) and [Delete a firewall device](techdocs.akamai.com/linode-api/reference/delete-firewall-device) operations to assign and remove this Firewall from services. - A Firewall’s Rules cannot be changed with this operation. Instead, run the [Update firewall rules](techdocs.akamai.com/linode-api/reference/put-firewall-rules) operation to update your Rules. - A Firewall’s status can be set to ‘enabled` or `disabled` by this operation, but it cannot be set to `deleted`. Instead, run the [Delete a firewall](techdocs.akamai.com/linode-api/reference/delete-firewall) operation to delete a Firewall. <<LB>> — - __CLI__. “` linode-cli firewalls update 123 \ –status disabled “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` firewall:read_write “` [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • firewall_id (Integer)

    ID of the Firewall to access.

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

    the optional parameters

Options Hash (opts):

Returns:



1770
1771
1772
1773
# File 'lib/linode_openapi_client/api/networking_api.rb', line 1770

def put_firewall(api_version, firewall_id, opts = {})
  data, _status_code, _headers = put_firewall_with_http_info(api_version, firewall_id, opts)
  data
end

#put_firewall_rules(api_version, firewall_id, opts = {}) ⇒ PutFirewallRules200Response

Update firewall rules Updates the inbound and outbound Rules for a Firewall. - Assigned Linodes must not have any ongoing live migrations. - __Note__. This operation replaces all of a Firewall’s ‘inbound` and `outbound` rulesets with the values specified in your request. <<LB>> — - __CLI__. “` linode-cli firewalls rules-update 123 \ –inbound ’["protocol": "TCP", "ports": "22, 80, 8080, 443", "addresses": {"ipv4": ["192.0.2.0/24", "198.51.100.2/32"], "ipv6": ["2001:DB8::/128"]}]‘ \ –outbound ’["TCP", "ports": "49152-65535", "addresses": {"ipv4": ["192.0.2.0/24", "198.51.100.2/32"], "ipv6": ["2001:DB8::/128`"]}]‘ “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` firewall:read_write “` [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • firewall_id (Integer)

    ID of the Firewall to access.

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

    the optional parameters

Options Hash (opts):

Returns:



1851
1852
1853
1854
# File 'lib/linode_openapi_client/api/networking_api.rb', line 1851

def put_firewall_rules(api_version, firewall_id, opts = {})
  data, _status_code, _headers = put_firewall_rules_with_http_info(api_version, firewall_id, opts)
  data
end

#put_firewall_rules_with_http_info(api_version, firewall_id, opts = {}) ⇒ Array<(PutFirewallRules200Response, Integer, Hash)>

Update firewall rules Updates the inbound and outbound Rules for a Firewall. - Assigned Linodes must not have any ongoing live migrations. - __Note__. This operation replaces all of a Firewall&#39;s &#x60;inbound&#x60; and &#x60;outbound&#x60; rulesets with the values specified in your request. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli firewalls rules-update 123 \ –inbound &#39;[&quot;protocol&quot;: &quot;TCP&quot;, &quot;ports&quot;: &quot;22, 80, 8080, 443&quot;, &quot;addresses&quot;: {&quot;ipv4&quot;: [&quot;192.0.2.0/24&quot;, &quot;198.51.100.2/32&quot;], &quot;ipv6&quot;: [&quot;2001:DB8::/128&quot;]}]&#39; \ –outbound &#39;[&quot;TCP&quot;, &quot;ports&quot;: &quot;49152-65535&quot;, &quot;addresses&quot;: {&quot;ipv4&quot;: [&quot;192.0.2.0/24&quot;, &quot;198.51.100.2/32&quot;], &quot;ipv6&quot;: [&quot;2001:DB8::/128&#x60;&quot;]}]&#39; &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; firewall:read_write &#x60;&#x60;&#x60; [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • firewall_id (Integer)

    ID of the Firewall to access.

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

    the optional parameters

Options Hash (opts):

Returns:

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

    PutFirewallRules200Response data, response status code and response headers



1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
# File 'lib/linode_openapi_client/api/networking_api.rb', line 1863

def put_firewall_rules_with_http_info(api_version, firewall_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NetworkingApi.put_firewall_rules ...'
  end
  # verify the required parameter 'api_version' is set
  if @api_client.config.client_side_validation && api_version.nil?
    fail ArgumentError, "Missing the required parameter 'api_version' when calling NetworkingApi.put_firewall_rules"
  end
  # verify enum value
  allowable_values = ["v4", "v4beta"]
  if @api_client.config.client_side_validation && !allowable_values.include?(api_version)
    fail ArgumentError, "invalid value for \"api_version\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'firewall_id' is set
  if @api_client.config.client_side_validation && firewall_id.nil?
    fail ArgumentError, "Missing the required parameter 'firewall_id' when calling NetworkingApi.put_firewall_rules"
  end
  # resource path
  local_var_path = '/{apiVersion}/networking/firewalls/{firewallId}/rules'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.to_s)).sub('{' + 'firewallId' + '}', CGI.escape(firewall_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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['personalAccessToken', 'oauth']

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

#put_firewall_with_http_info(api_version, firewall_id, opts = {}) ⇒ Array<(PutFirewall200Response, Integer, Hash)>

Update a firewall Updates information for a Firewall. - Assigned Linodes must not have any ongoing live migrations. - If a Firewall&#39;s status is changed with this operation, a corresponding &#x60;firewall_enable&#x60; or &#x60;firewall_disable&#x60; Event will be generated. Some parts of a Firewall&#39;s configuration cannot be manipulated by this operation: - A Firewall&#39;s Devices cannot be set with this operation. Instead, run the [Create a firewall device](techdocs.akamai.com/linode-api/reference/post-firewall-device) and [Delete a firewall device](techdocs.akamai.com/linode-api/reference/delete-firewall-device) operations to assign and remove this Firewall from services. - A Firewall&#39;s Rules cannot be changed with this operation. Instead, run the [Update firewall rules](techdocs.akamai.com/linode-api/reference/put-firewall-rules) operation to update your Rules. - A Firewall&#39;s status can be set to &#x60;enabled&#x60; or &#x60;disabled&#x60; by this operation, but it cannot be set to &#x60;deleted&#x60;. Instead, run the [Delete a firewall](techdocs.akamai.com/linode-api/reference/delete-firewall) operation to delete a Firewall. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli firewalls update 123 \ –status disabled &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; firewall:read_write &#x60;&#x60;&#x60; [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • firewall_id (Integer)

    ID of the Firewall to access.

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

    the optional parameters

Options Hash (opts):

Returns:

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

    PutFirewall200Response data, response status code and response headers



1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
# File 'lib/linode_openapi_client/api/networking_api.rb', line 1782

def put_firewall_with_http_info(api_version, firewall_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NetworkingApi.put_firewall ...'
  end
  # verify the required parameter 'api_version' is set
  if @api_client.config.client_side_validation && api_version.nil?
    fail ArgumentError, "Missing the required parameter 'api_version' when calling NetworkingApi.put_firewall"
  end
  # verify enum value
  allowable_values = ["v4", "v4beta"]
  if @api_client.config.client_side_validation && !allowable_values.include?(api_version)
    fail ArgumentError, "invalid value for \"api_version\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'firewall_id' is set
  if @api_client.config.client_side_validation && firewall_id.nil?
    fail ArgumentError, "Missing the required parameter 'firewall_id' when calling NetworkingApi.put_firewall"
  end
  # resource path
  local_var_path = '/{apiVersion}/networking/firewalls/{firewallId}'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.to_s)).sub('{' + 'firewallId' + '}', CGI.escape(firewall_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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['personalAccessToken', 'oauth']

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

#put_ip(api_version, address, put_ip_request, opts = {}) ⇒ PutIp200Response

Update an IP address’s RDNS Sets RDNS on an IP Address. Forward DNS must already be set up for reverse DNS to be applied. If you set the RDNS to ‘null` for public IPv4 addresses, it will be reset to the default ip.linodeusercontent.com RDNS value. <<LB>> — - __CLI__. “` linode-cli networking ip-update \ 203.0.113.1 \ –rdns "test.example.org" “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` ips:read_write “` [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • address (String)

    The address to operate on.

  • put_ip_request (PutIpRequest)

    The information to update.

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

    the optional parameters

Returns:



1932
1933
1934
1935
# File 'lib/linode_openapi_client/api/networking_api.rb', line 1932

def put_ip(api_version, address, put_ip_request, opts = {})
  data, _status_code, _headers = put_ip_with_http_info(api_version, address, put_ip_request, opts)
  data
end

#put_ip_with_http_info(api_version, address, put_ip_request, opts = {}) ⇒ Array<(PutIp200Response, Integer, Hash)>

Update an IP address&#39;s RDNS Sets RDNS on an IP Address. Forward DNS must already be set up for reverse DNS to be applied. If you set the RDNS to &#x60;null&#x60; for public IPv4 addresses, it will be reset to the default ip.linodeusercontent.com RDNS value. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli networking ip-update \ 203.0.113.1 \ –rdns &quot;test.example.org&quot; &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; ips:read_write &#x60;&#x60;&#x60; [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • address (String)

    The address to operate on.

  • put_ip_request (PutIpRequest)

    The information to update.

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

    the optional parameters

Returns:

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

    PutIp200Response data, response status code and response headers



1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
# File 'lib/linode_openapi_client/api/networking_api.rb', line 1944

def put_ip_with_http_info(api_version, address, put_ip_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NetworkingApi.put_ip ...'
  end
  # verify the required parameter 'api_version' is set
  if @api_client.config.client_side_validation && api_version.nil?
    fail ArgumentError, "Missing the required parameter 'api_version' when calling NetworkingApi.put_ip"
  end
  # verify enum value
  allowable_values = ["v4", "v4beta"]
  if @api_client.config.client_side_validation && !allowable_values.include?(api_version)
    fail ArgumentError, "invalid value for \"api_version\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'address' is set
  if @api_client.config.client_side_validation && address.nil?
    fail ArgumentError, "Missing the required parameter 'address' when calling NetworkingApi.put_ip"
  end
  # verify the required parameter 'put_ip_request' is set
  if @api_client.config.client_side_validation && put_ip_request.nil?
    fail ArgumentError, "Missing the required parameter 'put_ip_request' when calling NetworkingApi.put_ip"
  end
  # resource path
  local_var_path = '/{apiVersion}/networking/ips/{address}'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.to_s)).sub('{' + 'address' + '}', CGI.escape(address.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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['personalAccessToken', 'oauth']

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