Class: OCI::FileStorage::FileStorageClient

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/file_storage/file_storage_client.rb

Overview

The API for the File Storage Service.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

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



52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/oci/file_storage/file_storage_client.rb', line 52

def initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil)
  # If the signer is an InstancePrincipalsSecurityTokenSigner and no config was supplied (which is valid for instance principals)
  # 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 unless signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner)
  config ||= OCI::Config.new if signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner)
  config.validate unless signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner)

  if signer.nil?
    signer = OCI::Signer.new(
      config.user,
      config.fingerprint,
      config.tenancy,
      config.key_file,
      pass_phrase: config.pass_phrase,
      private_key_content: config.key_content
    )
  end

  @api_client = OCI::ApiClient.new(config, signer, proxy_settings: proxy_settings)
  @retry_config = retry_config

  if endpoint
    @endpoint = endpoint + '/20171215'
  else
    region ||= config.region
    region ||= signer.region if signer.respond_to?(:region)
    self.region = region
  end
  logger.info "FileStorageClient endpoint set to '#{@endpoint}'." if logger
end

Instance Attribute Details

#api_clientOCI::ApiClient (readonly)

Client used to make HTTP requests.

Returns:



12
13
14
# File 'lib/oci/file_storage/file_storage_client.rb', line 12

def api_client
  @api_client
end

#endpointString (readonly)

Fully qualified endpoint URL

Returns:

  • (String)


16
17
18
# File 'lib/oci/file_storage/file_storage_client.rb', line 16

def endpoint
  @endpoint
end

#regionString

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

Returns:

  • (String)


26
27
28
# File 'lib/oci/file_storage/file_storage_client.rb', line 26

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



22
23
24
# File 'lib/oci/file_storage/file_storage_client.rb', line 22

def retry_config
  @retry_config
end

Instance Method Details

#change_file_system_compartment(file_system_id, change_file_system_compartment_details, opts = {}) ⇒ Response

Moves a file system and its associated snapshots into a different compartment within the same tenancy. For information about moving resources between compartments, see [Moving Resources to a Different Compartment](docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes)

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.

Returns:

  • (Response)

    A Response object with data of type nil



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

def change_file_system_compartment(file_system_id, change_file_system_compartment_details, opts = {})
  logger.debug 'Calling operation FileStorageClient#change_file_system_compartment.' if logger

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

  path = '/fileSystems/{fileSystemId}/actions/changeCompartment'.sub('{fileSystemId}', file_system_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(change_file_system_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'FileStorageClient#change_file_system_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_mount_target_compartment(mount_target_id, change_mount_target_compartment_details, opts = {}) ⇒ Response

Moves a mount target and its associated export set into a different compartment within the same tenancy. For information about moving resources between compartments, see [Moving Resources to a Different Compartment](docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes)

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.

Returns:

  • (Response)

    A Response object with data of type nil



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
220
221
222
223
224
225
226
227
228
229
# File 'lib/oci/file_storage/file_storage_client.rb', line 192

def change_mount_target_compartment(mount_target_id, change_mount_target_compartment_details, opts = {})
  logger.debug 'Calling operation FileStorageClient#change_mount_target_compartment.' if logger

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

  path = '/mountTargets/{mountTargetId}/actions/changeCompartment'.sub('{mountTargetId}', mount_target_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(change_mount_target_compartment_details)

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

#create_export(create_export_details, opts = {}) ⇒ Response

Creates a new export in the specified export set, path, and file system.

Parameters:

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

  • :opc_request_id (String)

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

Returns:



256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
# File 'lib/oci/file_storage/file_storage_client.rb', line 256

def create_export(create_export_details, opts = {})
  logger.debug 'Calling operation FileStorageClient#create_export.' if logger

  raise "Missing the required parameter 'create_export_details' when calling create_export." if create_export_details.nil?

  path = '/exports'
  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_export_details)

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

#create_file_system(create_file_system_details, opts = {}) ⇒ Response

Creates a new file system in the specified compartment and availability domain. Instances can mount file systems in another availability domain, but doing so might increase latency when compared to mounting instances in the same availability domain.

After you create a file system, you can associate it with a mount target. Instances can then mount the file system by connecting to the mount target’s IP address. You can associate a file system with more than one mount target at a time.

For information about access control and compartments, see [Overview of the IAM Service](docs.cloud.oracle.com/Content/Identity/Concepts/overview.htm).

For information about availability domains, see [Regions and Availability Domains](docs.cloud.oracle.com/Content/General/Concepts/regions.htm). To get a list of availability domains, use the ‘ListAvailabilityDomains` operation in the Identity and Access Management Service API.

All Oracle Cloud Infrastructure resources, including file systems, get an Oracle-assigned, unique ID called an Oracle Cloud Identifier (OCID). When you create a resource, you can find its OCID in the response. You can also retrieve a resource’s OCID by using a List API operation on that resource type or by viewing the resource in the Console.

Parameters:

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

  • :opc_request_id (String)

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

Returns:



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

def create_file_system(create_file_system_details, opts = {})
  logger.debug 'Calling operation FileStorageClient#create_file_system.' if logger

  raise "Missing the required parameter 'create_file_system_details' when calling create_file_system." if create_file_system_details.nil?

  path = '/fileSystems'
  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_file_system_details)

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

#create_mount_target(create_mount_target_details, opts = {}) ⇒ Response

Creates a new mount target in the specified compartment and subnet. You can associate a file system with a mount target only when they exist in the same availability domain. Instances can connect to mount targets in another availablity domain, but you might see higher latency than with instances in the same availability domain as the mount target.

Mount targets have one or more private IP addresses that you can provide as the host portion of remote target parameters in client mount commands. These private IP addresses are listed in the privateIpIds property of the mount target and are highly available. Mount targets also consume additional IP addresses in their subnet. Do not use /30 or smaller subnets for mount target creation because they do not have sufficient available IP addresses. Allow at least three IP addresses for each mount target.

For information about access control and compartments, see [Overview of the IAM Service](docs.cloud.oracle.com/Content/Identity/Concepts/overview.htm).

For information about availability domains, see [Regions and Availability Domains](docs.cloud.oracle.com/Content/General/Concepts/regions.htm). To get a list of availability domains, use the ‘ListAvailabilityDomains` operation in the Identity and Access Management Service API.

All Oracle Cloud Infrastructure Services resources, including mount targets, get an Oracle-assigned, unique ID called an Oracle Cloud Identifier (OCID). When you create a resource, you can find its OCID in the response. You can also retrieve a resource’s OCID by using a List API operation on that resource type, or by viewing the resource in the Console.

Parameters:

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

  • :opc_request_id (String)

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

Returns:



438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
# File 'lib/oci/file_storage/file_storage_client.rb', line 438

def create_mount_target(create_mount_target_details, opts = {})
  logger.debug 'Calling operation FileStorageClient#create_mount_target.' if logger

  raise "Missing the required parameter 'create_mount_target_details' when calling create_mount_target." if create_mount_target_details.nil?

  path = '/mountTargets'
  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_mount_target_details)

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

#create_snapshot(create_snapshot_details, opts = {}) ⇒ Response

Creates a new snapshot of the specified file system. You can access the snapshot at ‘.snapshot/<name>`.

Parameters:

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

  • :opc_request_id (String)

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

Returns:



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
529
530
531
532
533
534
535
536
537
538
539
# File 'lib/oci/file_storage/file_storage_client.rb', line 502

def create_snapshot(create_snapshot_details, opts = {})
  logger.debug 'Calling operation FileStorageClient#create_snapshot.' if logger

  raise "Missing the required parameter 'create_snapshot_details' when calling create_snapshot." if create_snapshot_details.nil?

  path = '/snapshots'
  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_snapshot_details)

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

#delete_export(export_id, opts = {}) ⇒ Response

Deletes the specified export.

Parameters:

  • export_id (String)

    The OCID of the export.

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

    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



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
597
598
599
600
601
# File 'lib/oci/file_storage/file_storage_client.rb', line 565

def delete_export(export_id, opts = {})
  logger.debug 'Calling operation FileStorageClient#delete_export.' if logger

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

  path = '/exports/{exportId}'.sub('{exportId}', export_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'FileStorageClient#delete_export') 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_file_system(file_system_id, opts = {}) ⇒ Response

Deletes the specified file system. Before you delete the file system, verify that no remaining export resources still reference it. Deleting a file system also deletes all of its snapshots.

Parameters:

  • file_system_id (String)

    The OCID of the file system.

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

    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



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/file_storage/file_storage_client.rb', line 629

def delete_file_system(file_system_id, opts = {})
  logger.debug 'Calling operation FileStorageClient#delete_file_system.' if logger

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

  path = '/fileSystems/{fileSystemId}'.sub('{fileSystemId}', file_system_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'FileStorageClient#delete_file_system') 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_mount_target(mount_target_id, opts = {}) ⇒ Response

Deletes the specified mount target. This operation also deletes the mount target’s VNICs.

Parameters:

  • mount_target_id (String)

    The OCID of the mount target.

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

    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



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/file_storage/file_storage_client.rb', line 692

def delete_mount_target(mount_target_id, opts = {})
  logger.debug 'Calling operation FileStorageClient#delete_mount_target.' if logger

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

  path = '/mountTargets/{mountTargetId}'.sub('{mountTargetId}', mount_target_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'FileStorageClient#delete_mount_target') 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_snapshot(snapshot_id, opts = {}) ⇒ Response

Deletes the specified snapshot.

Parameters:

  • snapshot_id (String)

    The OCID of the snapshot.

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

    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



754
755
756
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
# File 'lib/oci/file_storage/file_storage_client.rb', line 754

def delete_snapshot(snapshot_id, opts = {})
  logger.debug 'Calling operation FileStorageClient#delete_snapshot.' if logger

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

  path = '/snapshots/{snapshotId}'.sub('{snapshotId}', snapshot_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'FileStorageClient#delete_snapshot') 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_export(export_id, opts = {}) ⇒ Response

Gets the specified export’s information.

Parameters:

  • export_id (String)

    The OCID of the export.

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



809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
# File 'lib/oci/file_storage/file_storage_client.rb', line 809

def get_export(export_id, opts = {})
  logger.debug 'Calling operation FileStorageClient#get_export.' if logger

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

  path = '/exports/{exportId}'.sub('{exportId}', export_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

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

#get_export_set(export_set_id, opts = {}) ⇒ Response

Gets the specified export set’s information.

Parameters:

  • export_set_id (String)

    The OCID of the export set.

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



864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
# File 'lib/oci/file_storage/file_storage_client.rb', line 864

def get_export_set(export_set_id, opts = {})
  logger.debug 'Calling operation FileStorageClient#get_export_set.' if logger

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

  path = '/exportSets/{exportSetId}'.sub('{exportSetId}', export_set_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

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

#get_file_system(file_system_id, opts = {}) ⇒ Response

Gets the specified file system’s information.

Parameters:

  • file_system_id (String)

    The OCID of the file system.

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



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

def get_file_system(file_system_id, opts = {})
  logger.debug 'Calling operation FileStorageClient#get_file_system.' if logger

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

  path = '/fileSystems/{fileSystemId}'.sub('{fileSystemId}', file_system_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

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

#get_mount_target(mount_target_id, opts = {}) ⇒ Response

Gets the specified mount target’s information.

Parameters:

  • mount_target_id (String)

    The OCID of the mount target.

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



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
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
# File 'lib/oci/file_storage/file_storage_client.rb', line 974

def get_mount_target(mount_target_id, opts = {})
  logger.debug 'Calling operation FileStorageClient#get_mount_target.' if logger

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

  path = '/mountTargets/{mountTargetId}'.sub('{mountTargetId}', mount_target_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

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

#get_snapshot(snapshot_id, opts = {}) ⇒ Response

Gets the specified snapshot’s information.

Parameters:

  • snapshot_id (String)

    The OCID of the snapshot.

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



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
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
# File 'lib/oci/file_storage/file_storage_client.rb', line 1029

def get_snapshot(snapshot_id, opts = {})
  logger.debug 'Calling operation FileStorageClient#get_snapshot.' if logger

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

  path = '/snapshots/{snapshotId}'.sub('{snapshotId}', snapshot_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

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

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

Lists the export set resources in the specified compartment.

Parameters:

  • compartment_id (String)

    The OCID of the compartment.

  • availability_domain (String)

    The name of the availability domain.

    Example: ‘Uocm:PHX-AD-1`

  • 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. 1 is the minimum, 1000 is the maximum.

    For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

    Example: ‘500`

  • :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](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

  • :display_name (String)

    A user-friendly name. It does not have to be unique, and it is changeable.

    Example: ‘My resource`

  • :lifecycle_state (String)

    Filter results by the specified lifecycle state. Must be a valid state for the resource type.

    Allowed values are: CREATING, ACTIVE, DELETING, DELETED, FAILED

  • :id (String)

    Filter results by OCID. Must be an OCID of the correct type for the resouce type.

  • :sort_by (String)

    The field to sort by. You can provide either value, but not both. By default, when you sort by time created, results are shown in descending order. When you sort by display name, results are shown in ascending order.

    Allowed values are: TIMECREATED, DISPLAYNAME

  • :sort_order (String)

    The sort order to use, either ‘asc’ or ‘desc’, where ‘asc’ is ascending and ‘desc’ is descending.

    Allowed values are: ASC, DESC

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



1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
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
1182
# File 'lib/oci/file_storage/file_storage_client.rb', line 1125

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

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

  if opts[:lifecycle_state] && !%w[CREATING ACTIVE DELETING DELETED FAILED].include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of CREATING, ACTIVE, DELETING, DELETED, FAILED.'
  end

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

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

  path = '/exportSets'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:availabilityDomain] = 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[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]

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

  post_body = nil

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

#list_exports(opts = {}) ⇒ Response

Lists export resources by compartment, file system, or export set. You must specify an export set ID, a file system ID, and / or a compartment ID.

Parameters:

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

    the optional parameters

Options Hash (opts):

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

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

  • :compartment_id (String)

    The 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. 1 is the minimum, 1000 is the maximum.

    For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

    Example: ‘500`

  • :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](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

  • :export_set_id (String)

    The OCID of the export set.

  • :file_system_id (String)

    The OCID of the file system.

  • :lifecycle_state (String)

    Filter results by the specified lifecycle state. Must be a valid state for the resource type.

    Allowed values are: CREATING, ACTIVE, DELETING, DELETED, FAILED

  • :id (String)

    Filter results by OCID. Must be an OCID of the correct type for the resouce type.

  • :sort_by (String)

    The field to sort by. You can provide either value, but not both. By default, when you sort by time created, results are shown in descending order. When you sort by path, results are shown in ascending alphanumeric order.

    Allowed values are: TIMECREATED, PATH

  • :sort_order (String)

    The sort order to use, either ‘asc’ or ‘desc’, where ‘asc’ is ascending and ‘desc’ is descending.

    Allowed values are: ASC, DESC

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



1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
# File 'lib/oci/file_storage/file_storage_client.rb', line 1238

def list_exports(opts = {})
  logger.debug 'Calling operation FileStorageClient#list_exports.' if logger


  if opts[:lifecycle_state] && !%w[CREATING ACTIVE DELETING DELETED FAILED].include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of CREATING, ACTIVE, DELETING, DELETED, FAILED.'
  end

  if opts[:sort_by] && !%w[TIMECREATED PATH].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of TIMECREATED, PATH.'
  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 = '/exports'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  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[:exportSetId] = opts[:export_set_id] if opts[:export_set_id]
  query_params[:fileSystemId] = opts[:file_system_id] if opts[:file_system_id]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]

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

  post_body = nil

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

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

Lists the file system resources in the specified compartment.

Parameters:

  • compartment_id (String)

    The OCID of the compartment.

  • availability_domain (String)

    The name of the availability domain.

    Example: ‘Uocm:PHX-AD-1`

  • 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. 1 is the minimum, 1000 is the maximum.

    For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

    Example: ‘500`

  • :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](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

  • :display_name (String)

    A user-friendly name. It does not have to be unique, and it is changeable.

    Example: ‘My resource`

  • :lifecycle_state (String)

    Filter results by the specified lifecycle state. Must be a valid state for the resource type.

    Allowed values are: CREATING, ACTIVE, DELETING, DELETED, FAILED

  • :id (String)

    Filter results by OCID. Must be an OCID of the correct type for the resouce type.

  • :sort_by (String)

    The field to sort by. You can provide either value, but not both. By default, when you sort by time created, results are shown in descending order. When you sort by display name, results are shown in ascending order.

    Allowed values are: TIMECREATED, DISPLAYNAME

  • :sort_order (String)

    The sort order to use, either ‘asc’ or ‘desc’, where ‘asc’ is ascending and ‘desc’ is descending.

    Allowed values are: ASC, DESC

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



1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
# File 'lib/oci/file_storage/file_storage_client.rb', line 1353

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

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

  if opts[:lifecycle_state] && !%w[CREATING ACTIVE DELETING DELETED FAILED].include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of CREATING, ACTIVE, DELETING, DELETED, FAILED.'
  end

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

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

  path = '/fileSystems'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:availabilityDomain] = 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[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]

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

  post_body = nil

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

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

Lists the mount target resources in the specified compartment.

Parameters:

  • compartment_id (String)

    The OCID of the compartment.

  • availability_domain (String)

    The name of the availability domain.

    Example: ‘Uocm:PHX-AD-1`

  • 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. 1 is the minimum, 1000 is the maximum.

    For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

    Example: ‘500`

  • :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](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

  • :display_name (String)

    A user-friendly name. It does not have to be unique, and it is changeable.

    Example: ‘My resource`

  • :export_set_id (String)

    The OCID of the export set.

  • :lifecycle_state (String)

    Filter results by the specified lifecycle state. Must be a valid state for the resource type.

    Allowed values are: CREATING, ACTIVE, DELETING, DELETED, FAILED

  • :id (String)

    Filter results by OCID. Must be an OCID of the correct type for the resouce type.

  • :sort_by (String)

    The field to sort by. You can choose either value, but not both. By default, when you sort by time created, results are shown in descending order. When you sort by display name, results are shown in ascending order.

    Allowed values are: TIMECREATED, DISPLAYNAME

  • :sort_order (String)

    The sort order to use, either ‘asc’ or ‘desc’, where ‘asc’ is ascending and ‘desc’ is descending.

    Allowed values are: ASC, DESC

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



1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
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
# File 'lib/oci/file_storage/file_storage_client.rb', line 1471

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

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

  if opts[:lifecycle_state] && !%w[CREATING ACTIVE DELETING DELETED FAILED].include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of CREATING, ACTIVE, DELETING, DELETED, FAILED.'
  end

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

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

  path = '/mountTargets'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:availabilityDomain] = 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[:exportSetId] = opts[:export_set_id] if opts[:export_set_id]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]

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

  post_body = nil

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

#list_snapshots(file_system_id, opts = {}) ⇒ Response

Lists snapshots of the specified file system.

Parameters:

  • file_system_id (String)

    The OCID of the file system.

  • 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. 1 is the minimum, 1000 is the maximum.

    For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

    Example: ‘500`

  • :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](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

  • :lifecycle_state (String)

    Filter results by the specified lifecycle state. Must be a valid state for the resource type.

    Allowed values are: CREATING, ACTIVE, DELETING, DELETED, FAILED

  • :id (String)

    Filter results by OCID. Must be an OCID of the correct type for the resouce type.

  • :sort_order (String)

    The sort order to use, either ‘asc’ or ‘desc’, where ‘asc’ is ascending and ‘desc’ is descending.

    Allowed values are: ASC, DESC

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



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

def list_snapshots(file_system_id, opts = {})
  logger.debug 'Calling operation FileStorageClient#list_snapshots.' if logger

  raise "Missing the required parameter 'file_system_id' when calling list_snapshots." if file_system_id.nil?

  if opts[:lifecycle_state] && !%w[CREATING ACTIVE DELETING DELETED FAILED].include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of CREATING, ACTIVE, DELETING, DELETED, FAILED.'
  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 = '/snapshots'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:fileSystemId] = file_system_id
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'FileStorageClient#list_snapshots') 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::FileStorage::Models::SnapshotSummary>'
    )
  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.



102
103
104
# File 'lib/oci/file_storage/file_storage_client.rb', line 102

def logger
  @api_client.config.logger
end

#update_export(export_id, update_export_details, opts = {}) ⇒ Response

Updates the specified export’s 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.

Returns:



1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
# File 'lib/oci/file_storage/file_storage_client.rb', line 1650

def update_export(export_id, update_export_details, opts = {})
  logger.debug 'Calling operation FileStorageClient#update_export.' if logger

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

  path = '/exports/{exportId}'.sub('{exportId}', export_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(update_export_details)

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

#update_export_set(export_set_id, update_export_set_details, opts = {}) ⇒ Response

Updates the specified export set’s 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.

Returns:



1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
# File 'lib/oci/file_storage/file_storage_client.rb', line 1714

def update_export_set(export_set_id, update_export_set_details, opts = {})
  logger.debug 'Calling operation FileStorageClient#update_export_set.' if logger

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

  path = '/exportSets/{exportSetId}'.sub('{exportSetId}', export_set_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(update_export_set_details)

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

#update_file_system(file_system_id, update_file_system_details, opts = {}) ⇒ Response

Updates the specified file system’s information. You can use this operation to rename a file system.

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.

Returns:



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

def update_file_system(file_system_id, update_file_system_details, opts = {})
  logger.debug 'Calling operation FileStorageClient#update_file_system.' if logger

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

  path = '/fileSystems/{fileSystemId}'.sub('{fileSystemId}', file_system_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(update_file_system_details)

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

#update_mount_target(mount_target_id, update_mount_target_details, opts = {}) ⇒ Response

Updates the specified mount target’s 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.

Returns:



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
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
# File 'lib/oci/file_storage/file_storage_client.rb', line 1844

def update_mount_target(mount_target_id, update_mount_target_details, opts = {})
  logger.debug 'Calling operation FileStorageClient#update_mount_target.' if logger

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

  path = '/mountTargets/{mountTargetId}'.sub('{mountTargetId}', mount_target_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(update_mount_target_details)

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

#update_snapshot(snapshot_id, update_snapshot_details, opts = {}) ⇒ Response

Updates the specified snapshot’s 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.

Returns:



1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
# File 'lib/oci/file_storage/file_storage_client.rb', line 1908

def update_snapshot(snapshot_id, update_snapshot_details, opts = {})
  logger.debug 'Calling operation FileStorageClient#update_snapshot.' if logger

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

  path = '/snapshots/{snapshotId}'.sub('{snapshotId}', snapshot_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(update_snapshot_details)

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