diff --git a/sdk/storage/azblob/CHANGELOG.md b/sdk/storage/azblob/CHANGELOG.md index 4144a97b2f32..31d8d484414d 100644 --- a/sdk/storage/azblob/CHANGELOG.md +++ b/sdk/storage/azblob/CHANGELOG.md @@ -8,6 +8,7 @@ * Added [FilterBlobs by Tags](https://learn.microsoft.com/rest/api/storageservices/find-blobs-by-tags-container) API for container client. * Added `System` option to `ListContainersInclude` to allow listing of system containers (i.e, $web). * Updated the SAS Version to `2021-12-02` and added `Encryption Scope` to Account SAS, Service SAS, and User Delegation SAS +* Added `ArchiveStatusRehydratePendingToCold` value to `ArchiveStatus` enum. * Content length limit for `AppendBlob.AppendBlock()` and `AppendBlob.AppendBlockFromURL()` raised from 4 MB to 100 MB. ### Breaking Changes diff --git a/sdk/storage/azblob/assets.json b/sdk/storage/azblob/assets.json index f9d16daba57b..24a2b0bedbf3 100644 --- a/sdk/storage/azblob/assets.json +++ b/sdk/storage/azblob/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "go", "TagPrefix": "go/storage/azblob", - "Tag": "go/storage/azblob_7a25fb98e8" + "Tag": "go/storage/azblob_c363103941" } diff --git a/sdk/storage/azblob/blob/constants.go b/sdk/storage/azblob/blob/constants.go index 8a9107954381..65653f2d2736 100644 --- a/sdk/storage/azblob/blob/constants.go +++ b/sdk/storage/azblob/blob/constants.go @@ -149,6 +149,7 @@ type ArchiveStatus = generated.ArchiveStatus const ( ArchiveStatusRehydratePendingToCool ArchiveStatus = generated.ArchiveStatusRehydratePendingToCool ArchiveStatusRehydratePendingToHot ArchiveStatus = generated.ArchiveStatusRehydratePendingToHot + ArchiveStatusRehydratePendingToCold ArchiveStatus = generated.ArchiveStatusRehydratePendingToCold ) // PossibleArchiveStatusValues returns the possible values for the ArchiveStatus const type. diff --git a/sdk/storage/azblob/blockblob/client_test.go b/sdk/storage/azblob/blockblob/client_test.go index bb1f46d90b54..1f0985b60481 100644 --- a/sdk/storage/azblob/blockblob/client_test.go +++ b/sdk/storage/azblob/blockblob/client_test.go @@ -2736,6 +2736,7 @@ func (s *BlockBlobRecordedTestsSuite) TestRehydrateStatus() { blobName1 := "rehydration_test_blob_1" blobName2 := "rehydration_test_blob_2" + blobName3 := "rehydration_test_blob_3" bbClient1 := testcommon.GetBlockBlobClient(blobName1, containerClient) reader1, _ := testcommon.GenerateData(1024) @@ -2780,6 +2781,22 @@ func (s *BlockBlobRecordedTestsSuite) TestRehydrateStatus() { _require.Nil(err) _require.Equal(*getResp2.AccessTier, string(blob.AccessTierArchive)) _require.Equal(*getResp2.ArchiveStatus, string(blob.ArchiveStatusRehydratePendingToHot)) + + // ------------------------------------------ + + bbClient3 := testcommon.GetBlockBlobClient(blobName3, containerClient) + reader3, _ := testcommon.GenerateData(1024) + _, err = bbClient3.Upload(context.Background(), reader3, nil) + _require.Nil(err) + _, err = bbClient3.SetTier(context.Background(), blob.AccessTierArchive, nil) + _require.Nil(err) + _, err = bbClient3.SetTier(context.Background(), blob.AccessTierCold, nil) + _require.Nil(err) + + getResp3, err := bbClient3.GetProperties(context.Background(), nil) + _require.Nil(err) + _require.Equal(*getResp3.AccessTier, string(blob.AccessTierArchive)) + _require.Equal(*getResp3.ArchiveStatus, string(blob.ArchiveStatusRehydratePendingToCold)) } func (s *BlockBlobRecordedTestsSuite) TestCopyBlobWithRehydratePriority() {