Class: Files::RemoteServer
- Inherits:
-
Object
- Object
- Files::RemoteServer
- Defined in:
- lib/files.com/models/remote_server.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
- .all(params = {}, options = {}) ⇒ Object
-
.create(params = {}, options = {}) ⇒ Object
Parameters: aws_access_key - string - AWS Access Key.
- .delete(id, params = {}, options = {}) ⇒ Object
- .destroy(id, params = {}, options = {}) ⇒ Object
-
.find(id, params = {}, options = {}) ⇒ Object
Parameters: id (required) - int64 - Remote Server ID.
- .get(id, params = {}, options = {}) ⇒ Object
-
.list(params = {}, options = {}) ⇒ Object
Parameters: cursor - string - Used for pagination.
-
.update(id, params = {}, options = {}) ⇒ Object
Parameters: aws_access_key - string - AWS Access Key.
Instance Method Summary collapse
-
#auth_account_name ⇒ Object
string - Describes the authorized account.
- #auth_account_name=(value) ⇒ Object
-
#auth_setup_link ⇒ Object
string - Returns link to login with an Oauth provider.
- #auth_setup_link=(value) ⇒ Object
-
#auth_status ⇒ Object
string - Either ‘in_setup` or `complete`.
- #auth_status=(value) ⇒ Object
-
#authentication_method ⇒ Object
string - Type of authentication method.
- #authentication_method=(value) ⇒ Object
-
#aws_access_key ⇒ Object
string - AWS Access Key.
- #aws_access_key=(value) ⇒ Object
-
#aws_secret_key ⇒ Object
string - AWS secret key.
- #aws_secret_key=(value) ⇒ Object
-
#azure_blob_storage_access_key ⇒ Object
string - Azure Blob Storage secret key.
- #azure_blob_storage_access_key=(value) ⇒ Object
-
#azure_blob_storage_account ⇒ Object
string - Azure Blob Storage Account name.
- #azure_blob_storage_account=(value) ⇒ Object
-
#azure_blob_storage_container ⇒ Object
string - Azure Blob Storage Container name.
- #azure_blob_storage_container=(value) ⇒ Object
-
#backblaze_b2_application_key ⇒ Object
string - Backblaze B2 Cloud Storage applicationKey.
- #backblaze_b2_application_key=(value) ⇒ Object
-
#backblaze_b2_bucket ⇒ Object
string - Backblaze B2 Cloud Storage Bucket name.
- #backblaze_b2_bucket=(value) ⇒ Object
-
#backblaze_b2_key_id ⇒ Object
string - Backblaze B2 Cloud Storage keyID.
- #backblaze_b2_key_id=(value) ⇒ Object
-
#backblaze_b2_s3_endpoint ⇒ Object
string - Backblaze B2 Cloud Storage S3 Endpoint.
- #backblaze_b2_s3_endpoint=(value) ⇒ Object
- #delete(params = {}) ⇒ Object
- #destroy(params = {}) ⇒ Object
-
#disabled ⇒ Object
boolean - If true, this server has been disabled due to failures.
- #disabled=(value) ⇒ Object
-
#enable_dedicated_ips ⇒ Object
boolean - ‘true` if remote server only accepts connections from dedicated IPs.
- #enable_dedicated_ips=(value) ⇒ Object
-
#google_cloud_storage_bucket ⇒ Object
string - Google Cloud Storage bucket name.
- #google_cloud_storage_bucket=(value) ⇒ Object
-
#google_cloud_storage_credentials_json ⇒ Object
string - A JSON file that contains the private key.
- #google_cloud_storage_credentials_json=(value) ⇒ Object
-
#google_cloud_storage_project_id ⇒ Object
string - Google Cloud Project ID.
- #google_cloud_storage_project_id=(value) ⇒ Object
-
#hostname ⇒ Object
string - Hostname or IP address.
- #hostname=(value) ⇒ Object
-
#id ⇒ Object
int64 - Remote server ID.
- #id=(value) ⇒ Object
-
#initialize(attributes = {}, options = {}) ⇒ RemoteServer
constructor
A new instance of RemoteServer.
-
#max_connections ⇒ Object
int64 - Max number of parallel connections.
- #max_connections=(value) ⇒ Object
-
#name ⇒ Object
string - Internal name for your reference.
- #name=(value) ⇒ Object
-
#one_drive_account_type ⇒ Object
string - Either personal or business_other account types.
- #one_drive_account_type=(value) ⇒ Object
-
#password ⇒ Object
string - Password if needed.
- #password=(value) ⇒ Object
-
#port ⇒ Object
int64 - Port for remote server.
- #port=(value) ⇒ Object
-
#private_key ⇒ Object
string - Private key if needed.
- #private_key=(value) ⇒ Object
-
#rackspace_api_key ⇒ Object
string - Rackspace API key from the Rackspace Cloud Control Panel.
- #rackspace_api_key=(value) ⇒ Object
-
#rackspace_container ⇒ Object
string - The name of the container (top level directory) where files will sync.
- #rackspace_container=(value) ⇒ Object
-
#rackspace_region ⇒ Object
string - Three letter airport code for Rackspace region.
- #rackspace_region=(value) ⇒ Object
-
#rackspace_username ⇒ Object
string - Rackspace username used to login to the Rackspace Cloud Control Panel.
- #rackspace_username=(value) ⇒ Object
-
#remote_home_path ⇒ Object
string - Initial home folder on remote server.
- #remote_home_path=(value) ⇒ Object
-
#reset_authentication ⇒ Object
boolean - Reset authenticated account.
- #reset_authentication=(value) ⇒ Object
-
#s3_bucket ⇒ Object
string - S3 bucket name.
- #s3_bucket=(value) ⇒ Object
-
#s3_compatible_access_key ⇒ Object
string - S3-compatible Access Key.
- #s3_compatible_access_key=(value) ⇒ Object
-
#s3_compatible_bucket ⇒ Object
string - S3-compatible Bucket name.
- #s3_compatible_bucket=(value) ⇒ Object
-
#s3_compatible_endpoint ⇒ Object
string - S3-compatible endpoint.
- #s3_compatible_endpoint=(value) ⇒ Object
-
#s3_compatible_region ⇒ Object
string - S3-compatible endpoint.
- #s3_compatible_region=(value) ⇒ Object
-
#s3_compatible_secret_key ⇒ Object
string - S3-compatible secret key.
- #s3_compatible_secret_key=(value) ⇒ Object
-
#s3_region ⇒ Object
string - S3 region.
- #s3_region=(value) ⇒ Object
- #save ⇒ Object
-
#server_certificate ⇒ Object
string - Remote server certificate.
- #server_certificate=(value) ⇒ Object
-
#server_host_key ⇒ Object
string - Remote server SSH Host Key.
- #server_host_key=(value) ⇒ Object
-
#server_type ⇒ Object
string - Remote server type.
- #server_type=(value) ⇒ Object
-
#ssl ⇒ Object
string - Should we require SSL?.
- #ssl=(value) ⇒ Object
-
#ssl_certificate ⇒ Object
string - SSL client certificate.
- #ssl_certificate=(value) ⇒ Object
-
#update(params = {}) ⇒ Object
Parameters: aws_access_key - string - AWS Access Key.
-
#username ⇒ Object
string - Remote server username.
- #username=(value) ⇒ Object
-
#wasabi_access_key ⇒ Object
string - Wasabi access key.
- #wasabi_access_key=(value) ⇒ Object
-
#wasabi_bucket ⇒ Object
string - Wasabi Bucket name.
- #wasabi_bucket=(value) ⇒ Object
-
#wasabi_region ⇒ Object
string - Wasabi region.
- #wasabi_region=(value) ⇒ Object
-
#wasabi_secret_key ⇒ Object
string - Wasabi secret key.
- #wasabi_secret_key=(value) ⇒ Object
Constructor Details
#initialize(attributes = {}, options = {}) ⇒ RemoteServer
Returns a new instance of RemoteServer.
7 8 9 10 |
# File 'lib/files.com/models/remote_server.rb', line 7 def initialize(attributes = {}, = {}) @attributes = attributes || {} @options = || {} end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
5 6 7 |
# File 'lib/files.com/models/remote_server.rb', line 5 def attributes @attributes end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/files.com/models/remote_server.rb', line 5 def @options end |
Class Method Details
.all(params = {}, options = {}) ⇒ Object
581 582 583 |
# File 'lib/files.com/models/remote_server.rb', line 581 def self.all(params = {}, = {}) list(params, ) end |
.create(params = {}, options = {}) ⇒ Object
Parameters:
aws_access_key - string - AWS Access Key.
aws_secret_key - string - AWS secret key.
password - string - Password if needed.
private_key - string - Private key if needed.
ssl_certificate - string - SSL client certificate.
google_cloud_storage_credentials_json - string - A JSON file that contains the private key. To generate see https://cloud.google.com/storage/docs/json_api/v1/how-tos/authorizing#APIKey
wasabi_access_key - string - Wasabi access key.
wasabi_secret_key - string - Wasabi secret key.
backblaze_b2_key_id - string - Backblaze B2 Cloud Storage keyID.
backblaze_b2_application_key - string - Backblaze B2 Cloud Storage applicationKey.
rackspace_api_key - string - Rackspace API key from the Rackspace Cloud Control Panel.
reset_authentication - boolean - Reset authenticated account
azure_blob_storage_access_key - string - Azure Blob Storage secret key.
hostname - string - Hostname or IP address
name - string - Internal name for your reference
max_connections - int64 - Max number of parallel connections. Ignored for S3 connections (we will parallelize these as much as possible).
port - int64 - Port for remote server. Not needed for S3.
s3_bucket - string - S3 bucket name
s3_region - string - S3 region
server_certificate - string - Remote server certificate
server_host_key - string - Remote server SSH Host Key. If provided, we will require that the server host key matches the provided key. Uses OpenSSH format similar to what would go into ~/.ssh/known_hosts
server_type - string - Remote server type.
ssl - string - Should we require SSL?
username - string - Remote server username. Not needed for S3 buckets.
google_cloud_storage_bucket - string - Google Cloud Storage bucket name
google_cloud_storage_project_id - string - Google Cloud Project ID
backblaze_b2_bucket - string - Backblaze B2 Cloud Storage Bucket name
backblaze_b2_s3_endpoint - string - Backblaze B2 Cloud Storage S3 Endpoint
wasabi_bucket - string - Wasabi Bucket name
wasabi_region - string - Wasabi region
rackspace_username - string - Rackspace username used to login to the Rackspace Cloud Control Panel.
rackspace_region - string - Three letter airport code for Rackspace region. See https://support.rackspace.com/how-to/about-regions/
rackspace_container - string - The name of the container (top level directory) where files will sync.
one_drive_account_type - string - Either personal or business_other account types
azure_blob_storage_account - string - Azure Blob Storage Account name
azure_blob_storage_container - string - Azure Blob Storage Container name
s3_compatible_bucket - string - S3-compatible Bucket name
s3_compatible_endpoint - string - S3-compatible endpoint
s3_compatible_region - string - S3-compatible endpoint
enable_dedicated_ips - boolean - `true` if remote server only accepts connections from dedicated IPs
s3_compatible_access_key - string - S3-compatible Access Key.
s3_compatible_secret_key - string - S3-compatible secret key
644 645 646 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 683 684 685 686 687 688 |
# File 'lib/files.com/models/remote_server.rb', line 644 def self.create(params = {}, = {}) raise InvalidParameterError.new("Bad parameter: aws_access_key must be an String") if params.dig(:aws_access_key) and !params.dig(:aws_access_key).is_a?(String) raise InvalidParameterError.new("Bad parameter: aws_secret_key must be an String") if params.dig(:aws_secret_key) and !params.dig(:aws_secret_key).is_a?(String) raise InvalidParameterError.new("Bad parameter: password must be an String") if params.dig(:password) and !params.dig(:password).is_a?(String) raise InvalidParameterError.new("Bad parameter: private_key must be an String") if params.dig(:private_key) and !params.dig(:private_key).is_a?(String) raise InvalidParameterError.new("Bad parameter: ssl_certificate must be an String") if params.dig(:ssl_certificate) and !params.dig(:ssl_certificate).is_a?(String) raise InvalidParameterError.new("Bad parameter: google_cloud_storage_credentials_json must be an String") if params.dig(:google_cloud_storage_credentials_json) and !params.dig(:google_cloud_storage_credentials_json).is_a?(String) raise InvalidParameterError.new("Bad parameter: wasabi_access_key must be an String") if params.dig(:wasabi_access_key) and !params.dig(:wasabi_access_key).is_a?(String) raise InvalidParameterError.new("Bad parameter: wasabi_secret_key must be an String") if params.dig(:wasabi_secret_key) and !params.dig(:wasabi_secret_key).is_a?(String) raise InvalidParameterError.new("Bad parameter: backblaze_b2_key_id must be an String") if params.dig(:backblaze_b2_key_id) and !params.dig(:backblaze_b2_key_id).is_a?(String) raise InvalidParameterError.new("Bad parameter: backblaze_b2_application_key must be an String") if params.dig(:backblaze_b2_application_key) and !params.dig(:backblaze_b2_application_key).is_a?(String) raise InvalidParameterError.new("Bad parameter: rackspace_api_key must be an String") if params.dig(:rackspace_api_key) and !params.dig(:rackspace_api_key).is_a?(String) raise InvalidParameterError.new("Bad parameter: azure_blob_storage_access_key must be an String") if params.dig(:azure_blob_storage_access_key) and !params.dig(:azure_blob_storage_access_key).is_a?(String) raise InvalidParameterError.new("Bad parameter: hostname must be an String") if params.dig(:hostname) and !params.dig(:hostname).is_a?(String) raise InvalidParameterError.new("Bad parameter: name must be an String") if params.dig(:name) and !params.dig(:name).is_a?(String) raise InvalidParameterError.new("Bad parameter: max_connections must be an Integer") if params.dig(:max_connections) and !params.dig(:max_connections).is_a?(Integer) raise InvalidParameterError.new("Bad parameter: port must be an Integer") if params.dig(:port) and !params.dig(:port).is_a?(Integer) raise InvalidParameterError.new("Bad parameter: s3_bucket must be an String") if params.dig(:s3_bucket) and !params.dig(:s3_bucket).is_a?(String) raise InvalidParameterError.new("Bad parameter: s3_region must be an String") if params.dig(:s3_region) and !params.dig(:s3_region).is_a?(String) raise InvalidParameterError.new("Bad parameter: server_certificate must be an String") if params.dig(:server_certificate) and !params.dig(:server_certificate).is_a?(String) raise InvalidParameterError.new("Bad parameter: server_host_key must be an String") if params.dig(:server_host_key) and !params.dig(:server_host_key).is_a?(String) raise InvalidParameterError.new("Bad parameter: server_type must be an String") if params.dig(:server_type) and !params.dig(:server_type).is_a?(String) raise InvalidParameterError.new("Bad parameter: ssl must be an String") if params.dig(:ssl) and !params.dig(:ssl).is_a?(String) raise InvalidParameterError.new("Bad parameter: username must be an String") if params.dig(:username) and !params.dig(:username).is_a?(String) raise InvalidParameterError.new("Bad parameter: google_cloud_storage_bucket must be an String") if params.dig(:google_cloud_storage_bucket) and !params.dig(:google_cloud_storage_bucket).is_a?(String) raise InvalidParameterError.new("Bad parameter: google_cloud_storage_project_id must be an String") if params.dig(:google_cloud_storage_project_id) and !params.dig(:google_cloud_storage_project_id).is_a?(String) raise InvalidParameterError.new("Bad parameter: backblaze_b2_bucket must be an String") if params.dig(:backblaze_b2_bucket) and !params.dig(:backblaze_b2_bucket).is_a?(String) raise InvalidParameterError.new("Bad parameter: backblaze_b2_s3_endpoint must be an String") if params.dig(:backblaze_b2_s3_endpoint) and !params.dig(:backblaze_b2_s3_endpoint).is_a?(String) raise InvalidParameterError.new("Bad parameter: wasabi_bucket must be an String") if params.dig(:wasabi_bucket) and !params.dig(:wasabi_bucket).is_a?(String) raise InvalidParameterError.new("Bad parameter: wasabi_region must be an String") if params.dig(:wasabi_region) and !params.dig(:wasabi_region).is_a?(String) raise InvalidParameterError.new("Bad parameter: rackspace_username must be an String") if params.dig(:rackspace_username) and !params.dig(:rackspace_username).is_a?(String) raise InvalidParameterError.new("Bad parameter: rackspace_region must be an String") if params.dig(:rackspace_region) and !params.dig(:rackspace_region).is_a?(String) raise InvalidParameterError.new("Bad parameter: rackspace_container must be an String") if params.dig(:rackspace_container) and !params.dig(:rackspace_container).is_a?(String) raise InvalidParameterError.new("Bad parameter: one_drive_account_type must be an String") if params.dig(:one_drive_account_type) and !params.dig(:one_drive_account_type).is_a?(String) raise InvalidParameterError.new("Bad parameter: azure_blob_storage_account must be an String") if params.dig(:azure_blob_storage_account) and !params.dig(:azure_blob_storage_account).is_a?(String) raise InvalidParameterError.new("Bad parameter: azure_blob_storage_container must be an String") if params.dig(:azure_blob_storage_container) and !params.dig(:azure_blob_storage_container).is_a?(String) raise InvalidParameterError.new("Bad parameter: s3_compatible_bucket must be an String") if params.dig(:s3_compatible_bucket) and !params.dig(:s3_compatible_bucket).is_a?(String) raise InvalidParameterError.new("Bad parameter: s3_compatible_endpoint must be an String") if params.dig(:s3_compatible_endpoint) and !params.dig(:s3_compatible_endpoint).is_a?(String) raise InvalidParameterError.new("Bad parameter: s3_compatible_region must be an String") if params.dig(:s3_compatible_region) and !params.dig(:s3_compatible_region).is_a?(String) raise InvalidParameterError.new("Bad parameter: s3_compatible_access_key must be an String") if params.dig(:s3_compatible_access_key) and !params.dig(:s3_compatible_access_key).is_a?(String) raise InvalidParameterError.new("Bad parameter: s3_compatible_secret_key must be an String") if params.dig(:s3_compatible_secret_key) and !params.dig(:s3_compatible_secret_key).is_a?(String) response, = Api.send_request("/remote_servers", :post, params, ) RemoteServer.new(response.data, ) end |
.delete(id, params = {}, options = {}) ⇒ Object
783 784 785 786 787 788 789 790 791 |
# File 'lib/files.com/models/remote_server.rb', line 783 def self.delete(id, params = {}, = {}) params ||= {} params[:id] = id raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer) raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id) response, = Api.send_request("/remote_servers/#{params[:id]}", :delete, params, ) response.data end |
.destroy(id, params = {}, options = {}) ⇒ Object
793 794 795 |
# File 'lib/files.com/models/remote_server.rb', line 793 def self.destroy(id, params = {}, = {}) delete(id, params, ) end |
.find(id, params = {}, options = {}) ⇒ Object
Parameters:
id (required) - int64 - Remote Server ID.
587 588 589 590 591 592 593 594 595 |
# File 'lib/files.com/models/remote_server.rb', line 587 def self.find(id, params = {}, = {}) params ||= {} params[:id] = id raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer) raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id) response, = Api.send_request("/remote_servers/#{params[:id]}", :get, params, ) RemoteServer.new(response.data, ) end |
.get(id, params = {}, options = {}) ⇒ Object
597 598 599 |
# File 'lib/files.com/models/remote_server.rb', line 597 def self.get(id, params = {}, = {}) find(id, params, ) end |
.list(params = {}, options = {}) ⇒ Object
Parameters:
cursor - string - Used for pagination. Send a cursor value to resume an existing list from the point at which you left off. Get a cursor from an existing list via either the X-Files-Cursor-Next header or the X-Files-Cursor-Prev header.
per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
572 573 574 575 576 577 578 579 |
# File 'lib/files.com/models/remote_server.rb', line 572 def self.list(params = {}, = {}) raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String) raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer) List.new(RemoteServer, params) do Api.send_request("/remote_servers", :get, params, ) end end |
.update(id, params = {}, options = {}) ⇒ Object
Parameters:
aws_access_key - string - AWS Access Key.
aws_secret_key - string - AWS secret key.
password - string - Password if needed.
private_key - string - Private key if needed.
ssl_certificate - string - SSL client certificate.
google_cloud_storage_credentials_json - string - A JSON file that contains the private key. To generate see https://cloud.google.com/storage/docs/json_api/v1/how-tos/authorizing#APIKey
wasabi_access_key - string - Wasabi access key.
wasabi_secret_key - string - Wasabi secret key.
backblaze_b2_key_id - string - Backblaze B2 Cloud Storage keyID.
backblaze_b2_application_key - string - Backblaze B2 Cloud Storage applicationKey.
rackspace_api_key - string - Rackspace API key from the Rackspace Cloud Control Panel.
reset_authentication - boolean - Reset authenticated account
azure_blob_storage_access_key - string - Azure Blob Storage secret key.
hostname - string - Hostname or IP address
name - string - Internal name for your reference
max_connections - int64 - Max number of parallel connections. Ignored for S3 connections (we will parallelize these as much as possible).
port - int64 - Port for remote server. Not needed for S3.
s3_bucket - string - S3 bucket name
s3_region - string - S3 region
server_certificate - string - Remote server certificate
server_host_key - string - Remote server SSH Host Key. If provided, we will require that the server host key matches the provided key. Uses OpenSSH format similar to what would go into ~/.ssh/known_hosts
server_type - string - Remote server type.
ssl - string - Should we require SSL?
username - string - Remote server username. Not needed for S3 buckets.
google_cloud_storage_bucket - string - Google Cloud Storage bucket name
google_cloud_storage_project_id - string - Google Cloud Project ID
backblaze_b2_bucket - string - Backblaze B2 Cloud Storage Bucket name
backblaze_b2_s3_endpoint - string - Backblaze B2 Cloud Storage S3 Endpoint
wasabi_bucket - string - Wasabi Bucket name
wasabi_region - string - Wasabi region
rackspace_username - string - Rackspace username used to login to the Rackspace Cloud Control Panel.
rackspace_region - string - Three letter airport code for Rackspace region. See https://support.rackspace.com/how-to/about-regions/
rackspace_container - string - The name of the container (top level directory) where files will sync.
one_drive_account_type - string - Either personal or business_other account types
azure_blob_storage_account - string - Azure Blob Storage Account name
azure_blob_storage_container - string - Azure Blob Storage Container name
s3_compatible_bucket - string - S3-compatible Bucket name
s3_compatible_endpoint - string - S3-compatible endpoint
s3_compatible_region - string - S3-compatible endpoint
enable_dedicated_ips - boolean - `true` if remote server only accepts connections from dedicated IPs
s3_compatible_access_key - string - S3-compatible Access Key.
s3_compatible_secret_key - string - S3-compatible secret key
733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 |
# File 'lib/files.com/models/remote_server.rb', line 733 def self.update(id, params = {}, = {}) params ||= {} params[:id] = id raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer) raise InvalidParameterError.new("Bad parameter: aws_access_key must be an String") if params.dig(:aws_access_key) and !params.dig(:aws_access_key).is_a?(String) raise InvalidParameterError.new("Bad parameter: aws_secret_key must be an String") if params.dig(:aws_secret_key) and !params.dig(:aws_secret_key).is_a?(String) raise InvalidParameterError.new("Bad parameter: password must be an String") if params.dig(:password) and !params.dig(:password).is_a?(String) raise InvalidParameterError.new("Bad parameter: private_key must be an String") if params.dig(:private_key) and !params.dig(:private_key).is_a?(String) raise InvalidParameterError.new("Bad parameter: ssl_certificate must be an String") if params.dig(:ssl_certificate) and !params.dig(:ssl_certificate).is_a?(String) raise InvalidParameterError.new("Bad parameter: google_cloud_storage_credentials_json must be an String") if params.dig(:google_cloud_storage_credentials_json) and !params.dig(:google_cloud_storage_credentials_json).is_a?(String) raise InvalidParameterError.new("Bad parameter: wasabi_access_key must be an String") if params.dig(:wasabi_access_key) and !params.dig(:wasabi_access_key).is_a?(String) raise InvalidParameterError.new("Bad parameter: wasabi_secret_key must be an String") if params.dig(:wasabi_secret_key) and !params.dig(:wasabi_secret_key).is_a?(String) raise InvalidParameterError.new("Bad parameter: backblaze_b2_key_id must be an String") if params.dig(:backblaze_b2_key_id) and !params.dig(:backblaze_b2_key_id).is_a?(String) raise InvalidParameterError.new("Bad parameter: backblaze_b2_application_key must be an String") if params.dig(:backblaze_b2_application_key) and !params.dig(:backblaze_b2_application_key).is_a?(String) raise InvalidParameterError.new("Bad parameter: rackspace_api_key must be an String") if params.dig(:rackspace_api_key) and !params.dig(:rackspace_api_key).is_a?(String) raise InvalidParameterError.new("Bad parameter: azure_blob_storage_access_key must be an String") if params.dig(:azure_blob_storage_access_key) and !params.dig(:azure_blob_storage_access_key).is_a?(String) raise InvalidParameterError.new("Bad parameter: hostname must be an String") if params.dig(:hostname) and !params.dig(:hostname).is_a?(String) raise InvalidParameterError.new("Bad parameter: name must be an String") if params.dig(:name) and !params.dig(:name).is_a?(String) raise InvalidParameterError.new("Bad parameter: max_connections must be an Integer") if params.dig(:max_connections) and !params.dig(:max_connections).is_a?(Integer) raise InvalidParameterError.new("Bad parameter: port must be an Integer") if params.dig(:port) and !params.dig(:port).is_a?(Integer) raise InvalidParameterError.new("Bad parameter: s3_bucket must be an String") if params.dig(:s3_bucket) and !params.dig(:s3_bucket).is_a?(String) raise InvalidParameterError.new("Bad parameter: s3_region must be an String") if params.dig(:s3_region) and !params.dig(:s3_region).is_a?(String) raise InvalidParameterError.new("Bad parameter: server_certificate must be an String") if params.dig(:server_certificate) and !params.dig(:server_certificate).is_a?(String) raise InvalidParameterError.new("Bad parameter: server_host_key must be an String") if params.dig(:server_host_key) and !params.dig(:server_host_key).is_a?(String) raise InvalidParameterError.new("Bad parameter: server_type must be an String") if params.dig(:server_type) and !params.dig(:server_type).is_a?(String) raise InvalidParameterError.new("Bad parameter: ssl must be an String") if params.dig(:ssl) and !params.dig(:ssl).is_a?(String) raise InvalidParameterError.new("Bad parameter: username must be an String") if params.dig(:username) and !params.dig(:username).is_a?(String) raise InvalidParameterError.new("Bad parameter: google_cloud_storage_bucket must be an String") if params.dig(:google_cloud_storage_bucket) and !params.dig(:google_cloud_storage_bucket).is_a?(String) raise InvalidParameterError.new("Bad parameter: google_cloud_storage_project_id must be an String") if params.dig(:google_cloud_storage_project_id) and !params.dig(:google_cloud_storage_project_id).is_a?(String) raise InvalidParameterError.new("Bad parameter: backblaze_b2_bucket must be an String") if params.dig(:backblaze_b2_bucket) and !params.dig(:backblaze_b2_bucket).is_a?(String) raise InvalidParameterError.new("Bad parameter: backblaze_b2_s3_endpoint must be an String") if params.dig(:backblaze_b2_s3_endpoint) and !params.dig(:backblaze_b2_s3_endpoint).is_a?(String) raise InvalidParameterError.new("Bad parameter: wasabi_bucket must be an String") if params.dig(:wasabi_bucket) and !params.dig(:wasabi_bucket).is_a?(String) raise InvalidParameterError.new("Bad parameter: wasabi_region must be an String") if params.dig(:wasabi_region) and !params.dig(:wasabi_region).is_a?(String) raise InvalidParameterError.new("Bad parameter: rackspace_username must be an String") if params.dig(:rackspace_username) and !params.dig(:rackspace_username).is_a?(String) raise InvalidParameterError.new("Bad parameter: rackspace_region must be an String") if params.dig(:rackspace_region) and !params.dig(:rackspace_region).is_a?(String) raise InvalidParameterError.new("Bad parameter: rackspace_container must be an String") if params.dig(:rackspace_container) and !params.dig(:rackspace_container).is_a?(String) raise InvalidParameterError.new("Bad parameter: one_drive_account_type must be an String") if params.dig(:one_drive_account_type) and !params.dig(:one_drive_account_type).is_a?(String) raise InvalidParameterError.new("Bad parameter: azure_blob_storage_account must be an String") if params.dig(:azure_blob_storage_account) and !params.dig(:azure_blob_storage_account).is_a?(String) raise InvalidParameterError.new("Bad parameter: azure_blob_storage_container must be an String") if params.dig(:azure_blob_storage_container) and !params.dig(:azure_blob_storage_container).is_a?(String) raise InvalidParameterError.new("Bad parameter: s3_compatible_bucket must be an String") if params.dig(:s3_compatible_bucket) and !params.dig(:s3_compatible_bucket).is_a?(String) raise InvalidParameterError.new("Bad parameter: s3_compatible_endpoint must be an String") if params.dig(:s3_compatible_endpoint) and !params.dig(:s3_compatible_endpoint).is_a?(String) raise InvalidParameterError.new("Bad parameter: s3_compatible_region must be an String") if params.dig(:s3_compatible_region) and !params.dig(:s3_compatible_region).is_a?(String) raise InvalidParameterError.new("Bad parameter: s3_compatible_access_key must be an String") if params.dig(:s3_compatible_access_key) and !params.dig(:s3_compatible_access_key).is_a?(String) raise InvalidParameterError.new("Bad parameter: s3_compatible_secret_key must be an String") if params.dig(:s3_compatible_secret_key) and !params.dig(:s3_compatible_secret_key).is_a?(String) raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id) response, = Api.send_request("/remote_servers/#{params[:id]}", :patch, params, ) RemoteServer.new(response.data, ) end |
Instance Method Details
#auth_account_name ⇒ Object
string - Describes the authorized account
265 266 267 |
# File 'lib/files.com/models/remote_server.rb', line 265 def auth_account_name @attributes[:auth_account_name] end |
#auth_account_name=(value) ⇒ Object
269 270 271 |
# File 'lib/files.com/models/remote_server.rb', line 269 def auth_account_name=(value) @attributes[:auth_account_name] = value end |
#auth_setup_link ⇒ Object
string - Returns link to login with an Oauth provider
247 248 249 |
# File 'lib/files.com/models/remote_server.rb', line 247 def auth_setup_link @attributes[:auth_setup_link] end |
#auth_setup_link=(value) ⇒ Object
251 252 253 |
# File 'lib/files.com/models/remote_server.rb', line 251 def auth_setup_link=(value) @attributes[:auth_setup_link] = value end |
#auth_status ⇒ Object
string - Either ‘in_setup` or `complete`
256 257 258 |
# File 'lib/files.com/models/remote_server.rb', line 256 def auth_status @attributes[:auth_status] end |
#auth_status=(value) ⇒ Object
260 261 262 |
# File 'lib/files.com/models/remote_server.rb', line 260 def auth_status=(value) @attributes[:auth_status] = value end |
#authentication_method ⇒ Object
string - Type of authentication method
31 32 33 |
# File 'lib/files.com/models/remote_server.rb', line 31 def authentication_method @attributes[:authentication_method] end |
#authentication_method=(value) ⇒ Object
35 36 37 |
# File 'lib/files.com/models/remote_server.rb', line 35 def authentication_method=(value) @attributes[:authentication_method] = value end |
#aws_access_key ⇒ Object
string - AWS Access Key.
103 104 105 |
# File 'lib/files.com/models/remote_server.rb', line 103 def aws_access_key @attributes[:aws_access_key] end |
#aws_access_key=(value) ⇒ Object
107 108 109 |
# File 'lib/files.com/models/remote_server.rb', line 107 def aws_access_key=(value) @attributes[:aws_access_key] = value end |
#aws_secret_key ⇒ Object
string - AWS secret key.
346 347 348 |
# File 'lib/files.com/models/remote_server.rb', line 346 def aws_secret_key @attributes[:aws_secret_key] end |
#aws_secret_key=(value) ⇒ Object
350 351 352 |
# File 'lib/files.com/models/remote_server.rb', line 350 def aws_secret_key=(value) @attributes[:aws_secret_key] = value end |
#azure_blob_storage_access_key ⇒ Object
string - Azure Blob Storage secret key.
436 437 438 |
# File 'lib/files.com/models/remote_server.rb', line 436 def azure_blob_storage_access_key @attributes[:azure_blob_storage_access_key] end |
#azure_blob_storage_access_key=(value) ⇒ Object
440 441 442 |
# File 'lib/files.com/models/remote_server.rb', line 440 def azure_blob_storage_access_key=(value) @attributes[:azure_blob_storage_access_key] = value end |
#azure_blob_storage_account ⇒ Object
string - Azure Blob Storage Account name
283 284 285 |
# File 'lib/files.com/models/remote_server.rb', line 283 def azure_blob_storage_account @attributes[:azure_blob_storage_account] end |
#azure_blob_storage_account=(value) ⇒ Object
287 288 289 |
# File 'lib/files.com/models/remote_server.rb', line 287 def azure_blob_storage_account=(value) @attributes[:azure_blob_storage_account] = value end |
#azure_blob_storage_container ⇒ Object
string - Azure Blob Storage Container name
292 293 294 |
# File 'lib/files.com/models/remote_server.rb', line 292 def azure_blob_storage_container @attributes[:azure_blob_storage_container] end |
#azure_blob_storage_container=(value) ⇒ Object
296 297 298 |
# File 'lib/files.com/models/remote_server.rb', line 296 def azure_blob_storage_container=(value) @attributes[:azure_blob_storage_container] = value end |
#backblaze_b2_application_key ⇒ Object
string - Backblaze B2 Cloud Storage applicationKey.
409 410 411 |
# File 'lib/files.com/models/remote_server.rb', line 409 def backblaze_b2_application_key @attributes[:backblaze_b2_application_key] end |
#backblaze_b2_application_key=(value) ⇒ Object
413 414 415 |
# File 'lib/files.com/models/remote_server.rb', line 413 def backblaze_b2_application_key=(value) @attributes[:backblaze_b2_application_key] = value end |
#backblaze_b2_bucket ⇒ Object
string - Backblaze B2 Cloud Storage Bucket name
184 185 186 |
# File 'lib/files.com/models/remote_server.rb', line 184 def backblaze_b2_bucket @attributes[:backblaze_b2_bucket] end |
#backblaze_b2_bucket=(value) ⇒ Object
188 189 190 |
# File 'lib/files.com/models/remote_server.rb', line 188 def backblaze_b2_bucket=(value) @attributes[:backblaze_b2_bucket] = value end |
#backblaze_b2_key_id ⇒ Object
string - Backblaze B2 Cloud Storage keyID.
400 401 402 |
# File 'lib/files.com/models/remote_server.rb', line 400 def backblaze_b2_key_id @attributes[:backblaze_b2_key_id] end |
#backblaze_b2_key_id=(value) ⇒ Object
404 405 406 |
# File 'lib/files.com/models/remote_server.rb', line 404 def backblaze_b2_key_id=(value) @attributes[:backblaze_b2_key_id] = value end |
#backblaze_b2_s3_endpoint ⇒ Object
string - Backblaze B2 Cloud Storage S3 Endpoint
175 176 177 |
# File 'lib/files.com/models/remote_server.rb', line 175 def backblaze_b2_s3_endpoint @attributes[:backblaze_b2_s3_endpoint] end |
#backblaze_b2_s3_endpoint=(value) ⇒ Object
179 180 181 |
# File 'lib/files.com/models/remote_server.rb', line 179 def backblaze_b2_s3_endpoint=(value) @attributes[:backblaze_b2_s3_endpoint] = value end |
#delete(params = {}) ⇒ Object
546 547 548 549 550 551 552 553 554 |
# File 'lib/files.com/models/remote_server.rb', line 546 def delete(params = {}) params ||= {} params[:id] = @attributes[:id] raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id] raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer) raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id) Api.send_request("/remote_servers/#{@attributes[:id]}", :delete, params, @options) end |
#destroy(params = {}) ⇒ Object
556 557 558 |
# File 'lib/files.com/models/remote_server.rb', line 556 def destroy(params = {}) delete(params) end |
#disabled ⇒ Object
boolean - If true, this server has been disabled due to failures. Make any change or set disabled to false to clear this flag.
22 23 24 |
# File 'lib/files.com/models/remote_server.rb', line 22 def disabled @attributes[:disabled] end |
#disabled=(value) ⇒ Object
26 27 28 |
# File 'lib/files.com/models/remote_server.rb', line 26 def disabled=(value) @attributes[:disabled] = value end |
#enable_dedicated_ips ⇒ Object
boolean - ‘true` if remote server only accepts connections from dedicated IPs
337 338 339 |
# File 'lib/files.com/models/remote_server.rb', line 337 def enable_dedicated_ips @attributes[:enable_dedicated_ips] end |
#enable_dedicated_ips=(value) ⇒ Object
341 342 343 |
# File 'lib/files.com/models/remote_server.rb', line 341 def enable_dedicated_ips=(value) @attributes[:enable_dedicated_ips] = value end |
#google_cloud_storage_bucket ⇒ Object
string - Google Cloud Storage bucket name
157 158 159 |
# File 'lib/files.com/models/remote_server.rb', line 157 def google_cloud_storage_bucket @attributes[:google_cloud_storage_bucket] end |
#google_cloud_storage_bucket=(value) ⇒ Object
161 162 163 |
# File 'lib/files.com/models/remote_server.rb', line 161 def google_cloud_storage_bucket=(value) @attributes[:google_cloud_storage_bucket] = value end |
#google_cloud_storage_credentials_json ⇒ Object
string - A JSON file that contains the private key. To generate see cloud.google.com/storage/docs/json_api/v1/how-tos/authorizing#APIKey
382 383 384 |
# File 'lib/files.com/models/remote_server.rb', line 382 def google_cloud_storage_credentials_json @attributes[:google_cloud_storage_credentials_json] end |
#google_cloud_storage_credentials_json=(value) ⇒ Object
386 387 388 |
# File 'lib/files.com/models/remote_server.rb', line 386 def google_cloud_storage_credentials_json=(value) @attributes[:google_cloud_storage_credentials_json] = value end |
#google_cloud_storage_project_id ⇒ Object
string - Google Cloud Project ID
166 167 168 |
# File 'lib/files.com/models/remote_server.rb', line 166 def google_cloud_storage_project_id @attributes[:google_cloud_storage_project_id] end |
#google_cloud_storage_project_id=(value) ⇒ Object
170 171 172 |
# File 'lib/files.com/models/remote_server.rb', line 170 def google_cloud_storage_project_id=(value) @attributes[:google_cloud_storage_project_id] = value end |
#hostname ⇒ Object
string - Hostname or IP address
40 41 42 |
# File 'lib/files.com/models/remote_server.rb', line 40 def hostname @attributes[:hostname] end |
#hostname=(value) ⇒ Object
44 45 46 |
# File 'lib/files.com/models/remote_server.rb', line 44 def hostname=(value) @attributes[:hostname] = value end |
#id ⇒ Object
int64 - Remote server ID
13 14 15 |
# File 'lib/files.com/models/remote_server.rb', line 13 def id @attributes[:id] end |
#id=(value) ⇒ Object
17 18 19 |
# File 'lib/files.com/models/remote_server.rb', line 17 def id=(value) @attributes[:id] = value end |
#max_connections ⇒ Object
int64 - Max number of parallel connections. Ignored for S3 connections (we will parallelize these as much as possible).
76 77 78 |
# File 'lib/files.com/models/remote_server.rb', line 76 def max_connections @attributes[:max_connections] end |
#max_connections=(value) ⇒ Object
80 81 82 |
# File 'lib/files.com/models/remote_server.rb', line 80 def max_connections=(value) @attributes[:max_connections] = value end |
#name ⇒ Object
string - Internal name for your reference
58 59 60 |
# File 'lib/files.com/models/remote_server.rb', line 58 def name @attributes[:name] end |
#name=(value) ⇒ Object
62 63 64 |
# File 'lib/files.com/models/remote_server.rb', line 62 def name=(value) @attributes[:name] = value end |
#one_drive_account_type ⇒ Object
string - Either personal or business_other account types
274 275 276 |
# File 'lib/files.com/models/remote_server.rb', line 274 def one_drive_account_type @attributes[:one_drive_account_type] end |
#one_drive_account_type=(value) ⇒ Object
278 279 280 |
# File 'lib/files.com/models/remote_server.rb', line 278 def one_drive_account_type=(value) @attributes[:one_drive_account_type] = value end |
#password ⇒ Object
string - Password if needed.
355 356 357 |
# File 'lib/files.com/models/remote_server.rb', line 355 def password @attributes[:password] end |
#password=(value) ⇒ Object
359 360 361 |
# File 'lib/files.com/models/remote_server.rb', line 359 def password=(value) @attributes[:password] = value end |
#port ⇒ Object
int64 - Port for remote server. Not needed for S3.
67 68 69 |
# File 'lib/files.com/models/remote_server.rb', line 67 def port @attributes[:port] end |
#port=(value) ⇒ Object
71 72 73 |
# File 'lib/files.com/models/remote_server.rb', line 71 def port=(value) @attributes[:port] = value end |
#private_key ⇒ Object
string - Private key if needed.
364 365 366 |
# File 'lib/files.com/models/remote_server.rb', line 364 def private_key @attributes[:private_key] end |
#private_key=(value) ⇒ Object
368 369 370 |
# File 'lib/files.com/models/remote_server.rb', line 368 def private_key=(value) @attributes[:private_key] = value end |
#rackspace_api_key ⇒ Object
string - Rackspace API key from the Rackspace Cloud Control Panel.
418 419 420 |
# File 'lib/files.com/models/remote_server.rb', line 418 def rackspace_api_key @attributes[:rackspace_api_key] end |
#rackspace_api_key=(value) ⇒ Object
422 423 424 |
# File 'lib/files.com/models/remote_server.rb', line 422 def rackspace_api_key=(value) @attributes[:rackspace_api_key] = value end |
#rackspace_container ⇒ Object
string - The name of the container (top level directory) where files will sync.
238 239 240 |
# File 'lib/files.com/models/remote_server.rb', line 238 def rackspace_container @attributes[:rackspace_container] end |
#rackspace_container=(value) ⇒ Object
242 243 244 |
# File 'lib/files.com/models/remote_server.rb', line 242 def rackspace_container=(value) @attributes[:rackspace_container] = value end |
#rackspace_region ⇒ Object
string - Three letter airport code for Rackspace region. See support.rackspace.com/how-to/about-regions/
229 230 231 |
# File 'lib/files.com/models/remote_server.rb', line 229 def rackspace_region @attributes[:rackspace_region] end |
#rackspace_region=(value) ⇒ Object
233 234 235 |
# File 'lib/files.com/models/remote_server.rb', line 233 def rackspace_region=(value) @attributes[:rackspace_region] = value end |
#rackspace_username ⇒ Object
string - Rackspace username used to login to the Rackspace Cloud Control Panel.
220 221 222 |
# File 'lib/files.com/models/remote_server.rb', line 220 def rackspace_username @attributes[:rackspace_username] end |
#rackspace_username=(value) ⇒ Object
224 225 226 |
# File 'lib/files.com/models/remote_server.rb', line 224 def rackspace_username=(value) @attributes[:rackspace_username] = value end |
#remote_home_path ⇒ Object
string - Initial home folder on remote server
49 50 51 |
# File 'lib/files.com/models/remote_server.rb', line 49 def remote_home_path @attributes[:remote_home_path] end |
#remote_home_path=(value) ⇒ Object
53 54 55 |
# File 'lib/files.com/models/remote_server.rb', line 53 def remote_home_path=(value) @attributes[:remote_home_path] = value end |
#reset_authentication ⇒ Object
boolean - Reset authenticated account
427 428 429 |
# File 'lib/files.com/models/remote_server.rb', line 427 def reset_authentication @attributes[:reset_authentication] end |
#reset_authentication=(value) ⇒ Object
431 432 433 |
# File 'lib/files.com/models/remote_server.rb', line 431 def reset_authentication=(value) @attributes[:reset_authentication] = value end |
#s3_bucket ⇒ Object
string - S3 bucket name
85 86 87 |
# File 'lib/files.com/models/remote_server.rb', line 85 def s3_bucket @attributes[:s3_bucket] end |
#s3_bucket=(value) ⇒ Object
89 90 91 |
# File 'lib/files.com/models/remote_server.rb', line 89 def s3_bucket=(value) @attributes[:s3_bucket] = value end |
#s3_compatible_access_key ⇒ Object
string - S3-compatible Access Key.
328 329 330 |
# File 'lib/files.com/models/remote_server.rb', line 328 def s3_compatible_access_key @attributes[:s3_compatible_access_key] end |
#s3_compatible_access_key=(value) ⇒ Object
332 333 334 |
# File 'lib/files.com/models/remote_server.rb', line 332 def s3_compatible_access_key=(value) @attributes[:s3_compatible_access_key] = value end |
#s3_compatible_bucket ⇒ Object
string - S3-compatible Bucket name
301 302 303 |
# File 'lib/files.com/models/remote_server.rb', line 301 def s3_compatible_bucket @attributes[:s3_compatible_bucket] end |
#s3_compatible_bucket=(value) ⇒ Object
305 306 307 |
# File 'lib/files.com/models/remote_server.rb', line 305 def s3_compatible_bucket=(value) @attributes[:s3_compatible_bucket] = value end |
#s3_compatible_endpoint ⇒ Object
string - S3-compatible endpoint
310 311 312 |
# File 'lib/files.com/models/remote_server.rb', line 310 def s3_compatible_endpoint @attributes[:s3_compatible_endpoint] end |
#s3_compatible_endpoint=(value) ⇒ Object
314 315 316 |
# File 'lib/files.com/models/remote_server.rb', line 314 def s3_compatible_endpoint=(value) @attributes[:s3_compatible_endpoint] = value end |
#s3_compatible_region ⇒ Object
string - S3-compatible endpoint
319 320 321 |
# File 'lib/files.com/models/remote_server.rb', line 319 def s3_compatible_region @attributes[:s3_compatible_region] end |
#s3_compatible_region=(value) ⇒ Object
323 324 325 |
# File 'lib/files.com/models/remote_server.rb', line 323 def s3_compatible_region=(value) @attributes[:s3_compatible_region] = value end |
#s3_compatible_secret_key ⇒ Object
string - S3-compatible secret key
445 446 447 |
# File 'lib/files.com/models/remote_server.rb', line 445 def s3_compatible_secret_key @attributes[:s3_compatible_secret_key] end |
#s3_compatible_secret_key=(value) ⇒ Object
449 450 451 |
# File 'lib/files.com/models/remote_server.rb', line 449 def s3_compatible_secret_key=(value) @attributes[:s3_compatible_secret_key] = value end |
#s3_region ⇒ Object
string - S3 region
94 95 96 |
# File 'lib/files.com/models/remote_server.rb', line 94 def s3_region @attributes[:s3_region] end |
#s3_region=(value) ⇒ Object
98 99 100 |
# File 'lib/files.com/models/remote_server.rb', line 98 def s3_region=(value) @attributes[:s3_region] = value end |
#save ⇒ Object
560 561 562 563 564 565 566 567 |
# File 'lib/files.com/models/remote_server.rb', line 560 def save if @attributes[:id] update(@attributes) else new_obj = RemoteServer.create(@attributes, @options) @attributes = new_obj.attributes end end |
#server_certificate ⇒ Object
string - Remote server certificate
112 113 114 |
# File 'lib/files.com/models/remote_server.rb', line 112 def server_certificate @attributes[:server_certificate] end |
#server_certificate=(value) ⇒ Object
116 117 118 |
# File 'lib/files.com/models/remote_server.rb', line 116 def server_certificate=(value) @attributes[:server_certificate] = value end |
#server_host_key ⇒ Object
string - Remote server SSH Host Key. If provided, we will require that the server host key matches the provided key. Uses OpenSSH format similar to what would go into ~/.ssh/known_hosts
121 122 123 |
# File 'lib/files.com/models/remote_server.rb', line 121 def server_host_key @attributes[:server_host_key] end |
#server_host_key=(value) ⇒ Object
125 126 127 |
# File 'lib/files.com/models/remote_server.rb', line 125 def server_host_key=(value) @attributes[:server_host_key] = value end |
#server_type ⇒ Object
string - Remote server type.
130 131 132 |
# File 'lib/files.com/models/remote_server.rb', line 130 def server_type @attributes[:server_type] end |
#server_type=(value) ⇒ Object
134 135 136 |
# File 'lib/files.com/models/remote_server.rb', line 134 def server_type=(value) @attributes[:server_type] = value end |
#ssl ⇒ Object
string - Should we require SSL?
139 140 141 |
# File 'lib/files.com/models/remote_server.rb', line 139 def ssl @attributes[:ssl] end |
#ssl=(value) ⇒ Object
143 144 145 |
# File 'lib/files.com/models/remote_server.rb', line 143 def ssl=(value) @attributes[:ssl] = value end |
#ssl_certificate ⇒ Object
string - SSL client certificate.
373 374 375 |
# File 'lib/files.com/models/remote_server.rb', line 373 def ssl_certificate @attributes[:ssl_certificate] end |
#ssl_certificate=(value) ⇒ Object
377 378 379 |
# File 'lib/files.com/models/remote_server.rb', line 377 def ssl_certificate=(value) @attributes[:ssl_certificate] = value end |
#update(params = {}) ⇒ Object
Parameters:
aws_access_key - string - AWS Access Key.
aws_secret_key - string - AWS secret key.
password - string - Password if needed.
private_key - string - Private key if needed.
ssl_certificate - string - SSL client certificate.
google_cloud_storage_credentials_json - string - A JSON file that contains the private key. To generate see https://cloud.google.com/storage/docs/json_api/v1/how-tos/authorizing#APIKey
wasabi_access_key - string - Wasabi access key.
wasabi_secret_key - string - Wasabi secret key.
backblaze_b2_key_id - string - Backblaze B2 Cloud Storage keyID.
backblaze_b2_application_key - string - Backblaze B2 Cloud Storage applicationKey.
rackspace_api_key - string - Rackspace API key from the Rackspace Cloud Control Panel.
reset_authentication - boolean - Reset authenticated account
azure_blob_storage_access_key - string - Azure Blob Storage secret key.
hostname - string - Hostname or IP address
name - string - Internal name for your reference
max_connections - int64 - Max number of parallel connections. Ignored for S3 connections (we will parallelize these as much as possible).
port - int64 - Port for remote server. Not needed for S3.
s3_bucket - string - S3 bucket name
s3_region - string - S3 region
server_certificate - string - Remote server certificate
server_host_key - string - Remote server SSH Host Key. If provided, we will require that the server host key matches the provided key. Uses OpenSSH format similar to what would go into ~/.ssh/known_hosts
server_type - string - Remote server type.
ssl - string - Should we require SSL?
username - string - Remote server username. Not needed for S3 buckets.
google_cloud_storage_bucket - string - Google Cloud Storage bucket name
google_cloud_storage_project_id - string - Google Cloud Project ID
backblaze_b2_bucket - string - Backblaze B2 Cloud Storage Bucket name
backblaze_b2_s3_endpoint - string - Backblaze B2 Cloud Storage S3 Endpoint
wasabi_bucket - string - Wasabi Bucket name
wasabi_region - string - Wasabi region
rackspace_username - string - Rackspace username used to login to the Rackspace Cloud Control Panel.
rackspace_region - string - Three letter airport code for Rackspace region. See https://support.rackspace.com/how-to/about-regions/
rackspace_container - string - The name of the container (top level directory) where files will sync.
one_drive_account_type - string - Either personal or business_other account types
azure_blob_storage_account - string - Azure Blob Storage Account name
azure_blob_storage_container - string - Azure Blob Storage Container name
s3_compatible_bucket - string - S3-compatible Bucket name
s3_compatible_endpoint - string - S3-compatible endpoint
s3_compatible_region - string - S3-compatible endpoint
enable_dedicated_ips - boolean - `true` if remote server only accepts connections from dedicated IPs
s3_compatible_access_key - string - S3-compatible Access Key.
s3_compatible_secret_key - string - S3-compatible secret key
496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 |
# File 'lib/files.com/models/remote_server.rb', line 496 def update(params = {}) params ||= {} params[:id] = @attributes[:id] raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id] raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer) raise InvalidParameterError.new("Bad parameter: aws_access_key must be an String") if params.dig(:aws_access_key) and !params.dig(:aws_access_key).is_a?(String) raise InvalidParameterError.new("Bad parameter: aws_secret_key must be an String") if params.dig(:aws_secret_key) and !params.dig(:aws_secret_key).is_a?(String) raise InvalidParameterError.new("Bad parameter: password must be an String") if params.dig(:password) and !params.dig(:password).is_a?(String) raise InvalidParameterError.new("Bad parameter: private_key must be an String") if params.dig(:private_key) and !params.dig(:private_key).is_a?(String) raise InvalidParameterError.new("Bad parameter: ssl_certificate must be an String") if params.dig(:ssl_certificate) and !params.dig(:ssl_certificate).is_a?(String) raise InvalidParameterError.new("Bad parameter: google_cloud_storage_credentials_json must be an String") if params.dig(:google_cloud_storage_credentials_json) and !params.dig(:google_cloud_storage_credentials_json).is_a?(String) raise InvalidParameterError.new("Bad parameter: wasabi_access_key must be an String") if params.dig(:wasabi_access_key) and !params.dig(:wasabi_access_key).is_a?(String) raise InvalidParameterError.new("Bad parameter: wasabi_secret_key must be an String") if params.dig(:wasabi_secret_key) and !params.dig(:wasabi_secret_key).is_a?(String) raise InvalidParameterError.new("Bad parameter: backblaze_b2_key_id must be an String") if params.dig(:backblaze_b2_key_id) and !params.dig(:backblaze_b2_key_id).is_a?(String) raise InvalidParameterError.new("Bad parameter: backblaze_b2_application_key must be an String") if params.dig(:backblaze_b2_application_key) and !params.dig(:backblaze_b2_application_key).is_a?(String) raise InvalidParameterError.new("Bad parameter: rackspace_api_key must be an String") if params.dig(:rackspace_api_key) and !params.dig(:rackspace_api_key).is_a?(String) raise InvalidParameterError.new("Bad parameter: azure_blob_storage_access_key must be an String") if params.dig(:azure_blob_storage_access_key) and !params.dig(:azure_blob_storage_access_key).is_a?(String) raise InvalidParameterError.new("Bad parameter: hostname must be an String") if params.dig(:hostname) and !params.dig(:hostname).is_a?(String) raise InvalidParameterError.new("Bad parameter: name must be an String") if params.dig(:name) and !params.dig(:name).is_a?(String) raise InvalidParameterError.new("Bad parameter: max_connections must be an Integer") if params.dig(:max_connections) and !params.dig(:max_connections).is_a?(Integer) raise InvalidParameterError.new("Bad parameter: port must be an Integer") if params.dig(:port) and !params.dig(:port).is_a?(Integer) raise InvalidParameterError.new("Bad parameter: s3_bucket must be an String") if params.dig(:s3_bucket) and !params.dig(:s3_bucket).is_a?(String) raise InvalidParameterError.new("Bad parameter: s3_region must be an String") if params.dig(:s3_region) and !params.dig(:s3_region).is_a?(String) raise InvalidParameterError.new("Bad parameter: server_certificate must be an String") if params.dig(:server_certificate) and !params.dig(:server_certificate).is_a?(String) raise InvalidParameterError.new("Bad parameter: server_host_key must be an String") if params.dig(:server_host_key) and !params.dig(:server_host_key).is_a?(String) raise InvalidParameterError.new("Bad parameter: server_type must be an String") if params.dig(:server_type) and !params.dig(:server_type).is_a?(String) raise InvalidParameterError.new("Bad parameter: ssl must be an String") if params.dig(:ssl) and !params.dig(:ssl).is_a?(String) raise InvalidParameterError.new("Bad parameter: username must be an String") if params.dig(:username) and !params.dig(:username).is_a?(String) raise InvalidParameterError.new("Bad parameter: google_cloud_storage_bucket must be an String") if params.dig(:google_cloud_storage_bucket) and !params.dig(:google_cloud_storage_bucket).is_a?(String) raise InvalidParameterError.new("Bad parameter: google_cloud_storage_project_id must be an String") if params.dig(:google_cloud_storage_project_id) and !params.dig(:google_cloud_storage_project_id).is_a?(String) raise InvalidParameterError.new("Bad parameter: backblaze_b2_bucket must be an String") if params.dig(:backblaze_b2_bucket) and !params.dig(:backblaze_b2_bucket).is_a?(String) raise InvalidParameterError.new("Bad parameter: backblaze_b2_s3_endpoint must be an String") if params.dig(:backblaze_b2_s3_endpoint) and !params.dig(:backblaze_b2_s3_endpoint).is_a?(String) raise InvalidParameterError.new("Bad parameter: wasabi_bucket must be an String") if params.dig(:wasabi_bucket) and !params.dig(:wasabi_bucket).is_a?(String) raise InvalidParameterError.new("Bad parameter: wasabi_region must be an String") if params.dig(:wasabi_region) and !params.dig(:wasabi_region).is_a?(String) raise InvalidParameterError.new("Bad parameter: rackspace_username must be an String") if params.dig(:rackspace_username) and !params.dig(:rackspace_username).is_a?(String) raise InvalidParameterError.new("Bad parameter: rackspace_region must be an String") if params.dig(:rackspace_region) and !params.dig(:rackspace_region).is_a?(String) raise InvalidParameterError.new("Bad parameter: rackspace_container must be an String") if params.dig(:rackspace_container) and !params.dig(:rackspace_container).is_a?(String) raise InvalidParameterError.new("Bad parameter: one_drive_account_type must be an String") if params.dig(:one_drive_account_type) and !params.dig(:one_drive_account_type).is_a?(String) raise InvalidParameterError.new("Bad parameter: azure_blob_storage_account must be an String") if params.dig(:azure_blob_storage_account) and !params.dig(:azure_blob_storage_account).is_a?(String) raise InvalidParameterError.new("Bad parameter: azure_blob_storage_container must be an String") if params.dig(:azure_blob_storage_container) and !params.dig(:azure_blob_storage_container).is_a?(String) raise InvalidParameterError.new("Bad parameter: s3_compatible_bucket must be an String") if params.dig(:s3_compatible_bucket) and !params.dig(:s3_compatible_bucket).is_a?(String) raise InvalidParameterError.new("Bad parameter: s3_compatible_endpoint must be an String") if params.dig(:s3_compatible_endpoint) and !params.dig(:s3_compatible_endpoint).is_a?(String) raise InvalidParameterError.new("Bad parameter: s3_compatible_region must be an String") if params.dig(:s3_compatible_region) and !params.dig(:s3_compatible_region).is_a?(String) raise InvalidParameterError.new("Bad parameter: s3_compatible_access_key must be an String") if params.dig(:s3_compatible_access_key) and !params.dig(:s3_compatible_access_key).is_a?(String) raise InvalidParameterError.new("Bad parameter: s3_compatible_secret_key must be an String") if params.dig(:s3_compatible_secret_key) and !params.dig(:s3_compatible_secret_key).is_a?(String) raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id) Api.send_request("/remote_servers/#{@attributes[:id]}", :patch, params, @options) end |
#username ⇒ Object
string - Remote server username. Not needed for S3 buckets.
148 149 150 |
# File 'lib/files.com/models/remote_server.rb', line 148 def username @attributes[:username] end |
#username=(value) ⇒ Object
152 153 154 |
# File 'lib/files.com/models/remote_server.rb', line 152 def username=(value) @attributes[:username] = value end |
#wasabi_access_key ⇒ Object
string - Wasabi access key.
211 212 213 |
# File 'lib/files.com/models/remote_server.rb', line 211 def wasabi_access_key @attributes[:wasabi_access_key] end |
#wasabi_access_key=(value) ⇒ Object
215 216 217 |
# File 'lib/files.com/models/remote_server.rb', line 215 def wasabi_access_key=(value) @attributes[:wasabi_access_key] = value end |
#wasabi_bucket ⇒ Object
string - Wasabi Bucket name
193 194 195 |
# File 'lib/files.com/models/remote_server.rb', line 193 def wasabi_bucket @attributes[:wasabi_bucket] end |
#wasabi_bucket=(value) ⇒ Object
197 198 199 |
# File 'lib/files.com/models/remote_server.rb', line 197 def wasabi_bucket=(value) @attributes[:wasabi_bucket] = value end |
#wasabi_region ⇒ Object
string - Wasabi region
202 203 204 |
# File 'lib/files.com/models/remote_server.rb', line 202 def wasabi_region @attributes[:wasabi_region] end |
#wasabi_region=(value) ⇒ Object
206 207 208 |
# File 'lib/files.com/models/remote_server.rb', line 206 def wasabi_region=(value) @attributes[:wasabi_region] = value end |
#wasabi_secret_key ⇒ Object
string - Wasabi secret key.
391 392 393 |
# File 'lib/files.com/models/remote_server.rb', line 391 def wasabi_secret_key @attributes[:wasabi_secret_key] end |
#wasabi_secret_key=(value) ⇒ Object
395 396 397 |
# File 'lib/files.com/models/remote_server.rb', line 395 def wasabi_secret_key=(value) @attributes[:wasabi_secret_key] = value end |