/// <summary> /// Lists all shares. /// </summary> /// <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 <FileShareItem> > ListNextAsync(this IFileSharesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists all shares. /// </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='maxpagesize'> /// Optional. Specified maximum number of shares that can be included in the /// list. /// </param> /// <param name='filter'> /// Optional. When specified, only share names starting with the filter will be /// listed. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <FileShareItem> > ListAsync(this IFileSharesOperations operations, string resourceGroupName, string accountName, string maxpagesize = default(string), string filter = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, accountName, maxpagesize, filter, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets properties of a specified 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='cancellationToken'> /// The cancellation token. /// </param> public static async Task <FileShare> GetAsync(this IFileSharesOperations operations, string resourceGroupName, string accountName, string shareName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, accountName, shareName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets the file share metrics /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deviceName'> /// The device name. /// </param> /// <param name='fileServerName'> /// The file server name. /// </param> /// <param name='shareName'> /// The file share name. /// </param> /// <param name='resourceGroupName'> /// The resource group name /// </param> /// <param name='managerName'> /// The manager name /// </param> /// <param name='odataQuery'> /// OData parameters to apply to the operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IEnumerable <Metrics> > ListMetricsAsync(this IFileSharesOperations operations, string deviceName, string fileServerName, string shareName, string resourceGroupName, string managerName, ODataQuery <MetricFilter> odataQuery = default(ODataQuery <MetricFilter>), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListMetricsWithHttpMessagesAsync(deviceName, fileServerName, shareName, resourceGroupName, managerName, odataQuery, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// The Lease Share operation establishes and manages a lock on a share for /// delete operations. The lock duration can be 15 to 60 seconds, or can be /// infinite. /// </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='parameters'> /// Lease Share request body. /// </param> /// <param name='xMsSnapshot'> /// Optional. Specify the snapshot time to lease a snapshot. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <LeaseShareResponse> LeaseAsync(this IFileSharesOperations operations, string resourceGroupName, string accountName, string shareName, LeaseShareRequest parameters = default(LeaseShareRequest), string xMsSnapshot = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.LeaseWithHttpMessagesAsync(resourceGroupName, accountName, shareName, parameters, xMsSnapshot, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Creates or updates the file share. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deviceName'> /// The device name. /// </param> /// <param name='fileServerName'> /// The file server name. /// </param> /// <param name='shareName'> /// The file share name. /// </param> /// <param name='fileShare'> /// The file share. /// </param> /// <param name='resourceGroupName'> /// The resource group name /// </param> /// <param name='managerName'> /// The manager name /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <FileShare> BeginCreateOrUpdateAsync(this IFileSharesOperations operations, string deviceName, string fileServerName, string shareName, FileShare fileShare, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(deviceName, fileServerName, shareName, fileShare, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <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 create a snapshot. Possible values include: 'snapshots' /// </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, PutSharesExpand?expand = default(PutSharesExpand?), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, accountName, shareName, fileShare, expand, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Returns a list of all fabric file shares at a certain location. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the resource group. /// </param> /// <param name='location'> /// Location of the resource. /// </param> /// <param name='odataQuery'> /// OData parameters to apply to the operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IEnumerable <FileShare> > ListAsync(this IFileSharesOperations operations, string resourceGroupName, string location, ODataQuery <FileShare> odataQuery = default(ODataQuery <FileShare>), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, location, odataQuery, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Retrieves all the file shares in a file server. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deviceName'> /// The device name. /// </param> /// <param name='fileServerName'> /// The file server name. /// </param> /// <param name='resourceGroupName'> /// The resource group name /// </param> /// <param name='managerName'> /// The manager name /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IEnumerable <FileShare> > ListByFileServerAsync(this IFileSharesOperations operations, string deviceName, string fileServerName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByFileServerWithHttpMessagesAsync(deviceName, fileServerName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Updates share properties as specified in request body. Properties not /// mentioned in the request will not be changed. Update fails if the specified /// share does not already exist. /// </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> UpdateAsync(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.UpdateWithHttpMessagesAsync(resourceGroupName, accountName, shareName, metadata, shareQuota, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { Operations = new Operations(this); Skus = new SkusOperations(this); StorageAccounts = new StorageAccountsOperations(this); Usages = new UsagesOperations(this); ManagementPolicies = new ManagementPoliciesOperations(this); PrivateEndpointConnections = new PrivateEndpointConnectionsOperations(this); PrivateLinkResources = new PrivateLinkResourcesOperations(this); ObjectReplicationPolicies = new ObjectReplicationPoliciesOperations(this); EncryptionScopes = new EncryptionScopesOperations(this); BlobServices = new BlobServicesOperations(this); BlobContainers = new BlobContainersOperations(this); FileServices = new FileServicesOperations(this); FileShares = new FileSharesOperations(this); BaseUri = new System.Uri("https://management.azure.com"); ApiVersion = "2019-06-01"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; SerializationSettings = new JsonSerializerSettings { Formatting = Newtonsoft.Json.Formatting.Indented, DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; SerializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings = new JsonSerializerSettings { DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; CustomInitialize(); DeserializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); }
/// <summary> /// The Lease Share operation establishes and manages a lock on a share for /// delete operations. The lock duration can be 15 to 60 seconds, or can be /// infinite. /// </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='parameters'> /// Lease Share request body. /// </param> /// <param name='xMsSnapshot'> /// Optional. Specify the snapshot time to lease a snapshot. /// </param> public static LeaseShareResponse Lease(this IFileSharesOperations operations, string resourceGroupName, string accountName, string shareName, LeaseShareRequest parameters = default(LeaseShareRequest), string xMsSnapshot = default(string)) { return(operations.LeaseAsync(resourceGroupName, accountName, shareName, parameters, xMsSnapshot).GetAwaiter().GetResult()); }
/// <summary> /// Restore a file share within a valid retention days if share soft delete is /// enabled /// </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='deletedShareName'> /// Required. Identify the name of the deleted share that will be restored. /// </param> /// <param name='deletedShareVersion'> /// Required. Identify the version of the deleted share that will be restored. /// </param> public static void Restore(this IFileSharesOperations operations, string resourceGroupName, string accountName, string shareName, string deletedShareName, string deletedShareVersion) { operations.RestoreAsync(resourceGroupName, accountName, shareName, deletedShareName, deletedShareVersion).GetAwaiter().GetResult(); }
/// <summary> /// Deletes specified share under its account. /// </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='xMsSnapshot'> /// Optional, used to delete a snapshot. /// </param> /// <param name='include'> /// Optional. Valid values are: snapshots, leased-snapshots, none. The default /// value is snapshots. For 'snapshots', the file share is deleted including /// all of its file share snapshots. If the file share contains /// leased-snapshots, the deletion fails. For 'leased-snapshots', the file /// share is deleted included all of its file share snapshots /// (leased/unleased). For 'none', the file share is deleted if it has no share /// snapshots. If the file share contains any snapshots (leased or unleased), /// the deletion fails. /// </param> public static void Delete(this IFileSharesOperations operations, string resourceGroupName, string accountName, string shareName, string xMsSnapshot = default(string), string include = default(string)) { operations.DeleteAsync(resourceGroupName, accountName, shareName, xMsSnapshot, include).GetAwaiter().GetResult(); }
/// <summary> /// Deletes the file share. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deviceName'> /// The device name. /// </param> /// <param name='fileServerName'> /// The file server name. /// </param> /// <param name='shareName'> /// The file share Name /// </param> /// <param name='resourceGroupName'> /// The resource group name /// </param> /// <param name='managerName'> /// The manager name /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginDeleteAsync(this IFileSharesOperations operations, string deviceName, string fileServerName, string shareName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginDeleteWithHttpMessagesAsync(deviceName, fileServerName, shareName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Gets properties of a specified 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> public static FileShare Get(this IFileSharesOperations operations, string resourceGroupName, string accountName, string shareName) { return(operations.GetAsync(resourceGroupName, accountName, shareName).GetAwaiter().GetResult()); }
/// <summary> /// Returns a list of all fabric file shares at a certain location. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the resource group. /// </param> /// <param name='location'> /// Location of the resource. /// </param> /// <param name='odataQuery'> /// OData parameters to apply to the operation. /// </param> public static IEnumerable <FileShare> List(this IFileSharesOperations operations, string resourceGroupName, string location, ODataQuery <FileShare> odataQuery = default(ODataQuery <FileShare>)) { return(operations.ListAsync(resourceGroupName, location, odataQuery).GetAwaiter().GetResult()); }
/// <summary> /// Returns the requested fabric file share. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the resource group. /// </param> /// <param name='location'> /// Location of the resource. /// </param> /// <param name='fileShare'> /// Fabric file share name. /// </param> public static FileShare Get(this IFileSharesOperations operations, string resourceGroupName, string location, string fileShare) { return(operations.GetAsync(resourceGroupName, location, fileShare).GetAwaiter().GetResult()); }
/// <summary> /// Returns the properties of the specified file share name. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deviceName'> /// The device name. /// </param> /// <param name='fileServerName'> /// The file server name. /// </param> /// <param name='shareName'> /// The file share name. /// </param> /// <param name='resourceGroupName'> /// The resource group name /// </param> /// <param name='managerName'> /// The manager name /// </param> public static FileShare Get(this IFileSharesOperations operations, string deviceName, string fileServerName, string shareName, string resourceGroupName, string managerName) { return(operations.GetAsync(deviceName, fileServerName, shareName, resourceGroupName, managerName).GetAwaiter().GetResult()); }
/// <summary> /// Updates share properties as specified in request body. Properties not /// mentioned in the request will not be changed. Update fails if the specified /// share does not already exist. /// </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> public static FileShare Update(this IFileSharesOperations operations, string resourceGroupName, string accountName, string shareName, IDictionary <string, string> metadata = default(IDictionary <string, string>), int?shareQuota = default(int?)) { return(operations.UpdateAsync(resourceGroupName, accountName, shareName, metadata, shareQuota).GetAwaiter().GetResult()); }
/// <summary> /// Deletes specified share under its account. /// </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> public static void Delete(this IFileSharesOperations operations, string resourceGroupName, string accountName, string shareName) { operations.DeleteAsync(resourceGroupName, accountName, shareName).GetAwaiter().GetResult(); }
/// <summary> /// Lists all shares. /// </summary> /// <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 <FileShareItem> ListNext(this IFileSharesOperations operations, string nextPageLink) { return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Gets properties of a specified 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='expand'> /// Optional, used to expand the properties within share's properties. Possible /// values include: 'stats' /// </param> public static FileShare Get(this IFileSharesOperations operations, string resourceGroupName, string accountName, string shareName, GetShareExpand?expand = default(GetShareExpand?)) { return(operations.GetAsync(resourceGroupName, accountName, shareName, expand).GetAwaiter().GetResult()); }
/// <summary> /// Deletes the file share. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deviceName'> /// The device name. /// </param> /// <param name='fileServerName'> /// The file server name. /// </param> /// <param name='shareName'> /// The file share Name /// </param> /// <param name='resourceGroupName'> /// The resource group name /// </param> /// <param name='managerName'> /// The manager name /// </param> public static void BeginDelete(this IFileSharesOperations operations, string deviceName, string fileServerName, string shareName, string resourceGroupName, string managerName) { operations.BeginDeleteAsync(deviceName, fileServerName, shareName, resourceGroupName, managerName).GetAwaiter().GetResult(); }
/// <summary> /// Deletes specified share under its account. /// </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='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this IFileSharesOperations operations, string resourceGroupName, string accountName, string shareName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, accountName, shareName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Lists all shares. /// </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='maxpagesize'> /// Optional. Specified maximum number of shares that can be included in the /// list. /// </param> /// <param name='filter'> /// Optional. When specified, only share names starting with the filter will be /// listed. /// </param> public static IPage <FileShareItem> List(this IFileSharesOperations operations, string resourceGroupName, string accountName, string maxpagesize = default(string), string filter = default(string)) { return(operations.ListAsync(resourceGroupName, accountName, maxpagesize, filter).GetAwaiter().GetResult()); }
/// <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> public static FileShare Create(this IFileSharesOperations operations, string resourceGroupName, string accountName, string shareName, FileShare fileShare, string expand = default(string)) { return(operations.CreateAsync(resourceGroupName, accountName, shareName, fileShare, expand).GetAwaiter().GetResult()); }
/// <summary> /// Retrieves all the file shares in a file server. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deviceName'> /// The device name. /// </param> /// <param name='fileServerName'> /// The file server name. /// </param> /// <param name='resourceGroupName'> /// The resource group name /// </param> /// <param name='managerName'> /// The manager name /// </param> public static IEnumerable <FileShare> ListByFileServer(this IFileSharesOperations operations, string deviceName, string fileServerName, string resourceGroupName, string managerName) { return(operations.ListByFileServerAsync(deviceName, fileServerName, resourceGroupName, managerName).GetAwaiter().GetResult()); }
/// <summary> /// Gets properties of a specified 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='expand'> /// Optional, used to expand the properties within share's properties. Valid /// values are: stats. Should be passed as a string with delimiter ','. /// </param> /// <param name='xMsSnapshot'> /// Optional, used to retrieve properties of a snapshot. /// </param> public static FileShare Get(this IFileSharesOperations operations, string resourceGroupName, string accountName, string shareName, string expand = default(string), string xMsSnapshot = default(string)) { return(operations.GetAsync(resourceGroupName, accountName, shareName, expand, xMsSnapshot).GetAwaiter().GetResult()); }
/// <summary> /// Gets the file share metrics /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deviceName'> /// The device name. /// </param> /// <param name='fileServerName'> /// The file server name. /// </param> /// <param name='shareName'> /// The file share name. /// </param> /// <param name='resourceGroupName'> /// The resource group name /// </param> /// <param name='managerName'> /// The manager name /// </param> /// <param name='odataQuery'> /// OData parameters to apply to the operation. /// </param> public static IEnumerable <Metrics> ListMetrics(this IFileSharesOperations operations, string deviceName, string fileServerName, string shareName, string resourceGroupName, string managerName, ODataQuery <MetricFilter> odataQuery = default(ODataQuery <MetricFilter>)) { return(operations.ListMetricsAsync(deviceName, fileServerName, shareName, resourceGroupName, managerName, odataQuery).GetAwaiter().GetResult()); }