Click or drag to resize

IWsEndUserGetPurchasedPrivateClouds Method

By the method GetPurchsedPrivateClouds you can retrieve the resources type for private cloud

Namespace:  Aruba.Cloud.WsEndUser
Assembly:  Aruba.Cloud.WsEndUser (in Aruba.Cloud.WsEndUser.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
[OperationContractAttribute]
WsResult<PrivateCloudEntities> GetPurchasedPrivateClouds()

Return Value

Type: WsResultPrivateCloudEntities
List of Private Clouds purchased
Remarks
The WsEndUser authenticates the user and retrieves the wcfPlatform that retrieves privateCloud in the table [ArubaCloud].[Dbo].[PrivateCloudInstances] in a state other than Deleted and belonging to the authenticated user.
Examples
        /// IWsEndUser.GetPurchsedPrivateClouds Method (c# .NET)
public static string GetPurchsedPrivateClouds(WsEndUserClient client)
{
    //specify the account login details 
    client.ClientCredentials.UserName.UserName = "ARU-0000";
    client.ClientCredentials.UserName.Password = "0123456789";

    StringBuilder stringBuilder = new StringBuilder();

    try
    {
    // call method GetPurchasedPrivateClouds 
    // obtaining a WsResultOfPrivateCloudEntities item
    WsResultOfPrivateCloudEntities result =
        client.GetPurchasedPrivateClouds();

    // if the call is Success print returned values
    if (result.Success)
    {
        stringBuilder.Append("Operation ends successfully\n");

        // get Value returned from server
        PrivateCloudEntities items = result.Value;

        // for each items print the information
        foreach (PrivateCloudEntity item in items.PrivateClouds)
        {
        stringBuilder.Append("\nPrivateCloudID: ");
        stringBuilder.Append(item.PrivateCloudID);
        stringBuilder.Append("\nName: ");
        stringBuilder.Append(item.Name);
        stringBuilder.Append("\nStatus: ");
        stringBuilder.Append(item.Status);
        }
    }
    else
    {
        throw new ApplicationException(result.ResultMessage);
    }
    }
    catch (Exception ex)
    {
    // re-run the error
    throw new ApplicationException(ex.Message);
    }

    return stringBuilder.ToString();
}
See Also