示例#1
0
 /// <summary>
 /// List all file services in storage accounts
 /// </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='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <FileServiceItems> ListAsync(this IFileServicesOperations operations, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#2
0
 /// <summary>
 /// Sets the properties of file services in storage accounts, including CORS
 /// (Cross-Origin Resource Sharing) rules.
 /// </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='cors'>
 /// Specifies CORS rules for the File service. You can include up to five
 /// CorsRule elements in the request. If no CorsRule elements are included in
 /// the request body, all CORS rules will be deleted, and CORS will be disabled
 /// for the File service.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <FileServiceProperties> SetServicePropertiesAsync(this IFileServicesOperations operations, string resourceGroupName, string accountName, CorsRules cors = default(CorsRules), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.SetServicePropertiesWithHttpMessagesAsync(resourceGroupName, accountName, cors, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#3
0
 /// <summary>
 /// Sets the properties of file services in storage accounts, including CORS
 /// (Cross-Origin Resource Sharing) rules.
 /// </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='cors'>
 /// Specifies CORS rules for the File service. You can include up to five
 /// CorsRule elements in the request. If no CorsRule elements are included in
 /// the request body, all CORS rules will be deleted, and CORS will be disabled
 /// for the File service.
 /// </param>
 public static FileServiceProperties SetServiceProperties(this IFileServicesOperations operations, string resourceGroupName, string accountName, CorsRules cors = default(CorsRules))
 {
     return(operations.SetServicePropertiesAsync(resourceGroupName, accountName, cors).GetAwaiter().GetResult());
 }
示例#4
0
 /// <summary>
 /// List all file services in storage accounts
 /// </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>
 public static FileServiceItems List(this IFileServicesOperations operations, string resourceGroupName, string accountName)
 {
     return(operations.ListAsync(resourceGroupName, accountName).GetAwaiter().GetResult());
 }
示例#5
0
 /// <summary>
 /// Gets the properties of file services in storage accounts, including CORS
 /// (Cross-Origin Resource Sharing) rules.
 /// </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>
 public static FileServiceProperties GetServiceProperties(this IFileServicesOperations operations, string resourceGroupName, string accountName)
 {
     return(operations.GetServicePropertiesAsync(resourceGroupName, accountName).GetAwaiter().GetResult());
 }