Class: OCI::DisasterRecovery::DisasterRecoveryClient

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/disaster_recovery/disaster_recovery_client.rb

Overview

Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, and application.

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

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



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

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

Instance Attribute Details

#api_clientOCI::ApiClient (readonly)

Client used to make HTTP requests.

Returns:



18
19
20
# File 'lib/oci/disaster_recovery/disaster_recovery_client.rb', line 18

def api_client
  @api_client
end

#endpointString (readonly)

Fully qualified endpoint URL

Returns:

  • (String)


22
23
24
# File 'lib/oci/disaster_recovery/disaster_recovery_client.rb', line 22

def endpoint
  @endpoint
end

#regionString

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

Returns:

  • (String)


32
33
34
# File 'lib/oci/disaster_recovery/disaster_recovery_client.rb', line 32

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



28
29
30
# File 'lib/oci/disaster_recovery/disaster_recovery_client.rb', line 28

def retry_config
  @retry_config
end

Instance Method Details

#associate_dr_protection_group(associate_dr_protection_group_details, dr_protection_group_id, opts = {}) ⇒ Response

Note:

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

Create an association between the DR protection group identified by drProtectionGroupId and another DR protection group.

Parameters:

  • associate_dr_protection_group_details (OCI::DisasterRecovery::Models::AssociateDrProtectionGroupDetails)

    Details for creating an association between two DR protection groups.

  • dr_protection_group_id (String)

    The OCID of the DR protection group.

    Example: ocid1.drprotectiongroup.oc1..uniqueID

  • 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 will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_retry_token (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# File 'lib/oci/disaster_recovery/disaster_recovery_client.rb', line 133

def associate_dr_protection_group(associate_dr_protection_group_details, dr_protection_group_id, opts = {})
  logger.debug 'Calling operation DisasterRecoveryClient#associate_dr_protection_group.' if logger

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

  path = '/drProtectionGroups/{drProtectionGroupId}/actions/associate'.sub('{drProtectionGroupId}', dr_protection_group_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(associate_dr_protection_group_details)

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

#cancel_dr_plan_execution(cancel_dr_plan_execution_details, dr_plan_execution_id, opts = {}) ⇒ Response

Note:

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

Cancel the DR plan execution identified by drPlanExecutionId.

Parameters:

  • cancel_dr_plan_execution_details (OCI::DisasterRecovery::Models::CancelDrPlanExecutionDetails)

    Details for canceling the DR plan execution.

  • dr_plan_execution_id (String)

    The OCID of the DR plan execution.

    Example: ocid1.drplanexecution.oc1..uniqueID

  • 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 will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_retry_token (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
# File 'lib/oci/disaster_recovery/disaster_recovery_client.rb', line 207

def cancel_dr_plan_execution(cancel_dr_plan_execution_details, dr_plan_execution_id, opts = {})
  logger.debug 'Calling operation DisasterRecoveryClient#cancel_dr_plan_execution.' if logger

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

  path = '/drPlanExecutions/{drPlanExecutionId}/actions/cancel'.sub('{drPlanExecutionId}', dr_plan_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[:'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(cancel_dr_plan_execution_details)

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

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

Note:

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

Cancel the work request identified by workRequestId.

Parameters:

  • work_request_id (String)

    The ID (OCID) of the asynchronous request.

    Example: ocid1.workrequest.oc1..uniqueID

  • 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 will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



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

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

  raise "Missing the required parameter 'work_request_id' when calling cancel_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[:'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: 'DisasterRecoveryClient#cancel_work_request') 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

#change_dr_protection_group_compartment(change_dr_protection_group_compartment_details, dr_protection_group_id, opts = {}) ⇒ Response

Note:

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

Move the DR protection group identified by drProtectionGroupId to a different compartment.

Parameters:

  • change_dr_protection_group_compartment_details (OCI::DisasterRecovery::Models::ChangeDrProtectionGroupCompartmentDetails)

    Details for changing the DR protection group compartment.

  • dr_protection_group_id (String)

    The OCID of the DR protection group.

    Example: ocid1.drprotectiongroup.oc1..uniqueID

  • 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 will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_retry_token (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



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
381
382
383
384
# File 'lib/oci/disaster_recovery/disaster_recovery_client.rb', line 345

def change_dr_protection_group_compartment(change_dr_protection_group_compartment_details, dr_protection_group_id, opts = {})
  logger.debug 'Calling operation DisasterRecoveryClient#change_dr_protection_group_compartment.' if logger

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

  path = '/drProtectionGroups/{drProtectionGroupId}/actions/changeCompartment'.sub('{drProtectionGroupId}', dr_protection_group_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_dr_protection_group_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DisasterRecoveryClient#change_dr_protection_group_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_automatic_dr_configuration(create_automatic_dr_configuration_details, opts = {}) ⇒ Response

Note:

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

Create a Automatic DR configuration.

Parameters:

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



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
443
444
445
446
# File 'lib/oci/disaster_recovery/disaster_recovery_client.rb', line 409

def create_automatic_dr_configuration(create_automatic_dr_configuration_details, opts = {})
  logger.debug 'Calling operation DisasterRecoveryClient#create_automatic_dr_configuration.' if logger

  raise "Missing the required parameter 'create_automatic_dr_configuration_details' when calling create_automatic_dr_configuration." if create_automatic_dr_configuration_details.nil?

  path = '/automaticDrConfigurations'
  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_automatic_dr_configuration_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DisasterRecoveryClient#create_automatic_dr_configuration') 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::DisasterRecovery::Models::AutomaticDrConfiguration'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_dr_plan(create_dr_plan_details, opts = {}) ⇒ Response

Note:

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

Create a DR plan of the specified DR plan type.

Parameters:

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



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
505
506
507
508
# File 'lib/oci/disaster_recovery/disaster_recovery_client.rb', line 471

def create_dr_plan(create_dr_plan_details, opts = {})
  logger.debug 'Calling operation DisasterRecoveryClient#create_dr_plan.' if logger

  raise "Missing the required parameter 'create_dr_plan_details' when calling create_dr_plan." if create_dr_plan_details.nil?

  path = '/drPlans'
  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_dr_plan_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DisasterRecoveryClient#create_dr_plan') 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::DisasterRecovery::Models::DrPlan'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_dr_plan_execution(create_dr_plan_execution_details, opts = {}) ⇒ Response

Note:

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

Execute a DR plan for a DR protection group.

Parameters:

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
# File 'lib/oci/disaster_recovery/disaster_recovery_client.rb', line 533

def create_dr_plan_execution(create_dr_plan_execution_details, opts = {})
  logger.debug 'Calling operation DisasterRecoveryClient#create_dr_plan_execution.' if logger

  raise "Missing the required parameter 'create_dr_plan_execution_details' when calling create_dr_plan_execution." if create_dr_plan_execution_details.nil?

  path = '/drPlanExecutions'
  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_dr_plan_execution_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DisasterRecoveryClient#create_dr_plan_execution') 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::DisasterRecovery::Models::DrPlanExecution'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_dr_protection_group(create_dr_protection_group_details, opts = {}) ⇒ Response

Note:

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

Create a DR protection group.

Parameters:

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



595
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
# File 'lib/oci/disaster_recovery/disaster_recovery_client.rb', line 595

def create_dr_protection_group(create_dr_protection_group_details, opts = {})
  logger.debug 'Calling operation DisasterRecoveryClient#create_dr_protection_group.' if logger

  raise "Missing the required parameter 'create_dr_protection_group_details' when calling create_dr_protection_group." if create_dr_protection_group_details.nil?

  path = '/drProtectionGroups'
  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_dr_protection_group_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DisasterRecoveryClient#create_dr_protection_group') 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::DisasterRecovery::Models::DrProtectionGroup'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_automatic_dr_configuration(automatic_dr_configuration_id, opts = {}) ⇒ Response

Note:

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

Delete the automatic DR configuration identified by automaticDrConfigurationId.

Parameters:

  • automatic_dr_configuration_id (String)

    The OCID of the Automatic DR configuration.

    Example: ocid1.automaticDrConfiguration.oc1..uniqueID

  • 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 will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



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
696
# File 'lib/oci/disaster_recovery/disaster_recovery_client.rb', line 660

def delete_automatic_dr_configuration(automatic_dr_configuration_id, opts = {})
  logger.debug 'Calling operation DisasterRecoveryClient#delete_automatic_dr_configuration.' if logger

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

  path = '/automaticDrConfigurations/{automaticDrConfigurationId}'.sub('{automaticDrConfigurationId}', automatic_dr_configuration_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: 'DisasterRecoveryClient#delete_automatic_dr_configuration') 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_dr_plan(dr_plan_id, opts = {}) ⇒ Response

Note:

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

Delete the DR plan identified by drPlanId.

Parameters:

  • dr_plan_id (String)

    The OCID of the DR plan.

    Example: ocid1.drplan.oc1..uniqueID

  • 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 will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



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
758
759
760
# File 'lib/oci/disaster_recovery/disaster_recovery_client.rb', line 724

def delete_dr_plan(dr_plan_id, opts = {})
  logger.debug 'Calling operation DisasterRecoveryClient#delete_dr_plan.' if logger

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

  path = '/drPlans/{drPlanId}'.sub('{drPlanId}', dr_plan_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: 'DisasterRecoveryClient#delete_dr_plan') 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_dr_plan_execution(dr_plan_execution_id, opts = {}) ⇒ Response

Note:

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

Delete the DR plan execution identified by drPlanExecutionId.

Parameters:

  • dr_plan_execution_id (String)

    The OCID of the DR plan execution.

    Example: ocid1.drplanexecution.oc1..uniqueID

  • 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 will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



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
# File 'lib/oci/disaster_recovery/disaster_recovery_client.rb', line 788

def delete_dr_plan_execution(dr_plan_execution_id, opts = {})
  logger.debug 'Calling operation DisasterRecoveryClient#delete_dr_plan_execution.' if logger

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

  path = '/drPlanExecutions/{drPlanExecutionId}'.sub('{drPlanExecutionId}', dr_plan_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[:'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: 'DisasterRecoveryClient#delete_dr_plan_execution') 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_dr_protection_group(dr_protection_group_id, opts = {}) ⇒ Response

Note:

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

Delete the DR protection group identified by drProtectionGroupId.

Parameters:

  • dr_protection_group_id (String)

    The OCID of the DR protection group.

    Example: ocid1.drprotectiongroup.oc1..uniqueID

  • 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 will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
# File 'lib/oci/disaster_recovery/disaster_recovery_client.rb', line 852

def delete_dr_protection_group(dr_protection_group_id, opts = {})
  logger.debug 'Calling operation DisasterRecoveryClient#delete_dr_protection_group.' if logger

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

  path = '/drProtectionGroups/{drProtectionGroupId}'.sub('{drProtectionGroupId}', dr_protection_group_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: 'DisasterRecoveryClient#delete_dr_protection_group') 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

#disassociate_dr_protection_group(disassociate_dr_protection_group_details, dr_protection_group_id, opts = {}) ⇒ Response

Note:

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

Delete the association between the DR protection group identified by drProtectionGroupId. and its peer DR protection group.

Parameters:

  • disassociate_dr_protection_group_details (OCI::DisasterRecovery::Models::DisassociateDrProtectionGroupDetails)

    Details for deleting the association between two DR protection groups.

  • dr_protection_group_id (String)

    The OCID of the DR protection group.

    Example: ocid1.drprotectiongroup.oc1..uniqueID

  • 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 will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_retry_token (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
# File 'lib/oci/disaster_recovery/disaster_recovery_client.rb', line 925

def disassociate_dr_protection_group(disassociate_dr_protection_group_details, dr_protection_group_id, opts = {})
  logger.debug 'Calling operation DisasterRecoveryClient#disassociate_dr_protection_group.' if logger

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

  path = '/drProtectionGroups/{drProtectionGroupId}/actions/disassociate'.sub('{drProtectionGroupId}', dr_protection_group_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(disassociate_dr_protection_group_details)

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

#get_automatic_dr_configuration(automatic_dr_configuration_id, opts = {}) ⇒ Response

Note:

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

Get details for the Automatic DR configuration identified by automaticDrConfigurationId.

Parameters:

  • automatic_dr_configuration_id (String)

    The OCID of the Automatic DR configuration.

    Example: ocid1.automaticDrConfiguration.oc1..uniqueID

  • 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 ID for tracing.

Returns:



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

def get_automatic_dr_configuration(automatic_dr_configuration_id, opts = {})
  logger.debug 'Calling operation DisasterRecoveryClient#get_automatic_dr_configuration.' if logger

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

  path = '/automaticDrConfigurations/{automaticDrConfigurationId}'.sub('{automaticDrConfigurationId}', automatic_dr_configuration_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: 'DisasterRecoveryClient#get_automatic_dr_configuration') 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::DisasterRecovery::Models::AutomaticDrConfiguration'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_dr_plan(dr_plan_id, opts = {}) ⇒ Response

Note:

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

Get details for the DR plan identified by drPlanId.

Parameters:

  • dr_plan_id (String)

    The OCID of the DR plan.

    Example: ocid1.drplan.oc1..uniqueID

  • 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 ID for tracing.

Returns:



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

def get_dr_plan(dr_plan_id, opts = {})
  logger.debug 'Calling operation DisasterRecoveryClient#get_dr_plan.' if logger

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

  path = '/drPlans/{drPlanId}'.sub('{drPlanId}', dr_plan_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: 'DisasterRecoveryClient#get_dr_plan') 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::DisasterRecovery::Models::DrPlan'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_dr_plan_execution(dr_plan_execution_id, opts = {}) ⇒ Response

Note:

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

Get details for the DR plan execution identified by drPlanExecutionId.

Parameters:

  • dr_plan_execution_id (String)

    The OCID of the DR plan execution.

    Example: ocid1.drplanexecution.oc1..uniqueID

  • 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 ID for tracing.

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/disaster_recovery/disaster_recovery_client.rb', line 1102

def get_dr_plan_execution(dr_plan_execution_id, opts = {})
  logger.debug 'Calling operation DisasterRecoveryClient#get_dr_plan_execution.' if logger

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

  path = '/drPlanExecutions/{drPlanExecutionId}'.sub('{drPlanExecutionId}', dr_plan_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: 'DisasterRecoveryClient#get_dr_plan_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::DisasterRecovery::Models::DrPlanExecution'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_dr_protection_group(dr_protection_group_id, opts = {}) ⇒ Response

Note:

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

Get the DR protection group identified by drProtectionGroupId.

Parameters:

  • dr_protection_group_id (String)

    The OCID of the DR protection group.

    Example: ocid1.drprotectiongroup.oc1..uniqueID

  • 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 ID for tracing.

Returns:



1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
# File 'lib/oci/disaster_recovery/disaster_recovery_client.rb', line 1160

def get_dr_protection_group(dr_protection_group_id, opts = {})
  logger.debug 'Calling operation DisasterRecoveryClient#get_dr_protection_group.' if logger

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

  path = '/drProtectionGroups/{drProtectionGroupId}'.sub('{drProtectionGroupId}', dr_protection_group_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: 'DisasterRecoveryClient#get_dr_protection_group') 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::DisasterRecovery::Models::DrProtectionGroup'
    )
  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 identified by workRequestId.

Parameters:

  • work_request_id (String)

    The ID (OCID) of the asynchronous request.

    Example: ocid1.workrequest.oc1..uniqueID

  • 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 ID for tracing.

Returns:



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
1247
1248
1249
1250
1251
1252
1253
1254
# File 'lib/oci/disaster_recovery/disaster_recovery_client.rb', line 1218

def get_work_request(work_request_id, opts = {})
  logger.debug 'Calling operation DisasterRecoveryClient#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: 'DisasterRecoveryClient#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::DisasterRecovery::Models::WorkRequest'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#ignore_dr_plan_execution(ignore_dr_plan_execution_details, dr_plan_execution_id, opts = {}) ⇒ Response

Note:

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

Ignore the failed group or step in DR plan execution identified by drPlanExecutionId and resume execution.

Parameters:

  • ignore_dr_plan_execution_details (OCI::DisasterRecovery::Models::IgnoreDrPlanExecutionDetails)

    Details for ignoring the failed group or step and resuming execution.

  • dr_plan_execution_id (String)

    The OCID of the DR plan execution.

    Example: ocid1.drplanexecution.oc1..uniqueID

  • 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 will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_retry_token (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
# File 'lib/oci/disaster_recovery/disaster_recovery_client.rb', line 1289

def ignore_dr_plan_execution(ignore_dr_plan_execution_details, dr_plan_execution_id, opts = {})
  logger.debug 'Calling operation DisasterRecoveryClient#ignore_dr_plan_execution.' if logger

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

  path = '/drPlanExecutions/{drPlanExecutionId}/actions/ignore'.sub('{drPlanExecutionId}', dr_plan_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[:'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(ignore_dr_plan_execution_details)

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

#list_automatic_dr_configurations(dr_protection_group_id, opts = {}) ⇒ Response

Note:

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

Get a summary list of automatic DR configurations for a DR protection group.

Parameters:

  • dr_protection_group_id (String)

    The OCID of the DR protection group. Mandatory query param.

    Example: ocid1.drprotectiongroup.oc1..uniqueID

  • 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

  • :automatic_dr_configuration_id (String)

    The OCID of the automatic DR configuration.

    Example: ocid1.automaticDrConfiguration.oc1..uniqueID

  • :lifecycle_state (String)

    A filter to return only Automatic DR configurations that match the given lifecycle state.

  • :lifecycle_state_not_equal_to (String)

    A filter to return only Automatic DR configurations that do not match the given lifecycle state.

  • :display_name (String)

    A filter to return only resources that match the given display name.

    Example: MyResourceDisplayName

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. 1 is the minimum, 1000 is the maximum.

    For important details about how pagination works, see List Pagination.

    Example: 100 (default to 10)

  • :page (String)

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

    For important details about how pagination works, see List Pagination.

  • :sort_order (String)

    The sort order to use, either 'asc' or 'desc'. (default to ASC)

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified timeCreated is default.

    Example: MyResourceDisplayName (default to timeCreated) Allowed values are: timeCreated, displayName

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



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
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
# File 'lib/oci/disaster_recovery/disaster_recovery_client.rb', line 1385

def list_automatic_dr_configurations(dr_protection_group_id, opts = {})
  logger.debug 'Calling operation DisasterRecoveryClient#list_automatic_dr_configurations.' if logger

  raise "Missing the required parameter 'dr_protection_group_id' when calling list_automatic_dr_configurations." if dr_protection_group_id.nil?

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

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

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

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

  path = '/automaticDrConfigurations'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:drProtectionGroupId] = dr_protection_group_id
  query_params[:automaticDrConfigurationId] = opts[:automatic_dr_configuration_id] if opts[:automatic_dr_configuration_id]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:lifecycleStateNotEqualTo] = opts[:lifecycle_state_not_equal_to] if opts[:lifecycle_state_not_equal_to]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  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: 'DisasterRecoveryClient#list_automatic_dr_configurations') 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::DisasterRecovery::Models::AutomaticDrConfigurationCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_dr_plan_executions(dr_protection_group_id, opts = {}) ⇒ Response

Note:

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

Get a summary list of all DR plan executions for a DR protection group.

Parameters:

  • dr_protection_group_id (String)

    The OCID of the DR protection group. Mandatory query param.

    Example: ocid1.drprotectiongroup.oc1..uniqueID

  • 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

  • :lifecycle_state (String)

    A filter to return only DR plan executions that match the given lifecycle state.

  • :dr_plan_execution_id (String)

    The OCID of the DR plan execution.

    Example: ocid1.drplanexecution.oc1..uniqueID

  • :display_name (String)

    A filter to return only resources that match the given display name.

    Example: MyResourceDisplayName

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. 1 is the minimum, 1000 is the maximum.

    For important details about how pagination works, see List Pagination.

    Example: 100 (default to 10)

  • :page (String)

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

    For important details about how pagination works, see List Pagination.

  • :sort_order (String)

    The sort order to use, either 'asc' or 'desc'. (default to ASC)

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified timeCreated is default.

    Example: MyResourceDisplayName (default to timeCreated) Allowed values are: timeCreated, displayName

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
# File 'lib/oci/disaster_recovery/disaster_recovery_client.rb', line 1500

def list_dr_plan_executions(dr_protection_group_id, opts = {})
  logger.debug 'Calling operation DisasterRecoveryClient#list_dr_plan_executions.' if logger

  raise "Missing the required parameter 'dr_protection_group_id' when calling list_dr_plan_executions." if dr_protection_group_id.nil?

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

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

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

  path = '/drPlanExecutions'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:drProtectionGroupId] = dr_protection_group_id
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:drPlanExecutionId] = opts[:dr_plan_execution_id] if opts[:dr_plan_execution_id]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  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: 'DisasterRecoveryClient#list_dr_plan_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::DisasterRecovery::Models::DrPlanExecutionCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_dr_plans(dr_protection_group_id, opts = {}) ⇒ Response

Note:

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

Get a summary list of all DR plans for a DR protection group.

Parameters:

  • dr_protection_group_id (String)

    The OCID of the DR protection group. Mandatory query param.

    Example: ocid1.drprotectiongroup.oc1..uniqueID

  • 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

  • :lifecycle_state (String)

    A filter to return only DR plans that match the given lifecycle state.

  • :dr_plan_id (String)

    The OCID of the DR plan.

    Example: ocid1.drplan.oc1..uniqueID

  • :dr_plan_type (String)

    The DR plan type.

  • :display_name (String)

    A filter to return only resources that match the given display name.

    Example: MyResourceDisplayName

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. 1 is the minimum, 1000 is the maximum.

    For important details about how pagination works, see List Pagination.

    Example: 100 (default to 10)

  • :page (String)

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

    For important details about how pagination works, see List Pagination.

  • :sort_order (String)

    The sort order to use, either 'asc' or 'desc'. (default to ASC)

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified timeCreated is default.

    Example: MyResourceDisplayName (default to timeCreated) Allowed values are: timeCreated, displayName

  • :opc_request_id (String)

    The client request ID for tracing.

  • :lifecycle_sub_state (String)

    A filter to return only DR plans that match the given lifecycle sub-state.

Returns:



1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
# File 'lib/oci/disaster_recovery/disaster_recovery_client.rb', line 1613

def list_dr_plans(dr_protection_group_id, opts = {})
  logger.debug 'Calling operation DisasterRecoveryClient#list_dr_plans.' if logger

  raise "Missing the required parameter 'dr_protection_group_id' when calling list_dr_plans." if dr_protection_group_id.nil?

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

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

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

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

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

  path = '/drPlans'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:drProtectionGroupId] = dr_protection_group_id
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:drPlanId] = opts[:dr_plan_id] if opts[:dr_plan_id]
  query_params[:drPlanType] = opts[:dr_plan_type] if opts[:dr_plan_type]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  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[:lifecycleSubState] = opts[:lifecycle_sub_state] if opts[:lifecycle_sub_state]

  # 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: 'DisasterRecoveryClient#list_dr_plans') 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::DisasterRecovery::Models::DrPlanCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Get a summary list of all DR protection groups in a compartment.

Parameters:

  • compartment_id (String)

    The ID (OCID) of the compartment in which to list resources.

    Example: ocid1.compartment.oc1..uniqueID

  • 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

  • :lifecycle_state (String)

    A filter to return only DR protection groups that match the given lifecycle state.

  • :dr_protection_group_id (String)

    The OCID of the DR protection group. Optional query param.

    Example: ocid1.drprotectiongroup.oc1..uniqueID

  • :display_name (String)

    A filter to return only resources that match the given display name.

    Example: MyResourceDisplayName

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. 1 is the minimum, 1000 is the maximum.

    For important details about how pagination works, see List Pagination.

    Example: 100 (default to 10)

  • :page (String)

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

    For important details about how pagination works, see List Pagination.

  • :sort_order (String)

    The sort order to use, either 'asc' or 'desc'. (default to ASC)

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified timeCreated is default.

    Example: MyResourceDisplayName (default to timeCreated) Allowed values are: timeCreated, displayName

  • :opc_request_id (String)

    The client request ID for tracing.

  • :role (String)

    The DR protection group Role.

  • :lifecycle_sub_state (String)

    A filter to return only DR protection groups that match the given lifecycle sub-state.

Returns:



1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
# File 'lib/oci/disaster_recovery/disaster_recovery_client.rb', line 1736

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

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

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

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

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

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

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

  path = '/drProtectionGroups'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:drProtectionGroupId] = opts[:dr_protection_group_id] if opts[:dr_protection_group_id]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  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[:role] = opts[:role] if opts[:role]
  query_params[:lifecycleSubState] = opts[:lifecycle_sub_state] if opts[:lifecycle_sub_state]

  # 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: 'DisasterRecoveryClient#list_dr_protection_groups') 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::DisasterRecovery::Models::DrProtectionGroupCollection'
    )
  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.

Get a list of work request errors for the work request identified by workRequestId.

Parameters:

  • work_request_id (String)

    The ID (OCID) of the asynchronous request.

    Example: ocid1.workrequest.oc1..uniqueID

  • 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 ID for tracing.

  • :page (String)

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

    For important details about how pagination works, see List Pagination.

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. 1 is the minimum, 1000 is the maximum.

    For important details about how pagination works, see List Pagination.

    Example: 100 (default to 10)

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending. (default to timeAccepted) Allowed values are: timeAccepted

  • :sort_order (String)

    The sort order to use, either 'asc' or 'desc'. (default to ASC)

Returns:



1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
# File 'lib/oci/disaster_recovery/disaster_recovery_client.rb', line 1845

def list_work_request_errors(work_request_id, opts = {})
  logger.debug 'Calling operation DisasterRecoveryClient#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_by] && !%w[timeAccepted].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of timeAccepted.'
  end

  if opts[:sort_order] && !OCI::DisasterRecovery::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::DisasterRecovery::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[: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: 'DisasterRecoveryClient#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::DisasterRecovery::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.

Get a list of logs for the work request identified by workRequestId.

Parameters:

  • work_request_id (String)

    The ID (OCID) of the asynchronous request.

    Example: ocid1.workrequest.oc1..uniqueID

  • 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 ID for tracing.

  • :page (String)

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

    For important details about how pagination works, see List Pagination.

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. 1 is the minimum, 1000 is the maximum.

    For important details about how pagination works, see List Pagination.

    Example: 100 (default to 10)

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending. (default to timeAccepted) Allowed values are: timeAccepted

  • :sort_order (String)

    The sort order to use, either 'asc' or 'desc'. (default to ASC)

Returns:



1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
# File 'lib/oci/disaster_recovery/disaster_recovery_client.rb', line 1937

def list_work_request_logs(work_request_id, opts = {})
  logger.debug 'Calling operation DisasterRecoveryClient#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_by] && !%w[timeAccepted].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of timeAccepted.'
  end

  if opts[:sort_order] && !OCI::DisasterRecovery::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::DisasterRecovery::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[: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: 'DisasterRecoveryClient#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::DisasterRecovery::Models::WorkRequestLogEntryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_work_requests(opts = {}) ⇒ Response

Note:

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

Lists the work requests in a compartment.

Parameters:

  • 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

  • :compartment_id (String)

    The ID (OCID) of the compartment in which to list resources.

    Example: ocid1.compartment.oc1..uniqueID

  • :work_request_id (String)

    The ID (OCID) of the asynchronous work request.

    Example: ocid1.workrequest.oc1..uniqueID

  • :status (String)

    A filter to return only resources whose lifecycleState matches the given OperationStatus.

  • :resource_id (String)

    The ID (OCID) of the resource affected by the work request.

    Example: ocid1.drplanexecution.oc1..uniqueID

  • :opc_request_id (String)

    The client request ID for tracing.

  • :page (String)

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

    For important details about how pagination works, see List Pagination.

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. 1 is the minimum, 1000 is the maximum.

    For important details about how pagination works, see List Pagination.

    Example: 100 (default to 10)

  • :sort_order (String)

    The sort order to use, either 'asc' or 'desc'. (default to ASC)

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending. (default to timeAccepted) Allowed values are: timeAccepted

Returns:



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

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


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

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

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

  path = '/workRequests'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:workRequestId] = opts[:work_request_id] if opts[:work_request_id]
  query_params[:status] = opts[:status] if opts[:status]
  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]
  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: 'DisasterRecoveryClient#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::DisasterRecovery::Models::WorkRequestSummaryCollection'
    )
  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.



97
98
99
# File 'lib/oci/disaster_recovery/disaster_recovery_client.rb', line 97

def logger
  @api_client.config.logger
end

#pause_dr_plan_execution(pause_dr_plan_execution_details, dr_plan_execution_id, opts = {}) ⇒ Response

Note:

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

Pause the DR plan execution identified by drPlanExecutionId.

Parameters:

  • pause_dr_plan_execution_details (OCI::DisasterRecovery::Models::PauseDrPlanExecutionDetails)

    Details for pausing the DR plan execution.

  • dr_plan_execution_id (String)

    The OCID of the DR plan execution.

    Example: ocid1.drplanexecution.oc1..uniqueID

  • 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 will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_retry_token (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



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

def pause_dr_plan_execution(pause_dr_plan_execution_details, dr_plan_execution_id, opts = {})
  logger.debug 'Calling operation DisasterRecoveryClient#pause_dr_plan_execution.' if logger

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

  path = '/drPlanExecutions/{drPlanExecutionId}/actions/pause'.sub('{drPlanExecutionId}', dr_plan_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[:'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(pause_dr_plan_execution_details)

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

#refresh_dr_plan(refresh_dr_plan_details, dr_plan_id, opts = {}) ⇒ Response

Note:

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

Refresh DR Plan identified by drPlanId.

Parameters:

  • refresh_dr_plan_details (OCI::DisasterRecovery::Models::RefreshDrPlanDetails)

    Details for refreshing a DR plan.

  • dr_plan_id (String)

    The OCID of the DR plan.

    Example: ocid1.drplan.oc1..uniqueID

  • 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 will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_retry_token (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



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

def refresh_dr_plan(refresh_dr_plan_details, dr_plan_id, opts = {})
  logger.debug 'Calling operation DisasterRecoveryClient#refresh_dr_plan.' if logger

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

  path = '/drPlans/{drPlanId}/actions/refresh'.sub('{drPlanId}', dr_plan_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(refresh_dr_plan_details)

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

#resume_dr_plan_execution(resume_dr_plan_execution_details, dr_plan_execution_id, opts = {}) ⇒ Response

Note:

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

Resume the DR plan execution identified by drPlanExecutionId.

Parameters:

  • resume_dr_plan_execution_details (OCI::DisasterRecovery::Models::ResumeDrPlanExecutionDetails)

    Details for resuming the DR plan execution.

  • dr_plan_execution_id (String)

    The OCID of the DR plan execution.

    Example: ocid1.drplanexecution.oc1..uniqueID

  • 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 will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_retry_token (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
# File 'lib/oci/disaster_recovery/disaster_recovery_client.rb', line 2276

def resume_dr_plan_execution(resume_dr_plan_execution_details, dr_plan_execution_id, opts = {})
  logger.debug 'Calling operation DisasterRecoveryClient#resume_dr_plan_execution.' if logger

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

  path = '/drPlanExecutions/{drPlanExecutionId}/actions/resume'.sub('{drPlanExecutionId}', dr_plan_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[:'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(resume_dr_plan_execution_details)

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

#retry_dr_plan_execution(retry_dr_plan_execution_details, dr_plan_execution_id, opts = {}) ⇒ Response

Note:

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

Retry the failed group or step in DR plan execution identified by drPlanExecutionId and resume execution.

Parameters:

  • retry_dr_plan_execution_details (OCI::DisasterRecovery::Models::RetryDrPlanExecutionDetails)

    Details for retrying execution of the failed group or step.

  • dr_plan_execution_id (String)

    The OCID of the DR plan execution.

    Example: ocid1.drplanexecution.oc1..uniqueID

  • 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 will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_retry_token (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
# File 'lib/oci/disaster_recovery/disaster_recovery_client.rb', line 2350

def retry_dr_plan_execution(retry_dr_plan_execution_details, dr_plan_execution_id, opts = {})
  logger.debug 'Calling operation DisasterRecoveryClient#retry_dr_plan_execution.' if logger

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

  path = '/drPlanExecutions/{drPlanExecutionId}/actions/retry'.sub('{drPlanExecutionId}', dr_plan_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[:'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(retry_dr_plan_execution_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DisasterRecoveryClient#retry_dr_plan_execution') 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_automatic_dr_configuration(update_automatic_dr_configuration_details, automatic_dr_configuration_id, opts = {}) ⇒ Response

Note:

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

Update the Automatic DR configuration identified by automaticDrConfigurationId.

Parameters:

  • update_automatic_dr_configuration_details (OCI::DisasterRecovery::Models::UpdateAutomaticDrConfigurationDetails)

    Details for updating the Automatic DR configuration.

  • automatic_dr_configuration_id (String)

    The OCID of the Automatic DR configuration.

    Example: ocid1.automaticDrConfiguration.oc1..uniqueID

  • 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 will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
# File 'lib/oci/disaster_recovery/disaster_recovery_client.rb', line 2418

def update_automatic_dr_configuration(update_automatic_dr_configuration_details, automatic_dr_configuration_id, opts = {})
  logger.debug 'Calling operation DisasterRecoveryClient#update_automatic_dr_configuration.' if logger

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

  path = '/automaticDrConfigurations/{automaticDrConfigurationId}'.sub('{automaticDrConfigurationId}', automatic_dr_configuration_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_automatic_dr_configuration_details)

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

#update_dr_plan(update_dr_plan_details, dr_plan_id, opts = {}) ⇒ Response

Note:

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

Update the DR plan identified by drPlanId.

Parameters:

  • update_dr_plan_details (OCI::DisasterRecovery::Models::UpdateDrPlanDetails)

    Details for updating the DR plan.

  • dr_plan_id (String)

    The OCID of the DR plan.

    Example: ocid1.drplan.oc1..uniqueID

  • 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 will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
# File 'lib/oci/disaster_recovery/disaster_recovery_client.rb', line 2484

def update_dr_plan(update_dr_plan_details, dr_plan_id, opts = {})
  logger.debug 'Calling operation DisasterRecoveryClient#update_dr_plan.' if logger

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

  path = '/drPlans/{drPlanId}'.sub('{drPlanId}', dr_plan_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_dr_plan_details)

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

#update_dr_plan_execution(update_dr_plan_execution_details, dr_plan_execution_id, opts = {}) ⇒ Response

Note:

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

Update the DR plan execution identified by drPlanExecutionId.

Parameters:

  • update_dr_plan_execution_details (OCI::DisasterRecovery::Models::UpdateDrPlanExecutionDetails)

    Details for updating the DR plan execution.

  • dr_plan_execution_id (String)

    The OCID of the DR plan execution.

    Example: ocid1.drplanexecution.oc1..uniqueID

  • 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 will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
# File 'lib/oci/disaster_recovery/disaster_recovery_client.rb', line 2550

def update_dr_plan_execution(update_dr_plan_execution_details, dr_plan_execution_id, opts = {})
  logger.debug 'Calling operation DisasterRecoveryClient#update_dr_plan_execution.' if logger

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

  path = '/drPlanExecutions/{drPlanExecutionId}'.sub('{drPlanExecutionId}', dr_plan_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[:'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_dr_plan_execution_details)

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

#update_dr_protection_group(update_dr_protection_group_details, dr_protection_group_id, opts = {}) ⇒ Response

Note:

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

Update the DR protection group identified by drProtectionGroupId.

Parameters:

  • update_dr_protection_group_details (OCI::DisasterRecovery::Models::UpdateDrProtectionGroupDetails)

    Details for updating the the DR protection group.

  • dr_protection_group_id (String)

    The OCID of the DR protection group.

    Example: ocid1.drprotectiongroup.oc1..uniqueID

  • 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 will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
# File 'lib/oci/disaster_recovery/disaster_recovery_client.rb', line 2616

def update_dr_protection_group(update_dr_protection_group_details, dr_protection_group_id, opts = {})
  logger.debug 'Calling operation DisasterRecoveryClient#update_dr_protection_group.' if logger

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

  path = '/drProtectionGroups/{drProtectionGroupId}'.sub('{drProtectionGroupId}', dr_protection_group_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_dr_protection_group_details)

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

#update_dr_protection_group_role(update_dr_protection_group_role_details, dr_protection_group_id, opts = {}) ⇒ Response

Note:

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

Update the role of the DR protection group identified by drProtectionGroupId.

Parameters:

  • update_dr_protection_group_role_details (OCI::DisasterRecovery::Models::UpdateDrProtectionGroupRoleDetails)

    The role details for the DR protection group to be updated.

  • dr_protection_group_id (String)

    The OCID of the DR protection group.

    Example: ocid1.drprotectiongroup.oc1..uniqueID

  • 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 will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_retry_token (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
# File 'lib/oci/disaster_recovery/disaster_recovery_client.rb', line 2688

def update_dr_protection_group_role(update_dr_protection_group_role_details, dr_protection_group_id, opts = {})
  logger.debug 'Calling operation DisasterRecoveryClient#update_dr_protection_group_role.' if logger

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

  path = '/drProtectionGroups/{drProtectionGroupId}/actions/updateRole'.sub('{drProtectionGroupId}', dr_protection_group_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(update_dr_protection_group_role_details)

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

#verify_dr_plan(verify_dr_plan_details, dr_plan_id, opts = {}) ⇒ Response

Note:

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

Verify DR Plan identified by drPlanId.

Parameters:

  • verify_dr_plan_details (OCI::DisasterRecovery::Models::VerifyDrPlanDetails)

    Details for verifying a DR plan.

  • dr_plan_id (String)

    The OCID of the DR plan.

    Example: ocid1.drplan.oc1..uniqueID

  • 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 will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_retry_token (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
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
# File 'lib/oci/disaster_recovery/disaster_recovery_client.rb', line 2762

def verify_dr_plan(verify_dr_plan_details, dr_plan_id, opts = {})
  logger.debug 'Calling operation DisasterRecoveryClient#verify_dr_plan.' if logger

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

  path = '/drPlans/{drPlanId}/actions/verify'.sub('{drPlanId}', dr_plan_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(verify_dr_plan_details)

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