/// <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, RetargetScheduleProperties retargetScheduleProperties, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginRetargetWithHttpMessagesAsync(resourceGroupName, name, retargetScheduleProperties, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <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(); }