Exemple #1
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='name'>
 /// The name of the schedule.
 /// </param>
 /// <param name='expand'>
 /// Specify the $expand query. Example: 'properties($select=status)'
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ScheduleInner> GetAsync(this IGlobalSchedulesOperations operations, string resourceGroupName, string name, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, name, expand, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemple #2
0
 /// <summary>
 /// Modify properties of schedules.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='name'>
 /// The name of the schedule.
 /// </param>
 /// <param name='schedule'>
 /// A schedule.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ScheduleInner> UpdateAsync(this IGlobalSchedulesOperations operations, string resourceGroupName, string name, ScheduleFragmentInner schedule, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, name, schedule, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemple #3
0
 /// <summary>
 /// List schedules in a resource group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <ScheduleInner> > ListByResourceGroupAsync(this IGlobalSchedulesOperations operations, string resourceGroupName, ODataQuery <ScheduleInner> odataQuery = default(ODataQuery <ScheduleInner>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, odataQuery, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// List schedules in a subscription.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <Schedule> > ListBySubscriptionAsync(this IGlobalSchedulesOperations operations, ODataQuery <Schedule> odataQuery = default(ODataQuery <Schedule>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(odataQuery, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// List schedules in a resource group.
 /// </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> > ListByResourceGroupNextAsync(this IGlobalSchedulesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemple #6
0
 /// <summary>
 /// Updates a schedule's target resource Id. 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='name'>
 /// The name of the schedule.
 /// </param>
 /// <param name='retargetScheduleProperties'>
 /// Properties for retargeting a virtual machine schedule.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginRetargetAsync(this IGlobalSchedulesOperations operations, string resourceGroupName, string name, RetargetSchedulePropertiesInner retargetScheduleProperties, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginRetargetWithHttpMessagesAsync(resourceGroupName, name, retargetScheduleProperties, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Exemple #7
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='name'>
 /// The name of the schedule.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginExecuteAsync(this IGlobalSchedulesOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginExecuteWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// List schedules in a resource group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 public static IPage <Schedule> ListByResourceGroup(this IGlobalSchedulesOperations operations, string resourceGroupName, ODataQuery <Schedule> odataQuery = default(ODataQuery <Schedule>))
 {
     return(operations.ListByResourceGroupAsync(resourceGroupName, odataQuery).GetAwaiter().GetResult());
 }
 /// <summary>
 /// List schedules in a resource group.
 /// </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> ListByResourceGroupNext(this IGlobalSchedulesOperations operations, string nextPageLink)
 {
     return(operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Updates a schedule's target resource Id. 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='name'>
 /// The name of the schedule.
 /// </param>
 /// <param name='retargetScheduleProperties'>
 /// Properties for retargeting a virtual machine schedule.
 /// </param>
 public static void BeginRetarget(this IGlobalSchedulesOperations operations, string resourceGroupName, string name, RetargetScheduleProperties retargetScheduleProperties)
 {
     operations.BeginRetargetAsync(resourceGroupName, name, retargetScheduleProperties).GetAwaiter().GetResult();
 }
 /// <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='name'>
 /// The name of the schedule.
 /// </param>
 public static void BeginExecute(this IGlobalSchedulesOperations operations, string resourceGroupName, string name)
 {
     operations.BeginExecuteAsync(resourceGroupName, name).GetAwaiter().GetResult();
 }
 /// <summary>
 /// List schedules in a subscription.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 public static IPage <Schedule> ListBySubscription(this IGlobalSchedulesOperations operations, ODataQuery <Schedule> odataQuery = default(ODataQuery <Schedule>))
 {
     return(operations.ListBySubscriptionAsync(odataQuery).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Modify properties of schedules.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='name'>
 /// The name of the schedule.
 /// </param>
 /// <param name='schedule'>
 /// A schedule.
 /// </param>
 public static Schedule Update(this IGlobalSchedulesOperations operations, string resourceGroupName, string name, ScheduleFragment schedule)
 {
     return(operations.UpdateAsync(resourceGroupName, name, schedule).GetAwaiter().GetResult());
 }
 /// <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='name'>
 /// The name of the schedule.
 /// </param>
 /// <param name='expand'>
 /// Specify the $expand query. Example: 'properties($select=status)'
 /// </param>
 public static Schedule Get(this IGlobalSchedulesOperations operations, string resourceGroupName, string name, string expand = default(string))
 {
     return(operations.GetAsync(resourceGroupName, name, expand).GetAwaiter().GetResult());
 }