Click or drag to resize

IWsCloudStorageSetCreateCloudStorageAccount Method

By the method SetCreateCloudStorageAccount you can create a Cloud Storage Account. The method require to specify the username and password for using the Cloud Storage service, also you must specify the Region where you want create the account, the pricing plan for your account and the behavior to adopt exceeded the limit

Namespace:  Aruba.Cloud.WsCloudStorage
Assembly:  WsCloudStorage (in WsCloudStorage.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
[OperationContractAttribute]
WsResult<int> SetCreateCloudStorageAccount(
	CloudStorageUser cloudStorageUser
)

Parameters

cloudStorageUser
Type: Aruba.Cloud.WsCloudStorage.EntitiesCloudStorageUser

Return Value

Type: WsResultInt32
Examples
        //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();
}
See Also