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_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_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
-
#copy_values_from_credential_id ⇒ Object
int64 - ID of Remote Server Credential to copy omitted values from.
- #copy_values_from_credential_id=(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_assume_role_arn ⇒ Object
string - AWS IAM Role ARN for AssumeRole authentication.
- #s3_assume_role_arn=(value) ⇒ Object
-
#s3_assume_role_duration_seconds ⇒ Object
int64 - Session duration in seconds for AssumeRole authentication (900-43200).
- #s3_assume_role_duration_seconds=(value) ⇒ Object
-
#s3_assume_role_external_id ⇒ Object
string - External ID for AssumeRole authentication.
- #s3_assume_role_external_id=(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
-
#sharepoint_app_credential_type ⇒ Object
string - SharePoint: App-only credential type.
- #sharepoint_app_credential_type=(value) ⇒ Object
-
#sharepoint_client_certificate ⇒ Object
string - SharePoint: PEM-encoded certificate and unencrypted private key for app-only authentication.
- #sharepoint_client_certificate=(value) ⇒ Object
-
#sharepoint_client_id ⇒ Object
string - SharePoint: Microsoft Entra application client ID for app-only authentication.
- #sharepoint_client_id=(value) ⇒ Object
-
#sharepoint_client_secret ⇒ Object
string - SharePoint: Microsoft Entra application client secret for app-only authentication.
- #sharepoint_client_secret=(value) ⇒ Object
-
#sharepoint_tenant_id ⇒ Object
string - SharePoint: Microsoft Entra tenant ID for app-only authentication.
- #sharepoint_tenant_id=(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
486 487 488 |
# File 'lib/files.com/models/remote_server_credential.rb', line 486 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.
s3_assume_role_arn - string - AWS IAM Role ARN for AssumeRole authentication.
s3_assume_role_duration_seconds - int64 - Session duration in seconds for AssumeRole authentication (900-43200).
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
sharepoint_client_id - string - SharePoint: Microsoft Entra application client ID for app-only authentication.
sharepoint_tenant_id - string - SharePoint: Microsoft Entra tenant ID for app-only authentication.
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
sharepoint_client_certificate - string - SharePoint: PEM-encoded certificate and unencrypted private key for app-only authentication.
sharepoint_client_secret - string - SharePoint: Microsoft Entra application client secret for app-only authentication.
wasabi_secret_key - string - Wasabi: Secret Key
workspace_id - int64 - Workspace ID (0 for default workspace)
copy_values_from_credential_id - int64 - ID of Remote Server Credential to copy omitted values from.
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 574 575 576 577 578 579 580 581 582 583 |
# File 'lib/files.com/models/remote_server_credential.rb', line 543 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: s3_assume_role_arn must be an String") if params[:s3_assume_role_arn] and !params[:s3_assume_role_arn].is_a?(String) raise InvalidParameterError.new("Bad parameter: s3_assume_role_duration_seconds must be an Integer") if params[:s3_assume_role_duration_seconds] and !params[:s3_assume_role_duration_seconds].is_a?(Integer) 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: sharepoint_client_id must be an String") if params[:sharepoint_client_id] and !params[:sharepoint_client_id].is_a?(String) raise InvalidParameterError.new("Bad parameter: sharepoint_tenant_id must be an String") if params[:sharepoint_tenant_id] and !params[:sharepoint_tenant_id].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: sharepoint_client_certificate must be an String") if params[:sharepoint_client_certificate] and !params[:sharepoint_client_certificate].is_a?(String) raise InvalidParameterError.new("Bad parameter: sharepoint_client_secret must be an String") if params[:sharepoint_client_secret] and !params[:sharepoint_client_secret].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) raise InvalidParameterError.new("Bad parameter: copy_values_from_credential_id must be an Integer") if params[:copy_values_from_credential_id] and !params[:copy_values_from_credential_id].is_a?(Integer) response, = Api.send_request("/remote_server_credentials", :post, params, ) RemoteServerCredential.new(response.data, ) end |
.delete(id, params = {}, options = {}) ⇒ Object
664 665 666 667 668 669 670 671 672 |
# File 'lib/files.com/models/remote_server_credential.rb', line 664 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
674 675 676 677 |
# File 'lib/files.com/models/remote_server_credential.rb', line 674 def self.destroy(id, params = {}, = {}) delete(id, params, ) nil end |
.find(id, params = {}, options = {}) ⇒ Object
Parameters:
id (required) - int64 - Remote Server Credential ID.
492 493 494 495 496 497 498 499 500 |
# File 'lib/files.com/models/remote_server_credential.rb', line 492 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
502 503 504 |
# File 'lib/files.com/models/remote_server_credential.rb', line 502 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: 10000, 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`.
474 475 476 477 478 479 480 481 482 483 484 |
# File 'lib/files.com/models/remote_server_credential.rb', line 474 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.
s3_assume_role_arn - string - AWS IAM Role ARN for AssumeRole authentication.
s3_assume_role_duration_seconds - int64 - Session duration in seconds for AssumeRole authentication (900-43200).
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
sharepoint_client_id - string - SharePoint: Microsoft Entra application client ID for app-only authentication.
sharepoint_tenant_id - string - SharePoint: Microsoft Entra tenant ID for app-only authentication.
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
sharepoint_client_certificate - string - SharePoint: PEM-encoded certificate and unencrypted private key for app-only authentication.
sharepoint_client_secret - string - SharePoint: Microsoft Entra application client secret for app-only authentication.
wasabi_secret_key - string - Wasabi: Secret Key
620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 |
# File 'lib/files.com/models/remote_server_credential.rb', line 620 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: s3_assume_role_arn must be an String") if params[:s3_assume_role_arn] and !params[:s3_assume_role_arn].is_a?(String) raise InvalidParameterError.new("Bad parameter: s3_assume_role_duration_seconds must be an Integer") if params[:s3_assume_role_duration_seconds] and !params[:s3_assume_role_duration_seconds].is_a?(Integer) 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: sharepoint_client_id must be an String") if params[:sharepoint_client_id] and !params[:sharepoint_client_id].is_a?(String) raise InvalidParameterError.new("Bad parameter: sharepoint_tenant_id must be an String") if params[:sharepoint_tenant_id] and !params[:sharepoint_tenant_id].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: sharepoint_client_certificate must be an String") if params[:sharepoint_client_certificate] and !params[:sharepoint_client_certificate].is_a?(String) raise InvalidParameterError.new("Bad parameter: sharepoint_client_secret must be an String") if params[:sharepoint_client_secret] and !params[:sharepoint_client_secret].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.
211 212 213 |
# File 'lib/files.com/models/remote_server_credential.rb', line 211 def aws_secret_key @attributes[:aws_secret_key] end |
#aws_secret_key=(value) ⇒ Object
215 216 217 |
# File 'lib/files.com/models/remote_server_credential.rb', line 215 def aws_secret_key=(value) @attributes[:aws_secret_key] = value end |
#azure_blob_storage_access_key ⇒ Object
string - Azure Blob Storage: Access Key
220 221 222 |
# File 'lib/files.com/models/remote_server_credential.rb', line 220 def azure_blob_storage_access_key @attributes[:azure_blob_storage_access_key] end |
#azure_blob_storage_access_key=(value) ⇒ Object
224 225 226 |
# File 'lib/files.com/models/remote_server_credential.rb', line 224 def azure_blob_storage_access_key=(value) @attributes[:azure_blob_storage_access_key] = value end |
#azure_blob_storage_sas_token ⇒ Object
string - Azure Blob Storage: Shared Access Signature (SAS) token
229 230 231 |
# File 'lib/files.com/models/remote_server_credential.rb', line 229 def azure_blob_storage_sas_token @attributes[:azure_blob_storage_sas_token] end |
#azure_blob_storage_sas_token=(value) ⇒ Object
233 234 235 |
# File 'lib/files.com/models/remote_server_credential.rb', line 233 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
238 239 240 |
# File 'lib/files.com/models/remote_server_credential.rb', line 238 def azure_files_storage_access_key @attributes[:azure_files_storage_access_key] end |
#azure_files_storage_access_key=(value) ⇒ Object
242 243 244 |
# File 'lib/files.com/models/remote_server_credential.rb', line 242 def azure_files_storage_access_key=(value) @attributes[:azure_files_storage_access_key] = value end |
#azure_files_storage_sas_token ⇒ Object
string - Azure File Storage: Shared Access Signature (SAS) token
247 248 249 |
# File 'lib/files.com/models/remote_server_credential.rb', line 247 def azure_files_storage_sas_token @attributes[:azure_files_storage_sas_token] end |
#azure_files_storage_sas_token=(value) ⇒ Object
251 252 253 |
# File 'lib/files.com/models/remote_server_credential.rb', line 251 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
256 257 258 |
# File 'lib/files.com/models/remote_server_credential.rb', line 256 def backblaze_b2_application_key @attributes[:backblaze_b2_application_key] end |
#backblaze_b2_application_key=(value) ⇒ Object
260 261 262 |
# File 'lib/files.com/models/remote_server_credential.rb', line 260 def backblaze_b2_application_key=(value) @attributes[:backblaze_b2_application_key] = value end |
#backblaze_b2_key_id ⇒ Object
string - Backblaze B2 Cloud Storage: keyID
265 266 267 |
# File 'lib/files.com/models/remote_server_credential.rb', line 265 def backblaze_b2_key_id @attributes[:backblaze_b2_key_id] end |
#backblaze_b2_key_id=(value) ⇒ Object
269 270 271 |
# File 'lib/files.com/models/remote_server_credential.rb', line 269 def backblaze_b2_key_id=(value) @attributes[:backblaze_b2_key_id] = value end |
#cloudflare_access_key ⇒ Object
string - Cloudflare: Access Key.
130 131 132 |
# File 'lib/files.com/models/remote_server_credential.rb', line 130 def cloudflare_access_key @attributes[:cloudflare_access_key] end |
#cloudflare_access_key=(value) ⇒ Object
134 135 136 |
# File 'lib/files.com/models/remote_server_credential.rb', line 134 def cloudflare_access_key=(value) @attributes[:cloudflare_access_key] = value end |
#cloudflare_secret_key ⇒ Object
string - Cloudflare: Secret Key
274 275 276 |
# File 'lib/files.com/models/remote_server_credential.rb', line 274 def cloudflare_secret_key @attributes[:cloudflare_secret_key] end |
#cloudflare_secret_key=(value) ⇒ Object
278 279 280 |
# File 'lib/files.com/models/remote_server_credential.rb', line 278 def cloudflare_secret_key=(value) @attributes[:cloudflare_secret_key] = value end |
#copy_values_from_credential_id ⇒ Object
int64 - ID of Remote Server Credential to copy omitted values from.
355 356 357 |
# File 'lib/files.com/models/remote_server_credential.rb', line 355 def copy_values_from_credential_id @attributes[:copy_values_from_credential_id] end |
#copy_values_from_credential_id=(value) ⇒ Object
359 360 361 |
# File 'lib/files.com/models/remote_server_credential.rb', line 359 def copy_values_from_credential_id=(value) @attributes[:copy_values_from_credential_id] = value end |
#delete(params = {}) ⇒ Object
442 443 444 445 446 447 448 449 450 |
# File 'lib/files.com/models/remote_server_credential.rb', line 442 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
452 453 454 455 |
# File 'lib/files.com/models/remote_server_credential.rb', line 452 def destroy(params = {}) delete(params) nil end |
#filebase_access_key ⇒ Object
string - Filebase: Access Key.
121 122 123 |
# File 'lib/files.com/models/remote_server_credential.rb', line 121 def filebase_access_key @attributes[:filebase_access_key] end |
#filebase_access_key=(value) ⇒ Object
125 126 127 |
# File 'lib/files.com/models/remote_server_credential.rb', line 125 def filebase_access_key=(value) @attributes[:filebase_access_key] = value end |
#filebase_secret_key ⇒ Object
string - Filebase: Secret Key
283 284 285 |
# File 'lib/files.com/models/remote_server_credential.rb', line 283 def filebase_secret_key @attributes[:filebase_secret_key] end |
#filebase_secret_key=(value) ⇒ Object
287 288 289 |
# File 'lib/files.com/models/remote_server_credential.rb', line 287 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 https://cloud.google.com/storage/docs/json_api/v1/how-tos/authorizing#APIKey
292 293 294 |
# File 'lib/files.com/models/remote_server_credential.rb', line 292 def google_cloud_storage_credentials_json @attributes[:google_cloud_storage_credentials_json] end |
#google_cloud_storage_credentials_json=(value) ⇒ Object
296 297 298 |
# File 'lib/files.com/models/remote_server_credential.rb', line 296 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.
94 95 96 |
# File 'lib/files.com/models/remote_server_credential.rb', line 94 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
98 99 100 |
# File 'lib/files.com/models/remote_server_credential.rb', line 98 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
301 302 303 |
# File 'lib/files.com/models/remote_server_credential.rb', line 301 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
305 306 307 |
# File 'lib/files.com/models/remote_server_credential.rb', line 305 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
139 140 141 |
# File 'lib/files.com/models/remote_server_credential.rb', line 139 def linode_access_key @attributes[:linode_access_key] end |
#linode_access_key=(value) ⇒ Object
143 144 145 |
# File 'lib/files.com/models/remote_server_credential.rb', line 143 def linode_access_key=(value) @attributes[:linode_access_key] = value end |
#linode_secret_key ⇒ Object
string - Linode: Secret Key
310 311 312 |
# File 'lib/files.com/models/remote_server_credential.rb', line 310 def linode_secret_key @attributes[:linode_secret_key] end |
#linode_secret_key=(value) ⇒ Object
314 315 316 |
# File 'lib/files.com/models/remote_server_credential.rb', line 314 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.
184 185 186 |
# File 'lib/files.com/models/remote_server_credential.rb', line 184 def password @attributes[:password] end |
#password=(value) ⇒ Object
188 189 190 |
# File 'lib/files.com/models/remote_server_credential.rb', line 188 def password=(value) @attributes[:password] = value end |
#private_key ⇒ Object
string - Private key, if needed.
193 194 195 |
# File 'lib/files.com/models/remote_server_credential.rb', line 193 def private_key @attributes[:private_key] end |
#private_key=(value) ⇒ Object
197 198 199 |
# File 'lib/files.com/models/remote_server_credential.rb', line 197 def private_key=(value) @attributes[:private_key] = value end |
#private_key_passphrase ⇒ Object
string - Passphrase for private key if needed.
202 203 204 |
# File 'lib/files.com/models/remote_server_credential.rb', line 202 def private_key_passphrase @attributes[:private_key_passphrase] end |
#private_key_passphrase=(value) ⇒ Object
206 207 208 |
# File 'lib/files.com/models/remote_server_credential.rb', line 206 def private_key_passphrase=(value) @attributes[:private_key_passphrase] = value end |
#s3_assume_role_arn ⇒ Object
string - AWS IAM Role ARN for AssumeRole authentication.
67 68 69 |
# File 'lib/files.com/models/remote_server_credential.rb', line 67 def s3_assume_role_arn @attributes[:s3_assume_role_arn] end |
#s3_assume_role_arn=(value) ⇒ Object
71 72 73 |
# File 'lib/files.com/models/remote_server_credential.rb', line 71 def s3_assume_role_arn=(value) @attributes[:s3_assume_role_arn] = value end |
#s3_assume_role_duration_seconds ⇒ Object
int64 - Session duration in seconds for AssumeRole authentication (900-43200).
76 77 78 |
# File 'lib/files.com/models/remote_server_credential.rb', line 76 def s3_assume_role_duration_seconds @attributes[:s3_assume_role_duration_seconds] end |
#s3_assume_role_duration_seconds=(value) ⇒ Object
80 81 82 |
# File 'lib/files.com/models/remote_server_credential.rb', line 80 def s3_assume_role_duration_seconds=(value) @attributes[:s3_assume_role_duration_seconds] = value end |
#s3_assume_role_external_id ⇒ Object
string - External ID for AssumeRole authentication.
85 86 87 |
# File 'lib/files.com/models/remote_server_credential.rb', line 85 def s3_assume_role_external_id @attributes[:s3_assume_role_external_id] end |
#s3_assume_role_external_id=(value) ⇒ Object
89 90 91 |
# File 'lib/files.com/models/remote_server_credential.rb', line 89 def s3_assume_role_external_id=(value) @attributes[:s3_assume_role_external_id] = value end |
#s3_compatible_access_key ⇒ Object
string - S3-compatible: Access Key
112 113 114 |
# File 'lib/files.com/models/remote_server_credential.rb', line 112 def s3_compatible_access_key @attributes[:s3_compatible_access_key] end |
#s3_compatible_access_key=(value) ⇒ Object
116 117 118 |
# File 'lib/files.com/models/remote_server_credential.rb', line 116 def s3_compatible_access_key=(value) @attributes[:s3_compatible_access_key] = value end |
#s3_compatible_secret_key ⇒ Object
string - S3-compatible: Secret Key
319 320 321 |
# File 'lib/files.com/models/remote_server_credential.rb', line 319 def s3_compatible_secret_key @attributes[:s3_compatible_secret_key] end |
#s3_compatible_secret_key=(value) ⇒ Object
323 324 325 |
# File 'lib/files.com/models/remote_server_credential.rb', line 323 def s3_compatible_secret_key=(value) @attributes[:s3_compatible_secret_key] = value end |
#save ⇒ Object
457 458 459 460 461 462 463 464 465 466 |
# File 'lib/files.com/models/remote_server_credential.rb', line 457 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 |
#sharepoint_app_credential_type ⇒ Object
string - SharePoint: App-only credential type. Either secret or certificate.
166 167 168 |
# File 'lib/files.com/models/remote_server_credential.rb', line 166 def sharepoint_app_credential_type @attributes[:sharepoint_app_credential_type] end |
#sharepoint_app_credential_type=(value) ⇒ Object
170 171 172 |
# File 'lib/files.com/models/remote_server_credential.rb', line 170 def sharepoint_app_credential_type=(value) @attributes[:sharepoint_app_credential_type] = value end |
#sharepoint_client_certificate ⇒ Object
string - SharePoint: PEM-encoded certificate and unencrypted private key for app-only authentication.
328 329 330 |
# File 'lib/files.com/models/remote_server_credential.rb', line 328 def sharepoint_client_certificate @attributes[:sharepoint_client_certificate] end |
#sharepoint_client_certificate=(value) ⇒ Object
332 333 334 |
# File 'lib/files.com/models/remote_server_credential.rb', line 332 def sharepoint_client_certificate=(value) @attributes[:sharepoint_client_certificate] = value end |
#sharepoint_client_id ⇒ Object
string - SharePoint: Microsoft Entra application client ID for app-only authentication.
157 158 159 |
# File 'lib/files.com/models/remote_server_credential.rb', line 157 def sharepoint_client_id @attributes[:sharepoint_client_id] end |
#sharepoint_client_id=(value) ⇒ Object
161 162 163 |
# File 'lib/files.com/models/remote_server_credential.rb', line 161 def sharepoint_client_id=(value) @attributes[:sharepoint_client_id] = value end |
#sharepoint_client_secret ⇒ Object
string - SharePoint: Microsoft Entra application client secret for app-only authentication.
337 338 339 |
# File 'lib/files.com/models/remote_server_credential.rb', line 337 def sharepoint_client_secret @attributes[:sharepoint_client_secret] end |
#sharepoint_client_secret=(value) ⇒ Object
341 342 343 |
# File 'lib/files.com/models/remote_server_credential.rb', line 341 def sharepoint_client_secret=(value) @attributes[:sharepoint_client_secret] = value end |
#sharepoint_tenant_id ⇒ Object
string - SharePoint: Microsoft Entra tenant ID for app-only authentication.
148 149 150 |
# File 'lib/files.com/models/remote_server_credential.rb', line 148 def sharepoint_tenant_id @attributes[:sharepoint_tenant_id] end |
#sharepoint_tenant_id=(value) ⇒ Object
152 153 154 |
# File 'lib/files.com/models/remote_server_credential.rb', line 152 def sharepoint_tenant_id=(value) @attributes[:sharepoint_tenant_id] = 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.
s3_assume_role_arn - string - AWS IAM Role ARN for AssumeRole authentication.
s3_assume_role_duration_seconds - int64 - Session duration in seconds for AssumeRole authentication (900-43200).
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
sharepoint_client_id - string - SharePoint: Microsoft Entra application client ID for app-only authentication.
sharepoint_tenant_id - string - SharePoint: Microsoft Entra tenant ID for app-only authentication.
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
sharepoint_client_certificate - string - SharePoint: PEM-encoded certificate and unencrypted private key for app-only authentication.
sharepoint_client_secret - string - SharePoint: Microsoft Entra application client secret for app-only authentication.
wasabi_secret_key - string - Wasabi: Secret Key
398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 |
# File 'lib/files.com/models/remote_server_credential.rb', line 398 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: s3_assume_role_arn must be an String") if params[:s3_assume_role_arn] and !params[:s3_assume_role_arn].is_a?(String) raise InvalidParameterError.new("Bad parameter: s3_assume_role_duration_seconds must be an Integer") if params[:s3_assume_role_duration_seconds] and !params[:s3_assume_role_duration_seconds].is_a?(Integer) 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: sharepoint_client_id must be an String") if params[:sharepoint_client_id] and !params[:sharepoint_client_id].is_a?(String) raise InvalidParameterError.new("Bad parameter: sharepoint_tenant_id must be an String") if params[:sharepoint_tenant_id] and !params[:sharepoint_tenant_id].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: sharepoint_client_certificate must be an String") if params[:sharepoint_client_certificate] and !params[:sharepoint_client_certificate].is_a?(String) raise InvalidParameterError.new("Bad parameter: sharepoint_client_secret must be an String") if params[:sharepoint_client_secret] and !params[:sharepoint_client_secret].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.
175 176 177 |
# File 'lib/files.com/models/remote_server_credential.rb', line 175 def username @attributes[:username] end |
#username=(value) ⇒ Object
179 180 181 |
# File 'lib/files.com/models/remote_server_credential.rb', line 179 def username=(value) @attributes[:username] = value end |
#wasabi_access_key ⇒ Object
string - Wasabi: Access Key.
103 104 105 |
# File 'lib/files.com/models/remote_server_credential.rb', line 103 def wasabi_access_key @attributes[:wasabi_access_key] end |
#wasabi_access_key=(value) ⇒ Object
107 108 109 |
# File 'lib/files.com/models/remote_server_credential.rb', line 107 def wasabi_access_key=(value) @attributes[:wasabi_access_key] = value end |
#wasabi_secret_key ⇒ Object
string - Wasabi: Secret Key
346 347 348 |
# File 'lib/files.com/models/remote_server_credential.rb', line 346 def wasabi_secret_key @attributes[:wasabi_secret_key] end |
#wasabi_secret_key=(value) ⇒ Object
350 351 352 |
# File 'lib/files.com/models/remote_server_credential.rb', line 350 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 |