IWsCloudStorageSetCreateCloudStorageAccount Method |
Namespace: Aruba.Cloud.WsCloudStorage
[OperationContractAttribute] WsResult<int> SetCreateCloudStorageAccount( CloudStorageUser cloudStorageUser )
//WsCloudStorage.GetCloudStorageAccounts Method (c# .NET) private static String GetCloudStorageAccounts(WsCloudStorageClient client) { //specify the account login details client.ClientCredentials.UserName.UserName = "ARU-0000"; client.ClientCredentials.UserName.Password = "1234567890"; StringBuilder stringBuilder = new StringBuilder(); try { //call method GetCloudStorageAccounts, //obtaining a WsResultOfArrayOfCloudStorageAccount item WsResultOfArrayOfCloudStorageAccount result = client.GetCloudStorageAccounts(); System.Console.WriteLine("result.Success " + result.Success); //if the call is not successful, re-run the error indicating the message if (result.Success) { CloudStorageAccount[] arrayOfCloudStorageAccount = result.Value; //browse the list and print the values foreach (CloudStorageAccount cloudStorageAccount in arrayOfCloudStorageAccount) { int cloudStorageAccountID = cloudStorageAccount.CloudStorageAccountID; stringBuilder.Append(" cloudStorageAccountID: "); stringBuilder.Append(cloudStorageAccountID); } } else { throw new Exception(result.ResultMessage); } } catch (Exception ex) { //re-run the error throw new Exception(ex.Message); } return stringBuilder.ToString(); }