C# Class OneAndOne.Client.Servers

Inheritance: OneAndOne.Client.Endpoints.ResourceBase
Datei anzeigen Open project: 1and1/oneandone-cloudserver-sdk-dotnet

Public Methods

Method Description
Create ( CreateServerRequest server ) : CreateServerResponse

Adds a new server.

CreateClone ( string server_id, string cloneName ) : ServerResponse

Clones a server.

CreatePrivateNetwork ( string server_id, string privateNetworkId ) : ServerResponse

Assigns a private network to the server.

CreateSnapshot ( string server_id ) : ServerResponse

Creates a new snapshot of the server.

Delete ( string serverId, bool keepsIps ) : DeleteServerResponse

Removes a server.

DeletePrivateNetwork ( string server_id, string privateNetworkId ) : ServerResponse

Unassigns a private network from the server.

DeleteSnapshot ( string server_id, string snapshotId ) : ServerResponse

Removes a snapshot

Get ( int page = null, int perPage = null, string sort = null, string query = null, string fields = null ) : List

Returns a list of your servers.

GetAvailableFixedServers ( ) : List

Returns available flavours for fixed servers.

GetFlavorInformation ( string fixedinstaceId ) : AvailableHardwareFlavour

Returns information about one flavour.

GetPrivateNetworks ( string server_id ) : List

Returns a list of the server's private networks.

GetSnapshots ( string server_id ) : List

Returns a list of the server's snapshots.

GetStatus ( string server_id ) : Status

Returns a list of the server's IPs.

Servers ( object _apiUrl = null, object _apiKey = null ) : System
Show ( string server_id ) : ServerResponse

Returns server's information.

ShowPrivateNetworks ( string server_id, string privateNetworkId ) : OneAndOne.POCO.Respones.PrivateNetworks.PrivateNetworksResponse

Returns information about a server's private network.

Update ( UpdateServerRequest server, string serverId ) : UpdateServerResponse

Adds a new server.

UpdateSnapshot ( string server_id, string snapshotId ) : ServerResponse

Restores a snapshot into the server.

UpdateStatus ( UpdateStatusRequest body, string server_id ) : ServerResponse

Returns a list of the server's IPs.

Method Details

Create() public method

Adds a new server.
public Create ( CreateServerRequest server ) : CreateServerResponse
server OneAndOne.POCO.Requests.Servers.CreateServerRequest
return OneAndOne.POCO.Respones.Servers.CreateServerResponse

CreateClone() public method

Clones a server.
public CreateClone ( string server_id, string cloneName ) : ServerResponse
server_id string
cloneName string
return OneAndOne.POCO.Respones.Servers.ServerResponse

CreatePrivateNetwork() public method

Assigns a private network to the server.
public CreatePrivateNetwork ( string server_id, string privateNetworkId ) : ServerResponse
server_id string
privateNetworkId string
return OneAndOne.POCO.Respones.Servers.ServerResponse

CreateSnapshot() public method

Creates a new snapshot of the server.
public CreateSnapshot ( string server_id ) : ServerResponse
server_id string
return OneAndOne.POCO.Respones.Servers.ServerResponse

Delete() public method

Removes a server.
public Delete ( string serverId, bool keepsIps ) : DeleteServerResponse
serverId string required (string ), Unique server's identifier.
keepsIps bool Set true for keeping server IPs after deleting a server (false by default).
return OneAndOne.POCO.Respones.Servers.DeleteServerResponse

DeletePrivateNetwork() public method

Unassigns a private network from the server.
public DeletePrivateNetwork ( string server_id, string privateNetworkId ) : ServerResponse
server_id string Unique server's identifier.
privateNetworkId string
return OneAndOne.POCO.Respones.Servers.ServerResponse

DeleteSnapshot() public method

Removes a snapshot
public DeleteSnapshot ( string server_id, string snapshotId ) : ServerResponse
server_id string Unique server's identifier.
snapshotId string
return OneAndOne.POCO.Respones.Servers.ServerResponse

Get() public method

Returns a list of your servers.
public Get ( int page = null, int perPage = null, string sort = null, string query = null, string fields = null ) : List
page int Allows to use pagination. Sets the number of servers that will be shown in each page.
perPage int Current page to show.
sort string Allows to sort the result by priority:sort=name retrieves a list of elements ordered by their names.sort=-creation_date retrieves a list of elements ordered according to their creation date in descending order of priority.
query string Allows to search one string in the response and return the elements that contain it. In order to specify the string use parameter q: q=My server
fields string Returns only the parameters requested: fields=id,name,description,hardware.ram
return List

GetAvailableFixedServers() public method

Returns available flavours for fixed servers.
public GetAvailableFixedServers ( ) : List
return List

GetFlavorInformation() public method

Returns information about one flavour.
public GetFlavorInformation ( string fixedinstaceId ) : AvailableHardwareFlavour
fixedinstaceId string fixed_instance_size_id: required (string ).
return OneAndOne.POCO.Respones.Servers.AvailableHardwareFlavour

GetPrivateNetworks() public method

Returns a list of the server's private networks.
public GetPrivateNetworks ( string server_id ) : List
server_id string Unique server's identifier.
return List

GetSnapshots() public method

Returns a list of the server's snapshots.
public GetSnapshots ( string server_id ) : List
server_id string Unique server's identifier.
return List

GetStatus() public method

Returns a list of the server's IPs.
public GetStatus ( string server_id ) : Status
server_id string Unique server's identifier.
return OneAndOne.POCO.Respones.Servers.Status

Servers() public method

public Servers ( object _apiUrl = null, object _apiKey = null ) : System
_apiUrl object
_apiKey object
return System

Show() public method

Returns server's information.
public Show ( string server_id ) : ServerResponse
server_id string Unique server's identifier.
return OneAndOne.POCO.Respones.Servers.ServerResponse

ShowPrivateNetworks() public method

Returns information about a server's private network.
public ShowPrivateNetworks ( string server_id, string privateNetworkId ) : OneAndOne.POCO.Respones.PrivateNetworks.PrivateNetworksResponse
server_id string Unique server's identifier.
privateNetworkId string private_network_id: required (string ), Unique private network's identifier.
return OneAndOne.POCO.Respones.PrivateNetworks.PrivateNetworksResponse

Update() public method

Adds a new server.
public Update ( UpdateServerRequest server, string serverId ) : UpdateServerResponse
server OneAndOne.POCO.Requests.Servers.UpdateServerRequest
serverId string
return OneAndOne.POCO.Respones.Servers.UpdateServerResponse

UpdateSnapshot() public method

Restores a snapshot into the server.
public UpdateSnapshot ( string server_id, string snapshotId ) : ServerResponse
server_id string Unique server's identifier.
snapshotId string private_network_id: required (string ), Unique private network's identifier.
return OneAndOne.POCO.Respones.Servers.ServerResponse

UpdateStatus() public method

Returns a list of the server's IPs.
public UpdateStatus ( UpdateStatusRequest body, string server_id ) : ServerResponse
body OneAndOne.POCO.Requests.Servers.UpdateStatusRequest
server_id string Unique server's identifier.
return OneAndOne.POCO.Respones.Servers.ServerResponse