Open
Description
openedon Jun 4, 2024
New SDK Review meeting has been requested.
Service Name: Xstore
Review Created By: Sean McCullough
Review Date: 07/30/2024 02:05 PM PT
Release Plan:
Hero Scenarios Link: Not Provided
Architecture Diagram Link: Not Provided
Core Concepts Doc Link: Not Provided
APIView Links: .NET, C++, Javascript, Java, Python,
Description: Storage STG 95 API View
Detailed meeting information and documents provided can be accessed here
API Views
- .NET
- C++
- Java
- JS/TS
- Python
- azure-storage-file-share
- Note: SAS changes will be applied to other packages after we agree on the approach
Champion Scenarios
- Customers can now authenticate with Entra ID for all data plane File operations:
[RecordedTest]
[ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2024_08_04)]
public async Task CreateAsync_OAuth()
{
// Arrange
var shareName = GetNewShareName();
ShareServiceClient service = InstrumentationClient(
new ShareServiceClient(new Uri("https://account.file.core.windows.net"),
new DefaultAzureCredential()))
ShareClient share = InstrumentClient(service.GetShareClient(shareName));
try
{
// Act
Response<ShareInfo> response = await share.CreateAsync(quotaInGB: 1);
// Assert
Assert.IsNotNull(response.GetRawResponse().Headers.RequestId);
// Ensure that we grab the whole ETag value from the service without removing the quotes
Assert.AreEqual(response.Value.ETag.ToString(), $"\"{response.GetRawResponse().Headers.ETag}\"");
}
finally
{
await share.DeleteAsync(false);
}
}
- Customers can now set Paid Bursting, Paid Bursting Max IOPS, and Paid Bursting Max Bandwidth Mibps on Share Create and Share Set Properties. These properties can now be retrieved on Share Get Properties:
[RecordedTest]
[ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2024_11_04)]
public async Task CreateAsync_PaidBursting()
{
// Arrange
var shareName = GetNewShareName();
ShareServiceClient service = SharesClientBuilder.GetServiceClient_PremiumFile();
ShareClient share = InstrumentClient(service.GetShareClient(shareName));
ShareCreateOptions options = new ShareCreateOptions
{
EnablePaidBursting = true,
PaidBurstingMaxIops = 5000,
PaidBurstingMaxBandwidthMibps = 1000
};
try
{
// Act
await share.CreateAsync(options);
// Assert
Response<ShareProperties> response = await share.GetPropertiesAsync();
Assert.IsTrue(response.Value.EnablePaidBursting);
Assert.AreEqual(5000, response.Value.PaidBurstingMaxIops);
Assert.AreEqual(1000, response.Value.PaidBurstingMaxBandwidthMibps);
// Act
IList<ShareItem> shares = await service.GetSharesAsync().ToListAsync();
ShareItem shareItem = shares.SingleOrDefault(r => r.Name == share.Name);
// Assert
Assert.IsTrue(shareItem.Properties.EnablePaidBursting);
Assert.AreEqual(5000, shareItem.Properties.PaidBurstingMaxIops);
Assert.AreEqual(1000, shareItem.Properties.PaidBurstingMaxBandwidthMibps);
}
finally
{
await share.DeleteAsync(false);
}
}
- Customers can now specify the permission format for Share Create/Get Permission, Create, Rename, and Set HTTP Headers on Files, and Rename and Set Http Headers on Directories:
[RecordedTest]
[TestCase(null)]
[TestCase(FilePermissionFormat.Sddl)]
[TestCase(FilePermissionFormat.Binary)]
[ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2024_11_04)]
public async Task CreateAndGetPermissionAsync_FilePermissionKeyFormat(FilePermissionFormat? filePermissionFormat)
{
await using DisposingShare test = await GetTestShareAsync();
ShareClient share = test.Share;
// Arrange
string permission;
if (filePermissionFormat == null || filePermissionFormat == FilePermissionFormat.Sddl)
{
permission = "O:S-1-5-21-2127521184-1604012920-1887927527-21560751G:S-1-5-21-2127521184-1604012920-1887927527-513D:AI(A;;FA;;;SY)(A;;FA;;;BA)(A;;0x1200a9;;;S-1-5-21-397955417-626881126-188441444-3053964)S:NO_ACCESS_CONTROL";
}
else
{
permission = "AQAUhGwAAACIAAAAAAAAABQAAAACAFgAAwAAAAAAFAD/AR8AAQEAAAAAAAUSAAAAAAAYAP8BHwABAgAAAAAABSAAAAAgAgAAAAAkAKkAEgABBQAAAAAABRUAAABZUbgXZnJdJWRjOwuMmS4AAQUAAAAAAAUVAAAAoGXPfnhLm1/nfIdwr/1IAQEFAAAAAAAFFQAAAKBlz354S5tf53yHcAECAAA=";
}
ShareFilePermission filePermission = new ShareFilePermission
{
Permission = permission,
PermissionFormat = filePermissionFormat
};
// Act
Response<PermissionInfo> createResponse = await share.CreatePermissionAsync(filePermission);
Response<ShareFilePermission> getResponse = await share.GetPermissionAsync(createResponse.Value.FilePermissionKey, filePermissionFormat);
// Assert
Assert.AreEqual(permission, getResponse.Value.Permission);
if (filePermissionFormat == null || filePermissionFormat == FilePermissionFormat.Sddl)
{
Assert.AreEqual(FilePermissionFormat.Sddl, getResponse.Value.PermissionFormat);
}
else
{
Assert.AreEqual(FilePermissionFormat.Binary, getResponse.Value.PermissionFormat);
}
}
- Customers can now retrieve the String to Sign for debugging purposes on the *SasBuilders:
BlobSasBuilder sasBuilder = new BlobSasBuilder(BlobSasPermissions.Read, DateTimeOffset.UtcNow.AddHours(1));
string stringToSign = sasBuilder.GetStringToSign();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment