예제 #1
0
 /// <summary>
 /// Creates a new share under the specified account as described by request
 /// body. The share resource includes metadata and properties for that share.
 /// It does not include a list of the files contained by the share.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group within the user's subscription. The name is
 /// case insensitive.
 /// </param>
 /// <param name='accountName'>
 /// The name of the storage account within the specified resource group.
 /// Storage account names must be between 3 and 24 characters in length and use
 /// numbers and lower-case letters only.
 /// </param>
 /// <param name='shareName'>
 /// The name of the file share within the specified storage account. File share
 /// names must be between 3 and 63 characters in length and use numbers,
 /// lower-case letters and dash (-) only. Every dash (-) character must be
 /// immediately preceded and followed by a letter or number.
 /// </param>
 /// <param name='metadata'>
 /// A name-value pair to associate with the share as metadata.
 /// </param>
 /// <param name='shareQuota'>
 /// The maximum size of the share, in gigabytes. Must be greater than 0, and
 /// less than or equal to 5TB (5120). For Large File Shares, the maximum size
 /// is 102400.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <FileShare> CreateAsync(this IFileSharesOperations operations, string resourceGroupName, string accountName, string shareName, IDictionary <string, string> metadata = default(IDictionary <string, string>), int?shareQuota = default(int?), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, accountName, shareName, metadata, shareQuota, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
예제 #2
0
 /// <summary>
 /// Creates a new share under the specified account as described by request
 /// body. The share resource includes metadata and properties for that share.
 /// It does not include a list of the files contained by the share.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group within the user's subscription. The name is
 /// case insensitive.
 /// </param>
 /// <param name='accountName'>
 /// The name of the storage account within the specified resource group.
 /// Storage account names must be between 3 and 24 characters in length and use
 /// numbers and lower-case letters only.
 /// </param>
 /// <param name='shareName'>
 /// The name of the file share within the specified storage account. File share
 /// names must be between 3 and 63 characters in length and use numbers,
 /// lower-case letters and dash (-) only. Every dash (-) character must be
 /// immediately preceded and followed by a letter or number.
 /// </param>
 /// <param name='fileShare'>
 /// Properties of the file share to create.
 /// </param>
 /// <param name='expand'>
 /// Optional, used to expand the properties within share's properties. Valid
 /// values are: snapshots. Should be passed as a string with delimiter ','
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <FileShare> CreateAsync(this IFileSharesOperations operations, string resourceGroupName, string accountName, string shareName, FileShare fileShare, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, accountName, shareName, fileShare, expand, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }