Class: OCI::Core::BlockstorageClient

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/core/blockstorage_client.rb

Overview

Use the Core Services API to manage resources such as virtual cloud networks (VCNs), compute instances, and block storage volumes. For more information, see the console documentation for the Networking, Compute, and Block Volume services. The required permissions are documented in the Details for the Core Services article.

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

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



61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/oci/core/blockstorage_client.rb', line 61

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

Instance Attribute Details

#api_clientOCI::ApiClient (readonly)

Client used to make HTTP requests.

Returns:



21
22
23
# File 'lib/oci/core/blockstorage_client.rb', line 21

def api_client
  @api_client
end

#endpointString (readonly)

Fully qualified endpoint URL

Returns:

  • (String)


25
26
27
# File 'lib/oci/core/blockstorage_client.rb', line 25

def endpoint
  @endpoint
end

#regionString

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

Returns:

  • (String)


35
36
37
# File 'lib/oci/core/blockstorage_client.rb', line 35

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



31
32
33
# File 'lib/oci/core/blockstorage_client.rb', line 31

def retry_config
  @retry_config
end

Instance Method Details

#change_boot_volume_backup_compartment(boot_volume_backup_id, change_boot_volume_backup_compartment_details, opts = {}) ⇒ Response

Note:

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

Moves a boot volume backup into a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different Compartment.

Parameters:

  • boot_volume_backup_id (String)

    The OCID of the boot volume backup.

  • change_boot_volume_backup_compartment_details (OCI::Core::Models::ChangeBootVolumeBackupCompartmentDetails)

    Request to change the compartment of given boot volume backup.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:

  • (Response)

    A Response object with data of type nil



123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# File 'lib/oci/core/blockstorage_client.rb', line 123

def change_boot_volume_backup_compartment(boot_volume_backup_id, change_boot_volume_backup_compartment_details, opts = {})
  logger.debug 'Calling operation BlockstorageClient#change_boot_volume_backup_compartment.' if logger

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

  path = '/bootVolumeBackups/{bootVolumeBackupId}/actions/changeCompartment'.sub('{bootVolumeBackupId}', boot_volume_backup_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 = @api_client.object_to_http_body(change_boot_volume_backup_compartment_details)

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

#change_boot_volume_compartment(boot_volume_id, change_boot_volume_compartment_details, opts = {}) ⇒ Response

Note:

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

Moves a boot volume into a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different Compartment.

Parameters:

  • boot_volume_id (String)

    The OCID of the boot volume.

  • change_boot_volume_compartment_details (OCI::Core::Models::ChangeBootVolumeCompartmentDetails)

    Request to change the compartment of given boot volume.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:

  • (Response)

    A Response object with data of type nil



183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
# File 'lib/oci/core/blockstorage_client.rb', line 183

def change_boot_volume_compartment(boot_volume_id, change_boot_volume_compartment_details, opts = {})
  logger.debug 'Calling operation BlockstorageClient#change_boot_volume_compartment.' if logger

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

  path = '/bootVolumes/{bootVolumeId}/actions/changeCompartment'.sub('{bootVolumeId}', boot_volume_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 = @api_client.object_to_http_body(change_boot_volume_compartment_details)

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

#change_volume_backup_compartment(volume_backup_id, change_volume_backup_compartment_details, opts = {}) ⇒ Response

Note:

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

Moves a volume backup into a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different Compartment.

Parameters:

  • volume_backup_id (String)

    The OCID of the volume backup.

  • change_volume_backup_compartment_details (OCI::Core::Models::ChangeVolumeBackupCompartmentDetails)

    Request to change the compartment of given volume backup.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:

  • (Response)

    A Response object with data of type nil



243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
# File 'lib/oci/core/blockstorage_client.rb', line 243

def change_volume_backup_compartment(volume_backup_id, change_volume_backup_compartment_details, opts = {})
  logger.debug 'Calling operation BlockstorageClient#change_volume_backup_compartment.' if logger

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

  path = '/volumeBackups/{volumeBackupId}/actions/changeCompartment'.sub('{volumeBackupId}', volume_backup_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 = @api_client.object_to_http_body(change_volume_backup_compartment_details)

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

#change_volume_compartment(volume_id, change_volume_compartment_details, opts = {}) ⇒ Response

Note:

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

Moves a volume into a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different Compartment.

Parameters:

  • volume_id (String)

    The OCID of the volume.

  • change_volume_compartment_details (OCI::Core::Models::ChangeVolumeCompartmentDetails)

    Request to change the compartment of given volume.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:

  • (Response)

    A Response object with data of type nil



303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
# File 'lib/oci/core/blockstorage_client.rb', line 303

def change_volume_compartment(volume_id, change_volume_compartment_details, opts = {})
  logger.debug 'Calling operation BlockstorageClient#change_volume_compartment.' if logger

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

  path = '/volumes/{volumeId}/actions/changeCompartment'.sub('{volumeId}', volume_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 = @api_client.object_to_http_body(change_volume_compartment_details)

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

#change_volume_group_backup_compartment(volume_group_backup_id, change_volume_group_backup_compartment_details, opts = {}) ⇒ Response

Note:

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

Moves a volume group backup into a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different Compartment.

Parameters:

  • volume_group_backup_id (String)

    The Oracle Cloud ID (OCID) that uniquely identifies the volume group backup.

  • change_volume_group_backup_compartment_details (OCI::Core::Models::ChangeVolumeGroupBackupCompartmentDetails)

    Request to change the compartment of given volume group backup.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:

  • (Response)

    A Response object with data of type nil



364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
# File 'lib/oci/core/blockstorage_client.rb', line 364

def change_volume_group_backup_compartment(volume_group_backup_id, change_volume_group_backup_compartment_details, opts = {})
  logger.debug 'Calling operation BlockstorageClient#change_volume_group_backup_compartment.' if logger

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

  path = '/volumeGroupBackups/{volumeGroupBackupId}/actions/changeCompartment'.sub('{volumeGroupBackupId}', volume_group_backup_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 = @api_client.object_to_http_body(change_volume_group_backup_compartment_details)

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

#change_volume_group_compartment(volume_group_id, change_volume_group_compartment_details, opts = {}) ⇒ Response

Note:

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

Moves a volume group into a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different Compartment.

Parameters:

  • volume_group_id (String)

    The Oracle Cloud ID (OCID) that uniquely identifies the volume group.

  • change_volume_group_compartment_details (OCI::Core::Models::ChangeVolumeGroupCompartmentDetails)

    Request to change the compartment of given volume group.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:

  • (Response)

    A Response object with data of type nil



424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
# File 'lib/oci/core/blockstorage_client.rb', line 424

def change_volume_group_compartment(volume_group_id, change_volume_group_compartment_details, opts = {})
  logger.debug 'Calling operation BlockstorageClient#change_volume_group_compartment.' if logger

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

  path = '/volumeGroups/{volumeGroupId}/actions/changeCompartment'.sub('{volumeGroupId}', volume_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 = @api_client.object_to_http_body(change_volume_group_compartment_details)

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

#copy_boot_volume_backup(boot_volume_backup_id, copy_boot_volume_backup_details, opts = {}) ⇒ Response

Note:

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

Creates a boot volume backup copy in specified region. For general information about volume backups, see Overview of Boot Volume Backups

Parameters:

  • boot_volume_backup_id (String)

    The OCID of the boot volume backup.

  • copy_boot_volume_backup_details (OCI::Core::Models::CopyBootVolumeBackupDetails)

    Request to create a cross-region copy of given boot volume backup.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

  • :opc_request_id (String)

    Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
# File 'lib/oci/core/blockstorage_client.rb', line 489

def copy_boot_volume_backup(boot_volume_backup_id, copy_boot_volume_backup_details, opts = {})
  logger.debug 'Calling operation BlockstorageClient#copy_boot_volume_backup.' if logger

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

  path = '/bootVolumeBackups/{bootVolumeBackupId}/actions/copy'.sub('{bootVolumeBackupId}', boot_volume_backup_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(copy_boot_volume_backup_details)

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

#copy_volume_backup(volume_backup_id, copy_volume_backup_details, opts = {}) ⇒ Response

Note:

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

Creates a volume backup copy in specified region. For general information about volume backups, see Overview of Block Volume Service Backups

Parameters:

  • volume_backup_id (String)

    The OCID of the volume backup.

  • copy_volume_backup_details (OCI::Core::Models::CopyVolumeBackupDetails)

    Request to create a cross-region copy of given backup.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

  • :opc_request_id (String)

    Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
# File 'lib/oci/core/blockstorage_client.rb', line 557

def copy_volume_backup(volume_backup_id, copy_volume_backup_details, opts = {})
  logger.debug 'Calling operation BlockstorageClient#copy_volume_backup.' if logger

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

  path = '/volumeBackups/{volumeBackupId}/actions/copy'.sub('{volumeBackupId}', volume_backup_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(copy_volume_backup_details)

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

#copy_volume_group_backup(volume_group_backup_id, copy_volume_group_backup_details, opts = {}) ⇒ Response

Note:

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

Creates a volume group backup copy in specified region. For general information about volume group backups, see Overview of Block Volume Backups.

Parameters:

  • volume_group_backup_id (String)

    The Oracle Cloud ID (OCID) that uniquely identifies the volume group backup.

  • copy_volume_group_backup_details (OCI::Core::Models::CopyVolumeGroupBackupDetails)

    Request to create a cross-region copy of given volume group backup.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

  • :opc_request_id (String)

    Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



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

def copy_volume_group_backup(volume_group_backup_id, copy_volume_group_backup_details, opts = {})
  logger.debug 'Calling operation BlockstorageClient#copy_volume_group_backup.' if logger

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

  path = '/volumeGroupBackups/{volumeGroupBackupId}/actions/copy'.sub('{volumeGroupBackupId}', volume_group_backup_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(copy_volume_group_backup_details)

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

#create_boot_volume(create_boot_volume_details, opts = {}) ⇒ Response

Note:

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

Creates a new boot volume in the specified compartment from an existing boot volume or a boot volume backup. For general information about boot volumes, see Boot Volumes. You may optionally specify a display name for the volume, which is simply a friendly name or description. It does not have to be unique, and you can change it. Avoid entering confidential information.

Parameters:

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

Returns:



692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
# File 'lib/oci/core/blockstorage_client.rb', line 692

def create_boot_volume(create_boot_volume_details, opts = {})
  logger.debug 'Calling operation BlockstorageClient#create_boot_volume.' if logger

  raise "Missing the required parameter 'create_boot_volume_details' when calling create_boot_volume." if create_boot_volume_details.nil?

  path = '/bootVolumes'
  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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_boot_volume_details)

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

#create_boot_volume_backup(create_boot_volume_backup_details, opts = {}) ⇒ Response

Note:

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

Creates a new boot volume backup of the specified boot volume. For general information about boot volume backups, see Overview of Boot Volume Backups

When the request is received, the backup object is in a REQUEST_RECEIVED state. When the data is imaged, it goes into a CREATING state. After the backup is fully uploaded to the cloud, it goes into an AVAILABLE state.

Parameters:

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

Returns:



757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
# File 'lib/oci/core/blockstorage_client.rb', line 757

def create_boot_volume_backup(create_boot_volume_backup_details, opts = {})
  logger.debug 'Calling operation BlockstorageClient#create_boot_volume_backup.' if logger

  raise "Missing the required parameter 'create_boot_volume_backup_details' when calling create_boot_volume_backup." if create_boot_volume_backup_details.nil?

  path = '/bootVolumeBackups'
  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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_boot_volume_backup_details)

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

#create_volume(create_volume_details, opts = {}) ⇒ Response

Note:

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

Creates a new volume in the specified compartment. Volumes can be created in sizes ranging from 50 GB (51200 MB) to 32 TB (33554432 MB), in 1 GB (1024 MB) increments. By default, volumes are 1 TB (1048576 MB). For general information about block volumes, see Overview of Block Volume Service.

A volume and instance can be in separate compartments but must be in the same availability domain. For information about access control and compartments, see Overview of the IAM Service. For information about availability domains, see Regions and Availability Domains. To get a list of availability domains, use the ListAvailabilityDomains operation in the Identity and Access Management Service API.

You may optionally specify a display name for the volume, which is simply a friendly name or description. It does not have to be unique, and you can change it. Avoid entering confidential information.

Parameters:

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

Returns:



830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
# File 'lib/oci/core/blockstorage_client.rb', line 830

def create_volume(create_volume_details, opts = {})
  logger.debug 'Calling operation BlockstorageClient#create_volume.' if logger

  raise "Missing the required parameter 'create_volume_details' when calling create_volume." if create_volume_details.nil?

  path = '/volumes'
  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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_volume_details)

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

#create_volume_backup(create_volume_backup_details, opts = {}) ⇒ Response

Note:

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

Creates a new backup of the specified volume. For general information about volume backups, see Overview of Block Volume Service Backups

When the request is received, the backup object is in a REQUEST_RECEIVED state. When the data is imaged, it goes into a CREATING state. After the backup is fully uploaded to the cloud, it goes into an AVAILABLE state.

Parameters:

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

Returns:



895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
# File 'lib/oci/core/blockstorage_client.rb', line 895

def create_volume_backup(create_volume_backup_details, opts = {})
  logger.debug 'Calling operation BlockstorageClient#create_volume_backup.' if logger

  raise "Missing the required parameter 'create_volume_backup_details' when calling create_volume_backup." if create_volume_backup_details.nil?

  path = '/volumeBackups'
  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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_volume_backup_details)

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

#create_volume_backup_policy(create_volume_backup_policy_details, opts = {}) ⇒ Response

Note:

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

Creates a new user defined backup policy.

For more information about Oracle defined backup policies and user defined backup policies, see Policy-Based Backups.

Parameters:

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

  • :opc_request_id (String)

    Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
# File 'lib/oci/core/blockstorage_client.rb', line 961

def create_volume_backup_policy(create_volume_backup_policy_details, opts = {})
  logger.debug 'Calling operation BlockstorageClient#create_volume_backup_policy.' if logger

  raise "Missing the required parameter 'create_volume_backup_policy_details' when calling create_volume_backup_policy." if create_volume_backup_policy_details.nil?

  path = '/volumeBackupPolicies'
  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_volume_backup_policy_details)

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

#create_volume_backup_policy_assignment(create_volume_backup_policy_assignment_details, opts = {}) ⇒ Response

Note:

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

Assigns a volume backup policy to the specified volume. Note that a given volume can only have one backup policy assigned to it. If this operation is used for a volume that already has a different backup policy assigned, the prior backup policy will be silently unassigned.

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

Returns:



1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
# File 'lib/oci/core/blockstorage_client.rb', line 1019

def create_volume_backup_policy_assignment(create_volume_backup_policy_assignment_details, opts = {})
  logger.debug 'Calling operation BlockstorageClient#create_volume_backup_policy_assignment.' if logger

  raise "Missing the required parameter 'create_volume_backup_policy_assignment_details' when calling create_volume_backup_policy_assignment." if create_volume_backup_policy_assignment_details.nil?

  path = '/volumeBackupPolicyAssignments'
  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'
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(create_volume_backup_policy_assignment_details)

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

#create_volume_group(create_volume_group_details, opts = {}) ⇒ Response

Note:

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

Creates a new volume group in the specified compartment. A volume group is a collection of volumes and may be created from a list of volumes, cloning an existing volume group, or by restoring a volume group backup. You may optionally specify a display name for the volume group, which is simply a friendly name or description. It does not have to be unique, and you can change it. Avoid entering confidential information.

For more information, see Volume Groups.

Parameters:

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

Returns:



1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
# File 'lib/oci/core/blockstorage_client.rb', line 1084

def create_volume_group(create_volume_group_details, opts = {})
  logger.debug 'Calling operation BlockstorageClient#create_volume_group.' if logger

  raise "Missing the required parameter 'create_volume_group_details' when calling create_volume_group." if create_volume_group_details.nil?

  path = '/volumeGroups'
  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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_volume_group_details)

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

#create_volume_group_backup(create_volume_group_backup_details, opts = {}) ⇒ Response

Note:

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

Creates a new backup volume group of the specified volume group. For more information, see Volume Groups.

Parameters:

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

Returns:



1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
# File 'lib/oci/core/blockstorage_client.rb', line 1145

def create_volume_group_backup(create_volume_group_backup_details, opts = {})
  logger.debug 'Calling operation BlockstorageClient#create_volume_group_backup.' if logger

  raise "Missing the required parameter 'create_volume_group_backup_details' when calling create_volume_group_backup." if create_volume_group_backup_details.nil?

  path = '/volumeGroupBackups'
  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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_volume_group_backup_details)

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

#delete_boot_volume(boot_volume_id, opts = {}) ⇒ Response

Note:

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

Deletes the specified boot volume. The volume cannot have an active connection to an instance. To disconnect the boot volume from a connected instance, see Disconnecting From a Boot Volume. Warning: All data on the boot volume will be permanently lost when the boot volume is deleted.

Parameters:

  • boot_volume_id (String)

    The OCID of the boot volume.

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

Returns:

  • (Response)

    A Response object with data of type nil



1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
# File 'lib/oci/core/blockstorage_client.rb', line 1206

def delete_boot_volume(boot_volume_id, opts = {})
  logger.debug 'Calling operation BlockstorageClient#delete_boot_volume.' if logger

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

  path = '/bootVolumes/{bootVolumeId}'.sub('{bootVolumeId}', boot_volume_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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockstorageClient#delete_boot_volume') 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_boot_volume_backup(boot_volume_backup_id, opts = {}) ⇒ Response

Note:

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

Deletes a boot volume backup.

Parameters:

  • boot_volume_backup_id (String)

    The OCID of the boot volume backup.

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

Returns:

  • (Response)

    A Response object with data of type nil



1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
# File 'lib/oci/core/blockstorage_client.rb', line 1262

def delete_boot_volume_backup(boot_volume_backup_id, opts = {})
  logger.debug 'Calling operation BlockstorageClient#delete_boot_volume_backup.' if logger

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

  path = '/bootVolumeBackups/{bootVolumeBackupId}'.sub('{bootVolumeBackupId}', boot_volume_backup_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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockstorageClient#delete_boot_volume_backup') 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_boot_volume_kms_key(boot_volume_id, opts = {}) ⇒ Response

Note:

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

Removes the specified boot volume's assigned Vault Service encryption key.

Parameters:

  • boot_volume_id (String)

    The OCID of the boot volume.

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

Returns:

  • (Response)

    A Response object with data of type nil



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

def delete_boot_volume_kms_key(boot_volume_id, opts = {})
  logger.debug 'Calling operation BlockstorageClient#delete_boot_volume_kms_key.' if logger

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

  path = '/bootVolumes/{bootVolumeId}/kmsKey'.sub('{bootVolumeId}', boot_volume_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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

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

#delete_volume(volume_id, opts = {}) ⇒ Response

Note:

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

Deletes the specified volume. The volume cannot have an active connection to an instance. To disconnect the volume from a connected instance, see Disconnecting From a Volume. Warning: All data on the volume will be permanently lost when the volume is deleted.

Parameters:

  • volume_id (String)

    The OCID of the volume.

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

Returns:

  • (Response)

    A Response object with data of type nil



1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
# File 'lib/oci/core/blockstorage_client.rb', line 1379

def delete_volume(volume_id, opts = {})
  logger.debug 'Calling operation BlockstorageClient#delete_volume.' if logger

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

  path = '/volumes/{volumeId}'.sub('{volumeId}', volume_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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockstorageClient#delete_volume') 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_volume_backup(volume_backup_id, opts = {}) ⇒ Response

Note:

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

Deletes a volume backup.

Parameters:

  • volume_backup_id (String)

    The OCID of the volume backup.

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

Returns:

  • (Response)

    A Response object with data of type nil



1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
# File 'lib/oci/core/blockstorage_client.rb', line 1435

def delete_volume_backup(volume_backup_id, opts = {})
  logger.debug 'Calling operation BlockstorageClient#delete_volume_backup.' if logger

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

  path = '/volumeBackups/{volumeBackupId}'.sub('{volumeBackupId}', volume_backup_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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockstorageClient#delete_volume_backup') 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_volume_backup_policy(policy_id, opts = {}) ⇒ Response

Note:

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

Deletes a user defined backup policy. For more information about user defined backup policies, see Policy-Based Backups.

Avoid entering confidential information.

Parameters:

  • policy_id (String)

    The OCID of the volume backup policy.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

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

Returns:

  • (Response)

    A Response object with data of type nil



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

def delete_volume_backup_policy(policy_id, opts = {})
  logger.debug 'Calling operation BlockstorageClient#delete_volume_backup_policy.' if logger

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

  path = '/volumeBackupPolicies/{policyId}'.sub('{policyId}', policy_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

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

#delete_volume_backup_policy_assignment(policy_assignment_id, opts = {}) ⇒ Response

Note:

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

Deletes a volume backup policy assignment.

Parameters:

  • policy_assignment_id (String)

    The OCID of the volume backup policy assignment.

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

Returns:

  • (Response)

    A Response object with data of type nil



1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
# File 'lib/oci/core/blockstorage_client.rb', line 1556

def delete_volume_backup_policy_assignment(policy_assignment_id, opts = {})
  logger.debug 'Calling operation BlockstorageClient#delete_volume_backup_policy_assignment.' if logger

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

  path = '/volumeBackupPolicyAssignments/{policyAssignmentId}'.sub('{policyAssignmentId}', policy_assignment_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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockstorageClient#delete_volume_backup_policy_assignment') 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_volume_group(volume_group_id, opts = {}) ⇒ Response

Note:

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

Deletes the specified volume group. Individual volumes are not deleted, only the volume group is deleted. For more information, see Volume Groups.

Parameters:

  • volume_group_id (String)

    The Oracle Cloud ID (OCID) that uniquely identifies the volume group.

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

Returns:

  • (Response)

    A Response object with data of type nil



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
# File 'lib/oci/core/blockstorage_client.rb', line 1614

def delete_volume_group(volume_group_id, opts = {})
  logger.debug 'Calling operation BlockstorageClient#delete_volume_group.' if logger

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

  path = '/volumeGroups/{volumeGroupId}'.sub('{volumeGroupId}', volume_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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

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

#delete_volume_group_backup(volume_group_backup_id, opts = {}) ⇒ Response

Note:

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

Deletes a volume group backup. This operation deletes all the backups in the volume group. For more information, see Volume Groups.

Parameters:

  • volume_group_backup_id (String)

    The Oracle Cloud ID (OCID) that uniquely identifies the volume group backup.

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

Returns:

  • (Response)

    A Response object with data of type nil



1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
# File 'lib/oci/core/blockstorage_client.rb', line 1673

def delete_volume_group_backup(volume_group_backup_id, opts = {})
  logger.debug 'Calling operation BlockstorageClient#delete_volume_group_backup.' if logger

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

  path = '/volumeGroupBackups/{volumeGroupBackupId}'.sub('{volumeGroupBackupId}', volume_group_backup_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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockstorageClient#delete_volume_group_backup') 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_volume_kms_key(volume_id, opts = {}) ⇒ Response

Note:

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

Removes the specified volume's assigned Vault service encryption key.

Parameters:

  • volume_id (String)

    The OCID of the volume.

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

Returns:

  • (Response)

    A Response object with data of type nil



1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
# File 'lib/oci/core/blockstorage_client.rb', line 1730

def delete_volume_kms_key(volume_id, opts = {})
  logger.debug 'Calling operation BlockstorageClient#delete_volume_kms_key.' if logger

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

  path = '/volumes/{volumeId}/kmsKey'.sub('{volumeId}', volume_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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

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

#get_block_volume_replica(block_volume_replica_id, opts = {}) ⇒ Response

Note:

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

Gets information for the specified block volume replica.

Parameters:

  • block_volume_replica_id (String)

    The OCID of the block volume replica.

  • 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

Returns:



1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
# File 'lib/oci/core/blockstorage_client.rb', line 1783

def get_block_volume_replica(block_volume_replica_id, opts = {})
  logger.debug 'Calling operation BlockstorageClient#get_block_volume_replica.' if logger

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

  path = '/blockVolumeReplicas/{blockVolumeReplicaId}'.sub('{blockVolumeReplicaId}', block_volume_replica_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'
  # rubocop:enable Style/NegatedIf

  post_body = nil

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

#get_boot_volume(boot_volume_id, opts = {}) ⇒ Response

Note:

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

Gets information for the specified boot volume.

Parameters:

  • boot_volume_id (String)

    The OCID of the boot volume.

  • 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

Returns:



1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
# File 'lib/oci/core/blockstorage_client.rb', line 1837

def get_boot_volume(boot_volume_id, opts = {})
  logger.debug 'Calling operation BlockstorageClient#get_boot_volume.' if logger

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

  path = '/bootVolumes/{bootVolumeId}'.sub('{bootVolumeId}', boot_volume_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'
  # rubocop:enable Style/NegatedIf

  post_body = nil

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

#get_boot_volume_backup(boot_volume_backup_id, opts = {}) ⇒ Response

Note:

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

Gets information for the specified boot volume backup.

Parameters:

  • boot_volume_backup_id (String)

    The OCID of the boot volume backup.

  • 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

Returns:



1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
# File 'lib/oci/core/blockstorage_client.rb', line 1891

def get_boot_volume_backup(boot_volume_backup_id, opts = {})
  logger.debug 'Calling operation BlockstorageClient#get_boot_volume_backup.' if logger

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

  path = '/bootVolumeBackups/{bootVolumeBackupId}'.sub('{bootVolumeBackupId}', boot_volume_backup_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'
  # rubocop:enable Style/NegatedIf

  post_body = nil

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

#get_boot_volume_kms_key(boot_volume_id, opts = {}) ⇒ Response

Note:

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

Gets the Vault service encryption key assigned to the specified boot volume.

Parameters:

  • boot_volume_id (String)

    The OCID of the boot volume.

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

Returns:



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/core/blockstorage_client.rb', line 1949

def get_boot_volume_kms_key(boot_volume_id, opts = {})
  logger.debug 'Calling operation BlockstorageClient#get_boot_volume_kms_key.' if logger

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

  path = '/bootVolumes/{bootVolumeId}/kmsKey'.sub('{bootVolumeId}', boot_volume_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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

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

#get_boot_volume_replica(boot_volume_replica_id, opts = {}) ⇒ Response

Note:

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

Gets information for the specified boot volume replica.

Parameters:

  • boot_volume_replica_id (String)

    The OCID of the boot volume replica.

  • 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

Returns:



2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
# File 'lib/oci/core/blockstorage_client.rb', line 2003

def get_boot_volume_replica(boot_volume_replica_id, opts = {})
  logger.debug 'Calling operation BlockstorageClient#get_boot_volume_replica.' if logger

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

  path = '/bootVolumeReplicas/{bootVolumeReplicaId}'.sub('{bootVolumeReplicaId}', boot_volume_replica_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'
  # rubocop:enable Style/NegatedIf

  post_body = nil

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

#get_volume(volume_id, opts = {}) ⇒ Response

Note:

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

Gets information for the specified volume.

Parameters:

  • volume_id (String)

    The OCID of the volume.

  • 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

Returns:



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
# File 'lib/oci/core/blockstorage_client.rb', line 2057

def get_volume(volume_id, opts = {})
  logger.debug 'Calling operation BlockstorageClient#get_volume.' if logger

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

  path = '/volumes/{volumeId}'.sub('{volumeId}', volume_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'
  # rubocop:enable Style/NegatedIf

  post_body = nil

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

#get_volume_backup(volume_backup_id, opts = {}) ⇒ Response

Note:

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

Gets information for the specified volume backup.

Parameters:

  • volume_backup_id (String)

    The OCID of the volume backup.

  • 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

Returns:



2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
# File 'lib/oci/core/blockstorage_client.rb', line 2111

def get_volume_backup(volume_backup_id, opts = {})
  logger.debug 'Calling operation BlockstorageClient#get_volume_backup.' if logger

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

  path = '/volumeBackups/{volumeBackupId}'.sub('{volumeBackupId}', volume_backup_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'
  # rubocop:enable Style/NegatedIf

  post_body = nil

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

#get_volume_backup_policy(policy_id, opts = {}) ⇒ Response

Note:

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

Gets information for the specified volume backup policy.

Parameters:

  • policy_id (String)

    The OCID of the volume backup policy.

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

    the optional parameters

Options Hash (opts):

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

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

Returns:



2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
# File 'lib/oci/core/blockstorage_client.rb', line 2165

def get_volume_backup_policy(policy_id, opts = {})
  logger.debug 'Calling operation BlockstorageClient#get_volume_backup_policy.' if logger

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

  path = '/volumeBackupPolicies/{policyId}'.sub('{policyId}', policy_id.to_s)
  operation_signing_strategy = :standard

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

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

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

#get_volume_backup_policy_asset_assignment(asset_id, opts = {}) ⇒ Response

Note:

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

Gets the volume backup policy assignment for the specified volume. The assetId query parameter is required, and the returned list will contain at most one item, since volume can only have one volume backup policy assigned at a time.

Parameters:

  • asset_id (String)

    The OCID of an asset (e.g. a volume).

  • 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

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50

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

Returns:



2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
# File 'lib/oci/core/blockstorage_client.rb', line 2231

def get_volume_backup_policy_asset_assignment(asset_id, opts = {})
  logger.debug 'Calling operation BlockstorageClient#get_volume_backup_policy_asset_assignment.' if logger

  raise "Missing the required parameter 'asset_id' when calling get_volume_backup_policy_asset_assignment." if asset_id.nil?

  path = '/volumeBackupPolicyAssignments'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:assetId] = asset_id
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

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

#get_volume_backup_policy_assignment(policy_assignment_id, opts = {}) ⇒ Response

Note:

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

Gets information for the specified volume backup policy assignment.

Parameters:

  • policy_assignment_id (String)

    The OCID of the volume backup policy assignment.

  • 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

Returns:



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

def get_volume_backup_policy_assignment(policy_assignment_id, opts = {})
  logger.debug 'Calling operation BlockstorageClient#get_volume_backup_policy_assignment.' if logger

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

  path = '/volumeBackupPolicyAssignments/{policyAssignmentId}'.sub('{policyAssignmentId}', policy_assignment_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'
  # rubocop:enable Style/NegatedIf

  post_body = nil

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

#get_volume_group(volume_group_id, opts = {}) ⇒ Response

Note:

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

Gets information for the specified volume group. For more information, see Volume Groups.

Parameters:

  • volume_group_id (String)

    The Oracle Cloud ID (OCID) that uniquely identifies the volume group.

  • 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

Returns:



2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
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
# File 'lib/oci/core/blockstorage_client.rb', line 2340

def get_volume_group(volume_group_id, opts = {})
  logger.debug 'Calling operation BlockstorageClient#get_volume_group.' if logger

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

  path = '/volumeGroups/{volumeGroupId}'.sub('{volumeGroupId}', volume_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'
  # rubocop:enable Style/NegatedIf

  post_body = nil

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

#get_volume_group_backup(volume_group_backup_id, opts = {}) ⇒ Response

Note:

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

Gets information for the specified volume group backup. For more information, see Volume Groups.

Parameters:

  • volume_group_backup_id (String)

    The Oracle Cloud ID (OCID) that uniquely identifies the volume group backup.

  • 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

Returns:



2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
# File 'lib/oci/core/blockstorage_client.rb', line 2395

def get_volume_group_backup(volume_group_backup_id, opts = {})
  logger.debug 'Calling operation BlockstorageClient#get_volume_group_backup.' if logger

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

  path = '/volumeGroupBackups/{volumeGroupBackupId}'.sub('{volumeGroupBackupId}', volume_group_backup_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'
  # rubocop:enable Style/NegatedIf

  post_body = nil

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

#get_volume_group_replica(volume_group_replica_id, opts = {}) ⇒ Response

Note:

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

Gets information for the specified volume group replica.

Parameters:

  • volume_group_replica_id (String)

    The OCID of the volume replica group.

  • 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

Returns:



2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
# File 'lib/oci/core/blockstorage_client.rb', line 2449

def get_volume_group_replica(volume_group_replica_id, opts = {})
  logger.debug 'Calling operation BlockstorageClient#get_volume_group_replica.' if logger

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

  path = '/volumeGroupReplicas/{volumeGroupReplicaId}'.sub('{volumeGroupReplicaId}', volume_group_replica_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'
  # rubocop:enable Style/NegatedIf

  post_body = nil

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

#get_volume_kms_key(volume_id, opts = {}) ⇒ Response

Note:

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

Gets the Vault service encryption key assigned to the specified volume.

Parameters:

  • volume_id (String)

    The OCID of the volume.

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

Returns:



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

def get_volume_kms_key(volume_id, opts = {})
  logger.debug 'Calling operation BlockstorageClient#get_volume_kms_key.' if logger

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

  path = '/volumes/{volumeId}/kmsKey'.sub('{volumeId}', volume_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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

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

#list_block_volume_replicas(opts = {}) ⇒ Response

Note:

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

Lists the block volume replicas in the specified compartment and availability domain.

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

  • :availability_domain (String)

    The name of the availability domain.

    Example: Uocm:PHX-AD-1

  • :compartment_id (String)

    The OCID of the compartment.

  • :volume_group_replica_id (String)

    The OCID of the volume group replica.

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50

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

  • :display_name (String)

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

  • :sort_by (String)

    The field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ListInstances) let you optionally filter by availability domain if the scope of the resource type is within a single availability domain. If you call one of these "List" operations without specifying an availability domain, the resources are grouped by availability domain, then sorted.

    Allowed values are: TIMECREATED, DISPLAYNAME

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC). The DISPLAYNAME sort order is case sensitive. (default to ASC) Allowed values are: ASC, DESC

  • :lifecycle_state (String)

    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

Returns:



2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
# File 'lib/oci/core/blockstorage_client.rb', line 2594

def list_block_volume_replicas(opts = {})
  logger.debug 'Calling operation BlockstorageClient#list_block_volume_replicas.' if logger


  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[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

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

  path = '/blockVolumeReplicas'
  operation_signing_strategy = :standard

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

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

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

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

Note:

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

Lists the boot volume backups in the specified compartment. You can filter the results by boot volume.

Parameters:

  • compartment_id (String)

    The OCID of the compartment.

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

    the optional parameters

Options Hash (opts):

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

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

  • :boot_volume_id (String)

    The OCID of the boot volume.

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50

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

  • :display_name (String)

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

  • :source_boot_volume_backup_id (String)

    A filter to return only resources that originated from the given source boot volume backup.

  • :sort_by (String)

    The field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ListInstances) let you optionally filter by availability domain if the scope of the resource type is within a single availability domain. If you call one of these "List" operations without specifying an availability domain, the resources are grouped by availability domain, then sorted.

    Allowed values are: TIMECREATED, DISPLAYNAME

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC). The DISPLAYNAME sort order is case sensitive. (default to ASC) Allowed values are: ASC, DESC

  • :lifecycle_state (String)

    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

Returns:



2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
# File 'lib/oci/core/blockstorage_client.rb', line 2698

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

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

  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[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

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

  path = '/bootVolumeBackups'
  operation_signing_strategy = :standard

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

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

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

#list_boot_volume_replicas(opts = {}) ⇒ Response

Note:

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

Lists the boot volume replicas in the specified compartment and availability domain.

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

  • :availability_domain (String)

    The name of the availability domain.

    Example: Uocm:PHX-AD-1

  • :compartment_id (String)

    The OCID of the compartment.

  • :volume_group_replica_id (String)

    The OCID of the volume group replica.

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50

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

  • :display_name (String)

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

  • :sort_by (String)

    The field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ListInstances) let you optionally filter by availability domain if the scope of the resource type is within a single availability domain. If you call one of these "List" operations without specifying an availability domain, the resources are grouped by availability domain, then sorted.

    Allowed values are: TIMECREATED, DISPLAYNAME

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC). The DISPLAYNAME sort order is case sensitive. (default to ASC) Allowed values are: ASC, DESC

  • :lifecycle_state (String)

    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

Returns:



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

def list_boot_volume_replicas(opts = {})
  logger.debug 'Calling operation BlockstorageClient#list_boot_volume_replicas.' if logger


  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[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

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

  path = '/bootVolumeReplicas'
  operation_signing_strategy = :standard

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

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

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

#list_boot_volumes(opts = {}) ⇒ Response

Note:

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

Lists the boot volumes in the specified compartment and availability domain.

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

  • :availability_domain (String)

    The name of the availability domain.

    Example: Uocm:PHX-AD-1

  • :compartment_id (String)

    The OCID of the compartment.

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50

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

  • :volume_group_id (String)

    The OCID of the volume group.

Returns:



2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
# File 'lib/oci/core/blockstorage_client.rb', line 2891

def list_boot_volumes(opts = {})
  logger.debug 'Calling operation BlockstorageClient#list_boot_volumes.' if logger


  path = '/bootVolumes'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:availabilityDomain] = opts[:availability_domain] if opts[:availability_domain]
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:volumeGroupId] = opts[:volume_group_id] if opts[:volume_group_id]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

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

#list_volume_backup_policies(opts = {}) ⇒ Response

Note:

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

Lists all the volume backup policies available in the specified compartment.

For more information about Oracle defined backup policies and user defined backup policies, see Policy-Based Backups.

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

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50

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

  • :compartment_id (String)

    The OCID of the compartment. If no compartment is specified, the Oracle defined backup policies are listed.

Returns:



2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
# File 'lib/oci/core/blockstorage_client.rb', line 2962

def list_volume_backup_policies(opts = {})
  logger.debug 'Calling operation BlockstorageClient#list_volume_backup_policies.' if logger


  path = '/volumeBackupPolicies'
  operation_signing_strategy = :standard

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

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

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

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

Note:

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

Lists the volume backups in the specified compartment. You can filter the results by volume.

Parameters:

  • compartment_id (String)

    The OCID of the compartment.

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

    the optional parameters

Options Hash (opts):

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

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

  • :volume_id (String)

    The OCID of the volume.

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50

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

  • :display_name (String)

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

  • :source_volume_backup_id (String)

    A filter to return only resources that originated from the given source volume backup.

  • :sort_by (String)

    The field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ListInstances) let you optionally filter by availability domain if the scope of the resource type is within a single availability domain. If you call one of these "List" operations without specifying an availability domain, the resources are grouped by availability domain, then sorted.

    Allowed values are: TIMECREATED, DISPLAYNAME

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC). The DISPLAYNAME sort order is case sensitive. (default to ASC) Allowed values are: ASC, DESC

  • :lifecycle_state (String)

    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

Returns:



3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
# File 'lib/oci/core/blockstorage_client.rb', line 3048

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

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

  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[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

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

  path = '/volumeBackups'
  operation_signing_strategy = :standard

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

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

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

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

Note:

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

Lists the volume group backups in the specified compartment. You can filter the results by volume group. For more information, see Volume Groups.

Parameters:

  • compartment_id (String)

    The OCID of the compartment.

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

    the optional parameters

Options Hash (opts):

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

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

  • :volume_group_id (String)

    The OCID of the volume group.

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50

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

  • :display_name (String)

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

  • :sort_by (String)

    The field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ListInstances) let you optionally filter by availability domain if the scope of the resource type is within a single availability domain. If you call one of these "List" operations without specifying an availability domain, the resources are grouped by availability domain, then sorted.

    Allowed values are: TIMECREATED, DISPLAYNAME

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC). The DISPLAYNAME sort order is case sensitive. (default to ASC) Allowed values are: ASC, DESC

Returns:



3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
# File 'lib/oci/core/blockstorage_client.rb', line 3149

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

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

  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[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  path = '/volumeGroupBackups'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:volumeGroupId] = opts[:volume_group_id] if opts[:volume_group_id]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  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'
  # rubocop:enable Style/NegatedIf

  post_body = nil

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

#list_volume_group_replicas(availability_domain, compartment_id, opts = {}) ⇒ Response

Note:

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

Lists the volume group replicas in the specified compartment. You can filter the results by volume group. For more information, see Volume Group Replication.

Parameters:

  • availability_domain (String)

    The name of the availability domain.

    Example: Uocm:PHX-AD-1

  • compartment_id (String)

    The OCID of the compartment.

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

    the optional parameters

Options Hash (opts):

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

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

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50

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

  • :display_name (String)

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

  • :sort_by (String)

    The field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ListInstances) let you optionally filter by availability domain if the scope of the resource type is within a single availability domain. If you call one of these "List" operations without specifying an availability domain, the resources are grouped by availability domain, then sorted.

    Allowed values are: TIMECREATED, DISPLAYNAME

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC). The DISPLAYNAME sort order is case sensitive. (default to ASC) Allowed values are: ASC, DESC

  • :lifecycle_state (String)

    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

Returns:



3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
# File 'lib/oci/core/blockstorage_client.rb', line 3249

def list_volume_group_replicas(availability_domain, compartment_id, opts = {})
  logger.debug 'Calling operation BlockstorageClient#list_volume_group_replicas.' if logger

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

  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[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

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

  path = '/volumeGroupReplicas'
  operation_signing_strategy = :standard

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

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

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

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

Note:

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

Lists the volume groups in the specified compartment and availability domain. For more information, see Volume Groups.

Parameters:

  • compartment_id (String)

    The OCID of the compartment.

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

    the optional parameters

Options Hash (opts):

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

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

  • :availability_domain (String)

    The name of the availability domain.

    Example: Uocm:PHX-AD-1

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50

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

  • :display_name (String)

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

  • :sort_by (String)

    The field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ListInstances) let you optionally filter by availability domain if the scope of the resource type is within a single availability domain. If you call one of these "List" operations without specifying an availability domain, the resources are grouped by availability domain, then sorted.

    Allowed values are: TIMECREATED, DISPLAYNAME

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC). The DISPLAYNAME sort order is case sensitive. (default to ASC) Allowed values are: ASC, DESC

  • :lifecycle_state (String)

    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

Returns:



3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
# File 'lib/oci/core/blockstorage_client.rb', line 3356

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

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

  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[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

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

  path = '/volumeGroups'
  operation_signing_strategy = :standard

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

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockstorageClient#list_volume_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: 'Array<OCI::Core::Models::VolumeGroup>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_volumes(opts = {}) ⇒ Response

Note:

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

Lists the volumes in the specified compartment and availability domain.

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

  • :availability_domain (String)

    The name of the availability domain.

    Example: Uocm:PHX-AD-1

  • :compartment_id (String)

    The OCID of the compartment.

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50

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

  • :display_name (String)

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

  • :sort_by (String)

    The field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ListInstances) let you optionally filter by availability domain if the scope of the resource type is within a single availability domain. If you call one of these "List" operations without specifying an availability domain, the resources are grouped by availability domain, then sorted.

    Allowed values are: TIMECREATED, DISPLAYNAME

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC). The DISPLAYNAME sort order is case sensitive. (default to ASC) Allowed values are: ASC, DESC

  • :volume_group_id (String)

    The OCID of the volume group.

  • :cluster_placement_group_id (String)

    A filter to return only resources that match the given cluster placement group Id exactly.

  • :lifecycle_state (String)

    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

Returns:



3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
# File 'lib/oci/core/blockstorage_client.rb', line 3464

def list_volumes(opts = {})
  logger.debug 'Calling operation BlockstorageClient#list_volumes.' if logger


  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[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

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

  path = '/volumes'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:availabilityDomain] = opts[:availability_domain] if opts[:availability_domain]
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:volumeGroupId] = opts[:volume_group_id] if opts[:volume_group_id]
  query_params[:clusterPlacementGroupId] = opts[:cluster_placement_group_id] if opts[:cluster_placement_group_id]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockstorageClient#list_volumes') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Core::Models::Volume>'
    )
  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.



100
101
102
# File 'lib/oci/core/blockstorage_client.rb', line 100

def logger
  @api_client.config.logger
end

#update_boot_volume(boot_volume_id, update_boot_volume_details, opts = {}) ⇒ Response

Note:

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

Updates the specified boot volume's display name, defined tags, and free-form tags.

Parameters:

  • boot_volume_id (String)

    The OCID of the boot volume.

  • update_boot_volume_details (OCI::Core::Models::UpdateBootVolumeDetails)

    Update boot volume's display name.

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

Returns:



3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
# File 'lib/oci/core/blockstorage_client.rb', line 3541

def update_boot_volume(boot_volume_id, update_boot_volume_details, opts = {})
  logger.debug 'Calling operation BlockstorageClient#update_boot_volume.' if logger

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

  path = '/bootVolumes/{bootVolumeId}'.sub('{bootVolumeId}', boot_volume_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]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_boot_volume_details)

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

#update_boot_volume_backup(boot_volume_backup_id, update_boot_volume_backup_details, opts = {}) ⇒ Response

Note:

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

Updates the display name for the specified boot volume backup. Avoid entering confidential information.

Parameters:

  • boot_volume_backup_id (String)

    The OCID of the boot volume backup.

  • update_boot_volume_backup_details (OCI::Core::Models::UpdateBootVolumeBackupDetails)

    Update boot volume backup fields

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

Returns:



3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
# File 'lib/oci/core/blockstorage_client.rb', line 3602

def update_boot_volume_backup(boot_volume_backup_id, update_boot_volume_backup_details, opts = {})
  logger.debug 'Calling operation BlockstorageClient#update_boot_volume_backup.' if logger

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

  path = '/bootVolumeBackups/{bootVolumeBackupId}'.sub('{bootVolumeBackupId}', boot_volume_backup_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]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_boot_volume_backup_details)

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

#update_boot_volume_kms_key(boot_volume_id, update_boot_volume_kms_key_details, opts = {}) ⇒ Response

Note:

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

Updates the specified volume with a new Vault service master encryption key.

Parameters:

  • boot_volume_id (String)

    The OCID of the boot volume.

  • update_boot_volume_kms_key_details (OCI::Core::Models::UpdateBootVolumeKmsKeyDetails)

    Updates the Vault service master encryption key assigned to the specified boot volume.

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

Returns:



3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
# File 'lib/oci/core/blockstorage_client.rb', line 3662

def update_boot_volume_kms_key(boot_volume_id, update_boot_volume_kms_key_details, opts = {})
  logger.debug 'Calling operation BlockstorageClient#update_boot_volume_kms_key.' if logger

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

  path = '/bootVolumes/{bootVolumeId}/kmsKey'.sub('{bootVolumeId}', boot_volume_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]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_boot_volume_kms_key_details)

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

#update_volume(volume_id, update_volume_details, opts = {}) ⇒ Response

Note:

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

Updates the specified volume's display name. Avoid entering confidential information.

Parameters:

  • volume_id (String)

    The OCID of the volume.

  • update_volume_details (OCI::Core::Models::UpdateVolumeDetails)

    Update volume's display name. Avoid entering confidential information.

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

Returns:



3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
# File 'lib/oci/core/blockstorage_client.rb', line 3723

def update_volume(volume_id, update_volume_details, opts = {})
  logger.debug 'Calling operation BlockstorageClient#update_volume.' if logger

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

  path = '/volumes/{volumeId}'.sub('{volumeId}', volume_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]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_volume_details)

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

#update_volume_backup(volume_backup_id, update_volume_backup_details, opts = {}) ⇒ Response

Note:

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

Updates the display name for the specified volume backup. Avoid entering confidential information.

Parameters:

  • volume_backup_id (String)

    The OCID of the volume backup.

  • update_volume_backup_details (OCI::Core::Models::UpdateVolumeBackupDetails)

    Update volume backup fields

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

Returns:



3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
# File 'lib/oci/core/blockstorage_client.rb', line 3784

def update_volume_backup(volume_backup_id, update_volume_backup_details, opts = {})
  logger.debug 'Calling operation BlockstorageClient#update_volume_backup.' if logger

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

  path = '/volumeBackups/{volumeBackupId}'.sub('{volumeBackupId}', volume_backup_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]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_volume_backup_details)

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

#update_volume_backup_policy(policy_id, update_volume_backup_policy_details, opts = {}) ⇒ Response

Note:

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

Updates a user defined backup policy. For more information about user defined backup policies, see Policy-Based Backups.

Avoid entering confidential information.

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)

    Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

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

Returns:



3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
# File 'lib/oci/core/blockstorage_client.rb', line 3857

def update_volume_backup_policy(policy_id, update_volume_backup_policy_details, opts = {})
  logger.debug 'Calling operation BlockstorageClient#update_volume_backup_policy.' if logger

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

  path = '/volumeBackupPolicies/{policyId}'.sub('{policyId}', policy_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(update_volume_backup_policy_details)

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

#update_volume_group(volume_group_id, update_volume_group_details, opts = {}) ⇒ Response

Note:

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

Updates the set of volumes in a volume group along with the display name. Use this operation to add or remove volumes in a volume group. Specify the full list of volume IDs to include in the volume group. If the volume ID is not specified in the call, it will be removed from the volume group. Avoid entering confidential information.

For more information, see Volume Groups.

Parameters:

  • volume_group_id (String)

    The Oracle Cloud ID (OCID) that uniquely identifies the volume group.

  • update_volume_group_details (OCI::Core::Models::UpdateVolumeGroupDetails)

    Update volume group's set of volumes and/or display name

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

  • :preserve_volume_replica (BOOLEAN)

    Specifies whether to disable or preserve the individual volume replication when removing a volume from the replication enabled volume group. When set to true, the individual volume replica is preserved. The default value is true.

Returns:



3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
# File 'lib/oci/core/blockstorage_client.rb', line 3929

def update_volume_group(volume_group_id, update_volume_group_details, opts = {})
  logger.debug 'Calling operation BlockstorageClient#update_volume_group.' if logger

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

  path = '/volumeGroups/{volumeGroupId}'.sub('{volumeGroupId}', volume_group_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(update_volume_group_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockstorageClient#update_volume_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,
      return_type: 'OCI::Core::Models::VolumeGroup'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_volume_group_backup(volume_group_backup_id, update_volume_group_backup_details, opts = {}) ⇒ Response

Note:

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

Updates the display name for the specified volume group backup. For more information, see Volume Groups.

Parameters:

  • volume_group_backup_id (String)

    The Oracle Cloud ID (OCID) that uniquely identifies the volume group backup.

  • update_volume_group_backup_details (OCI::Core::Models::UpdateVolumeGroupBackupDetails)

    Update volume group backup fields

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

Returns:



3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
# File 'lib/oci/core/blockstorage_client.rb', line 3990

def update_volume_group_backup(volume_group_backup_id, update_volume_group_backup_details, opts = {})
  logger.debug 'Calling operation BlockstorageClient#update_volume_group_backup.' if logger

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

  path = '/volumeGroupBackups/{volumeGroupBackupId}'.sub('{volumeGroupBackupId}', volume_group_backup_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]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_volume_group_backup_details)

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

#update_volume_kms_key(volume_id, update_volume_kms_key_details, opts = {}) ⇒ Response

Note:

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

Updates the specified volume with a new Key Management master encryption key.

Parameters:

  • volume_id (String)

    The OCID of the volume.

  • update_volume_kms_key_details (OCI::Core::Models::UpdateVolumeKmsKeyDetails)

    Updates the Vault service master encryption key assigned to the specified volume.

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

Returns:



4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
# File 'lib/oci/core/blockstorage_client.rb', line 4050

def update_volume_kms_key(volume_id, update_volume_kms_key_details, opts = {})
  logger.debug 'Calling operation BlockstorageClient#update_volume_kms_key.' if logger

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

  path = '/volumes/{volumeId}/kmsKey'.sub('{volumeId}', volume_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]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_volume_kms_key_details)

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