Click or drag to resize

IWsEndUserSetEnqueuePurchasePrivateCloud Method

By the method SetEnqueuePurchasePrivateCloud you can puchase a private cloud. The method require to specify the name of private cloud, a description, the username and password, a telephone number, an email and the resources quantity

Namespace:  Aruba.Cloud.WsEndUser
Assembly:  Aruba.Cloud.WsEndUser (in Aruba.Cloud.WsEndUser.dll) Version: (
WsResult<PurchasePrivateCloudResponse> SetEnqueuePurchasePrivateCloud(
	PurchasePrivateCloudRequest request


Type: PurchasePrivateCloudRequest
Purchase request Private Cloud

Return Value

Type: WsResultPurchasePrivateCloudResponse
Contains the details of the newly inserted Private Cloud

Return Value

Type: WsResultPurchasePrivateCloudResponse
The WsEndUser authenticates the user and retrieves the WcfPlatform which performs as a first validation of the data. After the validation of input data, are added up the prices of individual resources requested, the WcfBilling verifies that the user has sufficient credit for the purchase and the product is the price list. After a successful validation, the WcfPlatform dealing with the inclusion of the request in the tables of privateCloud, the corresponding record in the Job resource and reserves the credit through WcfBilling.
        /// IWsEndUser.SetEnqueuePurchasePrivateCloud Method (c# .NET)
public static string SetEnqueuePurchasePrivateCloud(WsEndUserClient client,
    PurchasePrivateCloud purchasePrivateCloud)
    //specify the account login details 
    client.ClientCredentials.UserName.UserName = "ARU-0000";
    client.ClientCredentials.UserName.Password = "0123456789";

    StringBuilder stringBuilder = new StringBuilder();

    // call method setEnqueuePurchasePrivateCloud 
    // obtaining a WsResultOfint item
    WsResultOfPurchasedPrivateCloud result = 

    //if the call is Success print value
    if (result.Success)
        // get Value returned from server
        stringBuilder.Append(" Operation ends successfully. Result Code : ");
        throw new ApplicationException(result.ResultMessage);
    catch (Exception ex)
    // re-run the error
    throw new ApplicationException(ex.Message);

    return stringBuilder.ToString();
See Also