/// <summary> /// The operation that retrieves information about a capacity reservation /// 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='capacityReservationGroupName'> /// The name of the capacity reservation group. /// </param> /// <param name='expand'> /// The expand expression to apply on the operation. 'InstanceView' will /// retrieve the list of instance views of the capacity reservations under the /// capacity reservation group which is a snapshot of the runtime properties of /// a capacity reservation that is managed by the platform and can change /// outside of control plane operations. Possible values include: /// 'instanceView' /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <CapacityReservationGroup> GetAsync(this ICapacityReservationGroupsOperations operations, string resourceGroupName, string capacityReservationGroupName, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, capacityReservationGroupName, expand, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// The operation to create or update a capacity reservation group. When /// updating a capacity reservation group, only tags may be modified. Please /// refer to https://aka.ms/CapacityReservation for more details. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='capacityReservationGroupName'> /// The name of the capacity reservation group. /// </param> /// <param name='parameters'> /// Parameters supplied to the Create capacity reservation Group. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <CapacityReservationGroup> CreateOrUpdateAsync(this ICapacityReservationGroupsOperations operations, string resourceGroupName, string capacityReservationGroupName, CapacityReservationGroup parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, capacityReservationGroupName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// The operation to update a capacity reservation group. When updating a /// capacity reservation group, only tags may be modified. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='capacityReservationGroupName'> /// The name of the capacity reservation group. /// </param> /// <param name='tags'> /// Resource tags /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <CapacityReservationGroup> UpdateAsync(this ICapacityReservationGroupsOperations operations, string resourceGroupName, string capacityReservationGroupName, IDictionary <string, string> tags = default(IDictionary <string, string>), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, capacityReservationGroupName, tags, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// The operation to update a capacity reservation group. When updating a /// capacity reservation group, only tags may be modified. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='capacityReservationGroupName'> /// The name of the capacity reservation group. /// </param> /// <param name='tags'> /// Resource tags /// </param> public static CapacityReservationGroup Update(this ICapacityReservationGroupsOperations operations, string resourceGroupName, string capacityReservationGroupName, IDictionary <string, string> tags = default(IDictionary <string, string>)) { return(operations.UpdateAsync(resourceGroupName, capacityReservationGroupName, tags).GetAwaiter().GetResult()); }
/// <summary> /// The operation to create or update a capacity reservation group. When /// updating a capacity reservation group, only tags may be modified. Please /// refer to https://aka.ms/CapacityReservation for more details. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='capacityReservationGroupName'> /// The name of the capacity reservation group. /// </param> /// <param name='parameters'> /// Parameters supplied to the Create capacity reservation Group. /// </param> public static CapacityReservationGroup CreateOrUpdate(this ICapacityReservationGroupsOperations operations, string resourceGroupName, string capacityReservationGroupName, CapacityReservationGroup parameters) { return(operations.CreateOrUpdateAsync(resourceGroupName, capacityReservationGroupName, parameters).GetAwaiter().GetResult()); }
/// <summary> /// Lists all of the capacity reservation groups in the subscription. Use the /// nextLink property in the response to get the next page of capacity /// reservation groups. /// </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 <CapacityReservationGroup> > ListBySubscriptionNextAsync(this ICapacityReservationGroupsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListBySubscriptionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists all of the capacity reservation groups in the subscription. Use the /// nextLink property in the response to get the next page of capacity /// reservation groups. /// </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 <CapacityReservationGroup> ListBySubscriptionNext(this ICapacityReservationGroupsOperations operations, string nextPageLink) { return(operations.ListBySubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Lists all of the capacity reservation groups in the subscription. Use the /// nextLink property in the response to get the next page of capacity /// reservation groups. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='expand'> /// The expand expression to apply on the operation. Based on the expand /// param(s) specified we return Virtual Machine or ScaleSet VM Instance or /// both resource Ids which are associated to capacity reservation group in the /// response. Possible values include: 'virtualMachineScaleSetVMs/$ref', /// 'virtualMachines/$ref' /// </param> public static IPage <CapacityReservationGroup> ListBySubscription(this ICapacityReservationGroupsOperations operations, string expand = default(string)) { return(operations.ListBySubscriptionAsync(expand).GetAwaiter().GetResult()); }
/// <summary> /// Lists all of the capacity reservation groups in the specified resource /// group. Use the nextLink property in the response to get the next page of /// capacity reservation groups. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='expand'> /// The expand expression to apply on the operation. Based on the expand /// param(s) specified we return Virtual Machine or ScaleSet VM Instance or /// both resource Ids which are associated to capacity reservation group in the /// response. Possible values include: 'virtualMachineScaleSetVMs/$ref', /// 'virtualMachines/$ref' /// </param> public static IPage <CapacityReservationGroup> ListByResourceGroup(this ICapacityReservationGroupsOperations operations, string resourceGroupName, string expand = default(string)) { return(operations.ListByResourceGroupAsync(resourceGroupName, expand).GetAwaiter().GetResult()); }
/// <summary> /// The operation that retrieves information about a capacity reservation /// 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='capacityReservationGroupName'> /// The name of the capacity reservation group. /// </param> /// <param name='expand'> /// The expand expression to apply on the operation. 'InstanceView' will /// retrieve the list of instance views of the capacity reservations under the /// capacity reservation group which is a snapshot of the runtime properties of /// a capacity reservation that is managed by the platform and can change /// outside of control plane operations. Possible values include: /// 'instanceView' /// </param> public static CapacityReservationGroup Get(this ICapacityReservationGroupsOperations operations, string resourceGroupName, string capacityReservationGroupName, string expand = default(string)) { return(operations.GetAsync(resourceGroupName, capacityReservationGroupName, expand).GetAwaiter().GetResult()); }
/// <summary> /// The operation to delete a capacity reservation group. This operation is /// allowed only if all the associated resources are disassociated from the /// reservation group and all capacity reservations under the reservation group /// have also been deleted. Please refer to https://aka.ms/CapacityReservation /// for more details. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='capacityReservationGroupName'> /// The name of the capacity reservation group. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this ICapacityReservationGroupsOperations operations, string resourceGroupName, string capacityReservationGroupName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, capacityReservationGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// The operation to delete a capacity reservation group. This operation is /// allowed only if all the associated resources are disassociated from the /// reservation group and all capacity reservations under the reservation group /// have also been deleted. Please refer to https://aka.ms/CapacityReservation /// for more details. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='capacityReservationGroupName'> /// The name of the capacity reservation group. /// </param> public static void Delete(this ICapacityReservationGroupsOperations operations, string resourceGroupName, string capacityReservationGroupName) { operations.DeleteAsync(resourceGroupName, capacityReservationGroupName).GetAwaiter().GetResult(); }