Click or drag to resize

IWsJelasticEnqueueCreationJelasticAccount Method

The method Enqueues a new Jelastic account creation request.

Namespace:  Aruba.Cloud.WsJelastic
Assembly:  WsJelastic (in WsJelastic.dll) Version: (
WsResult EnqueueCreationJelasticAccount(
	EnqueueCreationJelasticAccountRequest request


Type: Aruba.Cloud.WsJelastic.RequestsEnqueueCreationJelasticAccountRequest
A EnqueueCreationJelasticAccountRequest object describing the new Jelastic account to create

Return Value

Type: WsResult
The following example describes a method, called CreateJelasticAccount, which means a call to EnqueueCreationJelasticAccount on Aruba WsJelastic, The method requests a new account creation.
public bool CreateJelasticAccount(string email, int jelasticPricingTypeID, EnumsOverLimitBehavior overLimitBehavior, WsJelastic.JelasticContractPurchaseRequest[] contracts)
  //supposing this object have the properties I need:
  var account = new ArubaWsJelastic.JelasticAccountToCreate()
    Email = email,
    JelasticPricingTypeID = jelasticPricingTypeID,
    OverLimitBehavior = overLimitBehavior,
    ContractList = contracts

  var request = new EnqueueCreationJelasticAccountRequest() { ToCreate = account };

  //sending the request
  using (var client = this.WsJelasticClient)
    var result = client.EnqueueCreationJelasticAccount(request);

    //result.Success is true on Success, false on failure
    if (result.Success)
      return result.Success;
      this.LogError("EnqueueCreationJelasticAccount", result);
      throw new CodedException(this.GetErrorCode(result.ResultCode), result.ResultMessage);
See Also