azure-sdk-for-net icon indicating copy to clipboard operation
azure-sdk-for-net copied to clipboard

[FEATURE REQ] Ability to get UniquiId of a file share in the Storage Account

Open hoainam3003 opened this issue 2 years ago • 1 comments
trafficstars

Library name

Azure.ResourceManager.Storage

Please describe the feature.

For now, there is no way to get the UniqueId of file share in a storage account. I see the UniqueId is needed for the protected item name in the backup/restore functionality. Please make it available like xMsSnapshot in this function but with a new parameter named "x-ms-file-share-unique-identifier"

public virtual async Task<Response<FileShareResource>> GetAsync(string shareName, string expand = null, string xMsSnapshot = null, CancellationToken cancellationToken = default)

and CreateGetRequest function should append it.

internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string accountName, string shareName, string expand, string xMsSnapshot, bool xMsFileShareUniqueIdentifier) { var message = _pipeline.CreateMessage(); var request = message.Request; request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Storage/storageAccounts/", false); uri.AppendPath(accountName, true); uri.AppendPath("/fileServices/default/shares/", false); uri.AppendPath(shareName, true); uri.AppendQuery("api-version", _apiVersion, true); if (expand != null) { uri.AppendQuery("$expand", expand, true); } request.Uri = uri; if (xMsSnapshot != null) { request.Headers.Add("x-ms-snapshot", xMsSnapshot); } if (xMsFileShareUniqueIdentifier== true) { request.Headers.Add("x-ms-include-file-share-unique-identifier", "true"); } request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; }

hoainam3003 avatar Aug 07 '23 12:08 hoainam3003

Thank you for your feedback. Tagging and routing to the team member best able to assist.

jsquire avatar Aug 07 '23 13:08 jsquire

Hi @hoainam3003 , Thank you for using Azure SDK for .NET. Since the SDK is auto generated from the RESTApi, if you would like to add any new features to the SDK, please open an Azure support request. We are not able to help you with it. Therefore, we are closing this issue for now. We apologize for any inconvenience this may cause you. We value your feedback and we want to make sure that your problem is solved. If you think that we have misunderstood your issue or closed it incorrectly, please feel free to comment on this thread and reopen the issue. We will be happy to assist you further. Thank you for your understanding and cooperation.

HarveyLink avatar Mar 20 '24 08:03 HarveyLink