DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.

DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
...
The .NET SDK for CloudStack provides a client side library to allow Microsoft .NET programs to access the CloudStack REST APIs.
The CloudStack API is loosely based on the REST architecture \ [2\]. Whilst providing a good deal of flexibility for a developer, it also has the potential to impose a heavy cost in that the developer is responsible for marshalling all the request arguments into the required format; correctly signing the request; dealing with asynchronous methods; handling fault conditions and parsing the response fields.Wiki Markup
The .NET SDK for CloudStack addresses these issues for developers in the Microsoft .NET environment by concealing all of these implementation details underneath a high level request/response API that is directly accessible from all .NET supported languages.
...
| Code Block | ||||
|---|---|---|---|---|
| ||||
public class Client : IDisposable { public Client (Uri serverUri, string apiKey, SecureString secretKey) { … } … } |
The server Uri, apiKey and secretKey are securely cached within the client session object and used to sign each request that is sent to the CloudStack server. The session class will securely delete the secret key during object disposal.
...
| Code Block | ||||
|---|---|---|---|---|
| ||||
interface ICloudStackSDK { … AttachVolumeResponse attachVolume (AttachVolumeRequest request); … }; |
The Request and Response classes have the expected properties, for example:
| Code Block | ||||
|---|---|---|---|---|
| ||||
public class AttachVolumeRequest : APIRequest { public string Id { … } public string VirtualMachineId { … } public string DeviceId { … } } |
So a typical usage of the strongly typed API of the .NET SDK for CloudStack might look like:
| Code Block | ||||
|---|---|---|---|---|
| ||||
Client client = new Client(serverUri, myApiKey, mySecretKey);
AttachVolumeRequest request = new AttachVolumeRequest ()
{
Id = myVolumeId,
VirtualMachineId = myVmId,
DeviceId = “/dev/xvdc”
};
AttachVolumeResponse response = client.attachVolume(request);
…
|
...
| Code Block | ||||
|---|---|---|---|---|
| ||||
Client client = new Client(serverUri, myApiKey, mySecretKey); APIRequest request = new APIRequest (“listaccounts”); request.Parameters\[“accounttype”\] = “admin”; APIResponse response = client.SendRequest(request); Console.Writeline (“Raw XML response: {0}”, response.XmlResponse); |
...