/// <summary> /// Returns a list of all scale units at a location. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the resource group. /// </param> /// <param name='location'> /// Location of the resource. /// </param> /// <param name='odataQuery'> /// OData parameters to apply to the operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <ScaleUnit> > ListAsync(this IScaleUnitsOperations operations, string resourceGroupName, string location, ODataQuery <ScaleUnit> odataQuery = default(ODataQuery <ScaleUnit>), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, location, odataQuery, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Returns a list of all scale units at a location. /// </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 <ScaleUnit> > ListNextAsync(this IScaleUnitsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Returns the requested scale unit. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the resource group. /// </param> /// <param name='location'> /// Location of the resource. /// </param> /// <param name='scaleUnit'> /// Name of the scale units. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ScaleUnit> GetAsync(this IScaleUnitsOperations operations, string resourceGroupName, string location, string scaleUnit, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, location, scaleUnit, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Add a new scale unit. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the resource group. /// </param> /// <param name='location'> /// Location of the resource. /// </param> /// <param name='scaleUnit'> /// Name of the scale units. /// </param> /// <param name='creationData'> /// A list of input data that allows for creating the new scale unit. /// </param> public static void CreateFromJson(this IScaleUnitsOperations operations, string resourceGroupName, string location, string scaleUnit, CreateFromJsonScaleUnitParametersList creationData) { operations.CreateFromJsonAsync(resourceGroupName, location, scaleUnit, creationData).GetAwaiter().GetResult(); }
/// <summary> /// Scales out a scale unit. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the resource group. /// </param> /// <param name='location'> /// Location of the resource. /// </param> /// <param name='scaleUnit'> /// Name of the scale units. /// </param> /// <param name='scaleUnitNodeParameters'> /// A list of input data that allows for adding a set of scale unit nodes. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task ScaleOutAsync(this IScaleUnitsOperations operations, string resourceGroupName, string location, string scaleUnit, ScaleOutScaleUnitParametersList scaleUnitNodeParameters, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.ScaleOutWithHttpMessagesAsync(resourceGroupName, location, scaleUnit, scaleUnitNodeParameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Scales out a scale unit. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the resource group. /// </param> /// <param name='location'> /// Location of the resource. /// </param> /// <param name='scaleUnit'> /// Name of the scale units. /// </param> /// <param name='scaleUnitNodeParameters'> /// A list of input data that allows for adding a set of scale unit nodes. /// </param> public static void ScaleOut(this IScaleUnitsOperations operations, string resourceGroupName, string location, string scaleUnit, ScaleOutScaleUnitParametersList scaleUnitNodeParameters) { operations.ScaleOutAsync(resourceGroupName, location, scaleUnit, scaleUnitNodeParameters).GetAwaiter().GetResult(); }
/// <summary> /// Returns a list of all scale units at a location. /// </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 <ScaleUnit> ListNext(this IScaleUnitsOperations operations, string nextPageLink) { return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Add a new scale unit. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the resource group. /// </param> /// <param name='location'> /// Location of the resource. /// </param> /// <param name='scaleUnit'> /// Name of the scale units. /// </param> /// <param name='creationData'> /// A list of input data that allows for creating the new scale unit. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginCreateFromJsonAsync(this IScaleUnitsOperations operations, string resourceGroupName, string location, string scaleUnit, CreateFromJsonScaleUnitParametersList creationData, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginCreateFromJsonWithHttpMessagesAsync(resourceGroupName, location, scaleUnit, creationData, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Returns a list of all scale units at a location. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the resource group. /// </param> /// <param name='location'> /// Location of the resource. /// </param> /// <param name='odataQuery'> /// OData parameters to apply to the operation. /// </param> public static IPage <ScaleUnit> List(this IScaleUnitsOperations operations, string resourceGroupName, string location, ODataQuery <ScaleUnit> odataQuery = default(ODataQuery <ScaleUnit>)) { return(operations.ListAsync(resourceGroupName, location, odataQuery).GetAwaiter().GetResult()); }
/// <summary> /// Returns the requested scale unit. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the resource group. /// </param> /// <param name='location'> /// Location of the resource. /// </param> /// <param name='scaleUnit'> /// Name of the scale units. /// </param> public static ScaleUnit Get(this IScaleUnitsOperations operations, string resourceGroupName, string location, string scaleUnit) { return(operations.GetAsync(resourceGroupName, location, scaleUnit).GetAwaiter().GetResult()); }