From 1431830c7df23ba92d31a41f58133a7a995b03d7 Mon Sep 17 00:00:00 2001 From: Rick Ley Date: Fri, 29 Apr 2022 11:36:32 -0700 Subject: [PATCH] Get page ranges continuation (#28390) * Generated code * Fixed nextMarker * Tried to reformat the xml tags * Tried to add a segment type to reformat xml tags * Tried another thing * Got it generating * Finished feature * Changelog * Some apiview feedback * Starting an attempt to pass context to method * Sorted out adding context to sync method * Wrote some tests * Wrote tests * Test fixes and recordings * Added samples * ci fix * imports fixes * Added PageListHelper * Fixed merge conflict --- sdk/storage/azure-storage-blob/CHANGELOG.md | 2 + .../blob/implementation/PageBlobsImpl.java | 32 ++ .../models/BlobCopySourceTags.java | 47 +++ .../implementation/models/BlobDeleteType.java | 6 +- .../models/BlobExpiryOptions.java | 6 +- .../models/BlobsGetTagsResponse.java | 6 +- .../BlockBlobsGetBlockListResponse.java | 6 +- .../models/ContainersFilterBlobsResponse.java | 6 +- .../ContainersGetAccessPolicyResponse.java | 6 +- ...ContainersListBlobFlatSegmentResponse.java | 6 +- ...inersListBlobHierarchySegmentResponse.java | 6 +- ...PageBlobsGetPageRangesDiffNextHeaders.java | 212 ++++++++++ ...ageBlobsGetPageRangesDiffNextResponse.java | 37 ++ .../PageBlobsGetPageRangesDiffResponse.java | 6 +- .../PageBlobsGetPageRangesNextHeaders.java | 212 ++++++++++ .../PageBlobsGetPageRangesNextResponse.java | 37 ++ .../PageBlobsGetPageRangesResponse.java | 6 +- .../models/PageListCollection.java | 69 +++ .../implementation/models/PageListHelper.java | 27 ++ .../models/PageListSegment.java | 96 +++++ .../models/PremiumPageBlobAccessTier.java | 6 +- .../models/ServicesFilterBlobsResponse.java | 6 +- .../models/ServicesGetPropertiesResponse.java | 6 +- .../models/ServicesGetStatisticsResponse.java | 6 +- .../ServicesGetUserDelegationKeyResponse.java | 6 +- ...ListBlobContainersSegmentNextResponse.java | 6 +- ...icesListBlobContainersSegmentResponse.java | 6 +- .../azure/storage/blob/models/AccessTier.java | 6 +- .../storage/blob/models/ArchiveStatus.java | 6 +- .../storage/blob/models/BlobErrorCode.java | 6 +- .../blob/models/GeoReplicationStatus.java | 6 +- .../azure/storage/blob/models/PageList.java | 41 ++ .../blob/models/PageListDeserializer.java | 8 +- .../storage/blob/models/PageRangeItem.java | 44 ++ .../storage/blob/models/PublicAccessType.java | 6 +- .../blob/models/RehydratePriority.java | 6 +- .../options/ListPageRangesDiffOptions.java | 88 ++++ .../blob/options/ListPageRangesOptions.java | 75 ++++ .../blob/specialized/PageBlobAsyncClient.java | 285 ++++++++++++- .../blob/specialized/PageBlobClient.java | 159 ++++++- ...ageBlobAsyncClientJavaDocCodeSnippets.java | 51 +++ .../PageBlobClientJavaDocCodeSnippets.java | 72 ++++ .../blob/specialized/PageBlobAPITest.groovy | 392 ++++++++++++++++++ .../PageBlobAPITestListPageRanges.json | 162 ++++++++ ...ageBlobAPITestListPageRangesACFail[0].json | 67 +++ ...ageBlobAPITestListPageRangesACFail[1].json | 70 ++++ ...ageBlobAPITestListPageRangesACFail[2].json | 70 ++++ ...ageBlobAPITestListPageRangesACFail[3].json | 98 +++++ ...ageBlobAPITestListPageRangesACFail[4].json | 92 ++++ ...ageBlobAPITestListPageRangesACFail[5].json | 70 ++++ .../PageBlobAPITestListPageRangesAC[0].json | 91 ++++ .../PageBlobAPITestListPageRangesAC[1].json | 91 ++++ .../PageBlobAPITestListPageRangesAC[2].json | 91 ++++ .../PageBlobAPITestListPageRangesAC[3].json | 123 ++++++ .../PageBlobAPITestListPageRangesAC[4].json | 91 ++++ .../PageBlobAPITestListPageRangesAC[5].json | 113 +++++ .../PageBlobAPITestListPageRangesAC[6].json | 91 ++++ .../PageBlobAPITestListPageRangesDiff.json | 235 +++++++++++ ...lobAPITestListPageRangesDiffACFail[0].json | 91 ++++ ...lobAPITestListPageRangesDiffACFail[1].json | 94 +++++ ...lobAPITestListPageRangesDiffACFail[2].json | 94 +++++ ...lobAPITestListPageRangesDiffACFail[3].json | 122 ++++++ ...lobAPITestListPageRangesDiffACFail[4].json | 116 ++++++ ...lobAPITestListPageRangesDiffACFail[5].json | 94 +++++ ...ageBlobAPITestListPageRangesDiffAC[0].json | 163 ++++++++ ...ageBlobAPITestListPageRangesDiffAC[1].json | 163 ++++++++ ...ageBlobAPITestListPageRangesDiffAC[2].json | 163 ++++++++ ...ageBlobAPITestListPageRangesDiffAC[3].json | 195 +++++++++ ...ageBlobAPITestListPageRangesDiffAC[4].json | 163 ++++++++ ...ageBlobAPITestListPageRangesDiffAC[5].json | 185 +++++++++ ...ageBlobAPITestListPageRangesDiffAC[6].json | 163 ++++++++ ...BlobAPITestListPageRangesDiffPageSize.json | 307 ++++++++++++++ ...PageBlobAPITestListPageRangesPageSize.json | 234 +++++++++++ ...BlobAPITestListPagesContinuationToken.json | 186 +++++++++ ...APITestListPagesDiffContinuationToken.json | 259 ++++++++++++ .../PageBlobAPITestListPagesDiffRange.json | 235 +++++++++++ .../PageBlobAPITestListPagesRange.json | 162 ++++++++ .../azure-storage-blob/swagger/README.md | 20 +- .../main/java/BlobStorageCustomization.java | 32 ++ 79 files changed, 6888 insertions(+), 32 deletions(-) create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobCopySourceTags.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesDiffNextHeaders.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesDiffNextResponse.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesNextHeaders.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesNextResponse.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageListCollection.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageListHelper.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageListSegment.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageRangeItem.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/ListPageRangesDiffOptions.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/ListPageRangesOptions.java create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRanges.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesACFail[0].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesACFail[1].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesACFail[2].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesACFail[3].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesACFail[4].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesACFail[5].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesAC[0].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesAC[1].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesAC[2].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesAC[3].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesAC[4].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesAC[5].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesAC[6].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiff.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffACFail[0].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffACFail[1].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffACFail[2].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffACFail[3].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffACFail[4].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffACFail[5].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffAC[0].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffAC[1].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffAC[2].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffAC[3].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffAC[4].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffAC[5].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffAC[6].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffPageSize.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesPageSize.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPagesContinuationToken.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPagesDiffContinuationToken.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPagesDiffRange.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPagesRange.json diff --git a/sdk/storage/azure-storage-blob/CHANGELOG.md b/sdk/storage/azure-storage-blob/CHANGELOG.md index 0ad9c7271b417..9b1f2ff37494d 100644 --- a/sdk/storage/azure-storage-blob/CHANGELOG.md +++ b/sdk/storage/azure-storage-blob/CHANGELOG.md @@ -3,6 +3,8 @@ ## 12.17.0-beta.1 (Unreleased) ### Features Added +- Added support for 2021-04-10 service version. +- Added the ability to list PageRanges and PageRangesDiff by page. ### Breaking Changes diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java index 1b3b0b70e2324..115d86e5fef9a 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java @@ -230,6 +230,8 @@ Mono getPageRanges( @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @QueryParam("marker") String marker, + @QueryParam("maxresults") Integer maxresults, @HeaderParam("Accept") String accept, Context context); @@ -254,6 +256,8 @@ Mono getPageRangesDiff( @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @QueryParam("marker") String marker, + @QueryParam("maxresults") Integer maxresults, @HeaderParam("Accept") String accept, Context context); @@ -890,6 +894,16 @@ public Mono uploadPagesFromURLWithResponseA * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the * analytics logs when storage analytics logging is enabled. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing + * operation did not return all containers remaining to be listed with the current page. The NextMarker value + * can be used as the value for the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for + * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer + * results than specified by maxresults, or than the default of 5000. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -910,6 +924,8 @@ public Mono getPageRangesWithResponseAsync( String ifNoneMatch, String ifTags, String requestId, + String marker, + Integer maxresults, Context context) { final String comp = "pagelist"; final String accept = "application/xml"; @@ -933,6 +949,8 @@ public Mono getPageRangesWithResponseAsync( ifTags, this.client.getVersion(), requestId, + marker, + maxresults, accept, context); } @@ -969,6 +987,16 @@ public Mono getPageRangesWithResponseAsync( * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the * analytics logs when storage analytics logging is enabled. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing + * operation did not return all containers remaining to be listed with the current page. The NextMarker value + * can be used as the value for the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for + * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer + * results than specified by maxresults, or than the default of 5000. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -991,6 +1019,8 @@ public Mono getPageRangesDiffWithResponseAsy String ifNoneMatch, String ifTags, String requestId, + String marker, + Integer maxresults, Context context) { final String comp = "pagelist"; final String accept = "application/xml"; @@ -1016,6 +1046,8 @@ public Mono getPageRangesDiffWithResponseAsy ifTags, this.client.getVersion(), requestId, + marker, + maxresults, accept, context); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobCopySourceTags.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobCopySourceTags.java new file mode 100644 index 0000000000000..8be341d202564 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobCopySourceTags.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.implementation.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for BlobCopySourceTags. */ +public enum BlobCopySourceTags { + /** Enum value REPLACE. */ + REPLACE("REPLACE"), + + /** Enum value COPY. */ + COPY("COPY"); + + /** The actual serialized value for a BlobCopySourceTags instance. */ + private final String value; + + BlobCopySourceTags(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a BlobCopySourceTags instance. + * + * @param value the serialized value to parse. + * @return the parsed BlobCopySourceTags object, or null if unable to parse. + */ + @JsonCreator + public static BlobCopySourceTags fromString(String value) { + BlobCopySourceTags[] items = BlobCopySourceTags.values(); + for (BlobCopySourceTags item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobDeleteType.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobDeleteType.java index 85419191eff85..87fccd8ebdaf2 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobDeleteType.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobDeleteType.java @@ -24,7 +24,11 @@ public static BlobDeleteType fromString(String name) { return fromString(name, BlobDeleteType.class); } - /** @return known BlobDeleteType values. */ + /** + * Gets known BlobDeleteType values. + * + * @return known BlobDeleteType values. + */ public static Collection values() { return values(BlobDeleteType.class); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobExpiryOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobExpiryOptions.java index 3180d15a9a982..8f53b14d954f2 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobExpiryOptions.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobExpiryOptions.java @@ -33,7 +33,11 @@ public static BlobExpiryOptions fromString(String name) { return fromString(name, BlobExpiryOptions.class); } - /** @return known BlobExpiryOptions values. */ + /** + * Gets known BlobExpiryOptions values. + * + * @return known BlobExpiryOptions values. + */ public static Collection values() { return values(BlobExpiryOptions.class); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetTagsResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetTagsResponse.java index 4806c2a07ecb4..c9ff99f1c11c1 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetTagsResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetTagsResponse.java @@ -24,7 +24,11 @@ public BlobsGetTagsResponse( super(request, statusCode, rawHeaders, value, headers); } - /** @return the deserialized response body. */ + /** + * Gets the deserialized response body. + * + * @return the deserialized response body. + */ @Override public BlobTags getValue() { return super.getValue(); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsGetBlockListResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsGetBlockListResponse.java index 431c9b3a888d4..0ac7f0a4801b8 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsGetBlockListResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsGetBlockListResponse.java @@ -29,7 +29,11 @@ public BlockBlobsGetBlockListResponse( super(request, statusCode, rawHeaders, value, headers); } - /** @return the deserialized response body. */ + /** + * Gets the deserialized response body. + * + * @return the deserialized response body. + */ @Override public BlockList getValue() { return super.getValue(); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersFilterBlobsResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersFilterBlobsResponse.java index 0919e5cb252d9..d54c4f04e077a 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersFilterBlobsResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersFilterBlobsResponse.java @@ -28,7 +28,11 @@ public ContainersFilterBlobsResponse( super(request, statusCode, rawHeaders, value, headers); } - /** @return the deserialized response body. */ + /** + * Gets the deserialized response body. + * + * @return the deserialized response body. + */ @Override public FilterBlobSegment getValue() { return super.getValue(); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersGetAccessPolicyResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersGetAccessPolicyResponse.java index 2e4d565641209..6667c041ee9fa 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersGetAccessPolicyResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersGetAccessPolicyResponse.java @@ -31,7 +31,11 @@ public ContainersGetAccessPolicyResponse( super(request, statusCode, rawHeaders, value, headers); } - /** @return the deserialized response body. */ + /** + * Gets the deserialized response body. + * + * @return the deserialized response body. + */ @Override public List getValue() { return super.getValue(); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobFlatSegmentResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobFlatSegmentResponse.java index 2c38d6a2491d2..2b57f303f5bfc 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobFlatSegmentResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobFlatSegmentResponse.java @@ -29,7 +29,11 @@ public ContainersListBlobFlatSegmentResponse( super(request, statusCode, rawHeaders, value, headers); } - /** @return the deserialized response body. */ + /** + * Gets the deserialized response body. + * + * @return the deserialized response body. + */ @Override public ListBlobsFlatSegmentResponse getValue() { return super.getValue(); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobHierarchySegmentResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobHierarchySegmentResponse.java index f5c8a1ac2d887..89ccc84755489 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobHierarchySegmentResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobHierarchySegmentResponse.java @@ -29,7 +29,11 @@ public ContainersListBlobHierarchySegmentResponse( super(request, statusCode, rawHeaders, value, headers); } - /** @return the deserialized response body. */ + /** + * Gets the deserialized response body. + * + * @return the deserialized response body. + */ @Override public ListBlobsHierarchySegmentResponse getValue() { return super.getValue(); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesDiffNextHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesDiffNextHeaders.java new file mode 100644 index 0000000000000..ea0270911aef6 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesDiffNextHeaders.java @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.DateTimeRfc1123; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import java.time.OffsetDateTime; + +/** The PageBlobsGetPageRangesDiffNextHeaders model. */ +@JacksonXmlRootElement(localName = "null") +@Fluent +public final class PageBlobsGetPageRangesDiffNextHeaders { + /* + * The x-ms-version property. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * The x-ms-blob-content-length property. + */ + @JsonProperty(value = "x-ms-blob-content-length") + private Long xMsBlobContentLength; + + /* + * The ETag property. + */ + @JsonProperty(value = "ETag") + private String eTag; + + /* + * The Last-Modified property. + */ + @JsonProperty(value = "Last-Modified") + private DateTimeRfc1123 lastModified; + + /* + * The x-ms-request-id property. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + @JsonProperty(value = "x-ms-client-request-id") + private String xMsClientRequestId; + + /* + * The Date property. + */ + @JsonProperty(value = "Date") + private DateTimeRfc1123 dateProperty; + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the PageBlobsGetPageRangesDiffNextHeaders object itself. + */ + public PageBlobsGetPageRangesDiffNextHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsBlobContentLength property: The x-ms-blob-content-length property. + * + * @return the xMsBlobContentLength value. + */ + public Long getXMsBlobContentLength() { + return this.xMsBlobContentLength; + } + + /** + * Set the xMsBlobContentLength property: The x-ms-blob-content-length property. + * + * @param xMsBlobContentLength the xMsBlobContentLength value to set. + * @return the PageBlobsGetPageRangesDiffNextHeaders object itself. + */ + public PageBlobsGetPageRangesDiffNextHeaders setXMsBlobContentLength(Long xMsBlobContentLength) { + this.xMsBlobContentLength = xMsBlobContentLength; + return this; + } + + /** + * Get the eTag property: The ETag property. + * + * @return the eTag value. + */ + public String getETag() { + return this.eTag; + } + + /** + * Set the eTag property: The ETag property. + * + * @param eTag the eTag value to set. + * @return the PageBlobsGetPageRangesDiffNextHeaders object itself. + */ + public PageBlobsGetPageRangesDiffNextHeaders setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the lastModified property: The Last-Modified property. + * + * @return the lastModified value. + */ + public OffsetDateTime getLastModified() { + if (this.lastModified == null) { + return null; + } + return this.lastModified.getDateTime(); + } + + /** + * Set the lastModified property: The Last-Modified property. + * + * @param lastModified the lastModified value to set. + * @return the PageBlobsGetPageRangesDiffNextHeaders object itself. + */ + public PageBlobsGetPageRangesDiffNextHeaders setLastModified(OffsetDateTime lastModified) { + if (lastModified == null) { + this.lastModified = null; + } else { + this.lastModified = new DateTimeRfc1123(lastModified); + } + return this; + } + + /** + * Get the xMsRequestId property: The x-ms-request-id property. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: The x-ms-request-id property. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the PageBlobsGetPageRangesDiffNextHeaders object itself. + */ + public PageBlobsGetPageRangesDiffNextHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @return the xMsClientRequestId value. + */ + public String getXMsClientRequestId() { + return this.xMsClientRequestId; + } + + /** + * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @param xMsClientRequestId the xMsClientRequestId value to set. + * @return the PageBlobsGetPageRangesDiffNextHeaders object itself. + */ + public PageBlobsGetPageRangesDiffNextHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the dateProperty property: The Date property. + * + * @return the dateProperty value. + */ + public OffsetDateTime getDateProperty() { + if (this.dateProperty == null) { + return null; + } + return this.dateProperty.getDateTime(); + } + + /** + * Set the dateProperty property: The Date property. + * + * @param dateProperty the dateProperty value to set. + * @return the PageBlobsGetPageRangesDiffNextHeaders object itself. + */ + public PageBlobsGetPageRangesDiffNextHeaders setDateProperty(OffsetDateTime dateProperty) { + if (dateProperty == null) { + this.dateProperty = null; + } else { + this.dateProperty = new DateTimeRfc1123(dateProperty); + } + return this; + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesDiffNextResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesDiffNextResponse.java new file mode 100644 index 0000000000000..b8fc884af6fe0 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesDiffNextResponse.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.implementation.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the getPageRangesDiffNext operation. */ +public final class PageBlobsGetPageRangesDiffNextResponse + extends ResponseBase { + /** + * Creates an instance of PageBlobsGetPageRangesDiffNextResponse. + * + * @param request the request which resulted in this PageBlobsGetPageRangesDiffNextResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public PageBlobsGetPageRangesDiffNextResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + PageListCollection value, + PageBlobsGetPageRangesDiffNextHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public PageListCollection getValue() { + return super.getValue(); + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesDiffResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesDiffResponse.java index e454deb04d79f..08500fbe0cd9f 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesDiffResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesDiffResponse.java @@ -30,7 +30,11 @@ public PageBlobsGetPageRangesDiffResponse( super(request, statusCode, rawHeaders, value, headers); } - /** @return the deserialized response body. */ + /** + * Gets the deserialized response body. + * + * @return the deserialized response body. + */ @Override public PageList getValue() { return super.getValue(); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesNextHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesNextHeaders.java new file mode 100644 index 0000000000000..c1bc081a9a17d --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesNextHeaders.java @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.DateTimeRfc1123; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import java.time.OffsetDateTime; + +/** The PageBlobsGetPageRangesNextHeaders model. */ +@JacksonXmlRootElement(localName = "null") +@Fluent +public final class PageBlobsGetPageRangesNextHeaders { + /* + * The x-ms-version property. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * The x-ms-blob-content-length property. + */ + @JsonProperty(value = "x-ms-blob-content-length") + private Long xMsBlobContentLength; + + /* + * The ETag property. + */ + @JsonProperty(value = "ETag") + private String eTag; + + /* + * The Last-Modified property. + */ + @JsonProperty(value = "Last-Modified") + private DateTimeRfc1123 lastModified; + + /* + * The x-ms-request-id property. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + @JsonProperty(value = "x-ms-client-request-id") + private String xMsClientRequestId; + + /* + * The Date property. + */ + @JsonProperty(value = "Date") + private DateTimeRfc1123 dateProperty; + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the PageBlobsGetPageRangesNextHeaders object itself. + */ + public PageBlobsGetPageRangesNextHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsBlobContentLength property: The x-ms-blob-content-length property. + * + * @return the xMsBlobContentLength value. + */ + public Long getXMsBlobContentLength() { + return this.xMsBlobContentLength; + } + + /** + * Set the xMsBlobContentLength property: The x-ms-blob-content-length property. + * + * @param xMsBlobContentLength the xMsBlobContentLength value to set. + * @return the PageBlobsGetPageRangesNextHeaders object itself. + */ + public PageBlobsGetPageRangesNextHeaders setXMsBlobContentLength(Long xMsBlobContentLength) { + this.xMsBlobContentLength = xMsBlobContentLength; + return this; + } + + /** + * Get the eTag property: The ETag property. + * + * @return the eTag value. + */ + public String getETag() { + return this.eTag; + } + + /** + * Set the eTag property: The ETag property. + * + * @param eTag the eTag value to set. + * @return the PageBlobsGetPageRangesNextHeaders object itself. + */ + public PageBlobsGetPageRangesNextHeaders setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the lastModified property: The Last-Modified property. + * + * @return the lastModified value. + */ + public OffsetDateTime getLastModified() { + if (this.lastModified == null) { + return null; + } + return this.lastModified.getDateTime(); + } + + /** + * Set the lastModified property: The Last-Modified property. + * + * @param lastModified the lastModified value to set. + * @return the PageBlobsGetPageRangesNextHeaders object itself. + */ + public PageBlobsGetPageRangesNextHeaders setLastModified(OffsetDateTime lastModified) { + if (lastModified == null) { + this.lastModified = null; + } else { + this.lastModified = new DateTimeRfc1123(lastModified); + } + return this; + } + + /** + * Get the xMsRequestId property: The x-ms-request-id property. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: The x-ms-request-id property. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the PageBlobsGetPageRangesNextHeaders object itself. + */ + public PageBlobsGetPageRangesNextHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @return the xMsClientRequestId value. + */ + public String getXMsClientRequestId() { + return this.xMsClientRequestId; + } + + /** + * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @param xMsClientRequestId the xMsClientRequestId value to set. + * @return the PageBlobsGetPageRangesNextHeaders object itself. + */ + public PageBlobsGetPageRangesNextHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the dateProperty property: The Date property. + * + * @return the dateProperty value. + */ + public OffsetDateTime getDateProperty() { + if (this.dateProperty == null) { + return null; + } + return this.dateProperty.getDateTime(); + } + + /** + * Set the dateProperty property: The Date property. + * + * @param dateProperty the dateProperty value to set. + * @return the PageBlobsGetPageRangesNextHeaders object itself. + */ + public PageBlobsGetPageRangesNextHeaders setDateProperty(OffsetDateTime dateProperty) { + if (dateProperty == null) { + this.dateProperty = null; + } else { + this.dateProperty = new DateTimeRfc1123(dateProperty); + } + return this; + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesNextResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesNextResponse.java new file mode 100644 index 0000000000000..c04dfa186ea69 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesNextResponse.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.implementation.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the getPageRangesNext operation. */ +public final class PageBlobsGetPageRangesNextResponse + extends ResponseBase { + /** + * Creates an instance of PageBlobsGetPageRangesNextResponse. + * + * @param request the request which resulted in this PageBlobsGetPageRangesNextResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public PageBlobsGetPageRangesNextResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + PageListCollection value, + PageBlobsGetPageRangesNextHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public PageListCollection getValue() { + return super.getValue(); + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesResponse.java index 015ac69ddf3ef..9fb25197fc782 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesResponse.java @@ -29,7 +29,11 @@ public PageBlobsGetPageRangesResponse( super(request, statusCode, rawHeaders, value, headers); } - /** @return the deserialized response body. */ + /** + * Gets the deserialized response body. + * + * @return the deserialized response body. + */ @Override public PageList getValue() { return super.getValue(); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageListCollection.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageListCollection.java new file mode 100644 index 0000000000000..ed7548f24962a --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageListCollection.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.storage.blob.models.PageRange; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import java.util.ArrayList; +import java.util.List; + +/** The PageListCollection model. */ +@JacksonXmlRootElement(localName = "PageList") +@Fluent +public final class PageListCollection { + /* + * The value property. + */ + @JsonProperty("PageRange") + private List value = new ArrayList<>(); + + /* + * The nextMarker property. + */ + @JsonProperty(value = "nextMarker") + private String nextMarker; + + /** + * Get the value property: The value property. + * + * @return the value value. + */ + public List getValue() { + return this.value; + } + + /** + * Set the value property: The value property. + * + * @param value the value value to set. + * @return the PageListCollection object itself. + */ + public PageListCollection setValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextMarker property: The nextMarker property. + * + * @return the nextMarker value. + */ + public String getNextMarker() { + return this.nextMarker; + } + + /** + * Set the nextMarker property: The nextMarker property. + * + * @param nextMarker the nextMarker value to set. + * @return the PageListCollection object itself. + */ + public PageListCollection setNextMarker(String nextMarker) { + this.nextMarker = nextMarker; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageListHelper.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageListHelper.java new file mode 100644 index 0000000000000..4411f23c9786a --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageListHelper.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.implementation.models; + +import com.azure.storage.blob.models.PageList; + +public class PageListHelper { + private static PageListAccessor accessor; + + public static String getNextMarker(PageList pageList) { + return accessor.getNextMarker(pageList); + } + + public static PageList setNextMarker(PageList pageList, String marker) { + return accessor.setNextMarker(pageList, marker); + } + + public static void setAccessor(PageListAccessor pageListAccessor) { + accessor = pageListAccessor; + } + + public interface PageListAccessor { + String getNextMarker(PageList pageList); + PageList setNextMarker(PageList pageList, String marker); + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageListSegment.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageListSegment.java new file mode 100644 index 0000000000000..43b275673f6d1 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageListSegment.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.storage.blob.models.ClearRange; +import com.azure.storage.blob.models.PageRange; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import java.util.ArrayList; +import java.util.List; + +/** The PageListSegment model. */ +@JacksonXmlRootElement(localName = "PageListSegment") +@Fluent +public final class PageListSegment { + /* + * The PageRanges property. + */ + @JsonProperty("PageRange") + private List pageRanges = new ArrayList<>(); + + /* + * The ClearRanges property. + */ + @JsonProperty("ClearRange") + private List clearRanges = new ArrayList<>(); + + /* + * The NextMarker property. + */ + @JsonProperty(value = "NextMarker") + private String nextMarker; + + /** + * Get the pageRanges property: The PageRanges property. + * + * @return the pageRanges value. + */ + public List getPageRanges() { + return this.pageRanges; + } + + /** + * Set the pageRanges property: The PageRanges property. + * + * @param pageRanges the pageRanges value to set. + * @return the PageListSegment object itself. + */ + public PageListSegment setPageRanges(List pageRanges) { + this.pageRanges = pageRanges; + return this; + } + + /** + * Get the clearRanges property: The ClearRanges property. + * + * @return the clearRanges value. + */ + public List getClearRanges() { + return this.clearRanges; + } + + /** + * Set the clearRanges property: The ClearRanges property. + * + * @param clearRanges the clearRanges value to set. + * @return the PageListSegment object itself. + */ + public PageListSegment setClearRanges(List clearRanges) { + this.clearRanges = clearRanges; + return this; + } + + /** + * Get the nextMarker property: The NextMarker property. + * + * @return the nextMarker value. + */ + public String getNextMarker() { + return this.nextMarker; + } + + /** + * Set the nextMarker property: The NextMarker property. + * + * @param nextMarker the nextMarker value to set. + * @return the PageListSegment object itself. + */ + public PageListSegment setNextMarker(String nextMarker) { + this.nextMarker = nextMarker; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PremiumPageBlobAccessTier.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PremiumPageBlobAccessTier.java index 2fe071a8dd8f9..337fd3edeeb03 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PremiumPageBlobAccessTier.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PremiumPageBlobAccessTier.java @@ -54,7 +54,11 @@ public static PremiumPageBlobAccessTier fromString(String name) { return fromString(name, PremiumPageBlobAccessTier.class); } - /** @return known PremiumPageBlobAccessTier values. */ + /** + * Gets known PremiumPageBlobAccessTier values. + * + * @return known PremiumPageBlobAccessTier values. + */ public static Collection values() { return values(PremiumPageBlobAccessTier.class); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesFilterBlobsResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesFilterBlobsResponse.java index 0d98112c0b499..3f1eacaaab91b 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesFilterBlobsResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesFilterBlobsResponse.java @@ -28,7 +28,11 @@ public ServicesFilterBlobsResponse( super(request, statusCode, rawHeaders, value, headers); } - /** @return the deserialized response body. */ + /** + * Gets the deserialized response body. + * + * @return the deserialized response body. + */ @Override public FilterBlobSegment getValue() { return super.getValue(); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesGetPropertiesResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesGetPropertiesResponse.java index f92658eb6e734..f68626c78982f 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesGetPropertiesResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesGetPropertiesResponse.java @@ -30,7 +30,11 @@ public ServicesGetPropertiesResponse( super(request, statusCode, rawHeaders, value, headers); } - /** @return the deserialized response body. */ + /** + * Gets the deserialized response body. + * + * @return the deserialized response body. + */ @Override public BlobServiceProperties getValue() { return super.getValue(); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesGetStatisticsResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesGetStatisticsResponse.java index 94311f6b7efb5..d856f01fdfff0 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesGetStatisticsResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesGetStatisticsResponse.java @@ -30,7 +30,11 @@ public ServicesGetStatisticsResponse( super(request, statusCode, rawHeaders, value, headers); } - /** @return the deserialized response body. */ + /** + * Gets the deserialized response body. + * + * @return the deserialized response body. + */ @Override public BlobServiceStatistics getValue() { return super.getValue(); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesGetUserDelegationKeyResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesGetUserDelegationKeyResponse.java index 3c7430bcbda6f..054903e91b839 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesGetUserDelegationKeyResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesGetUserDelegationKeyResponse.java @@ -30,7 +30,11 @@ public ServicesGetUserDelegationKeyResponse( super(request, statusCode, rawHeaders, value, headers); } - /** @return the deserialized response body. */ + /** + * Gets the deserialized response body. + * + * @return the deserialized response body. + */ @Override public UserDelegationKey getValue() { return super.getValue(); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesListBlobContainersSegmentNextResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesListBlobContainersSegmentNextResponse.java index 3b6bfa11183cb..7da6818d07f3b 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesListBlobContainersSegmentNextResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesListBlobContainersSegmentNextResponse.java @@ -29,7 +29,11 @@ public ServicesListBlobContainersSegmentNextResponse( super(request, statusCode, rawHeaders, value, headers); } - /** @return the deserialized response body. */ + /** + * Gets the deserialized response body. + * + * @return the deserialized response body. + */ @Override public BlobContainersSegment getValue() { return super.getValue(); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesListBlobContainersSegmentResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesListBlobContainersSegmentResponse.java index 84fec3933cba3..48e2b7f5b42d1 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesListBlobContainersSegmentResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesListBlobContainersSegmentResponse.java @@ -29,7 +29,11 @@ public ServicesListBlobContainersSegmentResponse( super(request, statusCode, rawHeaders, value, headers); } - /** @return the deserialized response body. */ + /** + * Gets the deserialized response body. + * + * @return the deserialized response body. + */ @Override public BlobContainersSegment getValue() { return super.getValue(); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AccessTier.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AccessTier.java index 8f991f3c27b41..a8718e6dbf635 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AccessTier.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AccessTier.java @@ -63,7 +63,11 @@ public static AccessTier fromString(String name) { return fromString(name, AccessTier.class); } - /** @return known AccessTier values. */ + /** + * Gets known AccessTier values. + * + * @return known AccessTier values. + */ public static Collection values() { return values(AccessTier.class); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ArchiveStatus.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ArchiveStatus.java index 5ad0dc6fa4f74..b98d15a45b40f 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ArchiveStatus.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ArchiveStatus.java @@ -27,7 +27,11 @@ public static ArchiveStatus fromString(String name) { return fromString(name, ArchiveStatus.class); } - /** @return known ArchiveStatus values. */ + /** + * Gets known ArchiveStatus values. + * + * @return known ArchiveStatus values. + */ public static Collection values() { return values(ArchiveStatus.class); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobErrorCode.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobErrorCode.java index 53d41b4ee6dec..6597696eb716c 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobErrorCode.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobErrorCode.java @@ -385,7 +385,11 @@ public static BlobErrorCode fromString(String name) { return fromString(name, BlobErrorCode.class); } - /** @return known BlobErrorCode values. */ + /** + * Gets known BlobErrorCode values. + * + * @return known BlobErrorCode values. + */ public static Collection values() { return values(BlobErrorCode.class); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/GeoReplicationStatus.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/GeoReplicationStatus.java index dbd4a46417d33..e92bfa019e77a 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/GeoReplicationStatus.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/GeoReplicationStatus.java @@ -30,7 +30,11 @@ public static GeoReplicationStatus fromString(String name) { return fromString(name, GeoReplicationStatus.class); } - /** @return known GeoReplicationStatus values. */ + /** + * Gets known GeoReplicationStatus values. + * + * @return known GeoReplicationStatus values. + */ public static Collection values() { return values(GeoReplicationStatus.class); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageList.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageList.java index 3a6d6de247d63..71eb49c661722 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageList.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageList.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; +import com.azure.storage.blob.implementation.models.PageListHelper; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -16,6 +17,20 @@ @Fluent @JsonDeserialize(using = PageListDeserializer.class) public final class PageList { + static { + PageListHelper.setAccessor( + new PageListHelper.PageListAccessor() { + @Override + public String getNextMarker(PageList pageList) { + return pageList.getNextMarker(); + } + + @Override + public PageList setNextMarker(PageList pageList, String marker) { + return pageList.setNextMarker(marker); + } + }); + } /* * The PageRange property. */ @@ -28,6 +43,12 @@ public final class PageList { @JsonProperty("ClearRange") private List clearRange = new ArrayList<>(); + /* + * The NextMarker property. + */ + @JsonProperty(value = "NextMarker") + private String nextMarker; + /** * Get the pageRange property: The PageRange property. * @@ -67,4 +88,24 @@ public PageList setClearRange(List clearRange) { this.clearRange = clearRange; return this; } + + /** + * Get the nextMarker property: The NextMarker property. + * + * @return the nextMarker value. + */ + private String getNextMarker() { + return this.nextMarker; + } + + /** + * Set the nextMarker property: The NextMarker property. + * + * @param nextMarker the nextMarker value to set. + * @return the PageList object itself. + */ + private PageList setNextMarker(String nextMarker) { + this.nextMarker = nextMarker; + return this; + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageListDeserializer.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageListDeserializer.java index f7ab9521f2392..a098d2bc86f2c 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageListDeserializer.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageListDeserializer.java @@ -3,6 +3,7 @@ package com.azure.storage.blob.models; +import com.azure.storage.blob.implementation.models.PageListHelper; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonToken; import com.fasterxml.jackson.core.JsonTokenId; @@ -53,6 +54,7 @@ public PageList getNullValue(DeserializationContext ctxt) { public PageList deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { ArrayList pageRanges = new ArrayList<>(); ArrayList clearRanges = new ArrayList<>(); + String nextMarker = null; // Get the deserializer that handles PageRange. JsonDeserializer pageRangeDeserializer = @@ -73,9 +75,13 @@ public PageList deserialize(JsonParser p, DeserializationContext ctxt) throws IO } else if (p.getCurrentName().equals("ClearRange")) { // Current token is the node that begins a ClearRange object. clearRanges.add((ClearRange) clearRangeDeserializer.deserialize(p, ctxt)); + } else if (p.getCurrentName().equals("NextMarker")) { + // Current token is the next marker + nextMarker = "null".equals(p.getText()) ? null : p.getText(); } } - return new PageList().setPageRange(pageRanges).setClearRange(clearRanges); + return PageListHelper.setNextMarker(new PageList().setPageRange(pageRanges).setClearRange(clearRanges), + nextMarker); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageRangeItem.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageRangeItem.java new file mode 100644 index 0000000000000..65dcf153716a9 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageRangeItem.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.models; + +import com.azure.core.http.HttpRange; +import com.azure.storage.blob.specialized.PageBlobClient; + +/** + * Represents a page range on a page blob returned by {@link PageBlobClient#listPageRanges(BlobRange)}. + */ +public final class PageRangeItem { + private final HttpRange range; + private final boolean isClear; + + /** + * Creates a new {@code PageRangeItem}. + * + * @param range The {@link HttpRange}. + * @param isClear Whether the bytes are cleared. + */ + public PageRangeItem(HttpRange range, boolean isClear) { + this.range = range; + this.isClear = isClear; + } + + /** + * Gets the range property. + * + * @return The range property. + */ + public HttpRange getRange() { + return range; + } + + /** + * Gets whether the range is cleared. + * + * @return Whether the range is cleared. + */ + public boolean isClear() { + return this.isClear; + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PublicAccessType.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PublicAccessType.java index 163d8ae7610fb..0f384b56ffd3d 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PublicAccessType.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PublicAccessType.java @@ -27,7 +27,11 @@ public static PublicAccessType fromString(String name) { return fromString(name, PublicAccessType.class); } - /** @return known PublicAccessType values. */ + /** + * Gets known PublicAccessType values. + * + * @return known PublicAccessType values. + */ public static Collection values() { return values(PublicAccessType.class); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/RehydratePriority.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/RehydratePriority.java index 7d03edfcd201c..0bcd61e123db0 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/RehydratePriority.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/RehydratePriority.java @@ -27,7 +27,11 @@ public static RehydratePriority fromString(String name) { return fromString(name, RehydratePriority.class); } - /** @return known RehydratePriority values. */ + /** + * Gets known RehydratePriority values. + * + * @return known RehydratePriority values. + */ public static Collection values() { return values(RehydratePriority.class); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/ListPageRangesDiffOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/ListPageRangesDiffOptions.java new file mode 100644 index 0000000000000..57aa4e9775f00 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/ListPageRangesDiffOptions.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.storage.blob.options; + +import com.azure.storage.blob.models.BlobRange; +import com.azure.storage.blob.models.BlobRequestConditions; + +import java.util.Objects; + +/** + * Extended options that may be passed when getting the page ranges diff of a page blob. + */ +public class ListPageRangesDiffOptions { + private final BlobRange range; + private final String previousSnapshot; + private BlobRequestConditions requestConditions; + private Integer pageSize; + + + /** + * @param range The range to diff. + * @param previousSnapshot The previous snapshot that will serve as the base of the diff. + */ + public ListPageRangesDiffOptions(BlobRange range, String previousSnapshot) { + Objects.requireNonNull(range); + Objects.requireNonNull(previousSnapshot); + this.range = new BlobRange(range.getOffset(), range.getCount()); + this.previousSnapshot = previousSnapshot; + } + + /** + * Gets the range property. + * + * @return The range property. + */ + public BlobRange getRange() { + return range; + } + + /** + * Gets the previousSnapshot property. + * + * @return The previousSnapshot property. + */ + public String getPreviousSnapshot() { + return previousSnapshot; + } + + /** + * Gets the requestConditions property. + * + * @return The requestConditions property. + */ + public BlobRequestConditions getRequestConditions() { + return requestConditions; + } + + /** + * Sets the requestConditions property. + * + * @param requestConditions The requestConditions value to set. + * @return The updated object + */ + public ListPageRangesDiffOptions setRequestConditions(BlobRequestConditions requestConditions) { + this.requestConditions = requestConditions; + return this; + } + + /** + * Gets the pageSize property. + * + * @return The pageSize property. + */ + public Integer getMaxResultsPerPage() { + return pageSize; + } + + /** + * Sets the pageSize property. + * + * @param pageSize The pageSize value to set. + * @return The updated object + */ + public ListPageRangesDiffOptions setMaxResultsPerPage(Integer pageSize) { + this.pageSize = pageSize; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/ListPageRangesOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/ListPageRangesOptions.java new file mode 100644 index 0000000000000..c22b354e7a594 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/ListPageRangesOptions.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.storage.blob.options; + +import com.azure.storage.blob.models.BlobRange; +import com.azure.storage.blob.models.BlobRequestConditions; + +import java.util.Objects; + +/** + * Extended options that may be passed when getting the page ranges of a page blob. + */ +public class ListPageRangesOptions { + private final BlobRange range; + private BlobRequestConditions requestConditions; + private Integer pageSize; + + + /** + * @param range The range to diff. + */ + public ListPageRangesOptions(BlobRange range) { + Objects.requireNonNull(range); + this.range = new BlobRange(range.getOffset(), range.getCount()); + } + + /** + * Gets the range property. + * + * @return The range property. + */ + public BlobRange getRange() { + return range; + } + + /** + * Gets the requestConditions property. + * + * @return The requestConditions property. + */ + public BlobRequestConditions getRequestConditions() { + return requestConditions; + } + + /** + * Sets the requestConditions property. + * + * @param requestConditions The requestConditions value to set. + * @return The updated object + */ + public ListPageRangesOptions setRequestConditions(BlobRequestConditions requestConditions) { + this.requestConditions = requestConditions; + return this; + } + + /** + * Gets the pageSize property. + * + * @return The pageSize property. + */ + public Integer getMaxResultsPerPage() { + return pageSize; + } + + /** + * Sets the pageSize property. + * + * @param pageSize The pageSize value to set. + * @return The updated object + */ + public ListPageRangesOptions setMaxResultsPerPage(Integer pageSize) { + this.pageSize = pageSize; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java index 168426cdd775f..28b8cbdb300a7 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java @@ -7,8 +7,12 @@ import com.azure.core.annotation.ServiceClient; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpRange; import com.azure.core.http.HttpResponse; import com.azure.core.http.RequestConditions; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; @@ -20,27 +24,34 @@ import com.azure.storage.blob.implementation.models.EncryptionScope; import com.azure.storage.blob.implementation.models.PageBlobsClearPagesHeaders; import com.azure.storage.blob.implementation.models.PageBlobsCreateHeaders; +import com.azure.storage.blob.implementation.models.PageBlobsGetPageRangesDiffResponse; +import com.azure.storage.blob.implementation.models.PageBlobsGetPageRangesResponse; import com.azure.storage.blob.implementation.models.PageBlobsResizeHeaders; import com.azure.storage.blob.implementation.models.PageBlobsUpdateSequenceNumberHeaders; import com.azure.storage.blob.implementation.models.PageBlobsUploadPagesFromURLHeaders; import com.azure.storage.blob.implementation.models.PageBlobsUploadPagesHeaders; +import com.azure.storage.blob.implementation.models.PageListHelper; import com.azure.storage.blob.implementation.util.ModelHelper; import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.BlobImmutabilityPolicy; import com.azure.storage.blob.models.BlobRange; import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.BlobStorageException; +import com.azure.storage.blob.models.ClearRange; import com.azure.storage.blob.models.CopyStatusType; import com.azure.storage.blob.models.CpkInfo; import com.azure.storage.blob.models.CustomerProvidedKey; import com.azure.storage.blob.models.PageBlobCopyIncrementalRequestConditions; import com.azure.storage.blob.models.PageBlobItem; +import com.azure.storage.blob.models.PageRangeItem; import com.azure.storage.blob.models.PageBlobRequestConditions; import com.azure.storage.blob.models.PageList; import com.azure.storage.blob.models.PageRange; import com.azure.storage.blob.models.SequenceNumberActionType; import com.azure.storage.blob.options.PageBlobCopyIncrementalOptions; import com.azure.storage.blob.options.PageBlobCreateOptions; +import com.azure.storage.blob.options.ListPageRangesDiffOptions; +import com.azure.storage.blob.options.ListPageRangesOptions; import com.azure.storage.blob.options.PageBlobUploadPagesFromUrlOptions; import com.azure.storage.common.implementation.Constants; import com.azure.storage.common.implementation.StorageImplUtils; @@ -50,7 +61,13 @@ import java.net.MalformedURLException; import java.net.URL; import java.nio.ByteBuffer; +import java.time.Duration; +import java.util.Collections; +import java.util.List; import java.util.Map; +import java.util.function.BiFunction; +import java.util.stream.Collectors; +import java.util.stream.Stream; import static com.azure.core.util.FluxUtil.monoError; import static com.azure.core.util.FluxUtil.withContext; @@ -797,7 +814,7 @@ Mono> clearPagesWithResponse(PageRange pageRange, pageBlobRequestConditions.getIfUnmodifiedSince(), pageBlobRequestConditions.getIfMatch(), pageBlobRequestConditions.getIfNoneMatch(), pageBlobRequestConditions.getTagsConditions(), null, getCustomerProvidedKey(), encryptionScope, - context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) + context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) .map(rb -> { PageBlobsClearPagesHeaders hd = rb.getDeserializedHeaders(); PageBlobItem item = new PageBlobItem(hd.getETag(), hd.getLastModified(), hd.getContentMD5(), @@ -829,8 +846,10 @@ Mono> clearPagesWithResponse(PageRange pageRange, * @param blobRange {@link BlobRange} * * @return A reactive response containing the information of the cleared pages. + * @deprecated Use {@link #listPageRanges(BlobRange)} */ @ServiceMethod(returns = ReturnType.SINGLE) + @Deprecated public Mono getPageRanges(BlobRange blobRange) { return getPageRangesWithResponse(blobRange, null).flatMap(FluxUtil::toMono); } @@ -859,8 +878,10 @@ public Mono getPageRanges(BlobRange blobRange) { * @param blobRange {@link BlobRange} * @param requestConditions {@link BlobRequestConditions} * @return A reactive response emitting all the page ranges. + * @deprecated Use {@link #listPageRanges(ListPageRangesOptions)} */ @ServiceMethod(returns = ReturnType.SINGLE) + @Deprecated public Mono> getPageRangesWithResponse(BlobRange blobRange, BlobRequestConditions requestConditions) { try { @@ -880,9 +901,131 @@ Mono> getPageRangesWithResponse(BlobRange blobRange, BlobRequ getSnapshotId(), null, blobRange.toHeaderValue(), requestConditions.getLeaseId(), requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), - requestConditions.getTagsConditions(), null, + requestConditions.getTagsConditions(), null, null, null, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) - .map(response -> new SimpleResponse<>(response, response.getValue())); + .map(response -> new SimpleResponse<>(response.getRequest(), response.getStatusCode(), + response.getHeaders(), response.getValue())); + } + + /** + * Returns the list of valid page ranges for a page blob or snapshot of a page blob. For more information, see the + * Azure Docs. + * + *

Code Samples

+ * + * + *
+     * BlobRange blobRange = new BlobRange(offset);
+     *
+     * System.out.println("Valid Page Ranges are:");
+     * client.listPageRanges(blobRange).subscribe(rangeItem -> System.out.printf("Offset: %s, Length: %s%n",
+     * rangeItem.getRange().getOffset(), rangeItem.getRange().getLength()));
+     * 
+ * + * + * @param blobRange {@link BlobRange} + * + * @return A reactive response containing the information of the cleared pages. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listPageRanges(BlobRange blobRange) { + return listPageRanges(new ListPageRangesOptions(blobRange)); + } + + /** + * Returns the list of valid page ranges for a page blob or snapshot of a page blob. For more information, see the + * Azure Docs. + * + *

Code Samples

+ * + * + *
+     * ListPageRangesOptions options = new ListPageRangesOptions(new BlobRange(offset))
+     * 	  .setMaxResultsPerPage(1000).setRequestConditions(new BlobRequestConditions().setLeaseId(leaseId));
+     *
+     * client.listPageRanges(options)
+     * 	  .subscribe(rangeItem -> System.out.printf("Offset: %s, Length: %s%n", rangeItem.getRange().getOffset(),
+     * 		  rangeItem.getRange().getLength()));
+     * 
+ * + * + * @param options {@link ListPageRangesOptions} + * @return A reactive response emitting all the page ranges. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listPageRanges(ListPageRangesOptions options) { + return new PagedFlux<>( + pageSize -> withContext(context -> + listPageRangesWithOptionalTimeout(options, null, context).apply(null, pageSize)), + (continuationToken, pageSize) -> withContext(context -> + listPageRangesWithOptionalTimeout(options, null, context).apply(continuationToken, pageSize))); + } + + /* + * Implementation for this paged listing operation, supporting an optional timeout provided by the synchronous + * ContainerClient. Applies the given timeout to each Mono backing the + * PagedFlux. + * + * @param delimiter The delimiter for blob hierarchy, "/" for hierarchy based on directories + * @param options {@link PageBlobGetPageRangesOptions} + * @param timeout An optional timeout to be applied to the network asynchronous operations. + * @return A reactive response emitting the listed blobs, flattened. + */ + BiFunction>> listPageRangesWithOptionalTimeout( + ListPageRangesOptions options, Duration timeout, Context context) { + return (marker, pageSize) -> { + ListPageRangesOptions finalOptions; + /* + If pageSize was not set in a .byPage(int) method, the page size from options will be preserved. + Otherwise, prefer the new value. + */ + if (pageSize != null) { + finalOptions = new ListPageRangesOptions(options.getRange()).setMaxResultsPerPage(pageSize); + } else { + finalOptions = options; + } + return getPageRangesSegment(marker, finalOptions, timeout, context) + .map(response -> { + List value = response.getValue() == null + ? Collections.emptyList() + : Stream.concat( + response.getValue().getPageRange().stream().map(PageBlobAsyncClient::toPageBlobRange), + response.getValue().getClearRange().stream().map(PageBlobAsyncClient::toPageBlobRange) + ).collect(Collectors.toList()); + + return new PagedResponseBase<>( + response.getRequest(), + response.getStatusCode(), + response.getHeaders(), + value, + PageListHelper.getNextMarker(response.getValue()), + response.getDeserializedHeaders()); + }); + }; + } + + private Mono getPageRangesSegment(String marker, + ListPageRangesOptions options, Duration timeout, Context context) { + BlobRequestConditions requestConditions = options.getRequestConditions() == null ? new BlobRequestConditions() + : options.getRequestConditions(); + context = context == null ? Context.NONE : context; + + return StorageImplUtils.applyOptionalTimeout( + this.azureBlobStorage.getPageBlobs().getPageRangesWithResponseAsync(containerName, blobName, + getSnapshotId(), null, options.getRange().toHeaderValue(), requestConditions.getLeaseId(), + requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), + requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), + requestConditions.getTagsConditions(), null, marker, options.getMaxResultsPerPage(), + context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)), + timeout); + } + + private static PageRangeItem toPageBlobRange(PageRange range) { + return new PageRangeItem(new HttpRange(range.getStart(), range.getEnd() - range.getStart() + 1), false); + } + + private static PageRangeItem toPageBlobRange(ClearRange range) { + return new PageRangeItem(new HttpRange(range.getStart(), range.getEnd() - range.getStart() + 1), true); } /** @@ -912,8 +1055,10 @@ Mono> getPageRangesWithResponse(BlobRange blobRange, BlobRequ * long as the snapshot specified by prevsnapshot is the older of the two. * * @return A reactive response emitting all the different page ranges. + * @deprecated See {@link #listPageRangesDiff(BlobRange, String)} */ @ServiceMethod(returns = ReturnType.SINGLE) + @Deprecated public Mono getPageRangesDiff(BlobRange blobRange, String prevSnapshot) { return getPageRangesDiffWithResponse(blobRange, prevSnapshot, null).flatMap(FluxUtil::toMono); } @@ -949,8 +1094,10 @@ public Mono getPageRangesDiff(BlobRange blobRange, String prevSnapshot * @return A reactive response emitting all the different page ranges. * * @throws IllegalArgumentException If {@code prevSnapshot} is {@code null} + * @deprecated See {@link #listPageRangesDiff(ListPageRangesDiffOptions)} */ @ServiceMethod(returns = ReturnType.SINGLE) + @Deprecated public Mono> getPageRangesDiffWithResponse(BlobRange blobRange, String prevSnapshot, BlobRequestConditions requestConditions) { try { @@ -961,6 +1108,70 @@ public Mono> getPageRangesDiffWithResponse(BlobRange blobRang } } + /** + * Gets the collection of page ranges that differ between a specified snapshot and this page blob. For more + * information, see the Azure + * Docs. + * + *

Code Samples

+ * + * + *
+     * BlobRange blobRange = new BlobRange(offset);
+     * String prevSnapshot = "previous snapshot";
+     *
+     * System.out.println("Valid Page Ranges are:");
+     * client.listPageRangesDiff(blobRange, prevSnapshot).subscribe(rangeItem ->
+     *     System.out.printf("Offset: %s, Length: %s, isClear: %s%n",
+     *     rangeItem.getRange().getOffset(), rangeItem.getRange().getLength(), rangeItem.isClear()));
+     * 
+ * + * + * @param blobRange {@link BlobRange} + * @param prevSnapshot Specifies that the response will contain only pages that were changed between target blob and + * previous snapshot. Changed pages include both updated and cleared pages. The target blob may be a snapshot, as + * long as the snapshot specified by prevsnapshot is the older of the two. + * + * @return A reactive response emitting all the different page ranges. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listPageRangesDiff(BlobRange blobRange, String prevSnapshot) { + return listPageRangesDiff(new ListPageRangesDiffOptions(blobRange, prevSnapshot)); + } + + /** + * Gets the collection of page ranges that differ between a specified snapshot and this page blob. For more + * information, see the Azure + * Docs. + * + *

Code Samples

+ * + * + *
+     * ListPageRangesDiffOptions options = new ListPageRangesDiffOptions(new BlobRange(offset), "previous snapshot")
+     * 	   .setRequestConditions(new BlobRequestConditions().setLeaseId(leaseId))
+     * 	   .setMaxResultsPerPage(1000);
+     *
+     * client.listPageRangesDiff(options)
+     * 	   .subscribe(rangeItem -> System.out.printf("Offset: %s, Length: %s, isClear: %s%n",
+     * 	       rangeItem.getRange().getOffset(), rangeItem.getRange().getLength(), rangeItem.isClear()));
+     * 
+ * + * + * @param options {@link ListPageRangesDiffOptions}. + * @return A reactive response emitting all the different page ranges. + * + * @throws IllegalArgumentException If {@code prevSnapshot} is {@code null} + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listPageRangesDiff(ListPageRangesDiffOptions options) { + return new PagedFlux<>( + pageSize -> withContext(context -> + listPageRangesDiffWithOptionalTimeout(options, null, context).apply(null, pageSize)), + (continuationToken, pageSize) -> withContext(context -> + listPageRangesDiffWithOptionalTimeout(options, null, context).apply(continuationToken, pageSize))); + } + /** * This API only works for managed disk accounts. *

Gets the collection of page ranges that differ between a specified snapshot and this page blob. For more @@ -1062,9 +1273,73 @@ Mono> getPageRangesDiffWithResponse(BlobRange blobRange, Stri getSnapshotId(), null, prevSnapshot, prevSnapshotUrl, blobRange.toHeaderValue(), requestConditions.getLeaseId(), requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), - requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, + requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, null, null, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) - .map(response -> new SimpleResponse<>(response, response.getValue())); + .map(response -> new SimpleResponse<>(response.getRequest(), response.getStatusCode(), + response.getHeaders(), response.getValue())); + } + + /* + * Implementation for this paged listing operation, supporting an optional timeout provided by the synchronous + * ContainerClient. Applies the given timeout to each Mono backing the + * PagedFlux. + * + * @param delimiter The delimiter for blob hierarchy, "/" for hierarchy based on directories + * @param options {@link PageBlobGetPageRangesDiffOptions} + * @param timeout An optional timeout to be applied to the network asynchronous operations. + * @return A reactive response emitting the listed blobs, flattened. + */ + BiFunction>> listPageRangesDiffWithOptionalTimeout(ListPageRangesDiffOptions options, + Duration timeout, Context context) { + return (marker, pageSize) -> { + ListPageRangesDiffOptions finalOptions; + /* + If pageSize was not set in a .byPage(int) method, the page size from options will be preserved. + Otherwise, prefer the new value. + */ + if (pageSize != null) { + finalOptions = + new ListPageRangesDiffOptions(options.getRange(), options.getPreviousSnapshot()) + .setRequestConditions(options.getRequestConditions()).setMaxResultsPerPage(pageSize); + } else { + finalOptions = options; + } + + return getPageRangesDiffSegment(marker, finalOptions, timeout, context) + .map(response -> { + List value = response.getValue() == null + ? Collections.emptyList() + : Stream.concat( + response.getValue().getPageRange().stream().map(PageBlobAsyncClient::toPageBlobRange), + response.getValue().getClearRange().stream().map(PageBlobAsyncClient::toPageBlobRange)) + .collect(Collectors.toList()); + + return new PagedResponseBase<>( + response.getRequest(), + response.getStatusCode(), + response.getHeaders(), + value, + PageListHelper.getNextMarker(response.getValue()), + response.getDeserializedHeaders()); + }); + }; + } + + private Mono getPageRangesDiffSegment(String marker, + ListPageRangesDiffOptions options, Duration timeout, Context context) { + BlobRequestConditions requestConditions = options.getRequestConditions() == null ? new BlobRequestConditions() + : options.getRequestConditions(); + context = context == null ? Context.NONE : context; + + return StorageImplUtils.applyOptionalTimeout( + this.azureBlobStorage.getPageBlobs().getPageRangesDiffWithResponseAsync(containerName, blobName, + getSnapshotId(), null, options.getPreviousSnapshot(), null, + options.getRange().toHeaderValue(), requestConditions.getLeaseId(), + requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), + requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), + requestConditions.getTagsConditions(), null, marker, options.getMaxResultsPerPage(), + context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)), + timeout); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java index aad410b118dc7..33b261cad9769 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java @@ -8,6 +8,8 @@ import com.azure.core.annotation.ServiceMethod; import com.azure.core.exception.UnexpectedLengthException; import com.azure.core.http.RequestConditions; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.storage.blob.BlobClient; @@ -18,13 +20,16 @@ import com.azure.storage.blob.models.BlobStorageException; import com.azure.storage.blob.models.CopyStatusType; import com.azure.storage.blob.models.CustomerProvidedKey; +import com.azure.storage.blob.models.PageRangeItem; +import com.azure.storage.blob.options.PageBlobCopyIncrementalOptions; +import com.azure.storage.blob.options.PageBlobCreateOptions; import com.azure.storage.blob.models.PageBlobItem; import com.azure.storage.blob.models.PageBlobRequestConditions; import com.azure.storage.blob.models.PageList; import com.azure.storage.blob.models.PageRange; import com.azure.storage.blob.models.SequenceNumberActionType; -import com.azure.storage.blob.options.PageBlobCopyIncrementalOptions; -import com.azure.storage.blob.options.PageBlobCreateOptions; +import com.azure.storage.blob.options.ListPageRangesDiffOptions; +import com.azure.storage.blob.options.ListPageRangesOptions; import com.azure.storage.blob.options.PageBlobUploadPagesFromUrlOptions; import com.azure.storage.common.Utility; import com.azure.storage.common.implementation.Constants; @@ -637,8 +642,10 @@ public Response clearPagesWithResponse(PageRange pageRange, * * @param blobRange {@link BlobRange} * @return The information of the cleared pages. + * @deprecated See {@link #listPageRanges(BlobRange)} */ @ServiceMethod(returns = ReturnType.SINGLE) + @Deprecated public PageList getPageRanges(BlobRange blobRange) { return getPageRangesWithResponse(blobRange, null, null, Context.NONE).getValue(); } @@ -670,14 +677,81 @@ public PageList getPageRanges(BlobRange blobRange) { * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return All the page ranges. + * @deprecated See {@link #listPageRanges(ListPageRangesOptions,Duration,Context)} */ @ServiceMethod(returns = ReturnType.SINGLE) + @Deprecated public Response getPageRangesWithResponse(BlobRange blobRange, BlobRequestConditions requestConditions, Duration timeout, Context context) { return StorageImplUtils.blockWithOptionalTimeout(pageBlobAsyncClient .getPageRangesWithResponse(blobRange, requestConditions, context), timeout); } + /** + * Returns the list of valid page ranges for a page blob or snapshot of a page blob. For more information, see the + * Azure Docs. + * + *

Code Samples

+ * + * + *
+     * BlobRange blobRange = new BlobRange(offset);
+     * String prevSnapshot = "previous snapshot";
+     * PagedIterable iterable = client.listPageRanges(blobRange);
+     * for (PageRangeItem item : iterable) {
+     *     System.out.printf("Offset: %s, Length: %s, isClear: %s%n", item.getRange().getOffset(),
+     *         item.getRange().getLength(), item.isClear());
+     * }
+     * 
+ * + * + * @param blobRange {@link BlobRange} + * + * @return A reactive response containing the information of the cleared pages. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedIterable listPageRanges(BlobRange blobRange) { + return listPageRanges(new ListPageRangesOptions(blobRange), null, null); + } + + /** + * Returns the list of valid page ranges for a page blob or snapshot of a page blob. For more information, see the + * Azure Docs. + * + *

Code Samples

+ * + * + * ListPageRangesOptions options = new ListPageRangesOptions&40;new BlobRange&40;offset&41;&41; + * .setRequestConditions&40;new BlobRequestConditions&40;&41;.setLeaseId&40;leaseId&41;&41; + * .setMaxResultsPerPage&40;1000&41;; + * Context context = new Context&40;key, value&41;; + * PagedIterable<PageRangeItem> iter = client + * .listPageRanges&40;options, timeout, context&41;; + * System.out.println&40;"Valid Page Ranges are:"&41;; + * for &40;PageRangeItem item : iter&41; { + * System.out.printf&40;"Offset: %s, Length: %s, isClear: %s%n", item.getRange&40;&41;.getOffset&40;&41;, + * item.getRange&40;&41;.getLength&40;&41;, item.isClear&40;&41;&41;; + * } + * + * + * + * @param options {@link ListPageRangesOptions} + * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return A reactive response emitting all the page ranges. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedIterable listPageRanges(ListPageRangesOptions options, Duration timeout, + Context context) { + return new PagedIterable<>( + // pull timeout out of options + new PagedFlux<>( + pageSize -> pageBlobAsyncClient.listPageRangesWithOptionalTimeout( + options, timeout, context).apply(null, pageSize), + (continuationToken, pageSize) -> pageBlobAsyncClient.listPageRangesWithOptionalTimeout( + options, timeout, context).apply(continuationToken, pageSize))); + } + /** * Gets the collection of page ranges that differ between a specified snapshot and this page blob. For more * information, see the Azure @@ -703,8 +777,10 @@ public Response getPageRangesWithResponse(BlobRange blobRange, BlobReq * previous snapshot. Changed pages include both updated and cleared pages. The target blob may be a snapshot, as * long as the snapshot specified by prevsnapshot is the older of the two. * @return All the different page ranges. + * @deprecated See {@link #listPageRangesDiff(BlobRange, String)} */ @ServiceMethod(returns = ReturnType.SINGLE) + @Deprecated public PageList getPageRangesDiff(BlobRange blobRange, String prevSnapshot) { return getPageRangesDiffWithResponse(blobRange, prevSnapshot, null, null, Context.NONE).getValue(); } @@ -742,8 +818,10 @@ public PageList getPageRangesDiff(BlobRange blobRange, String prevSnapshot) { * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return All the different page ranges. + * @deprecated See {@link #listPageRanges(ListPageRangesOptions,Duration,Context)} )} */ @ServiceMethod(returns = ReturnType.SINGLE) + @Deprecated public Response getPageRangesDiffWithResponse(BlobRange blobRange, String prevSnapshot, BlobRequestConditions requestConditions, Duration timeout, Context context) { return StorageImplUtils.blockWithOptionalTimeout(pageBlobAsyncClient @@ -751,6 +829,83 @@ public Response getPageRangesDiffWithResponse(BlobRange blobRange, Str timeout); } + /** + * Gets the collection of page ranges that differ between a specified snapshot and this page blob. For more + * information, see the Azure + * Docs. + * + *

Code Samples

+ * + * + *
+     * BlobRange blobRange = new BlobRange(offset);
+     * String prevSnapshot = "previous snapshot";
+     * PagedIterable<PageRangeItem> iterable = client.listPageRangesDiff(blobRange, prevSnapshot);
+     *
+     * for (PageRangeItem item : iterable) {
+     *     System.out.printf("Offset: %s, Length: %s, isClear: %s%n", item.getRange().getOffset(),
+     *         item.getRange().getLength(), item.isClear());
+     * }
+     * 
+ * + * + * @param blobRange {@link BlobRange} + * @param prevSnapshot Specifies that the response will contain only pages that were changed between target blob and + * previous snapshot. Changed pages include both updated and cleared pages. The target blob may be a snapshot, as + * long as the snapshot specified by prevsnapshot is the older of the two. + * + * @return A reactive response emitting all the different page ranges. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedIterable listPageRangesDiff(BlobRange blobRange, String prevSnapshot) { + return listPageRangesDiff(new ListPageRangesDiffOptions(blobRange, prevSnapshot), null, null); + } + + /** + * Gets the collection of page ranges that differ between a specified snapshot and this page blob. For more + * information, see the Azure + * Docs. + * + *

Code Samples

+ * + * + *
+     * ListPageRangesDiffOptions options = new ListPageRangesDiffOptions(new BlobRange(offset), "previous snapshot")
+     *     .setRequestConditions(new BlobRequestConditions().setLeaseId(leaseId))
+     *     .setMaxResultsPerPage(1000);
+     *
+     * Context context = new Context(key, value);
+     *
+     * PagedIterable<PageRangeItem≶ iter = client
+     *     .listPageRangesDiff(options, timeout, context);
+     *
+     * System.out.println("Valid Page Ranges are:");
+     * for (PageRangeItem item : iter) {
+     *     System.out.printf("Offset: %s, Length: %s, isClear: %s%n", item.getRange().getOffset(),
+     *         item.getRange().getLength(), item.isClear());
+     * }
+     * 
+ * + * + * @param options {@link ListPageRangesDiffOptions}. + * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return A reactive response emitting all the different page ranges. + * + * @throws IllegalArgumentException If {@code prevSnapshot} is {@code null} + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedIterable listPageRangesDiff(ListPageRangesDiffOptions options, Duration timeout, + Context context) { + return new PagedIterable<>( + // pull timeout out of options + new PagedFlux<>( + pageSize -> pageBlobAsyncClient.listPageRangesDiffWithOptionalTimeout( + options, timeout, context).apply(null, pageSize), + (continuationToken, pageSize) -> pageBlobAsyncClient.listPageRangesDiffWithOptionalTimeout( + options, timeout, context).apply(continuationToken, pageSize))); + } + /** * This API only works for managed disk accounts. *

Gets the collection of page ranges that differ between a specified snapshot and this page blob. For more diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobAsyncClientJavaDocCodeSnippets.java index 638a21f6295ae..ab7b031ef711e 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobAsyncClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobAsyncClientJavaDocCodeSnippets.java @@ -9,6 +9,8 @@ import com.azure.storage.blob.models.BlobRange; import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.CopyStatusType; +import com.azure.storage.blob.options.ListPageRangesDiffOptions; +import com.azure.storage.blob.options.ListPageRangesOptions; import com.azure.storage.blob.options.PageBlobCopyIncrementalOptions; import com.azure.storage.blob.options.PageBlobCreateOptions; import com.azure.storage.blob.models.PageBlobRequestConditions; @@ -262,6 +264,29 @@ public void getPageRangesWithResponseCodeSnippet() { // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.getPageRangesWithResponse#BlobRange-BlobRequestConditions } + /** + * Code snippets for {@link PageBlobAsyncClient#listPageRanges(BlobRange)} and + * {@link PageBlobAsyncClient#listPageRanges(ListPageRangesOptions)} + */ + public void listPageRangesCodeSnippets() { + // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.listPageRanges#BlobRange + BlobRange blobRange = new BlobRange(offset); + + System.out.println("Valid Page Ranges are:"); + client.listPageRanges(blobRange).subscribe(rangeItem -> System.out.printf("Offset: %s, Length: %s%n", + rangeItem.getRange().getOffset(), rangeItem.getRange().getLength())); + // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.listPageRanges#BlobRange + + // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.listPageRanges#ListPageRangesOptions + ListPageRangesOptions options = new ListPageRangesOptions(new BlobRange(offset)) + .setMaxResultsPerPage(1000).setRequestConditions(new BlobRequestConditions().setLeaseId(leaseId)); + + client.listPageRanges(options) + .subscribe(rangeItem -> System.out.printf("Offset: %s, Length: %s%n", rangeItem.getRange().getOffset(), + rangeItem.getRange().getLength())); + // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.listPageRanges#ListPageRangesOptions + } + /** * Code snippets for {@link PageBlobAsyncClient#getPageRangesDiff(BlobRange, String)} */ @@ -299,6 +324,32 @@ public void getPageRangesDiffWithResponseCodeSnippet() { // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.getPageRangesDiffWithResponse#BlobRange-String-BlobRequestConditions } + /** + * Code snippets for {@link PageBlobAsyncClient#listPageRangesDiff(BlobRange, String)} and + * {@link PageBlobAsyncClient#listPageRangesDiff(ListPageRangesDiffOptions)} + */ + public void listPageRangesDiffCodeSnippets() { + // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.listPageRangesDiff#BlobRange-String + BlobRange blobRange = new BlobRange(offset); + String prevSnapshot = "previous snapshot"; + + System.out.println("Valid Page Ranges are:"); + client.listPageRangesDiff(blobRange, prevSnapshot).subscribe(rangeItem -> + System.out.printf("Offset: %s, Length: %s, isClear: %s%n", + rangeItem.getRange().getOffset(), rangeItem.getRange().getLength(), rangeItem.isClear())); + // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.listPageRangesDiff#BlobRange-String + + // BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.listPageRangesDiff#ListPageRangesDiffOptions + ListPageRangesDiffOptions options = new ListPageRangesDiffOptions(new BlobRange(offset), "previous snapshot") + .setRequestConditions(new BlobRequestConditions().setLeaseId(leaseId)) + .setMaxResultsPerPage(1000); + + client.listPageRangesDiff(options) + .subscribe(rangeItem -> System.out.printf("Offset: %s, Length: %s, isClear: %s%n", + rangeItem.getRange().getOffset(), rangeItem.getRange().getLength(), rangeItem.isClear())); + // END: com.azure.storage.blob.specialized.PageBlobAsyncClient.listPageRangesDiff#ListPageRangesDiffOptions + } + /** * Code snippets for {@link PageBlobAsyncClient#getManagedDiskPageRangesDiff(BlobRange, String)} */ diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobClientJavaDocCodeSnippets.java index 59726a2001456..33e1cb664ffd5 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/PageBlobClientJavaDocCodeSnippets.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.specialized; import com.azure.core.http.RequestConditions; +import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.storage.blob.models.PageBlobCopyIncrementalRequestConditions; @@ -11,6 +12,9 @@ import com.azure.storage.blob.models.BlobRange; import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.CopyStatusType; +import com.azure.storage.blob.models.PageRangeItem; +import com.azure.storage.blob.options.ListPageRangesDiffOptions; +import com.azure.storage.blob.options.ListPageRangesOptions; import com.azure.storage.blob.options.PageBlobCopyIncrementalOptions; import com.azure.storage.blob.options.PageBlobCreateOptions; import com.azure.storage.blob.models.PageBlobItem; @@ -283,6 +287,40 @@ public void getPageRangesWithResponseCodeSnippet() { // END: com.azure.storage.blob.specialized.PageBlobClient.getPageRangesWithResponse#BlobRange-BlobRequestConditions-Duration-Context } + /** + * Code snippets for {@link PageBlobClient#listPageRanges(ListPageRangesOptions, Duration, Context)} and + * {@link PageBlobClient#listPageRanges(BlobRange)}. + */ + public void listPageRangesCodeSnippets() { + // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.listPageRanges#BlobRange + BlobRange blobRange = new BlobRange(offset); + String prevSnapshot = "previous snapshot"; + PagedIterable iterable = client.listPageRanges(blobRange); + + for (PageRangeItem item : iterable) { + System.out.printf("Offset: %s, Length: %s, isClear: %s%n", item.getRange().getOffset(), + item.getRange().getLength(), item.isClear()); + } + // END: com.azure.storage.blob.specialized.PageBlobClient.listPageRanges#BlobRange + + // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.getPageRangesWithResponse#ListPageRangesOptions-Duration-Context + ListPageRangesOptions options = new ListPageRangesOptions(new BlobRange(offset)) + .setRequestConditions(new BlobRequestConditions().setLeaseId(leaseId)) + .setMaxResultsPerPage(1000); + + Context context = new Context(key, value); + + PagedIterable iter = client + .listPageRanges(options, timeout, context); + + System.out.println("Valid Page Ranges are:"); + for (PageRangeItem item : iter) { + System.out.printf("Offset: %s, Length: %s, isClear: %s%n", item.getRange().getOffset(), + item.getRange().getLength(), item.isClear()); + } + // END: com.azure.storage.blob.specialized.PageBlobClient.getPageRangesWithResponse#ListPageRangesOptions-Duration-Context + } + /** * Code snippets for {@link PageBlobClient#getPageRangesDiff(BlobRange, String)} */ @@ -320,6 +358,40 @@ public void getPageRangesDiffWithResponseCodeSnippet() { // END: com.azure.storage.blob.specialized.PageBlobClient.getPageRangesDiffWithResponse#BlobRange-String-BlobRequestConditions-Duration-Context } + /** + * Code snippets for {@link PageBlobClient#listPageRangesDiff(ListPageRangesDiffOptions, Duration, Context)} and + * {@link PageBlobClient#listPageRangesDiff(BlobRange, String)} + */ + public void listPageRangesDiffCodeSnippets() { + // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.listPageRangesDiff#BlobRange-String + BlobRange blobRange = new BlobRange(offset); + String prevSnapshot = "previous snapshot"; + PagedIterable iterable = client.listPageRangesDiff(blobRange, prevSnapshot); + + for (PageRangeItem item : iterable) { + System.out.printf("Offset: %s, Length: %s, isClear: %s%n", item.getRange().getOffset(), + item.getRange().getLength(), item.isClear()); + } + // END: com.azure.storage.blob.specialized.PageBlobClient.listPageRangesDiff#BlobRange-String + + // BEGIN: com.azure.storage.blob.specialized.PageBlobClient.getPageRangesDiffWithResponse#ListPageRangesDiffOptions-Duration-Context + ListPageRangesDiffOptions options = new ListPageRangesDiffOptions(new BlobRange(offset), "previous snapshot") + .setRequestConditions(new BlobRequestConditions().setLeaseId(leaseId)) + .setMaxResultsPerPage(1000); + + Context context = new Context(key, value); + + PagedIterable iter = client + .listPageRangesDiff(options, timeout, context); + + System.out.println("Valid Page Ranges are:"); + for (PageRangeItem item : iter) { + System.out.printf("Offset: %s, Length: %s, isClear: %s%n", item.getRange().getOffset(), + item.getRange().getLength(), item.isClear()); + } + // END: com.azure.storage.blob.specialized.PageBlobClient.getPageRangesDiffWithResponse#ListPageRangesDiffOptions-Duration-Context + } + /** * Code snippets for {@link PageBlobClient#getManagedDiskPageRangesDiff(BlobRange, String)} */ diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/PageBlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/PageBlobAPITest.groovy index d8616015fa6a7..8b52539fb4194 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/PageBlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/PageBlobAPITest.groovy @@ -4,6 +4,7 @@ package com.azure.storage.blob.specialized import com.azure.core.exception.UnexpectedLengthException +import com.azure.core.http.HttpRange import com.azure.core.util.CoreUtils import com.azure.storage.blob.APISpec import com.azure.storage.blob.BlobContainerClient @@ -23,6 +24,8 @@ import com.azure.storage.blob.models.PublicAccessType import com.azure.storage.blob.models.SequenceNumberActionType import com.azure.storage.blob.options.AppendBlobCreateOptions import com.azure.storage.blob.options.BlobGetTagsOptions +import com.azure.storage.blob.options.ListPageRangesDiffOptions +import com.azure.storage.blob.options.ListPageRangesOptions import com.azure.storage.blob.options.PageBlobCopyIncrementalOptions import com.azure.storage.blob.options.PageBlobCreateOptions import com.azure.storage.common.implementation.Constants @@ -944,6 +947,180 @@ class PageBlobAPITest extends APISpec { thrown(BlobStorageException) } + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2021_06_08") + def "List page ranges"() { + setup: + bc.create(4 * Constants.KB, true) + def data = new ByteArrayInputStream(getRandomByteArray(4 * Constants.KB)) + bc.uploadPages(new PageRange().setStart(0).setEnd(4 * Constants.KB - 1), data) + bc.clearPages(new PageRange().setStart(Constants.KB).setEnd(2 * Constants.KB - 1)) + bc.clearPages(new PageRange().setStart(3 * Constants.KB).setEnd(4 * Constants.KB - 1)) + + when: + def iterable = bc.listPageRanges(new BlobRange(0, 4 * Constants.KB)).iterator() + def item = iterable.next() + + then: + item.getRange().equals(new HttpRange(0, Constants.KB)) + !item.isClear() + + when: + item = iterable.next() + + then: + item.getRange().equals(new HttpRange(2 * Constants.KB, Constants.KB)) + !item.isClear() + + !iterable.hasNext() + } + + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2021_06_08") + def "List page ranges pageSize"() { + setup: + bc.create(4 * Constants.KB, true) + def data = new ByteArrayInputStream(getRandomByteArray(4 * Constants.KB)) + data.mark(Integer.MAX_VALUE) + bc.uploadPages(new PageRange().setStart(0).setEnd(4 * Constants.KB - 1), data) + bc.clearPages(new PageRange().setStart(Constants.KB).setEnd(2 * Constants.KB - 1)) + bc.clearPages(new PageRange().setStart(3 * Constants.KB).setEnd(4 * Constants.KB - 1)) + + when: "max results on options" + def iterator = bc.listPageRanges(new ListPageRangesOptions(new BlobRange(0, 4 * Constants.KB)) + .setMaxResultsPerPage(1), null, null).iterableByPage().iterator() + def page = iterator.next() + + then: + page.getValue().size() == 1 + + when: + page = iterator.next() + + then: + page.getValue().size() == 1 + !iterator.hasNext() + + when: "max results on iterableByPage" + iterator = bc.listPageRanges(new ListPageRangesOptions(new BlobRange(0, 4 * Constants.KB)), null, null) + .iterableByPage(1).iterator() + page = iterator.next() + + then: + page.getValue().size() == 1 + + when: + page = iterator.next() + + then: + page.getValue().size() == 1 + !iterator.hasNext() + } + + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2021_06_08") + def "List pages continuation token"() { + setup: + bc.create(4 * Constants.KB, true) + def data = new ByteArrayInputStream(getRandomByteArray(4 * Constants.KB)) + data.mark(Integer.MAX_VALUE) + bc.uploadPages(new PageRange().setStart(0).setEnd(4 * Constants.KB - 1), data) + bc.clearPages(new PageRange().setStart(Constants.KB).setEnd(2 * Constants.KB - 1)) + bc.clearPages(new PageRange().setStart(3 * Constants.KB).setEnd(4 * Constants.KB - 1)) + + when: + def iterator = bc.listPageRanges(new ListPageRangesOptions(new BlobRange(0, 4 * Constants.KB)) + .setMaxResultsPerPage(1), null, null).iterableByPage().iterator() + def token = iterator.next().getContinuationToken() + + iterator = bc.listPageRanges(new ListPageRangesOptions(new BlobRange(0, 4 * Constants.KB)), null, null) + .iterableByPage(token).iterator() + def page = iterator.next() + + then: + page.getValue().size() == 1 + !iterator.hasNext() + } + + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2021_06_08") + def "List pages range"() { + setup: + bc.create(4 * Constants.KB, true) + def data = new ByteArrayInputStream(getRandomByteArray(4 * Constants.KB)) + data.mark(Integer.MAX_VALUE) + bc.uploadPages(new PageRange().setStart(0).setEnd(4 * Constants.KB - 1), data) + bc.clearPages(new PageRange().setStart(Constants.KB).setEnd(2 * Constants.KB - 1)) + bc.clearPages(new PageRange().setStart(3 * Constants.KB).setEnd(4 * Constants.KB - 1)) + + when: + def iterator = bc.listPageRanges(new ListPageRangesOptions(new BlobRange(2 * Constants.KB + 1, 2 * Constants.KB)), + null, null).iterator() + + then: + iterator.size() == 1 + } + + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2021_06_08") + @Unroll + def "List page ranges AC"() { + setup: + def t = new HashMap() + t.put("foo", "bar") + bc.setTags(t) + match = setupBlobMatchCondition(bc, match) + leaseID = setupBlobLeaseCondition(bc, leaseID) + def bac = new BlobRequestConditions() + .setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) + .setTagsConditions(tags) + + when: + bc.listPageRanges(new ListPageRangesOptions(new BlobRange(0, PageBlobClient.PAGE_BYTES)) + .setRequestConditions(bac), null, null).size() + + then: + notThrown(BlobStorageException) + + where: + modified | unmodified | match | noneMatch | leaseID | tags + null | null | null | null | null | null + oldDate | null | null | null | null | null + null | newDate | null | null | null | null + null | null | receivedEtag | null | null | null + null | null | null | garbageEtag | null | null + null | null | null | null | receivedLeaseID | null + null | null | null | null | null | "\"foo\" = 'bar'" + } + + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2021_06_08") + @Unroll + def "List page ranges AC fail"() { + setup: + def bac = new BlobRequestConditions() + .setLeaseId(setupBlobLeaseCondition(bc, leaseID)) + .setIfMatch(match) + .setIfNoneMatch(setupBlobMatchCondition(bc, noneMatch)) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) + .setTagsConditions(tags) + + when: + bc.listPageRanges(new ListPageRangesOptions(new BlobRange(0, PageBlobClient.PAGE_BYTES)) + .setRequestConditions(bac), null, null).size() + + then: + thrown(BlobStorageException) + + where: + modified | unmodified | match | noneMatch | leaseID | tags + newDate | null | null | null | null | null + null | oldDate | null | null | null | null + null | null | garbageEtag | null | null | null + null | null | null | receivedEtag | null | null + null | null | null | null | garbageLeaseID | null + null | null | null | null | null | "\"notfoo\" = 'notbar'" + } + @Unroll def "Get page ranges diff"() { setup: @@ -1141,6 +1318,221 @@ class PageBlobAPITest extends APISpec { Integer.parseInt(response.getHeaders().getValue("x-ms-blob-content-length")) == PageBlobClient.PAGE_BYTES * 2 } + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2021_06_08") + def "List page ranges diff"() { + setup: + bc.create(4 * Constants.KB, true) + def data = new ByteArrayInputStream(getRandomByteArray(4 * Constants.KB)) + bc.uploadPages(new PageRange().setStart(0).setEnd(4 * Constants.KB - 1), data) + def snapshot = bc.createSnapshot().getSnapshotId() + data = new ByteArrayInputStream(getRandomByteArray(1 * Constants.KB)) + data.mark(Integer.MAX_VALUE) + bc.uploadPages(new PageRange().setStart(0).setEnd(Constants.KB - 1), data) + data.reset() + bc.clearPages(new PageRange().setStart(Constants.KB).setEnd(2 * Constants.KB - 1)) + bc.uploadPages(new PageRange().setStart(2 * Constants.KB).setEnd(3 * Constants.KB - 1), data) + bc.clearPages(new PageRange().setStart(3 * Constants.KB).setEnd(4 * Constants.KB - 1)) + + when: + def iterable = bc.listPageRangesDiff(new BlobRange(0, 4 * Constants.KB), snapshot).iterator() + def item = iterable.next() + + then: + item.getRange().equals(new HttpRange(0, Constants.KB)) + !item.isClear() + + when: + item = iterable.next() + + then: + item.getRange().equals(new HttpRange(2 * Constants.KB, Constants.KB)) + !item.isClear() + + when: + item = iterable.next() + + then: + item.getRange().equals(new HttpRange(Constants.KB, Constants.KB)) + item.isClear() + + when: + item = iterable.next() + + then: + item.getRange().equals(new HttpRange(3 * Constants.KB, Constants.KB)) + item.isClear() + + !iterable.hasNext() + } + + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2021_06_08") + def "List page ranges diff pageSize"() { + setup: + bc.create(4 * Constants.KB, true) + def data = new ByteArrayInputStream(getRandomByteArray(4 * Constants.KB)) + bc.uploadPages(new PageRange().setStart(0).setEnd(4 * Constants.KB - 1), data) + def snapshot = bc.createSnapshot().getSnapshotId() + data = new ByteArrayInputStream(getRandomByteArray(1 * Constants.KB)) + data.mark(Integer.MAX_VALUE) + bc.uploadPages(new PageRange().setStart(0).setEnd(Constants.KB - 1), data) + data.reset() + bc.clearPages(new PageRange().setStart(Constants.KB).setEnd(2 * Constants.KB - 1)) + bc.uploadPages(new PageRange().setStart(2 * Constants.KB).setEnd(3 * Constants.KB - 1), data) + bc.clearPages(new PageRange().setStart(3 * Constants.KB).setEnd(4 * Constants.KB - 1)) + + when: "max results on options" + def iterator = bc.listPageRangesDiff(new ListPageRangesDiffOptions(new BlobRange(0, 4 * Constants.KB), snapshot) + .setMaxResultsPerPage(2), null, null).iterableByPage().iterator() + def page = iterator.next() + + then: + page.getValue().size() == 2 + + when: + page = iterator.next() + + then: + page.getValue().size() == 2 + !iterator.hasNext() + + when: "max results on iterableByPage" + iterator = bc.listPageRangesDiff(new ListPageRangesDiffOptions(new BlobRange(0, 4 * Constants.KB), snapshot), + null, null).iterableByPage(2).iterator() + page = iterator.next() + + then: + page.getValue().size() == 2 + + when: + page = iterator.next() + + then: + page.getValue().size() == 2 + !iterator.hasNext() + } + + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2021_06_08") + def "List pages diff continuation token"() { + setup: + bc.create(4 * Constants.KB, true) + def data = new ByteArrayInputStream(getRandomByteArray(4 * Constants.KB)) + bc.uploadPages(new PageRange().setStart(0).setEnd(4 * Constants.KB - 1), data) + def snapshot = bc.createSnapshot().getSnapshotId() + data = new ByteArrayInputStream(getRandomByteArray(1 * Constants.KB)) + data.mark(Integer.MAX_VALUE) + bc.uploadPages(new PageRange().setStart(0).setEnd(Constants.KB - 1), data) + data.reset() + bc.clearPages(new PageRange().setStart(Constants.KB).setEnd(2 * Constants.KB - 1)) + bc.uploadPages(new PageRange().setStart(2 * Constants.KB).setEnd(3 * Constants.KB - 1), data) + bc.clearPages(new PageRange().setStart(3 * Constants.KB).setEnd(4 * Constants.KB - 1)) + + when: + def iterator = bc.listPageRangesDiff(new ListPageRangesDiffOptions(new BlobRange(0, 4 * Constants.KB), snapshot) + .setMaxResultsPerPage(2), null, null).iterableByPage().iterator() + def token = iterator.next().getContinuationToken() + + iterator = bc.listPageRangesDiff(new ListPageRangesDiffOptions(new BlobRange(0, 4 * Constants.KB), snapshot), + null, null).iterableByPage(token).iterator() + def page = iterator.next() + + then: + page.getValue().size() == 2 + !iterator.hasNext() + } + + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2021_06_08") + def "List pages diff range"() { + setup: + bc.create(4 * Constants.KB, true) + def data = new ByteArrayInputStream(getRandomByteArray(4 * Constants.KB)) + bc.uploadPages(new PageRange().setStart(0).setEnd(4 * Constants.KB - 1), data) + def snapshot = bc.createSnapshot().getSnapshotId() + data = new ByteArrayInputStream(getRandomByteArray(1 * Constants.KB)) + data.mark(Integer.MAX_VALUE) + bc.uploadPages(new PageRange().setStart(0).setEnd(Constants.KB - 1), data) + data.reset() + bc.clearPages(new PageRange().setStart(Constants.KB).setEnd(2 * Constants.KB - 1)) + bc.uploadPages(new PageRange().setStart(2 * Constants.KB).setEnd(3 * Constants.KB - 1), data) + bc.clearPages(new PageRange().setStart(3 * Constants.KB).setEnd(4 * Constants.KB - 1)) + + when: + def iterator = bc.listPageRangesDiff(new ListPageRangesDiffOptions( + new BlobRange(2 * Constants.KB + 1, 2 * Constants.KB), snapshot), null, null).iterator() + + then: + iterator.size() == 2 + } + + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2021_06_08") + @Unroll + def "List page ranges diff AC"() { + setup: + bc.create(4 * Constants.KB, true) + def data = new ByteArrayInputStream(getRandomByteArray(4 * Constants.KB)) + bc.uploadPages(new PageRange().setStart(0).setEnd(4 * Constants.KB - 1), data) + def snapshot = bc.createSnapshot().getSnapshotId() + + def t = new HashMap() + t.put("foo", "bar") + bc.setTags(t) + match = setupBlobMatchCondition(bc, match) + leaseID = setupBlobLeaseCondition(bc, leaseID) + def bac = new BlobRequestConditions() + .setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) + .setTagsConditions(tags) + + when: + bc.listPageRangesDiff(new ListPageRangesDiffOptions(new BlobRange(0, PageBlobClient.PAGE_BYTES), snapshot) + .setRequestConditions(bac), null, null).size() + + then: + notThrown(BlobStorageException) + + where: + modified | unmodified | match | noneMatch | leaseID | tags + null | null | null | null | null | null + oldDate | null | null | null | null | null + null | newDate | null | null | null | null + null | null | receivedEtag | null | null | null + null | null | null | garbageEtag | null | null + null | null | null | null | receivedLeaseID | null + null | null | null | null | null | "\"foo\" = 'bar'" + } + + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2021_06_08") + @Unroll + def "List page ranges diff AC fail"() { + setup: + def snapshot = bc.createSnapshot().getSnapshotId() + def bac = new BlobRequestConditions() + .setLeaseId(setupBlobLeaseCondition(bc, leaseID)) + .setIfMatch(match) + .setIfNoneMatch(setupBlobMatchCondition(bc, noneMatch)) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) + .setTagsConditions(tags) + + when: + bc.listPageRangesDiff(new ListPageRangesDiffOptions(new BlobRange(0, PageBlobClient.PAGE_BYTES), snapshot) + .setRequestConditions(bac), null, null).size() + + then: + thrown(BlobStorageException) + + where: + modified | unmodified | match | noneMatch | leaseID | tags + newDate | null | null | null | null | null + null | oldDate | null | null | null | null + null | null | garbageEtag | null | null | null + null | null | null | receivedEtag | null | null + null | null | null | null | garbageLeaseID | null + null | null | null | null | null | "\"notfoo\" = 'notbar'" + } + @Unroll def "PageRange IA"() { setup: diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRanges.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRanges.json new file mode 100644 index 0000000000000..001dc45e1f90c --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRanges.json @@ -0,0 +1,162 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/5df2da1405df2da14b2733248ee3c1ea082574006b72?restype=container", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "23d929df-3e31-483e-8826-00ef0af78328" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2235A892F6F0", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "7877e490-801e-0044-391e-5498c7000000", + "x-ms-client-request-id" : "23d929df-3e31-483e-8826-00ef0af78328", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/5df2da1405df2da14b2733248ee3c1ea082574006b72/5df2da1415df2da14b2799419152721f77a6143f4849", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "fa263e3c-497c-4e38-a8ad-705dfcdf067a" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2235A8A0A709", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "913c1620-e01e-007d-161e-5463db000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "fa263e3c-497c-4e38-a8ad-705dfcdf067a", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/5df2da1405df2da14b2733248ee3c1ea082574006b72/5df2da1415df2da14b2799419152721f77a6143f4849", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "739b44a6-bc1f-44e4-bc4c-3a674876f1cb" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2235A8AE60A6", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "455cfad5-901e-0067-3a1e-540204000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "739b44a6-bc1f-44e4-bc4c-3a674876f1cb", + "Date" : "Tue, 19 Apr 2022 18:51:47 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/5df2da1405df2da14b2733248ee3c1ea082574006b72/5df2da1415df2da14b2799419152721f77a6143f4849?comp=page", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "588c6436-a8b6-438d-b9ae-9d73012466ff", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "ZNn1ZBUOUfU=", + "x-ms-blob-sequence-number" : "0", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT", + "eTag" : "0x8DA2235A8BBA526", + "x-ms-request-id" : "7877e4bf-801e-0044-5d1e-5498c7000000", + "x-ms-client-request-id" : "588c6436-a8b6-438d-b9ae-9d73012466ff" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/5df2da1405df2da14b2733248ee3c1ea082574006b72/5df2da1415df2da14b2799419152721f77a6143f4849?comp=page", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "abed56ff-f80a-4d8d-a3b5-5b4f4a623454" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-sequence-number" : "0", + "eTag" : "0x8DA2235A8C8E9AF", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "5f221062-501e-0078-041e-54b100000000", + "x-ms-client-request-id" : "abed56ff-f80a-4d8d-a3b5-5b4f4a623454", + "Date" : "Tue, 19 Apr 2022 18:51:47 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/5df2da1405df2da14b2733248ee3c1ea082574006b72/5df2da1415df2da14b2799419152721f77a6143f4849?comp=page", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "d1703d8f-db7b-4618-aa04-8a8a6254e4ae" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-sequence-number" : "0", + "eTag" : "0x8DA2235A8E67F7B", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "16b68985-601e-003e-601e-548587000000", + "x-ms-client-request-id" : "d1703d8f-db7b-4618-aa04-8a8a6254e4ae", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/5df2da1405df2da14b2733248ee3c1ea082574006b72/5df2da1415df2da14b2799419152721f77a6143f4849?comp=pagelist", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "ae3388c2-f4dd-4510-8370-a2ae2372ef51" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-content-length" : "4096", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT", + "eTag" : "0x8DA2235A8E67F7B", + "x-ms-request-id" : "5a09fe7d-101e-0046-601e-54267f000000", + "Body" : "\n0102320483071", + "x-ms-client-request-id" : "ae3388c2-f4dd-4510-8370-a2ae2372ef51", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "5df2da1405df2da14b2733248ee3c1ea082574006b72", "5df2da1415df2da14b2799419152721f77a6143f4849", "b4994cd1-b34a-4717-8da3-ff49589e25a8" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesACFail[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesACFail[0].json new file mode 100644 index 0000000000000..4cfa9ebfdefc8 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesACFail[0].json @@ -0,0 +1,67 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/062694440062694444d63864466afedb2cbe94d40ba2?restype=container", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "adc84dfc-316d-4de8-9e75-87e60bd12e0b" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237D06AA757", + "Last-Modified" : "Tue, 19 Apr 2022 19:07:14 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a2e3b09b-e01e-005e-3d20-543122000000", + "x-ms-client-request-id" : "adc84dfc-316d-4de8-9e75-87e60bd12e0b", + "Date" : "Tue, 19 Apr 2022 19:07:13 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/062694440062694444d63864466afedb2cbe94d40ba2/062694441062694444d6814154e6c5d5d25014fbcacd", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "945604d4-5f0e-4c64-b8fe-5652b5ec7859" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237D0CBFE49", + "Last-Modified" : "Tue, 19 Apr 2022 19:07:14 GMT", + "x-ms-version-id" : "2022-04-19T19:07:14.7921993Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "6b23a941-101e-0028-5e20-54bb6a000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "945604d4-5f0e-4c64-b8fe-5652b5ec7859", + "Date" : "Tue, 19 Apr 2022 19:07:14 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/062694440062694444d63864466afedb2cbe94d40ba2/062694441062694444d6814154e6c5d5d25014fbcacd?comp=pagelist", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "54a5cdb1-8fa2-4b82-9a1c-4d780578acff" + }, + "Response" : { + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "ConditionNotMet", + "retry-after" : "0", + "StatusCode" : "304", + "x-ms-request-id" : "f99ac06e-e01e-0003-7320-543ba6000000", + "x-ms-client-request-id" : "54a5cdb1-8fa2-4b82-9a1c-4d780578acff", + "Date" : "Tue, 19 Apr 2022 19:07:14 GMT" + }, + "Exception" : null + } ], + "variables" : [ "062694440062694444d63864466afedb2cbe94d40ba2", "062694441062694444d6814154e6c5d5d25014fbcacd" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesACFail[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesACFail[1].json new file mode 100644 index 0000000000000..d94b96deb7a47 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesACFail[1].json @@ -0,0 +1,70 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/1f3da50501f3da505c31710686edce707feb144888c1?restype=container", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "85087758-d243-4578-a549-40b947229736" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237D06C6362", + "Last-Modified" : "Tue, 19 Apr 2022 19:07:14 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "ef8f5705-301e-0010-0120-541faa000000", + "x-ms-client-request-id" : "85087758-d243-4578-a549-40b947229736", + "Date" : "Tue, 19 Apr 2022 19:07:13 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/1f3da50501f3da505c31710686edce707feb144888c1/1f3da50511f3da505c31359332935fb0bc7534beca3f", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "8ba24409-b755-4135-a254-12faac657fea" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237D0CBFE49", + "Last-Modified" : "Tue, 19 Apr 2022 19:07:14 GMT", + "x-ms-version-id" : "2022-04-19T19:07:14.7921993Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "bf5557f7-201e-008a-0620-548173000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "8ba24409-b755-4135-a254-12faac657fea", + "Date" : "Tue, 19 Apr 2022 19:07:14 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/1f3da50501f3da505c31710686edce707feb144888c1/1f3da50511f3da505c31359332935fb0bc7534beca3f?comp=pagelist", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "6ae05e47-79fc-4d95-b30a-04332886daf3" + }, + "Response" : { + "content-length" : "253", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "ConditionNotMet", + "retry-after" : "0", + "StatusCode" : "412", + "x-ms-request-id" : "6b23a9d6-101e-0028-5e20-54bb6a000000", + "Body" : "\nConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:6b23a9d6-101e-0028-5e20-54bb6a000000\nTime:2022-04-19T19:07:15.0486644Z", + "x-ms-client-request-id" : "6ae05e47-79fc-4d95-b30a-04332886daf3", + "Date" : "Tue, 19 Apr 2022 19:07:14 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "1f3da50501f3da505c31710686edce707feb144888c1", "1f3da50511f3da505c31359332935fb0bc7534beca3f" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesACFail[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesACFail[2].json new file mode 100644 index 0000000000000..cb57d6112a624 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesACFail[2].json @@ -0,0 +1,70 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/3410f6c603410f6c6da711932c307e0837d27452ca2a?restype=container", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "bee66e9f-f102-4a73-b210-79ae9ef7ac95" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237D0687ADB", + "Last-Modified" : "Tue, 19 Apr 2022 19:07:14 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "9ff27a8f-e01e-0061-6a20-54f981000000", + "x-ms-client-request-id" : "bee66e9f-f102-4a73-b210-79ae9ef7ac95", + "Date" : "Tue, 19 Apr 2022 19:07:13 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/3410f6c603410f6c6da711932c307e0837d27452ca2a/3410f6c613410f6c6da70738193f639642ff5446f858", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "bae726d8-bfdd-4609-97f7-dfe178f7b696" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237D0CC2553", + "Last-Modified" : "Tue, 19 Apr 2022 19:07:14 GMT", + "x-ms-version-id" : "2022-04-19T19:07:14.7931987Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a2e3b1b6-e01e-005e-2420-543122000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "bae726d8-bfdd-4609-97f7-dfe178f7b696", + "Date" : "Tue, 19 Apr 2022 19:07:13 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/3410f6c603410f6c6da711932c307e0837d27452ca2a/3410f6c613410f6c6da70738193f639642ff5446f858?comp=pagelist", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "a41986b3-b090-491c-ab92-22475c1d05e2" + }, + "Response" : { + "content-length" : "253", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "ConditionNotMet", + "retry-after" : "0", + "StatusCode" : "412", + "x-ms-request-id" : "9ff27bee-e01e-0061-1d20-54f981000000", + "Body" : "\nConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:9ff27bee-e01e-0061-1d20-54f981000000\nTime:2022-04-19T19:07:15.0475075Z", + "x-ms-client-request-id" : "a41986b3-b090-491c-ab92-22475c1d05e2", + "Date" : "Tue, 19 Apr 2022 19:07:14 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "3410f6c603410f6c6da711932c307e0837d27452ca2a", "3410f6c613410f6c6da70738193f639642ff5446f858" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesACFail[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesACFail[3].json new file mode 100644 index 0000000000000..0d035ff21fab7 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesACFail[3].json @@ -0,0 +1,98 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/2d0bc78702d0bc787d07185617f4de19b50bd4448bbe?restype=container", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "7feeb23a-c25c-4d2b-868f-5fb39e899db6" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237D069F229", + "Last-Modified" : "Tue, 19 Apr 2022 19:07:14 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "bf555683-201e-008a-4020-548173000000", + "x-ms-client-request-id" : "7feeb23a-c25c-4d2b-868f-5fb39e899db6", + "Date" : "Tue, 19 Apr 2022 19:07:14 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/2d0bc78702d0bc787d07185617f4de19b50bd4448bbe/2d0bc78712d0bc787d0739818a8d1a0d3f72e429e9eb", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "72544003-ed96-438d-a693-c61fda4abd54" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237D0CBD740", + "Last-Modified" : "Tue, 19 Apr 2022 19:07:14 GMT", + "x-ms-version-id" : "2022-04-19T19:07:14.7921993Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "f99ac00b-e01e-0003-2920-543ba6000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "72544003-ed96-438d-a693-c61fda4abd54", + "Date" : "Tue, 19 Apr 2022 19:07:14 GMT" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "http://REDACTED.blob.core.windows.net/2d0bc78702d0bc787d07185617f4de19b50bd4448bbe/2d0bc78712d0bc787d0739818a8d1a0d3f72e429e9eb", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "15424d9a-e15d-4bbb-a498-f3cb59632e2d" + }, + "Response" : { + "x-ms-is-current-version" : "true", + "content-length" : "512", + "x-ms-version" : "2021-04-10", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "x-ms-blob-sequence-number" : "0", + "Last-Modified" : "Tue, 19 Apr 2022 19:07:14 GMT", + "x-ms-version-id" : "2022-04-19T19:07:14.7921993Z", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 19 Apr 2022 19:07:14 GMT", + "x-ms-blob-type" : "PageBlob", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "x-ms-creation-time" : "Tue, 19 Apr 2022 19:07:14 GMT", + "eTag" : "0x8DA2237D0CBD740", + "x-ms-request-id" : "a2e3b222-e01e-005e-0720-543122000000", + "x-ms-client-request-id" : "15424d9a-e15d-4bbb-a498-f3cb59632e2d", + "Content-Type" : "application/octet-stream" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/2d0bc78702d0bc787d07185617f4de19b50bd4448bbe/2d0bc78712d0bc787d0739818a8d1a0d3f72e429e9eb?comp=pagelist", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "ec9634cb-ec0b-49ec-8966-9e1ba8bb9141" + }, + "Response" : { + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "ConditionNotMet", + "retry-after" : "0", + "StatusCode" : "304", + "x-ms-request-id" : "6b23aa78-101e-0028-5b20-54bb6a000000", + "x-ms-client-request-id" : "ec9634cb-ec0b-49ec-8966-9e1ba8bb9141", + "Date" : "Tue, 19 Apr 2022 19:07:14 GMT" + }, + "Exception" : null + } ], + "variables" : [ "2d0bc78702d0bc787d07185617f4de19b50bd4448bbe", "2d0bc78712d0bc787d0739818a8d1a0d3f72e429e9eb" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesACFail[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesACFail[4].json new file mode 100644 index 0000000000000..01485cecef2d7 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesACFail[4].json @@ -0,0 +1,92 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/624a51400624a5140dda1216296eb996be861475483d?restype=container", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "43e008da-d060-4ca0-a89e-bdbd9cb06d82" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237D06A8601", + "Last-Modified" : "Tue, 19 Apr 2022 19:07:14 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "f99abf04-e01e-0003-4720-543ba6000000", + "x-ms-client-request-id" : "43e008da-d060-4ca0-a89e-bdbd9cb06d82", + "Date" : "Tue, 19 Apr 2022 19:07:13 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/624a51400624a5140dda1216296eb996be861475483d/624a51401624a5140dda84719f00748370112459fa94", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "f47d0b8a-1e6e-41ed-b491-e1a29ef347d9" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237D0CBFE49", + "Last-Modified" : "Tue, 19 Apr 2022 19:07:14 GMT", + "x-ms-version-id" : "2022-04-19T19:07:14.7921993Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "9ff27b95-e01e-0061-5020-54f981000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "f47d0b8a-1e6e-41ed-b491-e1a29ef347d9", + "Date" : "Tue, 19 Apr 2022 19:07:14 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/624a51400624a5140dda1216296eb996be861475483d/624a51401624a5140dda84719f00748370112459fa94?comp=lease", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "92bcd9cd-8674-48d3-89ea-cb0ee22e48e2" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-id" : "20d06575-9017-4867-9f9a-9e3ca832e913", + "eTag" : "0x8DA2237D0CBFE49", + "Last-Modified" : "Tue, 19 Apr 2022 19:07:14 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "ef8f58d1-301e-0010-0c20-541faa000000", + "x-ms-client-request-id" : "92bcd9cd-8674-48d3-89ea-cb0ee22e48e2", + "Date" : "Tue, 19 Apr 2022 19:07:14 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/624a51400624a5140dda1216296eb996be861475483d/624a51401624a5140dda84719f00748370112459fa94?comp=pagelist", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "fc0036db-181b-4626-8a16-87bc0fb36347" + }, + "Response" : { + "content-length" : "265", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "LeaseIdMismatchWithBlobOperation", + "retry-after" : "0", + "StatusCode" : "412", + "x-ms-request-id" : "ef8f5941-301e-0010-6d20-541faa000000", + "Body" : "\nLeaseIdMismatchWithBlobOperationThe lease ID specified did not match the lease ID for the blob.\nRequestId:ef8f5941-301e-0010-6d20-541faa000000\nTime:2022-04-19T19:07:15.1780669Z", + "x-ms-client-request-id" : "fc0036db-181b-4626-8a16-87bc0fb36347", + "Date" : "Tue, 19 Apr 2022 19:07:14 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "624a51400624a5140dda1216296eb996be861475483d", "624a51401624a5140dda84719f00748370112459fa94" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesACFail[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesACFail[5].json new file mode 100644 index 0000000000000..c2546de8691ba --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesACFail[5].json @@ -0,0 +1,70 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/7b51600107b516001b272112012061e13c7cc4c5183a?restype=container", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "3066c4bf-f8d0-4132-85b6-85fc66ca9f69" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237D06CED1C", + "Last-Modified" : "Tue, 19 Apr 2022 19:07:14 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "6b23a7aa-101e-0028-6d20-54bb6a000000", + "x-ms-client-request-id" : "3066c4bf-f8d0-4132-85b6-85fc66ca9f69", + "Date" : "Tue, 19 Apr 2022 19:07:13 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/7b51600107b516001b272112012061e13c7cc4c5183a/7b51600117b516001b2719827ef1b59b858e1492ea6c", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "779e9b61-75a6-4ec6-b4ad-f985d7ea6505" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237D0CAC5F6", + "Last-Modified" : "Tue, 19 Apr 2022 19:07:14 GMT", + "x-ms-version-id" : "2022-04-19T19:07:14.7842038Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "ef8f5851-301e-0010-2220-541faa000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "779e9b61-75a6-4ec6-b4ad-f985d7ea6505", + "Date" : "Tue, 19 Apr 2022 19:07:14 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/7b51600107b516001b272112012061e13c7cc4c5183a/7b51600117b516001b2719827ef1b59b858e1492ea6c?comp=pagelist", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "8c127180-7022-4c63-a393-d079f58f4944" + }, + "Response" : { + "content-length" : "253", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "ConditionNotMet", + "retry-after" : "0", + "StatusCode" : "412", + "x-ms-request-id" : "bf55588e-201e-008a-7d20-548173000000", + "Body" : "\nConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:bf55588e-201e-008a-7d20-548173000000\nTime:2022-04-19T19:07:15.2040298Z", + "x-ms-client-request-id" : "8c127180-7022-4c63-a393-d079f58f4944", + "Date" : "Tue, 19 Apr 2022 19:07:15 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "7b51600107b516001b272112012061e13c7cc4c5183a", "7b51600117b516001b2719827ef1b59b858e1492ea6c" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesAC[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesAC[0].json new file mode 100644 index 0000000000000..2aa638ae9be8f --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesAC[0].json @@ -0,0 +1,91 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/e5b947c40e5b947c410374920fef3acd65e6947f98fe?restype=container", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "339ce82d-5185-41e0-9558-ccd97857e758" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237EB4A4913", + "Last-Modified" : "Tue, 19 Apr 2022 19:07:59 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "43c16b69-c01e-002b-4620-545a0e000000", + "x-ms-client-request-id" : "339ce82d-5185-41e0-9558-ccd97857e758", + "Date" : "Tue, 19 Apr 2022 19:07:58 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/e5b947c40e5b947c410374920fef3acd65e6947f98fe/e5b947c41e5b947c4103348991620e7aaf57c415e958", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "bf189c77-3a21-4853-ae14-1f89c47e8261" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237EB94929C", + "Last-Modified" : "Tue, 19 Apr 2022 19:07:59 GMT", + "x-ms-version-id" : "2022-04-19T19:07:59.7274780Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "70c329c6-a01e-002d-1220-5469b1000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "bf189c77-3a21-4853-ae14-1f89c47e8261", + "Date" : "Tue, 19 Apr 2022 19:07:59 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/e5b947c40e5b947c410374920fef3acd65e6947f98fe/e5b947c41e5b947c4103348991620e7aaf57c415e958?comp=tags", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "b82f7360-4bb3-4cea-9f70-e3f339e5888a", + "Content-Type" : "application/xml" + }, + "Response" : { + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "a03a7844-301e-002f-2d20-54d709000000", + "x-ms-client-request-id" : "b82f7360-4bb3-4cea-9f70-e3f339e5888a", + "Date" : "Tue, 19 Apr 2022 19:07:59 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/e5b947c40e5b947c410374920fef3acd65e6947f98fe/e5b947c41e5b947c4103348991620e7aaf57c415e958?comp=pagelist", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "66f6d238-95da-4268-ad7b-99570f5722b9" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-content-length" : "512", + "Last-Modified" : "Tue, 19 Apr 2022 19:07:59 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 19 Apr 2022 19:07:59 GMT", + "eTag" : "0x8DA2237EB94929C", + "x-ms-request-id" : "70c32a8b-a01e-002d-4220-5469b1000000", + "Body" : "\n", + "x-ms-client-request-id" : "66f6d238-95da-4268-ad7b-99570f5722b9", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "e5b947c40e5b947c410374920fef3acd65e6947f98fe", "e5b947c41e5b947c4103348991620e7aaf57c415e958" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesAC[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesAC[1].json new file mode 100644 index 0000000000000..570616b5dfecc --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesAC[1].json @@ -0,0 +1,91 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/fca276850fca27685e9505054a23a2eb83fae4952b47?restype=container", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "fab506e4-a09c-4ffe-ae46-edb8079d29c5" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237EB4A577E", + "Last-Modified" : "Tue, 19 Apr 2022 19:07:59 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a03a7789-301e-002f-1520-54d709000000", + "x-ms-client-request-id" : "fab506e4-a09c-4ffe-ae46-edb8079d29c5", + "Date" : "Tue, 19 Apr 2022 19:07:58 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/fca276850fca27685e9505054a23a2eb83fae4952b47/fca276851fca27685e95277587102686c7b5f424cae6", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "167fc256-8ba4-49e7-842c-0e9469e021f5" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237EB94B9AA", + "Last-Modified" : "Tue, 19 Apr 2022 19:07:59 GMT", + "x-ms-version-id" : "2022-04-19T19:07:59.7284778Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "43c16bb4-c01e-002b-0220-545a0e000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "167fc256-8ba4-49e7-842c-0e9469e021f5", + "Date" : "Tue, 19 Apr 2022 19:07:59 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/fca276850fca27685e9505054a23a2eb83fae4952b47/fca276851fca27685e95277587102686c7b5f424cae6?comp=tags", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "c926f7e6-9479-4da2-ba22-cc04dffb320c", + "Content-Type" : "application/xml" + }, + "Response" : { + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "3ecfe4b8-b01e-0031-0120-543bd1000000", + "x-ms-client-request-id" : "c926f7e6-9479-4da2-ba22-cc04dffb320c", + "Date" : "Tue, 19 Apr 2022 19:07:59 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/fca276850fca27685e9505054a23a2eb83fae4952b47/fca276851fca27685e95277587102686c7b5f424cae6?comp=pagelist", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "b2120f9d-c56e-482a-9aea-6349df4ed6ae" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-content-length" : "512", + "Last-Modified" : "Tue, 19 Apr 2022 19:07:59 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 19 Apr 2022 19:07:59 GMT", + "eTag" : "0x8DA2237EB94B9AA", + "x-ms-request-id" : "801cb8e7-b01e-001e-6f20-54361a000000", + "Body" : "\n", + "x-ms-client-request-id" : "b2120f9d-c56e-482a-9aea-6349df4ed6ae", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "fca276850fca27685e9505054a23a2eb83fae4952b47", "fca276851fca27685e95277587102686c7b5f424cae6" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesAC[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesAC[2].json new file mode 100644 index 0000000000000..fa761fe8ec7c8 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesAC[2].json @@ -0,0 +1,91 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/d78f25460d78f25461ef61049da3579db1ea84ee3a6b?restype=container", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "7a0237db-a3d9-4f0f-a7f2-3f49c806252b" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237EB4B5E3A", + "Last-Modified" : "Tue, 19 Apr 2022 19:07:59 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "801cb7b0-b01e-001e-6620-54361a000000", + "x-ms-client-request-id" : "7a0237db-a3d9-4f0f-a7f2-3f49c806252b", + "Date" : "Tue, 19 Apr 2022 19:07:58 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/d78f25460d78f25461ef61049da3579db1ea84ee3a6b/d78f25461d78f25461ef5127800a372c6671a4603834", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "94115b3f-6f71-41ce-928d-ac7b25ac62cb" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237EB93A860", + "Last-Modified" : "Tue, 19 Apr 2022 19:07:59 GMT", + "x-ms-version-id" : "2022-04-19T19:07:59.7214816Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "3ecfe465-b01e-0031-3620-543bd1000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "94115b3f-6f71-41ce-928d-ac7b25ac62cb", + "Date" : "Tue, 19 Apr 2022 19:07:59 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/d78f25460d78f25461ef61049da3579db1ea84ee3a6b/d78f25461d78f25461ef5127800a372c6671a4603834?comp=tags", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "74219736-8bcf-4b23-a0c0-579b072f54c1", + "Content-Type" : "application/xml" + }, + "Response" : { + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "70c32a2d-a01e-002d-6a20-5469b1000000", + "x-ms-client-request-id" : "74219736-8bcf-4b23-a0c0-579b072f54c1", + "Date" : "Tue, 19 Apr 2022 19:07:59 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/d78f25460d78f25461ef61049da3579db1ea84ee3a6b/d78f25461d78f25461ef5127800a372c6671a4603834?comp=pagelist", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "31d5dc6a-e3df-45cf-b1ac-360299b4f221" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-content-length" : "512", + "Last-Modified" : "Tue, 19 Apr 2022 19:07:59 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 19 Apr 2022 19:07:59 GMT", + "eTag" : "0x8DA2237EB93A860", + "x-ms-request-id" : "a03a7885-301e-002f-6320-54d709000000", + "Body" : "\n", + "x-ms-client-request-id" : "31d5dc6a-e3df-45cf-b1ac-360299b4f221", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "d78f25460d78f25461ef61049da3579db1ea84ee3a6b", "d78f25461d78f25461ef5127800a372c6671a4603834" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesAC[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesAC[3].json new file mode 100644 index 0000000000000..6b7a1cf7f3238 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesAC[3].json @@ -0,0 +1,123 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/ce9414070ce94140782001730aa3997cc2f4d447bb64?restype=container", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "cd730b44-f9c6-4371-9f11-94c74a6b48c5" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237EB498532", + "Last-Modified" : "Tue, 19 Apr 2022 19:07:59 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "70c328d1-a01e-002d-4e20-5469b1000000", + "x-ms-client-request-id" : "cd730b44-f9c6-4371-9f11-94c74a6b48c5", + "Date" : "Tue, 19 Apr 2022 19:07:58 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/ce9414070ce94140782001730aa3997cc2f4d447bb64/ce9414071ce94140782054399085621ff5b664ea08e3", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "4b6e3719-b15a-4c78-bb5d-791ae61119c1" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237EB95CAF0", + "Last-Modified" : "Tue, 19 Apr 2022 19:07:59 GMT", + "x-ms-version-id" : "2022-04-19T19:07:59.7354736Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "801cb856-b01e-001e-7420-54361a000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "4b6e3719-b15a-4c78-bb5d-791ae61119c1", + "Date" : "Tue, 19 Apr 2022 19:07:59 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/ce9414070ce94140782001730aa3997cc2f4d447bb64/ce9414071ce94140782054399085621ff5b664ea08e3?comp=tags", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "14dd7106-64bf-4de0-9d55-763540725c2f", + "Content-Type" : "application/xml" + }, + "Response" : { + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "801cb89b-b01e-001e-2e20-54361a000000", + "x-ms-client-request-id" : "14dd7106-64bf-4de0-9d55-763540725c2f", + "Date" : "Tue, 19 Apr 2022 19:07:59 GMT" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "http://REDACTED.blob.core.windows.net/ce9414070ce94140782001730aa3997cc2f4d447bb64/ce9414071ce94140782054399085621ff5b664ea08e3", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "0d0d9847-121f-4c89-baf6-927a2e3d31fe" + }, + "Response" : { + "x-ms-is-current-version" : "true", + "content-length" : "512", + "x-ms-version" : "2021-04-10", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-tag-count" : "1", + "x-ms-lease-state" : "available", + "x-ms-blob-sequence-number" : "0", + "Last-Modified" : "Tue, 19 Apr 2022 19:07:59 GMT", + "x-ms-version-id" : "2022-04-19T19:07:59.7354736Z", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 19 Apr 2022 19:08:00 GMT", + "x-ms-blob-type" : "PageBlob", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "x-ms-creation-time" : "Tue, 19 Apr 2022 19:07:59 GMT", + "eTag" : "0x8DA2237EB95CAF0", + "x-ms-request-id" : "3ecfe52c-b01e-0031-6820-543bd1000000", + "x-ms-client-request-id" : "0d0d9847-121f-4c89-baf6-927a2e3d31fe", + "Content-Type" : "application/octet-stream" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/ce9414070ce94140782001730aa3997cc2f4d447bb64/ce9414071ce94140782054399085621ff5b664ea08e3?comp=pagelist", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "0d0a691d-bddf-4575-baa0-2f86bc6009fc" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-content-length" : "512", + "Last-Modified" : "Tue, 19 Apr 2022 19:07:59 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 19 Apr 2022 19:08:00 GMT", + "eTag" : "0x8DA2237EB95CAF0", + "x-ms-request-id" : "3ecfe5a2-b01e-0031-5120-543bd1000000", + "Body" : "\n", + "x-ms-client-request-id" : "0d0a691d-bddf-4575-baa0-2f86bc6009fc", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "ce9414070ce94140782001730aa3997cc2f4d447bb64", "ce9414071ce94140782054399085621ff5b664ea08e3" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesAC[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesAC[4].json new file mode 100644 index 0000000000000..d86cd31af4f10 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesAC[4].json @@ -0,0 +1,91 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/81d582c0081d582c01c8458413ae6382764834a65988?restype=container", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "61ea2074-0b2e-49c7-9523-d86444362c55" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237EB4A1964", + "Last-Modified" : "Tue, 19 Apr 2022 19:07:59 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "830e3593-801e-0067-3320-54ca3e000000", + "x-ms-client-request-id" : "61ea2074-0b2e-49c7-9523-d86444362c55", + "Date" : "Tue, 19 Apr 2022 19:07:58 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/81d582c0081d582c01c8458413ae6382764834a65988/81d582c0181d582c01c8522319cbfbd32112c4a2a9c8", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "8cb3eeb8-0fc1-43d7-ac68-1e6c57ff4e36" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237EB94929C", + "Last-Modified" : "Tue, 19 Apr 2022 19:07:59 GMT", + "x-ms-version-id" : "2022-04-19T19:07:59.7284778Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a03a780b-301e-002f-7c20-54d709000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "8cb3eeb8-0fc1-43d7-ac68-1e6c57ff4e36", + "Date" : "Tue, 19 Apr 2022 19:07:58 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/81d582c0081d582c01c8458413ae6382764834a65988/81d582c0181d582c01c8522319cbfbd32112c4a2a9c8?comp=tags", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "af754ec0-143d-4703-9454-c7f21ddd5c0d", + "Content-Type" : "application/xml" + }, + "Response" : { + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "830e362e-801e-0067-3020-54ca3e000000", + "x-ms-client-request-id" : "af754ec0-143d-4703-9454-c7f21ddd5c0d", + "Date" : "Tue, 19 Apr 2022 19:07:59 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/81d582c0081d582c01c8458413ae6382764834a65988/81d582c0181d582c01c8522319cbfbd32112c4a2a9c8?comp=pagelist", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "44019831-ac32-4133-8303-611e3d7a136b" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-content-length" : "512", + "Last-Modified" : "Tue, 19 Apr 2022 19:07:59 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 19 Apr 2022 19:07:59 GMT", + "eTag" : "0x8DA2237EB94929C", + "x-ms-request-id" : "5b532fd2-101e-0065-7320-547486000000", + "Body" : "\n", + "x-ms-client-request-id" : "44019831-ac32-4133-8303-611e3d7a136b", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "81d582c0081d582c01c8458413ae6382764834a65988", "81d582c0181d582c01c8522319cbfbd32112c4a2a9c8" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesAC[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesAC[5].json new file mode 100644 index 0000000000000..552669ceb11b6 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesAC[5].json @@ -0,0 +1,113 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/98ceb381098ceb3817bb96215346c56d476ad473fae0?restype=container", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "3ae808d2-0405-493d-9e92-db25c7dd30ed" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237EB4B5ED9", + "Last-Modified" : "Tue, 19 Apr 2022 19:07:59 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "3ecfe37a-b01e-0031-6220-543bd1000000", + "x-ms-client-request-id" : "3ae808d2-0405-493d-9e92-db25c7dd30ed", + "Date" : "Tue, 19 Apr 2022 19:07:59 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/98ceb381098ceb3817bb96215346c56d476ad473fae0/98ceb381198ceb3817bb1374508a0fe72b1d34d788b0", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "830205b1-6af8-40c8-8e6d-740d6c9c62e9" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237EB94929C", + "Last-Modified" : "Tue, 19 Apr 2022 19:07:59 GMT", + "x-ms-version-id" : "2022-04-19T19:07:59.7274780Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "830e360a-801e-0067-1220-54ca3e000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "830205b1-6af8-40c8-8e6d-740d6c9c62e9", + "Date" : "Tue, 19 Apr 2022 19:07:58 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/98ceb381098ceb3817bb96215346c56d476ad473fae0/98ceb381198ceb3817bb1374508a0fe72b1d34d788b0?comp=tags", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "dda06a91-e830-4afc-8ddf-4e4ef10c0985", + "Content-Type" : "application/xml" + }, + "Response" : { + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "43c16be3-c01e-002b-2820-545a0e000000", + "x-ms-client-request-id" : "dda06a91-e830-4afc-8ddf-4e4ef10c0985", + "Date" : "Tue, 19 Apr 2022 19:07:59 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/98ceb381098ceb3817bb96215346c56d476ad473fae0/98ceb381198ceb3817bb1374508a0fe72b1d34d788b0?comp=lease", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "367983b6-5955-4304-8a92-54801a82fffd" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-id" : "427dfc94-7d24-4a36-bcdd-795c16d1abbe", + "eTag" : "0x8DA2237EB94929C", + "Last-Modified" : "Tue, 19 Apr 2022 19:07:59 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "43c16c1b-c01e-002b-5620-545a0e000000", + "x-ms-client-request-id" : "367983b6-5955-4304-8a92-54801a82fffd", + "Date" : "Tue, 19 Apr 2022 19:07:59 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/98ceb381098ceb3817bb96215346c56d476ad473fae0/98ceb381198ceb3817bb1374508a0fe72b1d34d788b0?comp=pagelist", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "342c5ec4-2884-4701-8f57-8da2aae5c2b0" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-content-length" : "512", + "Last-Modified" : "Tue, 19 Apr 2022 19:07:59 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 19 Apr 2022 19:08:02 GMT", + "eTag" : "0x8DA2237EB94929C", + "x-ms-request-id" : "43c16c38-c01e-002b-6e20-545a0e000000", + "Body" : "\n", + "x-ms-client-request-id" : "342c5ec4-2884-4701-8f57-8da2aae5c2b0", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "98ceb381098ceb3817bb96215346c56d476ad473fae0", "98ceb381198ceb3817bb1374508a0fe72b1d34d788b0" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesAC[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesAC[6].json new file mode 100644 index 0000000000000..511e4bb701cfe --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesAC[6].json @@ -0,0 +1,91 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/b3e3e0420b3e3e042f2995132d65f5780bbab4551a4b?restype=container", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "bf5a93a6-3bd9-4e7e-82cf-1c50e9582f86" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237EB8AA2AF", + "Last-Modified" : "Tue, 19 Apr 2022 19:07:59 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "5b532e63-101e-0065-4e20-547486000000", + "x-ms-client-request-id" : "bf5a93a6-3bd9-4e7e-82cf-1c50e9582f86", + "Date" : "Tue, 19 Apr 2022 19:07:58 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/b3e3e0420b3e3e042f2995132d65f5780bbab4551a4b/b3e3e0421b3e3e042f29092180d06807680f94c17a26", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "3216f678-2281-4e74-9b4e-2fdb633b4cb8" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237EB9DE016", + "Last-Modified" : "Tue, 19 Apr 2022 19:07:59 GMT", + "x-ms-version-id" : "2022-04-19T19:07:59.7884438Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "5b532f25-101e-0065-5720-547486000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "3216f678-2281-4e74-9b4e-2fdb633b4cb8", + "Date" : "Tue, 19 Apr 2022 19:07:59 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/b3e3e0420b3e3e042f2995132d65f5780bbab4551a4b/b3e3e0421b3e3e042f29092180d06807680f94c17a26?comp=tags", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "aee794e2-9a36-4c4b-8b38-a598f858c0ce", + "Content-Type" : "application/xml" + }, + "Response" : { + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "5b532f6a-101e-0065-1620-547486000000", + "x-ms-client-request-id" : "aee794e2-9a36-4c4b-8b38-a598f858c0ce", + "Date" : "Tue, 19 Apr 2022 19:07:59 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/b3e3e0420b3e3e042f2995132d65f5780bbab4551a4b/b3e3e0421b3e3e042f29092180d06807680f94c17a26?comp=pagelist", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "325722fb-8377-4399-90b1-38722067fe5b" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-content-length" : "512", + "Last-Modified" : "Tue, 19 Apr 2022 19:07:59 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 19 Apr 2022 19:08:01 GMT", + "eTag" : "0x8DA2237EB9DE016", + "x-ms-request-id" : "830e366f-801e-0067-6220-54ca3e000000", + "Body" : "\n", + "x-ms-client-request-id" : "325722fb-8377-4399-90b1-38722067fe5b", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "b3e3e0420b3e3e042f2995132d65f5780bbab4551a4b", "b3e3e0421b3e3e042f29092180d06807680f94c17a26" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiff.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiff.json new file mode 100644 index 0000000000000..ca8afeae01f31 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiff.json @@ -0,0 +1,235 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/897736cd0897736cd5e8998767ba7c7eeae5244d596c?restype=container", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "17d969d7-21c9-4699-b059-a7b8b8040137" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2235A8AD5BA9", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "5a09fe10-101e-0046-081e-54267f000000", + "x-ms-client-request-id" : "17d969d7-21c9-4699-b059-a7b8b8040137", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/897736cd0897736cd5e8998767ba7c7eeae5244d596c/897736cd1897736cd5e892947757a5f50eedd4d60afd", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "791a9210-08d6-467a-b6a2-99b75c213307" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2235A8BB5712", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "aba11633-f01e-0061-201e-5431bb000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "791a9210-08d6-467a-b6a2-99b75c213307", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/897736cd0897736cd5e8998767ba7c7eeae5244d596c/897736cd1897736cd5e892947757a5f50eedd4d60afd", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "d2d651b5-57aa-4665-aea7-83a35175a617" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2235A8CD07DA", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "855931b3-501e-0068-1e1e-547468000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "d2d651b5-57aa-4665-aea7-83a35175a617", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/897736cd0897736cd5e8998767ba7c7eeae5244d596c/897736cd1897736cd5e892947757a5f50eedd4d60afd?comp=page", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "dc38f885-f928-4a74-b674-3b84d4465827", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "3bDOp25s6Cs=", + "x-ms-blob-sequence-number" : "0", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT", + "eTag" : "0x8DA2235A8DB0F6D", + "x-ms-request-id" : "317fd948-801e-0036-101e-549f88000000", + "x-ms-client-request-id" : "dc38f885-f928-4a74-b674-3b84d4465827" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/897736cd0897736cd5e8998767ba7c7eeae5244d596c/897736cd1897736cd5e892947757a5f50eedd4d60afd?comp=snapshot", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "47aaac8c-11af-4446-a2a9-e1893a42e78d" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "x-ms-snapshot" : "2022-04-19T18:51:48.9045524Z", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2235A8DB0F6D", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "aba1169a-f01e-0061-011e-5431bb000000", + "x-ms-request-server-encrypted" : "false", + "x-ms-client-request-id" : "47aaac8c-11af-4446-a2a9-e1893a42e78d", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/897736cd0897736cd5e8998767ba7c7eeae5244d596c/897736cd1897736cd5e892947757a5f50eedd4d60afd?comp=page", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "83024736-2569-44a8-8349-e1fad6f77c17", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "JO5TC9OgMoc=", + "x-ms-blob-sequence-number" : "0", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT", + "eTag" : "0x8DA2235A8FA048F", + "x-ms-request-id" : "aba116bc-f01e-0061-201e-5431bb000000", + "x-ms-client-request-id" : "83024736-2569-44a8-8349-e1fad6f77c17" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/897736cd0897736cd5e8998767ba7c7eeae5244d596c/897736cd1897736cd5e892947757a5f50eedd4d60afd?comp=page", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "d091c97b-2be2-4225-8a60-da3a5daea53f" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-sequence-number" : "0", + "eTag" : "0x8DA2235A916FE35", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:49 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "8a7e4c47-301e-001c-3f1e-544098000000", + "x-ms-client-request-id" : "d091c97b-2be2-4225-8a60-da3a5daea53f", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/897736cd0897736cd5e8998767ba7c7eeae5244d596c/897736cd1897736cd5e892947757a5f50eedd4d60afd?comp=page", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "98c26771-2b63-475d-b37f-f5b32aec804c", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "JO5TC9OgMoc=", + "x-ms-blob-sequence-number" : "0", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:49 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT", + "eTag" : "0x8DA2235A9257B0F", + "x-ms-request-id" : "c62383da-701e-0022-801e-54d7e7000000", + "x-ms-client-request-id" : "98c26771-2b63-475d-b37f-f5b32aec804c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/897736cd0897736cd5e8998767ba7c7eeae5244d596c/897736cd1897736cd5e892947757a5f50eedd4d60afd?comp=page", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "0847d2c6-1d8f-4b66-b58a-f408a4911773" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-sequence-number" : "0", + "eTag" : "0x8DA2235A94310DC", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:49 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "5f221105-501e-0078-061e-54b100000000", + "x-ms-client-request-id" : "0847d2c6-1d8f-4b66-b58a-f408a4911773", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/897736cd0897736cd5e8998767ba7c7eeae5244d596c/897736cd1897736cd5e892947757a5f50eedd4d60afd?comp=pagelist&prevsnapshot=2022-04-19T18%3A51%3A48.9045524Z", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "a9214c03-b05b-464f-9285-865a6b742942" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-content-length" : "4096", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:49 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 19 Apr 2022 18:51:49 GMT", + "eTag" : "0x8DA2235A94310DC", + "x-ms-request-id" : "af7568e0-e01e-0030-771e-54ac37000000", + "Body" : "\n01023102420472048307130724095", + "x-ms-client-request-id" : "a9214c03-b05b-464f-9285-865a6b742942", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "897736cd0897736cd5e8998767ba7c7eeae5244d596c", "897736cd1897736cd5e892947757a5f50eedd4d60afd", "dbb53bf9-7e43-4771-ac91-c5b1c011d126", "21bc9a3e-b74c-4cf4-b00b-5d5993c68d11" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffACFail[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffACFail[0].json new file mode 100644 index 0000000000000..bec2aef0ba812 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffACFail[0].json @@ -0,0 +1,91 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/397cc8640397cc86444f52330730703e51dd443b2ad2?restype=container", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "6ac91fcf-3bfc-4509-b82c-7cdb6a9075db" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA22380CD9E169", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:55 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "84707e6a-a01e-0070-5620-546335000000", + "x-ms-client-request-id" : "6ac91fcf-3bfc-4509-b82c-7cdb6a9075db", + "Date" : "Tue, 19 Apr 2022 19:08:54 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/397cc8640397cc86444f52330730703e51dd443b2ad2/397cc8641397cc86444f431416f2311e0a19e45e8a8d", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "c6038974-19fb-41ae-8f55-6e11689642a3" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA22380D2ADC6A", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:56 GMT", + "x-ms-version-id" : "2022-04-19T19:08:56.0772202Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "b25b0155-201e-006e-3420-548fed000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "c6038974-19fb-41ae-8f55-6e11689642a3", + "Date" : "Tue, 19 Apr 2022 19:08:55 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/397cc8640397cc86444f52330730703e51dd443b2ad2/397cc8641397cc86444f431416f2311e0a19e45e8a8d?comp=snapshot", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "e19a47a8-8bfb-4e37-b72d-09161dbc7ceb" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:56 GMT", + "x-ms-version-id" : "2022-04-19T19:08:56.2391286Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "false", + "Date" : "Tue, 19 Apr 2022 19:08:55 GMT", + "x-ms-snapshot" : "2022-04-19T19:08:56.2381286Z", + "eTag" : "0x8DA22380D2ADC6A", + "x-ms-request-id" : "84707f38-a01e-0070-0520-546335000000", + "x-ms-client-request-id" : "e19a47a8-8bfb-4e37-b72d-09161dbc7ceb" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/397cc8640397cc86444f52330730703e51dd443b2ad2/397cc8641397cc86444f431416f2311e0a19e45e8a8d?comp=pagelist&prevsnapshot=2022-04-19T19%3A08%3A56.2381286Z", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "2dd396ab-63ee-4442-b798-78b9c11ca2d3" + }, + "Response" : { + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "ConditionNotMet", + "retry-after" : "0", + "StatusCode" : "304", + "x-ms-request-id" : "9ff2ef33-e01e-0061-3720-54f981000000", + "x-ms-client-request-id" : "2dd396ab-63ee-4442-b798-78b9c11ca2d3", + "Date" : "Tue, 19 Apr 2022 19:08:56 GMT" + }, + "Exception" : null + } ], + "variables" : [ "397cc8640397cc86444f52330730703e51dd443b2ad2", "397cc8641397cc86444f431416f2311e0a19e45e8a8d" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffACFail[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffACFail[1].json new file mode 100644 index 0000000000000..9a56dc9542d02 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffACFail[1].json @@ -0,0 +1,94 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/2067f92502067f9259af738928acb6a28f5ea4d5b943?restype=container", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "948f8d3f-a522-41b8-bd46-0329c9238007" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA22380CD9F2DF", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:55 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "01e2632f-b01e-0088-7c20-543fcb000000", + "x-ms-client-request-id" : "948f8d3f-a522-41b8-bd46-0329c9238007", + "Date" : "Tue, 19 Apr 2022 19:08:54 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/2067f92502067f9259af738928acb6a28f5ea4d5b943/2067f92512067f9259af7107081cadad2ea8442aca60", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "23e7c176-8d48-4b61-8478-c90ddd66c42f" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA22380D2ADC6A", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:56 GMT", + "x-ms-version-id" : "2022-04-19T19:08:56.0772202Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "824b73e5-e01e-003c-0120-54f305000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "23e7c176-8d48-4b61-8478-c90ddd66c42f", + "Date" : "Tue, 19 Apr 2022 19:08:55 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/2067f92502067f9259af738928acb6a28f5ea4d5b943/2067f92512067f9259af7107081cadad2ea8442aca60?comp=snapshot", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "4220f939-f02d-430f-bb8c-0b2bf9638a02" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:56 GMT", + "x-ms-version-id" : "2022-04-19T19:08:56.2451258Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "false", + "Date" : "Tue, 19 Apr 2022 19:08:55 GMT", + "x-ms-snapshot" : "2022-04-19T19:08:56.2441258Z", + "eTag" : "0x8DA22380D2ADC6A", + "x-ms-request-id" : "01e26485-b01e-0088-0b20-543fcb000000", + "x-ms-client-request-id" : "4220f939-f02d-430f-bb8c-0b2bf9638a02" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/2067f92502067f9259af738928acb6a28f5ea4d5b943/2067f92512067f9259af7107081cadad2ea8442aca60?comp=pagelist&prevsnapshot=2022-04-19T19%3A08%3A56.2441258Z", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "f089a8b9-49a6-427e-bc38-965873d4cd61" + }, + "Response" : { + "content-length" : "253", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "ConditionNotMet", + "retry-after" : "0", + "StatusCode" : "412", + "x-ms-request-id" : "01e264e9-b01e-0088-5220-543fcb000000", + "Body" : "\nConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:01e264e9-b01e-0088-5220-543fcb000000\nTime:2022-04-19T19:08:56.4594315Z", + "x-ms-client-request-id" : "f089a8b9-49a6-427e-bc38-965873d4cd61", + "Date" : "Tue, 19 Apr 2022 19:08:55 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "2067f92502067f9259af738928acb6a28f5ea4d5b943", "2067f92512067f9259af7107081cadad2ea8442aca60" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffACFail[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffACFail[2].json new file mode 100644 index 0000000000000..b5d87fbed74a4 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffACFail[2].json @@ -0,0 +1,94 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/0b4aaae600b4aaae64d083221232f97733e664328bca?restype=container", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "1284e87d-a14a-4041-a560-c54ad1811cbe" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA22380CD9197A", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:55 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "824b733e-e01e-003c-7620-54f305000000", + "x-ms-client-request-id" : "1284e87d-a14a-4041-a560-c54ad1811cbe", + "Date" : "Tue, 19 Apr 2022 19:08:55 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/0b4aaae600b4aaae64d083221232f97733e664328bca/0b4aaae610b4aaae64d028358d3b7e7de7941466fa50", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "39a636e5-35f4-45a0-925c-81f5c4d6d59c" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA22380D2AB55D", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:56 GMT", + "x-ms-version-id" : "2022-04-19T19:08:56.0772202Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "01771198-c01e-0092-1e20-545e14000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "39a636e5-35f4-45a0-925c-81f5c4d6d59c", + "Date" : "Tue, 19 Apr 2022 19:08:55 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/0b4aaae600b4aaae64d083221232f97733e664328bca/0b4aaae610b4aaae64d028358d3b7e7de7941466fa50?comp=snapshot", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "83473e9e-630f-42f5-9937-a90ec3ee89f1" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:56 GMT", + "x-ms-version-id" : "2022-04-19T19:08:56.2391286Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "false", + "Date" : "Tue, 19 Apr 2022 19:08:56 GMT", + "x-ms-snapshot" : "2022-04-19T19:08:56.2381286Z", + "eTag" : "0x8DA22380D2AB55D", + "x-ms-request-id" : "b25b01d9-201e-006e-1f20-548fed000000", + "x-ms-client-request-id" : "83473e9e-630f-42f5-9937-a90ec3ee89f1" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/0b4aaae600b4aaae64d083221232f97733e664328bca/0b4aaae610b4aaae64d028358d3b7e7de7941466fa50?comp=pagelist&prevsnapshot=2022-04-19T19%3A08%3A56.2381286Z", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "fb16576e-393a-4923-8c4f-6bb1b79084d5" + }, + "Response" : { + "content-length" : "253", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "ConditionNotMet", + "retry-after" : "0", + "StatusCode" : "412", + "x-ms-request-id" : "b25b024d-201e-006e-7e20-548fed000000", + "Body" : "\nConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:b25b024d-201e-006e-7e20-548fed000000\nTime:2022-04-19T19:08:56.4569011Z", + "x-ms-client-request-id" : "fb16576e-393a-4923-8c4f-6bb1b79084d5", + "Date" : "Tue, 19 Apr 2022 19:08:56 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "0b4aaae600b4aaae64d083221232f97733e664328bca", "0b4aaae610b4aaae64d028358d3b7e7de7941466fa50" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffACFail[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffACFail[3].json new file mode 100644 index 0000000000000..a4dba455d9196 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffACFail[3].json @@ -0,0 +1,122 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/12519ba7012519ba788c039572dc899cbe6da441aa91?restype=container", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "9c909b34-26e7-4b3e-8cde-c2a052533149" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA22380CD9FD45", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:55 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "017710be-c01e-0092-7720-545e14000000", + "x-ms-client-request-id" : "9c909b34-26e7-4b3e-8cde-c2a052533149", + "Date" : "Tue, 19 Apr 2022 19:08:54 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/12519ba7012519ba788c039572dc899cbe6da441aa91/12519ba7112519ba788c192175b6e5a07ef334db580e", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "ffca59da-2e63-44b8-9b95-50f5710f486f" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA22380D2ADC6A", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:56 GMT", + "x-ms-version-id" : "2022-04-19T19:08:56.0772202Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "84707f15-a01e-0070-6720-546335000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "ffca59da-2e63-44b8-9b95-50f5710f486f", + "Date" : "Tue, 19 Apr 2022 19:08:55 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/12519ba7012519ba788c039572dc899cbe6da441aa91/12519ba7112519ba788c192175b6e5a07ef334db580e?comp=snapshot", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "beacd2f7-7d8c-49b5-87c0-a253be8cf509" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:56 GMT", + "x-ms-version-id" : "2022-04-19T19:08:56.2451258Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "false", + "Date" : "Tue, 19 Apr 2022 19:08:55 GMT", + "x-ms-snapshot" : "2022-04-19T19:08:56.2441258Z", + "eTag" : "0x8DA22380D2ADC6A", + "x-ms-request-id" : "017711ff-c01e-0092-6b20-545e14000000", + "x-ms-client-request-id" : "beacd2f7-7d8c-49b5-87c0-a253be8cf509" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "http://REDACTED.blob.core.windows.net/12519ba7012519ba788c039572dc899cbe6da441aa91/12519ba7112519ba788c192175b6e5a07ef334db580e", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "2fe6dd2d-954d-4768-8beb-0f1f22d2f204" + }, + "Response" : { + "x-ms-is-current-version" : "true", + "content-length" : "512", + "x-ms-version" : "2021-04-10", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "x-ms-blob-sequence-number" : "0", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:56 GMT", + "x-ms-version-id" : "2022-04-19T19:08:56.2451258Z", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 19 Apr 2022 19:08:55 GMT", + "x-ms-blob-type" : "PageBlob", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "x-ms-creation-time" : "Tue, 19 Apr 2022 19:08:56 GMT", + "eTag" : "0x8DA22380D2ADC6A", + "x-ms-request-id" : "84707f59-a01e-0070-1a20-546335000000", + "x-ms-client-request-id" : "2fe6dd2d-954d-4768-8beb-0f1f22d2f204", + "Content-Type" : "application/octet-stream" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/12519ba7012519ba788c039572dc899cbe6da441aa91/12519ba7112519ba788c192175b6e5a07ef334db580e?comp=pagelist&prevsnapshot=2022-04-19T19%3A08%3A56.2441258Z", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "854d0c92-f28f-4dc4-a5ef-78f9cb217561" + }, + "Response" : { + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "ConditionNotMet", + "retry-after" : "0", + "StatusCode" : "304", + "x-ms-request-id" : "84707f98-a01e-0070-3b20-546335000000", + "x-ms-client-request-id" : "854d0c92-f28f-4dc4-a5ef-78f9cb217561", + "Date" : "Tue, 19 Apr 2022 19:08:55 GMT" + }, + "Exception" : null + } ], + "variables" : [ "12519ba7012519ba788c039572dc899cbe6da441aa91", "12519ba7112519ba788c192175b6e5a07ef334db580e" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffACFail[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffACFail[4].json new file mode 100644 index 0000000000000..7b20418e3021f --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffACFail[4].json @@ -0,0 +1,116 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/5d100d6005d100d6058066263560b701e04b941af9e2?restype=container", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "2ad22e1d-b644-41da-925d-3b9ead4be11a" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA22380CD9DE00", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:55 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "b25b008b-201e-006e-1f20-548fed000000", + "x-ms-client-request-id" : "2ad22e1d-b644-41da-925d-3b9ead4be11a", + "Date" : "Tue, 19 Apr 2022 19:08:55 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/5d100d6005d100d6058066263560b701e04b941af9e2/5d100d6015d100d605803705964fd7afe6598482691b", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "1fd90b42-d186-42c0-9723-d2f32c4ff3cb" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA22380D29F227", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:56 GMT", + "x-ms-version-id" : "2022-04-19T19:08:56.0712231Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "01e2640b-b01e-0088-2c20-543fcb000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "1fd90b42-d186-42c0-9723-d2f32c4ff3cb", + "Date" : "Tue, 19 Apr 2022 19:08:55 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/5d100d6005d100d6058066263560b701e04b941af9e2/5d100d6015d100d605803705964fd7afe6598482691b?comp=snapshot", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "7ebe8de5-275f-4ec9-9701-02e9df9c5d67" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:56 GMT", + "x-ms-version-id" : "2022-04-19T19:08:56.2451258Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "false", + "Date" : "Tue, 19 Apr 2022 19:08:55 GMT", + "x-ms-snapshot" : "2022-04-19T19:08:56.2441258Z", + "eTag" : "0x8DA22380D29F227", + "x-ms-request-id" : "824b7415-e01e-003c-2820-54f305000000", + "x-ms-client-request-id" : "7ebe8de5-275f-4ec9-9701-02e9df9c5d67" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/5d100d6005d100d6058066263560b701e04b941af9e2/5d100d6015d100d605803705964fd7afe6598482691b?comp=lease", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "28ec3035-f203-45f4-897b-a3cc13df1a12" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-id" : "81a25258-8ff1-401a-a870-e7ea0addd478", + "eTag" : "0x8DA22380D29F227", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:56 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "01771276-c01e-0092-4120-545e14000000", + "x-ms-client-request-id" : "28ec3035-f203-45f4-897b-a3cc13df1a12", + "Date" : "Tue, 19 Apr 2022 19:08:55 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/5d100d6005d100d6058066263560b701e04b941af9e2/5d100d6015d100d605803705964fd7afe6598482691b?comp=pagelist&prevsnapshot=2022-04-19T19%3A08%3A56.2441258Z", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "bc0649e0-a0d2-47c3-b0e2-4036c6c7de51" + }, + "Response" : { + "content-length" : "265", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "LeaseIdMismatchWithBlobOperation", + "retry-after" : "0", + "StatusCode" : "412", + "x-ms-request-id" : "0177129a-c01e-0092-5a20-545e14000000", + "Body" : "\nLeaseIdMismatchWithBlobOperationThe lease ID specified did not match the lease ID for the blob.\nRequestId:0177129a-c01e-0092-5a20-545e14000000\nTime:2022-04-19T19:08:56.5616431Z", + "x-ms-client-request-id" : "bc0649e0-a0d2-47c3-b0e2-4036c6c7de51", + "Date" : "Tue, 19 Apr 2022 19:08:55 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "5d100d6005d100d6058066263560b701e04b941af9e2", "5d100d6015d100d605803705964fd7afe6598482691b" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffACFail[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffACFail[5].json new file mode 100644 index 0000000000000..44521b3cae620 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffACFail[5].json @@ -0,0 +1,94 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/440b3c210440b3c216f071727b7b39b467745402eace?restype=container", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "20438fa4-c54f-42fb-88e7-1cf239bc2d38" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA22380CDAD4B2", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:55 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "9ff2ee52-e01e-0061-7f20-54f981000000", + "x-ms-client-request-id" : "20438fa4-c54f-42fb-88e7-1cf239bc2d38", + "Date" : "Tue, 19 Apr 2022 19:08:55 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/440b3c210440b3c216f071727b7b39b467745402eace/440b3c211440b3c216f0207975b6105c692f3484c8fc", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "51559b81-e3e7-46d8-be0b-d09e22fc2d7b" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA22380D2B7893", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:56 GMT", + "x-ms-version-id" : "2022-04-19T19:08:56.0812179Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "9ff2eecc-e01e-0061-6420-54f981000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "51559b81-e3e7-46d8-be0b-d09e22fc2d7b", + "Date" : "Tue, 19 Apr 2022 19:08:55 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/440b3c210440b3c216f071727b7b39b467745402eace/440b3c211440b3c216f0207975b6105c692f3484c8fc?comp=snapshot", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "5551d28f-55a3-4016-8543-a454aac31627" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:56 GMT", + "x-ms-version-id" : "2022-04-19T19:08:56.2451258Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "false", + "Date" : "Tue, 19 Apr 2022 19:08:55 GMT", + "x-ms-snapshot" : "2022-04-19T19:08:56.2441258Z", + "eTag" : "0x8DA22380D2B7893", + "x-ms-request-id" : "9ff2ef05-e01e-0061-1020-54f981000000", + "x-ms-client-request-id" : "5551d28f-55a3-4016-8543-a454aac31627" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/440b3c210440b3c216f071727b7b39b467745402eace/440b3c211440b3c216f0207975b6105c692f3484c8fc?comp=pagelist&prevsnapshot=2022-04-19T19%3A08%3A56.2441258Z", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "41c46656-c354-4637-a5de-d9b23ce28d34" + }, + "Response" : { + "content-length" : "253", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "ConditionNotMet", + "retry-after" : "0", + "StatusCode" : "412", + "x-ms-request-id" : "824b7443-e01e-003c-4c20-54f305000000", + "Body" : "\nConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:824b7443-e01e-003c-4c20-54f305000000\nTime:2022-04-19T19:08:56.8156554Z", + "x-ms-client-request-id" : "41c46656-c354-4637-a5de-d9b23ce28d34", + "Date" : "Tue, 19 Apr 2022 19:08:56 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "440b3c210440b3c216f071727b7b39b467745402eace", "440b3c211440b3c216f0207975b6105c692f3484c8fc" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffAC[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffAC[0].json new file mode 100644 index 0000000000000..d576a8161ffb3 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffAC[0].json @@ -0,0 +1,163 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/ff5f7d1c0ff5f7d1ce992166866878613a51b497fa59?restype=container", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "97971188-2945-43d6-9b28-7f09ecc430dc" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237FCD16EED", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:28 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "c2b75391-601e-000d-2d20-541216000000", + "x-ms-client-request-id" : "97971188-2945-43d6-9b28-7f09ecc430dc", + "Date" : "Tue, 19 Apr 2022 19:08:27 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/ff5f7d1c0ff5f7d1ce992166866878613a51b497fa59/ff5f7d1c1ff5f7d1ce9987510615b836a31ce424c9c7", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "a3a48397-d135-4b8c-8e87-8b95d4aac745" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237FD224EC1", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:29 GMT", + "x-ms-version-id" : "2022-04-19T19:08:29.1776193Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "5f107310-301e-0062-5620-5418e5000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "a3a48397-d135-4b8c-8e87-8b95d4aac745", + "Date" : "Tue, 19 Apr 2022 19:08:28 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/ff5f7d1c0ff5f7d1ce992166866878613a51b497fa59/ff5f7d1c1ff5f7d1ce9987510615b836a31ce424c9c7", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "d66d16e3-20a3-40bb-a706-553e0f40c8e4" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237FD3A6715", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:29 GMT", + "x-ms-version-id" : "2022-04-19T19:08:29.3375280Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1399f384-d01e-006a-7420-5402ea000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "d66d16e3-20a3-40bb-a706-553e0f40c8e4", + "Date" : "Tue, 19 Apr 2022 19:08:29 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/ff5f7d1c0ff5f7d1ce992166866878613a51b497fa59/ff5f7d1c1ff5f7d1ce9987510615b836a31ce424c9c7?comp=page", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "3a62e527-6b7f-46ca-acfb-0ea76d1b329f", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "Tug7XgZ/D0Y=", + "x-ms-blob-sequence-number" : "0", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:29 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 19 Apr 2022 19:08:29 GMT", + "eTag" : "0x8DA2237FD6E19B2", + "x-ms-request-id" : "1399f3bd-d01e-006a-2020-5402ea000000", + "x-ms-client-request-id" : "3a62e527-6b7f-46ca-acfb-0ea76d1b329f" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/ff5f7d1c0ff5f7d1ce992166866878613a51b497fa59/ff5f7d1c1ff5f7d1ce9987510615b836a31ce424c9c7?comp=snapshot", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "b41ac38b-6f45-4d42-9a7d-335c39f2a141" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:29 GMT", + "x-ms-version-id" : "2022-04-19T19:08:29.8122572Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "false", + "Date" : "Tue, 19 Apr 2022 19:08:29 GMT", + "x-ms-snapshot" : "2022-04-19T19:08:29.8112572Z", + "eTag" : "0x8DA2237FD6E19B2", + "x-ms-request-id" : "1399f3d5-d01e-006a-3520-5402ea000000", + "x-ms-client-request-id" : "b41ac38b-6f45-4d42-9a7d-335c39f2a141" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/ff5f7d1c0ff5f7d1ce992166866878613a51b497fa59/ff5f7d1c1ff5f7d1ce9987510615b836a31ce424c9c7?comp=tags", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "b4cd1e5f-f80c-4785-b201-ccfa110133d5", + "Content-Type" : "application/xml" + }, + "Response" : { + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "57d06e98-b01e-007c-7b20-54f43d000000", + "x-ms-client-request-id" : "b4cd1e5f-f80c-4785-b201-ccfa110133d5", + "Date" : "Tue, 19 Apr 2022 19:08:29 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/ff5f7d1c0ff5f7d1ce992166866878613a51b497fa59/ff5f7d1c1ff5f7d1ce9987510615b836a31ce424c9c7?comp=pagelist&prevsnapshot=2022-04-19T19%3A08%3A29.8112572Z", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "e285d10e-0c9f-4ad5-8b86-e8b15210f4be" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-content-length" : "4096", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:29 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 19 Apr 2022 19:08:29 GMT", + "eTag" : "0x8DA2237FD6E19B2", + "x-ms-request-id" : "5f10760f-301e-0062-2120-5418e5000000", + "Body" : "\n", + "x-ms-client-request-id" : "e285d10e-0c9f-4ad5-8b86-e8b15210f4be", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "ff5f7d1c0ff5f7d1ce992166866878613a51b497fa59", "ff5f7d1c1ff5f7d1ce9987510615b836a31ce424c9c7", "dab1cb7e-419d-4c0f-8755-230375533488" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffAC[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffAC[1].json new file mode 100644 index 0000000000000..4ec614238265e --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffAC[1].json @@ -0,0 +1,163 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/e6444c5d0e6444c5d85877874c347257f673643f287d?restype=container", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "1fa63d55-1af3-4ed8-ab0b-a3baa22b21ca" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237FCD11E6E", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:28 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "57d06d27-b01e-007c-4520-54f43d000000", + "x-ms-client-request-id" : "1fa63d55-1af3-4ed8-ab0b-a3baa22b21ca", + "Date" : "Tue, 19 Apr 2022 19:08:28 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/e6444c5d0e6444c5d85877874c347257f673643f287d/e6444c5d1e6444c5d858868573b8f1b66a83a476493b", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "522788aa-3c82-4d2e-81d5-3677d809825c" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237FD2227B6", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:29 GMT", + "x-ms-version-id" : "2022-04-19T19:08:29.1766198Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "76e3291a-b01e-006c-2520-543155000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "522788aa-3c82-4d2e-81d5-3677d809825c", + "Date" : "Tue, 19 Apr 2022 19:08:29 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/e6444c5d0e6444c5d85877874c347257f673643f287d/e6444c5d1e6444c5d858868573b8f1b66a83a476493b", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "bd15b63d-26de-489d-8993-8e5680143b7f" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237FD3A6715", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:29 GMT", + "x-ms-version-id" : "2022-04-19T19:08:29.3375280Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "76e32966-b01e-006c-6b20-543155000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "bd15b63d-26de-489d-8993-8e5680143b7f", + "Date" : "Tue, 19 Apr 2022 19:08:29 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/e6444c5d0e6444c5d85877874c347257f673643f287d/e6444c5d1e6444c5d858868573b8f1b66a83a476493b?comp=page", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "aca737d2-8a00-40a3-a093-d2495872a679", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "FmlxHgh4uG0=", + "x-ms-blob-sequence-number" : "0", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:29 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 19 Apr 2022 19:08:29 GMT", + "eTag" : "0x8DA2237FD6F2AF7", + "x-ms-request-id" : "a160d5e9-b01e-0053-1620-54f9f6000000", + "x-ms-client-request-id" : "aca737d2-8a00-40a3-a093-d2495872a679" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/e6444c5d0e6444c5d85877874c347257f673643f287d/e6444c5d1e6444c5d858868573b8f1b66a83a476493b?comp=snapshot", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "b2d3ee21-03c6-49b5-b122-9ecd58437402" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:29 GMT", + "x-ms-version-id" : "2022-04-19T19:08:29.8192533Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "false", + "Date" : "Tue, 19 Apr 2022 19:08:29 GMT", + "x-ms-snapshot" : "2022-04-19T19:08:29.8182533Z", + "eTag" : "0x8DA2237FD6F2AF7", + "x-ms-request-id" : "a160d609-b01e-0053-2d20-54f9f6000000", + "x-ms-client-request-id" : "b2d3ee21-03c6-49b5-b122-9ecd58437402" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/e6444c5d0e6444c5d85877874c347257f673643f287d/e6444c5d1e6444c5d858868573b8f1b66a83a476493b?comp=tags", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "19f9c102-178e-4991-b64e-837427c5c143", + "Content-Type" : "application/xml" + }, + "Response" : { + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "c2b7553c-601e-000d-1a20-541216000000", + "x-ms-client-request-id" : "19f9c102-178e-4991-b64e-837427c5c143", + "Date" : "Tue, 19 Apr 2022 19:08:29 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/e6444c5d0e6444c5d85877874c347257f673643f287d/e6444c5d1e6444c5d858868573b8f1b66a83a476493b?comp=pagelist&prevsnapshot=2022-04-19T19%3A08%3A29.8182533Z", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "9985ec70-d681-407b-98e6-f517a0bef5af" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-content-length" : "4096", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:29 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 19 Apr 2022 19:08:29 GMT", + "eTag" : "0x8DA2237FD6F2AF7", + "x-ms-request-id" : "c2b75598-601e-000d-6620-541216000000", + "Body" : "\n", + "x-ms-client-request-id" : "9985ec70-d681-407b-98e6-f517a0bef5af", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "e6444c5d0e6444c5d85877874c347257f673643f287d", "e6444c5d1e6444c5d858868573b8f1b66a83a476493b", "2215dc59-d09a-41ce-9293-4771df3a5ed9" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffAC[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffAC[2].json new file mode 100644 index 0000000000000..86f976ac2b8c2 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffAC[2].json @@ -0,0 +1,163 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/cd691f9e0cd691f9e2f6182623a6bdfe5697545309a3?restype=container", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "7320855a-e85f-49fb-9fbe-c79dfb37ef5f" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237FCD02BFE", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:28 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1916c9af-601e-008b-4a20-54deaf000000", + "x-ms-client-request-id" : "7320855a-e85f-49fb-9fbe-c79dfb37ef5f", + "Date" : "Tue, 19 Apr 2022 19:08:28 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/cd691f9e0cd691f9e2f6182623a6bdfe5697545309a3/cd691f9e1cd691f9e2f6380305ab44c519d374f88b38", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "4ba2d5bb-c8bf-43aa-a130-16b0c8bfbaaf" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237FD22EAE8", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:29 GMT", + "x-ms-version-id" : "2022-04-19T19:08:29.1816168Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1399f36f-d01e-006a-6220-5402ea000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "4ba2d5bb-c8bf-43aa-a130-16b0c8bfbaaf", + "Date" : "Tue, 19 Apr 2022 19:08:28 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/cd691f9e0cd691f9e2f6182623a6bdfe5697545309a3/cd691f9e1cd691f9e2f6380305ab44c519d374f88b38", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "73cf352f-f1a6-4d1c-8193-0ddd70eb8768" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237FD3A6715", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:29 GMT", + "x-ms-version-id" : "2022-04-19T19:08:29.3365285Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "5f1073b5-301e-0062-6f20-5418e5000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "73cf352f-f1a6-4d1c-8193-0ddd70eb8768", + "Date" : "Tue, 19 Apr 2022 19:08:28 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/cd691f9e0cd691f9e2f6182623a6bdfe5697545309a3/cd691f9e1cd691f9e2f6380305ab44c519d374f88b38?comp=page", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "96223da0-e528-42a1-8730-ff68cbc4fd25", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "QHnK0qjzJhE=", + "x-ms-blob-sequence-number" : "0", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:29 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 19 Apr 2022 19:08:29 GMT", + "eTag" : "0x8DA2237FD6EDCE4", + "x-ms-request-id" : "57d06e40-b01e-007c-3120-54f43d000000", + "x-ms-client-request-id" : "96223da0-e528-42a1-8730-ff68cbc4fd25" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/cd691f9e0cd691f9e2f6182623a6bdfe5697545309a3/cd691f9e1cd691f9e2f6380305ab44c519d374f88b38?comp=snapshot", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "ef3454da-a700-41e0-82de-88273b5e25aa" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:29 GMT", + "x-ms-version-id" : "2022-04-19T19:08:29.8172547Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "false", + "Date" : "Tue, 19 Apr 2022 19:08:29 GMT", + "x-ms-snapshot" : "2022-04-19T19:08:29.8162547Z", + "eTag" : "0x8DA2237FD6EDCE4", + "x-ms-request-id" : "76e329f4-b01e-006c-6520-543155000000", + "x-ms-client-request-id" : "ef3454da-a700-41e0-82de-88273b5e25aa" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/cd691f9e0cd691f9e2f6182623a6bdfe5697545309a3/cd691f9e1cd691f9e2f6380305ab44c519d374f88b38?comp=tags", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "205e673a-749e-49f5-99c5-655df60f9443", + "Content-Type" : "application/xml" + }, + "Response" : { + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "5f107575-301e-0062-1820-5418e5000000", + "x-ms-client-request-id" : "205e673a-749e-49f5-99c5-655df60f9443", + "Date" : "Tue, 19 Apr 2022 19:08:29 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/cd691f9e0cd691f9e2f6182623a6bdfe5697545309a3/cd691f9e1cd691f9e2f6380305ab44c519d374f88b38?comp=pagelist&prevsnapshot=2022-04-19T19%3A08%3A29.8162547Z", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "23fbb7d3-08b9-4b5b-8df1-69386a473e8c" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-content-length" : "4096", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:29 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 19 Apr 2022 19:08:29 GMT", + "eTag" : "0x8DA2237FD6EDCE4", + "x-ms-request-id" : "1399f422-d01e-006a-7220-5402ea000000", + "Body" : "\n", + "x-ms-client-request-id" : "23fbb7d3-08b9-4b5b-8df1-69386a473e8c", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "cd691f9e0cd691f9e2f6182623a6bdfe5697545309a3", "cd691f9e1cd691f9e2f6380305ab44c519d374f88b38", "1d4613de-40fb-4386-a6d0-7a9e6ce2ddc8" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffAC[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffAC[3].json new file mode 100644 index 0000000000000..2ccb88c40f916 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffAC[3].json @@ -0,0 +1,195 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/d4722edf0d4722edf9ca9441182ad3d459ed8497b828?restype=container", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "1eb1b867-310f-41c8-adb2-cd5a9458794c" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237FCD11F52", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:28 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "76e32875-b01e-006c-1d20-543155000000", + "x-ms-client-request-id" : "1eb1b867-310f-41c8-adb2-cd5a9458794c", + "Date" : "Tue, 19 Apr 2022 19:08:28 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/d4722edf0d4722edf9ca9441182ad3d459ed8497b828/d4722edf1d4722edf9ca57440d6f5647a66e44957afc", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "3aee5a20-c507-4a0a-aad5-0ef151a011eb" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237FD213D73", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:29 GMT", + "x-ms-version-id" : "2022-04-19T19:08:29.1706227Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a160d588-b01e-0053-4420-54f9f6000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "3aee5a20-c507-4a0a-aad5-0ef151a011eb", + "Date" : "Tue, 19 Apr 2022 19:08:28 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/d4722edf0d4722edf9ca9441182ad3d459ed8497b828/d4722edf1d4722edf9ca57440d6f5647a66e44957afc", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "5a82c2aa-7874-4b91-bf9a-2b7494b4495a" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237FD5F75D6", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:29 GMT", + "x-ms-version-id" : "2022-04-19T19:08:29.5793894Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "5f107460-301e-0062-1220-5418e5000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "5a82c2aa-7874-4b91-bf9a-2b7494b4495a", + "Date" : "Tue, 19 Apr 2022 19:08:28 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/d4722edf0d4722edf9ca9441182ad3d459ed8497b828/d4722edf1d4722edf9ca57440d6f5647a66e44957afc?comp=page", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "2528ad79-00ad-49d3-9128-47b85779fe31", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "EBpcoPKtUnQ=", + "x-ms-blob-sequence-number" : "0", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:29 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 19 Apr 2022 19:08:28 GMT", + "eTag" : "0x8DA2237FD7285DC", + "x-ms-request-id" : "5f10749d-301e-0062-4c20-5418e5000000", + "x-ms-client-request-id" : "2528ad79-00ad-49d3-9128-47b85779fe31" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/d4722edf0d4722edf9ca9441182ad3d459ed8497b828/d4722edf1d4722edf9ca57440d6f5647a66e44957afc?comp=snapshot", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "c4534b45-56ea-4d47-97d4-183624fbfe6d" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:29 GMT", + "x-ms-version-id" : "2022-04-19T19:08:29.8172547Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "false", + "Date" : "Tue, 19 Apr 2022 19:08:29 GMT", + "x-ms-snapshot" : "2022-04-19T19:08:29.8162547Z", + "eTag" : "0x8DA2237FD7285DC", + "x-ms-request-id" : "57d06e61-b01e-007c-4c20-54f43d000000", + "x-ms-client-request-id" : "c4534b45-56ea-4d47-97d4-183624fbfe6d" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/d4722edf0d4722edf9ca9441182ad3d459ed8497b828/d4722edf1d4722edf9ca57440d6f5647a66e44957afc?comp=tags", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "f83a72b2-f340-4d6f-b3a4-357fd519388c", + "Content-Type" : "application/xml" + }, + "Response" : { + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "1916cc0e-601e-008b-6020-54deaf000000", + "x-ms-client-request-id" : "f83a72b2-f340-4d6f-b3a4-357fd519388c", + "Date" : "Tue, 19 Apr 2022 19:08:29 GMT" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "http://REDACTED.blob.core.windows.net/d4722edf0d4722edf9ca9441182ad3d459ed8497b828/d4722edf1d4722edf9ca57440d6f5647a66e44957afc", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "58e811e7-f857-4992-bbae-7b86d2bbc2b8" + }, + "Response" : { + "x-ms-is-current-version" : "true", + "content-length" : "4096", + "x-ms-version" : "2021-04-10", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-tag-count" : "1", + "x-ms-lease-state" : "available", + "x-ms-blob-sequence-number" : "0", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:29 GMT", + "x-ms-version-id" : "2022-04-19T19:08:29.8172547Z", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 19 Apr 2022 19:08:30 GMT", + "x-ms-blob-type" : "PageBlob", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "x-ms-creation-time" : "Tue, 19 Apr 2022 19:08:29 GMT", + "eTag" : "0x8DA2237FD7285DC", + "x-ms-request-id" : "76e32a80-b01e-006c-5620-543155000000", + "x-ms-client-request-id" : "58e811e7-f857-4992-bbae-7b86d2bbc2b8", + "Content-Type" : "application/octet-stream" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/d4722edf0d4722edf9ca9441182ad3d459ed8497b828/d4722edf1d4722edf9ca57440d6f5647a66e44957afc?comp=pagelist&prevsnapshot=2022-04-19T19%3A08%3A29.8162547Z", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "25c95d12-1d0f-43b1-a86c-c75ff132fd15" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-content-length" : "4096", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:29 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 19 Apr 2022 19:08:30 GMT", + "eTag" : "0x8DA2237FD7285DC", + "x-ms-request-id" : "76e32ade-b01e-006c-2520-543155000000", + "Body" : "\n", + "x-ms-client-request-id" : "25c95d12-1d0f-43b1-a86c-c75ff132fd15", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "d4722edf0d4722edf9ca9441182ad3d459ed8497b828", "d4722edf1d4722edf9ca57440d6f5647a66e44957afc", "3db08c4b-5e94-4468-b00c-f5768079fe99" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffAC[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffAC[4].json new file mode 100644 index 0000000000000..554eb81572ca5 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffAC[4].json @@ -0,0 +1,163 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/9b33b81809b33b8186c9720756109e8b2f24840c7b39?restype=container", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "d6da85f1-0823-43af-a0ce-c49886bffe1e" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237FCD0047A", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:28 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1399f306-d01e-006a-1620-5402ea000000", + "x-ms-client-request-id" : "d6da85f1-0823-43af-a0ce-c49886bffe1e", + "Date" : "Tue, 19 Apr 2022 19:08:28 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/9b33b81809b33b8186c9720756109e8b2f24840c7b39/9b33b81819b33b8186c9788487b78f03f8720464d843", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "d5668a92-86ac-4f32-9225-6d1fa6f1c7fa" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237FD2227B6", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:29 GMT", + "x-ms-version-id" : "2022-04-19T19:08:29.1766198Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "c2b75446-601e-000d-4320-541216000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "d5668a92-86ac-4f32-9225-6d1fa6f1c7fa", + "Date" : "Tue, 19 Apr 2022 19:08:28 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/9b33b81809b33b8186c9720756109e8b2f24840c7b39/9b33b81819b33b8186c9788487b78f03f8720464d843", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "bcc20df5-1b37-4b11-95cd-fed23059b9e3" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237FD3A6715", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:29 GMT", + "x-ms-version-id" : "2022-04-19T19:08:29.3365285Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "57d06df7-b01e-007c-7620-54f43d000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "bcc20df5-1b37-4b11-95cd-fed23059b9e3", + "Date" : "Tue, 19 Apr 2022 19:08:29 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/9b33b81809b33b8186c9720756109e8b2f24840c7b39/9b33b81819b33b8186c9788487b78f03f8720464d843?comp=page", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "f02e30e9-0a87-4a38-ad44-afff068ff6cf", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "a5rl1saUg/4=", + "x-ms-blob-sequence-number" : "0", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:29 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 19 Apr 2022 19:08:28 GMT", + "eTag" : "0x8DA2237FD6F5203", + "x-ms-request-id" : "c2b754cd-601e-000d-3c20-541216000000", + "x-ms-client-request-id" : "f02e30e9-0a87-4a38-ad44-afff068ff6cf" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/9b33b81809b33b8186c9720756109e8b2f24840c7b39/9b33b81819b33b8186c9788487b78f03f8720464d843?comp=snapshot", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "8a19d541-3906-45f1-b024-4957f432d94d" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:29 GMT", + "x-ms-version-id" : "2022-04-19T19:08:29.8232512Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "false", + "Date" : "Tue, 19 Apr 2022 19:08:29 GMT", + "x-ms-snapshot" : "2022-04-19T19:08:29.8222512Z", + "eTag" : "0x8DA2237FD6F5203", + "x-ms-request-id" : "5f1074e1-301e-0062-0d20-5418e5000000", + "x-ms-client-request-id" : "8a19d541-3906-45f1-b024-4957f432d94d" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/9b33b81809b33b8186c9720756109e8b2f24840c7b39/9b33b81819b33b8186c9788487b78f03f8720464d843?comp=tags", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "7ee19ca3-885a-4a24-9dce-35427a2caad2", + "Content-Type" : "application/xml" + }, + "Response" : { + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "a160d630-b01e-0053-4c20-54f9f6000000", + "x-ms-client-request-id" : "7ee19ca3-885a-4a24-9dce-35427a2caad2", + "Date" : "Tue, 19 Apr 2022 19:08:29 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/9b33b81809b33b8186c9720756109e8b2f24840c7b39/9b33b81819b33b8186c9788487b78f03f8720464d843?comp=pagelist&prevsnapshot=2022-04-19T19%3A08%3A29.8222512Z", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "6fbcc803-f653-44f7-bbea-90ff3489752f" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-content-length" : "4096", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:29 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 19 Apr 2022 19:08:30 GMT", + "eTag" : "0x8DA2237FD6F5203", + "x-ms-request-id" : "57d06f06-b01e-007c-5920-54f43d000000", + "Body" : "\n", + "x-ms-client-request-id" : "6fbcc803-f653-44f7-bbea-90ff3489752f", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "9b33b81809b33b8186c9720756109e8b2f24840c7b39", "9b33b81819b33b8186c9788487b78f03f8720464d843", "a4d08463-2bf0-490b-bedd-4b45c733f91a" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffAC[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffAC[5].json new file mode 100644 index 0000000000000..9b168572d5927 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffAC[5].json @@ -0,0 +1,185 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/822889590822889591e708747a3ec3ee153404003b28?restype=container", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "456fedaa-55f9-447e-b32f-68595b8b4a98" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237FCCFAA79", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:28 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "5f107195-301e-0062-7820-5418e5000000", + "x-ms-client-request-id" : "456fedaa-55f9-447e-b32f-68595b8b4a98", + "Date" : "Tue, 19 Apr 2022 19:08:27 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/822889590822889591e708747a3ec3ee153404003b28/822889591822889591e7838676e06aa8e752648fc8c9", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "8aa2f36f-5f47-42b8-b248-e59026f435d3" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237FD2200AA", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:29 GMT", + "x-ms-version-id" : "2022-04-19T19:08:29.1756202Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "57d06dd1-b01e-007c-5420-54f43d000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "8aa2f36f-5f47-42b8-b248-e59026f435d3", + "Date" : "Tue, 19 Apr 2022 19:08:28 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/822889590822889591e708747a3ec3ee153404003b28/822889591822889591e7838676e06aa8e752648fc8c9", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "bd38adc9-19c7-4fc2-bcf3-a73a057e155e" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237FD3955CF", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:29 GMT", + "x-ms-version-id" : "2022-04-19T19:08:29.3295327Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "c2b7547a-601e-000d-7320-541216000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "bd38adc9-19c7-4fc2-bcf3-a73a057e155e", + "Date" : "Tue, 19 Apr 2022 19:08:28 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/822889590822889591e708747a3ec3ee153404003b28/822889591822889591e7838676e06aa8e752648fc8c9?comp=page", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "f9e9d09f-e639-4c0c-a685-8c9819c9cf04", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "MnazupoPCdI=", + "x-ms-blob-sequence-number" : "0", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:29 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 19 Apr 2022 19:08:29 GMT", + "eTag" : "0x8DA2237FD6F5203", + "x-ms-request-id" : "76e329c8-b01e-006c-4120-543155000000", + "x-ms-client-request-id" : "f9e9d09f-e639-4c0c-a685-8c9819c9cf04" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/822889590822889591e708747a3ec3ee153404003b28/822889591822889591e7838676e06aa8e752648fc8c9?comp=snapshot", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "4cb14575-9550-4a47-84ee-f6d1ae98c491" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:29 GMT", + "x-ms-version-id" : "2022-04-19T19:08:29.8212521Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "false", + "Date" : "Tue, 19 Apr 2022 19:08:28 GMT", + "x-ms-snapshot" : "2022-04-19T19:08:29.8202521Z", + "eTag" : "0x8DA2237FD6F5203", + "x-ms-request-id" : "c2b75503-601e-000d-6a20-541216000000", + "x-ms-client-request-id" : "4cb14575-9550-4a47-84ee-f6d1ae98c491" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/822889590822889591e708747a3ec3ee153404003b28/822889591822889591e7838676e06aa8e752648fc8c9?comp=tags", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "a3eea997-490c-4237-8ef6-98fbf00c6e69", + "Content-Type" : "application/xml" + }, + "Response" : { + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "76e32a3e-b01e-006c-1f20-543155000000", + "x-ms-client-request-id" : "a3eea997-490c-4237-8ef6-98fbf00c6e69", + "Date" : "Tue, 19 Apr 2022 19:08:29 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/822889590822889591e708747a3ec3ee153404003b28/822889591822889591e7838676e06aa8e752648fc8c9?comp=lease", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "6b4ad1e4-d42f-4c00-818a-cbbdee95bf68" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-id" : "0e5fdd75-f182-43d2-acf7-39242445390f", + "eTag" : "0x8DA2237FD6F5203", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:29 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a160d66a-b01e-0053-7d20-54f9f6000000", + "x-ms-client-request-id" : "6b4ad1e4-d42f-4c00-818a-cbbdee95bf68", + "Date" : "Tue, 19 Apr 2022 19:08:29 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/822889590822889591e708747a3ec3ee153404003b28/822889591822889591e7838676e06aa8e752648fc8c9?comp=pagelist&prevsnapshot=2022-04-19T19%3A08%3A29.8202521Z", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "07cc8fce-ca03-44fa-8a70-3a538ca4770e" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-content-length" : "4096", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:29 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 19 Apr 2022 19:08:30 GMT", + "eTag" : "0x8DA2237FD6F5203", + "x-ms-request-id" : "a160d6a0-b01e-0053-2a20-54f9f6000000", + "Body" : "\n", + "x-ms-client-request-id" : "07cc8fce-ca03-44fa-8a70-3a538ca4770e", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "822889590822889591e708747a3ec3ee153404003b28", "822889591822889591e7838676e06aa8e752648fc8c9", "ae86de46-10da-4c75-8534-54039ed27273" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffAC[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffAC[6].json new file mode 100644 index 0000000000000..c710c552bf8e1 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffAC[6].json @@ -0,0 +1,163 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/a905da9a0a905da9a53a382156c7c67fbec064e13911?restype=container", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "7cb9b408-2f25-43c2-b23e-d81eb979faa4" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237FCD1827A", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:28 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a160d4f8-b01e-0053-4b20-54f9f6000000", + "x-ms-client-request-id" : "7cb9b408-2f25-43c2-b23e-d81eb979faa4", + "Date" : "Tue, 19 Apr 2022 19:08:28 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/a905da9a0a905da9a53a382156c7c67fbec064e13911/a905da9a1a905da9a53a097375ed238ebf055435e817", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "5064553c-05bd-4310-bc2d-52c439ebab54" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237FD21166E", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:29 GMT", + "x-ms-version-id" : "2022-04-19T19:08:29.1706227Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1916caa2-601e-008b-1b20-54deaf000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "5064553c-05bd-4310-bc2d-52c439ebab54", + "Date" : "Tue, 19 Apr 2022 19:08:28 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/a905da9a0a905da9a53a382156c7c67fbec064e13911/a905da9a1a905da9a53a097375ed238ebf055435e817", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "64601afb-41e9-4b83-8f12-d7926ddaa0f1" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2237FD67B200", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:29 GMT", + "x-ms-version-id" : "2022-04-19T19:08:29.6333584Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1916cb62-601e-008b-4620-54deaf000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "64601afb-41e9-4b83-8f12-d7926ddaa0f1", + "Date" : "Tue, 19 Apr 2022 19:08:28 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/a905da9a0a905da9a53a382156c7c67fbec064e13911/a905da9a1a905da9a53a097375ed238ebf055435e817?comp=page", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "6d55d9ca-9028-44a2-9c96-ac9900331f8b", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "IpTdLzOKxX4=", + "x-ms-blob-sequence-number" : "0", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:29 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 19 Apr 2022 19:08:29 GMT", + "eTag" : "0x8DA2237FD79149D", + "x-ms-request-id" : "1916cb8e-601e-008b-6f20-54deaf000000", + "x-ms-client-request-id" : "6d55d9ca-9028-44a2-9c96-ac9900331f8b" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/a905da9a0a905da9a53a382156c7c67fbec064e13911/a905da9a1a905da9a53a097375ed238ebf055435e817?comp=snapshot", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "aaa29d09-e744-4d13-97ae-d341aa4b4352" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:29 GMT", + "x-ms-version-id" : "2022-04-19T19:08:29.8572319Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "false", + "Date" : "Tue, 19 Apr 2022 19:08:29 GMT", + "x-ms-snapshot" : "2022-04-19T19:08:29.8562319Z", + "eTag" : "0x8DA2237FD79149D", + "x-ms-request-id" : "1916cbad-601e-008b-0920-54deaf000000", + "x-ms-client-request-id" : "aaa29d09-e744-4d13-97ae-d341aa4b4352" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/a905da9a0a905da9a53a382156c7c67fbec064e13911/a905da9a1a905da9a53a097375ed238ebf055435e817?comp=tags", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "f957b0dd-a245-408e-9699-fd4c6d387f6d", + "Content-Type" : "application/xml" + }, + "Response" : { + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "1399f3f9-d01e-006a-5020-5402ea000000", + "x-ms-client-request-id" : "f957b0dd-a245-408e-9699-fd4c6d387f6d", + "Date" : "Tue, 19 Apr 2022 19:08:29 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/a905da9a0a905da9a53a382156c7c67fbec064e13911/a905da9a1a905da9a53a097375ed238ebf055435e817?comp=pagelist&prevsnapshot=2022-04-19T19%3A08%3A29.8562319Z", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "c891d8d2-a42c-4d55-ac1d-ab990689be9e" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-content-length" : "4096", + "Last-Modified" : "Tue, 19 Apr 2022 19:08:29 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 19 Apr 2022 19:08:30 GMT", + "eTag" : "0x8DA2237FD79149D", + "x-ms-request-id" : "1916cc6b-601e-008b-2b20-54deaf000000", + "Body" : "\n", + "x-ms-client-request-id" : "c891d8d2-a42c-4d55-ac1d-ab990689be9e", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "a905da9a0a905da9a53a382156c7c67fbec064e13911", "a905da9a1a905da9a53a097375ed238ebf055435e817", "c7a19db5-c580-441c-9a71-11a74bb60c06" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffPageSize.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffPageSize.json new file mode 100644 index 0000000000000..e51b71fe2ce76 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesDiffPageSize.json @@ -0,0 +1,307 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/af91d57d0af91d57d97d37086ba3cc2a17bef47e8b80?restype=container", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "f019c576-641c-422a-b770-8c1de8fc570b" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2235A8C6455B", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "317fd930-801e-0036-7c1e-549f88000000", + "x-ms-client-request-id" : "f019c576-641c-422a-b770-8c1de8fc570b", + "Date" : "Tue, 19 Apr 2022 18:51:47 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/af91d57d0af91d57d97d37086ba3cc2a17bef47e8b80/af91d57d1af91d57d97d45186007a7545fc4749e0a50", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "7c8cd7df-d2dd-497f-b9bc-a5751c5a0dd2" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2235A8D8029F", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e1c079af-b01e-003d-621e-5464e3000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "7c8cd7df-d2dd-497f-b9bc-a5751c5a0dd2", + "Date" : "Tue, 19 Apr 2022 18:51:47 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/af91d57d0af91d57d97d37086ba3cc2a17bef47e8b80/af91d57d1af91d57d97d45186007a7545fc4749e0a50", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "5981b457-299f-4b68-aa7b-050734990b91" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2235A8E483E7", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "38f39ac3-c01e-0045-781e-54c71b000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "5981b457-299f-4b68-aa7b-050734990b91", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/af91d57d0af91d57d97d37086ba3cc2a17bef47e8b80/af91d57d1af91d57d97d45186007a7545fc4749e0a50?comp=page", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "82265123-fc89-49f7-bd0a-8ff1a225d79e", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "5HbEidZoE/o=", + "x-ms-blob-sequence-number" : "0", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT", + "eTag" : "0x8DA2235A8F375DE", + "x-ms-request-id" : "566070be-501e-000a-101e-54b64f000000", + "x-ms-client-request-id" : "82265123-fc89-49f7-bd0a-8ff1a225d79e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/af91d57d0af91d57d97d37086ba3cc2a17bef47e8b80/af91d57d1af91d57d97d45186007a7545fc4749e0a50?comp=snapshot", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "7db8b8fb-0314-4072-8023-3eb4941548e9" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "x-ms-snapshot" : "2022-04-19T18:51:49.0444724Z", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2235A8F375DE", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "bc5787ff-701e-0050-5d1e-54d0a8000000", + "x-ms-request-server-encrypted" : "false", + "x-ms-client-request-id" : "7db8b8fb-0314-4072-8023-3eb4941548e9", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/af91d57d0af91d57d97d37086ba3cc2a17bef47e8b80/af91d57d1af91d57d97d45186007a7545fc4749e0a50?comp=page", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "967ca417-4152-4638-bfa1-d6b9962406bd", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "kJndXV9eB1I=", + "x-ms-blob-sequence-number" : "0", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:49 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT", + "eTag" : "0x8DA2235A919BCEF", + "x-ms-request-id" : "bc578835-701e-0050-0f1e-54d0a8000000", + "x-ms-client-request-id" : "967ca417-4152-4638-bfa1-d6b9962406bd" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/af91d57d0af91d57d97d37086ba3cc2a17bef47e8b80/af91d57d1af91d57d97d45186007a7545fc4749e0a50?comp=page", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "c32048d6-ae11-4de2-8ecb-edfd030d08e2" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-sequence-number" : "0", + "eTag" : "0x8DA2235A92EC883", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:49 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "bc578854-701e-0050-2a1e-54d0a8000000", + "x-ms-client-request-id" : "c32048d6-ae11-4de2-8ecb-edfd030d08e2", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/af91d57d0af91d57d97d37086ba3cc2a17bef47e8b80/af91d57d1af91d57d97d45186007a7545fc4749e0a50?comp=page", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "014bc7bb-d9db-4887-87dc-50e42afaf46d", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "kJndXV9eB1I=", + "x-ms-blob-sequence-number" : "0", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:49 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 19 Apr 2022 18:51:49 GMT", + "eTag" : "0x8DA2235A9472EE6", + "x-ms-request-id" : "bc76e1cc-e01e-0042-7f1e-54ab78000000", + "x-ms-client-request-id" : "014bc7bb-d9db-4887-87dc-50e42afaf46d" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/af91d57d0af91d57d97d37086ba3cc2a17bef47e8b80/af91d57d1af91d57d97d45186007a7545fc4749e0a50?comp=page", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "464678a2-a307-4753-abfc-248f1a3eb91f" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-sequence-number" : "0", + "eTag" : "0x8DA2235A954C177", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:49 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e1c07a57-b01e-003d-781e-5464e3000000", + "x-ms-client-request-id" : "464678a2-a307-4753-abfc-248f1a3eb91f", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/af91d57d0af91d57d97d37086ba3cc2a17bef47e8b80/af91d57d1af91d57d97d45186007a7545fc4749e0a50?comp=pagelist&prevsnapshot=2022-04-19T18%3A51%3A49.0444724Z&maxresults=2", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "6e8b586d-1ee2-4598-a6aa-950712a63e5b" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-content-length" : "4096", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:49 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT", + "eTag" : "0x8DA2235A954C177", + "x-ms-request-id" : "11d0de8d-701e-007f-681e-54dd63000000", + "Body" : "\n01023102420472!16!MDAwMDA0ITIwNDgh", + "x-ms-client-request-id" : "6e8b586d-1ee2-4598-a6aa-950712a63e5b", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/af91d57d0af91d57d97d37086ba3cc2a17bef47e8b80/af91d57d1af91d57d97d45186007a7545fc4749e0a50?comp=pagelist&prevsnapshot=2022-04-19T18%3A51%3A49.0444724Z&marker=2%2116%21MDAwMDA0ITIwNDgh&maxresults=2", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "10c2588b-71e8-4abf-b7a7-73c47a10965b" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-content-length" : "4096", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:49 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 19 Apr 2022 18:51:49 GMT", + "eTag" : "0x8DA2235A954C177", + "x-ms-request-id" : "6b6e20dc-c01e-0037-0f1e-54c054000000", + "Body" : "\n2048307130724095", + "x-ms-client-request-id" : "10c2588b-71e8-4abf-b7a7-73c47a10965b", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/af91d57d0af91d57d97d37086ba3cc2a17bef47e8b80/af91d57d1af91d57d97d45186007a7545fc4749e0a50?comp=pagelist&prevsnapshot=2022-04-19T18%3A51%3A49.0444724Z&maxresults=2", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "c7166bff-b4a3-4001-88c3-83eec0e4c24f" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-content-length" : "4096", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:49 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 19 Apr 2022 18:51:49 GMT", + "eTag" : "0x8DA2235A954C177", + "x-ms-request-id" : "6b6e20e5-c01e-0037-161e-54c054000000", + "Body" : "\n01023102420472!16!MDAwMDA0ITIwNDgh", + "x-ms-client-request-id" : "c7166bff-b4a3-4001-88c3-83eec0e4c24f", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/af91d57d0af91d57d97d37086ba3cc2a17bef47e8b80/af91d57d1af91d57d97d45186007a7545fc4749e0a50?comp=pagelist&prevsnapshot=2022-04-19T18%3A51%3A49.0444724Z&marker=2%2116%21MDAwMDA0ITIwNDgh&maxresults=2", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "d67bfac5-47cd-4428-be49-cd43821010d8" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-content-length" : "4096", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:49 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 19 Apr 2022 18:51:50 GMT", + "eTag" : "0x8DA2235A954C177", + "x-ms-request-id" : "6b6e20f8-c01e-0037-251e-54c054000000", + "Body" : "\n2048307130724095", + "x-ms-client-request-id" : "d67bfac5-47cd-4428-be49-cd43821010d8", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "af91d57d0af91d57d97d37086ba3cc2a17bef47e8b80", "af91d57d1af91d57d97d45186007a7545fc4749e0a50", "53df858f-c108-4b4a-aba7-d202e74bc9e3", "894003b9-aa6b-4f12-92cd-776cf89847c3" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesPageSize.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesPageSize.json new file mode 100644 index 0000000000000..394c8ad13b3c7 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPageRangesPageSize.json @@ -0,0 +1,234 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/40cb28db040cb28db68090134757fbbd6b37e416e942?restype=container", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "5f649d6a-95bd-46da-b651-49d3caf0f19e" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2235A895628B", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "c6238374-701e-0022-2f1e-54d7e7000000", + "x-ms-client-request-id" : "5f649d6a-95bd-46da-b651-49d3caf0f19e", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/40cb28db040cb28db68090134757fbbd6b37e416e942/40cb28db140cb28db680286548aa80169fe92492fb8a", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "f202079c-bab4-43eb-b571-b2435b3d619f" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2235A8A4EC32", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "f8c47973-401e-0006-671e-542147000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "f202079c-bab4-43eb-b571-b2435b3d619f", + "Date" : "Tue, 19 Apr 2022 18:51:47 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/40cb28db040cb28db68090134757fbbd6b37e416e942/40cb28db140cb28db680286548aa80169fe92492fb8a", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "a438b66f-ff9f-47e8-9e23-f3a86138dc09" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2235A8B0F855", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "af756814-e01e-0030-4d1e-54ac37000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "a438b66f-ff9f-47e8-9e23-f3a86138dc09", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/40cb28db040cb28db68090134757fbbd6b37e416e942/40cb28db140cb28db680286548aa80169fe92492fb8a?comp=page", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "1d6921f7-27ba-48b5-a8c8-83b0c423f359", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "ZUKWn7q47E8=", + "x-ms-blob-sequence-number" : "0", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 19 Apr 2022 18:51:47 GMT", + "eTag" : "0x8DA2235A8BF7523", + "x-ms-request-id" : "6549daf5-301e-006e-521e-5447d7000000", + "x-ms-client-request-id" : "1d6921f7-27ba-48b5-a8c8-83b0c423f359" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/40cb28db040cb28db68090134757fbbd6b37e416e942/40cb28db140cb28db680286548aa80169fe92492fb8a?comp=page", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "3e940179-b0c4-47c0-a352-33a37d13085d" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-sequence-number" : "0", + "eTag" : "0x8DA2235A8D6071F", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "bc76e145-e01e-0042-0d1e-54ab78000000", + "x-ms-client-request-id" : "3e940179-b0c4-47c0-a352-33a37d13085d", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/40cb28db040cb28db68090134757fbbd6b37e416e942/40cb28db140cb28db680286548aa80169fe92492fb8a?comp=page", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "6b715f9d-a5c2-4f26-9a82-703fa525171a" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-sequence-number" : "0", + "eTag" : "0x8DA2235A8E483E7", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e13c8156-601e-0063-621e-548f03000000", + "x-ms-client-request-id" : "6b715f9d-a5c2-4f26-9a82-703fa525171a", + "Date" : "Tue, 19 Apr 2022 18:51:47 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/40cb28db040cb28db68090134757fbbd6b37e416e942/40cb28db140cb28db680286548aa80169fe92492fb8a?comp=pagelist&maxresults=1", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "0ce2a091-eab5-4918-8fad-f536add9362b" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-content-length" : "4096", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT", + "eTag" : "0x8DA2235A8E483E7", + "x-ms-request-id" : "bc76e171-e01e-0042-301e-54ab78000000", + "Body" : "\n010232!16!MDAwMDA0ITIwNDgh", + "x-ms-client-request-id" : "0ce2a091-eab5-4918-8fad-f536add9362b", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/40cb28db040cb28db68090134757fbbd6b37e416e942/40cb28db140cb28db680286548aa80169fe92492fb8a?comp=pagelist&marker=2%2116%21MDAwMDA0ITIwNDgh&maxresults=1", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "b14ffdf8-932a-4a99-9a15-f0d6b21e85c1" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-content-length" : "4096", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 19 Apr 2022 18:51:49 GMT", + "eTag" : "0x8DA2235A8E483E7", + "x-ms-request-id" : "6b6e20a5-c01e-0037-621e-54c054000000", + "Body" : "\n20483071", + "x-ms-client-request-id" : "b14ffdf8-932a-4a99-9a15-f0d6b21e85c1", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/40cb28db040cb28db68090134757fbbd6b37e416e942/40cb28db140cb28db680286548aa80169fe92492fb8a?comp=pagelist&maxresults=1", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "01a1745c-d044-496f-89c8-c6a3a38205a3" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-content-length" : "4096", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT", + "eTag" : "0x8DA2235A8E483E7", + "x-ms-request-id" : "11d0de17-701e-007f-7e1e-54dd63000000", + "Body" : "\n010232!16!MDAwMDA0ITIwNDgh", + "x-ms-client-request-id" : "01a1745c-d044-496f-89c8-c6a3a38205a3", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/40cb28db040cb28db68090134757fbbd6b37e416e942/40cb28db140cb28db680286548aa80169fe92492fb8a?comp=pagelist&marker=2%2116%21MDAwMDA0ITIwNDgh&maxresults=1", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "6be9914b-d266-44f4-a187-45ae8540dd11" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-content-length" : "4096", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 19 Apr 2022 18:51:49 GMT", + "eTag" : "0x8DA2235A8E483E7", + "x-ms-request-id" : "c62383fb-701e-0022-1f1e-54d7e7000000", + "Body" : "\n20483071", + "x-ms-client-request-id" : "6be9914b-d266-44f4-a187-45ae8540dd11", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "40cb28db040cb28db68090134757fbbd6b37e416e942", "40cb28db140cb28db680286548aa80169fe92492fb8a", "54dc6c24-1bb4-4167-a347-44ae82e1eeb3" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPagesContinuationToken.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPagesContinuationToken.json new file mode 100644 index 0000000000000..63448756770dc --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPagesContinuationToken.json @@ -0,0 +1,186 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/eee741060eee74106bb021714d0c9138562d74cd193a?restype=container", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "ca516e37-9ff2-4383-9709-d7d3afb63cc2" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2235A89688DB", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "bc76e0fd-e01e-0042-4d1e-54ab78000000", + "x-ms-client-request-id" : "ca516e37-9ff2-4383-9709-d7d3afb63cc2", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/eee741060eee74106bb021714d0c9138562d74cd193a/eee741061eee74106bb0710964833870bbaee480388e", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "70ebe1b9-f960-43f8-a95d-97185b509952" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2235A8A6C0A1", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a2fd9df4-701e-0032-301e-54128f000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "70ebe1b9-f960-43f8-a95d-97185b509952", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/eee741060eee74106bb021714d0c9138562d74cd193a/eee741061eee74106bb0710964833870bbaee480388e", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "49ed3041-6f55-42a7-b674-8fce8f359017" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2235A8B7D531", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "6b6e206e-c01e-0037-3b1e-54c054000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "49ed3041-6f55-42a7-b674-8fce8f359017", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/eee741060eee74106bb021714d0c9138562d74cd193a/eee741061eee74106bb0710964833870bbaee480388e?comp=page", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "66739db8-81b2-4019-a514-356d748542ec", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "fb3N3bNzkjo=", + "x-ms-blob-sequence-number" : "0", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT", + "eTag" : "0x8DA2235A8C82682", + "x-ms-request-id" : "a3b88e9b-e01e-001f-371e-54a1fc000000", + "x-ms-client-request-id" : "66739db8-81b2-4019-a514-356d748542ec" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/eee741060eee74106bb021714d0c9138562d74cd193a/eee741061eee74106bb0710964833870bbaee480388e?comp=page", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "333e17d2-f128-44b6-aab2-ecc63779e3c1" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-sequence-number" : "0", + "eTag" : "0x8DA2235A8E7DECA", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "012ae0d8-f01e-005e-521e-54f918000000", + "x-ms-client-request-id" : "333e17d2-f128-44b6-aab2-ecc63779e3c1", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/eee741060eee74106bb021714d0c9138562d74cd193a/eee741061eee74106bb0710964833870bbaee480388e?comp=page", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "a6317f02-2af7-43d4-b3d2-61cc9d7877c5" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-sequence-number" : "0", + "eTag" : "0x8DA2235A908CF84", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:49 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "455cfb23-901e-0067-7a1e-540204000000", + "x-ms-client-request-id" : "a6317f02-2af7-43d4-b3d2-61cc9d7877c5", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/eee741060eee74106bb021714d0c9138562d74cd193a/eee741061eee74106bb0710964833870bbaee480388e?comp=pagelist&maxresults=1", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "3888210e-b5f1-4783-9211-c6c5d6839729" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-content-length" : "4096", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:49 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 19 Apr 2022 18:51:49 GMT", + "eTag" : "0x8DA2235A908CF84", + "x-ms-request-id" : "566070e1-501e-000a-2f1e-54b64f000000", + "Body" : "\n010232!16!MDAwMDA0ITIwNDgh", + "x-ms-client-request-id" : "3888210e-b5f1-4783-9211-c6c5d6839729", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/eee741060eee74106bb021714d0c9138562d74cd193a/eee741061eee74106bb0710964833870bbaee480388e?comp=pagelist&marker=2%2116%21MDAwMDA0ITIwNDgh", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "175a57c9-4fdf-497e-a4c5-58ba49ea4226" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-content-length" : "4096", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:49 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT", + "eTag" : "0x8DA2235A908CF84", + "x-ms-request-id" : "38f39b09-c01e-0045-361e-54c71b000000", + "Body" : "\n20483071", + "x-ms-client-request-id" : "175a57c9-4fdf-497e-a4c5-58ba49ea4226", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "eee741060eee74106bb021714d0c9138562d74cd193a", "eee741061eee74106bb0710964833870bbaee480388e", "55af99be-9eb2-4909-ace8-4089a5ff3923" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPagesDiffContinuationToken.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPagesDiffContinuationToken.json new file mode 100644 index 0000000000000..567d4bbe68831 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPagesDiffContinuationToken.json @@ -0,0 +1,259 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/b8a9ec610b8a9ec616e912961ec63c72193c349418a4?restype=container", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "027e5e7d-1fd2-44e9-9520-33349dd20085" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2235A8D8152E", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "87d9a4aa-d01e-0066-4f1e-545dd8000000", + "x-ms-client-request-id" : "027e5e7d-1fd2-44e9-9520-33349dd20085", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/b8a9ec610b8a9ec616e912961ec63c72193c349418a4/b8a9ec611b8a9ec616e94540725e9677ade704250bd7", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "064ce95d-4710-45e6-b6aa-acad99e630bf" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2235A8E769B5", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "177fdbca-401e-0080-291e-54edfe000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "064ce95d-4710-45e6-b6aa-acad99e630bf", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/b8a9ec610b8a9ec616e912961ec63c72193c349418a4/b8a9ec611b8a9ec616e94540725e9677ade704250bd7", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "eaec15b8-ae2d-4011-895b-abca9dd30caf" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2235A8F65B9F", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e13c816a-601e-0063-721e-548f03000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "eaec15b8-ae2d-4011-895b-abca9dd30caf", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/b8a9ec610b8a9ec616e912961ec63c72193c349418a4/b8a9ec611b8a9ec616e94540725e9677ade704250bd7?comp=page", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "e002b9a8-b5a1-4e8d-bff4-006768235c5d", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "35SW8VVZK6M=", + "x-ms-blob-sequence-number" : "0", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:49 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT", + "eTag" : "0x8DA2235A916B027", + "x-ms-request-id" : "af756867-e01e-0030-161e-54ac37000000", + "x-ms-client-request-id" : "e002b9a8-b5a1-4e8d-bff4-006768235c5d" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/b8a9ec610b8a9ec616e912961ec63c72193c349418a4/b8a9ec611b8a9ec616e94540725e9677ade704250bd7?comp=snapshot", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "b7b702c8-aa68-4d2a-98ef-eb67ff2da339" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "x-ms-snapshot" : "2022-04-19T18:51:49.3782825Z", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2235A916B027", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:49 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "6549db62-301e-006e-311e-5447d7000000", + "x-ms-request-server-encrypted" : "false", + "x-ms-client-request-id" : "b7b702c8-aa68-4d2a-98ef-eb67ff2da339", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/b8a9ec610b8a9ec616e912961ec63c72193c349418a4/b8a9ec611b8a9ec616e94540725e9677ade704250bd7?comp=page", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "403fff0a-8ab0-472b-86ad-63c63c52e653", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "ABhZYLqUqUw=", + "x-ms-blob-sequence-number" : "0", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:49 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT", + "eTag" : "0x8DA2235A94C5E46", + "x-ms-request-id" : "f8c47add-401e-0006-291e-542147000000", + "x-ms-client-request-id" : "403fff0a-8ab0-472b-86ad-63c63c52e653" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/b8a9ec610b8a9ec616e912961ec63c72193c349418a4/b8a9ec611b8a9ec616e94540725e9677ade704250bd7?comp=page", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "fc933c93-6f7b-4bac-8c6f-9e7cd9b132dc" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-sequence-number" : "0", + "eTag" : "0x8DA2235A962F037", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:49 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "80a44e2f-b01e-0070-271e-54ab0f000000", + "x-ms-client-request-id" : "fc933c93-6f7b-4bac-8c6f-9e7cd9b132dc", + "Date" : "Tue, 19 Apr 2022 18:51:49 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/b8a9ec610b8a9ec616e912961ec63c72193c349418a4/b8a9ec611b8a9ec616e94540725e9677ade704250bd7?comp=page", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "dc6d42b0-f67e-442f-b373-e9e8d8b2c9c7", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "ABhZYLqUqUw=", + "x-ms-blob-sequence-number" : "0", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:49 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 19 Apr 2022 18:51:49 GMT", + "eTag" : "0x8DA2235A976C370", + "x-ms-request-id" : "b2a0ac82-001e-0038-671e-54b638000000", + "x-ms-client-request-id" : "dc6d42b0-f67e-442f-b373-e9e8d8b2c9c7" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/b8a9ec610b8a9ec616e912961ec63c72193c349418a4/b8a9ec611b8a9ec616e94540725e9677ade704250bd7?comp=page", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "13e2e080-16bb-492d-aa94-c9ca72e41731" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-sequence-number" : "0", + "eTag" : "0x8DA2235A990893E", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:49 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "b2a0aca4-001e-0038-031e-54b638000000", + "x-ms-client-request-id" : "13e2e080-16bb-492d-aa94-c9ca72e41731", + "Date" : "Tue, 19 Apr 2022 18:51:49 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/b8a9ec610b8a9ec616e912961ec63c72193c349418a4/b8a9ec611b8a9ec616e94540725e9677ade704250bd7?comp=pagelist&prevsnapshot=2022-04-19T18%3A51%3A49.3782825Z&maxresults=2", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "59c3c02b-0ac2-4aef-b4e6-2898a625b9c2" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-content-length" : "4096", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:49 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 19 Apr 2022 18:51:49 GMT", + "eTag" : "0x8DA2235A990893E", + "x-ms-request-id" : "b2a0acaf-001e-0038-0d1e-54b638000000", + "Body" : "\n01023102420472!16!MDAwMDA0ITIwNDgh", + "x-ms-client-request-id" : "59c3c02b-0ac2-4aef-b4e6-2898a625b9c2", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/b8a9ec610b8a9ec616e912961ec63c72193c349418a4/b8a9ec611b8a9ec616e94540725e9677ade704250bd7?comp=pagelist&prevsnapshot=2022-04-19T18%3A51%3A49.3782825Z&marker=2%2116%21MDAwMDA0ITIwNDgh", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "410a0df9-3705-4af0-b5df-7021b1594e8e" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-content-length" : "4096", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:49 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 19 Apr 2022 18:51:49 GMT", + "eTag" : "0x8DA2235A990893E", + "x-ms-request-id" : "b2a0accb-001e-0038-271e-54b638000000", + "Body" : "\n2048307130724095", + "x-ms-client-request-id" : "410a0df9-3705-4af0-b5df-7021b1594e8e", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "b8a9ec610b8a9ec616e912961ec63c72193c349418a4", "b8a9ec611b8a9ec616e94540725e9677ade704250bd7", "689fd499-39d9-4195-b98c-55ab29c7f711", "e8e1e929-77cd-4336-872b-979b55ddb896" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPagesDiffRange.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPagesDiffRange.json new file mode 100644 index 0000000000000..cc80cfbdb6d79 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPagesDiffRange.json @@ -0,0 +1,235 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/25b8c60a025b8c60a46d577411dff19abccd24eb0acc?restype=container", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "a585d6f0-7166-48bb-978d-aa730109f5e0" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2235A8D1C93D", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "913c1640-e01e-007d-2e1e-5463db000000", + "x-ms-client-request-id" : "a585d6f0-7166-48bb-978d-aa730109f5e0", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/25b8c60a025b8c60a46d577411dff19abccd24eb0acc/25b8c60a125b8c60a46d717431e0b84a508984726a4f", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "adfa5d1b-f7d6-4e4e-bbc2-f523c5530b0c" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2235A8DE6A52", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "455cfb05-901e-0067-601e-540204000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "adfa5d1b-f7d6-4e4e-bbc2-f523c5530b0c", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/25b8c60a025b8c60a46d577411dff19abccd24eb0acc/25b8c60a125b8c60a46d717431e0b84a508984726a4f", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "4915ce8c-c928-4ffd-af6c-6733cffe57be" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2235A8FC271E", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:49 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "00531aa0-601e-0011-1e1e-54884c000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "4915ce8c-c928-4ffd-af6c-6733cffe57be", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/25b8c60a025b8c60a46d577411dff19abccd24eb0acc/25b8c60a125b8c60a46d717431e0b84a508984726a4f?comp=page", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "3175bc4c-b318-4d12-8bc7-e06698e9b3a7", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "X69jyDlLlAw=", + "x-ms-blob-sequence-number" : "0", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:49 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT", + "eTag" : "0x8DA2235A917E874", + "x-ms-request-id" : "aba116e1-f01e-0061-401e-5431bb000000", + "x-ms-client-request-id" : "3175bc4c-b318-4d12-8bc7-e06698e9b3a7" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/25b8c60a025b8c60a46d577411dff19abccd24eb0acc/25b8c60a125b8c60a46d717431e0b84a508984726a4f?comp=snapshot", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "994ea107-d7c6-44d8-8ed5-8bac55706280" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "x-ms-snapshot" : "2022-04-19T18:51:49.2773404Z", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2235A917E874", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:49 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e1c07a24-b01e-003d-4e1e-5464e3000000", + "x-ms-request-server-encrypted" : "false", + "x-ms-client-request-id" : "994ea107-d7c6-44d8-8ed5-8bac55706280", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/25b8c60a025b8c60a46d577411dff19abccd24eb0acc/25b8c60a125b8c60a46d717431e0b84a508984726a4f?comp=page", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "aa452650-891d-4a4a-a647-3c8f86aab074", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "FtnWgDqt+WA=", + "x-ms-blob-sequence-number" : "0", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:49 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT", + "eTag" : "0x8DA2235A93F8EEA", + "x-ms-request-id" : "aba11722-f01e-0061-781e-5431bb000000", + "x-ms-client-request-id" : "aa452650-891d-4a4a-a647-3c8f86aab074" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/25b8c60a025b8c60a46d577411dff19abccd24eb0acc/25b8c60a125b8c60a46d717431e0b84a508984726a4f?comp=page", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "90b30c96-4f79-4324-a912-44b928148aec" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-sequence-number" : "0", + "eTag" : "0x8DA2235A94E59C8", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:49 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e13c81ce-601e-0063-4d1e-548f03000000", + "x-ms-client-request-id" : "90b30c96-4f79-4324-a912-44b928148aec", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/25b8c60a025b8c60a46d577411dff19abccd24eb0acc/25b8c60a125b8c60a46d717431e0b84a508984726a4f?comp=page", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "873eb0f1-dc9c-4b71-987a-a6402846539e", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "FtnWgDqt+WA=", + "x-ms-blob-sequence-number" : "0", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:49 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT", + "eTag" : "0x8DA2235A963B36E", + "x-ms-request-id" : "e13c81f2-601e-0063-671e-548f03000000", + "x-ms-client-request-id" : "873eb0f1-dc9c-4b71-987a-a6402846539e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/25b8c60a025b8c60a46d577411dff19abccd24eb0acc/25b8c60a125b8c60a46d717431e0b84a508984726a4f?comp=page", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "40af2fe1-798d-4031-b887-975eb8c87db6" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-sequence-number" : "0", + "eTag" : "0x8DA2235A9758B22", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:49 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "80a44e38-b01e-0070-2f1e-54ab0f000000", + "x-ms-client-request-id" : "40af2fe1-798d-4031-b887-975eb8c87db6", + "Date" : "Tue, 19 Apr 2022 18:51:49 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/25b8c60a025b8c60a46d577411dff19abccd24eb0acc/25b8c60a125b8c60a46d717431e0b84a508984726a4f?comp=pagelist&prevsnapshot=2022-04-19T18%3A51%3A49.2773404Z", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "5968039c-c119-46f6-8706-429bbdc0bbc2" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-content-length" : "4096", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:49 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 19 Apr 2022 18:51:49 GMT", + "eTag" : "0x8DA2235A9758B22", + "x-ms-request-id" : "80a44e48-b01e-0070-391e-54ab0f000000", + "Body" : "\n2048307130724095", + "x-ms-client-request-id" : "5968039c-c119-46f6-8706-429bbdc0bbc2", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "25b8c60a025b8c60a46d577411dff19abccd24eb0acc", "25b8c60a125b8c60a46d717431e0b84a508984726a4f", "2cb82339-bfb6-4074-9353-5014b8188e2b", "e7ebc5e9-0bf8-4051-8534-17b753d83b17" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPagesRange.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPagesRange.json new file mode 100644 index 0000000000000..8408857315e9f --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestListPagesRange.json @@ -0,0 +1,162 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/e6d332db0e6d332db405202419ee00bf580234d2e98a?restype=container", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "57aa7510-51c6-4bd8-8ea9-75fc280cf2fa" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2235A89687B5", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "80a44da0-b01e-0070-291e-54ab0f000000", + "x-ms-client-request-id" : "57aa7510-51c6-4bd8-8ea9-75fc280cf2fa", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/e6d332db0e6d332db405202419ee00bf580234d2e98a/e6d332db1e6d332db4056034401150a79a03f4a19a2a", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "395bd933-9c57-4976-9f3e-75b6eb948907" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2235A8A783DB", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "38f39a78-c01e-0045-331e-54c71b000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "395bd933-9c57-4976-9f3e-75b6eb948907", + "Date" : "Tue, 19 Apr 2022 18:51:47 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/e6d332db0e6d332db405202419ee00bf580234d2e98a/e6d332db1e6d332db4056034401150a79a03f4a19a2a", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "5cb1555b-f092-4d04-b4d7-8fee3a6f2d0c" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "eTag" : "0x8DA2235A8B1947F", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "38f39a80-c01e-0045-3b1e-54c71b000000", + "x-ms-request-server-encrypted" : "true", + "x-ms-client-request-id" : "5cb1555b-f092-4d04-b4d7-8fee3a6f2d0c", + "Date" : "Tue, 19 Apr 2022 18:51:47 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/e6d332db0e6d332db405202419ee00bf580234d2e98a/e6d332db1e6d332db4056034401150a79a03f4a19a2a?comp=page", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "6582e268-1845-421a-93a1-470fe1731b6f", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "e6CT6+IMzL0=", + "x-ms-blob-sequence-number" : "0", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT", + "eTag" : "0x8DA2235A8C7FF75", + "x-ms-request-id" : "16b6895a-601e-003e-391e-548587000000", + "x-ms-client-request-id" : "6582e268-1845-421a-93a1-470fe1731b6f" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/e6d332db0e6d332db405202419ee00bf580234d2e98a/e6d332db1e6d332db4056034401150a79a03f4a19a2a?comp=page", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "39e214d4-c2a1-422c-a036-9bc9b64178af" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-sequence-number" : "0", + "eTag" : "0x8DA2235A8DB367A", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "7877e4ef-801e-0044-091e-5498c7000000", + "x-ms-client-request-id" : "39e214d4-c2a1-422c-a036-9bc9b64178af", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.blob.core.windows.net/e6d332db0e6d332db405202419ee00bf580234d2e98a/e6d332db1e6d332db4056034401150a79a03f4a19a2a?comp=page", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "dfb8d471-9639-4870-95f4-14794ffff6fb" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-sequence-number" : "0", + "eTag" : "0x8DA2235A8EBAED6", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "8a7e4bf7-301e-001c-7a1e-544098000000", + "x-ms-client-request-id" : "dfb8d471-9639-4870-95f4-14794ffff6fb", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.blob.core.windows.net/e6d332db0e6d332db405202419ee00bf580234d2e98a/e6d332db1e6d332db4056034401150a79a03f4a19a2a?comp=pagelist", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-blob/12.17.0-beta.1 (11.0.13; Windows 10; 10.0)", + "x-ms-client-request-id" : "e2d2030f-719c-4417-a4ca-9e334d1045a0" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-content-length" : "4096", + "Last-Modified" : "Tue, 19 Apr 2022 18:51:48 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 19 Apr 2022 18:51:48 GMT", + "eTag" : "0x8DA2235A8EBAED6", + "x-ms-request-id" : "0b2319a0-601e-004c-351e-5482c8000000", + "Body" : "\n20483071", + "x-ms-client-request-id" : "e2d2030f-719c-4417-a4ca-9e334d1045a0", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "e6d332db0e6d332db405202419ee00bf580234d2e98a", "e6d332db1e6d332db4056034401150a79a03f4a19a2a", "96b6c949-a9ce-400e-8570-70750bd97298" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/swagger/README.md b/sdk/storage/azure-storage-blob/swagger/README.md index f4c4377c7fcff..695fcf14ee6ae 100644 --- a/sdk/storage/azure-storage-blob/swagger/README.md +++ b/sdk/storage/azure-storage-blob/swagger/README.md @@ -16,7 +16,7 @@ autorest --java --use:@autorest/java@4.0.x ### Code generation settings ``` yaml -input-file: https://raw.githubusercontent.com/seanmcc-msft/azure-rest-api-specs/feature/storage/copySourceTags/specification/storage/data-plane/Microsoft.BlobStorage/preview/2021-04-10/blob.json +input-file: https://raw.githubusercontent.com/seanmcc-msft/azure-rest-api-specs/95d8b1a4c972eafa176dce585c45e7e0611fb04e/specification/storage/data-plane/Microsoft.BlobStorage/preview/2021-04-10/blob.json java: true output-folder: ../ namespace: com.azure.storage.blob @@ -573,6 +573,24 @@ directive: $["x-ms-enum"].modelAsString = true; ``` +### Delete PageBlob_GetPageRanges x-ms-pageable as autorest can't recognize the itemName for this +``` yaml +directive: +- from: swagger-document + where: $["x-ms-paths"]["/{containerName}/{blob}?comp=pagelist"].get + transform: > + delete $["x-ms-pageable"]; +``` + +### Delete PageList_GetPageRangesDiff x-ms-pageable as autorest can't recognize the itemName for this +``` yaml +directive: +- from: swagger-document + where: $["x-ms-paths"]["/{containerName}/{blob}?comp=pagelist&diff"].get + transform: > + delete $["x-ms-pageable"]; +``` + ### BlobCopySourceTags expandable string enum ``` yaml directive: diff --git a/sdk/storage/azure-storage-blob/swagger/src/main/java/BlobStorageCustomization.java b/sdk/storage/azure-storage-blob/swagger/src/main/java/BlobStorageCustomization.java index 16e816aad1ad8..21731fc46d1b1 100644 --- a/sdk/storage/azure-storage-blob/swagger/src/main/java/BlobStorageCustomization.java +++ b/sdk/storage/azure-storage-blob/swagger/src/main/java/BlobStorageCustomization.java @@ -8,12 +8,15 @@ import com.azure.autorest.customization.PropertyCustomization; import org.slf4j.Logger; +import java.lang.reflect.Modifier; + /** * Customization class for Blob Storage. */ public class BlobStorageCustomization extends Customization { @Override public void customize(LibraryCustomization customization, Logger logger) { + // Implementation models customizations PackageCustomization implementationModels = customization.getPackage("com.azure.storage.blob.implementation.models"); implementationModels.getClass("BlobHierarchyListSegment").addAnnotation("@JsonDeserialize(using = com.azure.storage.blob.implementation.util.CustomHierarchicalListingDeserializer.class)"); @@ -22,6 +25,35 @@ public void customize(LibraryCustomization customization, Logger logger) { // Models customizations PackageCustomization models = customization.getPackage("com.azure.storage.blob.models"); models.getClass("PageList").addAnnotation("@JsonDeserialize(using = PageListDeserializer.class)"); + models.getClass("PageList").getMethod("getNextMarker").setModifier(Modifier.PRIVATE); + models.getClass("PageList").getMethod("setNextMarker").setModifier(Modifier.PRIVATE); + + // Add Accessor to PageList + String pageListFileName = "src/main/java/com/azure/storage/blob/models/PageList.java"; + + String fileContent = customization.getRawEditor().getFileContent(pageListFileName); + int startImportIndex = fileContent.indexOf("import com.azure.core.annotation.Fluent;") + 40; + int startStaticIndex = fileContent.indexOf("class PageList {") + 16; + String updatedFileContent = fileContent.substring(0, startImportIndex) + + "import com.azure.storage.blob.implementation.models.PageListHelper;" + + fileContent.substring(startImportIndex, startStaticIndex) + + "static {\n" + + " PageListHelper.setAccessor(new PageListHelper.PageListAccessor() {\n" + + " @Override\n" + + " public String getNextMarker(PageList pageList) {\n" + + " return pageList.getNextMarker();\n" + + " }\n" + + "\n" + + " @Override\n" + + " public PageList setNextMarker(PageList pageList, String marker) {\n" + + " return pageList.setNextMarker(marker);\n" + + " }\n" + + " });\n" + + " } " + + fileContent.substring(startStaticIndex); + + customization.getRawEditor().removeFile(pageListFileName); + customization.getRawEditor().addFile(pageListFileName, updatedFileContent); models.getClass("BlobCopySourceTags").rename("BlobCopySourceTagsMode");