Class: Files::RemoteMountBackend
- Inherits:
-
Object
- Object
- Files::RemoteMountBackend
- Defined in:
- lib/files.com/models/remote_mount_backend.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
- .all(params = {}, options = {}) ⇒ Object
-
.create(params = {}, options = {}) ⇒ Object
Parameters: enabled - boolean - True if this backend is enabled.
- .delete(id, params = {}, options = {}) ⇒ Object
- .destroy(id, params = {}, options = {}) ⇒ Object
-
.find(id, params = {}, options = {}) ⇒ Object
Parameters: id (required) - int64 - Remote Mount Backend ID.
- .get(id, params = {}, options = {}) ⇒ Object
-
.list(params = {}, options = {}) ⇒ Object
Parameters: cursor - string - Used for pagination.
-
.reset_status(id, params = {}, options = {}) ⇒ Object
Reset backend status to healthy.
-
.update(id, params = {}, options = {}) ⇒ Object
Parameters: enabled - boolean - True if this backend is enabled.
Instance Method Summary collapse
-
#canary_file_path ⇒ Object
string - Path to the canary file used for health checks.
- #canary_file_path=(value) ⇒ Object
- #delete(params = {}) ⇒ Object
- #destroy(params = {}) ⇒ Object
-
#enabled ⇒ Object
boolean - True if this backend is enabled.
- #enabled=(value) ⇒ Object
-
#fall ⇒ Object
int64 - Number of consecutive failures before considering the backend unhealthy.
- #fall=(value) ⇒ Object
-
#health_check_enabled ⇒ Object
boolean - True if health checks are enabled for this backend.
- #health_check_enabled=(value) ⇒ Object
-
#health_check_results ⇒ Object
array(object) - Array of recent health check results.
- #health_check_results=(value) ⇒ Object
-
#health_check_type ⇒ Object
string - Type of health check to perform.
- #health_check_type=(value) ⇒ Object
-
#id ⇒ Object
int64 - Unique identifier for this backend.
- #id=(value) ⇒ Object
-
#initialize(attributes = {}, options = {}) ⇒ RemoteMountBackend
constructor
A new instance of RemoteMountBackend.
-
#interval ⇒ Object
int64 - Interval in seconds between health checks.
- #interval=(value) ⇒ Object
-
#min_free_cpu ⇒ Object
decimal - Minimum free CPU percentage required for this backend to be considered healthy.
- #min_free_cpu=(value) ⇒ Object
-
#min_free_mem ⇒ Object
decimal - Minimum free memory percentage required for this backend to be considered healthy.
- #min_free_mem=(value) ⇒ Object
-
#priority ⇒ Object
int64 - Priority of this backend.
- #priority=(value) ⇒ Object
-
#remote_path ⇒ Object
string - Path on the remote server to treat as the root of this mount.
- #remote_path=(value) ⇒ Object
-
#remote_server_id ⇒ Object
int64 - The remote server that this backend is associated with.
- #remote_server_id=(value) ⇒ Object
-
#remote_server_mount_id ⇒ Object
int64 - The mount ID of the Remote Server Mount that this backend is associated with.
- #remote_server_mount_id=(value) ⇒ Object
-
#reset_status(params = {}) ⇒ Object
Reset backend status to healthy.
-
#rise ⇒ Object
int64 - Number of consecutive successes before considering the backend healthy.
- #rise=(value) ⇒ Object
- #save ⇒ Object
-
#status ⇒ Object
string - Status of this backend.
- #status=(value) ⇒ Object
-
#undergoing_maintenance ⇒ Object
boolean - True if this backend is undergoing maintenance.
- #undergoing_maintenance=(value) ⇒ Object
-
#update(params = {}) ⇒ Object
Parameters: enabled - boolean - True if this backend is enabled.
Constructor Details
#initialize(attributes = {}, options = {}) ⇒ RemoteMountBackend
Returns a new instance of RemoteMountBackend.
9 10 11 12 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 9 def initialize(attributes = {}, = {}) @attributes = attributes || {} @options = || {} end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
7 8 9 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 7 def attributes @attributes end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
7 8 9 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 7 def @options end |
Class Method Details
.all(params = {}, options = {}) ⇒ Object
255 256 257 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 255 def self.all(params = {}, = {}) list(params, ) end |
.create(params = {}, options = {}) ⇒ Object
Parameters:
enabled - boolean - True if this backend is enabled.
fall - int64 - Number of consecutive failures before considering the backend unhealthy.
health_check_enabled - boolean - True if health checks are enabled for this backend.
health_check_type - string - Type of health check to perform.
interval - int64 - Interval in seconds between health checks.
min_free_cpu - double - Minimum free CPU percentage required for this backend to be considered healthy.
min_free_mem - double - Minimum free memory percentage required for this backend to be considered healthy.
priority - int64 - Priority of this backend.
remote_path - string - Path on the remote server to treat as the root of this mount.
rise - int64 - Number of consecutive successes before considering the backend healthy.
canary_file_path (required) - string - Path to the canary file used for health checks.
remote_server_mount_id (required) - int64 - The mount ID of the Remote Server Mount that this backend is associated with.
remote_server_id (required) - int64 - The remote server that this backend is associated with.
289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 289 def self.create(params = {}, = {}) raise InvalidParameterError.new("Bad parameter: fall must be an Integer") if params[:fall] and !params[:fall].is_a?(Integer) raise InvalidParameterError.new("Bad parameter: health_check_type must be an String") if params[:health_check_type] and !params[:health_check_type].is_a?(String) raise InvalidParameterError.new("Bad parameter: interval must be an Integer") if params[:interval] and !params[:interval].is_a?(Integer) raise InvalidParameterError.new("Bad parameter: min_free_cpu must be an Float") if params[:min_free_cpu] and !params[:min_free_cpu].is_a?(Float) raise InvalidParameterError.new("Bad parameter: min_free_mem must be an Float") if params[:min_free_mem] and !params[:min_free_mem].is_a?(Float) raise InvalidParameterError.new("Bad parameter: priority must be an Integer") if params[:priority] and !params[:priority].is_a?(Integer) raise InvalidParameterError.new("Bad parameter: remote_path must be an String") if params[:remote_path] and !params[:remote_path].is_a?(String) raise InvalidParameterError.new("Bad parameter: rise must be an Integer") if params[:rise] and !params[:rise].is_a?(Integer) raise InvalidParameterError.new("Bad parameter: canary_file_path must be an String") if params[:canary_file_path] and !params[:canary_file_path].is_a?(String) raise InvalidParameterError.new("Bad parameter: remote_server_mount_id must be an Integer") if params[:remote_server_mount_id] and !params[:remote_server_mount_id].is_a?(Integer) raise InvalidParameterError.new("Bad parameter: remote_server_id must be an Integer") if params[:remote_server_id] and !params[:remote_server_id].is_a?(Integer) raise MissingParameterError.new("Parameter missing: canary_file_path") unless params[:canary_file_path] raise MissingParameterError.new("Parameter missing: remote_server_mount_id") unless params[:remote_server_mount_id] raise MissingParameterError.new("Parameter missing: remote_server_id") unless params[:remote_server_id] response, = Api.send_request("/remote_mount_backends", :post, params, ) RemoteMountBackend.new(response.data, ) end |
.delete(id, params = {}, options = {}) ⇒ Object
353 354 355 356 357 358 359 360 361 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 353 def self.delete(id, params = {}, = {}) params ||= {} params[:id] = id raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer) raise MissingParameterError.new("Parameter missing: id") unless params[:id] Api.send_request("/remote_mount_backends/#{params[:id]}", :delete, params, ) nil end |
.destroy(id, params = {}, options = {}) ⇒ Object
363 364 365 366 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 363 def self.destroy(id, params = {}, = {}) delete(id, params, ) nil end |
.find(id, params = {}, options = {}) ⇒ Object
Parameters:
id (required) - int64 - Remote Mount Backend ID.
261 262 263 264 265 266 267 268 269 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 261 def self.find(id, params = {}, = {}) params ||= {} params[:id] = id raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer) raise MissingParameterError.new("Parameter missing: id") unless params[:id] response, = Api.send_request("/remote_mount_backends/#{params[:id]}", :get, params, ) RemoteMountBackend.new(response.data, ) end |
.get(id, params = {}, options = {}) ⇒ Object
271 272 273 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 271 def self.get(id, params = {}, = {}) find(id, params, ) end |
.list(params = {}, options = {}) ⇒ Object
Parameters:
cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `remote_server_mount_id`.
245 246 247 248 249 250 251 252 253 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 245 def self.list(params = {}, = {}) raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String) raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer) raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params[:filter] and !params[:filter].is_a?(Hash) List.new(RemoteMountBackend, params) do Api.send_request("/remote_mount_backends", :get, params, ) end end |
.reset_status(id, params = {}, options = {}) ⇒ Object
Reset backend status to healthy
310 311 312 313 314 315 316 317 318 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 310 def self.reset_status(id, params = {}, = {}) params ||= {} params[:id] = id raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer) raise MissingParameterError.new("Parameter missing: id") unless params[:id] Api.send_request("/remote_mount_backends/#{params[:id]}/reset_status", :post, params, ) nil end |
.update(id, params = {}, options = {}) ⇒ Object
Parameters:
enabled - boolean - True if this backend is enabled.
fall - int64 - Number of consecutive failures before considering the backend unhealthy.
health_check_enabled - boolean - True if health checks are enabled for this backend.
health_check_type - string - Type of health check to perform.
interval - int64 - Interval in seconds between health checks.
min_free_cpu - double - Minimum free CPU percentage required for this backend to be considered healthy.
min_free_mem - double - Minimum free memory percentage required for this backend to be considered healthy.
priority - int64 - Priority of this backend.
remote_path - string - Path on the remote server to treat as the root of this mount.
rise - int64 - Number of consecutive successes before considering the backend healthy.
canary_file_path - string - Path to the canary file used for health checks.
remote_server_id - int64 - The remote server that this backend is associated with.
333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 333 def self.update(id, params = {}, = {}) params ||= {} params[:id] = id raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer) raise InvalidParameterError.new("Bad parameter: fall must be an Integer") if params[:fall] and !params[:fall].is_a?(Integer) raise InvalidParameterError.new("Bad parameter: health_check_type must be an String") if params[:health_check_type] and !params[:health_check_type].is_a?(String) raise InvalidParameterError.new("Bad parameter: interval must be an Integer") if params[:interval] and !params[:interval].is_a?(Integer) raise InvalidParameterError.new("Bad parameter: min_free_cpu must be an Float") if params[:min_free_cpu] and !params[:min_free_cpu].is_a?(Float) raise InvalidParameterError.new("Bad parameter: min_free_mem must be an Float") if params[:min_free_mem] and !params[:min_free_mem].is_a?(Float) raise InvalidParameterError.new("Bad parameter: priority must be an Integer") if params[:priority] and !params[:priority].is_a?(Integer) raise InvalidParameterError.new("Bad parameter: remote_path must be an String") if params[:remote_path] and !params[:remote_path].is_a?(String) raise InvalidParameterError.new("Bad parameter: rise must be an Integer") if params[:rise] and !params[:rise].is_a?(Integer) raise InvalidParameterError.new("Bad parameter: canary_file_path must be an String") if params[:canary_file_path] and !params[:canary_file_path].is_a?(String) raise InvalidParameterError.new("Bad parameter: remote_server_id must be an Integer") if params[:remote_server_id] and !params[:remote_server_id].is_a?(Integer) raise MissingParameterError.new("Parameter missing: id") unless params[:id] response, = Api.send_request("/remote_mount_backends/#{params[:id]}", :patch, params, ) RemoteMountBackend.new(response.data, ) end |
Instance Method Details
#canary_file_path ⇒ Object
string - Path to the canary file used for health checks.
15 16 17 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 15 def canary_file_path @attributes[:canary_file_path] end |
#canary_file_path=(value) ⇒ Object
19 20 21 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 19 def canary_file_path=(value) @attributes[:canary_file_path] = value end |
#delete(params = {}) ⇒ Object
215 216 217 218 219 220 221 222 223 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 215 def delete(params = {}) params ||= {} params[:id] = @attributes[:id] raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id] raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer) raise MissingParameterError.new("Parameter missing: id") unless params[:id] Api.send_request("/remote_mount_backends/#{@attributes[:id]}", :delete, params, @options) end |
#destroy(params = {}) ⇒ Object
225 226 227 228 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 225 def destroy(params = {}) delete(params) nil end |
#enabled ⇒ Object
boolean - True if this backend is enabled.
24 25 26 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 24 def enabled @attributes[:enabled] end |
#enabled=(value) ⇒ Object
28 29 30 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 28 def enabled=(value) @attributes[:enabled] = value end |
#fall ⇒ Object
int64 - Number of consecutive failures before considering the backend unhealthy.
33 34 35 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 33 def fall @attributes[:fall] end |
#fall=(value) ⇒ Object
37 38 39 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 37 def fall=(value) @attributes[:fall] = value end |
#health_check_enabled ⇒ Object
boolean - True if health checks are enabled for this backend.
42 43 44 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 42 def health_check_enabled @attributes[:health_check_enabled] end |
#health_check_enabled=(value) ⇒ Object
46 47 48 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 46 def health_check_enabled=(value) @attributes[:health_check_enabled] = value end |
#health_check_results ⇒ Object
array(object) - Array of recent health check results.
51 52 53 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 51 def health_check_results @attributes[:health_check_results] end |
#health_check_results=(value) ⇒ Object
55 56 57 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 55 def health_check_results=(value) @attributes[:health_check_results] = value end |
#health_check_type ⇒ Object
string - Type of health check to perform.
60 61 62 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 60 def health_check_type @attributes[:health_check_type] end |
#health_check_type=(value) ⇒ Object
64 65 66 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 64 def health_check_type=(value) @attributes[:health_check_type] = value end |
#id ⇒ Object
int64 - Unique identifier for this backend.
69 70 71 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 69 def id @attributes[:id] end |
#id=(value) ⇒ Object
73 74 75 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 73 def id=(value) @attributes[:id] = value end |
#interval ⇒ Object
int64 - Interval in seconds between health checks.
78 79 80 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 78 def interval @attributes[:interval] end |
#interval=(value) ⇒ Object
82 83 84 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 82 def interval=(value) @attributes[:interval] = value end |
#min_free_cpu ⇒ Object
decimal - Minimum free CPU percentage required for this backend to be considered healthy.
87 88 89 90 91 92 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 87 def min_free_cpu value = @attributes[:min_free_cpu] return value if value.nil? || value.is_a?(BigDecimal) BigDecimal(value.to_s) end |
#min_free_cpu=(value) ⇒ Object
94 95 96 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 94 def min_free_cpu=(value) @attributes[:min_free_cpu] = value end |
#min_free_mem ⇒ Object
decimal - Minimum free memory percentage required for this backend to be considered healthy.
99 100 101 102 103 104 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 99 def min_free_mem value = @attributes[:min_free_mem] return value if value.nil? || value.is_a?(BigDecimal) BigDecimal(value.to_s) end |
#min_free_mem=(value) ⇒ Object
106 107 108 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 106 def min_free_mem=(value) @attributes[:min_free_mem] = value end |
#priority ⇒ Object
int64 - Priority of this backend.
111 112 113 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 111 def priority @attributes[:priority] end |
#priority=(value) ⇒ Object
115 116 117 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 115 def priority=(value) @attributes[:priority] = value end |
#remote_path ⇒ Object
string - Path on the remote server to treat as the root of this mount.
120 121 122 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 120 def remote_path @attributes[:remote_path] end |
#remote_path=(value) ⇒ Object
124 125 126 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 124 def remote_path=(value) @attributes[:remote_path] = value end |
#remote_server_id ⇒ Object
int64 - The remote server that this backend is associated with.
129 130 131 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 129 def remote_server_id @attributes[:remote_server_id] end |
#remote_server_id=(value) ⇒ Object
133 134 135 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 133 def remote_server_id=(value) @attributes[:remote_server_id] = value end |
#remote_server_mount_id ⇒ Object
int64 - The mount ID of the Remote Server Mount that this backend is associated with.
138 139 140 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 138 def remote_server_mount_id @attributes[:remote_server_mount_id] end |
#remote_server_mount_id=(value) ⇒ Object
142 143 144 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 142 def remote_server_mount_id=(value) @attributes[:remote_server_mount_id] = value end |
#reset_status(params = {}) ⇒ Object
Reset backend status to healthy
174 175 176 177 178 179 180 181 182 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 174 def reset_status(params = {}) params ||= {} params[:id] = @attributes[:id] raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id] raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer) raise MissingParameterError.new("Parameter missing: id") unless params[:id] Api.send_request("/remote_mount_backends/#{@attributes[:id]}/reset_status", :post, params, @options) end |
#rise ⇒ Object
int64 - Number of consecutive successes before considering the backend healthy.
147 148 149 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 147 def rise @attributes[:rise] end |
#rise=(value) ⇒ Object
151 152 153 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 151 def rise=(value) @attributes[:rise] = value end |
#save ⇒ Object
230 231 232 233 234 235 236 237 238 239 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 230 def save if @attributes[:id] new_obj = update(@attributes) else new_obj = RemoteMountBackend.create(@attributes, @options) end @attributes = new_obj.attributes true end |
#status ⇒ Object
string - Status of this backend.
156 157 158 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 156 def status @attributes[:status] end |
#status=(value) ⇒ Object
160 161 162 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 160 def status=(value) @attributes[:status] = value end |
#undergoing_maintenance ⇒ Object
boolean - True if this backend is undergoing maintenance.
165 166 167 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 165 def undergoing_maintenance @attributes[:undergoing_maintenance] end |
#undergoing_maintenance=(value) ⇒ Object
169 170 171 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 169 def undergoing_maintenance=(value) @attributes[:undergoing_maintenance] = value end |
#update(params = {}) ⇒ Object
Parameters:
enabled - boolean - True if this backend is enabled.
fall - int64 - Number of consecutive failures before considering the backend unhealthy.
health_check_enabled - boolean - True if health checks are enabled for this backend.
health_check_type - string - Type of health check to perform.
interval - int64 - Interval in seconds between health checks.
min_free_cpu - double - Minimum free CPU percentage required for this backend to be considered healthy.
min_free_mem - double - Minimum free memory percentage required for this backend to be considered healthy.
priority - int64 - Priority of this backend.
remote_path - string - Path on the remote server to treat as the root of this mount.
rise - int64 - Number of consecutive successes before considering the backend healthy.
canary_file_path - string - Path to the canary file used for health checks.
remote_server_id - int64 - The remote server that this backend is associated with.
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 |
# File 'lib/files.com/models/remote_mount_backend.rb', line 197 def update(params = {}) params ||= {} params[:id] = @attributes[:id] raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id] raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer) raise InvalidParameterError.new("Bad parameter: fall must be an Integer") if params[:fall] and !params[:fall].is_a?(Integer) raise InvalidParameterError.new("Bad parameter: health_check_type must be an String") if params[:health_check_type] and !params[:health_check_type].is_a?(String) raise InvalidParameterError.new("Bad parameter: interval must be an Integer") if params[:interval] and !params[:interval].is_a?(Integer) raise InvalidParameterError.new("Bad parameter: priority must be an Integer") if params[:priority] and !params[:priority].is_a?(Integer) raise InvalidParameterError.new("Bad parameter: remote_path must be an String") if params[:remote_path] and !params[:remote_path].is_a?(String) raise InvalidParameterError.new("Bad parameter: rise must be an Integer") if params[:rise] and !params[:rise].is_a?(Integer) raise InvalidParameterError.new("Bad parameter: canary_file_path must be an String") if params[:canary_file_path] and !params[:canary_file_path].is_a?(String) raise InvalidParameterError.new("Bad parameter: remote_server_id must be an Integer") if params[:remote_server_id] and !params[:remote_server_id].is_a?(Integer) raise MissingParameterError.new("Parameter missing: id") unless params[:id] Api.send_request("/remote_mount_backends/#{@attributes[:id]}", :patch, params, @options) end |