/// <summary> /// Updates network profile tags. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='networkProfileName'> /// The name of the network profile. /// </param> /// <param name='parameters'> /// Parameters supplied to update network profile tags. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <NetworkProfile> UpdateTagsAsync(this INetworkProfilesOperations operations, string resourceGroupName, string networkProfileName, TagsObject parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UpdateTagsWithHttpMessagesAsync(resourceGroupName, networkProfileName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets the specified network profile in a specified 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='networkProfileName'> /// The name of the public IP prefix. /// </param> /// <param name='expand'> /// Expands referenced resources. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <NetworkProfile> GetAsync(this INetworkProfilesOperations operations, string resourceGroupName, string networkProfileName, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, networkProfileName, expand, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets all network profiles 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 <NetworkProfile> > ListNextAsync(this INetworkProfilesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets all network profiles 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='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <NetworkProfileInner> > ListAsync(this INetworkProfilesOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Updates network profile tags. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='networkProfileName'> /// The name of the network profile. /// </param> /// <param name='tags'> /// Resource tags. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <NetworkProfileInner> UpdateTagsAsync(this INetworkProfilesOperations operations, string resourceGroupName, string networkProfileName, IDictionary <string, string> tags = default(IDictionary <string, string>), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UpdateTagsWithHttpMessagesAsync(resourceGroupName, networkProfileName, tags, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets the specified network profile in a specified 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='networkProfileName'> /// The name of the public IP prefix. /// </param> /// <param name='expand'> /// Expands referenced resources. /// </param> public static NetworkProfile Get(this INetworkProfilesOperations operations, string resourceGroupName, string networkProfileName, string expand = default(string)) { return(operations.GetAsync(resourceGroupName, networkProfileName, expand).GetAwaiter().GetResult()); }
/// <summary> /// Deletes the specified network 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='networkProfileName'> /// The name of the NetworkProfile. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this INetworkProfilesOperations operations, string resourceGroupName, string networkProfileName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, networkProfileName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Deletes the specified network 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='networkProfileName'> /// The name of the NetworkProfile. /// </param> public static void Delete(this INetworkProfilesOperations operations, string resourceGroupName, string networkProfileName) { operations.DeleteAsync(resourceGroupName, networkProfileName).GetAwaiter().GetResult(); }
/// <summary> /// Gets all network profiles 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 <NetworkProfile> ListNext(this INetworkProfilesOperations operations, string nextPageLink) { return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Gets all network profiles 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> public static IPage <NetworkProfile> List(this INetworkProfilesOperations operations, string resourceGroupName) { return(operations.ListAsync(resourceGroupName).GetAwaiter().GetResult()); }
/// <summary> /// Gets all the network profiles in a subscription. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static IPage <NetworkProfile> ListAll(this INetworkProfilesOperations operations) { return(operations.ListAllAsync().GetAwaiter().GetResult()); }
/// <summary> /// Updates network profile tags. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='networkProfileName'> /// The name of the network profile. /// </param> /// <param name='parameters'> /// Parameters supplied to update network profile tags. /// </param> public static NetworkProfile UpdateTags(this INetworkProfilesOperations operations, string resourceGroupName, string networkProfileName, TagsObject parameters) { return(operations.UpdateTagsAsync(resourceGroupName, networkProfileName, parameters).GetAwaiter().GetResult()); }
/// <summary> /// Creates or updates a network 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='networkProfileName'> /// The name of the network profile. /// </param> /// <param name='parameters'> /// Parameters supplied to the create or update network profile operation. /// </param> public static NetworkProfile CreateOrUpdate(this INetworkProfilesOperations operations, string resourceGroupName, string networkProfileName, NetworkProfile parameters) { return(operations.CreateOrUpdateAsync(resourceGroupName, networkProfileName, parameters).GetAwaiter().GetResult()); }