Skip to content

Commit b99cccb

Browse files
authored
Storage STG 94 (Azure#43131)
1 parent 7286bc6 commit b99cccb

File tree

89 files changed

+1374
-184
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+1374
-184
lines changed

sdk/storage/Azure.Storage.Blobs.Batch/CHANGELOG.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
11
# Release History
22

33
## 12.18.0-beta.1 (Unreleased)
4-
5-
### Features Added
6-
7-
### Breaking Changes
8-
9-
### Bugs Fixed
10-
11-
### Other Changes
4+
- Added support for service version 2024-08-04.
125

136
## 12.17.0 (2024-05-15)
147
- Includes all features from 12.17.0-beta.1 and 12.17.0-beta.2.

sdk/storage/Azure.Storage.Blobs.Batch/assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "net",
44
"TagPrefix": "net/storage/Azure.Storage.Blobs.Batch",
5-
"Tag": "net/storage/Azure.Storage.Blobs.Batch_df2c3bed41"
5+
"Tag": "net/storage/Azure.Storage.Blobs.Batch_34b0b578dc"
66
}

sdk/storage/Azure.Storage.Blobs.ChangeFeed/CHANGELOG.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
11
# Release History
22

33
## 12.0.0-preview.45 (Unreleased)
4-
5-
### Features Added
6-
7-
### Breaking Changes
8-
9-
### Bugs Fixed
10-
11-
### Other Changes
4+
- Added support for service version 2024-08-04.
125

136
## 12.0.0-preview.44 (2024-05-13)
147
- This release contains bug fixes to improve quality.

sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/ChangeFeedTestBase.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ namespace Azure.Storage.Blobs.ChangeFeed.Tests
3030
BlobClientOptions.ServiceVersion.V2023_11_03,
3131
BlobClientOptions.ServiceVersion.V2024_02_04,
3232
BlobClientOptions.ServiceVersion.V2024_05_04,
33+
BlobClientOptions.ServiceVersion.V2024_08_04,
3334
StorageVersionExtensions.LatestVersion,
3435
StorageVersionExtensions.MaxVersion,
3536
RecordingServiceVersion = StorageVersionExtensions.MaxVersion,

sdk/storage/Azure.Storage.Blobs/CHANGELOG.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
# Release History
22

33
## 12.21.0-beta.1 (Unreleased)
4-
5-
### Features Added
6-
7-
### Breaking Changes
8-
9-
### Bugs Fixed
10-
11-
### Other Changes
4+
- Added support for service version 2024-08-04.
5+
- Added BlobContainerClient.GetAccountInfo(), .GetAccountInfoAsync(), BlobBaseClient.GetAccountInfo(), and .GetAccountInfoAsync() APIs.
6+
- Added more detailed messaging for blob copy operations resulting in an error.
7+
- Added more detailed messaging for authorization failure cases.
128

139
## 12.20.0 (2024-05-13)
1410
- Includes all features from 12.20.0-beta.1 and 12.20.0-beta.2.

sdk/storage/Azure.Storage.Blobs/api/Azure.Storage.Blobs.net6.0.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ public enum ServiceVersion
8585
V2023_11_03 = 20,
8686
V2024_02_04 = 21,
8787
V2024_05_04 = 22,
88+
V2024_08_04 = 23,
8889
}
8990
}
9091
public partial class BlobContainerClient
@@ -132,6 +133,8 @@ public BlobContainerClient(System.Uri blobContainerUri, Azure.Storage.StorageSha
132133
public virtual System.Uri GenerateSasUri(Azure.Storage.Sas.BlobSasBuilder builder) { throw null; }
133134
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobContainerAccessPolicy> GetAccessPolicy(Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
134135
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContainerAccessPolicy>> GetAccessPolicyAsync(Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
136+
public virtual Azure.Response<Azure.Storage.Blobs.Models.AccountInfo> GetAccountInfo(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
137+
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.AccountInfo>> GetAccountInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
135138
protected internal virtual Azure.Storage.Blobs.Specialized.AppendBlobClient GetAppendBlobClientCore(string blobName) { throw null; }
136139
protected internal virtual Azure.Storage.Blobs.Specialized.BlobBaseClient GetBlobBaseClientCore(string blobName) { throw null; }
137140
public virtual Azure.Storage.Blobs.BlobClient GetBlobClient(string blobName) { throw null; }
@@ -1617,6 +1620,8 @@ public BlobBaseClient(System.Uri blobUri, Azure.Storage.StorageSharedKeyCredenti
16171620
public virtual System.Threading.Tasks.Task<Azure.Response<bool>> ExistsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
16181621
public virtual System.Uri GenerateSasUri(Azure.Storage.Sas.BlobSasBuilder builder) { throw null; }
16191622
public virtual System.Uri GenerateSasUri(Azure.Storage.Sas.BlobSasPermissions permissions, System.DateTimeOffset expiresOn) { throw null; }
1623+
public virtual Azure.Response<Azure.Storage.Blobs.Models.AccountInfo> GetAccountInfo(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
1624+
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.AccountInfo>> GetAccountInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
16201625
protected internal virtual Azure.Storage.Blobs.Specialized.BlobLeaseClient GetBlobLeaseClientCore(string leaseId) { throw null; }
16211626
protected static System.Threading.Tasks.Task<Azure.HttpAuthorization> GetCopyAuthorizationHeaderAsync(Azure.Storage.Blobs.Specialized.BlobBaseClient client, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
16221627
protected internal virtual Azure.Storage.Blobs.BlobContainerClient GetParentBlobContainerClientCore() { throw null; }

sdk/storage/Azure.Storage.Blobs/api/Azure.Storage.Blobs.netstandard2.0.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ public enum ServiceVersion
8585
V2023_11_03 = 20,
8686
V2024_02_04 = 21,
8787
V2024_05_04 = 22,
88+
V2024_08_04 = 23,
8889
}
8990
}
9091
public partial class BlobContainerClient
@@ -132,6 +133,8 @@ public BlobContainerClient(System.Uri blobContainerUri, Azure.Storage.StorageSha
132133
public virtual System.Uri GenerateSasUri(Azure.Storage.Sas.BlobSasBuilder builder) { throw null; }
133134
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobContainerAccessPolicy> GetAccessPolicy(Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
134135
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContainerAccessPolicy>> GetAccessPolicyAsync(Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
136+
public virtual Azure.Response<Azure.Storage.Blobs.Models.AccountInfo> GetAccountInfo(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
137+
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.AccountInfo>> GetAccountInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
135138
protected internal virtual Azure.Storage.Blobs.Specialized.AppendBlobClient GetAppendBlobClientCore(string blobName) { throw null; }
136139
protected internal virtual Azure.Storage.Blobs.Specialized.BlobBaseClient GetBlobBaseClientCore(string blobName) { throw null; }
137140
public virtual Azure.Storage.Blobs.BlobClient GetBlobClient(string blobName) { throw null; }
@@ -1617,6 +1620,8 @@ public BlobBaseClient(System.Uri blobUri, Azure.Storage.StorageSharedKeyCredenti
16171620
public virtual System.Threading.Tasks.Task<Azure.Response<bool>> ExistsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
16181621
public virtual System.Uri GenerateSasUri(Azure.Storage.Sas.BlobSasBuilder builder) { throw null; }
16191622
public virtual System.Uri GenerateSasUri(Azure.Storage.Sas.BlobSasPermissions permissions, System.DateTimeOffset expiresOn) { throw null; }
1623+
public virtual Azure.Response<Azure.Storage.Blobs.Models.AccountInfo> GetAccountInfo(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
1624+
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.AccountInfo>> GetAccountInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
16201625
protected internal virtual Azure.Storage.Blobs.Specialized.BlobLeaseClient GetBlobLeaseClientCore(string leaseId) { throw null; }
16211626
protected static System.Threading.Tasks.Task<Azure.HttpAuthorization> GetCopyAuthorizationHeaderAsync(Azure.Storage.Blobs.Specialized.BlobBaseClient client, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
16221627
protected internal virtual Azure.Storage.Blobs.BlobContainerClient GetParentBlobContainerClientCore() { throw null; }

sdk/storage/Azure.Storage.Blobs/api/Azure.Storage.Blobs.netstandard2.1.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ public enum ServiceVersion
8585
V2023_11_03 = 20,
8686
V2024_02_04 = 21,
8787
V2024_05_04 = 22,
88+
V2024_08_04 = 23,
8889
}
8990
}
9091
public partial class BlobContainerClient
@@ -132,6 +133,8 @@ public BlobContainerClient(System.Uri blobContainerUri, Azure.Storage.StorageSha
132133
public virtual System.Uri GenerateSasUri(Azure.Storage.Sas.BlobSasBuilder builder) { throw null; }
133134
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobContainerAccessPolicy> GetAccessPolicy(Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
134135
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContainerAccessPolicy>> GetAccessPolicyAsync(Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
136+
public virtual Azure.Response<Azure.Storage.Blobs.Models.AccountInfo> GetAccountInfo(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
137+
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.AccountInfo>> GetAccountInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
135138
protected internal virtual Azure.Storage.Blobs.Specialized.AppendBlobClient GetAppendBlobClientCore(string blobName) { throw null; }
136139
protected internal virtual Azure.Storage.Blobs.Specialized.BlobBaseClient GetBlobBaseClientCore(string blobName) { throw null; }
137140
public virtual Azure.Storage.Blobs.BlobClient GetBlobClient(string blobName) { throw null; }
@@ -1617,6 +1620,8 @@ public BlobBaseClient(System.Uri blobUri, Azure.Storage.StorageSharedKeyCredenti
16171620
public virtual System.Threading.Tasks.Task<Azure.Response<bool>> ExistsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
16181621
public virtual System.Uri GenerateSasUri(Azure.Storage.Sas.BlobSasBuilder builder) { throw null; }
16191622
public virtual System.Uri GenerateSasUri(Azure.Storage.Sas.BlobSasPermissions permissions, System.DateTimeOffset expiresOn) { throw null; }
1623+
public virtual Azure.Response<Azure.Storage.Blobs.Models.AccountInfo> GetAccountInfo(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
1624+
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.AccountInfo>> GetAccountInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
16201625
protected internal virtual Azure.Storage.Blobs.Specialized.BlobLeaseClient GetBlobLeaseClientCore(string leaseId) { throw null; }
16211626
protected static System.Threading.Tasks.Task<Azure.HttpAuthorization> GetCopyAuthorizationHeaderAsync(Azure.Storage.Blobs.Specialized.BlobBaseClient client, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
16221627
protected internal virtual Azure.Storage.Blobs.BlobContainerClient GetParentBlobContainerClientCore() { throw null; }

sdk/storage/Azure.Storage.Blobs/assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "net",
44
"TagPrefix": "net/storage/Azure.Storage.Blobs",
5-
"Tag": "net/storage/Azure.Storage.Blobs_142f6b4d45"
5+
"Tag": "net/storage/Azure.Storage.Blobs_62a8c8fa29"
66
}

sdk/storage/Azure.Storage.Blobs/src/BlobBaseClient.cs

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6530,6 +6530,127 @@ private async Task<Response<BlobLegalHoldResult>> SetLegalHoldInternal(
65306530
}
65316531
#endregion
65326532

6533+
#region GetAccountInfo
6534+
/// <summary>
6535+
/// The <see cref="GetAccountInfo"/> operation returns the sku
6536+
/// name and account kind for the specified account.
6537+
///
6538+
/// For more information, see
6539+
/// <see href="https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information">
6540+
/// Get Account Information</see>.
6541+
/// </summary>
6542+
/// <param name="cancellationToken">
6543+
/// Optional <see cref="CancellationToken"/> to propagate
6544+
/// notifications that the operation should be cancelled.
6545+
/// </param>
6546+
/// <returns>
6547+
/// A <see cref="Response{AccountInfo}"/> describing the account.
6548+
/// </returns>
6549+
/// <remarks>
6550+
/// A <see cref="RequestFailedException"/> will be thrown if
6551+
/// a failure occurs.
6552+
/// </remarks>
6553+
public virtual Response<AccountInfo> GetAccountInfo(
6554+
CancellationToken cancellationToken = default) =>
6555+
GetAccountInfoInternal(
6556+
false, // async
6557+
cancellationToken)
6558+
.EnsureCompleted();
6559+
6560+
/// <summary>
6561+
/// The <see cref="GetAccountInfoAsync"/> operation returns the sku
6562+
/// name and account kind for the specified account.
6563+
///
6564+
/// For more information, see
6565+
/// <see href="https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information">
6566+
/// Get Account Information</see>.
6567+
/// </summary>
6568+
/// <param name="cancellationToken">
6569+
/// Optional <see cref="CancellationToken"/> to propagate
6570+
/// notifications that the operation should be cancelled.
6571+
/// </param>
6572+
/// <returns>
6573+
/// A <see cref="Response{AccountInfo}"/> describing the account.
6574+
/// </returns>
6575+
/// <remarks>
6576+
/// A <see cref="RequestFailedException"/> will be thrown if
6577+
/// a failure occurs.
6578+
/// </remarks>
6579+
public virtual async Task<Response<AccountInfo>> GetAccountInfoAsync(
6580+
CancellationToken cancellationToken = default) =>
6581+
await GetAccountInfoInternal(
6582+
true, // async
6583+
cancellationToken)
6584+
.ConfigureAwait(false);
6585+
6586+
/// <summary>
6587+
/// The <see cref="GetAccountInfoInternal"/> operation returns the sku
6588+
/// name and account kind for the specified account.
6589+
///
6590+
/// For more information, see
6591+
/// <see href="https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information">
6592+
/// Get Account Information</see>.
6593+
/// </summary>
6594+
/// <param name="async">
6595+
/// Whether to invoke the operation asynchronously.
6596+
/// </param>
6597+
/// <param name="cancellationToken">
6598+
/// Optional <see cref="CancellationToken"/> to propagate
6599+
/// notifications that the operation should be cancelled.
6600+
/// </param>
6601+
/// <returns>
6602+
/// A <see cref="Response{AccountInfo}"/> describing the account.
6603+
/// </returns>
6604+
/// <remarks>
6605+
/// A <see cref="RequestFailedException"/> will be thrown if
6606+
/// a failure occurs.
6607+
/// </remarks>
6608+
private async Task<Response<AccountInfo>> GetAccountInfoInternal(
6609+
bool async,
6610+
CancellationToken cancellationToken)
6611+
{
6612+
using (ClientConfiguration.Pipeline.BeginLoggingScope(nameof(BlobBaseClient)))
6613+
{
6614+
ClientConfiguration.Pipeline.LogMethodEnter(nameof(BlobBaseClient), message: $"{nameof(Uri)}: {Uri}");
6615+
6616+
DiagnosticScope scope = ClientConfiguration.ClientDiagnostics.CreateScope($"{nameof(BlobBaseClient)}.{nameof(GetAccountInfo)}");
6617+
6618+
try
6619+
{
6620+
scope.Start();
6621+
ResponseWithHeaders<BlobGetAccountInfoHeaders> response;
6622+
6623+
if (async)
6624+
{
6625+
response = await BlobRestClient.GetAccountInfoAsync(
6626+
cancellationToken: cancellationToken)
6627+
.ConfigureAwait(false);
6628+
}
6629+
else
6630+
{
6631+
response = BlobRestClient.GetAccountInfo(
6632+
cancellationToken: cancellationToken);
6633+
}
6634+
6635+
return Response.FromValue(
6636+
response.ToAccountInfo(),
6637+
response.GetRawResponse());
6638+
}
6639+
catch (Exception ex)
6640+
{
6641+
ClientConfiguration.Pipeline.LogException(ex);
6642+
scope.Failed(ex);
6643+
throw;
6644+
}
6645+
finally
6646+
{
6647+
ClientConfiguration.Pipeline.LogMethodExit(nameof(BlobServiceClient));
6648+
scope.Dispose();
6649+
}
6650+
}
6651+
}
6652+
#endregion GetAccountInfo
6653+
65336654
#region GenerateSas
65346655
/// <summary>
65356656
/// The <see cref="GenerateSasUri(BlobSasPermissions, DateTimeOffset)"/>

0 commit comments

Comments
 (0)