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: 1.0.0.0 (1.0.0.0)
Syntax[OperationContractAttribute]
WsResult<PurchasePrivateCloudResponse> SetEnqueuePurchasePrivateCloud(
PurchasePrivateCloudRequest request
)
<OperationContractAttribute>
Function SetEnqueuePurchasePrivateCloud (
request As PurchasePrivateCloudRequest
) As WsResult(Of PurchasePrivateCloudResponse)
[OperationContractAttribute]
WsResult<PurchasePrivateCloudResponse^>^ SetEnqueuePurchasePrivateCloud(
PurchasePrivateCloudRequest^ request
)
[<OperationContractAttribute>]
abstract SetEnqueuePurchasePrivateCloud :
request : PurchasePrivateCloudRequest -> WsResult<PurchasePrivateCloudResponse>
function SetEnqueuePurchasePrivateCloud(
request : PurchasePrivateCloudRequest
) : WsResult<PurchasePrivateCloudResponse>
Parameters
- request
- Type: PurchasePrivateCloudRequest
Purchase request Private Cloud
Return Value
Type:
WsResultPurchasePrivateCloudResponseContains the details of the newly inserted Private Cloud
Return Value
Type:
WsResultPurchasePrivateCloudResponse
RemarksThe 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.
Examples
public static string SetEnqueuePurchasePrivateCloud(WsEndUserClient client,
PurchasePrivateCloud purchasePrivateCloud)
{
client.ClientCredentials.UserName.UserName = "ARU-0000";
client.ClientCredentials.UserName.Password = "0123456789";
StringBuilder stringBuilder = new StringBuilder();
try
{
WsResultOfPurchasedPrivateCloud result =
client.SetEnqueuePurchasePrivateCloud(purchasePrivateCloud);
if (result.Success)
{
stringBuilder.Append(" Operation ends successfully. Result Code : ");
stringBuilder.Append(result.ResultCode);
}
else
{
throw new ApplicationException(result.ResultMessage);
}
}
catch (Exception ex)
{
throw new ApplicationException(ex.Message);
}
return stringBuilder.ToString();
}
See Also