Skip to content

Commit

Permalink
[Storage] Support Manage File Share (Azure#7550)
Browse files Browse the repository at this point in the history
  • Loading branch information
blueww authored and isra-fel committed Sep 11, 2019
1 parent 81dcc13 commit 3fd9df4
Show file tree
Hide file tree
Showing 23 changed files with 7,230 additions and 7 deletions.
4 changes: 2 additions & 2 deletions eng/mgmt/mgmtmetadata/storage_resource-manager.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ Commencing code generation
Generating CSharp code
Executing AutoRest command
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/storage/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp.output-folder=C:\code\srpsdk\sdk\storage\Microsoft.Azure.Management.Storage\src\Generated
2019-08-09 07:46:40 UTC
2019-09-11 03:12:08 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
Branch: master
Commit: d753d28f32643d8062e1f7863d8f8e188dac9556
Commit: 6e6a651b6805d1811190025616f35e5a13194910
AutoRest information
Requested version: latest
Bootstrapper version: autorest@2.0.4283
5 changes: 5 additions & 0 deletions sdk/storage/Microsoft.Azure.Management.Storage/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## Microsoft.Azure.Management.Storage release notes

### Changes in 13.1.0

- Support Create/Get/List/Delete File share
- Support Get/Set File service properties

### Changes in 13.0.0

- Add back StorageManagementClient constructor that takes HttpClient as a parameter
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.Management.Storage
{
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
using System.Threading;
using System.Threading.Tasks;

/// <summary>
/// Extension methods for FileServicesOperations.
/// </summary>
public static partial class FileServicesOperationsExtensions
{
/// <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();
}

/// <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;
}
}

/// <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();
}

/// <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;
}
}

/// <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();
}

/// <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>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<FileServiceProperties> GetServicePropertiesAsync(this IFileServicesOperations operations, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.GetServicePropertiesWithHttpMessagesAsync(resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}

}
}
Loading

0 comments on commit 3fd9df4

Please sign in to comment.