IWsBackupSetUpgradeBackupAccountPlan Method
|
Change backup plan for the backup account and over-limit behavior (action to perform if one of the resources exceeds the limit of the current pricing plan).
Namespace:
Aruba.Cloud.WsBackup
Assembly:
Aruba.Cloud.WsBackup (in Aruba.Cloud.WsBackup.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax[OperationContractAttribute]
[RBACAttribute("put", "Aruba.Backup", "backupAccounts/{backupAccountID}")]
WsResult SetUpgradeBackupAccountPlan(
int backupAccountID,
int backupPricingTypeId,
EnumsOverLimitBehavior overLimitBehavior,
string promoCode
)<OperationContractAttribute>
<RBACAttribute("put", "Aruba.Backup", "backupAccounts/{backupAccountID}")>
Function SetUpgradeBackupAccountPlan (
backupAccountID As Integer,
backupPricingTypeId As Integer,
overLimitBehavior As EnumsOverLimitBehavior,
promoCode As String
) As WsResult[OperationContractAttribute]
[RBACAttribute(L"put", L"Aruba.Backup", L"backupAccounts/{backupAccountID}")]
WsResult^ SetUpgradeBackupAccountPlan(
int backupAccountID,
int backupPricingTypeId,
EnumsOverLimitBehavior overLimitBehavior,
String^ promoCode
)[<OperationContractAttribute>]
[<RBACAttribute("put", "Aruba.Backup", "backupAccounts/{backupAccountID}")>]
abstract SetUpgradeBackupAccountPlan :
backupAccountID : int *
backupPricingTypeId : int *
overLimitBehavior : EnumsOverLimitBehavior *
promoCode : string -> WsResult
function SetUpgradeBackupAccountPlan(
backupAccountID : int,
backupPricingTypeId : int,
overLimitBehavior : EnumsOverLimitBehavior,
promoCode : String
) : WsResult
Parameters
- backupAccountID
- Type: SystemInt32
ID of backup account - backupPricingTypeId
- Type: SystemInt32
ID of backup plan - overLimitBehavior
- Type: Aruba.Cloud.WsBackup.EntitiesEnumsOverLimitBehavior
Over-limit behavior - promoCode
- Type: SystemString
Return Value
Type:
WsResult
Examples
By the method IWsBackup SetUpgradeBackupAccountPlan you can change backup plan for the backup account and overlimit behavior
public static string SetUpgradeBackupAccountPlan(WsBackupClient client,
int backupAccountID, int backupPricingTypeId,
EnumsOverLimitBehavior overLimitBehavior)
{
client.ClientCredentials.UserName.UserName = "ARU-0000";
client.ClientCredentials.UserName.Password = "0123456789";
StringBuilder stringBuilder = new StringBuilder();
try
{
WsResult result = client.SetUpgradeBackupAccountPlan(backupAccountID,
backupPricingTypeId, overLimitBehavior);
if (result.Success)
{
stringBuilder.Append("Operation ends successfully\n");
}
else
{
throw new ApplicationException(result.ResultMessage);
}
}
catch (Exception ex)
{
throw new ApplicationException(ex.Message);
}
return stringBuilder.ToString();
}
See Also