Class: OCI::FileStorage::FileStorageClient
- Inherits:
-
Object
- Object
- OCI::FileStorage::FileStorageClient
- Defined in:
- lib/oci/file_storage/file_storage_client.rb
Overview
The API for the File Storage Service.
Instance Attribute Summary collapse
-
#api_client ⇒ OCI::ApiClient
readonly
Client used to make HTTP requests.
-
#endpoint ⇒ String
readonly
Fully qualified endpoint URL.
-
#region ⇒ String
The region, which will usually correspond to a value in Regions::REGION_ENUM.
-
#retry_config ⇒ OCI::Retry::RetryConfig
readonly
The default retry configuration to apply to all operations in this service client.
Instance Method Summary collapse
-
#create_export(create_export_details, opts = {}) ⇒ Response
Creates a new export in the specified export set, path, and file system.
-
#create_file_system(create_file_system_details, opts = {}) ⇒ Response
Creates a new file system in the specified compartment and availability domain.
-
#create_mount_target(create_mount_target_details, opts = {}) ⇒ Response
Creates a new mount target in the specified compartment and subnet.
-
#create_snapshot(create_snapshot_details, opts = {}) ⇒ Response
Creates a new snapshot of the specified file system.
-
#delete_export(export_id, opts = {}) ⇒ Response
Deletes the specified export.
-
#delete_file_system(file_system_id, opts = {}) ⇒ Response
Deletes the specified file system.
-
#delete_mount_target(mount_target_id, opts = {}) ⇒ Response
Deletes the specified mount target.
-
#delete_snapshot(snapshot_id, opts = {}) ⇒ Response
Deletes the specified snapshot.
-
#get_export(export_id, opts = {}) ⇒ Response
Gets the specified export’s information.
-
#get_export_set(export_set_id, opts = {}) ⇒ Response
Gets the specified export set’s information.
-
#get_file_system(file_system_id, opts = {}) ⇒ Response
Gets the specified file system’s information.
-
#get_mount_target(mount_target_id, opts = {}) ⇒ Response
Gets the specified mount target’s information.
-
#get_snapshot(snapshot_id, opts = {}) ⇒ Response
Gets the specified snapshot’s information.
-
#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ FileStorageClient
constructor
Creates a new FileStorageClient.
-
#list_export_sets(compartment_id, availability_domain, opts = {}) ⇒ Response
Lists the export set resources in the specified compartment.
-
#list_exports(opts = {}) ⇒ Response
Lists export resources by compartment, file system, or export set.
-
#list_file_systems(compartment_id, availability_domain, opts = {}) ⇒ Response
Lists the file system resources in the specified compartment.
-
#list_mount_targets(compartment_id, availability_domain, opts = {}) ⇒ Response
Lists the mount target resources in the specified compartment.
-
#list_snapshots(file_system_id, opts = {}) ⇒ Response
Lists snapshots of the specified file system.
-
#logger ⇒ Logger
The logger for this client.
-
#update_export(export_id, update_export_details, opts = {}) ⇒ Response
Updates the specified export’s information.
-
#update_export_set(export_set_id, update_export_set_details, opts = {}) ⇒ Response
Updates the specified export set’s information.
-
#update_file_system(file_system_id, update_file_system_details, opts = {}) ⇒ Response
Updates the specified file system’s information.
-
#update_mount_target(mount_target_id, update_mount_target_details, opts = {}) ⇒ Response
Updates the specified mount target’s information.
-
#update_snapshot(snapshot_id, update_snapshot_details, opts = {}) ⇒ Response
Updates the specified snapshot’s information.
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.
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_client ⇒ OCI::ApiClient (readonly)
Client used to make HTTP requests.
12 13 14 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 12 def api_client @api_client end |
#endpoint ⇒ String (readonly)
Fully qualified endpoint URL
16 17 18 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 16 def endpoint @endpoint end |
#region ⇒ String
The region, which will usually correspond to a value in Regions::REGION_ENUM.
26 27 28 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 26 def region @region end |
#retry_config ⇒ OCI::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
#create_export(create_export_details, opts = {}) ⇒ Response
Creates a new export in the specified export set, path, and file system.
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 125 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] # 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.(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.
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 209 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] # 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.(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.
299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 299 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] # 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.(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>`.
359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 359 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] # 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.(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.
418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 418 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] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(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.
478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 478 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] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(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.
537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 537 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] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(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.
595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 595 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] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(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.
647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 647 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' # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(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.
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 729 730 731 732 733 734 735 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 700 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' # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(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.
753 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 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 753 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' # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(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.
806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 806 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' # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(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.
859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 859 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' # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(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.
952 953 954 955 956 957 958 959 960 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 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 952 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' # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(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.
1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 1061 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' # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(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.
1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 1172 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' # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(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.
1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 1286 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' # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(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.
1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 1386 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' # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(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 |
#logger ⇒ Logger
Returns 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.
1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 1457 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] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(update_export_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(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.
1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 1517 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] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(update_export_set_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(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.
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 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 1579 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] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(update_file_system_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(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.
1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 1639 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] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(update_mount_target_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(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.
1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 1699 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] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(update_snapshot_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(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 |