Ejemplo n.º 1
0
 /// <summary>
 /// Gets the specified nat gateway 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='natGatewayName'>
 /// The name of the nat gateway.
 /// </param>
 /// <param name='expand'>
 /// Expands referenced resources.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <NatGatewayInner> GetAsync(this INatGatewaysOperations operations, string resourceGroupName, string natGatewayName, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, natGatewayName, expand, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates or updates a nat gateway.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='natGatewayName'>
 /// The name of the nat gateway.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the create or update nat gateway operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <NatGatewayInner> CreateOrUpdateAsync(this INatGatewaysOperations operations, string resourceGroupName, string natGatewayName, NatGatewayInner parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, natGatewayName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Gets all nat gateways 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 <NatGatewayInner> > ListNextAsync(this INatGatewaysOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets all nat gateways 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 <NatGateway> > ListAsync(this INatGatewaysOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Updates nat gateway 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='natGatewayName'>
 /// The name of the nat gateway.
 /// </param>
 /// <param name='tags'>
 /// Resource tags.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <NatGatewayInner> UpdateTagsAsync(this INatGatewaysOperations operations, string resourceGroupName, string natGatewayName, IDictionary <string, string> tags = default(IDictionary <string, string>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.UpdateTagsWithHttpMessagesAsync(resourceGroupName, natGatewayName, tags, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Deletes the specified nat gateway.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='natGatewayName'>
 /// The name of the nat gateway.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this INatGatewaysOperations operations, string resourceGroupName, string natGatewayName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, natGatewayName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Gets the specified nat gateway 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='natGatewayName'>
 /// The name of the nat gateway.
 /// </param>
 /// <param name='expand'>
 /// Expands referenced resources.
 /// </param>
 public static NatGateway Get(this INatGatewaysOperations operations, string resourceGroupName, string natGatewayName, string expand = default(string))
 {
     return(operations.GetAsync(resourceGroupName, natGatewayName, expand).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets all nat gateways 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 <NatGateway> ListNext(this INatGatewaysOperations operations, string nextPageLink)
 {
     return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Deletes the specified nat gateway.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='natGatewayName'>
 /// The name of the nat gateway.
 /// </param>
 public static void Delete(this INatGatewaysOperations operations, string resourceGroupName, string natGatewayName)
 {
     operations.DeleteAsync(resourceGroupName, natGatewayName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Creates or updates a nat gateway.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='natGatewayName'>
 /// The name of the nat gateway.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the create or update nat gateway operation.
 /// </param>
 public static NatGateway BeginCreateOrUpdate(this INatGatewaysOperations operations, string resourceGroupName, string natGatewayName, NatGateway parameters)
 {
     return(operations.BeginCreateOrUpdateAsync(resourceGroupName, natGatewayName, parameters).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets all nat gateways 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 <NatGateway> List(this INatGatewaysOperations operations, string resourceGroupName)
 {
     return(operations.ListAsync(resourceGroupName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets all the Nat Gateways in a subscription.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IPage <NatGateway> ListAll(this INatGatewaysOperations operations)
 {
     return(operations.ListAllAsync().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Updates nat gateway 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='natGatewayName'>
 /// The name of the nat gateway.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to update nat gateway tags.
 /// </param>
 public static NatGateway UpdateTags(this INatGatewaysOperations operations, string resourceGroupName, string natGatewayName, TagsObject parameters)
 {
     return(operations.UpdateTagsAsync(resourceGroupName, natGatewayName, parameters).GetAwaiter().GetResult());
 }