/// <summary> /// List service fabrics in a given user profile. /// </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='userName'> /// The name of the user profile. /// </param> /// <param name='odataQuery'> /// OData parameters to apply to the operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <ServiceFabric> > ListAsync(this IServiceFabricsOperations operations, string resourceGroupName, string labName, string userName, ODataQuery <ServiceFabric> odataQuery = default(ODataQuery <ServiceFabric>), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, labName, userName, odataQuery, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// List service fabrics in a given user profile. /// </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 <ServiceFabric> > ListNextAsync(this IServiceFabricsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Create or replace an existing Service Fabric. 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='userName'> /// The name of the user profile. /// </param> /// <param name='name'> /// The name of the service Fabric. /// </param> /// <param name='serviceFabric'> /// A Service Fabric. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ServiceFabric> BeginCreateOrUpdateAsync(this IServiceFabricsOperations operations, string resourceGroupName, string labName, string userName, string name, ServiceFabric serviceFabric, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, labName, userName, name, serviceFabric, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists the applicable start/stop schedules, if any. /// </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='userName'> /// The name of the user profile. /// </param> /// <param name='name'> /// The name of the service Fabric. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ApplicableSchedule> ListApplicableSchedulesAsync(this IServiceFabricsOperations operations, string resourceGroupName, string labName, string userName, string name, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListApplicableSchedulesWithHttpMessagesAsync(resourceGroupName, labName, userName, name, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get service fabric. /// </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='userName'> /// The name of the user profile. /// </param> /// <param name='name'> /// The name of the service Fabric. /// </param> /// <param name='expand'> /// Specify the $expand query. Example: /// 'properties($expand=applicableSchedule)' /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ServiceFabric> GetAsync(this IServiceFabricsOperations operations, string resourceGroupName, string labName, string userName, string name, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, labName, userName, name, expand, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get service fabric. /// </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='userName'> /// The name of the user profile. /// </param> /// <param name='name'> /// The name of the service Fabric. /// </param> /// <param name='expand'> /// Specify the $expand query. Example: /// 'properties($expand=applicableSchedule)' /// </param> public static ServiceFabric Get(this IServiceFabricsOperations operations, string resourceGroupName, string labName, string userName, string name, string expand = default(string)) { return(operations.GetAsync(resourceGroupName, labName, userName, name, expand).GetAwaiter().GetResult()); }
/// <summary> /// List service fabrics in a given user profile. /// </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 <ServiceFabric> ListNext(this IServiceFabricsOperations operations, string nextPageLink) { return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Stop a service fabric 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='userName'> /// The name of the user profile. /// </param> /// <param name='name'> /// The name of the service Fabric. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginStopAsync(this IServiceFabricsOperations operations, string resourceGroupName, string labName, string userName, string name, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginStopWithHttpMessagesAsync(resourceGroupName, labName, userName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Stop a service fabric 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='userName'> /// The name of the user profile. /// </param> /// <param name='name'> /// The name of the service Fabric. /// </param> public static void BeginStop(this IServiceFabricsOperations operations, string resourceGroupName, string labName, string userName, string name) { operations.BeginStopAsync(resourceGroupName, labName, userName, name).GetAwaiter().GetResult(); }
/// <summary> /// Create or replace an existing Service Fabric. 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='userName'> /// The name of the user profile. /// </param> /// <param name='name'> /// The name of the service Fabric. /// </param> /// <param name='serviceFabric'> /// A Service Fabric. /// </param> public static ServiceFabric BeginCreateOrUpdate(this IServiceFabricsOperations operations, string resourceGroupName, string labName, string userName, string name, ServiceFabric serviceFabric) { return(operations.BeginCreateOrUpdateAsync(resourceGroupName, labName, userName, name, serviceFabric).GetAwaiter().GetResult()); }
/// <summary> /// List service fabrics in a given user profile. /// </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='userName'> /// The name of the user profile. /// </param> /// <param name='odataQuery'> /// OData parameters to apply to the operation. /// </param> public static IPage <ServiceFabric> List(this IServiceFabricsOperations operations, string resourceGroupName, string labName, string userName, ODataQuery <ServiceFabric> odataQuery = default(ODataQuery <ServiceFabric>)) { return(operations.ListAsync(resourceGroupName, labName, userName, odataQuery).GetAwaiter().GetResult()); }
/// <summary> /// Lists the applicable start/stop schedules, if any. /// </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='userName'> /// The name of the user profile. /// </param> /// <param name='name'> /// The name of the service Fabric. /// </param> public static ApplicableSchedule ListApplicableSchedules(this IServiceFabricsOperations operations, string resourceGroupName, string labName, string userName, string name) { return(operations.ListApplicableSchedulesAsync(resourceGroupName, labName, userName, name).GetAwaiter().GetResult()); }