示例#1
0
 /// <summary>
 /// Creates or updates a volume resource.
 /// </summary>
 /// <remarks>
 /// Creates a volume resource with the specified name, description and
 /// properties. If a volume resource with the same name exists, then it is
 /// updated with the specified description and properties.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Azure resource group name
 /// </param>
 /// <param name='volumeResourceName'>
 /// The identity of the volume.
 /// </param>
 /// <param name='volumeResourceDescription'>
 /// Description for creating a Volume resource.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <VolumeResourceDescription> CreateAsync(this IVolumeOperations operations, string resourceGroupName, string volumeResourceName, VolumeResourceDescription volumeResourceDescription, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, volumeResourceName, volumeResourceDescription, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#2
0
 /// <summary>
 /// Gets the volume resource with the given name.
 /// </summary>
 /// <remarks>
 /// Gets the information about the volume resource with the given name. The
 /// information include the description and other properties of the volume.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Azure resource group name
 /// </param>
 /// <param name='volumeResourceName'>
 /// The identity of the volume.
 /// </param>
 public static VolumeResourceDescription Get(this IVolumeOperations operations, string resourceGroupName, string volumeResourceName)
 {
     return(operations.GetAsync(resourceGroupName, volumeResourceName).GetAwaiter().GetResult());
 }
示例#3
0
 /// <summary>
 /// Gets all the volume resources in a given subscription.
 /// </summary>
 /// <remarks>
 /// Gets the information about all volume resources in a given resource group.
 /// The information include the description and other properties of the volume.
 /// </remarks>
 /// <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 <VolumeResourceDescription> > ListBySubscriptionNextAsync(this IVolumeOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListBySubscriptionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#4
0
 /// <summary>
 /// Gets all the volume resources in a given subscription.
 /// </summary>
 /// <remarks>
 /// Gets the information about all volume resources in a given resource group.
 /// The information include the description and other properties of the volume.
 /// </remarks>
 /// <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 <VolumeResourceDescription> ListBySubscriptionNext(this IVolumeOperations operations, string nextPageLink)
 {
     return(operations.ListBySubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
示例#5
0
 /// <summary>
 /// Gets all the volume resources in a given subscription.
 /// </summary>
 /// <remarks>
 /// Gets the information about all volume resources in a given resource group.
 /// The information include the description and other properties of the volume.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IPage <VolumeResourceDescription> ListBySubscription(this IVolumeOperations operations)
 {
     return(operations.ListBySubscriptionAsync().GetAwaiter().GetResult());
 }
示例#6
0
 /// <summary>
 /// Gets all the volume resources in a given resource group.
 /// </summary>
 /// <remarks>
 /// Gets the information about all volume resources in a given resource group.
 /// The information include the description and other properties of the Volume.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Azure resource group name
 /// </param>
 public static IPage <VolumeResourceDescription> ListByResourceGroup(this IVolumeOperations operations, string resourceGroupName)
 {
     return(operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult());
 }
示例#7
0
 /// <summary>
 /// Deletes the volume resource.
 /// </summary>
 /// <remarks>
 /// Deletes the volume resource identified by the name.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Azure resource group name
 /// </param>
 /// <param name='volumeResourceName'>
 /// The identity of the volume.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IVolumeOperations operations, string resourceGroupName, string volumeResourceName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, volumeResourceName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
示例#8
0
 /// <summary>
 /// Deletes the volume resource.
 /// </summary>
 /// <remarks>
 /// Deletes the volume resource identified by the name.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Azure resource group name
 /// </param>
 /// <param name='volumeResourceName'>
 /// The identity of the volume.
 /// </param>
 public static void Delete(this IVolumeOperations operations, string resourceGroupName, string volumeResourceName)
 {
     operations.DeleteAsync(resourceGroupName, volumeResourceName).GetAwaiter().GetResult();
 }