Shared Storages¶
-
OneAndOne::SharedStorage()
The
SharedStorage
class allows a user to perform actions against the 1and1 API.-
list
(page: nil, per_page: nil, sort: nil, q: nil, fields: nil)¶ Return a list of all shared storages.
Parameters: - page (
int
) – Allows the use of pagination. Indicate which page to start on. - per_page (
int
) – Number of items per page. - sort (
str
) –sort: 'name'
retrieves a list of elements sorted alphabetically.sort: 'creation_date'
retrieves a list of elements sorted by their creation date in descending order. - q (
str
) –q
is for query. Use this parameter to return only the items that match your search query. - fields (
str
) – Returns only the parameters requested. (i.e. fields: ‘id, name, description, hardware.ram’)
Return type: JSON
- page (
-
create
(name: nil, description: nil, size: nil)¶ Create a shared storage.
Parameters: - name (
str
) – shared storage name. - description (
str
) – shared storage description. - size (
int
) – shared storage size.
Return type: JSON
- name (
-
get
(shared_storage_id: @id)¶ Returns a shared storage’s current specs.
Parameters: - shared_storage_id (
str
) – the unique identifier for the shared storage.
Return type: JSON
- shared_storage_id (
-
modify
(shared_storage_id: @id, name: nil, description: nil, size: nil)¶ Modify a shared storage.
Parameters: - shared_storage_id (
str
) – the unique identifier for the shared storage. - name (
str
) – shared storage name. - description (
str
) – shared storage description. - size (
int
) – shared storage size. Must be a multiple of50
.
Return type: JSON
- shared_storage_id (
-
delete
(shared_storage_id: @id)¶ Delete a shared storage.
Parameters: - shared_storage_id (
str
) – the unique identifier for the shared storage.
Return type: JSON
- shared_storage_id (
-
add_servers
(shared_storage_id: @id, servers: nil)¶ Add servers to a shared storage.
Parameters: - shared_storage_id (
str
) – the unique identifier for the shared storage. - servers (
array
) – an array of server hashes.
Return type: JSON
- shared_storage_id (
-
servers
(shared_storage_id: @id)¶ List a shared storage’s servers.
Parameters: - shared_storage_id (
str
) – the unique identifier for the shared storage.
Return type: JSON
- shared_storage_id (
-
server
(shared_storage_id: @id, server_id: nil)¶ Returns information about a shared storage’s server.
Parameters: - shared_storage_id (
str
) – the unique identifier for the shared storage. - server_id (
str
) – the unique identifier for the server.
Return type: JSON
- shared_storage_id (
-
remove_server
(shared_storage_id: @id, server_id: nil)¶ Remove a server from a shared storage.
Parameters: - shared_storage_id (
str
) – the unique identifier for the shared storage. - server_id (
str
) – the unique identifier for the server.
Return type: JSON
- shared_storage_id (
-
access
()¶ Retrieve the credentials for accessing shared storages.
Return type: JSON
-
change_password
(password: nil)¶ Change the password for accessing shared storages.
Parameters: - password (
str
) – new shared storage password.
Return type: JSON
- password (
-
wait_for
()¶ Polls the shared storage until an “ACTIVE” state is returned. Use this when chaining actions.
Return type: nil
-