files-com 1.6.208__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of files-com might be problematic. Click here for more details.

Files changed (126) hide show
  1. README.md +758 -0
  2. _VERSION +1 -0
  3. files_com-1.6.208.dist-info/METADATA +770 -0
  4. files_com-1.6.208.dist-info/RECORD +126 -0
  5. files_com-1.6.208.dist-info/WHEEL +5 -0
  6. files_com-1.6.208.dist-info/licenses/LICENSE +21 -0
  7. files_com-1.6.208.dist-info/top_level.txt +1 -0
  8. files_sdk/__init__.py +309 -0
  9. files_sdk/api.py +63 -0
  10. files_sdk/api_client.py +336 -0
  11. files_sdk/error.py +2981 -0
  12. files_sdk/list_obj.py +42 -0
  13. files_sdk/models/__init__.py +119 -0
  14. files_sdk/models/account_line_item.py +51 -0
  15. files_sdk/models/action.py +49 -0
  16. files_sdk/models/action_notification_export.py +153 -0
  17. files_sdk/models/action_notification_export_result.py +88 -0
  18. files_sdk/models/agent_push_update.py +44 -0
  19. files_sdk/models/api_key.py +318 -0
  20. files_sdk/models/api_request_log.py +105 -0
  21. files_sdk/models/app.py +89 -0
  22. files_sdk/models/as2_incoming_message.py +117 -0
  23. files_sdk/models/as2_outgoing_message.py +113 -0
  24. files_sdk/models/as2_partner.py +415 -0
  25. files_sdk/models/as2_station.py +282 -0
  26. files_sdk/models/auto.py +36 -0
  27. files_sdk/models/automation.py +823 -0
  28. files_sdk/models/automation_log.py +94 -0
  29. files_sdk/models/automation_run.py +112 -0
  30. files_sdk/models/bandwidth_snapshot.py +91 -0
  31. files_sdk/models/behavior.py +340 -0
  32. files_sdk/models/bundle.py +686 -0
  33. files_sdk/models/bundle_action.py +93 -0
  34. files_sdk/models/bundle_download.py +94 -0
  35. files_sdk/models/bundle_notification.py +252 -0
  36. files_sdk/models/bundle_path.py +37 -0
  37. files_sdk/models/bundle_recipient.py +133 -0
  38. files_sdk/models/bundle_registration.py +82 -0
  39. files_sdk/models/child_site_management_policy.py +278 -0
  40. files_sdk/models/clickwrap.py +268 -0
  41. files_sdk/models/dns_record.py +59 -0
  42. files_sdk/models/email_incoming_message.py +102 -0
  43. files_sdk/models/email_log.py +84 -0
  44. files_sdk/models/errors.py +37 -0
  45. files_sdk/models/exavault_api_request_log.py +102 -0
  46. files_sdk/models/external_event.py +148 -0
  47. files_sdk/models/file.py +851 -0
  48. files_sdk/models/file_action.py +39 -0
  49. files_sdk/models/file_comment.py +191 -0
  50. files_sdk/models/file_comment_reaction.py +125 -0
  51. files_sdk/models/file_migration.py +69 -0
  52. files_sdk/models/file_migration_log.py +88 -0
  53. files_sdk/models/file_upload_part.py +54 -0
  54. files_sdk/models/folder.py +186 -0
  55. files_sdk/models/form_field.py +43 -0
  56. files_sdk/models/form_field_set.py +265 -0
  57. files_sdk/models/ftp_action_log.py +104 -0
  58. files_sdk/models/gpg_key.py +333 -0
  59. files_sdk/models/group.py +338 -0
  60. files_sdk/models/group_user.py +235 -0
  61. files_sdk/models/history.py +236 -0
  62. files_sdk/models/history_export.py +238 -0
  63. files_sdk/models/history_export_result.py +98 -0
  64. files_sdk/models/holiday_region.py +58 -0
  65. files_sdk/models/image.py +37 -0
  66. files_sdk/models/inbound_s3_log.py +95 -0
  67. files_sdk/models/inbox_recipient.py +124 -0
  68. files_sdk/models/inbox_registration.py +79 -0
  69. files_sdk/models/inbox_upload.py +80 -0
  70. files_sdk/models/invoice.py +91 -0
  71. files_sdk/models/invoice_line_item.py +51 -0
  72. files_sdk/models/ip_address.py +119 -0
  73. files_sdk/models/key_lifecycle_rule.py +243 -0
  74. files_sdk/models/lock.py +174 -0
  75. files_sdk/models/message.py +244 -0
  76. files_sdk/models/message_comment.py +223 -0
  77. files_sdk/models/message_comment_reaction.py +181 -0
  78. files_sdk/models/message_reaction.py +170 -0
  79. files_sdk/models/notification.py +451 -0
  80. files_sdk/models/outbound_connection_log.py +105 -0
  81. files_sdk/models/partner.py +307 -0
  82. files_sdk/models/payment.py +91 -0
  83. files_sdk/models/payment_line_item.py +42 -0
  84. files_sdk/models/permission.py +190 -0
  85. files_sdk/models/preview.py +40 -0
  86. files_sdk/models/priority.py +63 -0
  87. files_sdk/models/project.py +205 -0
  88. files_sdk/models/public_hosting_request_log.py +101 -0
  89. files_sdk/models/public_ip_address.py +42 -0
  90. files_sdk/models/public_key.py +269 -0
  91. files_sdk/models/remote_bandwidth_snapshot.py +91 -0
  92. files_sdk/models/remote_mount_backend.py +438 -0
  93. files_sdk/models/remote_server.py +1854 -0
  94. files_sdk/models/remote_server_configuration_file.py +73 -0
  95. files_sdk/models/remote_server_credential.py +855 -0
  96. files_sdk/models/request.py +184 -0
  97. files_sdk/models/restore.py +142 -0
  98. files_sdk/models/scim_log.py +88 -0
  99. files_sdk/models/session.py +100 -0
  100. files_sdk/models/settings_change.py +71 -0
  101. files_sdk/models/sftp_action_log.py +108 -0
  102. files_sdk/models/sftp_host_key.py +215 -0
  103. files_sdk/models/share_group.py +228 -0
  104. files_sdk/models/share_group_member.py +41 -0
  105. files_sdk/models/siem_http_destination.py +1074 -0
  106. files_sdk/models/site.py +1289 -0
  107. files_sdk/models/snapshot.py +255 -0
  108. files_sdk/models/sso_strategy.py +168 -0
  109. files_sdk/models/status.py +42 -0
  110. files_sdk/models/style.py +152 -0
  111. files_sdk/models/sync.py +588 -0
  112. files_sdk/models/sync_log.py +86 -0
  113. files_sdk/models/sync_run.py +124 -0
  114. files_sdk/models/usage_by_top_level_dir.py +41 -0
  115. files_sdk/models/usage_daily_snapshot.py +93 -0
  116. files_sdk/models/usage_snapshot.py +73 -0
  117. files_sdk/models/user.py +1232 -0
  118. files_sdk/models/user_cipher_use.py +91 -0
  119. files_sdk/models/user_lifecycle_rule.py +355 -0
  120. files_sdk/models/user_request.py +166 -0
  121. files_sdk/models/user_sftp_client_use.py +68 -0
  122. files_sdk/models/web_dav_action_log.py +104 -0
  123. files_sdk/models/webhook_test.py +116 -0
  124. files_sdk/models/workspace.py +202 -0
  125. files_sdk/path_util.py +42 -0
  126. files_sdk/util.py +34 -0
@@ -0,0 +1,1854 @@
1
+ import builtins # noqa: F401
2
+ from files_sdk.models.agent_push_update import AgentPushUpdate
3
+ from files_sdk.models.remote_server_configuration_file import (
4
+ RemoteServerConfigurationFile,
5
+ )
6
+ from files_sdk.api import Api # noqa: F401
7
+ from files_sdk.list_obj import ListObj
8
+ from files_sdk.error import ( # noqa: F401
9
+ InvalidParameterError,
10
+ MissingParameterError,
11
+ NotImplementedError,
12
+ )
13
+
14
+
15
+ class RemoteServer:
16
+ default_attributes = {
17
+ "id": None, # int64 - Remote server ID
18
+ "disabled": None, # boolean - If true, this server has been disabled due to failures. Make any change or set disabled to false to clear this flag.
19
+ "authentication_method": None, # string - Type of authentication method
20
+ "hostname": None, # string - Hostname or IP address
21
+ "remote_home_path": None, # string - Initial home folder on remote server
22
+ "name": None, # string - Internal name for your reference
23
+ "description": None, # string - Internal description for your reference
24
+ "port": None, # int64 - Port for remote server.
25
+ "buffer_uploads": None, # string - If set to always, uploads to this server will be uploaded first to Files.com before being sent to the remote server. This can improve performance in certain access patterns, such as high-latency connections. It will cause data to be temporarily stored in Files.com. If set to auto, we will perform this optimization if we believe it to be a benefit in a given situation.
26
+ "max_connections": None, # int64 - Max number of parallel connections. Ignored for S3 connections (we will parallelize these as much as possible).
27
+ "pin_to_site_region": None, # boolean - If true, we will ensure that all communications with this remote server are made through the primary region of the site. This setting can also be overridden by a site-wide setting which will force it to true.
28
+ "pinned_region": None, # string - If set, all communications with this remote server are made through the provided region.
29
+ "remote_server_credential_id": None, # int64 - ID of Remote Server Credential, if applicable.
30
+ "s3_bucket": None, # string - S3 bucket name
31
+ "s3_region": None, # string - S3 region
32
+ "aws_access_key": None, # string - AWS Access Key.
33
+ "server_certificate": None, # string - Remote server certificate
34
+ "server_host_key": None, # string - Remote server SSH Host Key. If provided, we will require that the server host key matches the provided key. Uses OpenSSH format similar to what would go into ~/.ssh/known_hosts
35
+ "server_type": None, # string - Remote server type.
36
+ "workspace_id": None, # int64 - Workspace ID (0 for default workspace)
37
+ "ssl": None, # string - Should we require SSL?
38
+ "username": None, # string - Remote server username.
39
+ "google_cloud_storage_bucket": None, # string - Google Cloud Storage: Bucket Name
40
+ "google_cloud_storage_project_id": None, # string - Google Cloud Storage: Project ID
41
+ "google_cloud_storage_s3_compatible_access_key": None, # string - Google Cloud Storage: S3-compatible Access Key.
42
+ "backblaze_b2_s3_endpoint": None, # string - Backblaze B2 Cloud Storage: S3 Endpoint
43
+ "backblaze_b2_bucket": None, # string - Backblaze B2 Cloud Storage: Bucket name
44
+ "wasabi_bucket": None, # string - Wasabi: Bucket name
45
+ "wasabi_region": None, # string - Wasabi: Region
46
+ "wasabi_access_key": None, # string - Wasabi: Access Key.
47
+ "auth_status": None, # string - Either `in_setup` or `complete`
48
+ "auth_account_name": None, # string - Describes the authorized account
49
+ "one_drive_account_type": None, # string - OneDrive: Either personal or business_other account types
50
+ "azure_blob_storage_account": None, # string - Azure Blob Storage: Account name
51
+ "azure_blob_storage_container": None, # string - Azure Blob Storage: Container name
52
+ "azure_blob_storage_hierarchical_namespace": None, # boolean - Azure Blob Storage: Does the storage account has hierarchical namespace feature enabled?
53
+ "azure_blob_storage_dns_suffix": None, # string - Azure Blob Storage: Custom DNS suffix
54
+ "azure_files_storage_account": None, # string - Azure Files: Storage Account name
55
+ "azure_files_storage_share_name": None, # string - Azure Files: Storage Share name
56
+ "azure_files_storage_dns_suffix": None, # string - Azure Files: Custom DNS suffix
57
+ "s3_compatible_bucket": None, # string - S3-compatible: Bucket name
58
+ "s3_compatible_endpoint": None, # string - S3-compatible: endpoint
59
+ "s3_compatible_region": None, # string - S3-compatible: region
60
+ "s3_compatible_access_key": None, # string - S3-compatible: Access Key
61
+ "enable_dedicated_ips": None, # boolean - `true` if remote server only accepts connections from dedicated IPs
62
+ "files_agent_permission_set": None, # string - Local permissions for files agent. read_only, write_only, or read_write
63
+ "files_agent_root": None, # string - Agent local root path
64
+ "files_agent_api_token": None, # string - Files Agent API Token
65
+ "files_agent_version": None, # string - Files Agent version
66
+ "files_agent_up_to_date": None, # boolean - If true, the Files Agent is up to date.
67
+ "files_agent_latest_version": None, # string - Latest available Files Agent version
68
+ "files_agent_supports_push_updates": None, # boolean - Files Agent supports receiving push updates
69
+ "outbound_agent_id": None, # int64 - Route traffic to outbound on a files-agent
70
+ "filebase_bucket": None, # string - Filebase: Bucket name
71
+ "filebase_access_key": None, # string - Filebase: Access Key.
72
+ "cloudflare_bucket": None, # string - Cloudflare: Bucket name
73
+ "cloudflare_access_key": None, # string - Cloudflare: Access Key.
74
+ "cloudflare_endpoint": None, # string - Cloudflare: endpoint
75
+ "dropbox_teams": None, # boolean - Dropbox: If true, list Team folders in root?
76
+ "linode_bucket": None, # string - Linode: Bucket name
77
+ "linode_access_key": None, # string - Linode: Access Key
78
+ "linode_region": None, # string - Linode: region
79
+ "supports_versioning": None, # boolean - If true, this remote server supports file versioning. This value is determined automatically by Files.com.
80
+ "password": None, # string - Password, if needed.
81
+ "private_key": None, # string - Private key, if needed.
82
+ "private_key_passphrase": None, # string - Passphrase for private key if needed.
83
+ "reset_authentication": None, # boolean - Reset authenticated account?
84
+ "ssl_certificate": None, # string - SSL client certificate.
85
+ "aws_secret_key": None, # string - AWS: secret key.
86
+ "azure_blob_storage_access_key": None, # string - Azure Blob Storage: Access Key
87
+ "azure_blob_storage_sas_token": None, # string - Azure Blob Storage: Shared Access Signature (SAS) token
88
+ "azure_files_storage_access_key": None, # string - Azure File Storage: Access Key
89
+ "azure_files_storage_sas_token": None, # string - Azure File Storage: Shared Access Signature (SAS) token
90
+ "backblaze_b2_application_key": None, # string - Backblaze B2 Cloud Storage: applicationKey
91
+ "backblaze_b2_key_id": None, # string - Backblaze B2 Cloud Storage: keyID
92
+ "cloudflare_secret_key": None, # string - Cloudflare: Secret Key
93
+ "filebase_secret_key": None, # string - Filebase: Secret Key
94
+ "google_cloud_storage_credentials_json": None, # 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
95
+ "google_cloud_storage_s3_compatible_secret_key": None, # string - Google Cloud Storage: S3-compatible secret key
96
+ "linode_secret_key": None, # string - Linode: Secret Key
97
+ "s3_compatible_secret_key": None, # string - S3-compatible: Secret Key
98
+ "wasabi_secret_key": None, # string - Wasabi: Secret Key
99
+ }
100
+
101
+ def __init__(self, attributes=None, options=None):
102
+ if not isinstance(attributes, dict):
103
+ attributes = {}
104
+ if not isinstance(options, dict):
105
+ options = {}
106
+ self.set_attributes(attributes)
107
+ self.options = options
108
+
109
+ def set_attributes(self, attributes):
110
+ for (
111
+ attribute,
112
+ default_value,
113
+ ) in RemoteServer.default_attributes.items():
114
+ setattr(self, attribute, attributes.get(attribute, default_value))
115
+
116
+ def get_attributes(self):
117
+ return {
118
+ k: getattr(self, k, None)
119
+ for k in RemoteServer.default_attributes
120
+ if getattr(self, k, None) is not None
121
+ }
122
+
123
+ # Push update to Files Agent
124
+ def agent_push_update(self, params=None):
125
+ if not isinstance(params, dict):
126
+ params = {}
127
+
128
+ if hasattr(self, "id") and self.id:
129
+ params["id"] = self.id
130
+ else:
131
+ raise MissingParameterError("Current object doesn't have a id")
132
+ if "id" not in params:
133
+ raise MissingParameterError("Parameter missing: id")
134
+ if "id" in params and not isinstance(params["id"], int):
135
+ raise InvalidParameterError("Bad parameter: id must be an int")
136
+ response, _options = Api.send_request(
137
+ "POST",
138
+ "/remote_servers/{id}/agent_push_update".format(id=params["id"]),
139
+ params,
140
+ self.options,
141
+ )
142
+ return response.data
143
+
144
+ # Post local changes, check in, and download configuration file (used by some Remote Server integrations, such as the Files.com Agent)
145
+ #
146
+ # Parameters:
147
+ # api_token - string - Files Agent API Token
148
+ # permission_set - string - The permission set for the agent ['read_write', 'read_only', 'write_only']
149
+ # root - string - The root directory for the agent
150
+ # hostname - string
151
+ # port - int64 - Incoming port for files agent connections
152
+ # status - string - either running or shutdown
153
+ # config_version - string - agent config version
154
+ # private_key - string - The private key for the agent
155
+ # public_key - string - public key
156
+ # server_host_key - string
157
+ # subdomain - string - Files.com subdomain site name
158
+ def configuration_file(self, params=None):
159
+ if not isinstance(params, dict):
160
+ params = {}
161
+
162
+ if hasattr(self, "id") and self.id:
163
+ params["id"] = self.id
164
+ else:
165
+ raise MissingParameterError("Current object doesn't have a id")
166
+ if "id" not in params:
167
+ raise MissingParameterError("Parameter missing: id")
168
+ if "id" in params and not isinstance(params["id"], int):
169
+ raise InvalidParameterError("Bad parameter: id must be an int")
170
+ if "api_token" in params and not isinstance(params["api_token"], str):
171
+ raise InvalidParameterError(
172
+ "Bad parameter: api_token must be an str"
173
+ )
174
+ if "permission_set" in params and not isinstance(
175
+ params["permission_set"], str
176
+ ):
177
+ raise InvalidParameterError(
178
+ "Bad parameter: permission_set must be an str"
179
+ )
180
+ if "root" in params and not isinstance(params["root"], str):
181
+ raise InvalidParameterError("Bad parameter: root must be an str")
182
+ if "hostname" in params and not isinstance(params["hostname"], str):
183
+ raise InvalidParameterError(
184
+ "Bad parameter: hostname must be an str"
185
+ )
186
+ if "port" in params and not isinstance(params["port"], int):
187
+ raise InvalidParameterError("Bad parameter: port must be an int")
188
+ if "status" in params and not isinstance(params["status"], str):
189
+ raise InvalidParameterError("Bad parameter: status must be an str")
190
+ if "config_version" in params and not isinstance(
191
+ params["config_version"], str
192
+ ):
193
+ raise InvalidParameterError(
194
+ "Bad parameter: config_version must be an str"
195
+ )
196
+ if "private_key" in params and not isinstance(
197
+ params["private_key"], str
198
+ ):
199
+ raise InvalidParameterError(
200
+ "Bad parameter: private_key must be an str"
201
+ )
202
+ if "public_key" in params and not isinstance(
203
+ params["public_key"], str
204
+ ):
205
+ raise InvalidParameterError(
206
+ "Bad parameter: public_key must be an str"
207
+ )
208
+ if "server_host_key" in params and not isinstance(
209
+ params["server_host_key"], str
210
+ ):
211
+ raise InvalidParameterError(
212
+ "Bad parameter: server_host_key must be an str"
213
+ )
214
+ if "subdomain" in params and not isinstance(params["subdomain"], str):
215
+ raise InvalidParameterError(
216
+ "Bad parameter: subdomain must be an str"
217
+ )
218
+ response, _options = Api.send_request(
219
+ "POST",
220
+ "/remote_servers/{id}/configuration_file".format(id=params["id"]),
221
+ params,
222
+ self.options,
223
+ )
224
+ return response.data
225
+
226
+ # Parameters:
227
+ # password - string - Password, if needed.
228
+ # private_key - string - Private key, if needed.
229
+ # private_key_passphrase - string - Passphrase for private key if needed.
230
+ # reset_authentication - boolean - Reset authenticated account?
231
+ # ssl_certificate - string - SSL client certificate.
232
+ # aws_secret_key - string - AWS: secret key.
233
+ # azure_blob_storage_access_key - string - Azure Blob Storage: Access Key
234
+ # azure_blob_storage_sas_token - string - Azure Blob Storage: Shared Access Signature (SAS) token
235
+ # azure_files_storage_access_key - string - Azure File Storage: Access Key
236
+ # azure_files_storage_sas_token - string - Azure File Storage: Shared Access Signature (SAS) token
237
+ # backblaze_b2_application_key - string - Backblaze B2 Cloud Storage: applicationKey
238
+ # backblaze_b2_key_id - string - Backblaze B2 Cloud Storage: keyID
239
+ # cloudflare_secret_key - string - Cloudflare: Secret Key
240
+ # filebase_secret_key - string - Filebase: Secret Key
241
+ # 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
242
+ # google_cloud_storage_s3_compatible_secret_key - string - Google Cloud Storage: S3-compatible secret key
243
+ # linode_secret_key - string - Linode: Secret Key
244
+ # s3_compatible_secret_key - string - S3-compatible: Secret Key
245
+ # wasabi_secret_key - string - Wasabi: Secret Key
246
+ # aws_access_key - string - AWS Access Key.
247
+ # azure_blob_storage_account - string - Azure Blob Storage: Account name
248
+ # azure_blob_storage_container - string - Azure Blob Storage: Container name
249
+ # azure_blob_storage_dns_suffix - string - Azure Blob Storage: Custom DNS suffix
250
+ # azure_blob_storage_hierarchical_namespace - boolean - Azure Blob Storage: Does the storage account has hierarchical namespace feature enabled?
251
+ # azure_files_storage_account - string - Azure Files: Storage Account name
252
+ # azure_files_storage_dns_suffix - string - Azure Files: Custom DNS suffix
253
+ # azure_files_storage_share_name - string - Azure Files: Storage Share name
254
+ # backblaze_b2_bucket - string - Backblaze B2 Cloud Storage: Bucket name
255
+ # backblaze_b2_s3_endpoint - string - Backblaze B2 Cloud Storage: S3 Endpoint
256
+ # buffer_uploads - string - If set to always, uploads to this server will be uploaded first to Files.com before being sent to the remote server. This can improve performance in certain access patterns, such as high-latency connections. It will cause data to be temporarily stored in Files.com. If set to auto, we will perform this optimization if we believe it to be a benefit in a given situation.
257
+ # cloudflare_access_key - string - Cloudflare: Access Key.
258
+ # cloudflare_bucket - string - Cloudflare: Bucket name
259
+ # cloudflare_endpoint - string - Cloudflare: endpoint
260
+ # description - string - Internal description for your reference
261
+ # dropbox_teams - boolean - Dropbox: If true, list Team folders in root?
262
+ # enable_dedicated_ips - boolean - `true` if remote server only accepts connections from dedicated IPs
263
+ # filebase_access_key - string - Filebase: Access Key.
264
+ # filebase_bucket - string - Filebase: Bucket name
265
+ # files_agent_permission_set - string - Local permissions for files agent. read_only, write_only, or read_write
266
+ # files_agent_root - string - Agent local root path
267
+ # files_agent_version - string - Files Agent version
268
+ # outbound_agent_id - int64 - Route traffic to outbound on a files-agent
269
+ # google_cloud_storage_bucket - string - Google Cloud Storage: Bucket Name
270
+ # google_cloud_storage_project_id - string - Google Cloud Storage: Project ID
271
+ # google_cloud_storage_s3_compatible_access_key - string - Google Cloud Storage: S3-compatible Access Key.
272
+ # hostname - string - Hostname or IP address
273
+ # linode_access_key - string - Linode: Access Key
274
+ # linode_bucket - string - Linode: Bucket name
275
+ # linode_region - string - Linode: region
276
+ # max_connections - int64 - Max number of parallel connections. Ignored for S3 connections (we will parallelize these as much as possible).
277
+ # name - string - Internal name for your reference
278
+ # one_drive_account_type - string - OneDrive: Either personal or business_other account types
279
+ # pin_to_site_region - boolean - If true, we will ensure that all communications with this remote server are made through the primary region of the site. This setting can also be overridden by a site-wide setting which will force it to true.
280
+ # port - int64 - Port for remote server.
281
+ # remote_server_credential_id - int64 - ID of Remote Server Credential, if applicable.
282
+ # s3_bucket - string - S3 bucket name
283
+ # s3_compatible_access_key - string - S3-compatible: Access Key
284
+ # s3_compatible_bucket - string - S3-compatible: Bucket name
285
+ # s3_compatible_endpoint - string - S3-compatible: endpoint
286
+ # s3_compatible_region - string - S3-compatible: region
287
+ # s3_region - string - S3 region
288
+ # server_certificate - string - Remote server certificate
289
+ # server_host_key - string - Remote server SSH Host Key. If provided, we will require that the server host key matches the provided key. Uses OpenSSH format similar to what would go into ~/.ssh/known_hosts
290
+ # server_type - string - Remote server type.
291
+ # ssl - string - Should we require SSL?
292
+ # username - string - Remote server username.
293
+ # wasabi_access_key - string - Wasabi: Access Key.
294
+ # wasabi_bucket - string - Wasabi: Bucket name
295
+ # wasabi_region - string - Wasabi: Region
296
+ def update(self, params=None):
297
+ if not isinstance(params, dict):
298
+ params = {}
299
+
300
+ if hasattr(self, "id") and self.id:
301
+ params["id"] = self.id
302
+ else:
303
+ raise MissingParameterError("Current object doesn't have a id")
304
+ if "id" not in params:
305
+ raise MissingParameterError("Parameter missing: id")
306
+ if "id" in params and not isinstance(params["id"], int):
307
+ raise InvalidParameterError("Bad parameter: id must be an int")
308
+ if "password" in params and not isinstance(params["password"], str):
309
+ raise InvalidParameterError(
310
+ "Bad parameter: password must be an str"
311
+ )
312
+ if "private_key" in params and not isinstance(
313
+ params["private_key"], str
314
+ ):
315
+ raise InvalidParameterError(
316
+ "Bad parameter: private_key must be an str"
317
+ )
318
+ if "private_key_passphrase" in params and not isinstance(
319
+ params["private_key_passphrase"], str
320
+ ):
321
+ raise InvalidParameterError(
322
+ "Bad parameter: private_key_passphrase must be an str"
323
+ )
324
+ if "ssl_certificate" in params and not isinstance(
325
+ params["ssl_certificate"], str
326
+ ):
327
+ raise InvalidParameterError(
328
+ "Bad parameter: ssl_certificate must be an str"
329
+ )
330
+ if "aws_secret_key" in params and not isinstance(
331
+ params["aws_secret_key"], str
332
+ ):
333
+ raise InvalidParameterError(
334
+ "Bad parameter: aws_secret_key must be an str"
335
+ )
336
+ if "azure_blob_storage_access_key" in params and not isinstance(
337
+ params["azure_blob_storage_access_key"], str
338
+ ):
339
+ raise InvalidParameterError(
340
+ "Bad parameter: azure_blob_storage_access_key must be an str"
341
+ )
342
+ if "azure_blob_storage_sas_token" in params and not isinstance(
343
+ params["azure_blob_storage_sas_token"], str
344
+ ):
345
+ raise InvalidParameterError(
346
+ "Bad parameter: azure_blob_storage_sas_token must be an str"
347
+ )
348
+ if "azure_files_storage_access_key" in params and not isinstance(
349
+ params["azure_files_storage_access_key"], str
350
+ ):
351
+ raise InvalidParameterError(
352
+ "Bad parameter: azure_files_storage_access_key must be an str"
353
+ )
354
+ if "azure_files_storage_sas_token" in params and not isinstance(
355
+ params["azure_files_storage_sas_token"], str
356
+ ):
357
+ raise InvalidParameterError(
358
+ "Bad parameter: azure_files_storage_sas_token must be an str"
359
+ )
360
+ if "backblaze_b2_application_key" in params and not isinstance(
361
+ params["backblaze_b2_application_key"], str
362
+ ):
363
+ raise InvalidParameterError(
364
+ "Bad parameter: backblaze_b2_application_key must be an str"
365
+ )
366
+ if "backblaze_b2_key_id" in params and not isinstance(
367
+ params["backblaze_b2_key_id"], str
368
+ ):
369
+ raise InvalidParameterError(
370
+ "Bad parameter: backblaze_b2_key_id must be an str"
371
+ )
372
+ if "cloudflare_secret_key" in params and not isinstance(
373
+ params["cloudflare_secret_key"], str
374
+ ):
375
+ raise InvalidParameterError(
376
+ "Bad parameter: cloudflare_secret_key must be an str"
377
+ )
378
+ if "filebase_secret_key" in params and not isinstance(
379
+ params["filebase_secret_key"], str
380
+ ):
381
+ raise InvalidParameterError(
382
+ "Bad parameter: filebase_secret_key must be an str"
383
+ )
384
+ if (
385
+ "google_cloud_storage_credentials_json" in params
386
+ and not isinstance(
387
+ params["google_cloud_storage_credentials_json"], str
388
+ )
389
+ ):
390
+ raise InvalidParameterError(
391
+ "Bad parameter: google_cloud_storage_credentials_json must be an str"
392
+ )
393
+ if (
394
+ "google_cloud_storage_s3_compatible_secret_key" in params
395
+ and not isinstance(
396
+ params["google_cloud_storage_s3_compatible_secret_key"], str
397
+ )
398
+ ):
399
+ raise InvalidParameterError(
400
+ "Bad parameter: google_cloud_storage_s3_compatible_secret_key must be an str"
401
+ )
402
+ if "linode_secret_key" in params and not isinstance(
403
+ params["linode_secret_key"], str
404
+ ):
405
+ raise InvalidParameterError(
406
+ "Bad parameter: linode_secret_key must be an str"
407
+ )
408
+ if "s3_compatible_secret_key" in params and not isinstance(
409
+ params["s3_compatible_secret_key"], str
410
+ ):
411
+ raise InvalidParameterError(
412
+ "Bad parameter: s3_compatible_secret_key must be an str"
413
+ )
414
+ if "wasabi_secret_key" in params and not isinstance(
415
+ params["wasabi_secret_key"], str
416
+ ):
417
+ raise InvalidParameterError(
418
+ "Bad parameter: wasabi_secret_key must be an str"
419
+ )
420
+ if "aws_access_key" in params and not isinstance(
421
+ params["aws_access_key"], str
422
+ ):
423
+ raise InvalidParameterError(
424
+ "Bad parameter: aws_access_key must be an str"
425
+ )
426
+ if "azure_blob_storage_account" in params and not isinstance(
427
+ params["azure_blob_storage_account"], str
428
+ ):
429
+ raise InvalidParameterError(
430
+ "Bad parameter: azure_blob_storage_account must be an str"
431
+ )
432
+ if "azure_blob_storage_container" in params and not isinstance(
433
+ params["azure_blob_storage_container"], str
434
+ ):
435
+ raise InvalidParameterError(
436
+ "Bad parameter: azure_blob_storage_container must be an str"
437
+ )
438
+ if "azure_blob_storage_dns_suffix" in params and not isinstance(
439
+ params["azure_blob_storage_dns_suffix"], str
440
+ ):
441
+ raise InvalidParameterError(
442
+ "Bad parameter: azure_blob_storage_dns_suffix must be an str"
443
+ )
444
+ if "azure_files_storage_account" in params and not isinstance(
445
+ params["azure_files_storage_account"], str
446
+ ):
447
+ raise InvalidParameterError(
448
+ "Bad parameter: azure_files_storage_account must be an str"
449
+ )
450
+ if "azure_files_storage_dns_suffix" in params and not isinstance(
451
+ params["azure_files_storage_dns_suffix"], str
452
+ ):
453
+ raise InvalidParameterError(
454
+ "Bad parameter: azure_files_storage_dns_suffix must be an str"
455
+ )
456
+ if "azure_files_storage_share_name" in params and not isinstance(
457
+ params["azure_files_storage_share_name"], str
458
+ ):
459
+ raise InvalidParameterError(
460
+ "Bad parameter: azure_files_storage_share_name must be an str"
461
+ )
462
+ if "backblaze_b2_bucket" in params and not isinstance(
463
+ params["backblaze_b2_bucket"], str
464
+ ):
465
+ raise InvalidParameterError(
466
+ "Bad parameter: backblaze_b2_bucket must be an str"
467
+ )
468
+ if "backblaze_b2_s3_endpoint" in params and not isinstance(
469
+ params["backblaze_b2_s3_endpoint"], str
470
+ ):
471
+ raise InvalidParameterError(
472
+ "Bad parameter: backblaze_b2_s3_endpoint must be an str"
473
+ )
474
+ if "buffer_uploads" in params and not isinstance(
475
+ params["buffer_uploads"], str
476
+ ):
477
+ raise InvalidParameterError(
478
+ "Bad parameter: buffer_uploads must be an str"
479
+ )
480
+ if "cloudflare_access_key" in params and not isinstance(
481
+ params["cloudflare_access_key"], str
482
+ ):
483
+ raise InvalidParameterError(
484
+ "Bad parameter: cloudflare_access_key must be an str"
485
+ )
486
+ if "cloudflare_bucket" in params and not isinstance(
487
+ params["cloudflare_bucket"], str
488
+ ):
489
+ raise InvalidParameterError(
490
+ "Bad parameter: cloudflare_bucket must be an str"
491
+ )
492
+ if "cloudflare_endpoint" in params and not isinstance(
493
+ params["cloudflare_endpoint"], str
494
+ ):
495
+ raise InvalidParameterError(
496
+ "Bad parameter: cloudflare_endpoint must be an str"
497
+ )
498
+ if "description" in params and not isinstance(
499
+ params["description"], str
500
+ ):
501
+ raise InvalidParameterError(
502
+ "Bad parameter: description must be an str"
503
+ )
504
+ if "filebase_access_key" in params and not isinstance(
505
+ params["filebase_access_key"], str
506
+ ):
507
+ raise InvalidParameterError(
508
+ "Bad parameter: filebase_access_key must be an str"
509
+ )
510
+ if "filebase_bucket" in params and not isinstance(
511
+ params["filebase_bucket"], str
512
+ ):
513
+ raise InvalidParameterError(
514
+ "Bad parameter: filebase_bucket must be an str"
515
+ )
516
+ if "files_agent_permission_set" in params and not isinstance(
517
+ params["files_agent_permission_set"], str
518
+ ):
519
+ raise InvalidParameterError(
520
+ "Bad parameter: files_agent_permission_set must be an str"
521
+ )
522
+ if "files_agent_root" in params and not isinstance(
523
+ params["files_agent_root"], str
524
+ ):
525
+ raise InvalidParameterError(
526
+ "Bad parameter: files_agent_root must be an str"
527
+ )
528
+ if "files_agent_version" in params and not isinstance(
529
+ params["files_agent_version"], str
530
+ ):
531
+ raise InvalidParameterError(
532
+ "Bad parameter: files_agent_version must be an str"
533
+ )
534
+ if "outbound_agent_id" in params and not isinstance(
535
+ params["outbound_agent_id"], int
536
+ ):
537
+ raise InvalidParameterError(
538
+ "Bad parameter: outbound_agent_id must be an int"
539
+ )
540
+ if "google_cloud_storage_bucket" in params and not isinstance(
541
+ params["google_cloud_storage_bucket"], str
542
+ ):
543
+ raise InvalidParameterError(
544
+ "Bad parameter: google_cloud_storage_bucket must be an str"
545
+ )
546
+ if "google_cloud_storage_project_id" in params and not isinstance(
547
+ params["google_cloud_storage_project_id"], str
548
+ ):
549
+ raise InvalidParameterError(
550
+ "Bad parameter: google_cloud_storage_project_id must be an str"
551
+ )
552
+ if (
553
+ "google_cloud_storage_s3_compatible_access_key" in params
554
+ and not isinstance(
555
+ params["google_cloud_storage_s3_compatible_access_key"], str
556
+ )
557
+ ):
558
+ raise InvalidParameterError(
559
+ "Bad parameter: google_cloud_storage_s3_compatible_access_key must be an str"
560
+ )
561
+ if "hostname" in params and not isinstance(params["hostname"], str):
562
+ raise InvalidParameterError(
563
+ "Bad parameter: hostname must be an str"
564
+ )
565
+ if "linode_access_key" in params and not isinstance(
566
+ params["linode_access_key"], str
567
+ ):
568
+ raise InvalidParameterError(
569
+ "Bad parameter: linode_access_key must be an str"
570
+ )
571
+ if "linode_bucket" in params and not isinstance(
572
+ params["linode_bucket"], str
573
+ ):
574
+ raise InvalidParameterError(
575
+ "Bad parameter: linode_bucket must be an str"
576
+ )
577
+ if "linode_region" in params and not isinstance(
578
+ params["linode_region"], str
579
+ ):
580
+ raise InvalidParameterError(
581
+ "Bad parameter: linode_region must be an str"
582
+ )
583
+ if "max_connections" in params and not isinstance(
584
+ params["max_connections"], int
585
+ ):
586
+ raise InvalidParameterError(
587
+ "Bad parameter: max_connections must be an int"
588
+ )
589
+ if "name" in params and not isinstance(params["name"], str):
590
+ raise InvalidParameterError("Bad parameter: name must be an str")
591
+ if "one_drive_account_type" in params and not isinstance(
592
+ params["one_drive_account_type"], str
593
+ ):
594
+ raise InvalidParameterError(
595
+ "Bad parameter: one_drive_account_type must be an str"
596
+ )
597
+ if "port" in params and not isinstance(params["port"], int):
598
+ raise InvalidParameterError("Bad parameter: port must be an int")
599
+ if "remote_server_credential_id" in params and not isinstance(
600
+ params["remote_server_credential_id"], int
601
+ ):
602
+ raise InvalidParameterError(
603
+ "Bad parameter: remote_server_credential_id must be an int"
604
+ )
605
+ if "s3_bucket" in params and not isinstance(params["s3_bucket"], str):
606
+ raise InvalidParameterError(
607
+ "Bad parameter: s3_bucket must be an str"
608
+ )
609
+ if "s3_compatible_access_key" in params and not isinstance(
610
+ params["s3_compatible_access_key"], str
611
+ ):
612
+ raise InvalidParameterError(
613
+ "Bad parameter: s3_compatible_access_key must be an str"
614
+ )
615
+ if "s3_compatible_bucket" in params and not isinstance(
616
+ params["s3_compatible_bucket"], str
617
+ ):
618
+ raise InvalidParameterError(
619
+ "Bad parameter: s3_compatible_bucket must be an str"
620
+ )
621
+ if "s3_compatible_endpoint" in params and not isinstance(
622
+ params["s3_compatible_endpoint"], str
623
+ ):
624
+ raise InvalidParameterError(
625
+ "Bad parameter: s3_compatible_endpoint must be an str"
626
+ )
627
+ if "s3_compatible_region" in params and not isinstance(
628
+ params["s3_compatible_region"], str
629
+ ):
630
+ raise InvalidParameterError(
631
+ "Bad parameter: s3_compatible_region must be an str"
632
+ )
633
+ if "s3_region" in params and not isinstance(params["s3_region"], str):
634
+ raise InvalidParameterError(
635
+ "Bad parameter: s3_region must be an str"
636
+ )
637
+ if "server_certificate" in params and not isinstance(
638
+ params["server_certificate"], str
639
+ ):
640
+ raise InvalidParameterError(
641
+ "Bad parameter: server_certificate must be an str"
642
+ )
643
+ if "server_host_key" in params and not isinstance(
644
+ params["server_host_key"], str
645
+ ):
646
+ raise InvalidParameterError(
647
+ "Bad parameter: server_host_key must be an str"
648
+ )
649
+ if "server_type" in params and not isinstance(
650
+ params["server_type"], str
651
+ ):
652
+ raise InvalidParameterError(
653
+ "Bad parameter: server_type must be an str"
654
+ )
655
+ if "ssl" in params and not isinstance(params["ssl"], str):
656
+ raise InvalidParameterError("Bad parameter: ssl must be an str")
657
+ if "username" in params and not isinstance(params["username"], str):
658
+ raise InvalidParameterError(
659
+ "Bad parameter: username must be an str"
660
+ )
661
+ if "wasabi_access_key" in params and not isinstance(
662
+ params["wasabi_access_key"], str
663
+ ):
664
+ raise InvalidParameterError(
665
+ "Bad parameter: wasabi_access_key must be an str"
666
+ )
667
+ if "wasabi_bucket" in params and not isinstance(
668
+ params["wasabi_bucket"], str
669
+ ):
670
+ raise InvalidParameterError(
671
+ "Bad parameter: wasabi_bucket must be an str"
672
+ )
673
+ if "wasabi_region" in params and not isinstance(
674
+ params["wasabi_region"], str
675
+ ):
676
+ raise InvalidParameterError(
677
+ "Bad parameter: wasabi_region must be an str"
678
+ )
679
+ response, _options = Api.send_request(
680
+ "PATCH",
681
+ "/remote_servers/{id}".format(id=params["id"]),
682
+ params,
683
+ self.options,
684
+ )
685
+ return response.data
686
+
687
+ def delete(self, params=None):
688
+ if not isinstance(params, dict):
689
+ params = {}
690
+
691
+ if hasattr(self, "id") and self.id:
692
+ params["id"] = self.id
693
+ else:
694
+ raise MissingParameterError("Current object doesn't have a id")
695
+ if "id" not in params:
696
+ raise MissingParameterError("Parameter missing: id")
697
+ if "id" in params and not isinstance(params["id"], int):
698
+ raise InvalidParameterError("Bad parameter: id must be an int")
699
+ Api.send_request(
700
+ "DELETE",
701
+ "/remote_servers/{id}".format(id=params["id"]),
702
+ params,
703
+ self.options,
704
+ )
705
+
706
+ def destroy(self, params=None):
707
+ self.delete(params)
708
+
709
+ def save(self):
710
+ if hasattr(self, "id") and self.id:
711
+ new_obj = self.update(self.get_attributes())
712
+ self.set_attributes(new_obj.get_attributes())
713
+ return True
714
+ else:
715
+ new_obj = create(self.get_attributes(), self.options)
716
+ self.set_attributes(new_obj.get_attributes())
717
+ return True
718
+
719
+
720
+ # Parameters:
721
+ # 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.
722
+ # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
723
+ # sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id`, `name`, `server_type`, `backblaze_b2_bucket`, `google_cloud_storage_bucket`, `wasabi_bucket`, `s3_bucket`, `azure_blob_storage_container`, `azure_files_storage_share_name`, `s3_compatible_bucket`, `filebase_bucket`, `cloudflare_bucket` or `linode_bucket`.
724
+ # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `name`, `server_type`, `workspace_id`, `backblaze_b2_bucket`, `google_cloud_storage_bucket`, `wasabi_bucket`, `s3_bucket`, `azure_blob_storage_container`, `azure_files_storage_share_name`, `s3_compatible_bucket`, `filebase_bucket`, `cloudflare_bucket` or `linode_bucket`. Valid field combinations are `[ server_type, name ]`, `[ workspace_id, name ]`, `[ backblaze_b2_bucket, name ]`, `[ google_cloud_storage_bucket, name ]`, `[ wasabi_bucket, name ]`, `[ s3_bucket, name ]`, `[ azure_blob_storage_container, name ]`, `[ azure_files_storage_share_name, name ]`, `[ s3_compatible_bucket, name ]`, `[ filebase_bucket, name ]`, `[ cloudflare_bucket, name ]`, `[ linode_bucket, name ]`, `[ workspace_id, server_type ]` or `[ workspace_id, server_type, name ]`.
725
+ # filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `name`, `backblaze_b2_bucket`, `google_cloud_storage_bucket`, `wasabi_bucket`, `s3_bucket`, `azure_blob_storage_container`, `azure_files_storage_share_name`, `s3_compatible_bucket`, `filebase_bucket`, `cloudflare_bucket` or `linode_bucket`. Valid field combinations are `[ backblaze_b2_bucket, name ]`, `[ google_cloud_storage_bucket, name ]`, `[ wasabi_bucket, name ]`, `[ s3_bucket, name ]`, `[ azure_blob_storage_container, name ]`, `[ azure_files_storage_share_name, name ]`, `[ s3_compatible_bucket, name ]`, `[ filebase_bucket, name ]`, `[ cloudflare_bucket, name ]` or `[ linode_bucket, name ]`.
726
+ def list(params=None, options=None):
727
+ if not isinstance(params, dict):
728
+ params = {}
729
+ if not isinstance(options, dict):
730
+ options = {}
731
+ if "cursor" in params and not isinstance(params["cursor"], str):
732
+ raise InvalidParameterError("Bad parameter: cursor must be an str")
733
+ if "per_page" in params and not isinstance(params["per_page"], int):
734
+ raise InvalidParameterError("Bad parameter: per_page must be an int")
735
+ if "sort_by" in params and not isinstance(params["sort_by"], dict):
736
+ raise InvalidParameterError("Bad parameter: sort_by must be an dict")
737
+ if "filter" in params and not isinstance(params["filter"], dict):
738
+ raise InvalidParameterError("Bad parameter: filter must be an dict")
739
+ if "filter_prefix" in params and not isinstance(
740
+ params["filter_prefix"], dict
741
+ ):
742
+ raise InvalidParameterError(
743
+ "Bad parameter: filter_prefix must be an dict"
744
+ )
745
+ return ListObj(RemoteServer, "GET", "/remote_servers", params, options)
746
+
747
+
748
+ def all(params=None, options=None):
749
+ list(params, options)
750
+
751
+
752
+ # Parameters:
753
+ # id (required) - int64 - Remote Server ID.
754
+ def find(id, params=None, options=None):
755
+ if not isinstance(params, dict):
756
+ params = {}
757
+ if not isinstance(options, dict):
758
+ options = {}
759
+ params["id"] = id
760
+ if "id" in params and not isinstance(params["id"], int):
761
+ raise InvalidParameterError("Bad parameter: id must be an int")
762
+ if "id" not in params:
763
+ raise MissingParameterError("Parameter missing: id")
764
+ response, options = Api.send_request(
765
+ "GET", "/remote_servers/{id}".format(id=params["id"]), params, options
766
+ )
767
+ return RemoteServer(response.data, options)
768
+
769
+
770
+ def get(id, params=None, options=None):
771
+ find(id, params, options)
772
+
773
+
774
+ # Parameters:
775
+ # id (required) - int64 - Remote Server ID.
776
+ def find_configuration_file(id, params=None, options=None):
777
+ if not isinstance(params, dict):
778
+ params = {}
779
+ if not isinstance(options, dict):
780
+ options = {}
781
+ params["id"] = id
782
+ if "id" in params and not isinstance(params["id"], int):
783
+ raise InvalidParameterError("Bad parameter: id must be an int")
784
+ if "id" not in params:
785
+ raise MissingParameterError("Parameter missing: id")
786
+ response, options = Api.send_request(
787
+ "GET",
788
+ "/remote_servers/{id}/configuration_file".format(id=params["id"]),
789
+ params,
790
+ options,
791
+ )
792
+ return RemoteServerConfigurationFile(response.data, options)
793
+
794
+
795
+ # Parameters:
796
+ # password - string - Password, if needed.
797
+ # private_key - string - Private key, if needed.
798
+ # private_key_passphrase - string - Passphrase for private key if needed.
799
+ # reset_authentication - boolean - Reset authenticated account?
800
+ # ssl_certificate - string - SSL client certificate.
801
+ # aws_secret_key - string - AWS: secret key.
802
+ # azure_blob_storage_access_key - string - Azure Blob Storage: Access Key
803
+ # azure_blob_storage_sas_token - string - Azure Blob Storage: Shared Access Signature (SAS) token
804
+ # azure_files_storage_access_key - string - Azure File Storage: Access Key
805
+ # azure_files_storage_sas_token - string - Azure File Storage: Shared Access Signature (SAS) token
806
+ # backblaze_b2_application_key - string - Backblaze B2 Cloud Storage: applicationKey
807
+ # backblaze_b2_key_id - string - Backblaze B2 Cloud Storage: keyID
808
+ # cloudflare_secret_key - string - Cloudflare: Secret Key
809
+ # filebase_secret_key - string - Filebase: Secret Key
810
+ # 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
811
+ # google_cloud_storage_s3_compatible_secret_key - string - Google Cloud Storage: S3-compatible secret key
812
+ # linode_secret_key - string - Linode: Secret Key
813
+ # s3_compatible_secret_key - string - S3-compatible: Secret Key
814
+ # wasabi_secret_key - string - Wasabi: Secret Key
815
+ # aws_access_key - string - AWS Access Key.
816
+ # azure_blob_storage_account - string - Azure Blob Storage: Account name
817
+ # azure_blob_storage_container - string - Azure Blob Storage: Container name
818
+ # azure_blob_storage_dns_suffix - string - Azure Blob Storage: Custom DNS suffix
819
+ # azure_blob_storage_hierarchical_namespace - boolean - Azure Blob Storage: Does the storage account has hierarchical namespace feature enabled?
820
+ # azure_files_storage_account - string - Azure Files: Storage Account name
821
+ # azure_files_storage_dns_suffix - string - Azure Files: Custom DNS suffix
822
+ # azure_files_storage_share_name - string - Azure Files: Storage Share name
823
+ # backblaze_b2_bucket - string - Backblaze B2 Cloud Storage: Bucket name
824
+ # backblaze_b2_s3_endpoint - string - Backblaze B2 Cloud Storage: S3 Endpoint
825
+ # buffer_uploads - string - If set to always, uploads to this server will be uploaded first to Files.com before being sent to the remote server. This can improve performance in certain access patterns, such as high-latency connections. It will cause data to be temporarily stored in Files.com. If set to auto, we will perform this optimization if we believe it to be a benefit in a given situation.
826
+ # cloudflare_access_key - string - Cloudflare: Access Key.
827
+ # cloudflare_bucket - string - Cloudflare: Bucket name
828
+ # cloudflare_endpoint - string - Cloudflare: endpoint
829
+ # description - string - Internal description for your reference
830
+ # dropbox_teams - boolean - Dropbox: If true, list Team folders in root?
831
+ # enable_dedicated_ips - boolean - `true` if remote server only accepts connections from dedicated IPs
832
+ # filebase_access_key - string - Filebase: Access Key.
833
+ # filebase_bucket - string - Filebase: Bucket name
834
+ # files_agent_permission_set - string - Local permissions for files agent. read_only, write_only, or read_write
835
+ # files_agent_root - string - Agent local root path
836
+ # files_agent_version - string - Files Agent version
837
+ # outbound_agent_id - int64 - Route traffic to outbound on a files-agent
838
+ # google_cloud_storage_bucket - string - Google Cloud Storage: Bucket Name
839
+ # google_cloud_storage_project_id - string - Google Cloud Storage: Project ID
840
+ # google_cloud_storage_s3_compatible_access_key - string - Google Cloud Storage: S3-compatible Access Key.
841
+ # hostname - string - Hostname or IP address
842
+ # linode_access_key - string - Linode: Access Key
843
+ # linode_bucket - string - Linode: Bucket name
844
+ # linode_region - string - Linode: region
845
+ # max_connections - int64 - Max number of parallel connections. Ignored for S3 connections (we will parallelize these as much as possible).
846
+ # name - string - Internal name for your reference
847
+ # one_drive_account_type - string - OneDrive: Either personal or business_other account types
848
+ # pin_to_site_region - boolean - If true, we will ensure that all communications with this remote server are made through the primary region of the site. This setting can also be overridden by a site-wide setting which will force it to true.
849
+ # port - int64 - Port for remote server.
850
+ # remote_server_credential_id - int64 - ID of Remote Server Credential, if applicable.
851
+ # s3_bucket - string - S3 bucket name
852
+ # s3_compatible_access_key - string - S3-compatible: Access Key
853
+ # s3_compatible_bucket - string - S3-compatible: Bucket name
854
+ # s3_compatible_endpoint - string - S3-compatible: endpoint
855
+ # s3_compatible_region - string - S3-compatible: region
856
+ # s3_region - string - S3 region
857
+ # server_certificate - string - Remote server certificate
858
+ # server_host_key - string - Remote server SSH Host Key. If provided, we will require that the server host key matches the provided key. Uses OpenSSH format similar to what would go into ~/.ssh/known_hosts
859
+ # server_type - string - Remote server type.
860
+ # ssl - string - Should we require SSL?
861
+ # username - string - Remote server username.
862
+ # wasabi_access_key - string - Wasabi: Access Key.
863
+ # wasabi_bucket - string - Wasabi: Bucket name
864
+ # wasabi_region - string - Wasabi: Region
865
+ # workspace_id - int64 - Workspace ID (0 for default workspace)
866
+ def create(params=None, options=None):
867
+ if not isinstance(params, dict):
868
+ params = {}
869
+ if not isinstance(options, dict):
870
+ options = {}
871
+ if "password" in params and not isinstance(params["password"], str):
872
+ raise InvalidParameterError("Bad parameter: password must be an str")
873
+ if "private_key" in params and not isinstance(params["private_key"], str):
874
+ raise InvalidParameterError(
875
+ "Bad parameter: private_key must be an str"
876
+ )
877
+ if "private_key_passphrase" in params and not isinstance(
878
+ params["private_key_passphrase"], str
879
+ ):
880
+ raise InvalidParameterError(
881
+ "Bad parameter: private_key_passphrase must be an str"
882
+ )
883
+ if "reset_authentication" in params and not isinstance(
884
+ params["reset_authentication"], bool
885
+ ):
886
+ raise InvalidParameterError(
887
+ "Bad parameter: reset_authentication must be an bool"
888
+ )
889
+ if "ssl_certificate" in params and not isinstance(
890
+ params["ssl_certificate"], str
891
+ ):
892
+ raise InvalidParameterError(
893
+ "Bad parameter: ssl_certificate must be an str"
894
+ )
895
+ if "aws_secret_key" in params and not isinstance(
896
+ params["aws_secret_key"], str
897
+ ):
898
+ raise InvalidParameterError(
899
+ "Bad parameter: aws_secret_key must be an str"
900
+ )
901
+ if "azure_blob_storage_access_key" in params and not isinstance(
902
+ params["azure_blob_storage_access_key"], str
903
+ ):
904
+ raise InvalidParameterError(
905
+ "Bad parameter: azure_blob_storage_access_key must be an str"
906
+ )
907
+ if "azure_blob_storage_sas_token" in params and not isinstance(
908
+ params["azure_blob_storage_sas_token"], str
909
+ ):
910
+ raise InvalidParameterError(
911
+ "Bad parameter: azure_blob_storage_sas_token must be an str"
912
+ )
913
+ if "azure_files_storage_access_key" in params and not isinstance(
914
+ params["azure_files_storage_access_key"], str
915
+ ):
916
+ raise InvalidParameterError(
917
+ "Bad parameter: azure_files_storage_access_key must be an str"
918
+ )
919
+ if "azure_files_storage_sas_token" in params and not isinstance(
920
+ params["azure_files_storage_sas_token"], str
921
+ ):
922
+ raise InvalidParameterError(
923
+ "Bad parameter: azure_files_storage_sas_token must be an str"
924
+ )
925
+ if "backblaze_b2_application_key" in params and not isinstance(
926
+ params["backblaze_b2_application_key"], str
927
+ ):
928
+ raise InvalidParameterError(
929
+ "Bad parameter: backblaze_b2_application_key must be an str"
930
+ )
931
+ if "backblaze_b2_key_id" in params and not isinstance(
932
+ params["backblaze_b2_key_id"], str
933
+ ):
934
+ raise InvalidParameterError(
935
+ "Bad parameter: backblaze_b2_key_id must be an str"
936
+ )
937
+ if "cloudflare_secret_key" in params and not isinstance(
938
+ params["cloudflare_secret_key"], str
939
+ ):
940
+ raise InvalidParameterError(
941
+ "Bad parameter: cloudflare_secret_key must be an str"
942
+ )
943
+ if "filebase_secret_key" in params and not isinstance(
944
+ params["filebase_secret_key"], str
945
+ ):
946
+ raise InvalidParameterError(
947
+ "Bad parameter: filebase_secret_key must be an str"
948
+ )
949
+ if "google_cloud_storage_credentials_json" in params and not isinstance(
950
+ params["google_cloud_storage_credentials_json"], str
951
+ ):
952
+ raise InvalidParameterError(
953
+ "Bad parameter: google_cloud_storage_credentials_json must be an str"
954
+ )
955
+ if (
956
+ "google_cloud_storage_s3_compatible_secret_key" in params
957
+ and not isinstance(
958
+ params["google_cloud_storage_s3_compatible_secret_key"], str
959
+ )
960
+ ):
961
+ raise InvalidParameterError(
962
+ "Bad parameter: google_cloud_storage_s3_compatible_secret_key must be an str"
963
+ )
964
+ if "linode_secret_key" in params and not isinstance(
965
+ params["linode_secret_key"], str
966
+ ):
967
+ raise InvalidParameterError(
968
+ "Bad parameter: linode_secret_key must be an str"
969
+ )
970
+ if "s3_compatible_secret_key" in params and not isinstance(
971
+ params["s3_compatible_secret_key"], str
972
+ ):
973
+ raise InvalidParameterError(
974
+ "Bad parameter: s3_compatible_secret_key must be an str"
975
+ )
976
+ if "wasabi_secret_key" in params and not isinstance(
977
+ params["wasabi_secret_key"], str
978
+ ):
979
+ raise InvalidParameterError(
980
+ "Bad parameter: wasabi_secret_key must be an str"
981
+ )
982
+ if "aws_access_key" in params and not isinstance(
983
+ params["aws_access_key"], str
984
+ ):
985
+ raise InvalidParameterError(
986
+ "Bad parameter: aws_access_key must be an str"
987
+ )
988
+ if "azure_blob_storage_account" in params and not isinstance(
989
+ params["azure_blob_storage_account"], str
990
+ ):
991
+ raise InvalidParameterError(
992
+ "Bad parameter: azure_blob_storage_account must be an str"
993
+ )
994
+ if "azure_blob_storage_container" in params and not isinstance(
995
+ params["azure_blob_storage_container"], str
996
+ ):
997
+ raise InvalidParameterError(
998
+ "Bad parameter: azure_blob_storage_container must be an str"
999
+ )
1000
+ if "azure_blob_storage_dns_suffix" in params and not isinstance(
1001
+ params["azure_blob_storage_dns_suffix"], str
1002
+ ):
1003
+ raise InvalidParameterError(
1004
+ "Bad parameter: azure_blob_storage_dns_suffix must be an str"
1005
+ )
1006
+ if (
1007
+ "azure_blob_storage_hierarchical_namespace" in params
1008
+ and not isinstance(
1009
+ params["azure_blob_storage_hierarchical_namespace"], bool
1010
+ )
1011
+ ):
1012
+ raise InvalidParameterError(
1013
+ "Bad parameter: azure_blob_storage_hierarchical_namespace must be an bool"
1014
+ )
1015
+ if "azure_files_storage_account" in params and not isinstance(
1016
+ params["azure_files_storage_account"], str
1017
+ ):
1018
+ raise InvalidParameterError(
1019
+ "Bad parameter: azure_files_storage_account must be an str"
1020
+ )
1021
+ if "azure_files_storage_dns_suffix" in params and not isinstance(
1022
+ params["azure_files_storage_dns_suffix"], str
1023
+ ):
1024
+ raise InvalidParameterError(
1025
+ "Bad parameter: azure_files_storage_dns_suffix must be an str"
1026
+ )
1027
+ if "azure_files_storage_share_name" in params and not isinstance(
1028
+ params["azure_files_storage_share_name"], str
1029
+ ):
1030
+ raise InvalidParameterError(
1031
+ "Bad parameter: azure_files_storage_share_name must be an str"
1032
+ )
1033
+ if "backblaze_b2_bucket" in params and not isinstance(
1034
+ params["backblaze_b2_bucket"], str
1035
+ ):
1036
+ raise InvalidParameterError(
1037
+ "Bad parameter: backblaze_b2_bucket must be an str"
1038
+ )
1039
+ if "backblaze_b2_s3_endpoint" in params and not isinstance(
1040
+ params["backblaze_b2_s3_endpoint"], str
1041
+ ):
1042
+ raise InvalidParameterError(
1043
+ "Bad parameter: backblaze_b2_s3_endpoint must be an str"
1044
+ )
1045
+ if "buffer_uploads" in params and not isinstance(
1046
+ params["buffer_uploads"], str
1047
+ ):
1048
+ raise InvalidParameterError(
1049
+ "Bad parameter: buffer_uploads must be an str"
1050
+ )
1051
+ if "cloudflare_access_key" in params and not isinstance(
1052
+ params["cloudflare_access_key"], str
1053
+ ):
1054
+ raise InvalidParameterError(
1055
+ "Bad parameter: cloudflare_access_key must be an str"
1056
+ )
1057
+ if "cloudflare_bucket" in params and not isinstance(
1058
+ params["cloudflare_bucket"], str
1059
+ ):
1060
+ raise InvalidParameterError(
1061
+ "Bad parameter: cloudflare_bucket must be an str"
1062
+ )
1063
+ if "cloudflare_endpoint" in params and not isinstance(
1064
+ params["cloudflare_endpoint"], str
1065
+ ):
1066
+ raise InvalidParameterError(
1067
+ "Bad parameter: cloudflare_endpoint must be an str"
1068
+ )
1069
+ if "description" in params and not isinstance(params["description"], str):
1070
+ raise InvalidParameterError(
1071
+ "Bad parameter: description must be an str"
1072
+ )
1073
+ if "dropbox_teams" in params and not isinstance(
1074
+ params["dropbox_teams"], bool
1075
+ ):
1076
+ raise InvalidParameterError(
1077
+ "Bad parameter: dropbox_teams must be an bool"
1078
+ )
1079
+ if "enable_dedicated_ips" in params and not isinstance(
1080
+ params["enable_dedicated_ips"], bool
1081
+ ):
1082
+ raise InvalidParameterError(
1083
+ "Bad parameter: enable_dedicated_ips must be an bool"
1084
+ )
1085
+ if "filebase_access_key" in params and not isinstance(
1086
+ params["filebase_access_key"], str
1087
+ ):
1088
+ raise InvalidParameterError(
1089
+ "Bad parameter: filebase_access_key must be an str"
1090
+ )
1091
+ if "filebase_bucket" in params and not isinstance(
1092
+ params["filebase_bucket"], str
1093
+ ):
1094
+ raise InvalidParameterError(
1095
+ "Bad parameter: filebase_bucket must be an str"
1096
+ )
1097
+ if "files_agent_permission_set" in params and not isinstance(
1098
+ params["files_agent_permission_set"], str
1099
+ ):
1100
+ raise InvalidParameterError(
1101
+ "Bad parameter: files_agent_permission_set must be an str"
1102
+ )
1103
+ if "files_agent_root" in params and not isinstance(
1104
+ params["files_agent_root"], str
1105
+ ):
1106
+ raise InvalidParameterError(
1107
+ "Bad parameter: files_agent_root must be an str"
1108
+ )
1109
+ if "files_agent_version" in params and not isinstance(
1110
+ params["files_agent_version"], str
1111
+ ):
1112
+ raise InvalidParameterError(
1113
+ "Bad parameter: files_agent_version must be an str"
1114
+ )
1115
+ if "outbound_agent_id" in params and not isinstance(
1116
+ params["outbound_agent_id"], int
1117
+ ):
1118
+ raise InvalidParameterError(
1119
+ "Bad parameter: outbound_agent_id must be an int"
1120
+ )
1121
+ if "google_cloud_storage_bucket" in params and not isinstance(
1122
+ params["google_cloud_storage_bucket"], str
1123
+ ):
1124
+ raise InvalidParameterError(
1125
+ "Bad parameter: google_cloud_storage_bucket must be an str"
1126
+ )
1127
+ if "google_cloud_storage_project_id" in params and not isinstance(
1128
+ params["google_cloud_storage_project_id"], str
1129
+ ):
1130
+ raise InvalidParameterError(
1131
+ "Bad parameter: google_cloud_storage_project_id must be an str"
1132
+ )
1133
+ if (
1134
+ "google_cloud_storage_s3_compatible_access_key" in params
1135
+ and not isinstance(
1136
+ params["google_cloud_storage_s3_compatible_access_key"], str
1137
+ )
1138
+ ):
1139
+ raise InvalidParameterError(
1140
+ "Bad parameter: google_cloud_storage_s3_compatible_access_key must be an str"
1141
+ )
1142
+ if "hostname" in params and not isinstance(params["hostname"], str):
1143
+ raise InvalidParameterError("Bad parameter: hostname must be an str")
1144
+ if "linode_access_key" in params and not isinstance(
1145
+ params["linode_access_key"], str
1146
+ ):
1147
+ raise InvalidParameterError(
1148
+ "Bad parameter: linode_access_key must be an str"
1149
+ )
1150
+ if "linode_bucket" in params and not isinstance(
1151
+ params["linode_bucket"], str
1152
+ ):
1153
+ raise InvalidParameterError(
1154
+ "Bad parameter: linode_bucket must be an str"
1155
+ )
1156
+ if "linode_region" in params and not isinstance(
1157
+ params["linode_region"], str
1158
+ ):
1159
+ raise InvalidParameterError(
1160
+ "Bad parameter: linode_region must be an str"
1161
+ )
1162
+ if "max_connections" in params and not isinstance(
1163
+ params["max_connections"], int
1164
+ ):
1165
+ raise InvalidParameterError(
1166
+ "Bad parameter: max_connections must be an int"
1167
+ )
1168
+ if "name" in params and not isinstance(params["name"], str):
1169
+ raise InvalidParameterError("Bad parameter: name must be an str")
1170
+ if "one_drive_account_type" in params and not isinstance(
1171
+ params["one_drive_account_type"], str
1172
+ ):
1173
+ raise InvalidParameterError(
1174
+ "Bad parameter: one_drive_account_type must be an str"
1175
+ )
1176
+ if "pin_to_site_region" in params and not isinstance(
1177
+ params["pin_to_site_region"], bool
1178
+ ):
1179
+ raise InvalidParameterError(
1180
+ "Bad parameter: pin_to_site_region must be an bool"
1181
+ )
1182
+ if "port" in params and not isinstance(params["port"], int):
1183
+ raise InvalidParameterError("Bad parameter: port must be an int")
1184
+ if "remote_server_credential_id" in params and not isinstance(
1185
+ params["remote_server_credential_id"], int
1186
+ ):
1187
+ raise InvalidParameterError(
1188
+ "Bad parameter: remote_server_credential_id must be an int"
1189
+ )
1190
+ if "s3_bucket" in params and not isinstance(params["s3_bucket"], str):
1191
+ raise InvalidParameterError("Bad parameter: s3_bucket must be an str")
1192
+ if "s3_compatible_access_key" in params and not isinstance(
1193
+ params["s3_compatible_access_key"], str
1194
+ ):
1195
+ raise InvalidParameterError(
1196
+ "Bad parameter: s3_compatible_access_key must be an str"
1197
+ )
1198
+ if "s3_compatible_bucket" in params and not isinstance(
1199
+ params["s3_compatible_bucket"], str
1200
+ ):
1201
+ raise InvalidParameterError(
1202
+ "Bad parameter: s3_compatible_bucket must be an str"
1203
+ )
1204
+ if "s3_compatible_endpoint" in params and not isinstance(
1205
+ params["s3_compatible_endpoint"], str
1206
+ ):
1207
+ raise InvalidParameterError(
1208
+ "Bad parameter: s3_compatible_endpoint must be an str"
1209
+ )
1210
+ if "s3_compatible_region" in params and not isinstance(
1211
+ params["s3_compatible_region"], str
1212
+ ):
1213
+ raise InvalidParameterError(
1214
+ "Bad parameter: s3_compatible_region must be an str"
1215
+ )
1216
+ if "s3_region" in params and not isinstance(params["s3_region"], str):
1217
+ raise InvalidParameterError("Bad parameter: s3_region must be an str")
1218
+ if "server_certificate" in params and not isinstance(
1219
+ params["server_certificate"], str
1220
+ ):
1221
+ raise InvalidParameterError(
1222
+ "Bad parameter: server_certificate must be an str"
1223
+ )
1224
+ if "server_host_key" in params and not isinstance(
1225
+ params["server_host_key"], str
1226
+ ):
1227
+ raise InvalidParameterError(
1228
+ "Bad parameter: server_host_key must be an str"
1229
+ )
1230
+ if "server_type" in params and not isinstance(params["server_type"], str):
1231
+ raise InvalidParameterError(
1232
+ "Bad parameter: server_type must be an str"
1233
+ )
1234
+ if "ssl" in params and not isinstance(params["ssl"], str):
1235
+ raise InvalidParameterError("Bad parameter: ssl must be an str")
1236
+ if "username" in params and not isinstance(params["username"], str):
1237
+ raise InvalidParameterError("Bad parameter: username must be an str")
1238
+ if "wasabi_access_key" in params and not isinstance(
1239
+ params["wasabi_access_key"], str
1240
+ ):
1241
+ raise InvalidParameterError(
1242
+ "Bad parameter: wasabi_access_key must be an str"
1243
+ )
1244
+ if "wasabi_bucket" in params and not isinstance(
1245
+ params["wasabi_bucket"], str
1246
+ ):
1247
+ raise InvalidParameterError(
1248
+ "Bad parameter: wasabi_bucket must be an str"
1249
+ )
1250
+ if "wasabi_region" in params and not isinstance(
1251
+ params["wasabi_region"], str
1252
+ ):
1253
+ raise InvalidParameterError(
1254
+ "Bad parameter: wasabi_region must be an str"
1255
+ )
1256
+ if "workspace_id" in params and not isinstance(
1257
+ params["workspace_id"], int
1258
+ ):
1259
+ raise InvalidParameterError(
1260
+ "Bad parameter: workspace_id must be an int"
1261
+ )
1262
+ response, options = Api.send_request(
1263
+ "POST", "/remote_servers", params, options
1264
+ )
1265
+ return RemoteServer(response.data, options)
1266
+
1267
+
1268
+ # Push update to Files Agent
1269
+ def agent_push_update(id, params=None, options=None):
1270
+ if not isinstance(params, dict):
1271
+ params = {}
1272
+ if not isinstance(options, dict):
1273
+ options = {}
1274
+ params["id"] = id
1275
+ if "id" in params and not isinstance(params["id"], int):
1276
+ raise InvalidParameterError("Bad parameter: id must be an int")
1277
+ if "id" not in params:
1278
+ raise MissingParameterError("Parameter missing: id")
1279
+ response, options = Api.send_request(
1280
+ "POST",
1281
+ "/remote_servers/{id}/agent_push_update".format(id=params["id"]),
1282
+ params,
1283
+ options,
1284
+ )
1285
+ return AgentPushUpdate(response.data, options)
1286
+
1287
+
1288
+ # Post local changes, check in, and download configuration file (used by some Remote Server integrations, such as the Files.com Agent)
1289
+ #
1290
+ # Parameters:
1291
+ # api_token - string - Files Agent API Token
1292
+ # permission_set - string - The permission set for the agent ['read_write', 'read_only', 'write_only']
1293
+ # root - string - The root directory for the agent
1294
+ # hostname - string
1295
+ # port - int64 - Incoming port for files agent connections
1296
+ # status - string - either running or shutdown
1297
+ # config_version - string - agent config version
1298
+ # private_key - string - The private key for the agent
1299
+ # public_key - string - public key
1300
+ # server_host_key - string
1301
+ # subdomain - string - Files.com subdomain site name
1302
+ def configuration_file(id, params=None, options=None):
1303
+ if not isinstance(params, dict):
1304
+ params = {}
1305
+ if not isinstance(options, dict):
1306
+ options = {}
1307
+ params["id"] = id
1308
+ if "id" in params and not isinstance(params["id"], int):
1309
+ raise InvalidParameterError("Bad parameter: id must be an int")
1310
+ if "api_token" in params and not isinstance(params["api_token"], str):
1311
+ raise InvalidParameterError("Bad parameter: api_token must be an str")
1312
+ if "permission_set" in params and not isinstance(
1313
+ params["permission_set"], str
1314
+ ):
1315
+ raise InvalidParameterError(
1316
+ "Bad parameter: permission_set must be an str"
1317
+ )
1318
+ if "root" in params and not isinstance(params["root"], str):
1319
+ raise InvalidParameterError("Bad parameter: root must be an str")
1320
+ if "hostname" in params and not isinstance(params["hostname"], str):
1321
+ raise InvalidParameterError("Bad parameter: hostname must be an str")
1322
+ if "port" in params and not isinstance(params["port"], int):
1323
+ raise InvalidParameterError("Bad parameter: port must be an int")
1324
+ if "status" in params and not isinstance(params["status"], str):
1325
+ raise InvalidParameterError("Bad parameter: status must be an str")
1326
+ if "config_version" in params and not isinstance(
1327
+ params["config_version"], str
1328
+ ):
1329
+ raise InvalidParameterError(
1330
+ "Bad parameter: config_version must be an str"
1331
+ )
1332
+ if "private_key" in params and not isinstance(params["private_key"], str):
1333
+ raise InvalidParameterError(
1334
+ "Bad parameter: private_key must be an str"
1335
+ )
1336
+ if "public_key" in params and not isinstance(params["public_key"], str):
1337
+ raise InvalidParameterError("Bad parameter: public_key must be an str")
1338
+ if "server_host_key" in params and not isinstance(
1339
+ params["server_host_key"], str
1340
+ ):
1341
+ raise InvalidParameterError(
1342
+ "Bad parameter: server_host_key must be an str"
1343
+ )
1344
+ if "subdomain" in params and not isinstance(params["subdomain"], str):
1345
+ raise InvalidParameterError("Bad parameter: subdomain must be an str")
1346
+ if "id" not in params:
1347
+ raise MissingParameterError("Parameter missing: id")
1348
+ response, options = Api.send_request(
1349
+ "POST",
1350
+ "/remote_servers/{id}/configuration_file".format(id=params["id"]),
1351
+ params,
1352
+ options,
1353
+ )
1354
+ return RemoteServerConfigurationFile(response.data, options)
1355
+
1356
+
1357
+ # Parameters:
1358
+ # password - string - Password, if needed.
1359
+ # private_key - string - Private key, if needed.
1360
+ # private_key_passphrase - string - Passphrase for private key if needed.
1361
+ # reset_authentication - boolean - Reset authenticated account?
1362
+ # ssl_certificate - string - SSL client certificate.
1363
+ # aws_secret_key - string - AWS: secret key.
1364
+ # azure_blob_storage_access_key - string - Azure Blob Storage: Access Key
1365
+ # azure_blob_storage_sas_token - string - Azure Blob Storage: Shared Access Signature (SAS) token
1366
+ # azure_files_storage_access_key - string - Azure File Storage: Access Key
1367
+ # azure_files_storage_sas_token - string - Azure File Storage: Shared Access Signature (SAS) token
1368
+ # backblaze_b2_application_key - string - Backblaze B2 Cloud Storage: applicationKey
1369
+ # backblaze_b2_key_id - string - Backblaze B2 Cloud Storage: keyID
1370
+ # cloudflare_secret_key - string - Cloudflare: Secret Key
1371
+ # filebase_secret_key - string - Filebase: Secret Key
1372
+ # 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
1373
+ # google_cloud_storage_s3_compatible_secret_key - string - Google Cloud Storage: S3-compatible secret key
1374
+ # linode_secret_key - string - Linode: Secret Key
1375
+ # s3_compatible_secret_key - string - S3-compatible: Secret Key
1376
+ # wasabi_secret_key - string - Wasabi: Secret Key
1377
+ # aws_access_key - string - AWS Access Key.
1378
+ # azure_blob_storage_account - string - Azure Blob Storage: Account name
1379
+ # azure_blob_storage_container - string - Azure Blob Storage: Container name
1380
+ # azure_blob_storage_dns_suffix - string - Azure Blob Storage: Custom DNS suffix
1381
+ # azure_blob_storage_hierarchical_namespace - boolean - Azure Blob Storage: Does the storage account has hierarchical namespace feature enabled?
1382
+ # azure_files_storage_account - string - Azure Files: Storage Account name
1383
+ # azure_files_storage_dns_suffix - string - Azure Files: Custom DNS suffix
1384
+ # azure_files_storage_share_name - string - Azure Files: Storage Share name
1385
+ # backblaze_b2_bucket - string - Backblaze B2 Cloud Storage: Bucket name
1386
+ # backblaze_b2_s3_endpoint - string - Backblaze B2 Cloud Storage: S3 Endpoint
1387
+ # buffer_uploads - string - If set to always, uploads to this server will be uploaded first to Files.com before being sent to the remote server. This can improve performance in certain access patterns, such as high-latency connections. It will cause data to be temporarily stored in Files.com. If set to auto, we will perform this optimization if we believe it to be a benefit in a given situation.
1388
+ # cloudflare_access_key - string - Cloudflare: Access Key.
1389
+ # cloudflare_bucket - string - Cloudflare: Bucket name
1390
+ # cloudflare_endpoint - string - Cloudflare: endpoint
1391
+ # description - string - Internal description for your reference
1392
+ # dropbox_teams - boolean - Dropbox: If true, list Team folders in root?
1393
+ # enable_dedicated_ips - boolean - `true` if remote server only accepts connections from dedicated IPs
1394
+ # filebase_access_key - string - Filebase: Access Key.
1395
+ # filebase_bucket - string - Filebase: Bucket name
1396
+ # files_agent_permission_set - string - Local permissions for files agent. read_only, write_only, or read_write
1397
+ # files_agent_root - string - Agent local root path
1398
+ # files_agent_version - string - Files Agent version
1399
+ # outbound_agent_id - int64 - Route traffic to outbound on a files-agent
1400
+ # google_cloud_storage_bucket - string - Google Cloud Storage: Bucket Name
1401
+ # google_cloud_storage_project_id - string - Google Cloud Storage: Project ID
1402
+ # google_cloud_storage_s3_compatible_access_key - string - Google Cloud Storage: S3-compatible Access Key.
1403
+ # hostname - string - Hostname or IP address
1404
+ # linode_access_key - string - Linode: Access Key
1405
+ # linode_bucket - string - Linode: Bucket name
1406
+ # linode_region - string - Linode: region
1407
+ # max_connections - int64 - Max number of parallel connections. Ignored for S3 connections (we will parallelize these as much as possible).
1408
+ # name - string - Internal name for your reference
1409
+ # one_drive_account_type - string - OneDrive: Either personal or business_other account types
1410
+ # pin_to_site_region - boolean - If true, we will ensure that all communications with this remote server are made through the primary region of the site. This setting can also be overridden by a site-wide setting which will force it to true.
1411
+ # port - int64 - Port for remote server.
1412
+ # remote_server_credential_id - int64 - ID of Remote Server Credential, if applicable.
1413
+ # s3_bucket - string - S3 bucket name
1414
+ # s3_compatible_access_key - string - S3-compatible: Access Key
1415
+ # s3_compatible_bucket - string - S3-compatible: Bucket name
1416
+ # s3_compatible_endpoint - string - S3-compatible: endpoint
1417
+ # s3_compatible_region - string - S3-compatible: region
1418
+ # s3_region - string - S3 region
1419
+ # server_certificate - string - Remote server certificate
1420
+ # server_host_key - string - Remote server SSH Host Key. If provided, we will require that the server host key matches the provided key. Uses OpenSSH format similar to what would go into ~/.ssh/known_hosts
1421
+ # server_type - string - Remote server type.
1422
+ # ssl - string - Should we require SSL?
1423
+ # username - string - Remote server username.
1424
+ # wasabi_access_key - string - Wasabi: Access Key.
1425
+ # wasabi_bucket - string - Wasabi: Bucket name
1426
+ # wasabi_region - string - Wasabi: Region
1427
+ def update(id, params=None, options=None):
1428
+ if not isinstance(params, dict):
1429
+ params = {}
1430
+ if not isinstance(options, dict):
1431
+ options = {}
1432
+ params["id"] = id
1433
+ if "id" in params and not isinstance(params["id"], int):
1434
+ raise InvalidParameterError("Bad parameter: id must be an int")
1435
+ if "password" in params and not isinstance(params["password"], str):
1436
+ raise InvalidParameterError("Bad parameter: password must be an str")
1437
+ if "private_key" in params and not isinstance(params["private_key"], str):
1438
+ raise InvalidParameterError(
1439
+ "Bad parameter: private_key must be an str"
1440
+ )
1441
+ if "private_key_passphrase" in params and not isinstance(
1442
+ params["private_key_passphrase"], str
1443
+ ):
1444
+ raise InvalidParameterError(
1445
+ "Bad parameter: private_key_passphrase must be an str"
1446
+ )
1447
+ if "reset_authentication" in params and not isinstance(
1448
+ params["reset_authentication"], bool
1449
+ ):
1450
+ raise InvalidParameterError(
1451
+ "Bad parameter: reset_authentication must be an bool"
1452
+ )
1453
+ if "ssl_certificate" in params and not isinstance(
1454
+ params["ssl_certificate"], str
1455
+ ):
1456
+ raise InvalidParameterError(
1457
+ "Bad parameter: ssl_certificate must be an str"
1458
+ )
1459
+ if "aws_secret_key" in params and not isinstance(
1460
+ params["aws_secret_key"], str
1461
+ ):
1462
+ raise InvalidParameterError(
1463
+ "Bad parameter: aws_secret_key must be an str"
1464
+ )
1465
+ if "azure_blob_storage_access_key" in params and not isinstance(
1466
+ params["azure_blob_storage_access_key"], str
1467
+ ):
1468
+ raise InvalidParameterError(
1469
+ "Bad parameter: azure_blob_storage_access_key must be an str"
1470
+ )
1471
+ if "azure_blob_storage_sas_token" in params and not isinstance(
1472
+ params["azure_blob_storage_sas_token"], str
1473
+ ):
1474
+ raise InvalidParameterError(
1475
+ "Bad parameter: azure_blob_storage_sas_token must be an str"
1476
+ )
1477
+ if "azure_files_storage_access_key" in params and not isinstance(
1478
+ params["azure_files_storage_access_key"], str
1479
+ ):
1480
+ raise InvalidParameterError(
1481
+ "Bad parameter: azure_files_storage_access_key must be an str"
1482
+ )
1483
+ if "azure_files_storage_sas_token" in params and not isinstance(
1484
+ params["azure_files_storage_sas_token"], str
1485
+ ):
1486
+ raise InvalidParameterError(
1487
+ "Bad parameter: azure_files_storage_sas_token must be an str"
1488
+ )
1489
+ if "backblaze_b2_application_key" in params and not isinstance(
1490
+ params["backblaze_b2_application_key"], str
1491
+ ):
1492
+ raise InvalidParameterError(
1493
+ "Bad parameter: backblaze_b2_application_key must be an str"
1494
+ )
1495
+ if "backblaze_b2_key_id" in params and not isinstance(
1496
+ params["backblaze_b2_key_id"], str
1497
+ ):
1498
+ raise InvalidParameterError(
1499
+ "Bad parameter: backblaze_b2_key_id must be an str"
1500
+ )
1501
+ if "cloudflare_secret_key" in params and not isinstance(
1502
+ params["cloudflare_secret_key"], str
1503
+ ):
1504
+ raise InvalidParameterError(
1505
+ "Bad parameter: cloudflare_secret_key must be an str"
1506
+ )
1507
+ if "filebase_secret_key" in params and not isinstance(
1508
+ params["filebase_secret_key"], str
1509
+ ):
1510
+ raise InvalidParameterError(
1511
+ "Bad parameter: filebase_secret_key must be an str"
1512
+ )
1513
+ if "google_cloud_storage_credentials_json" in params and not isinstance(
1514
+ params["google_cloud_storage_credentials_json"], str
1515
+ ):
1516
+ raise InvalidParameterError(
1517
+ "Bad parameter: google_cloud_storage_credentials_json must be an str"
1518
+ )
1519
+ if (
1520
+ "google_cloud_storage_s3_compatible_secret_key" in params
1521
+ and not isinstance(
1522
+ params["google_cloud_storage_s3_compatible_secret_key"], str
1523
+ )
1524
+ ):
1525
+ raise InvalidParameterError(
1526
+ "Bad parameter: google_cloud_storage_s3_compatible_secret_key must be an str"
1527
+ )
1528
+ if "linode_secret_key" in params and not isinstance(
1529
+ params["linode_secret_key"], str
1530
+ ):
1531
+ raise InvalidParameterError(
1532
+ "Bad parameter: linode_secret_key must be an str"
1533
+ )
1534
+ if "s3_compatible_secret_key" in params and not isinstance(
1535
+ params["s3_compatible_secret_key"], str
1536
+ ):
1537
+ raise InvalidParameterError(
1538
+ "Bad parameter: s3_compatible_secret_key must be an str"
1539
+ )
1540
+ if "wasabi_secret_key" in params and not isinstance(
1541
+ params["wasabi_secret_key"], str
1542
+ ):
1543
+ raise InvalidParameterError(
1544
+ "Bad parameter: wasabi_secret_key must be an str"
1545
+ )
1546
+ if "aws_access_key" in params and not isinstance(
1547
+ params["aws_access_key"], str
1548
+ ):
1549
+ raise InvalidParameterError(
1550
+ "Bad parameter: aws_access_key must be an str"
1551
+ )
1552
+ if "azure_blob_storage_account" in params and not isinstance(
1553
+ params["azure_blob_storage_account"], str
1554
+ ):
1555
+ raise InvalidParameterError(
1556
+ "Bad parameter: azure_blob_storage_account must be an str"
1557
+ )
1558
+ if "azure_blob_storage_container" in params and not isinstance(
1559
+ params["azure_blob_storage_container"], str
1560
+ ):
1561
+ raise InvalidParameterError(
1562
+ "Bad parameter: azure_blob_storage_container must be an str"
1563
+ )
1564
+ if "azure_blob_storage_dns_suffix" in params and not isinstance(
1565
+ params["azure_blob_storage_dns_suffix"], str
1566
+ ):
1567
+ raise InvalidParameterError(
1568
+ "Bad parameter: azure_blob_storage_dns_suffix must be an str"
1569
+ )
1570
+ if (
1571
+ "azure_blob_storage_hierarchical_namespace" in params
1572
+ and not isinstance(
1573
+ params["azure_blob_storage_hierarchical_namespace"], bool
1574
+ )
1575
+ ):
1576
+ raise InvalidParameterError(
1577
+ "Bad parameter: azure_blob_storage_hierarchical_namespace must be an bool"
1578
+ )
1579
+ if "azure_files_storage_account" in params and not isinstance(
1580
+ params["azure_files_storage_account"], str
1581
+ ):
1582
+ raise InvalidParameterError(
1583
+ "Bad parameter: azure_files_storage_account must be an str"
1584
+ )
1585
+ if "azure_files_storage_dns_suffix" in params and not isinstance(
1586
+ params["azure_files_storage_dns_suffix"], str
1587
+ ):
1588
+ raise InvalidParameterError(
1589
+ "Bad parameter: azure_files_storage_dns_suffix must be an str"
1590
+ )
1591
+ if "azure_files_storage_share_name" in params and not isinstance(
1592
+ params["azure_files_storage_share_name"], str
1593
+ ):
1594
+ raise InvalidParameterError(
1595
+ "Bad parameter: azure_files_storage_share_name must be an str"
1596
+ )
1597
+ if "backblaze_b2_bucket" in params and not isinstance(
1598
+ params["backblaze_b2_bucket"], str
1599
+ ):
1600
+ raise InvalidParameterError(
1601
+ "Bad parameter: backblaze_b2_bucket must be an str"
1602
+ )
1603
+ if "backblaze_b2_s3_endpoint" in params and not isinstance(
1604
+ params["backblaze_b2_s3_endpoint"], str
1605
+ ):
1606
+ raise InvalidParameterError(
1607
+ "Bad parameter: backblaze_b2_s3_endpoint must be an str"
1608
+ )
1609
+ if "buffer_uploads" in params and not isinstance(
1610
+ params["buffer_uploads"], str
1611
+ ):
1612
+ raise InvalidParameterError(
1613
+ "Bad parameter: buffer_uploads must be an str"
1614
+ )
1615
+ if "cloudflare_access_key" in params and not isinstance(
1616
+ params["cloudflare_access_key"], str
1617
+ ):
1618
+ raise InvalidParameterError(
1619
+ "Bad parameter: cloudflare_access_key must be an str"
1620
+ )
1621
+ if "cloudflare_bucket" in params and not isinstance(
1622
+ params["cloudflare_bucket"], str
1623
+ ):
1624
+ raise InvalidParameterError(
1625
+ "Bad parameter: cloudflare_bucket must be an str"
1626
+ )
1627
+ if "cloudflare_endpoint" in params and not isinstance(
1628
+ params["cloudflare_endpoint"], str
1629
+ ):
1630
+ raise InvalidParameterError(
1631
+ "Bad parameter: cloudflare_endpoint must be an str"
1632
+ )
1633
+ if "description" in params and not isinstance(params["description"], str):
1634
+ raise InvalidParameterError(
1635
+ "Bad parameter: description must be an str"
1636
+ )
1637
+ if "dropbox_teams" in params and not isinstance(
1638
+ params["dropbox_teams"], bool
1639
+ ):
1640
+ raise InvalidParameterError(
1641
+ "Bad parameter: dropbox_teams must be an bool"
1642
+ )
1643
+ if "enable_dedicated_ips" in params and not isinstance(
1644
+ params["enable_dedicated_ips"], bool
1645
+ ):
1646
+ raise InvalidParameterError(
1647
+ "Bad parameter: enable_dedicated_ips must be an bool"
1648
+ )
1649
+ if "filebase_access_key" in params and not isinstance(
1650
+ params["filebase_access_key"], str
1651
+ ):
1652
+ raise InvalidParameterError(
1653
+ "Bad parameter: filebase_access_key must be an str"
1654
+ )
1655
+ if "filebase_bucket" in params and not isinstance(
1656
+ params["filebase_bucket"], str
1657
+ ):
1658
+ raise InvalidParameterError(
1659
+ "Bad parameter: filebase_bucket must be an str"
1660
+ )
1661
+ if "files_agent_permission_set" in params and not isinstance(
1662
+ params["files_agent_permission_set"], str
1663
+ ):
1664
+ raise InvalidParameterError(
1665
+ "Bad parameter: files_agent_permission_set must be an str"
1666
+ )
1667
+ if "files_agent_root" in params and not isinstance(
1668
+ params["files_agent_root"], str
1669
+ ):
1670
+ raise InvalidParameterError(
1671
+ "Bad parameter: files_agent_root must be an str"
1672
+ )
1673
+ if "files_agent_version" in params and not isinstance(
1674
+ params["files_agent_version"], str
1675
+ ):
1676
+ raise InvalidParameterError(
1677
+ "Bad parameter: files_agent_version must be an str"
1678
+ )
1679
+ if "outbound_agent_id" in params and not isinstance(
1680
+ params["outbound_agent_id"], int
1681
+ ):
1682
+ raise InvalidParameterError(
1683
+ "Bad parameter: outbound_agent_id must be an int"
1684
+ )
1685
+ if "google_cloud_storage_bucket" in params and not isinstance(
1686
+ params["google_cloud_storage_bucket"], str
1687
+ ):
1688
+ raise InvalidParameterError(
1689
+ "Bad parameter: google_cloud_storage_bucket must be an str"
1690
+ )
1691
+ if "google_cloud_storage_project_id" in params and not isinstance(
1692
+ params["google_cloud_storage_project_id"], str
1693
+ ):
1694
+ raise InvalidParameterError(
1695
+ "Bad parameter: google_cloud_storage_project_id must be an str"
1696
+ )
1697
+ if (
1698
+ "google_cloud_storage_s3_compatible_access_key" in params
1699
+ and not isinstance(
1700
+ params["google_cloud_storage_s3_compatible_access_key"], str
1701
+ )
1702
+ ):
1703
+ raise InvalidParameterError(
1704
+ "Bad parameter: google_cloud_storage_s3_compatible_access_key must be an str"
1705
+ )
1706
+ if "hostname" in params and not isinstance(params["hostname"], str):
1707
+ raise InvalidParameterError("Bad parameter: hostname must be an str")
1708
+ if "linode_access_key" in params and not isinstance(
1709
+ params["linode_access_key"], str
1710
+ ):
1711
+ raise InvalidParameterError(
1712
+ "Bad parameter: linode_access_key must be an str"
1713
+ )
1714
+ if "linode_bucket" in params and not isinstance(
1715
+ params["linode_bucket"], str
1716
+ ):
1717
+ raise InvalidParameterError(
1718
+ "Bad parameter: linode_bucket must be an str"
1719
+ )
1720
+ if "linode_region" in params and not isinstance(
1721
+ params["linode_region"], str
1722
+ ):
1723
+ raise InvalidParameterError(
1724
+ "Bad parameter: linode_region must be an str"
1725
+ )
1726
+ if "max_connections" in params and not isinstance(
1727
+ params["max_connections"], int
1728
+ ):
1729
+ raise InvalidParameterError(
1730
+ "Bad parameter: max_connections must be an int"
1731
+ )
1732
+ if "name" in params and not isinstance(params["name"], str):
1733
+ raise InvalidParameterError("Bad parameter: name must be an str")
1734
+ if "one_drive_account_type" in params and not isinstance(
1735
+ params["one_drive_account_type"], str
1736
+ ):
1737
+ raise InvalidParameterError(
1738
+ "Bad parameter: one_drive_account_type must be an str"
1739
+ )
1740
+ if "pin_to_site_region" in params and not isinstance(
1741
+ params["pin_to_site_region"], bool
1742
+ ):
1743
+ raise InvalidParameterError(
1744
+ "Bad parameter: pin_to_site_region must be an bool"
1745
+ )
1746
+ if "port" in params and not isinstance(params["port"], int):
1747
+ raise InvalidParameterError("Bad parameter: port must be an int")
1748
+ if "remote_server_credential_id" in params and not isinstance(
1749
+ params["remote_server_credential_id"], int
1750
+ ):
1751
+ raise InvalidParameterError(
1752
+ "Bad parameter: remote_server_credential_id must be an int"
1753
+ )
1754
+ if "s3_bucket" in params and not isinstance(params["s3_bucket"], str):
1755
+ raise InvalidParameterError("Bad parameter: s3_bucket must be an str")
1756
+ if "s3_compatible_access_key" in params and not isinstance(
1757
+ params["s3_compatible_access_key"], str
1758
+ ):
1759
+ raise InvalidParameterError(
1760
+ "Bad parameter: s3_compatible_access_key must be an str"
1761
+ )
1762
+ if "s3_compatible_bucket" in params and not isinstance(
1763
+ params["s3_compatible_bucket"], str
1764
+ ):
1765
+ raise InvalidParameterError(
1766
+ "Bad parameter: s3_compatible_bucket must be an str"
1767
+ )
1768
+ if "s3_compatible_endpoint" in params and not isinstance(
1769
+ params["s3_compatible_endpoint"], str
1770
+ ):
1771
+ raise InvalidParameterError(
1772
+ "Bad parameter: s3_compatible_endpoint must be an str"
1773
+ )
1774
+ if "s3_compatible_region" in params and not isinstance(
1775
+ params["s3_compatible_region"], str
1776
+ ):
1777
+ raise InvalidParameterError(
1778
+ "Bad parameter: s3_compatible_region must be an str"
1779
+ )
1780
+ if "s3_region" in params and not isinstance(params["s3_region"], str):
1781
+ raise InvalidParameterError("Bad parameter: s3_region must be an str")
1782
+ if "server_certificate" in params and not isinstance(
1783
+ params["server_certificate"], str
1784
+ ):
1785
+ raise InvalidParameterError(
1786
+ "Bad parameter: server_certificate must be an str"
1787
+ )
1788
+ if "server_host_key" in params and not isinstance(
1789
+ params["server_host_key"], str
1790
+ ):
1791
+ raise InvalidParameterError(
1792
+ "Bad parameter: server_host_key must be an str"
1793
+ )
1794
+ if "server_type" in params and not isinstance(params["server_type"], str):
1795
+ raise InvalidParameterError(
1796
+ "Bad parameter: server_type must be an str"
1797
+ )
1798
+ if "ssl" in params and not isinstance(params["ssl"], str):
1799
+ raise InvalidParameterError("Bad parameter: ssl must be an str")
1800
+ if "username" in params and not isinstance(params["username"], str):
1801
+ raise InvalidParameterError("Bad parameter: username must be an str")
1802
+ if "wasabi_access_key" in params and not isinstance(
1803
+ params["wasabi_access_key"], str
1804
+ ):
1805
+ raise InvalidParameterError(
1806
+ "Bad parameter: wasabi_access_key must be an str"
1807
+ )
1808
+ if "wasabi_bucket" in params and not isinstance(
1809
+ params["wasabi_bucket"], str
1810
+ ):
1811
+ raise InvalidParameterError(
1812
+ "Bad parameter: wasabi_bucket must be an str"
1813
+ )
1814
+ if "wasabi_region" in params and not isinstance(
1815
+ params["wasabi_region"], str
1816
+ ):
1817
+ raise InvalidParameterError(
1818
+ "Bad parameter: wasabi_region must be an str"
1819
+ )
1820
+ if "id" not in params:
1821
+ raise MissingParameterError("Parameter missing: id")
1822
+ response, options = Api.send_request(
1823
+ "PATCH",
1824
+ "/remote_servers/{id}".format(id=params["id"]),
1825
+ params,
1826
+ options,
1827
+ )
1828
+ return RemoteServer(response.data, options)
1829
+
1830
+
1831
+ def delete(id, params=None, options=None):
1832
+ if not isinstance(params, dict):
1833
+ params = {}
1834
+ if not isinstance(options, dict):
1835
+ options = {}
1836
+ params["id"] = id
1837
+ if "id" in params and not isinstance(params["id"], int):
1838
+ raise InvalidParameterError("Bad parameter: id must be an int")
1839
+ if "id" not in params:
1840
+ raise MissingParameterError("Parameter missing: id")
1841
+ Api.send_request(
1842
+ "DELETE",
1843
+ "/remote_servers/{id}".format(id=params["id"]),
1844
+ params,
1845
+ options,
1846
+ )
1847
+
1848
+
1849
+ def destroy(id, params=None, options=None):
1850
+ delete(id, params, options)
1851
+
1852
+
1853
+ def new(*args, **kwargs):
1854
+ return RemoteServer(*args, **kwargs)