Class: Files::RemoteServerCredential
- Inherits:
-
Object
- Object
- Files::RemoteServerCredential
- Defined in:
- lib/files.com/models/remote_server_credential.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: name - string - Internal name for your reference description - string - Internal description for your reference server_type - string - Remote server type.
- .delete(id, params = {}, options = {}) ⇒ Object
- .destroy(id, params = {}, options = {}) ⇒ Object
-
.find(id, params = {}, options = {}) ⇒ Object
Parameters: id (required) - int64 - Remote Server Credential ID.
- .get(id, params = {}, options = {}) ⇒ Object
-
.list(params = {}, options = {}) ⇒ Object
Parameters: cursor - string - Used for pagination.
-
.update(id, params = {}, options = {}) ⇒ Object
Parameters: name - string - Internal name for your reference description - string - Internal description for your reference server_type - string - Remote server type.
Instance Method Summary collapse
-
#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: Access 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_sas_token ⇒ Object
string - Azure Blob Storage: Shared Access Signature (SAS) token.
- #azure_blob_storage_sas_token=(value) ⇒ Object
-
#azure_files_storage_access_key ⇒ Object
string - Azure File Storage: Access Key.
- #azure_files_storage_access_key=(value) ⇒ Object
-
#azure_files_storage_account ⇒ Object
string - Azure Files: Storage Account name.
- #azure_files_storage_account=(value) ⇒ Object
-
#azure_files_storage_sas_token ⇒ Object
string - Azure File Storage: Shared Access Signature (SAS) token.
- #azure_files_storage_sas_token=(value) ⇒ Object
-
#backblaze_b2_application_key ⇒ Object
string - Backblaze B2 Cloud Storage: applicationKey.
- #backblaze_b2_application_key=(value) ⇒ Object
-
#backblaze_b2_key_id ⇒ Object
string - Backblaze B2 Cloud Storage: keyID.
- #backblaze_b2_key_id=(value) ⇒ Object
-
#cloudflare_access_key ⇒ Object
string - Cloudflare: Access Key.
- #cloudflare_access_key=(value) ⇒ Object
-
#cloudflare_secret_key ⇒ Object
string - Cloudflare: Secret Key.
- #cloudflare_secret_key=(value) ⇒ Object
- #delete(params = {}) ⇒ Object
-
#description ⇒ Object
string - Internal description for your reference.
- #description=(value) ⇒ Object
- #destroy(params = {}) ⇒ Object
-
#filebase_access_key ⇒ Object
string - Filebase: Access Key.
- #filebase_access_key=(value) ⇒ Object
-
#filebase_secret_key ⇒ Object
string - Filebase: Secret Key.
- #filebase_secret_key=(value) ⇒ Object
-
#google_cloud_storage_credentials_json ⇒ Object
string - Google Cloud Storage: JSON file that contains the private key.
- #google_cloud_storage_credentials_json=(value) ⇒ Object
-
#google_cloud_storage_s3_compatible_access_key ⇒ Object
string - Google Cloud Storage: S3-compatible Access Key.
- #google_cloud_storage_s3_compatible_access_key=(value) ⇒ Object
-
#google_cloud_storage_s3_compatible_secret_key ⇒ Object
string - Google Cloud Storage: S3-compatible secret key.
- #google_cloud_storage_s3_compatible_secret_key=(value) ⇒ Object
-
#id ⇒ Object
int64 - Remote Server Credential ID.
- #id=(value) ⇒ Object
-
#initialize(attributes = {}, options = {}) ⇒ RemoteServerCredential
constructor
A new instance of RemoteServerCredential.
-
#linode_access_key ⇒ Object
string - Linode: Access Key.
- #linode_access_key=(value) ⇒ Object
-
#linode_secret_key ⇒ Object
string - Linode: Secret Key.
- #linode_secret_key=(value) ⇒ Object
-
#name ⇒ Object
string - Internal name for your reference.
- #name=(value) ⇒ Object
-
#password ⇒ Object
string - Password, if needed.
- #password=(value) ⇒ Object
-
#private_key ⇒ Object
string - Private key, if needed.
- #private_key=(value) ⇒ Object
-
#private_key_passphrase ⇒ Object
string - Passphrase for private key if needed.
- #private_key_passphrase=(value) ⇒ Object
-
#s3_compatible_access_key ⇒ Object
string - S3-compatible: Access Key.
- #s3_compatible_access_key=(value) ⇒ Object
-
#s3_compatible_secret_key ⇒ Object
string - S3-compatible: Secret Key.
- #s3_compatible_secret_key=(value) ⇒ Object
- #save ⇒ Object
-
#server_type ⇒ Object
string - Remote server type.
- #server_type=(value) ⇒ Object
-
#update(params = {}) ⇒ Object
Parameters: name - string - Internal name for your reference description - string - Internal description for your reference server_type - string - Remote server type.
-
#username ⇒ Object
string - Remote server username.
- #username=(value) ⇒ Object
-
#wasabi_access_key ⇒ Object
string - Wasabi: Access Key.
- #wasabi_access_key=(value) ⇒ Object
-
#wasabi_secret_key ⇒ Object
string - Wasabi: Secret Key.
- #wasabi_secret_key=(value) ⇒ Object
-
#workspace_id ⇒ Object
int64 - Workspace ID (0 for default workspace).
- #workspace_id=(value) ⇒ Object
Constructor Details
#initialize(attributes = {}, options = {}) ⇒ RemoteServerCredential
Returns a new instance of RemoteServerCredential.
7 8 9 10 |
# File 'lib/files.com/models/remote_server_credential.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_credential.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_credential.rb', line 5 def @options end |
Class Method Details
.all(params = {}, options = {}) ⇒ Object
415 416 417 |
# File 'lib/files.com/models/remote_server_credential.rb', line 415 def self.all(params = {}, = {}) list(params, ) end |
.create(params = {}, options = {}) ⇒ Object
Parameters:
name - string - Internal name for your reference
description - string - Internal description for your reference
server_type - string - Remote server type. Remote Server Credentials are only valid for a single type of Remote Server.
aws_access_key - string - AWS Access Key.
azure_blob_storage_account - string - Azure Blob Storage: Account name
azure_files_storage_account - string - Azure Files: Storage Account name
cloudflare_access_key - string - Cloudflare: Access Key.
filebase_access_key - string - Filebase: Access Key.
google_cloud_storage_s3_compatible_access_key - string - Google Cloud Storage: S3-compatible Access Key.
linode_access_key - string - Linode: Access Key
s3_compatible_access_key - string - S3-compatible: Access Key
username - string - Remote server username.
wasabi_access_key - string - Wasabi: Access Key.
password - string - Password, if needed.
private_key - string - Private key, if needed.
private_key_passphrase - string - Passphrase for private key if needed.
aws_secret_key - string - AWS: secret key.
azure_blob_storage_access_key - string - Azure Blob Storage: Access Key
azure_blob_storage_sas_token - string - Azure Blob Storage: Shared Access Signature (SAS) token
azure_files_storage_access_key - string - Azure File Storage: Access Key
azure_files_storage_sas_token - string - Azure File Storage: Shared Access Signature (SAS) token
backblaze_b2_application_key - string - Backblaze B2 Cloud Storage: applicationKey
backblaze_b2_key_id - string - Backblaze B2 Cloud Storage: keyID
cloudflare_secret_key - string - Cloudflare: Secret Key
filebase_secret_key - string - Filebase: Secret Key
google_cloud_storage_credentials_json - string - Google Cloud Storage: JSON file that contains the private key. To generate see https://cloud.google.com/storage/docs/json_api/v1/how-tos/authorizing#APIKey
google_cloud_storage_s3_compatible_secret_key - string - Google Cloud Storage: S3-compatible secret key
linode_secret_key - string - Linode: Secret Key
s3_compatible_secret_key - string - S3-compatible: Secret Key
wasabi_secret_key - string - Wasabi: Secret Key
workspace_id - int64 - Workspace ID (0 for default workspace)
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 493 494 495 496 497 498 499 500 501 502 |
# File 'lib/files.com/models/remote_server_credential.rb', line 467 def self.create(params = {}, = {}) raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String) raise InvalidParameterError.new("Bad parameter: description must be an String") if params[:description] and !params[:description].is_a?(String) raise InvalidParameterError.new("Bad parameter: server_type must be an String") if params[:server_type] and !params[:server_type].is_a?(String) raise InvalidParameterError.new("Bad parameter: aws_access_key must be an String") if params[:aws_access_key] and !params[:aws_access_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: azure_blob_storage_account must be an String") if params[:azure_blob_storage_account] and !params[:azure_blob_storage_account].is_a?(String) raise InvalidParameterError.new("Bad parameter: azure_files_storage_account must be an String") if params[:azure_files_storage_account] and !params[:azure_files_storage_account].is_a?(String) raise InvalidParameterError.new("Bad parameter: cloudflare_access_key must be an String") if params[:cloudflare_access_key] and !params[:cloudflare_access_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: filebase_access_key must be an String") if params[:filebase_access_key] and !params[:filebase_access_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: google_cloud_storage_s3_compatible_access_key must be an String") if params[:google_cloud_storage_s3_compatible_access_key] and !params[:google_cloud_storage_s3_compatible_access_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: linode_access_key must be an String") if params[:linode_access_key] and !params[:linode_access_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: s3_compatible_access_key must be an String") if params[:s3_compatible_access_key] and !params[:s3_compatible_access_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: username must be an String") if params[:username] and !params[:username].is_a?(String) raise InvalidParameterError.new("Bad parameter: wasabi_access_key must be an String") if params[:wasabi_access_key] and !params[:wasabi_access_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: password must be an String") if params[:password] and !params[:password].is_a?(String) raise InvalidParameterError.new("Bad parameter: private_key must be an String") if params[:private_key] and !params[:private_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: private_key_passphrase must be an String") if params[:private_key_passphrase] and !params[:private_key_passphrase].is_a?(String) raise InvalidParameterError.new("Bad parameter: aws_secret_key must be an String") if params[:aws_secret_key] and !params[:aws_secret_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: azure_blob_storage_access_key must be an String") if params[:azure_blob_storage_access_key] and !params[:azure_blob_storage_access_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: azure_blob_storage_sas_token must be an String") if params[:azure_blob_storage_sas_token] and !params[:azure_blob_storage_sas_token].is_a?(String) raise InvalidParameterError.new("Bad parameter: azure_files_storage_access_key must be an String") if params[:azure_files_storage_access_key] and !params[:azure_files_storage_access_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: azure_files_storage_sas_token must be an String") if params[:azure_files_storage_sas_token] and !params[:azure_files_storage_sas_token].is_a?(String) raise InvalidParameterError.new("Bad parameter: backblaze_b2_application_key must be an String") if params[:backblaze_b2_application_key] and !params[:backblaze_b2_application_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: backblaze_b2_key_id must be an String") if params[:backblaze_b2_key_id] and !params[:backblaze_b2_key_id].is_a?(String) raise InvalidParameterError.new("Bad parameter: cloudflare_secret_key must be an String") if params[:cloudflare_secret_key] and !params[:cloudflare_secret_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: filebase_secret_key must be an String") if params[:filebase_secret_key] and !params[:filebase_secret_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: google_cloud_storage_credentials_json must be an String") if params[:google_cloud_storage_credentials_json] and !params[:google_cloud_storage_credentials_json].is_a?(String) raise InvalidParameterError.new("Bad parameter: google_cloud_storage_s3_compatible_secret_key must be an String") if params[:google_cloud_storage_s3_compatible_secret_key] and !params[:google_cloud_storage_s3_compatible_secret_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: linode_secret_key must be an String") if params[:linode_secret_key] and !params[:linode_secret_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: s3_compatible_secret_key must be an String") if params[:s3_compatible_secret_key] and !params[:s3_compatible_secret_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: wasabi_secret_key must be an String") if params[:wasabi_secret_key] and !params[:wasabi_secret_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if params[:workspace_id] and !params[:workspace_id].is_a?(Integer) response, = Api.send_request("/remote_server_credentials", :post, params, ) RemoteServerCredential.new(response.data, ) end |
.delete(id, params = {}, options = {}) ⇒ Object
575 576 577 578 579 580 581 582 583 |
# File 'lib/files.com/models/remote_server_credential.rb', line 575 def self.delete(id, params = {}, = {}) params ||= {} params[:id] = id raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer) raise MissingParameterError.new("Parameter missing: id") unless params[:id] Api.send_request("/remote_server_credentials/#{params[:id]}", :delete, params, ) nil end |
.destroy(id, params = {}, options = {}) ⇒ Object
585 586 587 588 |
# File 'lib/files.com/models/remote_server_credential.rb', line 585 def self.destroy(id, params = {}, = {}) delete(id, params, ) nil end |
.find(id, params = {}, options = {}) ⇒ Object
Parameters:
id (required) - int64 - Remote Server Credential ID.
421 422 423 424 425 426 427 428 429 |
# File 'lib/files.com/models/remote_server_credential.rb', line 421 def self.find(id, params = {}, = {}) params ||= {} params[:id] = id raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer) raise MissingParameterError.new("Parameter missing: id") unless params[:id] response, = Api.send_request("/remote_server_credentials/#{params[:id]}", :get, params, ) RemoteServerCredential.new(response.data, ) end |
.get(id, params = {}, options = {}) ⇒ Object
431 432 433 |
# File 'lib/files.com/models/remote_server_credential.rb', line 431 def self.get(id, params = {}, = {}) find(id, params, ) end |
.list(params = {}, options = {}) ⇒ Object
Parameters:
cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id` and `id`.
filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `workspace_id` and `name`. Valid field combinations are `[ workspace_id, name ]`.
filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `name`.
403 404 405 406 407 408 409 410 411 412 413 |
# File 'lib/files.com/models/remote_server_credential.rb', line 403 def self.list(params = {}, = {}) raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String) raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer) raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash) raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params[:filter] and !params[:filter].is_a?(Hash) raise InvalidParameterError.new("Bad parameter: filter_prefix must be an Hash") if params[:filter_prefix] and !params[:filter_prefix].is_a?(Hash) List.new(RemoteServerCredential, params) do Api.send_request("/remote_server_credentials", :get, params, ) end end |
.update(id, params = {}, options = {}) ⇒ Object
Parameters:
name - string - Internal name for your reference
description - string - Internal description for your reference
server_type - string - Remote server type. Remote Server Credentials are only valid for a single type of Remote Server.
aws_access_key - string - AWS Access Key.
azure_blob_storage_account - string - Azure Blob Storage: Account name
azure_files_storage_account - string - Azure Files: Storage Account name
cloudflare_access_key - string - Cloudflare: Access Key.
filebase_access_key - string - Filebase: Access Key.
google_cloud_storage_s3_compatible_access_key - string - Google Cloud Storage: S3-compatible Access Key.
linode_access_key - string - Linode: Access Key
s3_compatible_access_key - string - S3-compatible: Access Key
username - string - Remote server username.
wasabi_access_key - string - Wasabi: Access Key.
password - string - Password, if needed.
private_key - string - Private key, if needed.
private_key_passphrase - string - Passphrase for private key if needed.
aws_secret_key - string - AWS: secret key.
azure_blob_storage_access_key - string - Azure Blob Storage: Access Key
azure_blob_storage_sas_token - string - Azure Blob Storage: Shared Access Signature (SAS) token
azure_files_storage_access_key - string - Azure File Storage: Access Key
azure_files_storage_sas_token - string - Azure File Storage: Shared Access Signature (SAS) token
backblaze_b2_application_key - string - Backblaze B2 Cloud Storage: applicationKey
backblaze_b2_key_id - string - Backblaze B2 Cloud Storage: keyID
cloudflare_secret_key - string - Cloudflare: Secret Key
filebase_secret_key - string - Filebase: Secret Key
google_cloud_storage_credentials_json - string - Google Cloud Storage: JSON file that contains the private key. To generate see https://cloud.google.com/storage/docs/json_api/v1/how-tos/authorizing#APIKey
google_cloud_storage_s3_compatible_secret_key - string - Google Cloud Storage: S3-compatible secret key
linode_secret_key - string - Linode: Secret Key
s3_compatible_secret_key - string - S3-compatible: Secret Key
wasabi_secret_key - string - Wasabi: Secret Key
535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 |
# File 'lib/files.com/models/remote_server_credential.rb', line 535 def self.update(id, params = {}, = {}) params ||= {} params[:id] = id raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer) raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String) raise InvalidParameterError.new("Bad parameter: description must be an String") if params[:description] and !params[:description].is_a?(String) raise InvalidParameterError.new("Bad parameter: server_type must be an String") if params[:server_type] and !params[:server_type].is_a?(String) raise InvalidParameterError.new("Bad parameter: aws_access_key must be an String") if params[:aws_access_key] and !params[:aws_access_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: azure_blob_storage_account must be an String") if params[:azure_blob_storage_account] and !params[:azure_blob_storage_account].is_a?(String) raise InvalidParameterError.new("Bad parameter: azure_files_storage_account must be an String") if params[:azure_files_storage_account] and !params[:azure_files_storage_account].is_a?(String) raise InvalidParameterError.new("Bad parameter: cloudflare_access_key must be an String") if params[:cloudflare_access_key] and !params[:cloudflare_access_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: filebase_access_key must be an String") if params[:filebase_access_key] and !params[:filebase_access_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: google_cloud_storage_s3_compatible_access_key must be an String") if params[:google_cloud_storage_s3_compatible_access_key] and !params[:google_cloud_storage_s3_compatible_access_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: linode_access_key must be an String") if params[:linode_access_key] and !params[:linode_access_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: s3_compatible_access_key must be an String") if params[:s3_compatible_access_key] and !params[:s3_compatible_access_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: username must be an String") if params[:username] and !params[:username].is_a?(String) raise InvalidParameterError.new("Bad parameter: wasabi_access_key must be an String") if params[:wasabi_access_key] and !params[:wasabi_access_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: password must be an String") if params[:password] and !params[:password].is_a?(String) raise InvalidParameterError.new("Bad parameter: private_key must be an String") if params[:private_key] and !params[:private_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: private_key_passphrase must be an String") if params[:private_key_passphrase] and !params[:private_key_passphrase].is_a?(String) raise InvalidParameterError.new("Bad parameter: aws_secret_key must be an String") if params[:aws_secret_key] and !params[:aws_secret_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: azure_blob_storage_access_key must be an String") if params[:azure_blob_storage_access_key] and !params[:azure_blob_storage_access_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: azure_blob_storage_sas_token must be an String") if params[:azure_blob_storage_sas_token] and !params[:azure_blob_storage_sas_token].is_a?(String) raise InvalidParameterError.new("Bad parameter: azure_files_storage_access_key must be an String") if params[:azure_files_storage_access_key] and !params[:azure_files_storage_access_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: azure_files_storage_sas_token must be an String") if params[:azure_files_storage_sas_token] and !params[:azure_files_storage_sas_token].is_a?(String) raise InvalidParameterError.new("Bad parameter: backblaze_b2_application_key must be an String") if params[:backblaze_b2_application_key] and !params[:backblaze_b2_application_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: backblaze_b2_key_id must be an String") if params[:backblaze_b2_key_id] and !params[:backblaze_b2_key_id].is_a?(String) raise InvalidParameterError.new("Bad parameter: cloudflare_secret_key must be an String") if params[:cloudflare_secret_key] and !params[:cloudflare_secret_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: filebase_secret_key must be an String") if params[:filebase_secret_key] and !params[:filebase_secret_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: google_cloud_storage_credentials_json must be an String") if params[:google_cloud_storage_credentials_json] and !params[:google_cloud_storage_credentials_json].is_a?(String) raise InvalidParameterError.new("Bad parameter: google_cloud_storage_s3_compatible_secret_key must be an String") if params[:google_cloud_storage_s3_compatible_secret_key] and !params[:google_cloud_storage_s3_compatible_secret_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: linode_secret_key must be an String") if params[:linode_secret_key] and !params[:linode_secret_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: s3_compatible_secret_key must be an String") if params[:s3_compatible_secret_key] and !params[:s3_compatible_secret_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: wasabi_secret_key must be an String") if params[:wasabi_secret_key] and !params[:wasabi_secret_key].is_a?(String) raise MissingParameterError.new("Parameter missing: id") unless params[:id] response, = Api.send_request("/remote_server_credentials/#{params[:id]}", :patch, params, ) RemoteServerCredential.new(response.data, ) end |
Instance Method Details
#aws_access_key ⇒ Object
string - AWS Access Key.
58 59 60 |
# File 'lib/files.com/models/remote_server_credential.rb', line 58 def aws_access_key @attributes[:aws_access_key] end |
#aws_access_key=(value) ⇒ Object
62 63 64 |
# File 'lib/files.com/models/remote_server_credential.rb', line 62 def aws_access_key=(value) @attributes[:aws_access_key] = value end |
#aws_secret_key ⇒ Object
string - AWS: secret key.
175 176 177 |
# File 'lib/files.com/models/remote_server_credential.rb', line 175 def aws_secret_key @attributes[:aws_secret_key] end |
#aws_secret_key=(value) ⇒ Object
179 180 181 |
# File 'lib/files.com/models/remote_server_credential.rb', line 179 def aws_secret_key=(value) @attributes[:aws_secret_key] = value end |
#azure_blob_storage_access_key ⇒ Object
string - Azure Blob Storage: Access Key
184 185 186 |
# File 'lib/files.com/models/remote_server_credential.rb', line 184 def azure_blob_storage_access_key @attributes[:azure_blob_storage_access_key] end |
#azure_blob_storage_access_key=(value) ⇒ Object
188 189 190 |
# File 'lib/files.com/models/remote_server_credential.rb', line 188 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
85 86 87 |
# File 'lib/files.com/models/remote_server_credential.rb', line 85 def azure_blob_storage_account @attributes[:azure_blob_storage_account] end |
#azure_blob_storage_account=(value) ⇒ Object
89 90 91 |
# File 'lib/files.com/models/remote_server_credential.rb', line 89 def azure_blob_storage_account=(value) @attributes[:azure_blob_storage_account] = value end |
#azure_blob_storage_sas_token ⇒ Object
string - Azure Blob Storage: Shared Access Signature (SAS) token
193 194 195 |
# File 'lib/files.com/models/remote_server_credential.rb', line 193 def azure_blob_storage_sas_token @attributes[:azure_blob_storage_sas_token] end |
#azure_blob_storage_sas_token=(value) ⇒ Object
197 198 199 |
# File 'lib/files.com/models/remote_server_credential.rb', line 197 def azure_blob_storage_sas_token=(value) @attributes[:azure_blob_storage_sas_token] = value end |
#azure_files_storage_access_key ⇒ Object
string - Azure File Storage: Access Key
202 203 204 |
# File 'lib/files.com/models/remote_server_credential.rb', line 202 def azure_files_storage_access_key @attributes[:azure_files_storage_access_key] end |
#azure_files_storage_access_key=(value) ⇒ Object
206 207 208 |
# File 'lib/files.com/models/remote_server_credential.rb', line 206 def azure_files_storage_access_key=(value) @attributes[:azure_files_storage_access_key] = value end |
#azure_files_storage_account ⇒ Object
string - Azure Files: Storage Account name
94 95 96 |
# File 'lib/files.com/models/remote_server_credential.rb', line 94 def azure_files_storage_account @attributes[:azure_files_storage_account] end |
#azure_files_storage_account=(value) ⇒ Object
98 99 100 |
# File 'lib/files.com/models/remote_server_credential.rb', line 98 def azure_files_storage_account=(value) @attributes[:azure_files_storage_account] = value end |
#azure_files_storage_sas_token ⇒ Object
string - Azure File Storage: Shared Access Signature (SAS) token
211 212 213 |
# File 'lib/files.com/models/remote_server_credential.rb', line 211 def azure_files_storage_sas_token @attributes[:azure_files_storage_sas_token] end |
#azure_files_storage_sas_token=(value) ⇒ Object
215 216 217 |
# File 'lib/files.com/models/remote_server_credential.rb', line 215 def azure_files_storage_sas_token=(value) @attributes[:azure_files_storage_sas_token] = value end |
#backblaze_b2_application_key ⇒ Object
string - Backblaze B2 Cloud Storage: applicationKey
220 221 222 |
# File 'lib/files.com/models/remote_server_credential.rb', line 220 def backblaze_b2_application_key @attributes[:backblaze_b2_application_key] end |
#backblaze_b2_application_key=(value) ⇒ Object
224 225 226 |
# File 'lib/files.com/models/remote_server_credential.rb', line 224 def backblaze_b2_application_key=(value) @attributes[:backblaze_b2_application_key] = value end |
#backblaze_b2_key_id ⇒ Object
string - Backblaze B2 Cloud Storage: keyID
229 230 231 |
# File 'lib/files.com/models/remote_server_credential.rb', line 229 def backblaze_b2_key_id @attributes[:backblaze_b2_key_id] end |
#backblaze_b2_key_id=(value) ⇒ Object
233 234 235 |
# File 'lib/files.com/models/remote_server_credential.rb', line 233 def backblaze_b2_key_id=(value) @attributes[:backblaze_b2_key_id] = value end |
#cloudflare_access_key ⇒ Object
string - Cloudflare: Access Key.
121 122 123 |
# File 'lib/files.com/models/remote_server_credential.rb', line 121 def cloudflare_access_key @attributes[:cloudflare_access_key] end |
#cloudflare_access_key=(value) ⇒ Object
125 126 127 |
# File 'lib/files.com/models/remote_server_credential.rb', line 125 def cloudflare_access_key=(value) @attributes[:cloudflare_access_key] = value end |
#cloudflare_secret_key ⇒ Object
string - Cloudflare: Secret Key
238 239 240 |
# File 'lib/files.com/models/remote_server_credential.rb', line 238 def cloudflare_secret_key @attributes[:cloudflare_secret_key] end |
#cloudflare_secret_key=(value) ⇒ Object
242 243 244 |
# File 'lib/files.com/models/remote_server_credential.rb', line 242 def cloudflare_secret_key=(value) @attributes[:cloudflare_secret_key] = value end |
#delete(params = {}) ⇒ Object
371 372 373 374 375 376 377 378 379 |
# File 'lib/files.com/models/remote_server_credential.rb', line 371 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[:id] and !params[:id].is_a?(Integer) raise MissingParameterError.new("Parameter missing: id") unless params[:id] Api.send_request("/remote_server_credentials/#{@attributes[:id]}", :delete, params, @options) end |
#description ⇒ Object
string - Internal description for your reference
40 41 42 |
# File 'lib/files.com/models/remote_server_credential.rb', line 40 def description @attributes[:description] end |
#description=(value) ⇒ Object
44 45 46 |
# File 'lib/files.com/models/remote_server_credential.rb', line 44 def description=(value) @attributes[:description] = value end |
#destroy(params = {}) ⇒ Object
381 382 383 384 |
# File 'lib/files.com/models/remote_server_credential.rb', line 381 def destroy(params = {}) delete(params) nil end |
#filebase_access_key ⇒ Object
string - Filebase: Access Key.
112 113 114 |
# File 'lib/files.com/models/remote_server_credential.rb', line 112 def filebase_access_key @attributes[:filebase_access_key] end |
#filebase_access_key=(value) ⇒ Object
116 117 118 |
# File 'lib/files.com/models/remote_server_credential.rb', line 116 def filebase_access_key=(value) @attributes[:filebase_access_key] = value end |
#filebase_secret_key ⇒ Object
string - Filebase: Secret Key
247 248 249 |
# File 'lib/files.com/models/remote_server_credential.rb', line 247 def filebase_secret_key @attributes[:filebase_secret_key] end |
#filebase_secret_key=(value) ⇒ Object
251 252 253 |
# File 'lib/files.com/models/remote_server_credential.rb', line 251 def filebase_secret_key=(value) @attributes[:filebase_secret_key] = value end |
#google_cloud_storage_credentials_json ⇒ Object
string - Google Cloud Storage: JSON file that contains the private key. To generate see cloud.google.com/storage/docs/json_api/v1/how-tos/authorizing#APIKey
256 257 258 |
# File 'lib/files.com/models/remote_server_credential.rb', line 256 def google_cloud_storage_credentials_json @attributes[:google_cloud_storage_credentials_json] end |
#google_cloud_storage_credentials_json=(value) ⇒ Object
260 261 262 |
# File 'lib/files.com/models/remote_server_credential.rb', line 260 def google_cloud_storage_credentials_json=(value) @attributes[:google_cloud_storage_credentials_json] = value end |
#google_cloud_storage_s3_compatible_access_key ⇒ Object
string - Google Cloud Storage: S3-compatible Access Key.
67 68 69 |
# File 'lib/files.com/models/remote_server_credential.rb', line 67 def google_cloud_storage_s3_compatible_access_key @attributes[:google_cloud_storage_s3_compatible_access_key] end |
#google_cloud_storage_s3_compatible_access_key=(value) ⇒ Object
71 72 73 |
# File 'lib/files.com/models/remote_server_credential.rb', line 71 def google_cloud_storage_s3_compatible_access_key=(value) @attributes[:google_cloud_storage_s3_compatible_access_key] = value end |
#google_cloud_storage_s3_compatible_secret_key ⇒ Object
string - Google Cloud Storage: S3-compatible secret key
265 266 267 |
# File 'lib/files.com/models/remote_server_credential.rb', line 265 def google_cloud_storage_s3_compatible_secret_key @attributes[:google_cloud_storage_s3_compatible_secret_key] end |
#google_cloud_storage_s3_compatible_secret_key=(value) ⇒ Object
269 270 271 |
# File 'lib/files.com/models/remote_server_credential.rb', line 269 def google_cloud_storage_s3_compatible_secret_key=(value) @attributes[:google_cloud_storage_s3_compatible_secret_key] = value end |
#id ⇒ Object
int64 - Remote Server Credential ID
13 14 15 |
# File 'lib/files.com/models/remote_server_credential.rb', line 13 def id @attributes[:id] end |
#id=(value) ⇒ Object
17 18 19 |
# File 'lib/files.com/models/remote_server_credential.rb', line 17 def id=(value) @attributes[:id] = value end |
#linode_access_key ⇒ Object
string - Linode: Access Key
130 131 132 |
# File 'lib/files.com/models/remote_server_credential.rb', line 130 def linode_access_key @attributes[:linode_access_key] end |
#linode_access_key=(value) ⇒ Object
134 135 136 |
# File 'lib/files.com/models/remote_server_credential.rb', line 134 def linode_access_key=(value) @attributes[:linode_access_key] = value end |
#linode_secret_key ⇒ Object
string - Linode: Secret Key
274 275 276 |
# File 'lib/files.com/models/remote_server_credential.rb', line 274 def linode_secret_key @attributes[:linode_secret_key] end |
#linode_secret_key=(value) ⇒ Object
278 279 280 |
# File 'lib/files.com/models/remote_server_credential.rb', line 278 def linode_secret_key=(value) @attributes[:linode_secret_key] = value end |
#name ⇒ Object
string - Internal name for your reference
31 32 33 |
# File 'lib/files.com/models/remote_server_credential.rb', line 31 def name @attributes[:name] end |
#name=(value) ⇒ Object
35 36 37 |
# File 'lib/files.com/models/remote_server_credential.rb', line 35 def name=(value) @attributes[:name] = value end |
#password ⇒ Object
string - Password, if needed.
148 149 150 |
# File 'lib/files.com/models/remote_server_credential.rb', line 148 def password @attributes[:password] end |
#password=(value) ⇒ Object
152 153 154 |
# File 'lib/files.com/models/remote_server_credential.rb', line 152 def password=(value) @attributes[:password] = value end |
#private_key ⇒ Object
string - Private key, if needed.
157 158 159 |
# File 'lib/files.com/models/remote_server_credential.rb', line 157 def private_key @attributes[:private_key] end |
#private_key=(value) ⇒ Object
161 162 163 |
# File 'lib/files.com/models/remote_server_credential.rb', line 161 def private_key=(value) @attributes[:private_key] = value end |
#private_key_passphrase ⇒ Object
string - Passphrase for private key if needed.
166 167 168 |
# File 'lib/files.com/models/remote_server_credential.rb', line 166 def private_key_passphrase @attributes[:private_key_passphrase] end |
#private_key_passphrase=(value) ⇒ Object
170 171 172 |
# File 'lib/files.com/models/remote_server_credential.rb', line 170 def private_key_passphrase=(value) @attributes[:private_key_passphrase] = value end |
#s3_compatible_access_key ⇒ Object
string - S3-compatible: Access Key
103 104 105 |
# File 'lib/files.com/models/remote_server_credential.rb', line 103 def s3_compatible_access_key @attributes[:s3_compatible_access_key] end |
#s3_compatible_access_key=(value) ⇒ Object
107 108 109 |
# File 'lib/files.com/models/remote_server_credential.rb', line 107 def s3_compatible_access_key=(value) @attributes[:s3_compatible_access_key] = value end |
#s3_compatible_secret_key ⇒ Object
string - S3-compatible: Secret Key
283 284 285 |
# File 'lib/files.com/models/remote_server_credential.rb', line 283 def s3_compatible_secret_key @attributes[:s3_compatible_secret_key] end |
#s3_compatible_secret_key=(value) ⇒ Object
287 288 289 |
# File 'lib/files.com/models/remote_server_credential.rb', line 287 def s3_compatible_secret_key=(value) @attributes[:s3_compatible_secret_key] = value end |
#save ⇒ Object
386 387 388 389 390 391 392 393 394 395 |
# File 'lib/files.com/models/remote_server_credential.rb', line 386 def save if @attributes[:id] new_obj = update(@attributes) else new_obj = RemoteServerCredential.create(@attributes, @options) end @attributes = new_obj.attributes true end |
#server_type ⇒ Object
string - Remote server type. Remote Server Credentials are only valid for a single type of Remote Server.
49 50 51 |
# File 'lib/files.com/models/remote_server_credential.rb', line 49 def server_type @attributes[:server_type] end |
#server_type=(value) ⇒ Object
53 54 55 |
# File 'lib/files.com/models/remote_server_credential.rb', line 53 def server_type=(value) @attributes[:server_type] = value end |
#update(params = {}) ⇒ Object
Parameters:
name - string - Internal name for your reference
description - string - Internal description for your reference
server_type - string - Remote server type. Remote Server Credentials are only valid for a single type of Remote Server.
aws_access_key - string - AWS Access Key.
azure_blob_storage_account - string - Azure Blob Storage: Account name
azure_files_storage_account - string - Azure Files: Storage Account name
cloudflare_access_key - string - Cloudflare: Access Key.
filebase_access_key - string - Filebase: Access Key.
google_cloud_storage_s3_compatible_access_key - string - Google Cloud Storage: S3-compatible Access Key.
linode_access_key - string - Linode: Access Key
s3_compatible_access_key - string - S3-compatible: Access Key
username - string - Remote server username.
wasabi_access_key - string - Wasabi: Access Key.
password - string - Password, if needed.
private_key - string - Private key, if needed.
private_key_passphrase - string - Passphrase for private key if needed.
aws_secret_key - string - AWS: secret key.
azure_blob_storage_access_key - string - Azure Blob Storage: Access Key
azure_blob_storage_sas_token - string - Azure Blob Storage: Shared Access Signature (SAS) token
azure_files_storage_access_key - string - Azure File Storage: Access Key
azure_files_storage_sas_token - string - Azure File Storage: Shared Access Signature (SAS) token
backblaze_b2_application_key - string - Backblaze B2 Cloud Storage: applicationKey
backblaze_b2_key_id - string - Backblaze B2 Cloud Storage: keyID
cloudflare_secret_key - string - Cloudflare: Secret Key
filebase_secret_key - string - Filebase: Secret Key
google_cloud_storage_credentials_json - string - Google Cloud Storage: JSON file that contains the private key. To generate see https://cloud.google.com/storage/docs/json_api/v1/how-tos/authorizing#APIKey
google_cloud_storage_s3_compatible_secret_key - string - Google Cloud Storage: S3-compatible secret key
linode_secret_key - string - Linode: Secret Key
s3_compatible_secret_key - string - S3-compatible: Secret Key
wasabi_secret_key - string - Wasabi: Secret Key
331 332 333 334 335 336 337 338 339 340 341 342 343 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 |
# File 'lib/files.com/models/remote_server_credential.rb', line 331 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[:id] and !params[:id].is_a?(Integer) raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String) raise InvalidParameterError.new("Bad parameter: description must be an String") if params[:description] and !params[:description].is_a?(String) raise InvalidParameterError.new("Bad parameter: server_type must be an String") if params[:server_type] and !params[:server_type].is_a?(String) raise InvalidParameterError.new("Bad parameter: aws_access_key must be an String") if params[:aws_access_key] and !params[:aws_access_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: azure_blob_storage_account must be an String") if params[:azure_blob_storage_account] and !params[:azure_blob_storage_account].is_a?(String) raise InvalidParameterError.new("Bad parameter: azure_files_storage_account must be an String") if params[:azure_files_storage_account] and !params[:azure_files_storage_account].is_a?(String) raise InvalidParameterError.new("Bad parameter: cloudflare_access_key must be an String") if params[:cloudflare_access_key] and !params[:cloudflare_access_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: filebase_access_key must be an String") if params[:filebase_access_key] and !params[:filebase_access_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: google_cloud_storage_s3_compatible_access_key must be an String") if params[:google_cloud_storage_s3_compatible_access_key] and !params[:google_cloud_storage_s3_compatible_access_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: linode_access_key must be an String") if params[:linode_access_key] and !params[:linode_access_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: s3_compatible_access_key must be an String") if params[:s3_compatible_access_key] and !params[:s3_compatible_access_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: username must be an String") if params[:username] and !params[:username].is_a?(String) raise InvalidParameterError.new("Bad parameter: wasabi_access_key must be an String") if params[:wasabi_access_key] and !params[:wasabi_access_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: password must be an String") if params[:password] and !params[:password].is_a?(String) raise InvalidParameterError.new("Bad parameter: private_key must be an String") if params[:private_key] and !params[:private_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: private_key_passphrase must be an String") if params[:private_key_passphrase] and !params[:private_key_passphrase].is_a?(String) raise InvalidParameterError.new("Bad parameter: aws_secret_key must be an String") if params[:aws_secret_key] and !params[:aws_secret_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: azure_blob_storage_access_key must be an String") if params[:azure_blob_storage_access_key] and !params[:azure_blob_storage_access_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: azure_blob_storage_sas_token must be an String") if params[:azure_blob_storage_sas_token] and !params[:azure_blob_storage_sas_token].is_a?(String) raise InvalidParameterError.new("Bad parameter: azure_files_storage_access_key must be an String") if params[:azure_files_storage_access_key] and !params[:azure_files_storage_access_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: azure_files_storage_sas_token must be an String") if params[:azure_files_storage_sas_token] and !params[:azure_files_storage_sas_token].is_a?(String) raise InvalidParameterError.new("Bad parameter: backblaze_b2_application_key must be an String") if params[:backblaze_b2_application_key] and !params[:backblaze_b2_application_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: backblaze_b2_key_id must be an String") if params[:backblaze_b2_key_id] and !params[:backblaze_b2_key_id].is_a?(String) raise InvalidParameterError.new("Bad parameter: cloudflare_secret_key must be an String") if params[:cloudflare_secret_key] and !params[:cloudflare_secret_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: filebase_secret_key must be an String") if params[:filebase_secret_key] and !params[:filebase_secret_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: google_cloud_storage_credentials_json must be an String") if params[:google_cloud_storage_credentials_json] and !params[:google_cloud_storage_credentials_json].is_a?(String) raise InvalidParameterError.new("Bad parameter: google_cloud_storage_s3_compatible_secret_key must be an String") if params[:google_cloud_storage_s3_compatible_secret_key] and !params[:google_cloud_storage_s3_compatible_secret_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: linode_secret_key must be an String") if params[:linode_secret_key] and !params[:linode_secret_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: s3_compatible_secret_key must be an String") if params[:s3_compatible_secret_key] and !params[:s3_compatible_secret_key].is_a?(String) raise InvalidParameterError.new("Bad parameter: wasabi_secret_key must be an String") if params[:wasabi_secret_key] and !params[:wasabi_secret_key].is_a?(String) raise MissingParameterError.new("Parameter missing: id") unless params[:id] Api.send_request("/remote_server_credentials/#{@attributes[:id]}", :patch, params, @options) end |
#username ⇒ Object
string - Remote server username.
139 140 141 |
# File 'lib/files.com/models/remote_server_credential.rb', line 139 def username @attributes[:username] end |
#username=(value) ⇒ Object
143 144 145 |
# File 'lib/files.com/models/remote_server_credential.rb', line 143 def username=(value) @attributes[:username] = value end |
#wasabi_access_key ⇒ Object
string - Wasabi: Access Key.
76 77 78 |
# File 'lib/files.com/models/remote_server_credential.rb', line 76 def wasabi_access_key @attributes[:wasabi_access_key] end |
#wasabi_access_key=(value) ⇒ Object
80 81 82 |
# File 'lib/files.com/models/remote_server_credential.rb', line 80 def wasabi_access_key=(value) @attributes[:wasabi_access_key] = value end |
#wasabi_secret_key ⇒ Object
string - Wasabi: Secret Key
292 293 294 |
# File 'lib/files.com/models/remote_server_credential.rb', line 292 def wasabi_secret_key @attributes[:wasabi_secret_key] end |
#wasabi_secret_key=(value) ⇒ Object
296 297 298 |
# File 'lib/files.com/models/remote_server_credential.rb', line 296 def wasabi_secret_key=(value) @attributes[:wasabi_secret_key] = value end |
#workspace_id ⇒ Object
int64 - Workspace ID (0 for default workspace)
22 23 24 |
# File 'lib/files.com/models/remote_server_credential.rb', line 22 def workspace_id @attributes[:workspace_id] end |
#workspace_id=(value) ⇒ Object
26 27 28 |
# File 'lib/files.com/models/remote_server_credential.rb', line 26 def workspace_id=(value) @attributes[:workspace_id] = value end |