forked from Azure/azure-sdk-for-net
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Storage] Support Manage File Share (Azure#7550)
- Loading branch information
Showing
23 changed files
with
7,230 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
797 changes: 797 additions & 0 deletions
797
sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/FileServicesOperations.cs
Large diffs are not rendered by default.
Oops, something went wrong.
179 changes: 179 additions & 0 deletions
179
...rage/Microsoft.Azure.Management.Storage/src/Generated/FileServicesOperationsExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} | ||
|
||
} | ||
} |
Oops, something went wrong.