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](/iaas/Content/DNS/Concepts/dnszonemanagement.htm).

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
# 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)

  signer = OCI::Signer.config_file_auth_builder(config) if signer.nil?

  @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_resolver_compartment(resolver_id, change_resolver_compartment_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/change_resolver_compartment.rb.html) to see an example of how to use change_resolver_compartment API.

Moves a resolver into a different compartment along with its protected default view and any endpoints.

Zones in the default view are not moved. VCN-dedicated resolvers are initially created in the same compartment as their corresponding VCN, but can then be moved to a different compartment.

Parameters:

  • resolver_id (String)

    The OCID of the target resolver.

  • change_resolver_compartment_details (OCI::Dns::Models::ChangeResolverCompartmentDetails)

    Details for moving a resolver, along with its protected default view and endpoints, 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.

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

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

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
175
176
177
178
179
# File 'lib/oci/dns/dns_client.rb', line 135

def change_resolver_compartment(resolver_id, change_resolver_compartment_details, opts = {})
  logger.debug 'Calling operation DnsClient#change_resolver_compartment.' if logger

  raise "Missing the required parameter 'resolver_id' when calling change_resolver_compartment." if resolver_id.nil?
  raise "Missing the required parameter 'change_resolver_compartment_details' when calling change_resolver_compartment." if change_resolver_compartment_details.nil?

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

  path = '/resolvers/{resolverId}/actions/changeCompartment'.sub('{resolverId}', resolver_id.to_s)
  operation_signing_strategy = :standard

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

  # 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_resolver_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#change_resolver_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_steering_policy_compartment(steering_policy_id, change_steering_policy_compartment_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/change_steering_policy_compartment.rb.html) to see an example of how to use change_steering_policy_compartment API.

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.

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

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

Returns:

  • (Response)

    A Response object with data of type nil



217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
# File 'lib/oci/dns/dns_client.rb', line 217

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?

  if opts[:scope] && !OCI::Dns::Models::SCOPE_ENUM.include?(opts[:scope])
    raise 'Invalid value for "scope", must be one of the values in OCI::Dns::Models::SCOPE_ENUM.'
  end
  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 = {}
  query_params[:scope] = opts[:scope] if opts[:scope]

  # 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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/change_tsig_key_compartment.rb.html) to see an example of how to use change_tsig_key_compartment API.

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.

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

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

Returns:

  • (Response)

    A Response object with data of type nil



299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
# File 'lib/oci/dns/dns_client.rb', line 299

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?

  if opts[:scope] && !OCI::Dns::Models::SCOPE_ENUM.include?(opts[:scope])
    raise 'Invalid value for "scope", must be one of the values in OCI::Dns::Models::SCOPE_ENUM.'
  end
  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 = {}
  query_params[:scope] = opts[:scope] if opts[:scope]

  # 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_view_compartment(view_id, change_view_compartment_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/change_view_compartment.rb.html) to see an example of how to use change_view_compartment API.

Moves a view into a different compartment.

To change the compartment of a protected view, change the compartment of its corresponding resolver.

Parameters:

  • view_id (String)

    The OCID of the target view.

  • change_view_compartment_details (OCI::Dns::Models::ChangeViewCompartmentDetails)

    Details for moving a view 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.

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

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

Returns:

  • (Response)

    A Response object with data of type nil



383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
# File 'lib/oci/dns/dns_client.rb', line 383

def change_view_compartment(view_id, change_view_compartment_details, opts = {})
  logger.debug 'Calling operation DnsClient#change_view_compartment.' if logger

  raise "Missing the required parameter 'view_id' when calling change_view_compartment." if view_id.nil?
  raise "Missing the required parameter 'change_view_compartment_details' when calling change_view_compartment." if change_view_compartment_details.nil?

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

  path = '/views/{viewId}/actions/changeCompartment'.sub('{viewId}', view_id.to_s)
  operation_signing_strategy = :standard

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

  # 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_view_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#change_view_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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/change_zone_compartment.rb.html) to see an example of how to use change_zone_compartment API.

Moves a zone into a different compartment.

Protected zones cannot have their compartment changed. When the zone name is provided as a path parameter and `PRIVATE` is used for the scope query parameter then the viewId query parameter is required.

*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.

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

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

Returns:

  • (Response)

    A Response object with data of type nil



472
473
474
475
476
477
478
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
515
516
# File 'lib/oci/dns/dns_client.rb', line 472

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?

  if opts[:scope] && !OCI::Dns::Models::SCOPE_ENUM.include?(opts[:scope])
    raise 'Invalid value for "scope", must be one of the values in OCI::Dns::Models::SCOPE_ENUM.'
  end
  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 = {}
  query_params[:scope] = opts[:scope] if opts[:scope]

  # 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_resolver_endpoint(resolver_id, create_resolver_endpoint_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/create_resolver_endpoint.rb.html) to see an example of how to use create_resolver_endpoint API.

Creates a new resolver endpoint in the same compartment as the resolver.

Parameters:

  • resolver_id (String)

    The OCID of the target resolver.

  • create_resolver_endpoint_details (OCI::Dns::Models::CreateResolverEndpointDetails)

    Details for creating a new resolver endpoint.

  • 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_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).

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

Returns:



548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
# File 'lib/oci/dns/dns_client.rb', line 548

def create_resolver_endpoint(resolver_id, create_resolver_endpoint_details, opts = {})
  logger.debug 'Calling operation DnsClient#create_resolver_endpoint.' if logger

  raise "Missing the required parameter 'resolver_id' when calling create_resolver_endpoint." if resolver_id.nil?
  raise "Missing the required parameter 'create_resolver_endpoint_details' when calling create_resolver_endpoint." if create_resolver_endpoint_details.nil?

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

  path = '/resolvers/{resolverId}/endpoints'.sub('{resolverId}', resolver_id.to_s)
  operation_signing_strategy = :standard

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

  # 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_resolver_endpoint_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#create_resolver_endpoint') 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::ResolverEndpoint'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/create_steering_policy.rb.html) to see an example of how to use create_steering_policy API.

Creates a new steering policy in the specified compartment. For more information on creating policies with templates, see [Traffic Management API Guide](docs.cloud.oracle.com/iaas/Content/TrafficManagement/Concepts/trafficmanagementapi.htm).

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).

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

Returns:



624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
# File 'lib/oci/dns/dns_client.rb', line 624

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?

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

  path = '/steeringPolicies'
  operation_signing_strategy = :standard

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

  # 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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/create_steering_policy_attachment.rb.html) to see an example of how to use create_steering_policy_attachment API.

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).

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

Returns:



702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
# File 'lib/oci/dns/dns_client.rb', line 702

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?

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

  path = '/steeringPolicyAttachments'
  operation_signing_strategy = :standard

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

  # 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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/create_tsig_key.rb.html) to see an example of how to use create_tsig_key API.

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.

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

Returns:



769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
# File 'lib/oci/dns/dns_client.rb', line 769

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?

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

  path = '/tsigKeys'
  operation_signing_strategy = :standard

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

  # 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_view(create_view_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/create_view.rb.html) to see an example of how to use create_view API.

Creates a new view in the specified compartment.

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).

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

Returns:



840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
# File 'lib/oci/dns/dns_client.rb', line 840

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

  raise "Missing the required parameter 'create_view_details' when calling create_view." if create_view_details.nil?

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

  path = '/views'
  operation_signing_strategy = :standard

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

  # 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_view_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#create_view') 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::View'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/create_zone.rb.html) to see an example of how to use create_zone API.

Creates a new zone in the specified compartment.

Private zones must have a zone type of `PRIMARY`. Creating a private zone at or under `oraclevcn.com` within the default protected view of a VCN-dedicated resolver is not permitted.

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.

  • :compartment_id (String)

    The OCID of the compartment the zone belongs to.

    This parameter is deprecated and should be omitted.

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

  • :view_id (String)

    The OCID of the view the resource is associated with.

Returns:



914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
# File 'lib/oci/dns/dns_client.rb', line 914

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?

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

  path = '/zones'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:scope] = opts[:scope] if opts[:scope]
  query_params[:viewId] = opts[:view_id] if opts[:view_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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/delete_domain_records.rb.html) to see an example of how to use delete_domain_records API.

Deletes all records at the specified zone and domain.

When the zone name is provided as a path parameter and `PRIVATE` is used for the scope query parameter then the viewId query parameter is required.

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.

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

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

  • :view_id (String)

    The OCID of the view the resource is associated with.

  • :compartment_id (String)

    The OCID of the compartment the zone belongs to.

    This parameter is deprecated and should be omitted.

Returns:

  • (Response)

    A Response object with data of type nil



1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
# File 'lib/oci/dns/dns_client.rb', line 1001

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?

  if opts[:scope] && !OCI::Dns::Models::SCOPE_ENUM.include?(opts[:scope])
    raise 'Invalid value for "scope", must be one of the values in OCI::Dns::Models::SCOPE_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[:scope] = opts[:scope] if opts[:scope]
  query_params[:viewId] = opts[:view_id] if opts[:view_id]
  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_resolver_endpoint(resolver_id, resolver_endpoint_name, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/delete_resolver_endpoint.rb.html) to see an example of how to use delete_resolver_endpoint API.

Deletes the specified resolver endpoint.

Note that attempting to delete a resolver endpoint in the DELETED lifecycle state will result in a `404` response to be consistent with other operations of the API. Resolver endpoints may not be deleted if they are referenced by a resolver rule.

Parameters:

  • resolver_id (String)

    The OCID of the target resolver.

  • resolver_endpoint_name (String)

    The name of the target resolver endpoint.

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

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

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

Returns:

  • (Response)

    A Response object with data of type nil



1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
# File 'lib/oci/dns/dns_client.rb', line 1088

def delete_resolver_endpoint(resolver_id, resolver_endpoint_name, opts = {})
  logger.debug 'Calling operation DnsClient#delete_resolver_endpoint.' if logger

  raise "Missing the required parameter 'resolver_id' when calling delete_resolver_endpoint." if resolver_id.nil?
  raise "Missing the required parameter 'resolver_endpoint_name' when calling delete_resolver_endpoint." if resolver_endpoint_name.nil?

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

  path = '/resolvers/{resolverId}/endpoints/{resolverEndpointName}'.sub('{resolverId}', resolver_id.to_s).sub('{resolverEndpointName}', resolver_endpoint_name.to_s)
  operation_signing_strategy = :standard

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

  # 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_resolver_endpoint') 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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/delete_rr_set.rb.html) to see an example of how to use delete_rr_set API.

Deletes all records in the specified RRSet.

When the zone name is provided as a path parameter and `PRIVATE` is used for the scope query parameter then the viewId query parameter is required.

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.

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

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

  • :compartment_id (String)

    The OCID of the compartment the zone belongs to.

    This parameter is deprecated and should be omitted.

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

  • :view_id (String)

    The OCID of the view the resource is associated with.

Returns:

  • (Response)

    A Response object with data of type nil



1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
# File 'lib/oci/dns/dns_client.rb', line 1178

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?

  if opts[:scope] && !OCI::Dns::Models::SCOPE_ENUM.include?(opts[:scope])
    raise 'Invalid value for "scope", must be one of the values in OCI::Dns::Models::SCOPE_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)
  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]
  query_params[:scope] = opts[:scope] if opts[:scope]
  query_params[:viewId] = opts[:view_id] if opts[:view_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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/delete_steering_policy.rb.html) to see an example of how to use delete_steering_policy API.

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.

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

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

Returns:

  • (Response)

    A Response object with data of type nil



1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
# File 'lib/oci/dns/dns_client.rb', line 1266

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?

  if opts[:scope] && !OCI::Dns::Models::SCOPE_ENUM.include?(opts[:scope])
    raise 'Invalid value for "scope", must be one of the values in OCI::Dns::Models::SCOPE_ENUM.'
  end
  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 = {}
  query_params[:scope] = opts[:scope] if opts[:scope]

  # 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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/delete_steering_policy_attachment.rb.html) to see an example of how to use delete_steering_policy_attachment API.

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.

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

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

Returns:

  • (Response)

    A Response object with data of type nil



1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
# File 'lib/oci/dns/dns_client.rb', line 1345

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?

  if opts[:scope] && !OCI::Dns::Models::SCOPE_ENUM.include?(opts[:scope])
    raise 'Invalid value for "scope", must be one of the values in OCI::Dns::Models::SCOPE_ENUM.'
  end
  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 = {}
  query_params[:scope] = opts[:scope] if opts[:scope]

  # 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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/delete_tsig_key.rb.html) to see an example of how to use delete_tsig_key API.

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.

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

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

Returns:

  • (Response)

    A Response object with data of type nil



1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
# File 'lib/oci/dns/dns_client.rb', line 1423

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?

  if opts[:scope] && !OCI::Dns::Models::SCOPE_ENUM.include?(opts[:scope])
    raise 'Invalid value for "scope", must be one of the values in OCI::Dns::Models::SCOPE_ENUM.'
  end
  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 = {}
  query_params[:scope] = opts[:scope] if opts[:scope]

  # 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_view(view_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/delete_view.rb.html) to see an example of how to use delete_view API.

Deletes the specified view.

Note that attempting to delete a view in the DELETED lifecycleState will result in a `404` response to be consistent with other operations of the API. Views cannot be deleted if they are referenced by non-deleted zones or resolvers. Protected views cannot be deleted.

Parameters:

  • view_id (String)

    The OCID of the target view.

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

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

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

Returns:

  • (Response)

    A Response object with data of type nil



1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
# File 'lib/oci/dns/dns_client.rb', line 1506

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

  raise "Missing the required parameter 'view_id' when calling delete_view." if view_id.nil?

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

  path = '/views/{viewId}'.sub('{viewId}', view_id.to_s)
  operation_signing_strategy = :standard

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

  # 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_view') 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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/delete_zone.rb.html) to see an example of how to use delete_zone API.

Deletes the specified zone and all its steering policy attachments.

A `204` response indicates that the zone has been successfully deleted. Protected zones cannot be deleted. When the zone name is provided as a path parameter and `PRIVATE` is used for the scope query parameter then the viewId query parameter is required.

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.

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

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

  • :view_id (String)

    The OCID of the view the resource is associated with.

  • :compartment_id (String)

    The OCID of the compartment the zone belongs to.

    This parameter is deprecated and should be omitted.

Returns:

  • (Response)

    A Response object with data of type nil



1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
# File 'lib/oci/dns/dns_client.rb', line 1593

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?

  if opts[:scope] && !OCI::Dns::Models::SCOPE_ENUM.include?(opts[:scope])
    raise 'Invalid value for "scope", must be one of the values in OCI::Dns::Models::SCOPE_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}'.sub('{zoneNameOrId}', zone_name_or_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:scope] = opts[:scope] if opts[:scope]
  query_params[:viewId] = opts[:view_id] if opts[:view_id]
  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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/get_domain_records.rb.html) to see an example of how to use get_domain_records API.

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. When the zone name is provided as a path parameter and `PRIVATE` is used for the scope query parameter then the viewId query parameter is required.

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.

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

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

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

  • :zone_version (String)

    The version of the zone for which data is requested.

  • :rtype (String)

    Search by record type. Will match any record whose [type](www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4) (case-insensitive) equals the provided value.

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

  • :view_id (String)

    The OCID of the view the resource is associated with.

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

  • :compartment_id (String)

    The OCID of the compartment the zone belongs to.

    This parameter is deprecated and should be omitted.

Returns:



1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
# File 'lib/oci/dns/dns_client.rb', line 1694

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[:scope] && !OCI::Dns::Models::SCOPE_ENUM.include?(opts[:scope])
    raise 'Invalid value for "scope", must be one of the values in OCI::Dns::Models::SCOPE_ENUM.'
  end

  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[:scope] = opts[:scope] if opts[:scope]
  query_params[:viewId] = opts[:view_id] if opts[:view_id]
  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_resolver(resolver_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/get_resolver.rb.html) to see an example of how to use get_resolver API.

Gets information about a specific resolver.

Note that attempting to get a resolver in the DELETED lifecycleState will result in a `404` response to be consistent with other operations of the API.

Parameters:

  • resolver_id (String)

    The OCID of the target resolver.

  • 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_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.

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

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

Returns:



1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
# File 'lib/oci/dns/dns_client.rb', line 1792

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

  raise "Missing the required parameter 'resolver_id' when calling get_resolver." if resolver_id.nil?

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

  path = '/resolvers/{resolverId}'.sub('{resolverId}', resolver_id.to_s)
  operation_signing_strategy = :standard

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

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-modified-since'] = opts[:if_modified_since] if opts[:if_modified_since]
  header_params[:'if-none-match'] = opts[:if_none_match] if opts[:if_none_match]
  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_resolver') 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::Resolver'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_resolver_endpoint(resolver_id, resolver_endpoint_name, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/get_resolver_endpoint.rb.html) to see an example of how to use get_resolver_endpoint API.

Gets information about a specific resolver endpoint.

Note that attempting to get a resolver endpoint in the DELETED lifecycle state will result in a `404` response to be consistent with other operations of the API.

Parameters:

  • resolver_id (String)

    The OCID of the target resolver.

  • resolver_endpoint_name (String)

    The name of the target resolver endpoint.

  • 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_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.

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

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

Returns:



1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
# File 'lib/oci/dns/dns_client.rb', line 1873

def get_resolver_endpoint(resolver_id, resolver_endpoint_name, opts = {})
  logger.debug 'Calling operation DnsClient#get_resolver_endpoint.' if logger

  raise "Missing the required parameter 'resolver_id' when calling get_resolver_endpoint." if resolver_id.nil?
  raise "Missing the required parameter 'resolver_endpoint_name' when calling get_resolver_endpoint." if resolver_endpoint_name.nil?

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

  path = '/resolvers/{resolverId}/endpoints/{resolverEndpointName}'.sub('{resolverId}', resolver_id.to_s).sub('{resolverEndpointName}', resolver_endpoint_name.to_s)
  operation_signing_strategy = :standard

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

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-modified-since'] = opts[:if_modified_since] if opts[:if_modified_since]
  header_params[:'if-none-match'] = opts[:if_none_match] if opts[:if_none_match]
  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_resolver_endpoint') 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::ResolverEndpoint'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/get_rr_set.rb.html) to see an example of how to use get_rr_set API.

Gets a list of all records in the specified RRSet.

The results are sorted by `recordHash` by default. When the zone name is provided as a path parameter and `PRIVATE` is used for the scope query parameter then the viewId query parameter is required.

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.

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

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

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

  • :zone_version (String)

    The version of the zone for which data is requested.

  • :compartment_id (String)

    The OCID of the compartment the zone belongs to.

    This parameter is deprecated and should be omitted.

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

  • :view_id (String)

    The OCID of the view the resource is associated with.

Returns:



1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
# File 'lib/oci/dns/dns_client.rb', line 1968

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?

  if opts[:scope] && !OCI::Dns::Models::SCOPE_ENUM.include?(opts[:scope])
    raise 'Invalid value for "scope", must be one of the values in OCI::Dns::Models::SCOPE_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)
  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]
  query_params[:scope] = opts[:scope] if opts[:scope]
  query_params[:viewId] = opts[:view_id] if opts[:view_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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/get_steering_policy.rb.html) to see an example of how to use get_steering_policy API.

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.

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

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

Returns:



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
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
# File 'lib/oci/dns/dns_client.rb', line 2054

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?

  if opts[:scope] && !OCI::Dns::Models::SCOPE_ENUM.include?(opts[:scope])
    raise 'Invalid value for "scope", must be one of the values in OCI::Dns::Models::SCOPE_ENUM.'
  end
  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 = {}
  query_params[:scope] = opts[:scope] if opts[:scope]

  # 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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/get_steering_policy_attachment.rb.html) to see an example of how to use get_steering_policy_attachment API.

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.

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

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

Returns:



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
2167
2168
2169
2170
2171
2172
2173
2174
# File 'lib/oci/dns/dns_client.rb', line 2131

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?

  if opts[:scope] && !OCI::Dns::Models::SCOPE_ENUM.include?(opts[:scope])
    raise 'Invalid value for "scope", must be one of the values in OCI::Dns::Models::SCOPE_ENUM.'
  end
  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 = {}
  query_params[:scope] = opts[:scope] if opts[:scope]

  # 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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/get_tsig_key.rb.html) to see an example of how to use get_tsig_key API.

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.

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

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

Returns:



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
2246
2247
2248
2249
2250
2251
# File 'lib/oci/dns/dns_client.rb', line 2208

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?

  if opts[:scope] && !OCI::Dns::Models::SCOPE_ENUM.include?(opts[:scope])
    raise 'Invalid value for "scope", must be one of the values in OCI::Dns::Models::SCOPE_ENUM.'
  end
  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 = {}
  query_params[:scope] = opts[:scope] if opts[:scope]

  # 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_view(view_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/get_view.rb.html) to see an example of how to use get_view API.

Gets information about a specific view.

Note that attempting to get a view in the DELETED lifecycleState will result in a `404` response to be consistent with other operations of the API.

Parameters:

  • view_id (String)

    The OCID of the target view.

  • 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_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.

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

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

Returns:



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
2329
2330
2331
2332
# File 'lib/oci/dns/dns_client.rb', line 2289

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

  raise "Missing the required parameter 'view_id' when calling get_view." if view_id.nil?

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

  path = '/views/{viewId}'.sub('{viewId}', view_id.to_s)
  operation_signing_strategy = :standard

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

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-modified-since'] = opts[:if_modified_since] if opts[:if_modified_since]
  header_params[:'if-none-match'] = opts[:if_none_match] if opts[:if_none_match]
  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_view') 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::View'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/get_zone.rb.html) to see an example of how to use get_zone API.

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

When the zone name is provided as a path parameter and `PRIVATE` is used for the scope query parameter then the viewId query parameter is required.

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.

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

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

  • :view_id (String)

    The OCID of the view the resource is associated with.

  • :compartment_id (String)

    The OCID of the compartment the zone belongs to.

    This parameter is deprecated and should be omitted.

Returns:



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
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
# File 'lib/oci/dns/dns_client.rb', line 2374

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?

  if opts[:scope] && !OCI::Dns::Models::SCOPE_ENUM.include?(opts[:scope])
    raise 'Invalid value for "scope", must be one of the values in OCI::Dns::Models::SCOPE_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}'.sub('{zoneNameOrId}', zone_name_or_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:scope] = opts[:scope] if opts[:scope]
  query_params[:viewId] = opts[:view_id] if opts[:view_id]
  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_content(zone_name_or_id, opts = {}, &block) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/get_zone_content.rb.html) to see an example of how to use get_zone_content API.

Gets the requested zone's zone file.

Parameters:

  • zone_name_or_id (String)

    The name or OCID of the target zone.

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

    the optional parameters

  • [Block] (Hash)

    a customizable set of options

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.

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

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

  • :view_id (String)

    The OCID of the view the resource is associated with.

  • :response_target (String, IO)

    Streaming http body into a file (specified by file name or File object) or IO object if the block is not given

Returns:

  • (Response)

    A Response object with data of type String if response_target and block are not given, otherwise with nil data



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
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
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
# File 'lib/oci/dns/dns_client.rb', line 2456

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

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

  if opts[:scope] && !OCI::Dns::Models::SCOPE_ENUM.include?(opts[:scope])
    raise 'Invalid value for "scope", must be one of the values in OCI::Dns::Models::SCOPE_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}/content'.sub('{zoneNameOrId}', zone_name_or_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:scope] = opts[:scope] if opts[:scope]
  query_params[:viewId] = opts[:view_id] if opts[:view_id]

  # Header Params
  header_params = {}
  header_params[:accept] = opts[:accept] if opts[:accept]
  header_params[:accept] ||= 'text/dns'
  header_params[:'accept-encoding'] = opts[:accept_encoding] if opts[:accept_encoding]
  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_content') do
    if !block.nil?
      @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: 'Stream',
        &block
      )
    elsif opts[:response_target]
      if opts[:response_target].respond_to? :write
        @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: 'Stream',
          &proc { |chunk, _response| opts[:response_target].write(chunk) }
        )
      elsif opts[:response_target].is_a?(String)
        File.open(opts[:response_target], 'wb') do |output|
          return @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: 'Stream',
            &proc { |chunk, _response| output.write(chunk) }
          )
        end
      end
    else
      @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: 'String'
      )
    end
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/get_zone_records.rb.html) to see an example of how to use get_zone_records API.

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](www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4). When the zone name is provided as a path parameter and `PRIVATE` is used for the scope query parameter then the viewId query parameter is required.

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.

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

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

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

  • :zone_version (String)

    The version of the zone for which data is requested.

  • :domain (String)

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

  • :domain_contains (String)

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

  • :rtype (String)

    Search by record type. Will match any record whose [type](www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4) (case-insensitive) equals the provided value.

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

  • :compartment_id (String)

    The OCID of the compartment the zone belongs to.

    This parameter is deprecated and should be omitted.

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

  • :view_id (String)

    The OCID of the view the resource is associated with.

Returns:



2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
# File 'lib/oci/dns/dns_client.rb', line 2607

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

  if opts[:scope] && !OCI::Dns::Models::SCOPE_ENUM.include?(opts[:scope])
    raise 'Invalid value for "scope", must be one of the values in OCI::Dns::Models::SCOPE_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]
  query_params[:scope] = opts[:scope] if opts[:scope]
  query_params[:viewId] = opts[:view_id] if opts[:view_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_resolver_endpoints(resolver_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/list_resolver_endpoints.rb.html) to see an example of how to use list_resolver_endpoints API.

Gets a list of all endpoints within a resolver. The collection can be filtered by name or lifecycle state. It can be sorted on creation time or name both in ASC or DESC order. Note that when no lifecycleState query parameter is provided, the collection does not include resolver endpoints in the DELETED lifecycle state to be consistent with other operations of the API.

Parameters:

  • resolver_id (String)

    The OCID of the target resolver.

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

  • :name (String)

    The name of a resource.

  • :page (String)

    The value of the `opc-next-page` response header from the previous "List" call.

  • :limit (Integer)

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

  • :sort_order (String)

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

  • :sort_by (String)

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

  • :lifecycle_state (String)

    The state of a resource.

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

Returns:



2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
# File 'lib/oci/dns/dns_client.rb', line 2705

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

  raise "Missing the required parameter 'resolver_id' when calling list_resolver_endpoints." if resolver_id.nil?

  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

  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[:lifecycle_state] && !OCI::Dns::Models::ResolverEndpointSummary::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Dns::Models::ResolverEndpointSummary::LIFECYCLE_STATE_ENUM.'
  end

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

  path = '/resolvers/{resolverId}/endpoints'.sub('{resolverId}', resolver_id.to_s)
  operation_signing_strategy = :standard

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

  # 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_resolver_endpoints') 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::ResolverEndpointSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/list_resolvers.rb.html) to see an example of how to use list_resolvers API.

Gets a list of all resolvers within a compartment.

The collection can be filtered by display name, id, or lifecycle state. It can be sorted on creation time or displayName both in ASC or DESC order. Note that when no lifecycleState query parameter is provided, the collection does not include resolvers in the DELETED lifecycleState to be consistent with other operations of the API.

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.

  • :display_name (String)

    The displayName of a resource.

  • :id (String)

    The OCID of a resource.

  • :page (String)

    The value of the `opc-next-page` response header from the previous "List" call.

  • :limit (Integer)

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

  • :sort_order (String)

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

  • :sort_by (String)

    The field by which to sort resolvers. (default to timeCreated) Allowed values are: displayName, timeCreated

  • :lifecycle_state (String)

    The state of a resource.

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

Returns:



2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
# File 'lib/oci/dns/dns_client.rb', line 2804

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

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

  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

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

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

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

  path = '/resolvers'
  operation_signing_strategy = :standard

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

  # 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_resolvers') 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::ResolverSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/list_steering_policies.rb.html) to see an example of how to use list_steering_policies API.

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.

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

  • :id (String)

    The OCID of a resource.

  • :display_name (String)

    The displayName of a resource.

  • :display_name_contains (String)

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

  • :health_check_monitor_id (String)

    Search by health check monitor OCID. Will match any resource whose health check monitor ID matches the provided value.

  • :time_created_greater_than_or_equal_to (DateTime)

    An [RFC 3339](www.ietf.org/rfc/rfc3339.txt) timestamp that states all returned resources were created on or after the indicated time.

  • :time_created_less_than (DateTime)

    An [RFC 3339](www.ietf.org/rfc/rfc3339.txt) timestamp that states all returned resources were created before the indicated time.

  • :template (String)

    Search by steering template type. Will match any resource whose template type matches the provided value.

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

Returns:



2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
# File 'lib/oci/dns/dns_client.rb', line 2914

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

  if opts[:scope] && !OCI::Dns::Models::SCOPE_ENUM.include?(opts[:scope])
    raise 'Invalid value for "scope", must be one of the values in OCI::Dns::Models::SCOPE_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]
  query_params[:scope] = opts[:scope] if opts[:scope]

  # 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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/list_steering_policy_attachments.rb.html) to see an example of how to use list_steering_policy_attachments API.

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.

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

  • :id (String)

    The OCID of a resource.

  • :display_name (String)

    The displayName of a resource.

  • :steering_policy_id (String)

    Search by steering policy OCID. Will match any resource whose steering policy ID matches the provided value.

  • :zone_id (String)

    Search by zone OCID. Will match any resource whose zone ID matches the provided value.

  • :domain (String)

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

  • :domain_contains (String)

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

  • :time_created_greater_than_or_equal_to (DateTime)

    An [RFC 3339](www.ietf.org/rfc/rfc3339.txt) timestamp that states all returned resources were created on or after the indicated time.

  • :time_created_less_than (DateTime)

    An [RFC 3339](www.ietf.org/rfc/rfc3339.txt) timestamp that states all returned resources were created before the indicated time.

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

Returns:



3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
# File 'lib/oci/dns/dns_client.rb', line 3032

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

  if opts[:scope] && !OCI::Dns::Models::SCOPE_ENUM.include?(opts[:scope])
    raise 'Invalid value for "scope", must be one of the values in OCI::Dns::Models::SCOPE_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]
  query_params[:scope] = opts[:scope] if opts[:scope]

  # 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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/list_tsig_keys.rb.html) to see an example of how to use list_tsig_keys API.

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.

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

  • :id (String)

    The OCID of a resource.

  • :name (String)

    The name of a resource.

  • :lifecycle_state (String)

    The state of a resource.

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

Returns:



3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
# File 'lib/oci/dns/dns_client.rb', line 3133

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

  if opts[:scope] && !OCI::Dns::Models::SCOPE_ENUM.include?(opts[:scope])
    raise 'Invalid value for "scope", must be one of the values in OCI::Dns::Models::SCOPE_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]
  query_params[:scope] = opts[:scope] if opts[:scope]

  # 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_views(compartment_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/list_views.rb.html) to see an example of how to use list_views API.

Gets a list of all views within a compartment.

The collection can be filtered by display name, id, or lifecycle state. It can be sorted on creation time or displayName both in ASC or DESC order. Note that when no lifecycleState query parameter is provided, the collection does not include views in the DELETED lifecycleState to be consistent with other operations of the API.

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.

  • :display_name (String)

    The displayName of a resource.

  • :id (String)

    The OCID of a resource.

  • :page (String)

    The value of the `opc-next-page` response header from the previous "List" call.

  • :limit (Integer)

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

  • :sort_order (String)

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

  • :sort_by (String)

    The field by which to sort views. (default to timeCreated) Allowed values are: displayName, timeCreated

  • :lifecycle_state (String)

    The state of a resource.

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

Returns:



3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
# File 'lib/oci/dns/dns_client.rb', line 3233

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

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

  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

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

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

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

  path = '/views'
  operation_signing_strategy = :standard

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

  # 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_views') 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::ViewSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/list_zone_transfer_servers.rb.html) to see an example of how to use list_zone_transfer_servers API.

Gets a list of IP addresses of OCI nameservers for inbound and outbound transfer of zones in the specified compartment (which must be the root compartment of a tenancy) that transfer zone data with external master or downstream nameservers.

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.

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

  • :page (String)

    The value of the `opc-next-page` response header from the previous "List" call.

Returns:



3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
# File 'lib/oci/dns/dns_client.rb', line 3321

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

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

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

  path = '/zoneTransferServers'
  operation_signing_strategy = :standard

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

  # 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_zone_transfer_servers') 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::ZoneTransferServer>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/list_zones.rb.html) to see an example of how to use list_zones API.

Gets a list of all zones in the specified compartment.

The collection can be filtered by name, time created, scope, associated view, and zone type. Filtering by view is only supported for private zones.

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.

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

  • :name (String)

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

  • :name_contains (String)

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

  • :zone_type (String)

    Search by zone type, `PRIMARY` or `SECONDARY`. Will match any zone whose type equals the provided value.

    Allowed values are: PRIMARY, SECONDARY

  • :time_created_greater_than_or_equal_to (DateTime)

    An [RFC 3339](www.ietf.org/rfc/rfc3339.txt) timestamp that states all returned resources were created on or after the indicated time.

  • :time_created_less_than (DateTime)

    An [RFC 3339](www.ietf.org/rfc/rfc3339.txt) timestamp that states all returned resources were created before the indicated time.

  • :lifecycle_state (String)

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

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

  • :view_id (String)

    The OCID of the view the resource is associated with.

  • :tsig_key_id (String)

    Search for zones that are associated with a TSIG key.

Returns:



3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
# File 'lib/oci/dns/dns_client.rb', line 3419

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 UPDATING].include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of ACTIVE, CREATING, DELETED, DELETING, FAILED, UPDATING.'
  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

  if opts[:scope] && !OCI::Dns::Models::SCOPE_ENUM.include?(opts[:scope])
    raise 'Invalid value for "scope", must be one of the values in OCI::Dns::Models::SCOPE_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]
  query_params[:scope] = opts[:scope] if opts[:scope]
  query_params[:viewId] = opts[:view_id] if opts[:view_id]
  query_params[:tsigKeyId] = opts[:tsig_key_id] if opts[:tsig_key_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 = 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.



93
94
95
# File 'lib/oci/dns/dns_client.rb', line 93

def logger
  @api_client.config.logger
end

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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/patch_domain_records.rb.html) to see an example of how to use patch_domain_records API.

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. When the zone name is provided as a path parameter and `PRIVATE` is used for the scope query parameter then the viewId query parameter is required.

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.

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

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

  • :view_id (String)

    The OCID of the view the resource is associated with.

  • :compartment_id (String)

    The OCID of the compartment the zone belongs to.

    This parameter is deprecated and should be omitted.

Returns:



3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
# File 'lib/oci/dns/dns_client.rb', line 3536

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?

  if opts[:scope] && !OCI::Dns::Models::SCOPE_ENUM.include?(opts[:scope])
    raise 'Invalid value for "scope", must be one of the values in OCI::Dns::Models::SCOPE_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[:scope] = opts[:scope] if opts[:scope]
  query_params[:viewId] = opts[:view_id] if opts[:view_id]
  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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/patch_rr_set.rb.html) to see an example of how to use patch_rr_set API.

Updates records in the specified RRSet.

When the zone name is provided as a path parameter and `PRIVATE` is used for the scope query parameter then the viewId query parameter is required.

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.

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

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

  • :view_id (String)

    The OCID of the view the resource is associated with.

  • :compartment_id (String)

    The OCID of the compartment the zone belongs to.

    This parameter is deprecated and should be omitted.

Returns:



3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
# File 'lib/oci/dns/dns_client.rb', line 3631

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?

  if opts[:scope] && !OCI::Dns::Models::SCOPE_ENUM.include?(opts[:scope])
    raise 'Invalid value for "scope", must be one of the values in OCI::Dns::Models::SCOPE_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)
  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[:scope] = opts[:scope] if opts[:scope]
  query_params[:viewId] = opts[:view_id] if opts[:view_id]
  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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/patch_zone_records.rb.html) to see an example of how to use patch_zone_records API.

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. When the zone name is provided as a path parameter and `PRIVATE` is used for the scope query parameter then the viewId query parameter is required.

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.

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

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

  • :view_id (String)

    The OCID of the view the resource is associated with.

  • :compartment_id (String)

    The OCID of the compartment the zone belongs to.

    This parameter is deprecated and should be omitted.

Returns:



3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
# File 'lib/oci/dns/dns_client.rb', line 3729

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?

  if opts[:scope] && !OCI::Dns::Models::SCOPE_ENUM.include?(opts[:scope])
    raise 'Invalid value for "scope", must be one of the values in OCI::Dns::Models::SCOPE_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[:scope] = opts[:scope] if opts[:scope]
  query_params[:viewId] = opts[:view_id] if opts[:view_id]
  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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/update_domain_records.rb.html) to see an example of how to use update_domain_records API.

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. When the zone name is provided as a path parameter and `PRIVATE` is used for the scope query parameter then the viewId query parameter is required.

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.

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

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

  • :view_id (String)

    The OCID of the view the resource is associated with.

  • :compartment_id (String)

    The OCID of the compartment the zone belongs to.

    This parameter is deprecated and should be omitted.

Returns:



3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
# File 'lib/oci/dns/dns_client.rb', line 3823

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?

  if opts[:scope] && !OCI::Dns::Models::SCOPE_ENUM.include?(opts[:scope])
    raise 'Invalid value for "scope", must be one of the values in OCI::Dns::Models::SCOPE_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[:scope] = opts[:scope] if opts[:scope]
  query_params[:viewId] = opts[:view_id] if opts[:view_id]
  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_resolver(resolver_id, update_resolver_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/update_resolver.rb.html) to see an example of how to use update_resolver API.

Updates the specified resolver with your new information.

Parameters:

  • resolver_id (String)

    The OCID of the target resolver.

  • update_resolver_details (OCI::Dns::Models::UpdateResolverDetails)

    New data for the resolver.

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

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

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

Returns:



3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
# File 'lib/oci/dns/dns_client.rb', line 3908

def update_resolver(resolver_id, update_resolver_details, opts = {})
  logger.debug 'Calling operation DnsClient#update_resolver.' if logger

  raise "Missing the required parameter 'resolver_id' when calling update_resolver." if resolver_id.nil?
  raise "Missing the required parameter 'update_resolver_details' when calling update_resolver." if update_resolver_details.nil?

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

  path = '/resolvers/{resolverId}'.sub('{resolverId}', resolver_id.to_s)
  operation_signing_strategy = :standard

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

  # 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_resolver_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#update_resolver') 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::Resolver'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_resolver_endpoint(resolver_id, resolver_endpoint_name, update_resolver_endpoint_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/update_resolver_endpoint.rb.html) to see an example of how to use update_resolver_endpoint API.

Updates the specified resolver endpoint with your new information.

Parameters:

  • resolver_id (String)

    The OCID of the target resolver.

  • resolver_endpoint_name (String)

    The name of the target resolver endpoint.

  • update_resolver_endpoint_details (OCI::Dns::Models::UpdateResolverEndpointDetails)

    New data for the resolver endpoint.

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

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

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

Returns:



3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
# File 'lib/oci/dns/dns_client.rb', line 3990

def update_resolver_endpoint(resolver_id, resolver_endpoint_name, update_resolver_endpoint_details, opts = {})
  logger.debug 'Calling operation DnsClient#update_resolver_endpoint.' if logger

  raise "Missing the required parameter 'resolver_id' when calling update_resolver_endpoint." if resolver_id.nil?
  raise "Missing the required parameter 'resolver_endpoint_name' when calling update_resolver_endpoint." if resolver_endpoint_name.nil?
  raise "Missing the required parameter 'update_resolver_endpoint_details' when calling update_resolver_endpoint." if update_resolver_endpoint_details.nil?

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

  path = '/resolvers/{resolverId}/endpoints/{resolverEndpointName}'.sub('{resolverId}', resolver_id.to_s).sub('{resolverEndpointName}', resolver_endpoint_name.to_s)
  operation_signing_strategy = :standard

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

  # 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_resolver_endpoint_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#update_resolver_endpoint') 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::ResolverEndpoint'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/update_rr_set.rb.html) to see an example of how to use update_rr_set API.

Replaces records in the specified RRSet.

When the zone name is provided as a path parameter and `PRIVATE` is used for the scope query parameter then the viewId query parameter is required.

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.

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

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

  • :view_id (String)

    The OCID of the view the resource is associated with.

  • :compartment_id (String)

    The OCID of the compartment the zone belongs to.

    This parameter is deprecated and should be omitted.

Returns:



4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
# File 'lib/oci/dns/dns_client.rb', line 4083

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?

  if opts[:scope] && !OCI::Dns::Models::SCOPE_ENUM.include?(opts[:scope])
    raise 'Invalid value for "scope", must be one of the values in OCI::Dns::Models::SCOPE_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)
  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[:scope] = opts[:scope] if opts[:scope]
  query_params[:viewId] = opts[:view_id] if opts[:view_id]
  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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/update_steering_policy.rb.html) to see an example of how to use update_steering_policy API.

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.

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

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

Returns:



4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
# File 'lib/oci/dns/dns_client.rb', line 4170

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?

  if opts[:scope] && !OCI::Dns::Models::SCOPE_ENUM.include?(opts[:scope])
    raise 'Invalid value for "scope", must be one of the values in OCI::Dns::Models::SCOPE_ENUM.'
  end
  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 = {}
  query_params[:scope] = opts[:scope] if opts[:scope]

  # 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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/update_steering_policy_attachment.rb.html) to see an example of how to use update_steering_policy_attachment API.

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.

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

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

Returns:



4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
# File 'lib/oci/dns/dns_client.rb', line 4251

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?

  if opts[:scope] && !OCI::Dns::Models::SCOPE_ENUM.include?(opts[:scope])
    raise 'Invalid value for "scope", must be one of the values in OCI::Dns::Models::SCOPE_ENUM.'
  end
  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 = {}
  query_params[:scope] = opts[:scope] if opts[:scope]

  # 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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/update_tsig_key.rb.html) to see an example of how to use update_tsig_key API.

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.

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

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

Returns:



4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
# File 'lib/oci/dns/dns_client.rb', line 4332

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?

  if opts[:scope] && !OCI::Dns::Models::SCOPE_ENUM.include?(opts[:scope])
    raise 'Invalid value for "scope", must be one of the values in OCI::Dns::Models::SCOPE_ENUM.'
  end
  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 = {}
  query_params[:scope] = opts[:scope] if opts[:scope]

  # 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_view(view_id, update_view_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/update_view.rb.html) to see an example of how to use update_view API.

Updates the specified view with your new information.

Parameters:

  • view_id (String)

    The OCID of the target view.

  • update_view_details (OCI::Dns::Models::UpdateViewDetails)

    New data for the view.

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

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

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

Returns:



4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
# File 'lib/oci/dns/dns_client.rb', line 4413

def update_view(view_id, update_view_details, opts = {})
  logger.debug 'Calling operation DnsClient#update_view.' if logger

  raise "Missing the required parameter 'view_id' when calling update_view." if view_id.nil?
  raise "Missing the required parameter 'update_view_details' when calling update_view." if update_view_details.nil?

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

  path = '/views/{viewId}'.sub('{viewId}', view_id.to_s)
  operation_signing_strategy = :standard

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

  # 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_view_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DnsClient#update_view') 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::View'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/update_zone.rb.html) to see an example of how to use update_zone API.

Updates the zone with the specified information.

Global secondary zones may have their external masters updated. For more information about secondary zones, see [Manage DNS Service Zone](docs.cloud.oracle.com/iaas/Content/DNS/Tasks/managingdnszones.htm). When the zone name is provided as a path parameter and `PRIVATE` is used for the scope query parameter then the viewId query parameter is required.

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.

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

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

  • :view_id (String)

    The OCID of the view the resource is associated with.

  • :compartment_id (String)

    The OCID of the compartment the zone belongs to.

    This parameter is deprecated and should be omitted.

Returns:



4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
# File 'lib/oci/dns/dns_client.rb', line 4504

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?

  if opts[:scope] && !OCI::Dns::Models::SCOPE_ENUM.include?(opts[:scope])
    raise 'Invalid value for "scope", must be one of the values in OCI::Dns::Models::SCOPE_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}'.sub('{zoneNameOrId}', zone_name_or_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:scope] = opts[:scope] if opts[:scope]
  query_params[:viewId] = opts[:view_id] if opts[:view_id]
  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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/dns/update_zone_records.rb.html) to see an example of how to use update_zone_records API.

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. When the zone name is provided as a path parameter and `PRIVATE` is used for the scope query parameter then the viewId query parameter is required.

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.

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

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

  • :scope (String)

    Specifies to operate only on resources that have a matching DNS scope.

  • :view_id (String)

    The OCID of the view the resource is associated with.

  • :compartment_id (String)

    The OCID of the compartment the zone belongs to.

    This parameter is deprecated and should be omitted.

Returns:



4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
# File 'lib/oci/dns/dns_client.rb', line 4598

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?

  if opts[:scope] && !OCI::Dns::Models::SCOPE_ENUM.include?(opts[:scope])
    raise 'Invalid value for "scope", must be one of the values in OCI::Dns::Models::SCOPE_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[:scope] = opts[:scope] if opts[:scope]
  query_params[:viewId] = opts[:view_id] if opts[:view_id]
  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