Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Premium to Share Access Tier #45603

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,7 @@ public ShareAccessPolicy() { }
public ShareAccessTier(string value) { throw null; }
public static Azure.Storage.Files.Shares.Models.ShareAccessTier Cool { get { throw null; } }
public static Azure.Storage.Files.Shares.Models.ShareAccessTier Hot { get { throw null; } }
public static Azure.Storage.Files.Shares.Models.ShareAccessTier Premium { get { throw null; } }
public static Azure.Storage.Files.Shares.Models.ShareAccessTier TransactionOptimized { get { throw null; } }
public bool Equals(Azure.Storage.Files.Shares.Models.ShareAccessTier other) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,7 @@ public ShareAccessPolicy() { }
public ShareAccessTier(string value) { throw null; }
public static Azure.Storage.Files.Shares.Models.ShareAccessTier Cool { get { throw null; } }
public static Azure.Storage.Files.Shares.Models.ShareAccessTier Hot { get { throw null; } }
public static Azure.Storage.Files.Shares.Models.ShareAccessTier Premium { get { throw null; } }
public static Azure.Storage.Files.Shares.Models.ShareAccessTier TransactionOptimized { get { throw null; } }
public bool Equals(Azure.Storage.Files.Shares.Models.ShareAccessTier other) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
Expand Down
2 changes: 1 addition & 1 deletion sdk/storage/Azure.Storage.Files.Shares/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "net",
"TagPrefix": "net/storage/Azure.Storage.Files.Shares",
"Tag": "net/storage/Azure.Storage.Files.Shares_14e0fa0c22"
"Tag": "net/storage/Azure.Storage.Files.Shares_95c2a36dbc"
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sdk/storage/Azure.Storage.Files.Shares/src/autorest.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Run `dotnet build /t:GenerateCode` to generate code.

``` yaml
input-file:
- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/98b600498947073c18c2ac5eb7c3c658db5a1a59/specification/storage/data-plane/Microsoft.FileStorage/stable/2024-11-04/file.json
- https://raw.githubusercontent.com/seanmcc-msft/azure-rest-api-specs/a85d0c7a53c366f0ddf4f504ffdee16cbc23f69b/specification/storage/data-plane/Microsoft.FileStorage/stable/2025-01-05/file.json
seanmcc-msft marked this conversation as resolved.
Show resolved Hide resolved
generation1-convenience-client: true
# https://github.com/Azure/autorest/issues/4075
skip-semantics-validation: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,30 @@ public async Task CreateAsync_AccessTier()
await share.DeleteAsync();
}

[RecordedTest]
[ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2019_12_12)]
public async Task CreateAsync_AccessTier_Premium()
{
// Arrange
var shareName = GetNewShareName();
ShareServiceClient service = SharesClientBuilder.GetServiceClient_PremiumFile();
ShareClient share = InstrumentClient(service.GetShareClient(shareName));
ShareCreateOptions options = new ShareCreateOptions
{
AccessTier = ShareAccessTier.Premium
};

// Act
await share.CreateAsync(options);

// Assert
Response<ShareProperties> propertiesResponse = await share.GetPropertiesAsync();
Assert.AreEqual(ShareAccessTier.Premium.ToString(), propertiesResponse.Value.AccessTier);

// Cleanup
await share.DeleteAsync();
}

[RecordedTest]
public async Task CreateAsync_Error()
{
Expand Down Expand Up @@ -1774,6 +1798,27 @@ public async Task SetPropertiesAsync_AccessTier()
Assert.IsNotNull(response.Value.AccessTierChangeTime);
}

[RecordedTest]
[ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2019_12_12)]
public async Task SetPropertiesAsync_AccessTier_Premium()
{
// Arrange
await using DisposingShare test = await GetTestShareAsync(SharesClientBuilder.GetServiceClient_PremiumFile());
ShareClient share = test.Share;

ShareSetPropertiesOptions options = new ShareSetPropertiesOptions
{
AccessTier = ShareAccessTier.Premium
};

// Act
await share.SetPropertiesAsync(options);

// Assert
Response<ShareProperties> response = await share.GetPropertiesAsync();
Assert.AreEqual(ShareAccessTier.Premium.ToString(), response.Value.AccessTier);
}

[RecordedTest]
[PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/17262")]
[ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2020_04_08)]
Expand Down