Class: OCI::Dns::DnsClient

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/dns/dns_client.rb

Overview

API for the DNS service. Use this API to manage DNS zones, records, and other DNS resources. For more information, see Overview of the DNS Service.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ DnsClient

Creates a new DnsClient. Notes: If a config is not specified, then the global OCI.config will be used.

This client is not thread-safe

Either a region or an endpoint must be specified. If an endpoint is specified, it will be used instead of the region. A region may be specified in the config or via or the region parameter. If specified in both, then the region parameter will be used.

Parameters:

  • config (Config) (defaults to: nil)

    A Config object.

  • region (String) (defaults to: nil)

    A region used to determine the service endpoint. This will usually correspond to a value in Regions::REGION_ENUM, but may be an arbitrary string.

  • endpoint (String) (defaults to: nil)

    The fully qualified endpoint URL

  • signer (OCI::BaseSigner) (defaults to: nil)

    A signer implementation which can be used by this client. If this is not provided then a signer will be constructed via the provided config. One use case of this parameter is instance principals authentication, so that the instance principals signer can be provided to the client

  • proxy_settings (OCI::ApiClientProxySettings) (defaults to: nil)

    If your environment requires you to use a proxy server for outgoing HTTP requests the details for the proxy can be provided in this parameter

  • retry_config (OCI::Retry::RetryConfig) (defaults to: nil)

    The retry configuration for this service client. This represents the default retry configuration to apply across all operations. This can be overridden on a per-operation basis. The default retry configuration value is nil, which means that an operation will not perform any retries



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
# File 'lib/oci/dns/dns_client.rb', line 54

def initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil)
  # If the signer is an InstancePrincipalsSecurityTokenSigner or SecurityTokenSigner and no config was supplied (they are self-sufficient signers)
  # then create a dummy config to pass to the ApiClient constructor. If customers wish to create a client which uses instance principals
  # and has config (either populated programmatically or loaded from a file), they must construct that config themselves and then
  # pass it to this constructor.
  #
  # If there is no signer (or the signer is not an instance principals signer) and no config was supplied, this is not valid
  # so try and load the config from the default file.
  config = OCI::Config.validate_and_build_config_with_signer(config, signer)

  if signer.nil?
    signer = OCI::Signer.new(
      config.user,
      config.fingerprint,
      config.tenancy,
      config.key_file,
      pass_phrase: config.pass_phrase,
      private_key_content: config.key_content
    )
  end

  @api_client = OCI::ApiClient.new(config, signer, proxy_settings: proxy_settings)
  @retry_config = retry_config

  if endpoint
    @endpoint = endpoint + '/20180115'
  else
    region ||= config.region
    region ||= signer.region if signer.respond_to?(:region)
    self.region = region
  end
  logger.info "DnsClient endpoint set to '#{@endpoint}'." if logger
end

Instance Attribute Details

#api_clientOCI::ApiClient (readonly)

Client used to make HTTP requests.

Returns:



14
15
16
# File 'lib/oci/dns/dns_client.rb', line 14

def api_client
  @api_client
end

#endpointString (readonly)

Fully qualified endpoint URL

Returns:

  • (String)


18
19
20
# File 'lib/oci/dns/dns_client.rb', line 18

def endpoint
  @endpoint
end

#regionString

The region, which will usually correspond to a value in Regions::REGION_ENUM.

Returns:

  • (String)


28
29
30
# File 'lib/oci/dns/dns_client.rb', line 28

def region
  @region
end

#retry_configOCI::Retry::RetryConfig (readonly)

The default retry configuration to apply to all operations in this service client. This can be overridden on a per-operation basis. The default retry configuration value is nil, which means that an operation will not perform any retries



24
25
26
# File 'lib/oci/dns/dns_client.rb', line 24

def retry_config
  @retry_config
end

Instance Method Details

#change_steering_policy_compartment(steering_policy_id, change_steering_policy_compartment_details, opts = {}) ⇒ Response

Moves a steering policy into a different compartment.

Parameters:

  • steering_policy_id (String)

    The OCID of the target steering policy.

  • change_steering_policy_compartment_details (OCI::Dns::Models::ChangeSteeringPolicyCompartmentDetails)

    Details for moving a steering policy into a different compartment.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    The If-Match header field makes the request method conditional on the existence of at least one current representation of the target resource, when the field-value is *, or having a current representation of the target resource that has an entity-tag matching a member of the list of entity-tags provided in the field-value. (default to nil)

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected). (default to nil)

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. (default to nil)

Returns:

  • (Response)

    A Response object with data of type nil



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/oci/dns/dns_client.rb', line 135

def change_steering_policy_compartment(steering_policy_id, change_steering_policy_compartment_details, opts = {})
  logger.debug 'Calling operation DnsClient#change_steering_policy_compartment.' if logger

  raise "Missing the required parameter 'steering_policy_id' when calling change_steering_policy_compartment." if steering_policy_id.nil?
  raise "Missing the required parameter 'change_steering_policy_compartment_details' when calling change_steering_policy_compartment." if change_steering_policy_compartment_details.nil?
  raise "Parameter value for 'steering_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(steering_policy_id)

  path = '/steeringPolicies/{steeringPolicyId}/actions/changeCompartment'.sub('{steeringPolicyId}', steering_policy_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_steering_policy_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#change_steering_policy_compartment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#change_tsig_key_compartment(tsig_key_id, change_tsig_key_compartment_details, opts = {}) ⇒ Response

Moves a TSIG key into a different compartment.

Parameters:

  • tsig_key_id (String)

    The OCID of the target TSIG key.

  • change_tsig_key_compartment_details (OCI::Dns::Models::ChangeTsigKeyCompartmentDetails)

    Details for moving a TSIG key into a different compartment.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    The If-Match header field makes the request method conditional on the existence of at least one current representation of the target resource, when the field-value is *, or having a current representation of the target resource that has an entity-tag matching a member of the list of entity-tags provided in the field-value. (default to nil)

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected). (default to nil)

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. (default to nil)

Returns:

  • (Response)

    A Response object with data of type nil



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
# File 'lib/oci/dns/dns_client.rb', line 208

def change_tsig_key_compartment(tsig_key_id, change_tsig_key_compartment_details, opts = {})
  logger.debug 'Calling operation DnsClient#change_tsig_key_compartment.' if logger

  raise "Missing the required parameter 'tsig_key_id' when calling change_tsig_key_compartment." if tsig_key_id.nil?
  raise "Missing the required parameter 'change_tsig_key_compartment_details' when calling change_tsig_key_compartment." if change_tsig_key_compartment_details.nil?
  raise "Parameter value for 'tsig_key_id' must not be blank" if OCI::Internal::Util.blank_string?(tsig_key_id)

  path = '/tsigKeys/{tsigKeyId}/actions/changeCompartment'.sub('{tsigKeyId}', tsig_key_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_tsig_key_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#change_tsig_key_compartment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#change_zone_compartment(zone_id, change_zone_compartment_details, opts = {}) ⇒ Response

Moves a zone into a different compartment. Note: All SteeringPolicyAttachment objects associated with this zone will also be moved into the provided compartment.

Parameters:

  • zone_id (String)

    The OCID of the target zone.

  • change_zone_compartment_details (OCI::Dns::Models::ChangeZoneCompartmentDetails)

    Details for moving a zone into a different compartment.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    The If-Match header field makes the request method conditional on the existence of at least one current representation of the target resource, when the field-value is *, or having a current representation of the target resource that has an entity-tag matching a member of the list of entity-tags provided in the field-value. (default to nil)

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected). (default to nil)

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. (default to nil)

Returns:

  • (Response)

    A Response object with data of type nil



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
# File 'lib/oci/dns/dns_client.rb', line 282

def change_zone_compartment(zone_id, change_zone_compartment_details, opts = {})
  logger.debug 'Calling operation DnsClient#change_zone_compartment.' if logger

  raise "Missing the required parameter 'zone_id' when calling change_zone_compartment." if zone_id.nil?
  raise "Missing the required parameter 'change_zone_compartment_details' when calling change_zone_compartment." if change_zone_compartment_details.nil?
  raise "Parameter value for 'zone_id' must not be blank" if OCI::Internal::Util.blank_string?(zone_id)

  path = '/zones/{zoneId}/actions/changeCompartment'.sub('{zoneId}', zone_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_zone_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#change_zone_compartment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_steering_policy(create_steering_policy_details, opts = {}) ⇒ Response

Creates a new steering policy in the specified compartment. For more information on creating policies with templates, see Traffic Management API Guide.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected). (default to nil)

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. (default to nil)

Returns:



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
# File 'lib/oci/dns/dns_client.rb', line 350

def create_steering_policy(create_steering_policy_details, opts = {})
  logger.debug 'Calling operation DnsClient#create_steering_policy.' if logger

  raise "Missing the required parameter 'create_steering_policy_details' when calling create_steering_policy." if create_steering_policy_details.nil?

  path = '/steeringPolicies'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_steering_policy_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#create_steering_policy') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Dns::Models::SteeringPolicy'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_steering_policy_attachment(create_steering_policy_attachment_details, opts = {}) ⇒ Response

Creates a new attachment between a steering policy and a domain, giving the policy permission to answer queries for the specified domain. A steering policy must be attached to a domain for the policy to answer DNS queries for that domain.

For the purposes of access control, the attachment is automatically placed into the same compartment as the domain's zone.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected). (default to nil)

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. (default to nil)

Returns:



420
421
422
423
424
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
# File 'lib/oci/dns/dns_client.rb', line 420

def create_steering_policy_attachment(create_steering_policy_attachment_details, opts = {})
  logger.debug 'Calling operation DnsClient#create_steering_policy_attachment.' if logger

  raise "Missing the required parameter 'create_steering_policy_attachment_details' when calling create_steering_policy_attachment." if create_steering_policy_attachment_details.nil?

  path = '/steeringPolicyAttachments'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_steering_policy_attachment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#create_steering_policy_attachment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Dns::Models::SteeringPolicyAttachment'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_tsig_key(create_tsig_key_details, opts = {}) ⇒ Response

Creates a new TSIG key in the specified compartment. There is no opc-retry-token header since TSIG key names must be globally unique.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. (default to nil)

Returns:



479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
# File 'lib/oci/dns/dns_client.rb', line 479

def create_tsig_key(create_tsig_key_details, opts = {})
  logger.debug 'Calling operation DnsClient#create_tsig_key.' if logger

  raise "Missing the required parameter 'create_tsig_key_details' when calling create_tsig_key." if create_tsig_key_details.nil?

  path = '/tsigKeys'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(create_tsig_key_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#create_tsig_key') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Dns::Models::TsigKey'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_zone(create_zone_details, opts = {}) ⇒ Response

Creates a new zone in the specified compartment. The compartmentId query parameter is required if the Content-Type header for the request is text/dns.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. (default to nil)

  • :compartment_id (String)

    The OCID of the compartment the resource belongs to. (default to nil)

Returns:



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
# File 'lib/oci/dns/dns_client.rb', line 538

def create_zone(create_zone_details, opts = {})
  logger.debug 'Calling operation DnsClient#create_zone.' if logger

  raise "Missing the required parameter 'create_zone_details' when calling create_zone." if create_zone_details.nil?

  path = '/zones'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(create_zone_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#create_zone') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Dns::Models::Zone'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_domain_records(zone_name_or_id, domain, opts = {}) ⇒ Response

Deletes all records at the specified zone and domain.

Parameters:

  • zone_name_or_id (String)

    The name or OCID of the target zone.

  • domain (String)

    The target fully-qualified domain name (FQDN) within the target zone.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    The If-Match header field makes the request method conditional on the existence of at least one current representation of the target resource, when the field-value is *, or having a current representation of the target resource that has an entity-tag matching a member of the list of entity-tags provided in the field-value. (default to nil)

  • :if_unmodified_since (String)

    The If-Unmodified-Since header field makes the request method conditional on the selected representation's last modification date being earlier than or equal to the date provided in the field-value. This field accomplishes the same purpose as If-Match for cases where the user agent does not have an entity-tag for the representation. (default to nil)

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. (default to nil)

  • :compartment_id (String)

    The OCID of the compartment the resource belongs to. (default to nil)

Returns:

  • (Response)

    A Response object with data of type nil



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
# File 'lib/oci/dns/dns_client.rb', line 608

def delete_domain_records(zone_name_or_id, domain, opts = {})
  logger.debug 'Calling operation DnsClient#delete_domain_records.' if logger

  raise "Missing the required parameter 'zone_name_or_id' when calling delete_domain_records." if zone_name_or_id.nil?
  raise "Missing the required parameter 'domain' when calling delete_domain_records." if domain.nil?
  raise "Parameter value for 'zone_name_or_id' must not be blank" if OCI::Internal::Util.blank_string?(zone_name_or_id)
  raise "Parameter value for 'domain' must not be blank" if OCI::Internal::Util.blank_string?(domain)

  path = '/zones/{zoneNameOrId}/records/{domain}'.sub('{zoneNameOrId}', zone_name_or_id.to_s).sub('{domain}', domain.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'if-unmodified-since'] = opts[:if_unmodified_since] if opts[:if_unmodified_since]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#delete_domain_records') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_rr_set(zone_name_or_id, domain, rtype, opts = {}) ⇒ Response

Deletes all records in the specified RRSet.

Parameters:

  • zone_name_or_id (String)

    The name or OCID of the target zone.

  • domain (String)

    The target fully-qualified domain name (FQDN) within the target zone.

  • rtype (String)

    The type of the target RRSet within the target zone.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    The If-Match header field makes the request method conditional on the existence of at least one current representation of the target resource, when the field-value is *, or having a current representation of the target resource that has an entity-tag matching a member of the list of entity-tags provided in the field-value. (default to nil)

  • :if_unmodified_since (String)

    The If-Unmodified-Since header field makes the request method conditional on the selected representation's last modification date being earlier than or equal to the date provided in the field-value. This field accomplishes the same purpose as If-Match for cases where the user agent does not have an entity-tag for the representation. (default to nil)

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. (default to nil)

  • :compartment_id (String)

    The OCID of the compartment the resource belongs to. (default to nil)

Returns:

  • (Response)

    A Response object with data of type nil



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
# File 'lib/oci/dns/dns_client.rb', line 684

def delete_rr_set(zone_name_or_id, domain, rtype, opts = {})
  logger.debug 'Calling operation DnsClient#delete_rr_set.' if logger

  raise "Missing the required parameter 'zone_name_or_id' when calling delete_rr_set." if zone_name_or_id.nil?
  raise "Missing the required parameter 'domain' when calling delete_rr_set." if domain.nil?
  raise "Missing the required parameter 'rtype' when calling delete_rr_set." if rtype.nil?
  raise "Parameter value for 'zone_name_or_id' must not be blank" if OCI::Internal::Util.blank_string?(zone_name_or_id)
  raise "Parameter value for 'domain' must not be blank" if OCI::Internal::Util.blank_string?(domain)
  raise "Parameter value for 'rtype' must not be blank" if OCI::Internal::Util.blank_string?(rtype)

  path = '/zones/{zoneNameOrId}/records/{domain}/{rtype}'.sub('{zoneNameOrId}', zone_name_or_id.to_s).sub('{domain}', domain.to_s).sub('{rtype}', rtype.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'if-unmodified-since'] = opts[:if_unmodified_since] if opts[:if_unmodified_since]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#delete_rr_set') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_steering_policy(steering_policy_id, opts = {}) ⇒ Response

Deletes the specified steering policy. A 204 response indicates that the delete has been successful. Deletion will fail if the policy is attached to any zones. To detach a policy from a zone, see DeleteSteeringPolicyAttachment.

Parameters:

  • steering_policy_id (String)

    The OCID of the target steering policy.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    The If-Match header field makes the request method conditional on the existence of at least one current representation of the target resource, when the field-value is *, or having a current representation of the target resource that has an entity-tag matching a member of the list of entity-tags provided in the field-value. (default to nil)

  • :if_unmodified_since (String)

    The If-Unmodified-Since header field makes the request method conditional on the selected representation's last modification date being earlier than or equal to the date provided in the field-value. This field accomplishes the same purpose as If-Match for cases where the user agent does not have an entity-tag for the representation. (default to nil)

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. (default to nil)

Returns:

  • (Response)

    A Response object with data of type nil



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/oci/dns/dns_client.rb', line 762

def delete_steering_policy(steering_policy_id, opts = {})
  logger.debug 'Calling operation DnsClient#delete_steering_policy.' if logger

  raise "Missing the required parameter 'steering_policy_id' when calling delete_steering_policy." if steering_policy_id.nil?
  raise "Parameter value for 'steering_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(steering_policy_id)

  path = '/steeringPolicies/{steeringPolicyId}'.sub('{steeringPolicyId}', steering_policy_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'if-unmodified-since'] = opts[:if_unmodified_since] if opts[:if_unmodified_since]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#delete_steering_policy') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_steering_policy_attachment(steering_policy_attachment_id, opts = {}) ⇒ Response

Deletes the specified steering policy attachment. A 204 response indicates that the delete has been successful.

Parameters:

  • steering_policy_attachment_id (String)

    The OCID of the target steering policy attachment.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    The If-Match header field makes the request method conditional on the existence of at least one current representation of the target resource, when the field-value is *, or having a current representation of the target resource that has an entity-tag matching a member of the list of entity-tags provided in the field-value. (default to nil)

  • :if_unmodified_since (String)

    The If-Unmodified-Since header field makes the request method conditional on the selected representation's last modification date being earlier than or equal to the date provided in the field-value. This field accomplishes the same purpose as If-Match for cases where the user agent does not have an entity-tag for the representation. (default to nil)

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. (default to nil)

Returns:

  • (Response)

    A Response object with data of type nil



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
# File 'lib/oci/dns/dns_client.rb', line 833

def delete_steering_policy_attachment(steering_policy_attachment_id, opts = {})
  logger.debug 'Calling operation DnsClient#delete_steering_policy_attachment.' if logger

  raise "Missing the required parameter 'steering_policy_attachment_id' when calling delete_steering_policy_attachment." if steering_policy_attachment_id.nil?
  raise "Parameter value for 'steering_policy_attachment_id' must not be blank" if OCI::Internal::Util.blank_string?(steering_policy_attachment_id)

  path = '/steeringPolicyAttachments/{steeringPolicyAttachmentId}'.sub('{steeringPolicyAttachmentId}', steering_policy_attachment_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'if-unmodified-since'] = opts[:if_unmodified_since] if opts[:if_unmodified_since]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#delete_steering_policy_attachment') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_tsig_key(tsig_key_id, opts = {}) ⇒ Response

Deletes the specified TSIG key.

Parameters:

  • tsig_key_id (String)

    The OCID of the target TSIG key.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    The If-Match header field makes the request method conditional on the existence of at least one current representation of the target resource, when the field-value is *, or having a current representation of the target resource that has an entity-tag matching a member of the list of entity-tags provided in the field-value. (default to nil)

  • :if_unmodified_since (String)

    The If-Unmodified-Since header field makes the request method conditional on the selected representation's last modification date being earlier than or equal to the date provided in the field-value. This field accomplishes the same purpose as If-Match for cases where the user agent does not have an entity-tag for the representation. (default to nil)

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. (default to nil)

Returns:

  • (Response)

    A Response object with data of type nil



903
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
# File 'lib/oci/dns/dns_client.rb', line 903

def delete_tsig_key(tsig_key_id, opts = {})
  logger.debug 'Calling operation DnsClient#delete_tsig_key.' if logger

  raise "Missing the required parameter 'tsig_key_id' when calling delete_tsig_key." if tsig_key_id.nil?
  raise "Parameter value for 'tsig_key_id' must not be blank" if OCI::Internal::Util.blank_string?(tsig_key_id)

  path = '/tsigKeys/{tsigKeyId}'.sub('{tsigKeyId}', tsig_key_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'if-unmodified-since'] = opts[:if_unmodified_since] if opts[:if_unmodified_since]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#delete_tsig_key') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_zone(zone_name_or_id, opts = {}) ⇒ Response

Deletes the specified zone and all its steering policy attachments. A 204 response indicates that zone has been successfully deleted.

Parameters:

  • zone_name_or_id (String)

    The name or OCID of the target zone.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    The If-Match header field makes the request method conditional on the existence of at least one current representation of the target resource, when the field-value is *, or having a current representation of the target resource that has an entity-tag matching a member of the list of entity-tags provided in the field-value. (default to nil)

  • :if_unmodified_since (String)

    The If-Unmodified-Since header field makes the request method conditional on the selected representation's last modification date being earlier than or equal to the date provided in the field-value. This field accomplishes the same purpose as If-Match for cases where the user agent does not have an entity-tag for the representation. (default to nil)

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. (default to nil)

  • :compartment_id (String)

    The OCID of the compartment the resource belongs to. (default to nil)

Returns:

  • (Response)

    A Response object with data of type nil



975
976
977
978
979
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
# File 'lib/oci/dns/dns_client.rb', line 975

def delete_zone(zone_name_or_id, opts = {})
  logger.debug 'Calling operation DnsClient#delete_zone.' if logger

  raise "Missing the required parameter 'zone_name_or_id' when calling delete_zone." if zone_name_or_id.nil?
  raise "Parameter value for 'zone_name_or_id' must not be blank" if OCI::Internal::Util.blank_string?(zone_name_or_id)

  path = '/zones/{zoneNameOrId}'.sub('{zoneNameOrId}', zone_name_or_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'if-unmodified-since'] = opts[:if_unmodified_since] if opts[:if_unmodified_since]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#delete_zone') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_domain_records(zone_name_or_id, domain, opts = {}) ⇒ Response

Gets a list of all records at the specified zone and domain. The results are sorted by rtype in alphabetical order by default. You can optionally filter and/or sort the results using the listed parameters.

Parameters:

  • zone_name_or_id (String)

    The name or OCID of the target zone.

  • domain (String)

    The target fully-qualified domain name (FQDN) within the target zone.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_none_match (String)

    The If-None-Match header field makes the request method conditional on the absence of any current representation of the target resource, when the field-value is *, or having a selected representation with an entity-tag that does not match any of those listed in the field-value. (default to nil)

  • :if_modified_since (String)

    The If-Modified-Since header field makes a GET or HEAD request method conditional on the selected representation's modification date being more recent than the date provided in the field-value. Transfer of the selected representation's data is avoided if that data has not changed. (default to nil)

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. (default to nil)

  • :limit (Integer)

    The maximum number of items to return in a page of the collection. (default to 50)

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call. (default to nil)

  • :zone_version (String)

    The version of the zone for which data is requested. (default to nil)

  • :rtype (String)

    Search by record type. Will match any record whose type (case-insensitive) equals the provided value. (default to nil)

  • :sort_by (String)

    The field by which to sort records. (default to rtype) Allowed values are: rtype, ttl

  • :sort_order (String)

    The order to sort the resources. (default to DESC)

  • :compartment_id (String)

    The OCID of the compartment the resource belongs to. (default to nil)

Returns:



1061
1062
1063
1064
1065
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
# File 'lib/oci/dns/dns_client.rb', line 1061

def get_domain_records(zone_name_or_id, domain, opts = {})
  logger.debug 'Calling operation DnsClient#get_domain_records.' if logger

  raise "Missing the required parameter 'zone_name_or_id' when calling get_domain_records." if zone_name_or_id.nil?
  raise "Missing the required parameter 'domain' when calling get_domain_records." if domain.nil?

  if opts[:sort_by] && !%w[rtype ttl].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of rtype, ttl.'
  end

  if opts[:sort_order] && !OCI::Dns::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::Dns::Models::SORT_ORDER_ENUM.'
  end
  raise "Parameter value for 'zone_name_or_id' must not be blank" if OCI::Internal::Util.blank_string?(zone_name_or_id)
  raise "Parameter value for 'domain' must not be blank" if OCI::Internal::Util.blank_string?(domain)

  path = '/zones/{zoneNameOrId}/records/{domain}'.sub('{zoneNameOrId}', zone_name_or_id.to_s).sub('{domain}', domain.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:zoneVersion] = opts[:zone_version] if opts[:zone_version]
  query_params[:rtype] = opts[:rtype] if opts[:rtype]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-none-match'] = opts[:if_none_match] if opts[:if_none_match]
  header_params[:'if-modified-since'] = opts[:if_modified_since] if opts[:if_modified_since]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#get_domain_records') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Dns::Models::RecordCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_rr_set(zone_name_or_id, domain, rtype, opts = {}) ⇒ Response

Gets a list of all records in the specified RRSet. The results are sorted by recordHash by default.

Parameters:

  • zone_name_or_id (String)

    The name or OCID of the target zone.

  • domain (String)

    The target fully-qualified domain name (FQDN) within the target zone.

  • rtype (String)

    The type of the target RRSet within the target zone.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_none_match (String)

    The If-None-Match header field makes the request method conditional on the absence of any current representation of the target resource, when the field-value is *, or having a selected representation with an entity-tag that does not match any of those listed in the field-value. (default to nil)

  • :if_modified_since (String)

    The If-Modified-Since header field makes a GET or HEAD request method conditional on the selected representation's modification date being more recent than the date provided in the field-value. Transfer of the selected representation's data is avoided if that data has not changed. (default to nil)

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. (default to nil)

  • :limit (Integer)

    The maximum number of items to return in a page of the collection. (default to 50)

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call. (default to nil)

  • :zone_version (String)

    The version of the zone for which data is requested. (default to nil)

  • :compartment_id (String)

    The OCID of the compartment the resource belongs to. (default to nil)

Returns:



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
# File 'lib/oci/dns/dns_client.rb', line 1157

def get_rr_set(zone_name_or_id, domain, rtype, opts = {})
  logger.debug 'Calling operation DnsClient#get_rr_set.' if logger

  raise "Missing the required parameter 'zone_name_or_id' when calling get_rr_set." if zone_name_or_id.nil?
  raise "Missing the required parameter 'domain' when calling get_rr_set." if domain.nil?
  raise "Missing the required parameter 'rtype' when calling get_rr_set." if rtype.nil?
  raise "Parameter value for 'zone_name_or_id' must not be blank" if OCI::Internal::Util.blank_string?(zone_name_or_id)
  raise "Parameter value for 'domain' must not be blank" if OCI::Internal::Util.blank_string?(domain)
  raise "Parameter value for 'rtype' must not be blank" if OCI::Internal::Util.blank_string?(rtype)

  path = '/zones/{zoneNameOrId}/records/{domain}/{rtype}'.sub('{zoneNameOrId}', zone_name_or_id.to_s).sub('{domain}', domain.to_s).sub('{rtype}', rtype.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:zoneVersion] = opts[:zone_version] if opts[:zone_version]
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-none-match'] = opts[:if_none_match] if opts[:if_none_match]
  header_params[:'if-modified-since'] = opts[:if_modified_since] if opts[:if_modified_since]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#get_rr_set') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Dns::Models::RRSet'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_steering_policy(steering_policy_id, opts = {}) ⇒ Response

Gets information about the specified steering policy.

Parameters:

  • steering_policy_id (String)

    The OCID of the target steering policy.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_none_match (String)

    The If-None-Match header field makes the request method conditional on the absence of any current representation of the target resource, when the field-value is *, or having a selected representation with an entity-tag that does not match any of those listed in the field-value. (default to nil)

  • :if_modified_since (String)

    The If-Modified-Since header field makes a GET or HEAD request method conditional on the selected representation's modification date being more recent than the date provided in the field-value. Transfer of the selected representation's data is avoided if that data has not changed. (default to nil)

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. (default to nil)

Returns:



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
# File 'lib/oci/dns/dns_client.rb', line 1234

def get_steering_policy(steering_policy_id, opts = {})
  logger.debug 'Calling operation DnsClient#get_steering_policy.' if logger

  raise "Missing the required parameter 'steering_policy_id' when calling get_steering_policy." if steering_policy_id.nil?
  raise "Parameter value for 'steering_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(steering_policy_id)

  path = '/steeringPolicies/{steeringPolicyId}'.sub('{steeringPolicyId}', steering_policy_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-none-match'] = opts[:if_none_match] if opts[:if_none_match]
  header_params[:'if-modified-since'] = opts[:if_modified_since] if opts[:if_modified_since]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#get_steering_policy') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Dns::Models::SteeringPolicy'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_steering_policy_attachment(steering_policy_attachment_id, opts = {}) ⇒ Response

Gets information about the specified steering policy attachment.

Parameters:

  • steering_policy_attachment_id (String)

    The OCID of the target steering policy attachment.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_none_match (String)

    The If-None-Match header field makes the request method conditional on the absence of any current representation of the target resource, when the field-value is *, or having a selected representation with an entity-tag that does not match any of those listed in the field-value. (default to nil)

  • :if_modified_since (String)

    The If-Modified-Since header field makes a GET or HEAD request method conditional on the selected representation's modification date being more recent than the date provided in the field-value. Transfer of the selected representation's data is avoided if that data has not changed. (default to nil)

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. (default to nil)

Returns:



1303
1304
1305
1306
1307
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
# File 'lib/oci/dns/dns_client.rb', line 1303

def get_steering_policy_attachment(steering_policy_attachment_id, opts = {})
  logger.debug 'Calling operation DnsClient#get_steering_policy_attachment.' if logger

  raise "Missing the required parameter 'steering_policy_attachment_id' when calling get_steering_policy_attachment." if steering_policy_attachment_id.nil?
  raise "Parameter value for 'steering_policy_attachment_id' must not be blank" if OCI::Internal::Util.blank_string?(steering_policy_attachment_id)

  path = '/steeringPolicyAttachments/{steeringPolicyAttachmentId}'.sub('{steeringPolicyAttachmentId}', steering_policy_attachment_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-none-match'] = opts[:if_none_match] if opts[:if_none_match]
  header_params[:'if-modified-since'] = opts[:if_modified_since] if opts[:if_modified_since]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#get_steering_policy_attachment') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Dns::Models::SteeringPolicyAttachment'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_tsig_key(tsig_key_id, opts = {}) ⇒ Response

Gets information about the specified TSIG key.

Parameters:

  • tsig_key_id (String)

    The OCID of the target TSIG key.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_none_match (String)

    The If-None-Match header field makes the request method conditional on the absence of any current representation of the target resource, when the field-value is *, or having a selected representation with an entity-tag that does not match any of those listed in the field-value. (default to nil)

  • :if_modified_since (String)

    The If-Modified-Since header field makes a GET or HEAD request method conditional on the selected representation's modification date being more recent than the date provided in the field-value. Transfer of the selected representation's data is avoided if that data has not changed. (default to nil)

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. (default to nil)

Returns:



1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
# File 'lib/oci/dns/dns_client.rb', line 1372

def get_tsig_key(tsig_key_id, opts = {})
  logger.debug 'Calling operation DnsClient#get_tsig_key.' if logger

  raise "Missing the required parameter 'tsig_key_id' when calling get_tsig_key." if tsig_key_id.nil?
  raise "Parameter value for 'tsig_key_id' must not be blank" if OCI::Internal::Util.blank_string?(tsig_key_id)

  path = '/tsigKeys/{tsigKeyId}'.sub('{tsigKeyId}', tsig_key_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-none-match'] = opts[:if_none_match] if opts[:if_none_match]
  header_params[:'if-modified-since'] = opts[:if_modified_since] if opts[:if_modified_since]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#get_tsig_key') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Dns::Models::TsigKey'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_zone(zone_name_or_id, opts = {}) ⇒ Response

Gets information about the specified zone, including its creation date, zone type, and serial.

Parameters:

  • zone_name_or_id (String)

    The name or OCID of the target zone.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_none_match (String)

    The If-None-Match header field makes the request method conditional on the absence of any current representation of the target resource, when the field-value is *, or having a selected representation with an entity-tag that does not match any of those listed in the field-value. (default to nil)

  • :if_modified_since (String)

    The If-Modified-Since header field makes a GET or HEAD request method conditional on the selected representation's modification date being more recent than the date provided in the field-value. Transfer of the selected representation's data is avoided if that data has not changed. (default to nil)

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. (default to nil)

  • :compartment_id (String)

    The OCID of the compartment the resource belongs to. (default to nil)

Returns:



1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
# File 'lib/oci/dns/dns_client.rb', line 1443

def get_zone(zone_name_or_id, opts = {})
  logger.debug 'Calling operation DnsClient#get_zone.' if logger

  raise "Missing the required parameter 'zone_name_or_id' when calling get_zone." if zone_name_or_id.nil?
  raise "Parameter value for 'zone_name_or_id' must not be blank" if OCI::Internal::Util.blank_string?(zone_name_or_id)

  path = '/zones/{zoneNameOrId}'.sub('{zoneNameOrId}', zone_name_or_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-none-match'] = opts[:if_none_match] if opts[:if_none_match]
  header_params[:'if-modified-since'] = opts[:if_modified_since] if opts[:if_modified_since]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#get_zone') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Dns::Models::Zone'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_zone_records(zone_name_or_id, opts = {}) ⇒ Response

Gets all records in the specified zone. The results are sorted by domain in alphabetical order by default. For more information about records, see Resource Record (RR) TYPEs.

Parameters:

  • zone_name_or_id (String)

    The name or OCID of the target zone.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_none_match (String)

    The If-None-Match header field makes the request method conditional on the absence of any current representation of the target resource, when the field-value is *, or having a selected representation with an entity-tag that does not match any of those listed in the field-value. (default to nil)

  • :if_modified_since (String)

    The If-Modified-Since header field makes a GET or HEAD request method conditional on the selected representation's modification date being more recent than the date provided in the field-value. Transfer of the selected representation's data is avoided if that data has not changed. (default to nil)

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. (default to nil)

  • :limit (Integer)

    The maximum number of items to return in a page of the collection. (default to 50)

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call. (default to nil)

  • :zone_version (String)

    The version of the zone for which data is requested. (default to nil)

  • :domain (String)

    Search by domain. Will match any record whose domain (case-insensitive) equals the provided value. (default to nil)

  • :domain_contains (String)

    Search by domain. Will match any record whose domain (case-insensitive) contains the provided value. (default to nil)

  • :rtype (String)

    Search by record type. Will match any record whose type (case-insensitive) equals the provided value. (default to nil)

  • :sort_by (String)

    The field by which to sort records. (default to domain) Allowed values are: domain, rtype, ttl

  • :sort_order (String)

    The order to sort the resources. (default to DESC)

  • :compartment_id (String)

    The OCID of the compartment the resource belongs to. (default to nil)

Returns:



1535
1536
1537
1538
1539
1540
1541
1542
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
# File 'lib/oci/dns/dns_client.rb', line 1535

def get_zone_records(zone_name_or_id, opts = {})
  logger.debug 'Calling operation DnsClient#get_zone_records.' if logger

  raise "Missing the required parameter 'zone_name_or_id' when calling get_zone_records." if zone_name_or_id.nil?

  if opts[:sort_by] && !%w[domain rtype ttl].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of domain, rtype, ttl.'
  end

  if opts[:sort_order] && !OCI::Dns::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::Dns::Models::SORT_ORDER_ENUM.'
  end
  raise "Parameter value for 'zone_name_or_id' must not be blank" if OCI::Internal::Util.blank_string?(zone_name_or_id)

  path = '/zones/{zoneNameOrId}/records'.sub('{zoneNameOrId}', zone_name_or_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:zoneVersion] = opts[:zone_version] if opts[:zone_version]
  query_params[:domain] = opts[:domain] if opts[:domain]
  query_params[:domainContains] = opts[:domain_contains] if opts[:domain_contains]
  query_params[:rtype] = opts[:rtype] if opts[:rtype]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-none-match'] = opts[:if_none_match] if opts[:if_none_match]
  header_params[:'if-modified-since'] = opts[:if_modified_since] if opts[:if_modified_since]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#get_zone_records') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Dns::Models::RecordCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_steering_policies(compartment_id, opts = {}) ⇒ Response

Gets a list of all steering policies in the specified compartment.

Parameters:

  • compartment_id (String)

    The OCID of the compartment the resource belongs to.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. (default to nil)

  • :limit (Integer)

    The maximum number of items to return in a page of the collection. (default to 50)

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call. (default to nil)

  • :id (String)

    The OCID of a resource. (default to nil)

  • :display_name (String)

    The displayName of a resource. (default to nil)

  • :display_name_contains (String)

    The partial displayName of a resource. Will match any resource whose name (case-insensitive) contains the provided value. (default to nil)

  • :health_check_monitor_id (String)

    Search by health check monitor OCID. Will match any resource whose health check monitor ID matches the provided value. (default to nil)

  • :time_created_greater_than_or_equal_to (DateTime)

    An RFC 3339 timestamp that states all returned resources were created on or after the indicated time. (default to nil)

  • :time_created_less_than (DateTime)

    An RFC 3339 timestamp that states all returned resources were created before the indicated time. (default to nil)

  • :template (String)

    Search by steering template type. Will match any resource whose template type matches the provided value. (default to nil)

  • :lifecycle_state (String)

    The state of a resource. (default to ACTIVE)

  • :sort_by (String)

    The field by which to sort steering policies. If unspecified, defaults to timeCreated. (default to timeCreated) Allowed values are: displayName, timeCreated, template

  • :sort_order (String)

    The order to sort the resources. (default to DESC)

Returns:



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
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
# File 'lib/oci/dns/dns_client.rb', line 1637

def list_steering_policies(compartment_id, opts = {})
  logger.debug 'Calling operation DnsClient#list_steering_policies.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_steering_policies." if compartment_id.nil?

  if opts[:lifecycle_state] && !OCI::Dns::Models::SteeringPolicySummary::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Dns::Models::SteeringPolicySummary::LIFECYCLE_STATE_ENUM.'
  end

  if opts[:sort_by] && !%w[displayName timeCreated template].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of displayName, timeCreated, template.'
  end

  if opts[:sort_order] && !OCI::Dns::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::Dns::Models::SORT_ORDER_ENUM.'
  end

  path = '/steeringPolicies'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:displayNameContains] = opts[:display_name_contains] if opts[:display_name_contains]
  query_params[:healthCheckMonitorId] = opts[:health_check_monitor_id] if opts[:health_check_monitor_id]
  query_params[:timeCreatedGreaterThanOrEqualTo] = opts[:time_created_greater_than_or_equal_to] if opts[:time_created_greater_than_or_equal_to]
  query_params[:timeCreatedLessThan] = opts[:time_created_less_than] if opts[:time_created_less_than]
  query_params[:template] = opts[:template] if opts[:template]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#list_steering_policies') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Dns::Models::SteeringPolicySummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_steering_policy_attachments(compartment_id, opts = {}) ⇒ Response

Lists the steering policy attachments in the specified compartment.

Parameters:

  • compartment_id (String)

    The OCID of the compartment the resource belongs to.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. (default to nil)

  • :limit (Integer)

    The maximum number of items to return in a page of the collection. (default to 50)

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call. (default to nil)

  • :id (String)

    The OCID of a resource. (default to nil)

  • :display_name (String)

    The displayName of a resource. (default to nil)

  • :steering_policy_id (String)

    Search by steering policy OCID. Will match any resource whose steering policy ID matches the provided value. (default to nil)

  • :zone_id (String)

    Search by zone OCID. Will match any resource whose zone ID matches the provided value. (default to nil)

  • :domain (String)

    Search by domain. Will match any record whose domain (case-insensitive) equals the provided value. (default to nil)

  • :domain_contains (String)

    Search by domain. Will match any record whose domain (case-insensitive) contains the provided value. (default to nil)

  • :time_created_greater_than_or_equal_to (DateTime)

    An RFC 3339 timestamp that states all returned resources were created on or after the indicated time. (default to nil)

  • :time_created_less_than (DateTime)

    An RFC 3339 timestamp that states all returned resources were created before the indicated time. (default to nil)

  • :lifecycle_state (String)

    The state of a resource. (default to ACTIVE)

  • :sort_by (String)

    The field by which to sort steering policy attachments. If unspecified, defaults to timeCreated. (default to timeCreated) Allowed values are: displayName, timeCreated, domainName

  • :sort_order (String)

    The order to sort the resources. (default to DESC)

Returns:



1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
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
# File 'lib/oci/dns/dns_client.rb', line 1747

def list_steering_policy_attachments(compartment_id, opts = {})
  logger.debug 'Calling operation DnsClient#list_steering_policy_attachments.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_steering_policy_attachments." if compartment_id.nil?

  if opts[:lifecycle_state] && !OCI::Dns::Models::SteeringPolicyAttachmentSummary::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Dns::Models::SteeringPolicyAttachmentSummary::LIFECYCLE_STATE_ENUM.'
  end

  if opts[:sort_by] && !%w[displayName timeCreated domainName].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of displayName, timeCreated, domainName.'
  end

  if opts[:sort_order] && !OCI::Dns::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::Dns::Models::SORT_ORDER_ENUM.'
  end

  path = '/steeringPolicyAttachments'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:steeringPolicyId] = opts[:steering_policy_id] if opts[:steering_policy_id]
  query_params[:zoneId] = opts[:zone_id] if opts[:zone_id]
  query_params[:domain] = opts[:domain] if opts[:domain]
  query_params[:domainContains] = opts[:domain_contains] if opts[:domain_contains]
  query_params[:timeCreatedGreaterThanOrEqualTo] = opts[:time_created_greater_than_or_equal_to] if opts[:time_created_greater_than_or_equal_to]
  query_params[:timeCreatedLessThan] = opts[:time_created_less_than] if opts[:time_created_less_than]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#list_steering_policy_attachments') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Dns::Models::SteeringPolicyAttachmentSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_tsig_keys(compartment_id, opts = {}) ⇒ Response

Gets a list of all TSIG keys in the specified compartment.

Parameters:

  • compartment_id (String)

    The OCID of the compartment the resource belongs to.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. (default to nil)

  • :limit (Integer)

    The maximum number of items to return in a page of the collection. (default to 50)

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call. (default to nil)

  • :id (String)

    The OCID of a resource. (default to nil)

  • :name (String)

    The name of a resource. (default to nil)

  • :lifecycle_state (String)

    The state of a resource. (default to nil)

  • :sort_by (String)

    The field by which to sort TSIG keys. If unspecified, defaults to timeCreated. (default to timeCreated) Allowed values are: name, timeCreated

  • :sort_order (String)

    The order to sort the resources. (default to DESC)

Returns:



1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
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
# File 'lib/oci/dns/dns_client.rb', line 1840

def list_tsig_keys(compartment_id, opts = {})
  logger.debug 'Calling operation DnsClient#list_tsig_keys.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_tsig_keys." if compartment_id.nil?

  if opts[:lifecycle_state] && !OCI::Dns::Models::TsigKeySummary::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Dns::Models::TsigKeySummary::LIFECYCLE_STATE_ENUM.'
  end

  if opts[:sort_by] && !%w[name timeCreated].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of name, timeCreated.'
  end

  if opts[:sort_order] && !OCI::Dns::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::Dns::Models::SORT_ORDER_ENUM.'
  end

  path = '/tsigKeys'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:name] = opts[:name] if opts[:name]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#list_tsig_keys') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Dns::Models::TsigKeySummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_zones(compartment_id, opts = {}) ⇒ Response

Gets a list of all zones in the specified compartment. The collection can be filtered by name, time created, and zone type.

Parameters:

  • compartment_id (String)

    The OCID of the compartment the resource belongs to.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. (default to nil)

  • :limit (Integer)

    The maximum number of items to return in a page of the collection. (default to 50)

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call. (default to nil)

  • :name (String)

    A case-sensitive filter for zone names. Will match any zone with a name that equals the provided value. (default to nil)

  • :name_contains (String)

    Search by zone name. Will match any zone whose name (case-insensitive) contains the provided value. (default to nil)

  • :zone_type (String)

    Search by zone type, PRIMARY or SECONDARY. Will match any zone whose type equals the provided value. (default to nil) Allowed values are: PRIMARY, SECONDARY

  • :time_created_greater_than_or_equal_to (DateTime)

    An RFC 3339 timestamp that states all returned resources were created on or after the indicated time. (default to nil)

  • :time_created_less_than (DateTime)

    An RFC 3339 timestamp that states all returned resources were created before the indicated time. (default to nil)

  • :lifecycle_state (String)

    The state of a resource. (default to ACTIVE) Allowed values are: ACTIVE, CREATING, DELETED, DELETING, FAILED

  • :sort_by (String)

    The field by which to sort zones. (default to timeCreated) Allowed values are: name, zoneType, timeCreated

  • :sort_order (String)

    The order to sort the resources. (default to DESC)

Returns:



1943
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
# File 'lib/oci/dns/dns_client.rb', line 1943

def list_zones(compartment_id, opts = {})
  logger.debug 'Calling operation DnsClient#list_zones.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_zones." if compartment_id.nil?

  if opts[:zone_type] && !%w[PRIMARY SECONDARY].include?(opts[:zone_type])
    raise 'Invalid value for "zone_type", must be one of PRIMARY, SECONDARY.'
  end

  if opts[:lifecycle_state] && !%w[ACTIVE CREATING DELETED DELETING FAILED].include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of ACTIVE, CREATING, DELETED, DELETING, FAILED.'
  end

  if opts[:sort_by] && !%w[name zoneType timeCreated].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of name, zoneType, timeCreated.'
  end

  if opts[:sort_order] && !OCI::Dns::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::Dns::Models::SORT_ORDER_ENUM.'
  end

  path = '/zones'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:name] = opts[:name] if opts[:name]
  query_params[:nameContains] = opts[:name_contains] if opts[:name_contains]
  query_params[:zoneType] = opts[:zone_type] if opts[:zone_type]
  query_params[:timeCreatedGreaterThanOrEqualTo] = opts[:time_created_greater_than_or_equal_to] if opts[:time_created_greater_than_or_equal_to]
  query_params[:timeCreatedLessThan] = opts[:time_created_less_than] if opts[:time_created_less_than]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#list_zones') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Dns::Models::ZoneSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#loggerLogger

Returns The logger for this client. May be nil.

Returns:

  • (Logger)

    The logger for this client. May be nil.



102
103
104
# File 'lib/oci/dns/dns_client.rb', line 102

def logger
  @api_client.config.logger
end

#patch_domain_records(zone_name_or_id, domain, patch_domain_records_details, opts = {}) ⇒ Response

Updates records in the specified zone at a domain. You can update one record or all records for the specified zone depending on the changes provided in the request body. You can also add or remove records using this function.

Parameters:

  • zone_name_or_id (String)

    The name or OCID of the target zone.

  • domain (String)

    The target fully-qualified domain name (FQDN) within the target zone.

  • patch_domain_records_details (OCI::Dns::Models::PatchDomainRecordsDetails)

    Operations describing how to modify the collection of records.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    The If-Match header field makes the request method conditional on the existence of at least one current representation of the target resource, when the field-value is *, or having a current representation of the target resource that has an entity-tag matching a member of the list of entity-tags provided in the field-value. (default to nil)

  • :if_unmodified_since (String)

    The If-Unmodified-Since header field makes the request method conditional on the selected representation's last modification date being earlier than or equal to the date provided in the field-value. This field accomplishes the same purpose as If-Match for cases where the user agent does not have an entity-tag for the representation. (default to nil)

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. (default to nil)

  • :compartment_id (String)

    The OCID of the compartment the resource belongs to. (default to nil)

Returns:



2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
# File 'lib/oci/dns/dns_client.rb', line 2044

def patch_domain_records(zone_name_or_id, domain, patch_domain_records_details, opts = {})
  logger.debug 'Calling operation DnsClient#patch_domain_records.' if logger

  raise "Missing the required parameter 'zone_name_or_id' when calling patch_domain_records." if zone_name_or_id.nil?
  raise "Missing the required parameter 'domain' when calling patch_domain_records." if domain.nil?
  raise "Missing the required parameter 'patch_domain_records_details' when calling patch_domain_records." if patch_domain_records_details.nil?
  raise "Parameter value for 'zone_name_or_id' must not be blank" if OCI::Internal::Util.blank_string?(zone_name_or_id)
  raise "Parameter value for 'domain' must not be blank" if OCI::Internal::Util.blank_string?(domain)

  path = '/zones/{zoneNameOrId}/records/{domain}'.sub('{zoneNameOrId}', zone_name_or_id.to_s).sub('{domain}', domain.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'if-unmodified-since'] = opts[:if_unmodified_since] if opts[:if_unmodified_since]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(patch_domain_records_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#patch_domain_records') do
    @api_client.call_api(
      :PATCH,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Dns::Models::RecordCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#patch_rr_set(zone_name_or_id, domain, rtype, patch_rr_set_details, opts = {}) ⇒ Response

Updates records in the specified RRSet.

Parameters:

  • zone_name_or_id (String)

    The name or OCID of the target zone.

  • domain (String)

    The target fully-qualified domain name (FQDN) within the target zone.

  • rtype (String)

    The type of the target RRSet within the target zone.

  • patch_rr_set_details (OCI::Dns::Models::PatchRRSetDetails)

    Operations describing how to modify the collection of records.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    The If-Match header field makes the request method conditional on the existence of at least one current representation of the target resource, when the field-value is *, or having a current representation of the target resource that has an entity-tag matching a member of the list of entity-tags provided in the field-value. (default to nil)

  • :if_unmodified_since (String)

    The If-Unmodified-Since header field makes the request method conditional on the selected representation's last modification date being earlier than or equal to the date provided in the field-value. This field accomplishes the same purpose as If-Match for cases where the user agent does not have an entity-tag for the representation. (default to nil)

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. (default to nil)

  • :compartment_id (String)

    The OCID of the compartment the resource belongs to. (default to nil)

Returns:



2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
# File 'lib/oci/dns/dns_client.rb', line 2122

def patch_rr_set(zone_name_or_id, domain, rtype, patch_rr_set_details, opts = {})
  logger.debug 'Calling operation DnsClient#patch_rr_set.' if logger

  raise "Missing the required parameter 'zone_name_or_id' when calling patch_rr_set." if zone_name_or_id.nil?
  raise "Missing the required parameter 'domain' when calling patch_rr_set." if domain.nil?
  raise "Missing the required parameter 'rtype' when calling patch_rr_set." if rtype.nil?
  raise "Missing the required parameter 'patch_rr_set_details' when calling patch_rr_set." if patch_rr_set_details.nil?
  raise "Parameter value for 'zone_name_or_id' must not be blank" if OCI::Internal::Util.blank_string?(zone_name_or_id)
  raise "Parameter value for 'domain' must not be blank" if OCI::Internal::Util.blank_string?(domain)
  raise "Parameter value for 'rtype' must not be blank" if OCI::Internal::Util.blank_string?(rtype)

  path = '/zones/{zoneNameOrId}/records/{domain}/{rtype}'.sub('{zoneNameOrId}', zone_name_or_id.to_s).sub('{domain}', domain.to_s).sub('{rtype}', rtype.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'if-unmodified-since'] = opts[:if_unmodified_since] if opts[:if_unmodified_since]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(patch_rr_set_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#patch_rr_set') do
    @api_client.call_api(
      :PATCH,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Dns::Models::RecordCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#patch_zone_records(zone_name_or_id, patch_zone_records_details, opts = {}) ⇒ Response

Updates a collection of records in the specified zone. You can update one record or all records for the specified zone depending on the changes provided in the request body. You can also add or remove records using this function.

Parameters:

  • zone_name_or_id (String)

    The name or OCID of the target zone.

  • patch_zone_records_details (OCI::Dns::Models::PatchZoneRecordsDetails)

    The operations describing how to modify the collection of records.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    The If-Match header field makes the request method conditional on the existence of at least one current representation of the target resource, when the field-value is *, or having a current representation of the target resource that has an entity-tag matching a member of the list of entity-tags provided in the field-value. (default to nil)

  • :if_unmodified_since (String)

    The If-Unmodified-Since header field makes the request method conditional on the selected representation's last modification date being earlier than or equal to the date provided in the field-value. This field accomplishes the same purpose as If-Match for cases where the user agent does not have an entity-tag for the representation. (default to nil)

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. (default to nil)

  • :compartment_id (String)

    The OCID of the compartment the resource belongs to. (default to nil)

Returns:



2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
# File 'lib/oci/dns/dns_client.rb', line 2205

def patch_zone_records(zone_name_or_id, patch_zone_records_details, opts = {})
  logger.debug 'Calling operation DnsClient#patch_zone_records.' if logger

  raise "Missing the required parameter 'zone_name_or_id' when calling patch_zone_records." if zone_name_or_id.nil?
  raise "Missing the required parameter 'patch_zone_records_details' when calling patch_zone_records." if patch_zone_records_details.nil?
  raise "Parameter value for 'zone_name_or_id' must not be blank" if OCI::Internal::Util.blank_string?(zone_name_or_id)

  path = '/zones/{zoneNameOrId}/records'.sub('{zoneNameOrId}', zone_name_or_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'if-unmodified-since'] = opts[:if_unmodified_since] if opts[:if_unmodified_since]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(patch_zone_records_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#patch_zone_records') do
    @api_client.call_api(
      :PATCH,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Dns::Models::RecordCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_domain_records(zone_name_or_id, domain, update_domain_records_details, opts = {}) ⇒ Response

Replaces records in the specified zone at a domain with the records specified in the request body. If a specified record does not exist, it will be created. If the record exists, then it will be updated to represent the record in the body of the request. If a record in the zone does not exist in the request body, the record will be removed from the zone.

Parameters:

  • zone_name_or_id (String)

    The name or OCID of the target zone.

  • domain (String)

    The target fully-qualified domain name (FQDN) within the target zone.

  • update_domain_records_details (OCI::Dns::Models::UpdateDomainRecordsDetails)

    A full list of records for the domain.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    The If-Match header field makes the request method conditional on the existence of at least one current representation of the target resource, when the field-value is *, or having a current representation of the target resource that has an entity-tag matching a member of the list of entity-tags provided in the field-value. (default to nil)

  • :if_unmodified_since (String)

    The If-Unmodified-Since header field makes the request method conditional on the selected representation's last modification date being earlier than or equal to the date provided in the field-value. This field accomplishes the same purpose as If-Match for cases where the user agent does not have an entity-tag for the representation. (default to nil)

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. (default to nil)

  • :compartment_id (String)

    The OCID of the compartment the resource belongs to. (default to nil)

Returns:



2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
# File 'lib/oci/dns/dns_client.rb', line 2286

def update_domain_records(zone_name_or_id, domain, update_domain_records_details, opts = {})
  logger.debug 'Calling operation DnsClient#update_domain_records.' if logger

  raise "Missing the required parameter 'zone_name_or_id' when calling update_domain_records." if zone_name_or_id.nil?
  raise "Missing the required parameter 'domain' when calling update_domain_records." if domain.nil?
  raise "Missing the required parameter 'update_domain_records_details' when calling update_domain_records." if update_domain_records_details.nil?
  raise "Parameter value for 'zone_name_or_id' must not be blank" if OCI::Internal::Util.blank_string?(zone_name_or_id)
  raise "Parameter value for 'domain' must not be blank" if OCI::Internal::Util.blank_string?(domain)

  path = '/zones/{zoneNameOrId}/records/{domain}'.sub('{zoneNameOrId}', zone_name_or_id.to_s).sub('{domain}', domain.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'if-unmodified-since'] = opts[:if_unmodified_since] if opts[:if_unmodified_since]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_domain_records_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#update_domain_records') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Dns::Models::RecordCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_rr_set(zone_name_or_id, domain, rtype, update_rr_set_details, opts = {}) ⇒ Response

Replaces records in the specified RRSet.

Parameters:

  • zone_name_or_id (String)

    The name or OCID of the target zone.

  • domain (String)

    The target fully-qualified domain name (FQDN) within the target zone.

  • rtype (String)

    The type of the target RRSet within the target zone.

  • update_rr_set_details (OCI::Dns::Models::UpdateRRSetDetails)

    A full list of records for the RRSet.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    The If-Match header field makes the request method conditional on the existence of at least one current representation of the target resource, when the field-value is *, or having a current representation of the target resource that has an entity-tag matching a member of the list of entity-tags provided in the field-value. (default to nil)

  • :if_unmodified_since (String)

    The If-Unmodified-Since header field makes the request method conditional on the selected representation's last modification date being earlier than or equal to the date provided in the field-value. This field accomplishes the same purpose as If-Match for cases where the user agent does not have an entity-tag for the representation. (default to nil)

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. (default to nil)

  • :compartment_id (String)

    The OCID of the compartment the resource belongs to. (default to nil)

Returns:



2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
# File 'lib/oci/dns/dns_client.rb', line 2364

def update_rr_set(zone_name_or_id, domain, rtype, update_rr_set_details, opts = {})
  logger.debug 'Calling operation DnsClient#update_rr_set.' if logger

  raise "Missing the required parameter 'zone_name_or_id' when calling update_rr_set." if zone_name_or_id.nil?
  raise "Missing the required parameter 'domain' when calling update_rr_set." if domain.nil?
  raise "Missing the required parameter 'rtype' when calling update_rr_set." if rtype.nil?
  raise "Missing the required parameter 'update_rr_set_details' when calling update_rr_set." if update_rr_set_details.nil?
  raise "Parameter value for 'zone_name_or_id' must not be blank" if OCI::Internal::Util.blank_string?(zone_name_or_id)
  raise "Parameter value for 'domain' must not be blank" if OCI::Internal::Util.blank_string?(domain)
  raise "Parameter value for 'rtype' must not be blank" if OCI::Internal::Util.blank_string?(rtype)

  path = '/zones/{zoneNameOrId}/records/{domain}/{rtype}'.sub('{zoneNameOrId}', zone_name_or_id.to_s).sub('{domain}', domain.to_s).sub('{rtype}', rtype.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'if-unmodified-since'] = opts[:if_unmodified_since] if opts[:if_unmodified_since]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_rr_set_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#update_rr_set') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Dns::Models::RecordCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_steering_policy(steering_policy_id, update_steering_policy_details, opts = {}) ⇒ Response

Updates the configuration of the specified steering policy.

Parameters:

  • steering_policy_id (String)

    The OCID of the target steering policy.

  • update_steering_policy_details (OCI::Dns::Models::UpdateSteeringPolicyDetails)

    New data for the steering policy.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    The If-Match header field makes the request method conditional on the existence of at least one current representation of the target resource, when the field-value is *, or having a current representation of the target resource that has an entity-tag matching a member of the list of entity-tags provided in the field-value. (default to nil)

  • :if_unmodified_since (String)

    The If-Unmodified-Since header field makes the request method conditional on the selected representation's last modification date being earlier than or equal to the date provided in the field-value. This field accomplishes the same purpose as If-Match for cases where the user agent does not have an entity-tag for the representation. (default to nil)

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. (default to nil)

Returns:



2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
# File 'lib/oci/dns/dns_client.rb', line 2442

def update_steering_policy(steering_policy_id, update_steering_policy_details, opts = {})
  logger.debug 'Calling operation DnsClient#update_steering_policy.' if logger

  raise "Missing the required parameter 'steering_policy_id' when calling update_steering_policy." if steering_policy_id.nil?
  raise "Missing the required parameter 'update_steering_policy_details' when calling update_steering_policy." if update_steering_policy_details.nil?
  raise "Parameter value for 'steering_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(steering_policy_id)

  path = '/steeringPolicies/{steeringPolicyId}'.sub('{steeringPolicyId}', steering_policy_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'if-unmodified-since'] = opts[:if_unmodified_since] if opts[:if_unmodified_since]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_steering_policy_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#update_steering_policy') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Dns::Models::SteeringPolicy'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_steering_policy_attachment(steering_policy_attachment_id, update_steering_policy_attachment_details, opts = {}) ⇒ Response

Updates the specified steering policy attachment with your new information.

Parameters:

  • steering_policy_attachment_id (String)

    The OCID of the target steering policy attachment.

  • update_steering_policy_attachment_details (OCI::Dns::Models::UpdateSteeringPolicyAttachmentDetails)

    New data for the steering policy attachment.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    The If-Match header field makes the request method conditional on the existence of at least one current representation of the target resource, when the field-value is *, or having a current representation of the target resource that has an entity-tag matching a member of the list of entity-tags provided in the field-value. (default to nil)

  • :if_unmodified_since (String)

    The If-Unmodified-Since header field makes the request method conditional on the selected representation's last modification date being earlier than or equal to the date provided in the field-value. This field accomplishes the same purpose as If-Match for cases where the user agent does not have an entity-tag for the representation. (default to nil)

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. (default to nil)

Returns:



2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
# File 'lib/oci/dns/dns_client.rb', line 2515

def update_steering_policy_attachment(steering_policy_attachment_id, update_steering_policy_attachment_details, opts = {})
  logger.debug 'Calling operation DnsClient#update_steering_policy_attachment.' if logger

  raise "Missing the required parameter 'steering_policy_attachment_id' when calling update_steering_policy_attachment." if steering_policy_attachment_id.nil?
  raise "Missing the required parameter 'update_steering_policy_attachment_details' when calling update_steering_policy_attachment." if update_steering_policy_attachment_details.nil?
  raise "Parameter value for 'steering_policy_attachment_id' must not be blank" if OCI::Internal::Util.blank_string?(steering_policy_attachment_id)

  path = '/steeringPolicyAttachments/{steeringPolicyAttachmentId}'.sub('{steeringPolicyAttachmentId}', steering_policy_attachment_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'if-unmodified-since'] = opts[:if_unmodified_since] if opts[:if_unmodified_since]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_steering_policy_attachment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#update_steering_policy_attachment') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Dns::Models::SteeringPolicyAttachment'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_tsig_key(tsig_key_id, update_tsig_key_details, opts = {}) ⇒ Response

Updates the specified TSIG key.

Parameters:

  • tsig_key_id (String)

    The OCID of the target TSIG key.

  • update_tsig_key_details (OCI::Dns::Models::UpdateTsigKeyDetails)

    New data for the TSIG key.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    The If-Match header field makes the request method conditional on the existence of at least one current representation of the target resource, when the field-value is *, or having a current representation of the target resource that has an entity-tag matching a member of the list of entity-tags provided in the field-value. (default to nil)

  • :if_unmodified_since (String)

    The If-Unmodified-Since header field makes the request method conditional on the selected representation's last modification date being earlier than or equal to the date provided in the field-value. This field accomplishes the same purpose as If-Match for cases where the user agent does not have an entity-tag for the representation. (default to nil)

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. (default to nil)

Returns:



2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
# File 'lib/oci/dns/dns_client.rb', line 2588

def update_tsig_key(tsig_key_id, update_tsig_key_details, opts = {})
  logger.debug 'Calling operation DnsClient#update_tsig_key.' if logger

  raise "Missing the required parameter 'tsig_key_id' when calling update_tsig_key." if tsig_key_id.nil?
  raise "Missing the required parameter 'update_tsig_key_details' when calling update_tsig_key." if update_tsig_key_details.nil?
  raise "Parameter value for 'tsig_key_id' must not be blank" if OCI::Internal::Util.blank_string?(tsig_key_id)

  path = '/tsigKeys/{tsigKeyId}'.sub('{tsigKeyId}', tsig_key_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'if-unmodified-since'] = opts[:if_unmodified_since] if opts[:if_unmodified_since]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_tsig_key_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#update_tsig_key') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Dns::Models::TsigKey'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_zone(zone_name_or_id, update_zone_details, opts = {}) ⇒ Response

Updates the specified secondary zone with your new external master server information. For more information about secondary zone, see Manage DNS Service Zone.

Parameters:

  • zone_name_or_id (String)

    The name or OCID of the target zone.

  • update_zone_details (OCI::Dns::Models::UpdateZoneDetails)

    New data for the zone.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    The If-Match header field makes the request method conditional on the existence of at least one current representation of the target resource, when the field-value is *, or having a current representation of the target resource that has an entity-tag matching a member of the list of entity-tags provided in the field-value. (default to nil)

  • :if_unmodified_since (String)

    The If-Unmodified-Since header field makes the request method conditional on the selected representation's last modification date being earlier than or equal to the date provided in the field-value. This field accomplishes the same purpose as If-Match for cases where the user agent does not have an entity-tag for the representation. (default to nil)

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. (default to nil)

  • :compartment_id (String)

    The OCID of the compartment the resource belongs to. (default to nil)

Returns:



2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
# File 'lib/oci/dns/dns_client.rb', line 2664

def update_zone(zone_name_or_id, update_zone_details, opts = {})
  logger.debug 'Calling operation DnsClient#update_zone.' if logger

  raise "Missing the required parameter 'zone_name_or_id' when calling update_zone." if zone_name_or_id.nil?
  raise "Missing the required parameter 'update_zone_details' when calling update_zone." if update_zone_details.nil?
  raise "Parameter value for 'zone_name_or_id' must not be blank" if OCI::Internal::Util.blank_string?(zone_name_or_id)

  path = '/zones/{zoneNameOrId}'.sub('{zoneNameOrId}', zone_name_or_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'if-unmodified-since'] = opts[:if_unmodified_since] if opts[:if_unmodified_since]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_zone_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#update_zone') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Dns::Models::Zone'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_zone_records(zone_name_or_id, update_zone_records_details, opts = {}) ⇒ Response

Replaces records in the specified zone with the records specified in the request body. If a specified record does not exist, it will be created. If the record exists, then it will be updated to represent the record in the body of the request. If a record in the zone does not exist in the request body, the record will be removed from the zone.

Parameters:

  • zone_name_or_id (String)

    The name or OCID of the target zone.

  • update_zone_records_details (OCI::Dns::Models::UpdateZoneRecordsDetails)

    A full list of records for the zone.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    The If-Match header field makes the request method conditional on the existence of at least one current representation of the target resource, when the field-value is *, or having a current representation of the target resource that has an entity-tag matching a member of the list of entity-tags provided in the field-value. (default to nil)

  • :if_unmodified_since (String)

    The If-Unmodified-Since header field makes the request method conditional on the selected representation's last modification date being earlier than or equal to the date provided in the field-value. This field accomplishes the same purpose as If-Match for cases where the user agent does not have an entity-tag for the representation. (default to nil)

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. (default to nil)

  • :compartment_id (String)

    The OCID of the compartment the resource belongs to. (default to nil)

Returns:



2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
# File 'lib/oci/dns/dns_client.rb', line 2743

def update_zone_records(zone_name_or_id, update_zone_records_details, opts = {})
  logger.debug 'Calling operation DnsClient#update_zone_records.' if logger

  raise "Missing the required parameter 'zone_name_or_id' when calling update_zone_records." if zone_name_or_id.nil?
  raise "Missing the required parameter 'update_zone_records_details' when calling update_zone_records." if update_zone_records_details.nil?
  raise "Parameter value for 'zone_name_or_id' must not be blank" if OCI::Internal::Util.blank_string?(zone_name_or_id)

  path = '/zones/{zoneNameOrId}/records'.sub('{zoneNameOrId}', zone_name_or_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'if-unmodified-since'] = opts[:if_unmodified_since] if opts[:if_unmodified_since]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_zone_records_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#update_zone_records') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Dns::Models::RecordCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end