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, 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_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.
Constructor Details
#initialize(config: nil, region: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ FileStorageClient
Creates a new FileStorageClient. If a config is not specified, then the global OCI.config will be used.
A region must be specified in either the config or the region parameter. If specified in both, then the region parameter will be used.
48 49 50 51 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 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 48 def initialize(config: nil, region: 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 region ||= config.region region ||= signer.region if signer.respond_to?(:region) self.region = region 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.
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 116 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 # 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-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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm).
For information about availability domains, see [Regions and Availability Domains](docs.us-phoenix-1.oraclecloud.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.
198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 198 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 # 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-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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm).
For information about availability domains, see [Regions and Availability Domains](docs.us-phoenix-1.oraclecloud.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.
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 286 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 # 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-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>`.
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 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 344 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 # 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-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.
401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 401 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 # 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] 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.
459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 459 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 # 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] 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.
516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 516 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 # 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] 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.
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 602 603 604 605 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 572 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 # 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] 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.
622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 622 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 # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' 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.
673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 673 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 # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' 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.
724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 724 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 # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' 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.
775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 775 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 # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' 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.
826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 826 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 # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' 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.
908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 908 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 # 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' 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.
1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 1006 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 # 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' 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.
1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 1106 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 # 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' 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.
1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 1209 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 # 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' 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.
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 1344 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 1298 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 # 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' 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.
93 94 95 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 93 def logger @api_client.config.logger end |
#update_export_set(export_set_id, update_export_set_details, opts = {}) ⇒ Response
Updates the specified export set’s information.
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 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 1367 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 # 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] 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.
1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 1427 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 # 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] 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.
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 |
# File 'lib/oci/file_storage/file_storage_client.rb', line 1485 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 # 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] 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 |