API Methods for dealing with servers
Describes the server returning a dictionary.
Parameters: | name (String) – Name of the service. Service names are 1-64 characters A-Z, a-z, 0-9, -, . and _. Ensure this value has at most 64 characters. |
---|---|
Returns: | A dictionary with the following keys:
|
The keys as described in service.info() will also be returned.
List all the servers for an account.
If the status isn’t passed in then it will find all the servers with status=LIVE.
Parameters: | status (String, Optional) – Status of the server to look for. Acceptable values: ‘LIVE’, ‘CANCELLED’. |
---|---|
Returns: | Returns a list of dictionaries where each dictionary is as described in func:server_info. |
Moves a list of public IPv4 address from one server to another.
This cannot be used to move IPs that are private, or where the source or destination server are in assigned to a load balancer.
The list of IPs will need to be configured on the host once the job has completed.
If the destination host is a Linux Miniserver, the IPs can be automatically applied by triggering a reboot with server.reboot().
Please note that if the destination host is a Miniserver without a vLAN, it will require a reboot using server.reboot() for the new IPs to be routed correctly.
The source and destination servers will be unavailable for a short period during this move.
Parameters: |
|
---|---|
Returns: | A dictionary as described in job.status(). |
Raises : | ApiErrorDoesNotExist if the destination_name or any ip in source_ips cannot be found. ApiErrorBadParameters if an empty list of IPs is provided. ApiErrorPreconditionFailed will be raised if:
|
Schedules a reboot for name
Parameters: |
|
---|---|
Returns: | A dictionary as described in job.status(). |
Raises : | May raise ApiErrorAlreadyInProgress if a reboot is pending already. |
Schedules re-imaging of name.
Parameters: |
|
---|---|
Returns: | A dictionary as described in job.status(). |
Raises : | May raise one of the following exceptions:
|
This method is only available on Miniservers.
When using a raw image, it must contain an instance of the same type of operating system as currently installed on the server. For example: re-imaging a Linux based server with a Microsoft Windows raw image will result in a broken system.
An email will be sent to the admin contact when the process is finished.
See also server.snapshot_list() for retrieving a list of valid snapshots from a storage.
Schedules re-imaging of name.
Parameters: |
|
---|---|
Returns: | A dictionary as described in job.status(). |
Raises : | May raise one of the following exceptions:
|
This method is only available on Miniservers.
The os and os_bits parameters are as described in Create Methods.
You can manage public SSH keys on the Manage SSH Keys page in the Memset control panel.
Sets the Intrusion Detection email alert level for name.
Refer to the Intrusion Detection page for alert levels.
Raises : | May raise ApiErrorPreconditionFailed if Intrusion Detection is not enabled on this server. |
---|---|
Parameters: |
|
Add a domain to the Memset name server slaves for the primary name server name.
It may take up to 30 minutes for the domain to be added.
Parameters: |
|
---|---|
Returns: | The added domain name |
Raises : |
|
Delete a domain from the Memset name server slaves for the primary name server name.
It may take up to 30 minutes for the domain to be deleted.
Parameters: |
|
---|---|
Returns: | The deleted domain name. |
Raises : | ApiErrorDoesNotExist if name cannot be found for the account or slaved domain_name not found for name. |
List all domain names being slaved by Memset’s name server slaves for the primary name server name.
Parameters: | name (String) – Name of the service. Service names are 1-64 characters A-Z, a-z, 0-9, -, . and _. Ensure this value has at most 64 characters. |
---|---|
Returns: | A list of domain names. |
Raises : | ApiErrorDoesNotExist if name cannot be found for the account. |
Schedules a snapshot for name.
Parameters: |
|
---|---|
Returns: | A dictionary as described in job.status(). |
Raises : | May raise one of the following exceptions:
|
This method is only available on Miniservers.
Please be advised that classic Miniservers are deprecated and won’t be supported in future API releases.
Deletes a snapshot.
Parameters: |
|
---|---|
Returns: | A dictionary as described in job.status(). |
Raises : | May raise ApiErrorAlreadyInProgress if there is a pending deletion for that snapshot. |
The snapshots are expected to be in a container named ‘miniserver-snapshots’, so the path to the snapshot is relative to this container.
See also server.snapshot_list() for retrieving a list of valid snapshots from a storage.
Lists snapshots found in the storage identified by storage_name.
Parameters: | storage_name (String) – Name of the storage service. Service names are 1-64 characters A-Z, a-z, 0-9, -, . and _. Ensure this value has at most 64 characters. |
---|---|
Returns: | An array of dictionaries with the following keys:
|
Raises : | May raise ApiErrorDoesNotExist if no snapshots are found. |
The snapshots are expected to be in a container named ‘miniserver-snapshots’. This function doesn’t guarantee that found snapshots are correct.
Upgrades a Miniserver instance to a higher specification.
Parameters: |
|
||||||||
---|---|---|---|---|---|---|---|---|---|
Returns: | A dictionary with the following keys
|
This method is only available on Miniservers.
See the following pages for princing and more information: