Class: LinodeOpenapiClient::DomainsApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ DomainsApi

Returns a new instance of DomainsApi.



19
20
21
# File 'lib/linode_openapi_client/api/domains_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/domains_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#delete_domain(api_version, domain_id, opts = {}) ⇒ Object

Delete a domain Deletes a Domain from Linode’s DNS Manager. The Domain will be removed from Linode’s nameservers shortly after this operation completes. This also deletes all associated Domain Records. <<LB>> — - __CLI__. “‘ linode-cli domains delete 1234 “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` domains: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.

  • domain_id (Integer)

    The ID of the Domain to access.

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

    the optional parameters

Returns:

  • (Object)


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

def delete_domain(api_version, domain_id, opts = {})
  data, _status_code, _headers = delete_domain_with_http_info(api_version, domain_id, opts)
  data
end

#delete_domain_record(api_version, domain_id, record_id, opts = {}) ⇒ Object

Delete a domain record Deletes a Record on this Domain. <<LB>> — - __CLI__. “‘ linode-cli domains records-delete 123 234 “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` domains: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.

  • domain_id (Integer)

    The ID of the Domain whose Record you are accessing.

  • record_id (Integer)

    The ID of the Record you are accessing.

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

    the optional parameters

Returns:

  • (Object)


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

def delete_domain_record(api_version, domain_id, record_id, opts = {})
  data, _status_code, _headers = delete_domain_record_with_http_info(api_version, domain_id, record_id, opts)
  data
end

#delete_domain_record_with_http_info(api_version, domain_id, record_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Delete a domain record Deletes a Record on this Domain. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli domains records-delete 123 234 &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; domains: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.

  • domain_id (Integer)

    The ID of the Domain whose Record you are accessing.

  • record_id (Integer)

    The ID of the Record you are accessing.

  • 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/domains_api.rb', line 115

def delete_domain_record_with_http_info(api_version, domain_id, record_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DomainsApi.delete_domain_record ...'
  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 DomainsApi.delete_domain_record"
  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 'domain_id' is set
  if @api_client.config.client_side_validation && domain_id.nil?
    fail ArgumentError, "Missing the required parameter 'domain_id' when calling DomainsApi.delete_domain_record"
  end
  # verify the required parameter 'record_id' is set
  if @api_client.config.client_side_validation && record_id.nil?
    fail ArgumentError, "Missing the required parameter 'record_id' when calling DomainsApi.delete_domain_record"
  end
  # resource path
  local_var_path = '/{apiVersion}/domains/{domainId}/records/{recordId}'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.to_s)).sub('{' + 'domainId' + '}', CGI.escape(domain_id.to_s)).sub('{' + 'recordId' + '}', CGI.escape(record_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 => :"DomainsApi.delete_domain_record",
    :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: DomainsApi#delete_domain_record\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

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

Delete a domain Deletes a Domain from Linode&#39;s DNS Manager. The Domain will be removed from Linode&#39;s nameservers shortly after this operation completes. This also deletes all associated Domain Records. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli domains delete 1234 &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; domains: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.

  • domain_id (Integer)

    The ID of the Domain 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/domains_api.rb', line 39

def delete_domain_with_http_info(api_version, domain_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DomainsApi.delete_domain ...'
  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 DomainsApi.delete_domain"
  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 'domain_id' is set
  if @api_client.config.client_side_validation && domain_id.nil?
    fail ArgumentError, "Missing the required parameter 'domain_id' when calling DomainsApi.delete_domain"
  end
  # resource path
  local_var_path = '/{apiVersion}/domains/{domainId}'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.to_s)).sub('{' + 'domainId' + '}', CGI.escape(domain_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 => :"DomainsApi.delete_domain",
    :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: DomainsApi#delete_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_domain(api_version, domain_id, opts = {}) ⇒ Domain3

Get a domain This is a single Domain that you have registered in Linode’s DNS Manager. Linode is not a registrar, and in order for this Domain record to work you must own the domain and point your registrar at Linode’s nameservers. <<LB>> — - __CLI__. “‘ linode-cli domains view 123 “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` domains: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.

  • domain_id (Integer)

    The ID of the Domain to access.

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

    the optional parameters

Returns:



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

def get_domain(api_version, domain_id, opts = {})
  data, _status_code, _headers = get_domain_with_http_info(api_version, domain_id, opts)
  data
end

#get_domain_record(api_version, domain_id, record_id, opts = {}) ⇒ GetDomainRecord200Response

Get a domain record View a single Record on this Domain. <<LB>> — - __CLI__. “‘ linode-cli domains records-view 123 234 “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` domains: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.

  • domain_id (Integer)

    The ID of the Domain whose Record you are accessing.

  • record_id (Integer)

    The ID of the Record you are accessing.

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

    the optional parameters

Returns:



257
258
259
260
# File 'lib/linode_openapi_client/api/domains_api.rb', line 257

def get_domain_record(api_version, domain_id, record_id, opts = {})
  data, _status_code, _headers = get_domain_record_with_http_info(api_version, domain_id, record_id, opts)
  data
end

#get_domain_record_with_http_info(api_version, domain_id, record_id, opts = {}) ⇒ Array<(GetDomainRecord200Response, Integer, Hash)>

Get a domain record View a single Record on this Domain. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli domains records-view 123 234 &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; domains: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.

  • domain_id (Integer)

    The ID of the Domain whose Record you are accessing.

  • record_id (Integer)

    The ID of the Record you are accessing.

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

    the optional parameters

Returns:

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

    GetDomainRecord200Response data, response status code and response headers



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
323
324
325
326
327
328
# File 'lib/linode_openapi_client/api/domains_api.rb', line 269

def get_domain_record_with_http_info(api_version, domain_id, record_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DomainsApi.get_domain_record ...'
  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 DomainsApi.get_domain_record"
  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 'domain_id' is set
  if @api_client.config.client_side_validation && domain_id.nil?
    fail ArgumentError, "Missing the required parameter 'domain_id' when calling DomainsApi.get_domain_record"
  end
  # verify the required parameter 'record_id' is set
  if @api_client.config.client_side_validation && record_id.nil?
    fail ArgumentError, "Missing the required parameter 'record_id' when calling DomainsApi.get_domain_record"
  end
  # resource path
  local_var_path = '/{apiVersion}/domains/{domainId}/records/{recordId}'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.to_s)).sub('{' + 'domainId' + '}', CGI.escape(domain_id.to_s)).sub('{' + 'recordId' + '}', CGI.escape(record_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] || 'GetDomainRecord200Response'

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

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

#get_domain_records(api_version, domain_id, opts = {}) ⇒ GetDomainRecords200Response

List domain records Returns a paginated list of Records configured on a Domain in Linode’s DNS Manager. <<LB>> — - __CLI__. “‘ linode-cli domains records-list 1234 “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` domains: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.

  • domain_id (Integer)

    The ID of the Domain we are accessing Records for.

  • 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:



338
339
340
341
# File 'lib/linode_openapi_client/api/domains_api.rb', line 338

def get_domain_records(api_version, domain_id, opts = {})
  data, _status_code, _headers = get_domain_records_with_http_info(api_version, domain_id, opts)
  data
end

#get_domain_records_with_http_info(api_version, domain_id, opts = {}) ⇒ Array<(GetDomainRecords200Response, Integer, Hash)>

List domain records Returns a paginated list of Records configured on a Domain in Linode&#39;s DNS Manager. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli domains records-list 1234 &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; domains: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.

  • domain_id (Integer)

    The ID of the Domain we are accessing Records for.

  • 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<(GetDomainRecords200Response, Integer, Hash)>)

    GetDomainRecords200Response data, response status code and response headers



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
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
# File 'lib/linode_openapi_client/api/domains_api.rb', line 351

def get_domain_records_with_http_info(api_version, domain_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DomainsApi.get_domain_records ...'
  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 DomainsApi.get_domain_records"
  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 'domain_id' is set
  if @api_client.config.client_side_validation && domain_id.nil?
    fail ArgumentError, "Missing the required parameter 'domain_id' when calling DomainsApi.get_domain_records"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling DomainsApi.get_domain_records, 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 DomainsApi.get_domain_records, 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 DomainsApi.get_domain_records, must be greater than or equal to 25.'
  end

  # resource path
  local_var_path = '/{apiVersion}/domains/{domainId}/records'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.to_s)).sub('{' + 'domainId' + '}', CGI.escape(domain_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] || 'GetDomainRecords200Response'

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

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

#get_domain_with_http_info(api_version, domain_id, opts = {}) ⇒ Array<(Domain3, Integer, Hash)>

Get a domain This is a single Domain that you have registered in Linode&#39;s DNS Manager. Linode is not a registrar, and in order for this Domain record to work you must own the domain and point your registrar at Linode&#39;s nameservers. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli domains view 123 &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; domains: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.

  • domain_id (Integer)

    The ID of the Domain to access.

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

    the optional parameters

Returns:

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

    Domain3 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/domains_api.rb', line 193

def get_domain_with_http_info(api_version, domain_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DomainsApi.get_domain ...'
  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 DomainsApi.get_domain"
  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 'domain_id' is set
  if @api_client.config.client_side_validation && domain_id.nil?
    fail ArgumentError, "Missing the required parameter 'domain_id' when calling DomainsApi.get_domain"
  end
  # resource path
  local_var_path = '/{apiVersion}/domains/{domainId}'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.to_s)).sub('{' + 'domainId' + '}', CGI.escape(domain_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] || 'Domain3'

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

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

#get_domain_zone(api_version, domain_id, opts = {}) ⇒ GetDomainZone200Response

Get a domain zone file Returns the zone file for the last rendered zone for the specified domain. <<LB>> — - __CLI__. “‘ linode-cli domains zone-file 123 “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` domains: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.

  • domain_id (String)

    ID of the Domain.

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

    the optional parameters

Returns:



428
429
430
431
# File 'lib/linode_openapi_client/api/domains_api.rb', line 428

def get_domain_zone(api_version, domain_id, opts = {})
  data, _status_code, _headers = get_domain_zone_with_http_info(api_version, domain_id, opts)
  data
end

#get_domain_zone_with_http_info(api_version, domain_id, opts = {}) ⇒ Array<(GetDomainZone200Response, Integer, Hash)>

Get a domain zone file Returns the zone file for the last rendered zone for the specified domain. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli domains zone-file 123 &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; domains: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.

  • domain_id (String)

    ID of the Domain.

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

    the optional parameters

Returns:

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

    GetDomainZone200Response data, response status code and response headers



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/domains_api.rb', line 439

def get_domain_zone_with_http_info(api_version, domain_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DomainsApi.get_domain_zone ...'
  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 DomainsApi.get_domain_zone"
  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 'domain_id' is set
  if @api_client.config.client_side_validation && domain_id.nil?
    fail ArgumentError, "Missing the required parameter 'domain_id' when calling DomainsApi.get_domain_zone"
  end
  # resource path
  local_var_path = '/{apiVersion}/domains/{domainId}/zone-file'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.to_s)).sub('{' + 'domainId' + '}', CGI.escape(domain_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] || 'GetDomainZone200Response'

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

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

#get_domains(api_version, opts = {}) ⇒ GetDomains200Response

List domains This is a collection of Domains that you have registered in Linode’s DNS Manager. Linode is not a registrar, and in order for these to work you must own the domains and point your registrar at Linode’s nameservers. <<LB>> — - __CLI__. “‘ linode-cli domains list “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` domains: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:



503
504
505
506
# File 'lib/linode_openapi_client/api/domains_api.rb', line 503

def get_domains(api_version, opts = {})
  data, _status_code, _headers = get_domains_with_http_info(api_version, opts)
  data
end

#get_domains_with_http_info(api_version, opts = {}) ⇒ Array<(GetDomains200Response, Integer, Hash)>

List domains This is a collection of Domains that you have registered in Linode&#39;s DNS Manager. Linode is not a registrar, and in order for these to work you must own the domains and point your registrar at Linode&#39;s nameservers. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli domains list &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; domains: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<(GetDomains200Response, Integer, Hash)>)

    GetDomains200Response data, response status code and response headers



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
569
570
571
572
573
574
575
576
577
578
579
580
# File 'lib/linode_openapi_client/api/domains_api.rb', line 515

def get_domains_with_http_info(api_version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DomainsApi.get_domains ...'
  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 DomainsApi.get_domains"
  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 DomainsApi.get_domains, 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 DomainsApi.get_domains, 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 DomainsApi.get_domains, must be greater than or equal to 25.'
  end

  # resource path
  local_var_path = '/{apiVersion}/domains'.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] || 'GetDomains200Response'

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

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

#post_clone_domain(api_version, domain_id, post_clone_domain_request, opts = {}) ⇒ Domain7

Clone a domain Clones a Domain and all associated DNS records from a Domain that is registered in Linode’s DNS manager. <<LB>> — - __CLI__. “‘ linode-cli domains clone 123 –domain example.com “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` domains: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.

  • domain_id (String)

    ID of the Domain to clone.

  • post_clone_domain_request (PostCloneDomainRequest)

    Information about the Domain to clone.

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

    the optional parameters

Returns:



589
590
591
592
# File 'lib/linode_openapi_client/api/domains_api.rb', line 589

def post_clone_domain(api_version, domain_id, post_clone_domain_request, opts = {})
  data, _status_code, _headers = post_clone_domain_with_http_info(api_version, domain_id, post_clone_domain_request, opts)
  data
end

#post_clone_domain_with_http_info(api_version, domain_id, post_clone_domain_request, opts = {}) ⇒ Array<(Domain7, Integer, Hash)>

Clone a domain Clones a Domain and all associated DNS records from a Domain that is registered in Linode&#39;s DNS manager. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli domains clone 123 –domain example.com &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; domains: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.

  • domain_id (String)

    ID of the Domain to clone.

  • post_clone_domain_request (PostCloneDomainRequest)

    Information about the Domain to clone.

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

    the optional parameters

Returns:

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

    Domain7 data, response status code and response headers



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
655
656
657
658
659
660
661
662
663
664
665
# File 'lib/linode_openapi_client/api/domains_api.rb', line 601

def post_clone_domain_with_http_info(api_version, domain_id, post_clone_domain_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DomainsApi.post_clone_domain ...'
  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 DomainsApi.post_clone_domain"
  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 'domain_id' is set
  if @api_client.config.client_side_validation && domain_id.nil?
    fail ArgumentError, "Missing the required parameter 'domain_id' when calling DomainsApi.post_clone_domain"
  end
  # verify the required parameter 'post_clone_domain_request' is set
  if @api_client.config.client_side_validation && post_clone_domain_request.nil?
    fail ArgumentError, "Missing the required parameter 'post_clone_domain_request' when calling DomainsApi.post_clone_domain"
  end
  # resource path
  local_var_path = '/{apiVersion}/domains/{domainId}/clone'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.to_s)).sub('{' + 'domainId' + '}', CGI.escape(domain_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(post_clone_domain_request)

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

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

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

#post_domain(api_version, post_domain_request, opts = {}) ⇒ Domain2

Create a domain Adds a new Domain to Linode’s DNS Manager. Linode is not a registrar, and you must own the domain before adding it here. Be sure to point your registrar to Linode’s nameservers so that the records hosted here are used. <<LB>> — - __CLI__. “‘ linode-cli domains create \ –type master \ –domain example.org \ –soa_email [email protected] “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` domains: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_domain_request (PostDomainRequest)

    Information about the domain you are registering.

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

    the optional parameters

Returns:



673
674
675
676
# File 'lib/linode_openapi_client/api/domains_api.rb', line 673

def post_domain(api_version, post_domain_request, opts = {})
  data, _status_code, _headers = post_domain_with_http_info(api_version, post_domain_request, opts)
  data
end

#post_domain_record(api_version, domain_id, post_domain_record_request, opts = {}) ⇒ PostDomainRecord200Response

Create a domain record Adds a new Domain Record to the zonefile this Domain represents. Each domain can have up to 12,000 active records. <<LB>> — - __CLI__. “‘ linode-cli domains records-create 123 \ –type A \ –name test \ –target 203.0.113.1 \ –priority 50 \ –weight 50 \ –port 80 \ –ttl_sec 604800 “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` domains: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.

  • domain_id (Integer)

    The ID of the Domain we are accessing Records for.

  • post_domain_record_request (PostDomainRecordRequest)

    Information about the new Record to add.

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

    the optional parameters

Returns:



753
754
755
756
# File 'lib/linode_openapi_client/api/domains_api.rb', line 753

def post_domain_record(api_version, domain_id, post_domain_record_request, opts = {})
  data, _status_code, _headers = post_domain_record_with_http_info(api_version, domain_id, post_domain_record_request, opts)
  data
end

#post_domain_record_with_http_info(api_version, domain_id, post_domain_record_request, opts = {}) ⇒ Array<(PostDomainRecord200Response, Integer, Hash)>

Create a domain record Adds a new Domain Record to the zonefile this Domain represents. Each domain can have up to 12,000 active records. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli domains records-create 123 \ –type A \ –name test \ –target 203.0.113.1 \ –priority 50 \ –weight 50 \ –port 80 \ –ttl_sec 604800 &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; domains: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.

  • domain_id (Integer)

    The ID of the Domain we are accessing Records for.

  • post_domain_record_request (PostDomainRecordRequest)

    Information about the new Record to add.

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

    the optional parameters

Returns:

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

    PostDomainRecord200Response data, response status code and response headers



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
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
# File 'lib/linode_openapi_client/api/domains_api.rb', line 765

def post_domain_record_with_http_info(api_version, domain_id, post_domain_record_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DomainsApi.post_domain_record ...'
  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 DomainsApi.post_domain_record"
  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 'domain_id' is set
  if @api_client.config.client_side_validation && domain_id.nil?
    fail ArgumentError, "Missing the required parameter 'domain_id' when calling DomainsApi.post_domain_record"
  end
  # verify the required parameter 'post_domain_record_request' is set
  if @api_client.config.client_side_validation && post_domain_record_request.nil?
    fail ArgumentError, "Missing the required parameter 'post_domain_record_request' when calling DomainsApi.post_domain_record"
  end
  # resource path
  local_var_path = '/{apiVersion}/domains/{domainId}/records'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.to_s)).sub('{' + 'domainId' + '}', CGI.escape(domain_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(post_domain_record_request)

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

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

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

#post_domain_with_http_info(api_version, post_domain_request, opts = {}) ⇒ Array<(Domain2, Integer, Hash)>

Create a domain Adds a new Domain to Linode&#39;s DNS Manager. Linode is not a registrar, and you must own the domain before adding it here. Be sure to point your registrar to Linode&#39;s nameservers so that the records hosted here are used. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli domains create \ –type master \ –domain example.org \ –soa_email [email protected] &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; domains: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_domain_request (PostDomainRequest)

    Information about the domain you are registering.

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

    the optional parameters

Returns:

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

    Domain2 data, response status code and response headers



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
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
# File 'lib/linode_openapi_client/api/domains_api.rb', line 684

def post_domain_with_http_info(api_version, post_domain_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DomainsApi.post_domain ...'
  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 DomainsApi.post_domain"
  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_domain_request' is set
  if @api_client.config.client_side_validation && post_domain_request.nil?
    fail ArgumentError, "Missing the required parameter 'post_domain_request' when calling DomainsApi.post_domain"
  end
  # resource path
  local_var_path = '/{apiVersion}/domains'.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_domain_request)

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

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

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

#post_import_domain(api_version, opts = {}) ⇒ Domain6

Import a domain Imports a domain zone from a remote nameserver. Your nameserver must allow zone transfers (AXFR) from the following IPs: - 96.126.114.97 - 96.126.114.98 - 2600:3c00::5e - 2600:3c00::5f <<LB>> — - __CLI__. “‘ linode-cli domains import –domain example.com –remote_nameserver examplenameserver.com “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` domains: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):

Returns:



837
838
839
840
# File 'lib/linode_openapi_client/api/domains_api.rb', line 837

def post_import_domain(api_version, opts = {})
  data, _status_code, _headers = post_import_domain_with_http_info(api_version, opts)
  data
end

#post_import_domain_with_http_info(api_version, opts = {}) ⇒ Array<(Domain6, Integer, Hash)>

Import a domain Imports a domain zone from a remote nameserver. Your nameserver must allow zone transfers (AXFR) from the following IPs: - 96.126.114.97 - 96.126.114.98 - 2600:3c00::5e - 2600:3c00::5f &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli domains import –domain example.com –remote_nameserver examplenameserver.com &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; domains: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):

Returns:

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

    Domain6 data, response status code and response headers



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
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
# File 'lib/linode_openapi_client/api/domains_api.rb', line 848

def post_import_domain_with_http_info(api_version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DomainsApi.post_import_domain ...'
  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 DomainsApi.post_import_domain"
  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}/domains/import'.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_import_domain_request'])

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

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

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

#put_domain(api_version, domain_id, domain4, opts = {}) ⇒ Domain5

Update a domain Update information about a Domain in Linode’s DNS Manager. <<LB>> — - __CLI__. “‘ linode-cli domains update 1234 \ –retry_sec 7200 \ –ttl_sec 300 “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` domains: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.

  • domain_id (Integer)

    The ID of the Domain to access.

  • domain4 (Domain4)

    The Domain information to update.

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

    the optional parameters

Returns:



913
914
915
916
# File 'lib/linode_openapi_client/api/domains_api.rb', line 913

def put_domain(api_version, domain_id, domain4, opts = {})
  data, _status_code, _headers = put_domain_with_http_info(api_version, domain_id, domain4, opts)
  data
end

#put_domain_record(api_version, domain_id, record_id, put_domain_record_request, opts = {}) ⇒ PutDomainRecord200Response

Update a domain record Updates a single Record on this Domain. <<LB>> — - __CLI__. “‘ linode-cli domains records-update 123 234 \ –name test \ –target 203.0.113.1 \ –priority 50 \ –weight 50 \ –port 80 \ –ttl_sec 604800 “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` domains: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.

  • domain_id (Integer)

    The ID of the Domain whose Record you are accessing.

  • record_id (Integer)

    The ID of the Record you are accessing.

  • put_domain_record_request (PutDomainRecordRequest)

    The values to change.

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

    the optional parameters

Returns:



999
1000
1001
1002
# File 'lib/linode_openapi_client/api/domains_api.rb', line 999

def put_domain_record(api_version, domain_id, record_id, put_domain_record_request, opts = {})
  data, _status_code, _headers = put_domain_record_with_http_info(api_version, domain_id, record_id, put_domain_record_request, opts)
  data
end

#put_domain_record_with_http_info(api_version, domain_id, record_id, put_domain_record_request, opts = {}) ⇒ Array<(PutDomainRecord200Response, Integer, Hash)>

Update a domain record Updates a single Record on this Domain. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli domains records-update 123 234 \ –name test \ –target 203.0.113.1 \ –priority 50 \ –weight 50 \ –port 80 \ –ttl_sec 604800 &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; domains: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.

  • domain_id (Integer)

    The ID of the Domain whose Record you are accessing.

  • record_id (Integer)

    The ID of the Record you are accessing.

  • put_domain_record_request (PutDomainRecordRequest)

    The values to change.

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

    the optional parameters

Returns:

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

    PutDomainRecord200Response data, response status code and response headers



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
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
# File 'lib/linode_openapi_client/api/domains_api.rb', line 1012

def put_domain_record_with_http_info(api_version, domain_id, record_id, put_domain_record_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DomainsApi.put_domain_record ...'
  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 DomainsApi.put_domain_record"
  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 'domain_id' is set
  if @api_client.config.client_side_validation && domain_id.nil?
    fail ArgumentError, "Missing the required parameter 'domain_id' when calling DomainsApi.put_domain_record"
  end
  # verify the required parameter 'record_id' is set
  if @api_client.config.client_side_validation && record_id.nil?
    fail ArgumentError, "Missing the required parameter 'record_id' when calling DomainsApi.put_domain_record"
  end
  # verify the required parameter 'put_domain_record_request' is set
  if @api_client.config.client_side_validation && put_domain_record_request.nil?
    fail ArgumentError, "Missing the required parameter 'put_domain_record_request' when calling DomainsApi.put_domain_record"
  end
  # resource path
  local_var_path = '/{apiVersion}/domains/{domainId}/records/{recordId}'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.to_s)).sub('{' + 'domainId' + '}', CGI.escape(domain_id.to_s)).sub('{' + 'recordId' + '}', CGI.escape(record_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(put_domain_record_request)

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

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

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

#put_domain_with_http_info(api_version, domain_id, domain4, opts = {}) ⇒ Array<(Domain5, Integer, Hash)>

Update a domain Update information about a Domain in Linode&#39;s DNS Manager. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli domains update 1234 \ –retry_sec 7200 \ –ttl_sec 300 &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; domains: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.

  • domain_id (Integer)

    The ID of the Domain to access.

  • domain4 (Domain4)

    The Domain information to update.

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

    the optional parameters

Returns:

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

    Domain5 data, response status code and response headers



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
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
# File 'lib/linode_openapi_client/api/domains_api.rb', line 925

def put_domain_with_http_info(api_version, domain_id, domain4, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DomainsApi.put_domain ...'
  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 DomainsApi.put_domain"
  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 'domain_id' is set
  if @api_client.config.client_side_validation && domain_id.nil?
    fail ArgumentError, "Missing the required parameter 'domain_id' when calling DomainsApi.put_domain"
  end
  # verify the required parameter 'domain4' is set
  if @api_client.config.client_side_validation && domain4.nil?
    fail ArgumentError, "Missing the required parameter 'domain4' when calling DomainsApi.put_domain"
  end
  # resource path
  local_var_path = '/{apiVersion}/domains/{domainId}'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.to_s)).sub('{' + 'domainId' + '}', CGI.escape(domain_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(domain4)

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

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

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