Class: OCI::Dns::DnsClient

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

Overview

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

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

This client is not thread-safe

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

Parameters:

  • config (Config) (defaults to: nil)

    A Config object.

  • region (String) (defaults to: nil)

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

  • endpoint (String) (defaults to: nil)

    The fully qualified endpoint URL

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

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

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

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

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

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



56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/oci/dns/dns_client.rb', line 56

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:



16
17
18
# File 'lib/oci/dns/dns_client.rb', line 16

def api_client
  @api_client
end

#endpointString (readonly)

Fully qualified endpoint URL

Returns:

  • (String)


20
21
22
# File 'lib/oci/dns/dns_client.rb', line 20

def endpoint
  @endpoint
end

#regionString

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

Returns:

  • (String)


30
31
32
# File 'lib/oci/dns/dns_client.rb', line 30

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



26
27
28
# File 'lib/oci/dns/dns_client.rb', line 26

def retry_config
  @retry_config
end

Instance Method Details

#change_resolver_compartment(resolver_id, change_resolver_compartment_details, opts = {}) ⇒ Response

Note:

Click here 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



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

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



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

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



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

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



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

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



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

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



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

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

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:



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

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



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

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



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

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



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

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



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

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

#create_zone_from_zone_file(compartment_id, create_zone_from_zone_file_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_zone_from_zone_file API.

Creates a new zone from a zone file in the specified compartment. Not supported for private zones.

Parameters:

  • compartment_id (String)

    The OCID of the compartment the resource belongs to.

  • create_zone_from_zone_file_details (String, IO)

    The zone file contents.

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

  • :view_id (String)

    The OCID of the view the resource is associated with.

Returns:



984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
# File 'lib/oci/dns/dns_client.rb', line 984

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

  raise "Missing the required parameter 'compartment_id' when calling create_zone_from_zone_file." if compartment_id.nil?
  raise "Missing the required parameter 'create_zone_from_zone_file_details' when calling create_zone_from_zone_file." if create_zone_from_zone_file_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 = '/actions/createZoneFromZoneFile'
  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[:viewId] = opts[:view_id] if opts[:view_id]

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

  post_body = @api_client.object_to_http_body(create_zone_from_zone_file_details)

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



1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
# File 'lib/oci/dns/dns_client.rb', line 1072

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



1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
# File 'lib/oci/dns/dns_client.rb', line 1159

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



1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
# File 'lib/oci/dns/dns_client.rb', line 1249

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



1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
# File 'lib/oci/dns/dns_client.rb', line 1337

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



1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
# File 'lib/oci/dns/dns_client.rb', line 1416

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



1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
# File 'lib/oci/dns/dns_client.rb', line 1494

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



1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
# File 'lib/oci/dns/dns_client.rb', line 1577

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



1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
# File 'lib/oci/dns/dns_client.rb', line 1664

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



1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
# File 'lib/oci/dns/dns_client.rb', line 1765

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



1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
# File 'lib/oci/dns/dns_client.rb', line 1863

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



1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
# File 'lib/oci/dns/dns_client.rb', line 1944

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



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

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



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

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



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

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



2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
# File 'lib/oci/dns/dns_client.rb', line 2279

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



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

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



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

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



2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
# File 'lib/oci/dns/dns_client.rb', line 2527

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



2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
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
# File 'lib/oci/dns/dns_client.rb', line 2678

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



2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
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
# File 'lib/oci/dns/dns_client.rb', line 2776

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



2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
# File 'lib/oci/dns/dns_client.rb', line 2875

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 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 timestamp that states all returned resources were created on or after the indicated time.

  • :time_created_less_than (DateTime)

    An RFC 3339 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:



2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
# File 'lib/oci/dns/dns_client.rb', line 2985

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 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 timestamp that states all returned resources were created on or after the indicated time.

  • :time_created_less_than (DateTime)

    An RFC 3339 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:



3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
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
# File 'lib/oci/dns/dns_client.rb', line 3103

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



3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
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
# File 'lib/oci/dns/dns_client.rb', line 3204

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



3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
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
3364
# File 'lib/oci/dns/dns_client.rb', line 3304

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



3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
# File 'lib/oci/dns/dns_client.rb', line 3392

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 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 timestamp that states all returned resources were created on or after the indicated time.

  • :time_created_less_than (DateTime)

    An RFC 3339 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:



3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
# File 'lib/oci/dns/dns_client.rb', line 3490

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.



95
96
97
# File 'lib/oci/dns/dns_client.rb', line 95

def logger
  @api_client.config.logger
end

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

Note:

Click here 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:



3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
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
# File 'lib/oci/dns/dns_client.rb', line 3607

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



3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
# File 'lib/oci/dns/dns_client.rb', line 3702

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



3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
# File 'lib/oci/dns/dns_client.rb', line 3800

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



3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
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
# File 'lib/oci/dns/dns_client.rb', line 3894

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



3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
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
# File 'lib/oci/dns/dns_client.rb', line 3979

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



4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
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
# File 'lib/oci/dns/dns_client.rb', line 4061

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



4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
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
# File 'lib/oci/dns/dns_client.rb', line 4154

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



4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
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
# File 'lib/oci/dns/dns_client.rb', line 4241

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



4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
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
# File 'lib/oci/dns/dns_client.rb', line 4322

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



4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
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
# File 'lib/oci/dns/dns_client.rb', line 4403

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



4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
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
# File 'lib/oci/dns/dns_client.rb', line 4484

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



4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
# File 'lib/oci/dns/dns_client.rb', line 4575

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



4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
# File 'lib/oci/dns/dns_client.rb', line 4669

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