/// <summary>
 /// Retrieve the schedule identified by scheduleId.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXXXXX.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Automation.IScheduleOperations.
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <param name='scheduleId'>
 /// Required. The schedule id.
 /// </param>
 /// <returns>
 /// The response model for the get schedule operation.
 /// </returns>
 public static Task <ScheduleGetResponse> GetAsync(this IScheduleOperations operations, string automationAccount, string scheduleId)
 {
     return(operations.GetAsync(automationAccount, scheduleId, CancellationToken.None));
 }
Beispiel #2
0
 /// <summary>
 /// Delete the schedule identified by schedule name.  (see
 /// http://aka.ms/azureautomationsdk/scheduleoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Automation.IScheduleOperations.
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <param name='scheduleName'>
 /// Required. The schedule name.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <AzureOperationResponse> DeleteAsync(this IScheduleOperations operations, string automationAccount, string scheduleName)
 {
     return(operations.DeleteAsync(automationAccount, scheduleName, CancellationToken.None));
 }
Beispiel #3
0
 /// <summary>
 /// Retrieve next list of schedules.  (see
 /// http://aka.ms/azureautomationsdk/scheduleoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Automation.IScheduleOperations.
 /// </param>
 /// <param name='nextLink'>
 /// Required. The link to retrieve next set of items.
 /// </param>
 /// <returns>
 /// The response model for the list schedule operation.
 /// </returns>
 public static Task <ScheduleListResponse> ListNextAsync(this IScheduleOperations operations, string nextLink)
 {
     return(operations.ListNextAsync(nextLink, CancellationToken.None));
 }
 /// <summary>
 /// Retrieve a list of schedules.
 /// <see href="http://aka.ms/azureautomationsdk/scheduleoperations" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <Schedule> > ListByAutomationAccountNextAsync(this IScheduleOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByAutomationAccountNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Update the schedule identified by schedule name.
 /// <see href="http://aka.ms/azureautomationsdk/scheduleoperations" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of an Azure Resource group.
 /// </param>
 /// <param name='automationAccountName'>
 /// The name of the automation account.
 /// </param>
 /// <param name='scheduleName'>
 /// The schedule name.
 /// </param>
 /// <param name='parameters'>
 /// The parameters supplied to the update schedule operation.
 /// </param>
 public static Schedule Update(this IScheduleOperations operations, string resourceGroupName, string automationAccountName, string scheduleName, ScheduleUpdateParameters parameters)
 {
     return(operations.UpdateAsync(resourceGroupName, automationAccountName, scheduleName, parameters).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Update the schedule identified by schedule name.  (see
 /// http://aka.ms/azureautomationsdk/scheduleoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Automation.IScheduleOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <param name='parameters'>
 /// Required. The parameters supplied to the patch schedule operation.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <AzureOperationResponse> PatchAsync(this IScheduleOperations operations, string resourceGroupName, string automationAccount, SchedulePatchParameters parameters)
 {
     return(operations.PatchAsync(resourceGroupName, automationAccount, parameters, CancellationToken.None));
 }
 /// <summary>
 /// Retrieve a list of schedules.
 /// <see href="http://aka.ms/azureautomationsdk/scheduleoperations" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <Schedule> ListByAutomationAccountNext(this IScheduleOperations operations, string nextPageLink)
 {
     return(operations.ListByAutomationAccountNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Delete the schedule identified by schedule name.
 /// <see href="http://aka.ms/azureautomationsdk/scheduleoperations" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of an Azure Resource group.
 /// </param>
 /// <param name='automationAccountName'>
 /// The name of the automation account.
 /// </param>
 /// <param name='scheduleName'>
 /// The schedule name.
 /// </param>
 public static void Delete(this IScheduleOperations operations, string resourceGroupName, string automationAccountName, string scheduleName)
 {
     operations.DeleteAsync(resourceGroupName, automationAccountName, scheduleName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Delete the schedule identified by schedule name.
 /// <see href="http://aka.ms/azureautomationsdk/scheduleoperations" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of an Azure Resource group.
 /// </param>
 /// <param name='automationAccountName'>
 /// The name of the automation account.
 /// </param>
 /// <param name='scheduleName'>
 /// The schedule name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IScheduleOperations operations, string resourceGroupName, string automationAccountName, string scheduleName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, automationAccountName, scheduleName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Beispiel #10
0
 /// <summary>
 /// Get schedule.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='labName'>
 /// The name of the lab.
 /// </param>
 /// <param name='name'>
 /// The name of the schedule.
 /// </param>
 public static Schedule GetResource(this IScheduleOperations operations, string resourceGroupName, string labName, string name)
 {
     return(Task.Factory.StartNew(s => ((IScheduleOperations)s).GetResourceAsync(resourceGroupName, labName, name), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Retrieve the schedule identified by schedule name.
 /// <see href="http://aka.ms/azureautomationsdk/scheduleoperations" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of an Azure Resource group.
 /// </param>
 /// <param name='automationAccountName'>
 /// The name of the automation account.
 /// </param>
 /// <param name='scheduleName'>
 /// The schedule name.
 /// </param>
 public static Schedule Get(this IScheduleOperations operations, string resourceGroupName, string automationAccountName, string scheduleName)
 {
     return(operations.GetAsync(resourceGroupName, automationAccountName, scheduleName).GetAwaiter().GetResult());
 }
Beispiel #12
0
 /// <summary>
 /// List schedules in a given lab.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='labName'>
 /// The name of the lab.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 public static IPage <Schedule> List(this IScheduleOperations operations, string resourceGroupName, string labName, ODataQuery <Schedule> odataQuery = default(ODataQuery <Schedule>))
 {
     return(Task.Factory.StartNew(s => ((IScheduleOperations)s).ListAsync(resourceGroupName, labName, odataQuery), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Beispiel #13
0
 /// <summary>
 /// List schedules in a given lab.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <Schedule> ListNext(this IScheduleOperations operations, string nextPageLink)
 {
     return(Task.Factory.StartNew(s => ((IScheduleOperations)s).ListNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Beispiel #14
0
 /// <summary>
 /// Execute a schedule. This operation can take a while to complete.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='labName'>
 /// The name of the lab.
 /// </param>
 /// <param name='name'>
 /// The name of the schedule.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginExecuteAsync(this IScheduleOperations operations, string resourceGroupName, string labName, string name, CancellationToken cancellationToken = default(CancellationToken))
 {
     await operations.BeginExecuteWithHttpMessagesAsync(resourceGroupName, labName, name, null, cancellationToken).ConfigureAwait(false);
 }
 /// <summary>
 /// Retrieve a list of one schedule identified by scheduleName.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXXXXX.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Automation.IScheduleOperations.
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <param name='scheduleName'>
 /// Required. The schedule name.
 /// </param>
 /// <returns>
 /// The response model for the list schedule operation.
 /// </returns>
 public static Task <ScheduleListResponse> ListByNameAsync(this IScheduleOperations operations, string automationAccount, string scheduleName)
 {
     return(operations.ListByNameAsync(automationAccount, scheduleName, CancellationToken.None));
 }
 /// <summary>
 /// Retrieve a list of schedules.
 /// <see href="http://aka.ms/azureautomationsdk/scheduleoperations" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of an Azure Resource group.
 /// </param>
 /// <param name='automationAccountName'>
 /// The name of the automation account.
 /// </param>
 public static IPage <Schedule> ListByAutomationAccount(this IScheduleOperations operations, string resourceGroupName, string automationAccountName)
 {
     return(operations.ListByAutomationAccountAsync(resourceGroupName, automationAccountName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Create a schedule.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXXX.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Automation.IScheduleOperations.
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <param name='parameters'>
 /// Required. The parameters supplied to the create schedule operation.
 /// </param>
 /// <returns>
 /// The response model for the create schedule operation.
 /// </returns>
 public static Task <ScheduleCreateResponse> CreateAsync(this IScheduleOperations operations, string automationAccount, ScheduleCreateParameters parameters)
 {
     return(operations.CreateAsync(automationAccount, parameters, CancellationToken.None));
 }
 /// <summary>
 /// Retrieve a list of schedules.  (see
 /// http://aka.ms/azureautomationsdk/scheduleoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Automation.IScheduleOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <returns>
 /// The response model for the list schedule operation.
 /// </returns>
 public static Task <ScheduleListResponse> ListAsync(this IScheduleOperations operations, string resourceGroupName, string automationAccount)
 {
     return(operations.ListAsync(resourceGroupName, automationAccount, CancellationToken.None));
 }