Class: OCI::Datacc::BaseinfraClient

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/datacc/baseinfra_client.rb

Overview

API for Database Infrastructure Cloud@Customer Service. Use this API to manage Database Infrastructure VM clusters, Application VMs, and related resources.

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) ⇒ BaseinfraClient

Creates a new BaseinfraClient. 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



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

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 + '/20251101'
  else
    region ||= config.region
    region ||= signer.region if signer.respond_to?(:region)
    self.region = region
  end
  logger.info "BaseinfraClient endpoint set to '#{@endpoint}'." if logger
end

Instance Attribute Details

#api_clientOCI::ApiClient (readonly)

Client used to make HTTP requests.

Returns:



15
16
17
# File 'lib/oci/datacc/baseinfra_client.rb', line 15

def api_client
  @api_client
end

#endpointString (readonly)

Fully qualified endpoint URL

Returns:

  • (String)


19
20
21
# File 'lib/oci/datacc/baseinfra_client.rb', line 19

def endpoint
  @endpoint
end

#regionString

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

Returns:

  • (String)


29
30
31
# File 'lib/oci/datacc/baseinfra_client.rb', line 29

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



25
26
27
# File 'lib/oci/datacc/baseinfra_client.rb', line 25

def retry_config
  @retry_config
end

Instance Method Details

#activate_infrastructure(activate_infrastructure_details, infrastructure_id, opts = {}) ⇒ Response

Note:

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

Activate an Database Infrastructure using the specified details.

Parameters:

  • activate_infrastructure_details (OCI::Datacc::Models::ActivateInfrastructureDetails)

    The activation details for the Database Infrastructure.

  • infrastructure_id (String)

    The OCID of the Database Infrastructure.

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

    For Optimistic concurrency control. In the PUT or DELETE call for a resource, set the 'if-match' parameter to the value of the Etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.

  • :opc_retry_token (String)

    A token that uniquely identifies a request, so the request can be retried without risk of processing that same action again, in the event of a timeout or server error. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource was deleted and purged from the system, then a retry of the original creation request can be rejected.

  • :opc_request_id (String)

    The client request identifier.

Returns:



125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# File 'lib/oci/datacc/baseinfra_client.rb', line 125

def activate_infrastructure(activate_infrastructure_details, infrastructure_id, opts = {})
  logger.debug 'Calling operation BaseinfraClient#activate_infrastructure.' if logger

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

  path = '/infrastructures/{infrastructureId}/actions/activate'.sub('{infrastructureId}', infrastructure_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(activate_infrastructure_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BaseinfraClient#activate_infrastructure') 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::Datacc::Models::Infrastructure'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#change_infrastructure_compartment(infrastructure_id, change_infrastructure_compartment_details, opts = {}) ⇒ Response

Note:

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

Change the Database Infrastructure Cloud@Customer Compartment to the specified OCID.

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)

    For Optimistic concurrency control. In the PUT or DELETE call for a resource, set the 'if-match' parameter to the value of the Etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.

  • :opc_retry_token (String)

    A token that uniquely identifies a request, so the request can be retried without risk of processing that same action again, in the event of a timeout or server error. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource was deleted and purged from the system, then a retry of the original creation request can be rejected.

  • :opc_request_id (String)

    The client request identifier.

Returns:

  • (Response)

    A Response object with data of type nil



198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
# File 'lib/oci/datacc/baseinfra_client.rb', line 198

def change_infrastructure_compartment(infrastructure_id, change_infrastructure_compartment_details, opts = {})
  logger.debug 'Calling operation BaseinfraClient#change_infrastructure_compartment.' if logger

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

  path = '/infrastructures/{infrastructureId}/actions/changeCompartment'.sub('{infrastructureId}', infrastructure_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(change_infrastructure_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BaseinfraClient#change_infrastructure_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_vm_cluster_network_compartment(vm_cluster_network_id, change_vm_cluster_network_compartment_details, opts = {}) ⇒ Response

Note:

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

Change the VM cluster network Compartment to the specified OCID.

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)

    For Optimistic concurrency control. In the PUT or DELETE call for a resource, set the 'if-match' parameter to the value of the Etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.

  • :opc_retry_token (String)

    A token that uniquely identifies a request, so the request can be retried without risk of processing that same action again, in the event of a timeout or server error. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource was deleted and purged from the system, then a retry of the original creation request can be rejected.

  • :opc_request_id (String)

    The client request identifier.

Returns:

  • (Response)

    A Response object with data of type nil



270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
# File 'lib/oci/datacc/baseinfra_client.rb', line 270

def change_vm_cluster_network_compartment(vm_cluster_network_id, change_vm_cluster_network_compartment_details, opts = {})
  logger.debug 'Calling operation BaseinfraClient#change_vm_cluster_network_compartment.' if logger

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

  path = '/vmClusterNetworks/{vmClusterNetworkId}/actions/changeCompartment'.sub('{vmClusterNetworkId}', vm_cluster_network_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(change_vm_cluster_network_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BaseinfraClient#change_vm_cluster_network_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_vm_instance_compartment(vm_instance_id, change_vm_instance_compartment_details, opts = {}) ⇒ Response

Note:

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

Change the VM instance on Database Infrastructure Compartment to the specified OCID.

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)

    For Optimistic concurrency control. In the PUT or DELETE call for a resource, set the 'if-match' parameter to the value of the Etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.

  • :opc_retry_token (String)

    A token that uniquely identifies a request, so the request can be retried without risk of processing that same action again, in the event of a timeout or server error. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource was deleted and purged from the system, then a retry of the original creation request can be rejected.

  • :opc_request_id (String)

    The client request identifier.

Returns:

  • (Response)

    A Response object with data of type nil



341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
# File 'lib/oci/datacc/baseinfra_client.rb', line 341

def change_vm_instance_compartment(vm_instance_id, change_vm_instance_compartment_details, opts = {})
  logger.debug 'Calling operation BaseinfraClient#change_vm_instance_compartment.' if logger

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

  path = '/vmInstances/{vmInstanceId}/actions/changeCompartment'.sub('{vmInstanceId}', vm_instance_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(change_vm_instance_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BaseinfraClient#change_vm_instance_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_infrastructure(create_infrastructure_details, opts = {}) ⇒ Response

Note:

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

Create a Database Infrastructure using the specified details.

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 the request can be retried without risk of processing that same action again, in the event of a timeout or server error. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource was deleted and purged from the system, then a retry of the original creation request can be rejected.

  • :opc_request_id (String)

    The client request identifier.

Returns:



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
430
431
432
433
434
435
436
437
438
439
440
441
442
# File 'lib/oci/datacc/baseinfra_client.rb', line 405

def create_infrastructure(create_infrastructure_details, opts = {})
  logger.debug 'Calling operation BaseinfraClient#create_infrastructure.' if logger

  raise "Missing the required parameter 'create_infrastructure_details' when calling create_infrastructure." if create_infrastructure_details.nil?

  path = '/infrastructures'
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(create_infrastructure_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BaseinfraClient#create_infrastructure') 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::Datacc::Models::Infrastructure'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_vm_cluster_network(create_vm_cluster_network_details, opts = {}) ⇒ Response

Note:

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

Create an VM cluster on Database Infrastructure network using the specified details.

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 the request can be retried without risk of processing that same action again, in the event of a timeout or server error. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource was deleted and purged from the system, then a retry of the original creation request can be rejected.

  • :opc_request_id (String)

    The client request identifier.

Returns:



467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
# File 'lib/oci/datacc/baseinfra_client.rb', line 467

def create_vm_cluster_network(create_vm_cluster_network_details, opts = {})
  logger.debug 'Calling operation BaseinfraClient#create_vm_cluster_network.' if logger

  raise "Missing the required parameter 'create_vm_cluster_network_details' when calling create_vm_cluster_network." if create_vm_cluster_network_details.nil?

  path = '/vmClusterNetworks'
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(create_vm_cluster_network_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BaseinfraClient#create_vm_cluster_network') 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::Datacc::Models::VmClusterNetwork'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_vm_instance(create_vm_instance_details, opts = {}) ⇒ Response

Note:

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

Create an VM instance on Database Infrastructure using the specified details.

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 the request can be retried without risk of processing that same action again, in the event of a timeout or server error. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource was deleted and purged from the system, then a retry of the original creation request can be rejected.

  • :opc_request_id (String)

    The client request identifier.

Returns:



529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
# File 'lib/oci/datacc/baseinfra_client.rb', line 529

def create_vm_instance(create_vm_instance_details, opts = {})
  logger.debug 'Calling operation BaseinfraClient#create_vm_instance.' if logger

  raise "Missing the required parameter 'create_vm_instance_details' when calling create_vm_instance." if create_vm_instance_details.nil?

  path = '/vmInstances'
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(create_vm_instance_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BaseinfraClient#create_vm_instance') 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::Datacc::Models::VmInstance'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_infrastructure(infrastructure_id, opts = {}) ⇒ Response

Note:

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

Delete the Database Infrastructure that has the specified OCID. It must be called once the resource usage is complete.

Parameters:

  • infrastructure_id (String)

    The OCID of the Database Infrastructure.

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

    For Optimistic concurrency control. In the PUT or DELETE call for a resource, set the 'if-match' parameter to the value of the Etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.

  • :opc_request_id (String)

    The client request identifier.

  • :is_force_delete_infrastructure (BOOLEAN)

    When set to true, infrastructure will be deleted even if it has dependent resources. If set to false, deletion will fail if the infrastructure has dependent resources. Default is false. (default to false)

Returns:

  • (Response)

    A Response object with data of type nil



596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
# File 'lib/oci/datacc/baseinfra_client.rb', line 596

def delete_infrastructure(infrastructure_id, opts = {})
  logger.debug 'Calling operation BaseinfraClient#delete_infrastructure.' if logger

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

  path = '/infrastructures/{infrastructureId}'.sub('{infrastructureId}', infrastructure_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:isForceDeleteInfrastructure] = opts[:is_force_delete_infrastructure] if !opts[:is_force_delete_infrastructure].nil?

  # 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-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: 'BaseinfraClient#delete_infrastructure') 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_vm_cluster_network(vm_cluster_network_id, opts = {}) ⇒ Response

Note:

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

Delete the VM cluster network on Database Infrastructure that has the specified OCID. It must be called once the resource usage is complete.

Parameters:

  • vm_cluster_network_id (String)

    The OCID of the VM cluster network.

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

    For Optimistic concurrency control. In the PUT or DELETE call for a resource, set the 'if-match' parameter to the value of the Etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.

  • :opc_request_id (String)

    The client request identifier.

Returns:

  • (Response)

    A Response object with data of type nil



659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
# File 'lib/oci/datacc/baseinfra_client.rb', line 659

def delete_vm_cluster_network(vm_cluster_network_id, opts = {})
  logger.debug 'Calling operation BaseinfraClient#delete_vm_cluster_network.' if logger

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

  path = '/vmClusterNetworks/{vmClusterNetworkId}'.sub('{vmClusterNetworkId}', vm_cluster_network_id.to_s)
  operation_signing_strategy = :standard

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

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-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: 'BaseinfraClient#delete_vm_cluster_network') 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_vm_instance(vm_instance_id, opts = {}) ⇒ Response

Note:

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

Delete the VM instance on Database Infrastructure that has the specified OCID. It must be called once the resource usage is complete.

Parameters:

  • vm_instance_id (String)

    The OCID of the VM instance.

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

    For Optimistic concurrency control. In the PUT or DELETE call for a resource, set the 'if-match' parameter to the value of the Etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.

  • :opc_request_id (String)

    The client request identifier.

Returns:

  • (Response)

    A Response object with data of type nil



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
747
748
749
750
751
752
753
754
755
756
757
# File 'lib/oci/datacc/baseinfra_client.rb', line 721

def delete_vm_instance(vm_instance_id, opts = {})
  logger.debug 'Calling operation BaseinfraClient#delete_vm_instance.' if logger

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

  path = '/vmInstances/{vmInstanceId}'.sub('{vmInstanceId}', vm_instance_id.to_s)
  operation_signing_strategy = :standard

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

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-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: 'BaseinfraClient#delete_vm_instance') 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

#download_infrastructure_config_file(infrastructure_id, opts = {}, &block) ⇒ Response

Note:

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

Downloads the configuration file for the specified Database Infrastructure Cloud@Customer.

Parameters:

  • infrastructure_id (String)

    The OCID of the Database Infrastructure.

  • 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

  • :opc_request_id (String)

    The client request identifier.

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



777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
# File 'lib/oci/datacc/baseinfra_client.rb', line 777

def download_infrastructure_config_file(infrastructure_id, opts = {}, &block)
  logger.debug 'Calling operation BaseinfraClient#download_infrastructure_config_file.' if logger

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

  path = '/infrastructures/{infrastructureId}/actions/downloadConfigFile'.sub('{infrastructureId}', infrastructure_id.to_s)
  operation_signing_strategy = :standard

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

  # Header Params
  header_params = {}
  header_params[:accept] = opts[:accept] if opts[:accept]
  header_params[:accept] ||= 'application/octet-stream'
  header_params[:'accept-encoding'] = opts[:accept_encoding] if opts[:accept_encoding]
  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: 'BaseinfraClient#download_infrastructure_config_file') 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

#download_infrastructure_validation_script(infrastructure_id, opts = {}, &block) ⇒ Response

Note:

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

Downloads the validation script for the specified Database Infrastructure Cloud@Customer.

Parameters:

  • infrastructure_id (String)

    The OCID of the Database Infrastructure.

  • 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

  • :opc_request_id (String)

    The client request identifier.

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



877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
# File 'lib/oci/datacc/baseinfra_client.rb', line 877

def download_infrastructure_validation_script(infrastructure_id, opts = {}, &block)
  logger.debug 'Calling operation BaseinfraClient#download_infrastructure_validation_script.' if logger

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

  path = '/infrastructures/{infrastructureId}/actions/downloadValidationScript'.sub('{infrastructureId}', infrastructure_id.to_s)
  operation_signing_strategy = :standard

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

  # Header Params
  header_params = {}
  header_params[:accept] = opts[:accept] if opts[:accept]
  header_params[:accept] ||= 'application/octet-stream'
  header_params[:'accept-encoding'] = opts[:accept_encoding] if opts[:accept_encoding]
  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: 'BaseinfraClient#download_infrastructure_validation_script') 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
Note:

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

Generates an VM cluster network configuration using the specified details.

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 the request can be retried without risk of processing that same action again, in the event of a timeout or server error. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource was deleted and purged from the system, then a retry of the original creation request can be rejected.

  • :opc_request_id (String)

    The client request identifier.

  • :if_match (String)

    For Optimistic concurrency control. In the PUT or DELETE call for a resource, set the 'if-match' parameter to the value of the Etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.

Returns:



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
# File 'lib/oci/datacc/baseinfra_client.rb', line 988

def generate_recommended_vm_cluster_network(generate_recommended_vm_cluster_network_details, opts = {})
  logger.debug 'Calling operation BaseinfraClient#generate_recommended_vm_cluster_network.' if logger

  raise "Missing the required parameter 'generate_recommended_vm_cluster_network_details' when calling generate_recommended_vm_cluster_network." if generate_recommended_vm_cluster_network_details.nil?

  path = '/vmClusterNetworks/actions/generateRecommendedVmClusterNetwork'
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(generate_recommended_vm_cluster_network_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BaseinfraClient#generate_recommended_vm_cluster_network') 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::Datacc::Models::CreateVmClusterNetworkDetails'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_infrastructure(infrastructure_id, opts = {}) ⇒ Response

Note:

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

Obtain the Database Infrastructure that has the specified OCID.

Parameters:

  • infrastructure_id (String)

    The OCID of the Database Infrastructure.

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

    The client request identifier.

Returns:



1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
# File 'lib/oci/datacc/baseinfra_client.rb', line 1046

def get_infrastructure(infrastructure_id, opts = {})
  logger.debug 'Calling operation BaseinfraClient#get_infrastructure.' if logger

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

  path = '/infrastructures/{infrastructureId}'.sub('{infrastructureId}', infrastructure_id.to_s)
  operation_signing_strategy = :standard

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

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'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: 'BaseinfraClient#get_infrastructure') 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::Datacc::Models::Infrastructure'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_infrastructure_scale_option(infrastructure_id, opts = {}) ⇒ Response

Note:

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

Get the available scale options for the infrastructure that has the specified OCID.

Parameters:

  • infrastructure_id (String)

    The OCID of the Database Infrastructure.

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

    The client request identifier.

Returns:



1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
# File 'lib/oci/datacc/baseinfra_client.rb', line 1102

def get_infrastructure_scale_option(infrastructure_id, opts = {})
  logger.debug 'Calling operation BaseinfraClient#get_infrastructure_scale_option.' if logger

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

  path = '/infrastructures/{infrastructureId}/scaleOptions'.sub('{infrastructureId}', infrastructure_id.to_s)
  operation_signing_strategy = :standard

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

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'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: 'BaseinfraClient#get_infrastructure_scale_option') 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::Datacc::Models::InfrastructureScaleOption'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_maintenance_execution(maintenance_execution_id, opts = {}) ⇒ Response

Note:

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

Gets information about the specified OCID.

Parameters:

  • maintenance_execution_id (String)

    The maintenance execution OCID.

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

    The client request identifier.

Returns:



1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
# File 'lib/oci/datacc/baseinfra_client.rb', line 1156

def get_maintenance_execution(maintenance_execution_id, opts = {})
  logger.debug 'Calling operation BaseinfraClient#get_maintenance_execution.' if logger

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

  path = '/maintenanceExecutions/{maintenanceExecutionId}'.sub('{maintenanceExecutionId}', maintenance_execution_id.to_s)
  operation_signing_strategy = :standard

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

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'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: 'BaseinfraClient#get_maintenance_execution') 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::Datacc::Models::MaintenanceExecution'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_maintenance_run(maintenance_run_id, opts = {}) ⇒ Response

Note:

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

Gets information about the specified OCID.

Parameters:

  • maintenance_run_id (String)

    The maintenance run OCID.

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

    The client request identifier.

Returns:



1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
# File 'lib/oci/datacc/baseinfra_client.rb', line 1210

def get_maintenance_run(maintenance_run_id, opts = {})
  logger.debug 'Calling operation BaseinfraClient#get_maintenance_run.' if logger

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

  path = '/maintenanceRuns/{maintenanceRunId}'.sub('{maintenanceRunId}', maintenance_run_id.to_s)
  operation_signing_strategy = :standard

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

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'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: 'BaseinfraClient#get_maintenance_run') 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::Datacc::Models::MaintenanceRun'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_vm_cluster_network(vm_cluster_network_id, opts = {}) ⇒ Response

Note:

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

Obtain the VM cluster network on Database Infrastructure that has the specified OCID.

Parameters:

  • vm_cluster_network_id (String)

    The OCID of the VM cluster network.

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

    The client request identifier.

Returns:



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

def get_vm_cluster_network(vm_cluster_network_id, opts = {})
  logger.debug 'Calling operation BaseinfraClient#get_vm_cluster_network.' if logger

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

  path = '/vmClusterNetworks/{vmClusterNetworkId}'.sub('{vmClusterNetworkId}', vm_cluster_network_id.to_s)
  operation_signing_strategy = :standard

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

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'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: 'BaseinfraClient#get_vm_cluster_network') 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::Datacc::Models::VmClusterNetwork'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_vm_instance(vm_instance_id, opts = {}) ⇒ Response

Note:

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

Obtain the VM instance on Database Infrastructure that has the specified OCID.

Parameters:

  • vm_instance_id (String)

    The OCID of the VM instance.

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

    The client request identifier.

Returns:



1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
# File 'lib/oci/datacc/baseinfra_client.rb', line 1321

def get_vm_instance(vm_instance_id, opts = {})
  logger.debug 'Calling operation BaseinfraClient#get_vm_instance.' if logger

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

  path = '/vmInstances/{vmInstanceId}'.sub('{vmInstanceId}', vm_instance_id.to_s)
  operation_signing_strategy = :standard

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

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'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: 'BaseinfraClient#get_vm_instance') 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::Datacc::Models::VmInstance'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_work_request(work_request_id, opts = {}) ⇒ Response

Note:

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

Get the status of the work request having the specified work request OCID.

Parameters:

  • work_request_id (String)

    The OCID of the asynchronous work request.

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

    The client request identifier.

Returns:



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

def get_work_request(work_request_id, opts = {})
  logger.debug 'Calling operation BaseinfraClient#get_work_request.' if logger

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

  path = '/workRequests/{workRequestId}'.sub('{workRequestId}', work_request_id.to_s)
  operation_signing_strategy = :standard

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

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'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: 'BaseinfraClient#get_work_request') 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::Datacc::Models::WorkRequest'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Obtain a list of Database Infrastructures.

Parameters:

  • compartment_id (String)

    The OCID of the compartment. For list operations, you may provide the tenant [OCID] in this field. When a tenant OCID is provided, it will be validated against the caller's tenant and then treated as tenant scope (compartmentId filtering is not applied).

  • 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

  • :display_name (String)

    A filter to return resources that match the entire display name given. The match is case sensitive.

  • :lifecycle_state (Array<String>)

    A filter to return resources that match the specified lifecycle state. Allowed values are: CREATING, REQUIRES_VALIDATION, VALIDATING, VALIDATION_FAILED, REQUIRES_ACTIVATION, ACTIVATING, ACTIVE, ACTIVATION_FAILED, FAILED, UPDATING, DELETING, DELETED, DISCONNECTED, MAINTENANCE_IN_PROGRESS

  • :limit (Integer)

    The maximum number of items to return in a page. (default to 10)

  • :page (String)

    The page token representing the page at which you want to start retrieving results. This token is usually retrieved from a previous list call.

  • :sort_order (String)

    The sort order that you want to use, which is either ASC or DESC. (default to ASC)

  • :sort_by (String)

    The field by which you want to sort. You can provide only one type of sort order. The default order for timeCreated is descending. The default order for displayName is ascending. If no value is specified, then timeCreated is the default. When listing software images within the same version, using sortBy=buildIdentifier is recommended. buildIdentifier is a monotonically increasing, time-ordered string marker (yyyy-mm-dd-hh:mm:ss) stored with the image. (default to timeCreated) Allowed values are: timeCreated, displayName, buildIdentifier

  • :opc_request_id (String)

    The client request identifier.

Returns:



1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
# File 'lib/oci/datacc/baseinfra_client.rb', line 1443

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

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


  lifecycle_state_allowable_values = %w[CREATING REQUIRES_VALIDATION VALIDATING VALIDATION_FAILED REQUIRES_ACTIVATION ACTIVATING ACTIVE ACTIVATION_FAILED FAILED UPDATING DELETING DELETED DISCONNECTED MAINTENANCE_IN_PROGRESS]
  if opts[:lifecycle_state] && !opts[:lifecycle_state].empty?
    opts[:lifecycle_state].each do |val_to_check|
      unless lifecycle_state_allowable_values.include?(val_to_check)
        raise 'Invalid value for "lifecycle_state", must be one of CREATING, REQUIRES_VALIDATION, VALIDATING, VALIDATION_FAILED, REQUIRES_ACTIVATION, ACTIVATING, ACTIVE, ACTIVATION_FAILED, FAILED, UPDATING, DELETING, DELETED, DISCONNECTED, MAINTENANCE_IN_PROGRESS.'
      end
    end
  end

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

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

  path = '/infrastructures'
  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[:lifecycleState] = OCI::ApiClient.build_collection_params(opts[:lifecycle_state], :multi) if opts[:lifecycle_state] && !opts[:lifecycle_state].empty?
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

  # 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: 'BaseinfraClient#list_infrastructures') 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::Datacc::Models::InfrastructureCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Gets a list of the maintenance executions in the specified compartment.

Parameters:

  • compartment_id (String)

    The OCID of the compartment. For list operations, you may provide the tenant [OCID] in this field. When a tenant OCID is provided, it will be validated against the caller's tenant and then treated as tenant scope (compartmentId filtering is not applied).

  • 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

  • :display_name (String)

    A filter to return resources that match the entire display name given. The match is case sensitive.

  • :infrastructure_id (String)

    The Database Infrastructure ID.

  • :target_resource_type (String)

    The type of the target resource.

  • :maintenance_type (String)

    The maintenance type.

  • :maintenance_run_id (String)

    The maintenance run OCID.

  • :lifecycle_state (String)

    A filter to return only resources that match the given lifecycle state exactly.

  • :maintenance_subtype (String)

    The sub-type of the maintenance run.

  • :time_accepted_less_than_or_equal_to (DateTime)

    Filter maintenance run for before given time.

  • :time_accepted_greater_than_or_equal_to (DateTime)

    Filter maintenance run for after given time.

  • :type (String)

    The maintenance execution type.

  • :limit (Integer)

    The maximum number of items to return in a page. (default to 10)

  • :page (String)

    The page token representing the page at which you want to start retrieving results. This token is usually retrieved from a previous list call.

  • :sort_by (String)

    The field by which you want to sort. You can provide only one type of sort order. The default order for timeCreated is descending. The default order for displayName is ascending. If no value is specified, then timeCreated is the default. When listing software images within the same version, using sortBy=buildIdentifier is recommended. buildIdentifier is a monotonically increasing, time-ordered string marker (yyyy-mm-dd-hh:mm:ss) stored with the image. (default to timeCreated) Allowed values are: timeCreated, displayName, buildIdentifier

  • :sort_order (String)

    The sort order that you want to use, which is either ASC or DESC. (default to ASC)

  • :opc_request_id (String)

    The client request identifier.

Returns:



1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
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
1620
# File 'lib/oci/datacc/baseinfra_client.rb', line 1542

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

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

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

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

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

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

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

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

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

  path = '/maintenanceExecutions'
  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[:infrastructureId] = opts[:infrastructure_id] if opts[:infrastructure_id]
  query_params[:targetResourceType] = opts[:target_resource_type] if opts[:target_resource_type]
  query_params[:maintenanceType] = opts[:maintenance_type] if opts[:maintenance_type]
  query_params[:maintenanceRunId] = opts[:maintenance_run_id] if opts[:maintenance_run_id]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:maintenanceSubtype] = opts[:maintenance_subtype] if opts[:maintenance_subtype]
  query_params[:timeAcceptedLessThanOrEqualTo] = opts[:time_accepted_less_than_or_equal_to] if opts[:time_accepted_less_than_or_equal_to]
  query_params[:timeAcceptedGreaterThanOrEqualTo] = opts[:time_accepted_greater_than_or_equal_to] if opts[:time_accepted_greater_than_or_equal_to]
  query_params[:type] = opts[:type] if opts[:type]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BaseinfraClient#list_maintenance_executions') 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::Datacc::Models::MaintenanceExecutionCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Gets a list of the maintenance runs in the specified compartment.

Parameters:

  • compartment_id (String)

    The OCID of the compartment. For list operations, you may provide the tenant [OCID] in this field. When a tenant OCID is provided, it will be validated against the caller's tenant and then treated as tenant scope (compartmentId filtering is not applied).

  • 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

  • :display_name (String)

    A filter to return resources that match the entire display name given. The match is case sensitive.

  • :infrastructure_id (String)

    The Database Infrastructure ID.

  • :target_resource_type (String)

    The type of the target resource.

  • :maintenance_type (String)

    The maintenance type.

  • :lifecycle_state (String)

    A filter to return only resources that match the given lifecycle state exactly.

  • :maintenance_subtype (String)

    The sub-type of the maintenance run.

  • :time_accepted_less_than_or_equal_to (DateTime)

    Filter maintenance run for before given time.

  • :time_accepted_greater_than_or_equal_to (DateTime)

    Filter maintenance run for after given time.

  • :limit (Integer)

    The maximum number of items to return in a page. (default to 10)

  • :page (String)

    The page token representing the page at which you want to start retrieving results. This token is usually retrieved from a previous list call.

  • :sort_by (String)

    The field by which you want to sort. You can provide only one type of sort order. The default order for timeCreated is descending. The default order for displayName is ascending. If no value is specified, then timeCreated is the default. When listing software images within the same version, using sortBy=buildIdentifier is recommended. buildIdentifier is a monotonically increasing, time-ordered string marker (yyyy-mm-dd-hh:mm:ss) stored with the image. (default to timeCreated) Allowed values are: timeCreated, displayName, buildIdentifier

  • :sort_order (String)

    The sort order that you want to use, which is either ASC or DESC. (default to ASC)

  • :opc_request_id (String)

    The client request identifier.

Returns:



1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
# File 'lib/oci/datacc/baseinfra_client.rb', line 1657

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

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

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

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

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

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

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

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

  path = '/maintenanceRuns'
  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[:infrastructureId] = opts[:infrastructure_id] if opts[:infrastructure_id]
  query_params[:targetResourceType] = opts[:target_resource_type] if opts[:target_resource_type]
  query_params[:maintenanceType] = opts[:maintenance_type] if opts[:maintenance_type]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:maintenanceSubtype] = opts[:maintenance_subtype] if opts[:maintenance_subtype]
  query_params[:timeAcceptedLessThanOrEqualTo] = opts[:time_accepted_less_than_or_equal_to] if opts[:time_accepted_less_than_or_equal_to]
  query_params[:timeAcceptedGreaterThanOrEqualTo] = opts[:time_accepted_greater_than_or_equal_to] if opts[:time_accepted_greater_than_or_equal_to]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BaseinfraClient#list_maintenance_runs') 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::Datacc::Models::MaintenanceRunCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Obtain a list of VM cluster networks on Database Infrastructure.

Parameters:

  • compartment_id (String)

    The OCID of the compartment. For list operations, you may provide the tenant [OCID] in this field. When a tenant OCID is provided, it will be validated against the caller's tenant and then treated as tenant scope (compartmentId filtering is not applied).

  • 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

  • :display_name (String)

    A filter to return resources that match the entire display name given. The match is case sensitive.

  • :lifecycle_state (Array<String>)

    A filter to return resources that match the specified lifecycle state. Allowed values are: CREATING, REQUIRES_VALIDATION, VALIDATING, VALIDATED, VALIDATION_FAILED, UPDATING, ALLOCATED, DELETING, DELETED

  • :is_scan_enabled (BOOLEAN)

    A filter to return VM cluster network resources that matches the specified value.

  • :limit (Integer)

    The maximum number of items to return in a page. (default to 10)

  • :page (String)

    The page token representing the page at which you want to start retrieving results. This token is usually retrieved from a previous list call.

  • :sort_order (String)

    The sort order that you want to use, which is either ASC or DESC. (default to ASC)

  • :sort_by (String)

    The field by which you want to sort. You can provide only one type of sort order. The default order for timeCreated is descending. The default order for displayName is ascending. If no value is specified, then timeCreated is the default. When listing software images within the same version, using sortBy=buildIdentifier is recommended. buildIdentifier is a monotonically increasing, time-ordered string marker (yyyy-mm-dd-hh:mm:ss) stored with the image. (default to timeCreated) Allowed values are: timeCreated, displayName, buildIdentifier

  • :opc_request_id (String)

    The client request identifier.

  • :infrastructure_id (String)

    The OCID of the Database Infrastructure.

  • :node_count (Integer)

    Count of virtual machines in this VM cluster.

  • :vm_network_consumer_type (String)

    VM network consumer type.

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
1827
1828
1829
1830
1831
1832
1833
# File 'lib/oci/datacc/baseinfra_client.rb', line 1765

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

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


  lifecycle_state_allowable_values = %w[CREATING REQUIRES_VALIDATION VALIDATING VALIDATED VALIDATION_FAILED UPDATING ALLOCATED DELETING DELETED]
  if opts[:lifecycle_state] && !opts[:lifecycle_state].empty?
    opts[:lifecycle_state].each do |val_to_check|
      unless lifecycle_state_allowable_values.include?(val_to_check)
        raise 'Invalid value for "lifecycle_state", must be one of CREATING, REQUIRES_VALIDATION, VALIDATING, VALIDATED, VALIDATION_FAILED, UPDATING, ALLOCATED, DELETING, DELETED.'
      end
    end
  end

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

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

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

  path = '/vmClusterNetworks'
  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[:lifecycleState] = OCI::ApiClient.build_collection_params(opts[:lifecycle_state], :multi) if opts[:lifecycle_state] && !opts[:lifecycle_state].empty?
  query_params[:isScanEnabled] = opts[:is_scan_enabled] if !opts[:is_scan_enabled].nil?
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:infrastructureId] = opts[:infrastructure_id] if opts[:infrastructure_id]
  query_params[:nodeCount] = opts[:node_count] if opts[:node_count]
  query_params[:vmNetworkConsumerType] = opts[:vm_network_consumer_type] if opts[:vm_network_consumer_type]

  # 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: 'BaseinfraClient#list_vm_cluster_networks') 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::Datacc::Models::VmClusterNetworkCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Obtain a list of VM instances.

Parameters:

  • compartment_id (String)

    The OCID of the compartment. For list operations, you may provide the tenant [OCID] in this field. When a tenant OCID is provided, it will be validated against the caller's tenant and then treated as tenant scope (compartmentId filtering is not applied).

  • 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

  • :display_name (String)

    A filter to return resources that match the entire display name given. The match is case sensitive.

  • :lifecycle_state (Array<String>)

    A filter to return resources that match the specified lifecycle state. Allowed values are: CREATING, ACTIVE, INACTIVE, UPDATING, DELETING, DELETED

  • :limit (Integer)

    The maximum number of items to return in a page. (default to 10)

  • :page (String)

    The page token representing the page at which you want to start retrieving results. This token is usually retrieved from a previous list call.

  • :sort_order (String)

    The sort order that you want to use, which is either ASC or DESC. (default to ASC)

  • :sort_by (String)

    The field by which you want to sort. You can provide only one type of sort order. The default order for timeCreated is descending. The default order for displayName is ascending. If no value is specified, then timeCreated is the default. When listing software images within the same version, using sortBy=buildIdentifier is recommended. buildIdentifier is a monotonically increasing, time-ordered string marker (yyyy-mm-dd-hh:mm:ss) stored with the image. (default to timeCreated) Allowed values are: timeCreated, displayName, buildIdentifier

  • :opc_request_id (String)

    The client request identifier.

  • :infrastructure_id (String)

    The OCID of the Database Infrastructure.

  • :base_server_id (String)

    The OCID of the Database Infrastructure Server Id.

Returns:



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

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

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


  lifecycle_state_allowable_values = %w[CREATING ACTIVE INACTIVE UPDATING DELETING DELETED]
  if opts[:lifecycle_state] && !opts[:lifecycle_state].empty?
    opts[:lifecycle_state].each do |val_to_check|
      unless lifecycle_state_allowable_values.include?(val_to_check)
        raise 'Invalid value for "lifecycle_state", must be one of CREATING, ACTIVE, INACTIVE, UPDATING, DELETING, DELETED.'
      end
    end
  end

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

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

  path = '/vmInstances'
  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[:lifecycleState] = OCI::ApiClient.build_collection_params(opts[:lifecycle_state], :multi) if opts[:lifecycle_state] && !opts[:lifecycle_state].empty?
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:infrastructureId] = opts[:infrastructure_id] if opts[:infrastructure_id]
  query_params[:baseServerId] = opts[:base_server_id] if opts[:base_server_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: 'BaseinfraClient#list_vm_instances') 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::Datacc::Models::VmInstanceCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_work_request_errors(work_request_id, opts = {}) ⇒ Response

Note:

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

View the list of errors for the work request that have the specified work request OCID.

Parameters:

  • work_request_id (String)

    The OCID of the asynchronous work request.

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

    The client request identifier.

  • :page (String)

    The page token representing the page at which you want to start retrieving results. This token is usually retrieved from a previous list call.

  • :limit (Integer)

    The maximum number of items to return in a page. (default to 10)

  • :sort_order (String)

    The sort order that you want to use, which is either ASC or DESC. (default to ASC)

Returns:



1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
# File 'lib/oci/datacc/baseinfra_client.rb', line 1951

def list_work_request_errors(work_request_id, opts = {})
  logger.debug 'Calling operation BaseinfraClient#list_work_request_errors.' if logger

  raise "Missing the required parameter 'work_request_id' when calling list_work_request_errors." if work_request_id.nil?

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

  path = '/workRequests/{workRequestId}/errors'.sub('{workRequestId}', work_request_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  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]

  # 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: 'BaseinfraClient#list_work_request_errors') 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::Datacc::Models::WorkRequestErrorCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_work_request_logs(work_request_id, opts = {}) ⇒ Response

Note:

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

View the log entries for the work request that have the specified work request OCID.

Parameters:

  • work_request_id (String)

    The OCID of the asynchronous work request.

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

    The client request identifier.

  • :page (String)

    The page token representing the page at which you want to start retrieving results. This token is usually retrieved from a previous list call.

  • :limit (Integer)

    The maximum number of items to return in a page. (default to 10)

  • :sort_order (String)

    The sort order that you want to use, which is either ASC or DESC. (default to ASC)

Returns:



2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
# File 'lib/oci/datacc/baseinfra_client.rb', line 2016

def list_work_request_logs(work_request_id, opts = {})
  logger.debug 'Calling operation BaseinfraClient#list_work_request_logs.' if logger

  raise "Missing the required parameter 'work_request_id' when calling list_work_request_logs." if work_request_id.nil?

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

  path = '/workRequests/{workRequestId}/logs'.sub('{workRequestId}', work_request_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  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]

  # 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: 'BaseinfraClient#list_work_request_logs') 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::Datacc::Models::WorkRequestLogEntryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

View a list of work request details in the specified compartment.

Parameters:

  • compartment_id (String)

    The OCID of the compartment. For list operations, you may provide the tenant [OCID] in this field. When a tenant OCID is provided, it will be validated against the caller's tenant and then treated as tenant scope (compartmentId filtering is not applied).

  • 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

  • :resource_id (String)

    The OCID of the work request resource.

  • :opc_request_id (String)

    The client request identifier.

  • :page (String)

    The page token representing the page at which you want to start retrieving results. This token is usually retrieved from a previous list call.

  • :limit (Integer)

    The maximum number of items to return in a page. (default to 10)

Returns:



2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
# File 'lib/oci/datacc/baseinfra_client.rb', line 2084

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

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

  path = '/workRequests'
  operation_signing_strategy = :standard

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

  # 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: 'BaseinfraClient#list_work_requests') 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::Datacc::Models::WorkRequestCollection'
    )
  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.



94
95
96
# File 'lib/oci/datacc/baseinfra_client.rb', line 94

def logger
  @api_client.config.logger
end

#migrate_vm_instance(vm_instance_id, opts = {}) ⇒ Response

Note:

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

Migrate the VM instance on Database Infrastructure that has the specified OCID.

Parameters:

  • vm_instance_id (String)

    The OCID of the VM instance.

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

    For Optimistic concurrency control. In the PUT or DELETE call for a resource, set the 'if-match' parameter to the value of the Etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.

  • :opc_retry_token (String)

    A token that uniquely identifies a request, so the request can be retried without risk of processing that same action again, in the event of a timeout or server error. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource was deleted and purged from the system, then a retry of the original creation request can be rejected.

  • :opc_request_id (String)

    The client request identifier.

Returns:

  • (Response)

    A Response object with data of type nil



2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
# File 'lib/oci/datacc/baseinfra_client.rb', line 2154

def migrate_vm_instance(vm_instance_id, opts = {})
  logger.debug 'Calling operation BaseinfraClient#migrate_vm_instance.' if logger

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

  path = '/vmInstances/{vmInstanceId}/actions/migrate'.sub('{vmInstanceId}', vm_instance_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

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

#reschedule_maintenance_run(maintenance_run_id, reschedule_maintenance_run_details, opts = {}) ⇒ Response

Note:

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

Reschedules the specified maintenance run by providing a new timeScheduled value. Only maintenance runs in eligible states may be rescheduled.

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)

    For Optimistic concurrency control. In the PUT or DELETE call for a resource, set the 'if-match' parameter to the value of the Etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.

  • :opc_request_id (String)

    The client request identifier.

  • :opc_retry_token (String)

    A token that uniquely identifies a request, so the request can be retried without risk of processing that same action again, in the event of a timeout or server error. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource was deleted and purged from the system, then a retry of the original creation request can be rejected.

Returns:



2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
# File 'lib/oci/datacc/baseinfra_client.rb', line 2225

def reschedule_maintenance_run(maintenance_run_id, reschedule_maintenance_run_details, opts = {})
  logger.debug 'Calling operation BaseinfraClient#reschedule_maintenance_run.' if logger

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

  path = '/maintenanceRuns/{maintenanceRunId}/actions/reschedule'.sub('{maintenanceRunId}', maintenance_run_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(reschedule_maintenance_run_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BaseinfraClient#reschedule_maintenance_run') 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::Datacc::Models::MaintenanceRun'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#restart_vm_instance(vm_instance_id, opts = {}) ⇒ Response

Note:

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

Restart the VM instance on Database Infrastructure that has the specified OCID.

Parameters:

  • vm_instance_id (String)

    The OCID of the VM instance.

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

    For Optimistic concurrency control. In the PUT or DELETE call for a resource, set the 'if-match' parameter to the value of the Etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.

  • :opc_retry_token (String)

    A token that uniquely identifies a request, so the request can be retried without risk of processing that same action again, in the event of a timeout or server error. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource was deleted and purged from the system, then a retry of the original creation request can be rejected.

  • :opc_request_id (String)

    The client request identifier.

Returns:

  • (Response)

    A Response object with data of type nil



2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
# File 'lib/oci/datacc/baseinfra_client.rb', line 2297

def restart_vm_instance(vm_instance_id, opts = {})
  logger.debug 'Calling operation BaseinfraClient#restart_vm_instance.' if logger

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

  path = '/vmInstances/{vmInstanceId}/actions/restart'.sub('{vmInstanceId}', vm_instance_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

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

#scale_infrastructure_storage(scale_infrastructure_storage_details, infrastructure_id, opts = {}) ⇒ Response

Note:

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

Scale storage for the specified infrastructure using the specified details.

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)

    For Optimistic concurrency control. In the PUT or DELETE call for a resource, set the 'if-match' parameter to the value of the Etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.

  • :opc_retry_token (String)

    A token that uniquely identifies a request, so the request can be retried without risk of processing that same action again, in the event of a timeout or server error. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource was deleted and purged from the system, then a retry of the original creation request can be rejected.

  • :opc_request_id (String)

    The client request identifier.

Returns:

  • (Response)

    A Response object with data of type nil



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

def scale_infrastructure_storage(scale_infrastructure_storage_details, infrastructure_id, opts = {})
  logger.debug 'Calling operation BaseinfraClient#scale_infrastructure_storage.' if logger

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

  path = '/infrastructures/{infrastructureId}/actions/scaleStorage'.sub('{infrastructureId}', infrastructure_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(scale_infrastructure_storage_details)

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

#scale_vm_instance(scale_vm_instance_details, vm_instance_id, opts = {}) ⇒ Response

Note:

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

Scale the VM instance on Database Infrastructure that has the specified OCID.

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)

    For Optimistic concurrency control. In the PUT or DELETE call for a resource, set the 'if-match' parameter to the value of the Etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.

  • :opc_retry_token (String)

    A token that uniquely identifies a request, so the request can be retried without risk of processing that same action again, in the event of a timeout or server error. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource was deleted and purged from the system, then a retry of the original creation request can be rejected.

  • :opc_request_id (String)

    The client request identifier.

Returns:

  • (Response)

    A Response object with data of type nil



2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
# File 'lib/oci/datacc/baseinfra_client.rb', line 2438

def scale_vm_instance(scale_vm_instance_details, vm_instance_id, opts = {})
  logger.debug 'Calling operation BaseinfraClient#scale_vm_instance.' if logger

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

  path = '/vmInstances/{vmInstanceId}/actions/scale'.sub('{vmInstanceId}', vm_instance_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(scale_vm_instance_details)

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

#start_vm_instance(vm_instance_id, opts = {}) ⇒ Response

Note:

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

Start the VM instance on Database Infrastructure that has the specified OCID.

Parameters:

  • vm_instance_id (String)

    The OCID of the VM instance.

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

    For Optimistic concurrency control. In the PUT or DELETE call for a resource, set the 'if-match' parameter to the value of the Etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.

  • :opc_retry_token (String)

    A token that uniquely identifies a request, so the request can be retried without risk of processing that same action again, in the event of a timeout or server error. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource was deleted and purged from the system, then a retry of the original creation request can be rejected.

  • :opc_request_id (String)

    The client request identifier.

Returns:

  • (Response)

    A Response object with data of type nil



2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
# File 'lib/oci/datacc/baseinfra_client.rb', line 2509

def start_vm_instance(vm_instance_id, opts = {})
  logger.debug 'Calling operation BaseinfraClient#start_vm_instance.' if logger

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

  path = '/vmInstances/{vmInstanceId}/actions/start'.sub('{vmInstanceId}', vm_instance_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

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

#stop_vm_instance(vm_instance_id, opts = {}) ⇒ Response

Note:

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

Stop the VM instance on Database Infrastructure that has the specified OCID.

Parameters:

  • vm_instance_id (String)

    The OCID of the VM instance.

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

    For Optimistic concurrency control. In the PUT or DELETE call for a resource, set the 'if-match' parameter to the value of the Etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.

  • :opc_retry_token (String)

    A token that uniquely identifies a request, so the request can be retried without risk of processing that same action again, in the event of a timeout or server error. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource was deleted and purged from the system, then a retry of the original creation request can be rejected.

  • :opc_request_id (String)

    The client request identifier.

Returns:

  • (Response)

    A Response object with data of type nil



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
2616
2617
# File 'lib/oci/datacc/baseinfra_client.rb', line 2579

def stop_vm_instance(vm_instance_id, opts = {})
  logger.debug 'Calling operation BaseinfraClient#stop_vm_instance.' if logger

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

  path = '/vmInstances/{vmInstanceId}/actions/stop'.sub('{vmInstanceId}', vm_instance_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

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

#update_infrastructure(update_infrastructure_details, infrastructure_id, opts = {}) ⇒ Response

Note:

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

Update the Database Infrastructure that has the specified OCID.

Parameters:

  • update_infrastructure_details (OCI::Datacc::Models::UpdateInfrastructureDetails)

    The updated Database Infrastructure details.

  • infrastructure_id (String)

    The OCID of the Database Infrastructure.

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

    For Optimistic concurrency control. In the PUT or DELETE call for a resource, set the 'if-match' parameter to the value of the Etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.

  • :opc_request_id (String)

    The client request identifier.

Returns:



2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
# File 'lib/oci/datacc/baseinfra_client.rb', line 2644

def update_infrastructure(update_infrastructure_details, infrastructure_id, opts = {})
  logger.debug 'Calling operation BaseinfraClient#update_infrastructure.' if logger

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

  path = '/infrastructures/{infrastructureId}'.sub('{infrastructureId}', infrastructure_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(update_infrastructure_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BaseinfraClient#update_infrastructure') 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::Datacc::Models::Infrastructure'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_maintenance_run(update_maintenance_run_details, maintenance_run_id, opts = {}) ⇒ Response

Note:

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

Update maintenance run attributes.

Parameters:

  • update_maintenance_run_details (OCI::Datacc::Models::UpdateMaintenanceRunDetails)

    The updated maintenance run details.

  • maintenance_run_id (String)

    The maintenance run OCID.

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

    For Optimistic concurrency control. In the PUT or DELETE call for a resource, set the 'if-match' parameter to the value of the Etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.

  • :opc_request_id (String)

    The client request identifier.

Returns:



2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
# File 'lib/oci/datacc/baseinfra_client.rb', line 2708

def update_maintenance_run(update_maintenance_run_details, maintenance_run_id, opts = {})
  logger.debug 'Calling operation BaseinfraClient#update_maintenance_run.' if logger

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

  path = '/maintenanceRuns/{maintenanceRunId}'.sub('{maintenanceRunId}', maintenance_run_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(update_maintenance_run_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BaseinfraClient#update_maintenance_run') 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::Datacc::Models::MaintenanceRun'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_vm_cluster_network(update_vm_cluster_network_details, vm_cluster_network_id, opts = {}) ⇒ Response

Note:

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

Update the VM cluster network on Database Infrastructure that has the specified OCID.

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)

    For Optimistic concurrency control. In the PUT or DELETE call for a resource, set the 'if-match' parameter to the value of the Etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.

  • :opc_request_id (String)

    The client request identifier.

Returns:



2773
2774
2775
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
# File 'lib/oci/datacc/baseinfra_client.rb', line 2773

def update_vm_cluster_network(update_vm_cluster_network_details, vm_cluster_network_id, opts = {})
  logger.debug 'Calling operation BaseinfraClient#update_vm_cluster_network.' if logger

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

  path = '/vmClusterNetworks/{vmClusterNetworkId}'.sub('{vmClusterNetworkId}', vm_cluster_network_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(update_vm_cluster_network_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BaseinfraClient#update_vm_cluster_network') 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::Datacc::Models::VmClusterNetwork'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_vm_instance(update_vm_instance_details, vm_instance_id, opts = {}) ⇒ Response

Note:

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

Update the VM instance on Database Infrastructure that has the specified OCID.

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)

    For Optimistic concurrency control. In the PUT or DELETE call for a resource, set the 'if-match' parameter to the value of the Etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.

  • :opc_request_id (String)

    The client request identifier.

Returns:



2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
# File 'lib/oci/datacc/baseinfra_client.rb', line 2837

def update_vm_instance(update_vm_instance_details, vm_instance_id, opts = {})
  logger.debug 'Calling operation BaseinfraClient#update_vm_instance.' if logger

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

  path = '/vmInstances/{vmInstanceId}'.sub('{vmInstanceId}', vm_instance_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(update_vm_instance_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BaseinfraClient#update_vm_instance') 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::Datacc::Models::VmInstance'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#validate_infrastructure(validate_infrastructure_details, infrastructure_id, opts = {}) ⇒ Response

Note:

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

Validate an Database Infrastructure using the specified details.

Parameters:

  • validate_infrastructure_details (OCI::Datacc::Models::ValidateInfrastructureDetails)

    The validation details for the Database Infrastructure.

  • infrastructure_id (String)

    The OCID of the Database Infrastructure.

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

    For Optimistic concurrency control. In the PUT or DELETE call for a resource, set the 'if-match' parameter to the value of the Etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.

  • :opc_retry_token (String)

    A token that uniquely identifies a request, so the request can be retried without risk of processing that same action again, in the event of a timeout or server error. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource was deleted and purged from the system, then a retry of the original creation request can be rejected.

  • :opc_request_id (String)

    The client request identifier.

Returns:



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
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
# File 'lib/oci/datacc/baseinfra_client.rb', line 2907

def validate_infrastructure(validate_infrastructure_details, infrastructure_id, opts = {})
  logger.debug 'Calling operation BaseinfraClient#validate_infrastructure.' if logger

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

  path = '/infrastructures/{infrastructureId}/actions/validate'.sub('{infrastructureId}', infrastructure_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(validate_infrastructure_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BaseinfraClient#validate_infrastructure') 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::Datacc::Models::Infrastructure'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#validate_vm_cluster_network(vm_cluster_network_id, opts = {}) ⇒ Response

Note:

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

Validates an VM cluster network on Database Infrastructure.

Parameters:

  • vm_cluster_network_id (String)

    The OCID of the VM cluster network.

  • 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 the request can be retried without risk of processing that same action again, in the event of a timeout or server error. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource was deleted and purged from the system, then a retry of the original creation request can be rejected.

  • :opc_request_id (String)

    The client request identifier.

  • :if_match (String)

    For Optimistic concurrency control. In the PUT or DELETE call for a resource, set the 'if-match' parameter to the value of the Etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the Etag that you provide matches the current Etag value for the resource.

Returns:

  • (Response)

    A Response object with data of type nil



2978
2979
2980
2981
2982
2983
2984
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
# File 'lib/oci/datacc/baseinfra_client.rb', line 2978

def validate_vm_cluster_network(vm_cluster_network_id, opts = {})
  logger.debug 'Calling operation BaseinfraClient#validate_vm_cluster_network.' if logger

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

  path = '/vmClusterNetworks/{vmClusterNetworkId}/actions/validateVmClusterNetwork'.sub('{vmClusterNetworkId}', vm_cluster_network_id.to_s)
  operation_signing_strategy = :standard

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

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'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]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = nil

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