IJsonpWsEndUserSetAddServerScheduledOperation Method
|
Create a new scheduled task. By the method SetAddServerScheduledOperation () of Aruba is WsEndUser
can create a new scheduled task by specifying the type and date.
Namespace:
Aruba.Cloud.WsEndUser
Assembly:
Aruba.Cloud.WsEndUser (in Aruba.Cloud.WsEndUser.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax[OperationContractAttribute]
[WebGetAttribute(ResponseFormat = WebMessageFormat.Json, UriTemplate = "SetAddServerScheduledOperation/{jsonp}/{userName}/{token}?serverId={serverId}&operationType={operationType}&operationsParameters={operationsParameters}&newSchedulePlan={newSchedulePlan}")]
Stream SetAddServerScheduledOperation(
string jsonp,
string userName,
string token,
int serverId,
string operationType,
string operationsParameters,
string newSchedulePlan
)<OperationContractAttribute>
<WebGetAttribute(ResponseFormat := WebMessageFormat.Json, UriTemplate := "SetAddServerScheduledOperation/{jsonp}/{userName}/{token}?serverId={serverId}&operationType={operationType}&operationsParameters={operationsParameters}&newSchedulePlan={newSchedulePlan}")>
Function SetAddServerScheduledOperation (
jsonp As String,
userName As String,
token As String,
serverId As Integer,
operationType As String,
operationsParameters As String,
newSchedulePlan As String
) As Stream[OperationContractAttribute]
[WebGetAttribute(ResponseFormat = WebMessageFormat::Json, UriTemplate = L"SetAddServerScheduledOperation/{jsonp}/{userName}/{token}?serverId={serverId}&operationType={operationType}&operationsParameters={operationsParameters}&newSchedulePlan={newSchedulePlan}")]
Stream^ SetAddServerScheduledOperation(
String^ jsonp,
String^ userName,
String^ token,
int serverId,
String^ operationType,
String^ operationsParameters,
String^ newSchedulePlan
)[<OperationContractAttribute>]
[<WebGetAttribute(ResponseFormat = WebMessageFormat.Json, UriTemplate = "SetAddServerScheduledOperation/{jsonp}/{userName}/{token}?serverId={serverId}&operationType={operationType}&operationsParameters={operationsParameters}&newSchedulePlan={newSchedulePlan}")>]
abstract SetAddServerScheduledOperation :
jsonp : string *
userName : string *
token : string *
serverId : int *
operationType : string *
operationsParameters : string *
newSchedulePlan : string -> Stream
function SetAddServerScheduledOperation(
jsonp : String,
userName : String,
token : String,
serverId : int,
operationType : String,
operationsParameters : String,
newSchedulePlan : String
) : Stream
Parameters
- jsonp
- Type: SystemString
- userName
- Type: SystemString
- token
- Type: SystemString
- serverId
- Type: SystemInt32
- operationType
- Type: SystemString
- operationsParameters
- Type: SystemString
- newSchedulePlan
- Type: SystemString
Return Value
Type:
Stream
The method returns an object WsResult containing information on the outcome of the method call.
Examples
Below is an example of a method call SetAddServerScheduledOperation() to Aruba WsEndUser:
private void AddScheduledOperation()
{
ScheduledOperationRequest operationRequest = new ScheduledOperationRequest()
{
Operation = ScheduledOperationTypes.StartVirtualMachine,
ScheduleOperationLabel = "Accensione server Test",
ScheduleStartDate = DateTime.Now.AddDays(1),
ServerID = 46
};
using (WsEndUserClient client = this.WsEndUserClient)
{
WsResult result = client.SetAddServerScheduledOperation(operationRequest);
if (result.Success)
return;
this.LogError("SetAddServerScheduledOperation", new Exception(result.ResultMessage));
throw new CodedException(result.ResultCode, result.ResultMessage);
}
}
See Also