> createWithResponse(PageBlobCreateOptions options, C
options.getSize(), null, null, options.getMetadata(), requestConditions.getLeaseId(),
requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(),
requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(),
- options.getSequenceNumber(), null, tagsToString(options.getTags()), options.getHeaders(),
+ options.getSequenceNumber(), null, tagsToString(options.getTags()), null, null, null, options.getHeaders(),
getCustomerProvidedKey(), encryptionScope,
context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE))
.map(rb -> {
diff --git a/sdk/storage/azure-storage-blob/swagger/README.md b/sdk/storage/azure-storage-blob/swagger/README.md
index 942b05e4aec4..2cfdc9d3b232 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/Azure/azure-rest-api-specs/storage-dataplane-preview/specification/storage/data-plane/Microsoft.BlobStorage/preview/2020-08-04/blob.json
+input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/storage-dataplane-preview/specification/storage/data-plane/Microsoft.BlobStorage/preview/2020-10-02/blob.json
java: true
output-folder: ../
namespace: com.azure.storage.blob
From c4ea5bf3390be918c89703572bdeddf6146fccdd Mon Sep 17 00:00:00 2001
From: Gauri Prasad <51212198+gapra-msft@users.noreply.github.com>
Date: Wed, 16 Jun 2021 13:32:46 -0700
Subject: [PATCH 3/9] Reenabled quick query parquet support (#21785)
---
sdk/storage/azure-storage-blob/CHANGELOG.md | 1 +
.../implementation/util/BlobQueryReader.java | 13 +-
.../models/BlobQueryParquetSerialization.java | 3 +-
.../blob/models/BlobQuerySerialization.java | 9 +-
.../blob/specialized/BlobBaseAPITest.groovy | 5 +-
.../BlobBaseAPITestQueryInputParquet.json | 135 ++++++++++++++
.../BlobBaseAPITestQueryParquetOutputIA.json | 50 +++++
.../azure-storage-file-datalake/CHANGELOG.md | 1 +
.../storage/file/datalake/Transforms.java | 19 +-
.../models/FileQueryParquetSerialization.java | 3 +-
.../models/FileQuerySerialization.java | 5 +-
.../storage/file/datalake/FileAPITest.groovy | 5 +-
.../FileAPITestQueryInputParquet.json | 172 ++++++++++++++++++
.../FileAPITestQueryParquetOutputIA.json | 47 +++++
14 files changed, 437 insertions(+), 31 deletions(-)
create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobBaseAPITestQueryInputParquet.json
create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobBaseAPITestQueryParquetOutputIA.json
create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestQueryInputParquet.json
create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestQueryParquetOutputIA.json
diff --git a/sdk/storage/azure-storage-blob/CHANGELOG.md b/sdk/storage/azure-storage-blob/CHANGELOG.md
index 4b4fb4ecbecd..235efe91476d 100644
--- a/sdk/storage/azure-storage-blob/CHANGELOG.md
+++ b/sdk/storage/azure-storage-blob/CHANGELOG.md
@@ -2,6 +2,7 @@
## 12.12.0-beta.2 (Unreleased)
- Added support for the 2020-10-02 service version.
+- Added support to specify Parquet Input Serialization when querying a blob.
## 12.12.0-beta.1 (2021-05-13)
- Added support for the 2020-08-04 service version.
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobQueryReader.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobQueryReader.java
index 8f4e6bf16d8e..e1212ef99149 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobQueryReader.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobQueryReader.java
@@ -16,6 +16,7 @@
import com.azure.storage.blob.models.BlobQueryDelimitedSerialization;
import com.azure.storage.blob.models.BlobQueryError;
import com.azure.storage.blob.models.BlobQueryJsonSerialization;
+import com.azure.storage.blob.models.BlobQueryParquetSerialization;
import com.azure.storage.blob.models.BlobQueryProgress;
import com.azure.storage.blob.models.BlobQuerySerialization;
import com.azure.storage.internal.avro.implementation.AvroConstants;
@@ -230,13 +231,12 @@ public static QuerySerialization transformInputSerialization(BlobQuerySerializat
generatedFormat.setJsonTextConfiguration(transformJson(
(BlobQueryJsonSerialization) userSerialization));
- // TODO (gapra): uncomment when parquet is released
- /*} else if (userSerialization instanceof BlobQueryParquetSerialization) {
+ } else if (userSerialization instanceof BlobQueryParquetSerialization) {
generatedFormat.setType(QueryFormatType.PARQUET);
generatedFormat.setParquetTextConfiguration(transformParquet(
(BlobQueryParquetSerialization) userSerialization));
- */
+
} else {
throw logger.logExceptionAsError(new IllegalArgumentException(
"Please see values of valid input serialization in the documentation "
@@ -323,13 +323,14 @@ private static JsonTextConfiguration transformJson(BlobQueryJsonSerialization js
* @param parquetSerialization {@link BlobQueryParquetSerialization}
* @return {@link JsonTextConfiguration}
*/
- // TODO (gapra): uncomment when parquet is released
- /*private static Object transformParquet(BlobQueryParquetSerialization parquetSerialization) {
+ private static Object transformParquet(BlobQueryParquetSerialization parquetSerialization) {
+ /* This method returns an Object since the ParquetConfiguration currently accepts no options. This results in
+ the generator generating ParquetConfiguration as an Object. */
if (parquetSerialization == null) {
return null;
}
return new Object();
- }*/
+ }
/**
* Transforms a BlobQueryArrowSerialization into a ArrowConfiguration.
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobQueryParquetSerialization.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobQueryParquetSerialization.java
index 003d6fbb74a4..e0bbe3159561 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobQueryParquetSerialization.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobQueryParquetSerialization.java
@@ -6,5 +6,4 @@
/**
* Defines the input parquet serialization for a blob quick query request.
*/
-// TODO (gapra): public when parquet is released
-class BlobQueryParquetSerialization implements BlobQuerySerialization { }
+public final class BlobQueryParquetSerialization implements BlobQuerySerialization { }
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobQuerySerialization.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobQuerySerialization.java
index 1e6cb0031968..fe0771d2fdfe 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobQuerySerialization.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobQuerySerialization.java
@@ -2,13 +2,14 @@
// Licensed under the MIT License.
package com.azure.storage.blob.models;
-// TODO (gapra): add parquet to inputs when parquet is released
+
/**
* Defines the input and output serialization for a blob quick query request.
- * either {@link BlobQueryJsonSerialization}, {@link BlobQueryDelimitedSerialization}, or
- * {@link BlobQueryArrowSerialization}.
+ * either {@link BlobQueryJsonSerialization}, {@link BlobQueryDelimitedSerialization},
+ * {@link BlobQueryArrowSerialization}, or {@link BlobQueryParquetSerialization}.
*
- * Note: {@link BlobQueryArrowSerialization} can only be used as an output.
+ * Note: {@link BlobQueryParquetSerialization} can only be used as an input and
+ * {@link BlobQueryArrowSerialization} can only be used as an output.
*
*/
public interface BlobQuerySerialization {
diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobBaseAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobBaseAPITest.groovy
index 9e21f8256764..1fb584bcfb7f 100644
--- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobBaseAPITest.groovy
+++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobBaseAPITest.groovy
@@ -301,8 +301,7 @@ class BlobBaseAPITest extends APISpec {
1000 || _
}
- @Unroll
- @Ignore /* TODO: Unignore when parquet is officially supported. */
+ @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
@Retry(count = 5, delay = 5, condition = { env.testMode == TestMode.LIVE })
def "Query Input parquet"() {
setup:
@@ -722,7 +721,7 @@ class BlobBaseAPITest extends APISpec {
thrown(IllegalArgumentException)
}
- @Ignore /* TODO: Unignore when parquet is officially supported. */
+ @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
@Retry(count = 5, delay = 5, condition = { env.testMode == TestMode.LIVE })
def "Query parquet output IA"() {
setup:
diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobBaseAPITestQueryInputParquet.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobBaseAPITestQueryInputParquet.json
new file mode 100644
index 000000000000..217179668d06
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobBaseAPITestQueryInputParquet.json
@@ -0,0 +1,135 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.preprod.core.windows.net/64420e75064420e75a361102414ce4cb291ed4999822?restype=container",
+ "Headers" : {
+ "x-ms-version" : "2020-08-04",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "661d0441-4472-4d22-9970-a9fdd2558da5"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-08-04",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D925EAE1F5D7F4",
+ "Last-Modified" : "Wed, 02 Jun 2021 17:21:39 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "2122760e-f01e-000d-4fd3-572003000000",
+ "x-ms-client-request-id" : "661d0441-4472-4d22-9970-a9fdd2558da5",
+ "Date" : "Wed, 02 Jun 2021 17:21:38 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.preprod.core.windows.net/64420e75064420e75a361102414ce4cb291ed4999822/64420e75164420e75a3643999d1fa0d3cf6dd4399805",
+ "Headers" : {
+ "x-ms-version" : "2020-08-04",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "5148c49d-a919-41ea-bac5-a1751190cfcd",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-08-04",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-content-crc64" : "AAAAAAAAAAA=",
+ "Last-Modified" : "Wed, 02 Jun 2021 17:21:39 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Wed, 02 Jun 2021 17:21:38 GMT",
+ "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==",
+ "eTag" : "0x8D925EAE235A6A4",
+ "x-ms-request-id" : "21227632-f01e-000d-68d3-572003000000",
+ "x-ms-client-request-id" : "5148c49d-a919-41ea-bac5-a1751190cfcd"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.preprod.core.windows.net/64420e75064420e75a361102414ce4cb291ed4999822/64420e75164420e75a3643999d1fa0d3cf6dd4399805",
+ "Headers" : {
+ "x-ms-version" : "2020-08-04",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "e524adfb-77b9-4e64-a979-c292bd9be1bc",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-08-04",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-content-crc64" : "f7IDcRFZujI=",
+ "Last-Modified" : "Wed, 02 Jun 2021 17:21:39 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Wed, 02 Jun 2021 17:21:39 GMT",
+ "Content-MD5" : "z1EKaBGYeFFPXcMBK90K+w==",
+ "eTag" : "0x8D925EAE25A4C5C",
+ "x-ms-request-id" : "21227636-f01e-000d-6cd3-572003000000",
+ "x-ms-client-request-id" : "e524adfb-77b9-4e64-a979-c292bd9be1bc"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "POST",
+ "Uri" : "https://REDACTED.blob.preprod.core.windows.net/64420e75064420e75a361102414ce4cb291ed4999822/64420e75164420e75a3643999d1fa0d3cf6dd4399805?comp=query",
+ "Headers" : {
+ "x-ms-version" : "2020-08-04",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "5f0d84c5-e629-4fd5-bcdf-c504b26c30dd",
+ "Content-Type" : "application/xml"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-lease-status" : "unlocked",
+ "x-ms-version" : "2020-08-04",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-lease-state" : "available",
+ "Last-Modified" : "Wed, 02 Jun 2021 17:21:39 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "Date" : "Wed, 02 Jun 2021 17:21:39 GMT",
+ "x-ms-blob-type" : "BlockBlob",
+ "Accept-Ranges" : "bytes",
+ "x-ms-server-encrypted" : "true",
+ "x-ms-creation-time" : "Wed, 02 Jun 2021 17:21:39 GMT",
+ "eTag" : "0x8D925EAE25A4C5C",
+ "x-ms-request-id" : "21227648-f01e-000d-7cd3-572003000000",
+ "Body" : "T2JqAQIWYXZyby5zY2hlbWHOHlsKICB7CiAgICAidHlwZSI6ICJyZWNvcmQiLAogICAgIm5hbWUiOiAiY29tLm1pY3Jvc29mdC5henVyZS5zdG9yYWdlLnF1ZXJ5QmxvYkNvbnRlbnRzLnJlc3VsdERhdGEiLAogICAgImRvYyI6ICJIb2xkcyByZXN1bHQgZGF0YSBpbiB0aGUgZm9ybWF0IHNwZWNpZmllZCBmb3IgdGhpcyBxdWVyeSAoQ1NWLCBKU09OLCBldGMuKS4iLAogICAgImZpZWxkcyI6IFsKICAgICAgewogICAgICAgICJuYW1lIjogImRhdGEiLAogICAgICAgICJ0eXBlIjogImJ5dGVzIgogICAgICB9CiAgICBdCiAgfSwKICB7CiAgICAidHlwZSI6ICJyZWNvcmQiLAogICAgIm5hbWUiOiAiY29tLm1pY3Jvc29mdC5henVyZS5zdG9yYWdlLnF1ZXJ5QmxvYkNvbnRlbnRzLmVycm9yIiwKICAgICJkb2MiOiAiQW4gZXJyb3IgdGhhdCBvY2N1cnJlZCB3aGlsZSBwcm9jZXNzaW5nIHRoZSBxdWVyeS4iLAogICAgImZpZWxkcyI6IFsKICAgICAgewogICAgICAgICJuYW1lIjogImZhdGFsIiwKICAgICAgICAidHlwZSI6ICJib29sZWFuIiwKICAgICAgICAiZG9jIjogIklmIHRydWUsIHRoaXMgZXJyb3IgcHJldmVudHMgZnVydGhlciBxdWVyeSBwcm9jZXNzaW5nLiAgTW9yZSByZXN1bHQgZGF0YSBtYXkgYmUgcmV0dXJuZWQsIGJ1dCB0aGVyZSBpcyBubyBndWFyYW50ZWUgdGhhdCBhbGwgb2YgdGhlIG9yaWdpbmFsIGRhdGEgd2lsbCBiZSBwcm9jZXNzZWQuICBJZiBmYWxzZSwgdGhpcyBlcnJvciBkb2VzIG5vdCBwcmV2ZW50IGZ1cnRoZXIgcXVlcnkgcHJvY2Vzc2luZy4iCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAibmFtZSI6ICJuYW1lIiwKICAgICAgICAidHlwZSI6ICJzdHJpbmciLAogICAgICAgICJkb2MiOiAiVGhlIG5hbWUgb2YgdGhlIGVycm9yIgogICAgICB9LAogICAgICB7CiAgICAgICAgIm5hbWUiOiAiZGVzY3JpcHRpb24iLAogICAgICAgICJ0eXBlIjogInN0cmluZyIsCiAgICAgICAgImRvYyI6ICJBIGRlc2NyaXB0aW9uIG9mIHRoZSBlcnJvciIKICAgICAgfSwKICAgICAgewogICAgICAgICJuYW1lIjogInBvc2l0aW9uIiwKICAgICAgICAidHlwZSI6ICJsb25nIiwKICAgICAgICAiZG9jIjogIlRoZSByZWNvcmQgb2Zmc2V0IGluIHRoZSBibG9iIGF0IHdoaWNoIHRoZSBlcnJvciBvY2N1cnJlZCIKICAgICAgfQogICAgXQogIH0sCiAgewogICAgInR5cGUiOiAicmVjb3JkIiwKICAgICJuYW1lIjogImNvbS5taWNyb3NvZnQuYXp1cmUuc3RvcmFnZS5xdWVyeUJsb2JDb250ZW50cy5wcm9ncmVzcyIsCiAgICAiZG9jIjogIkluZm9ybWF0aW9uIGFib3V0IHRoZSBwcm9ncmVzcyBvZiB0aGUgcXVlcnkiLAogICAgImZpZWxkcyI6IFsKICAgICAgewogICAgICAgICJuYW1lIjogImJ5dGVzU2Nhbm5lZCIsCiAgICAgICAgInR5cGUiOiAibG9uZyIsCiAgICAgICAgImRvYyI6ICJUaGUgbnVtYmVyIG9mIGJ5dGVzIHRoYXQgaGF2ZSBiZWVuIHNjYW5uZWQiCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAibmFtZSI6ICJ0b3RhbEJ5dGVzIiwKICAgICAgICAidHlwZSI6ICJsb25nIiwKICAgICAgICAiZG9jIjogIlRoZSB0b3RhbCBudW1iZXIgb2YgYnl0ZXMgdG8gYmUgc2Nhbm5lZCBpbiB0aGlzIHF1ZXJ5IgogICAgICB9CiAgICBdCiAgfSwKICB7CiAgICAidHlwZSI6ICJyZWNvcmQiLAogICAgIm5hbWUiOiAiY29tLm1pY3Jvc29mdC5henVyZS5zdG9yYWdlLnF1ZXJ5QmxvYkNvbnRlbnRzLmVuZCIsCiAgICAiZG9jIjogIlNlbnQgYXMgdGhlIGZpbmFsIG1lc3NhZ2Ugb2YgdGhlIHJlc3BvbnNlLCBpbmRpY2F0aW5nIHRoYXQgYWxsIHJlc3VsdHMgaGF2ZSBiZWVuIHNlbnQuIiwKICAgICJmaWVsZHMiOiBbCiAgICAgIHsKICAgICAgICAibmFtZSI6ICJ0b3RhbEJ5dGVzIiwKICAgICAgICAidHlwZSI6ICJsb25nIiwKICAgICAgICAiZG9jIjogIlRoZSB0b3RhbCBudW1iZXIgb2YgYnl0ZXMgc2Nhbm5lZCBpbiB0aGlzIHF1ZXJ5IgogICAgICB9CiAgICBdCiAgfQpdCgB1tyw2OJWZRJNiBWZH4hs1AjwAODAsbWRpZmp0NTUuZWEzLG1kaWZqdDU1LmVhMwp1tyw2OJWZRJNiBWZH4hs1Ag4Ewu4EruMJdbcsNjiVmUSTYgVmR+IbNQIIBq7jCXW3LDY4lZlEk2IFZkfiGzU=",
+ "x-ms-client-request-id" : "5f0d84c5-e629-4fd5-bcdf-c504b26c30dd",
+ "Content-Type" : "avro/binary"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "POST",
+ "Uri" : "https://REDACTED.blob.preprod.core.windows.net/64420e75064420e75a361102414ce4cb291ed4999822/64420e75164420e75a3643999d1fa0d3cf6dd4399805?comp=query",
+ "Headers" : {
+ "x-ms-version" : "2020-08-04",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "f2a3b769-163e-4519-beb4-938c92e65de9",
+ "Content-Type" : "application/xml"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-lease-status" : "unlocked",
+ "x-ms-version" : "2020-08-04",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-lease-state" : "available",
+ "Last-Modified" : "Wed, 02 Jun 2021 17:21:39 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "Date" : "Wed, 02 Jun 2021 17:21:40 GMT",
+ "x-ms-blob-type" : "BlockBlob",
+ "Accept-Ranges" : "bytes",
+ "x-ms-server-encrypted" : "true",
+ "x-ms-creation-time" : "Wed, 02 Jun 2021 17:21:39 GMT",
+ "eTag" : "0x8D925EAE25A4C5C",
+ "x-ms-request-id" : "21227681-f01e-000d-26d3-572003000000",
+ "Body" : "T2JqAQIWYXZyby5zY2hlbWHOHlsKICB7CiAgICAidHlwZSI6ICJyZWNvcmQiLAogICAgIm5hbWUiOiAiY29tLm1pY3Jvc29mdC5henVyZS5zdG9yYWdlLnF1ZXJ5QmxvYkNvbnRlbnRzLnJlc3VsdERhdGEiLAogICAgImRvYyI6ICJIb2xkcyByZXN1bHQgZGF0YSBpbiB0aGUgZm9ybWF0IHNwZWNpZmllZCBmb3IgdGhpcyBxdWVyeSAoQ1NWLCBKU09OLCBldGMuKS4iLAogICAgImZpZWxkcyI6IFsKICAgICAgewogICAgICAgICJuYW1lIjogImRhdGEiLAogICAgICAgICJ0eXBlIjogImJ5dGVzIgogICAgICB9CiAgICBdCiAgfSwKICB7CiAgICAidHlwZSI6ICJyZWNvcmQiLAogICAgIm5hbWUiOiAiY29tLm1pY3Jvc29mdC5henVyZS5zdG9yYWdlLnF1ZXJ5QmxvYkNvbnRlbnRzLmVycm9yIiwKICAgICJkb2MiOiAiQW4gZXJyb3IgdGhhdCBvY2N1cnJlZCB3aGlsZSBwcm9jZXNzaW5nIHRoZSBxdWVyeS4iLAogICAgImZpZWxkcyI6IFsKICAgICAgewogICAgICAgICJuYW1lIjogImZhdGFsIiwKICAgICAgICAidHlwZSI6ICJib29sZWFuIiwKICAgICAgICAiZG9jIjogIklmIHRydWUsIHRoaXMgZXJyb3IgcHJldmVudHMgZnVydGhlciBxdWVyeSBwcm9jZXNzaW5nLiAgTW9yZSByZXN1bHQgZGF0YSBtYXkgYmUgcmV0dXJuZWQsIGJ1dCB0aGVyZSBpcyBubyBndWFyYW50ZWUgdGhhdCBhbGwgb2YgdGhlIG9yaWdpbmFsIGRhdGEgd2lsbCBiZSBwcm9jZXNzZWQuICBJZiBmYWxzZSwgdGhpcyBlcnJvciBkb2VzIG5vdCBwcmV2ZW50IGZ1cnRoZXIgcXVlcnkgcHJvY2Vzc2luZy4iCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAibmFtZSI6ICJuYW1lIiwKICAgICAgICAidHlwZSI6ICJzdHJpbmciLAogICAgICAgICJkb2MiOiAiVGhlIG5hbWUgb2YgdGhlIGVycm9yIgogICAgICB9LAogICAgICB7CiAgICAgICAgIm5hbWUiOiAiZGVzY3JpcHRpb24iLAogICAgICAgICJ0eXBlIjogInN0cmluZyIsCiAgICAgICAgImRvYyI6ICJBIGRlc2NyaXB0aW9uIG9mIHRoZSBlcnJvciIKICAgICAgfSwKICAgICAgewogICAgICAgICJuYW1lIjogInBvc2l0aW9uIiwKICAgICAgICAidHlwZSI6ICJsb25nIiwKICAgICAgICAiZG9jIjogIlRoZSByZWNvcmQgb2Zmc2V0IGluIHRoZSBibG9iIGF0IHdoaWNoIHRoZSBlcnJvciBvY2N1cnJlZCIKICAgICAgfQogICAgXQogIH0sCiAgewogICAgInR5cGUiOiAicmVjb3JkIiwKICAgICJuYW1lIjogImNvbS5taWNyb3NvZnQuYXp1cmUuc3RvcmFnZS5xdWVyeUJsb2JDb250ZW50cy5wcm9ncmVzcyIsCiAgICAiZG9jIjogIkluZm9ybWF0aW9uIGFib3V0IHRoZSBwcm9ncmVzcyBvZiB0aGUgcXVlcnkiLAogICAgImZpZWxkcyI6IFsKICAgICAgewogICAgICAgICJuYW1lIjogImJ5dGVzU2Nhbm5lZCIsCiAgICAgICAgInR5cGUiOiAibG9uZyIsCiAgICAgICAgImRvYyI6ICJUaGUgbnVtYmVyIG9mIGJ5dGVzIHRoYXQgaGF2ZSBiZWVuIHNjYW5uZWQiCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAibmFtZSI6ICJ0b3RhbEJ5dGVzIiwKICAgICAgICAidHlwZSI6ICJsb25nIiwKICAgICAgICAiZG9jIjogIlRoZSB0b3RhbCBudW1iZXIgb2YgYnl0ZXMgdG8gYmUgc2Nhbm5lZCBpbiB0aGlzIHF1ZXJ5IgogICAgICB9CiAgICBdCiAgfSwKICB7CiAgICAidHlwZSI6ICJyZWNvcmQiLAogICAgIm5hbWUiOiAiY29tLm1pY3Jvc29mdC5henVyZS5zdG9yYWdlLnF1ZXJ5QmxvYkNvbnRlbnRzLmVuZCIsCiAgICAiZG9jIjogIlNlbnQgYXMgdGhlIGZpbmFsIG1lc3NhZ2Ugb2YgdGhlIHJlc3BvbnNlLCBpbmRpY2F0aW5nIHRoYXQgYWxsIHJlc3VsdHMgaGF2ZSBiZWVuIHNlbnQuIiwKICAgICJmaWVsZHMiOiBbCiAgICAgIHsKICAgICAgICAibmFtZSI6ICJ0b3RhbEJ5dGVzIiwKICAgICAgICAidHlwZSI6ICJsb25nIiwKICAgICAgICAiZG9jIjogIlRoZSB0b3RhbCBudW1iZXIgb2YgYnl0ZXMgc2Nhbm5lZCBpbiB0aGlzIHF1ZXJ5IgogICAgICB9CiAgICBdCiAgfQpdCgAurSZmO/tGT5JVIrK8ppBbAjwAODAsbWRpZmp0NTUuZWEzLG1kaWZqdDU1LmVhMwourSZmO/tGT5JVIrK8ppBbAg4Ewu4EruMJLq0mZjv7Rk+SVSKyvKaQWwIIBq7jCS6tJmY7+0ZPklUisrymkFs=",
+ "x-ms-client-request-id" : "f2a3b769-163e-4519-beb4-938c92e65de9",
+ "Content-Type" : "avro/binary"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "64420e75064420e75a361102414ce4cb291ed4999822", "64420e75164420e75a3643999d1fa0d3cf6dd4399805" ]
+}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobBaseAPITestQueryParquetOutputIA.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobBaseAPITestQueryParquetOutputIA.json
new file mode 100644
index 000000000000..589250f1a4a4
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobBaseAPITestQueryParquetOutputIA.json
@@ -0,0 +1,50 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.preprod.core.windows.net/4708d6d404708d6d4218150164fd49970ca454f7198b?restype=container",
+ "Headers" : {
+ "x-ms-version" : "2020-08-04",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "0dea9a47-11b5-47f4-ada6-5b4bd2f388dc"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-08-04",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D925EAF70EE1C8",
+ "Last-Modified" : "Wed, 02 Jun 2021 17:22:14 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "cd0a813b-101e-0007-79d3-57398a000000",
+ "x-ms-client-request-id" : "0dea9a47-11b5-47f4-ada6-5b4bd2f388dc",
+ "Date" : "Wed, 02 Jun 2021 17:22:14 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.preprod.core.windows.net/4708d6d404708d6d4218150164fd49970ca454f7198b/4708d6d414708d6d421811428d4b9cc7e47884b4ba99",
+ "Headers" : {
+ "x-ms-version" : "2020-08-04",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "4cd98491-bdf3-436c-b760-fe94e8f9e962",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-08-04",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-content-crc64" : "AAAAAAAAAAA=",
+ "Last-Modified" : "Wed, 02 Jun 2021 17:22:15 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Wed, 02 Jun 2021 17:22:14 GMT",
+ "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==",
+ "eTag" : "0x8D925EAF74618D1",
+ "x-ms-request-id" : "cd0a8150-101e-0007-06d3-57398a000000",
+ "x-ms-client-request-id" : "4cd98491-bdf3-436c-b760-fe94e8f9e962"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "4708d6d404708d6d4218150164fd49970ca454f7198b", "4708d6d414708d6d421811428d4b9cc7e47884b4ba99" ]
+}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-file-datalake/CHANGELOG.md b/sdk/storage/azure-storage-file-datalake/CHANGELOG.md
index 5f7d2afa045f..86d8bd919157 100644
--- a/sdk/storage/azure-storage-file-datalake/CHANGELOG.md
+++ b/sdk/storage/azure-storage-file-datalake/CHANGELOG.md
@@ -2,6 +2,7 @@
## 12.6.0-beta.2 (Unreleased)
- Added support for the 2020-10-02 service version.
+- Added support to specify Parquet Input Serialization when querying a file.
## 12.6.0-beta.1 (2021-05-13)
- Added support for the 2020-08-04 service version.
diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/Transforms.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/Transforms.java
index df60063c4a83..955fcdb9780d 100644
--- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/Transforms.java
+++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/Transforms.java
@@ -25,6 +25,7 @@
import com.azure.storage.blob.models.BlobQueryError;
import com.azure.storage.blob.models.BlobQueryHeaders;
import com.azure.storage.blob.models.BlobQueryJsonSerialization;
+import com.azure.storage.blob.models.BlobQueryParquetSerialization;
import com.azure.storage.blob.models.BlobQueryProgress;
import com.azure.storage.blob.models.BlobQueryResponse;
import com.azure.storage.blob.models.BlobQuerySerialization;
@@ -60,6 +61,7 @@
import com.azure.storage.file.datalake.models.FileQueryError;
import com.azure.storage.file.datalake.models.FileQueryHeaders;
import com.azure.storage.file.datalake.models.FileQueryJsonSerialization;
+import com.azure.storage.file.datalake.models.FileQueryParquetSerialization;
import com.azure.storage.file.datalake.models.FileQueryProgress;
import com.azure.storage.file.datalake.models.FileQueryResponse;
import com.azure.storage.file.datalake.models.FileQuerySerialization;
@@ -94,6 +96,11 @@
class Transforms {
+ private static final String SERIALIZATION_MESSAGE = String.format("'serialization' must be one of %s, %s, %s or "
+ + "%s.", FileQueryJsonSerialization.class.getSimpleName(),
+ FileQueryDelimitedSerialization.class.getSimpleName(), FileQueryArrowSerialization.class.getSimpleName(),
+ FileQueryParquetSerialization.class.getSimpleName());
+
static com.azure.storage.blob.models.PublicAccessType toBlobPublicAccessType(PublicAccessType
fileSystemPublicAccessType) {
if (fileSystemPublicAccessType == null) {
@@ -444,16 +451,10 @@ static BlobQuerySerialization toBlobQuerySerialization(FileQuerySerialization se
} else if (ser instanceof FileQueryArrowSerialization) {
FileQueryArrowSerialization arrSer = (FileQueryArrowSerialization) ser;
return new BlobQueryArrowSerialization().setSchema(toBlobQueryArrowSchema(arrSer.getSchema()));
- // TODO (gapra): uncomment when parquet is released
- /*} else if (ser instanceof FileQueryParquetSerialization) {
- return new BlobQueryParquetSerialization(); */
+ } else if (ser instanceof FileQueryParquetSerialization) {
+ return new BlobQueryParquetSerialization();
} else {
- throw new IllegalArgumentException(
- String.format("'serialization' must be one of %s, %s, or %s",
- FileQueryJsonSerialization.class.getSimpleName(),
- FileQueryDelimitedSerialization.class.getSimpleName(),
- FileQueryArrowSerialization.class.getSimpleName()
- /*FileQueryParquetSerialization.class.getSimpleName()*/));
+ throw new IllegalArgumentException(SERIALIZATION_MESSAGE);
}
}
diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FileQueryParquetSerialization.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FileQueryParquetSerialization.java
index 5d8cc5597210..72f960e11275 100644
--- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FileQueryParquetSerialization.java
+++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FileQueryParquetSerialization.java
@@ -6,5 +6,4 @@
/**
* Defines the input parquet serialization for a file quick query request.
*/
-// TODO (gapra): public when parquet is released
-class FileQueryParquetSerialization implements FileQuerySerialization { }
+public final class FileQueryParquetSerialization implements FileQuerySerialization { }
diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FileQuerySerialization.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FileQuerySerialization.java
index 0b5f12eeedc7..7cdff347b771 100644
--- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FileQuerySerialization.java
+++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FileQuerySerialization.java
@@ -7,9 +7,10 @@
/**
* Defines the input and output serialization for a file quick query request.
* either {@link FileQueryJsonSerialization}, {@link FileQueryDelimitedSerialization},
- * {@link FileQueryArrowSerialization}.
+ * {@link FileQueryArrowSerialization}, or {@link FileQueryParquetSerialization}.
*
- * Note: {@link FileQueryArrowSerialization} can only be used as an output.
+ * Note: {@link FileQueryParquetSerialization} can only be used as an input and
+ * {@link FileQueryArrowSerialization} can only be used as an output.
*
*/
public interface FileQuerySerialization {
diff --git a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileAPITest.groovy b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileAPITest.groovy
index 06ae54733b87..1c76d390ee2d 100644
--- a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileAPITest.groovy
+++ b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileAPITest.groovy
@@ -3167,8 +3167,7 @@ class FileAPITest extends APISpec {
1000 | '\n' || _
}
- @Unroll
- @Ignore /* TODO: Unignore when parquet is officially supported. */
+ @RequiredServiceVersion(clazz = DataLakeServiceVersion.class, min = "V2020_10_02")
@Retry(count = 5, delay = 5, condition = { env.testMode == TestMode.LIVE })
def "Query Input parquet"() {
setup:
@@ -3555,7 +3554,7 @@ class FileAPITest extends APISpec {
thrown(IllegalArgumentException)
}
- @Ignore /* TODO: Unignore when parquet is officially supported. */
+ @RequiredServiceVersion(clazz = DataLakeServiceVersion.class, min = "V2020_10_02")
@Retry(count = 5, delay = 5, condition = { env.testMode == TestMode.LIVE })
def "Query parquet output IA"() {
setup:
diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestQueryInputParquet.json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestQueryInputParquet.json
new file mode 100644
index 000000000000..c4ba2ca7c229
--- /dev/null
+++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestQueryInputParquet.json
@@ -0,0 +1,172 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.preprod.core.windows.net/0552dd5300552dd53f1815453da38e28aaeb04c77914?restype=container",
+ "Headers" : {
+ "x-ms-version" : "2020-08-04",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 azsdk-java-azure-storage-file-datalake/12.6.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "6a5679c1-2c62-4f4f-806e-4851e55e4162"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-08-04",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D925EAAF3AC0F7",
+ "Last-Modified" : "Wed, 02 Jun 2021 17:20:14 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "411db120-601e-0003-35d3-57cc08000000",
+ "x-ms-client-request-id" : "6a5679c1-2c62-4f4f-806e-4851e55e4162",
+ "Date" : "Wed, 02 Jun 2021 17:20:13 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.dfs.preprod.core.windows.net/0552dd5300552dd53f1815453da38e28aaeb04c77914/0552dd5310552dd53f1875385a60d53559cbf4589a0c?resource=file",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.6.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "bc94d4e4-057b-4cd0-8bef-dd9df04c2521"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D925EAAFC0E323",
+ "Last-Modified" : "Wed, 02 Jun 2021 17:20:15 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "x-ms-request-id" : "3a459b5a-e01f-0012-77d3-57fb13000000",
+ "x-ms-client-request-id" : "bc94d4e4-057b-4cd0-8bef-dd9df04c2521",
+ "Date" : "Wed, 02 Jun 2021 17:20:14 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.dfs.preprod.core.windows.net/0552dd5300552dd53f1815453da38e28aaeb04c77914/0552dd5310552dd53f1875385a60d53559cbf4589a0c?resource=file",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.6.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "0324fd53-2a79-405b-bd86-c778fc7e70e5"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D925EAAFE4C55C",
+ "Last-Modified" : "Wed, 02 Jun 2021 17:20:15 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "x-ms-request-id" : "3a459b5b-e01f-0012-78d3-57fb13000000",
+ "x-ms-client-request-id" : "0324fd53-2a79-405b-bd86-c778fc7e70e5",
+ "Date" : "Wed, 02 Jun 2021 17:20:14 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PATCH",
+ "Uri" : "https://REDACTED.dfs.preprod.core.windows.net/0552dd5300552dd53f1815453da38e28aaeb04c77914/0552dd5310552dd53f1875385a60d53559cbf4589a0c?action=append&position=0",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.6.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "9e4bafc1-3cfc-4a2a-9563-e1ad3e6015fd",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0",
+ "retry-after" : "0",
+ "StatusCode" : "202",
+ "x-ms-request-server-encrypted" : "true",
+ "x-ms-request-id" : "3a459b5c-e01f-0012-79d3-57fb13000000",
+ "x-ms-client-request-id" : "9e4bafc1-3cfc-4a2a-9563-e1ad3e6015fd",
+ "Date" : "Wed, 02 Jun 2021 17:20:15 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PATCH",
+ "Uri" : "https://REDACTED.dfs.preprod.core.windows.net/0552dd5300552dd53f1815453da38e28aaeb04c77914/0552dd5310552dd53f1875385a60d53559cbf4589a0c?action=flush&position=80087&retainUncommittedData=false&close=false",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.6.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "cc313fc1-f998-43c8-af4d-4243bf0efab5"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D925EAB023AE92",
+ "Last-Modified" : "Wed, 02 Jun 2021 17:20:15 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-request-server-encrypted" : "false",
+ "x-ms-request-id" : "3a459b5d-e01f-0012-7ad3-57fb13000000",
+ "x-ms-client-request-id" : "cc313fc1-f998-43c8-af4d-4243bf0efab5",
+ "Date" : "Wed, 02 Jun 2021 17:20:15 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "POST",
+ "Uri" : "https://REDACTED.blob.preprod.core.windows.net/0552dd5300552dd53f1815453da38e28aaeb04c77914/0552dd5310552dd53f1875385a60d53559cbf4589a0c?comp=query",
+ "Headers" : {
+ "x-ms-version" : "2020-08-04",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 azsdk-java-azure-storage-file-datalake/12.6.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "86bbabe8-592a-4ba8-a947-da8e2d28cb44",
+ "Content-Type" : "application/xml"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-lease-status" : "unlocked",
+ "x-ms-version" : "2020-08-04",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-lease-state" : "available",
+ "Last-Modified" : "Wed, 02 Jun 2021 17:20:15 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "Date" : "Wed, 02 Jun 2021 17:20:15 GMT",
+ "x-ms-blob-type" : "BlockBlob",
+ "Accept-Ranges" : "bytes",
+ "x-ms-server-encrypted" : "true",
+ "x-ms-creation-time" : "Wed, 02 Jun 2021 17:20:15 GMT",
+ "eTag" : "0x8D925EAB023AE92",
+ "x-ms-request-id" : "411db193-601e-0003-04d3-57cc08000000",
+ "Body" : "T2JqAQIWYXZyby5zY2hlbWHOHlsKICB7CiAgICAidHlwZSI6ICJyZWNvcmQiLAogICAgIm5hbWUiOiAiY29tLm1pY3Jvc29mdC5henVyZS5zdG9yYWdlLnF1ZXJ5QmxvYkNvbnRlbnRzLnJlc3VsdERhdGEiLAogICAgImRvYyI6ICJIb2xkcyByZXN1bHQgZGF0YSBpbiB0aGUgZm9ybWF0IHNwZWNpZmllZCBmb3IgdGhpcyBxdWVyeSAoQ1NWLCBKU09OLCBldGMuKS4iLAogICAgImZpZWxkcyI6IFsKICAgICAgewogICAgICAgICJuYW1lIjogImRhdGEiLAogICAgICAgICJ0eXBlIjogImJ5dGVzIgogICAgICB9CiAgICBdCiAgfSwKICB7CiAgICAidHlwZSI6ICJyZWNvcmQiLAogICAgIm5hbWUiOiAiY29tLm1pY3Jvc29mdC5henVyZS5zdG9yYWdlLnF1ZXJ5QmxvYkNvbnRlbnRzLmVycm9yIiwKICAgICJkb2MiOiAiQW4gZXJyb3IgdGhhdCBvY2N1cnJlZCB3aGlsZSBwcm9jZXNzaW5nIHRoZSBxdWVyeS4iLAogICAgImZpZWxkcyI6IFsKICAgICAgewogICAgICAgICJuYW1lIjogImZhdGFsIiwKICAgICAgICAidHlwZSI6ICJib29sZWFuIiwKICAgICAgICAiZG9jIjogIklmIHRydWUsIHRoaXMgZXJyb3IgcHJldmVudHMgZnVydGhlciBxdWVyeSBwcm9jZXNzaW5nLiAgTW9yZSByZXN1bHQgZGF0YSBtYXkgYmUgcmV0dXJuZWQsIGJ1dCB0aGVyZSBpcyBubyBndWFyYW50ZWUgdGhhdCBhbGwgb2YgdGhlIG9yaWdpbmFsIGRhdGEgd2lsbCBiZSBwcm9jZXNzZWQuICBJZiBmYWxzZSwgdGhpcyBlcnJvciBkb2VzIG5vdCBwcmV2ZW50IGZ1cnRoZXIgcXVlcnkgcHJvY2Vzc2luZy4iCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAibmFtZSI6ICJuYW1lIiwKICAgICAgICAidHlwZSI6ICJzdHJpbmciLAogICAgICAgICJkb2MiOiAiVGhlIG5hbWUgb2YgdGhlIGVycm9yIgogICAgICB9LAogICAgICB7CiAgICAgICAgIm5hbWUiOiAiZGVzY3JpcHRpb24iLAogICAgICAgICJ0eXBlIjogInN0cmluZyIsCiAgICAgICAgImRvYyI6ICJBIGRlc2NyaXB0aW9uIG9mIHRoZSBlcnJvciIKICAgICAgfSwKICAgICAgewogICAgICAgICJuYW1lIjogInBvc2l0aW9uIiwKICAgICAgICAidHlwZSI6ICJsb25nIiwKICAgICAgICAiZG9jIjogIlRoZSByZWNvcmQgb2Zmc2V0IGluIHRoZSBibG9iIGF0IHdoaWNoIHRoZSBlcnJvciBvY2N1cnJlZCIKICAgICAgfQogICAgXQogIH0sCiAgewogICAgInR5cGUiOiAicmVjb3JkIiwKICAgICJuYW1lIjogImNvbS5taWNyb3NvZnQuYXp1cmUuc3RvcmFnZS5xdWVyeUJsb2JDb250ZW50cy5wcm9ncmVzcyIsCiAgICAiZG9jIjogIkluZm9ybWF0aW9uIGFib3V0IHRoZSBwcm9ncmVzcyBvZiB0aGUgcXVlcnkiLAogICAgImZpZWxkcyI6IFsKICAgICAgewogICAgICAgICJuYW1lIjogImJ5dGVzU2Nhbm5lZCIsCiAgICAgICAgInR5cGUiOiAibG9uZyIsCiAgICAgICAgImRvYyI6ICJUaGUgbnVtYmVyIG9mIGJ5dGVzIHRoYXQgaGF2ZSBiZWVuIHNjYW5uZWQiCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAibmFtZSI6ICJ0b3RhbEJ5dGVzIiwKICAgICAgICAidHlwZSI6ICJsb25nIiwKICAgICAgICAiZG9jIjogIlRoZSB0b3RhbCBudW1iZXIgb2YgYnl0ZXMgdG8gYmUgc2Nhbm5lZCBpbiB0aGlzIHF1ZXJ5IgogICAgICB9CiAgICBdCiAgfSwKICB7CiAgICAidHlwZSI6ICJyZWNvcmQiLAogICAgIm5hbWUiOiAiY29tLm1pY3Jvc29mdC5henVyZS5zdG9yYWdlLnF1ZXJ5QmxvYkNvbnRlbnRzLmVuZCIsCiAgICAiZG9jIjogIlNlbnQgYXMgdGhlIGZpbmFsIG1lc3NhZ2Ugb2YgdGhlIHJlc3BvbnNlLCBpbmRpY2F0aW5nIHRoYXQgYWxsIHJlc3VsdHMgaGF2ZSBiZWVuIHNlbnQuIiwKICAgICJmaWVsZHMiOiBbCiAgICAgIHsKICAgICAgICAibmFtZSI6ICJ0b3RhbEJ5dGVzIiwKICAgICAgICAidHlwZSI6ICJsb25nIiwKICAgICAgICAiZG9jIjogIlRoZSB0b3RhbCBudW1iZXIgb2YgYnl0ZXMgc2Nhbm5lZCBpbiB0aGlzIHF1ZXJ5IgogICAgICB9CiAgICBdCiAgfQpdCgCNBJzyQY7ATI6CP3q/u+xnAjwAODAsbWRpZmp0NTUuZWEzLG1kaWZqdDU1LmVhMwqNBJzyQY7ATI6CP3q/u+xnAg4Ewu4EruMJjQSc8kGOwEyOgj96v7vsZwIIBq7jCY0EnPJBjsBMjoI/er+77Gc=",
+ "x-ms-client-request-id" : "86bbabe8-592a-4ba8-a947-da8e2d28cb44",
+ "Content-Type" : "avro/binary"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "POST",
+ "Uri" : "https://REDACTED.blob.preprod.core.windows.net/0552dd5300552dd53f1815453da38e28aaeb04c77914/0552dd5310552dd53f1875385a60d53559cbf4589a0c?comp=query",
+ "Headers" : {
+ "x-ms-version" : "2020-08-04",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 azsdk-java-azure-storage-file-datalake/12.6.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "5cc1bb19-1442-4ba9-8b6b-ef48d030a25e",
+ "Content-Type" : "application/xml"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-lease-status" : "unlocked",
+ "x-ms-version" : "2020-08-04",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-lease-state" : "available",
+ "Last-Modified" : "Wed, 02 Jun 2021 17:20:15 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "Date" : "Wed, 02 Jun 2021 17:20:16 GMT",
+ "x-ms-blob-type" : "BlockBlob",
+ "Accept-Ranges" : "bytes",
+ "x-ms-server-encrypted" : "true",
+ "x-ms-creation-time" : "Wed, 02 Jun 2021 17:20:15 GMT",
+ "eTag" : "0x8D925EAB023AE92",
+ "x-ms-request-id" : "411db1ca-601e-0003-2ed3-57cc08000000",
+ "Body" : "T2JqAQIWYXZyby5zY2hlbWHOHlsKICB7CiAgICAidHlwZSI6ICJyZWNvcmQiLAogICAgIm5hbWUiOiAiY29tLm1pY3Jvc29mdC5henVyZS5zdG9yYWdlLnF1ZXJ5QmxvYkNvbnRlbnRzLnJlc3VsdERhdGEiLAogICAgImRvYyI6ICJIb2xkcyByZXN1bHQgZGF0YSBpbiB0aGUgZm9ybWF0IHNwZWNpZmllZCBmb3IgdGhpcyBxdWVyeSAoQ1NWLCBKU09OLCBldGMuKS4iLAogICAgImZpZWxkcyI6IFsKICAgICAgewogICAgICAgICJuYW1lIjogImRhdGEiLAogICAgICAgICJ0eXBlIjogImJ5dGVzIgogICAgICB9CiAgICBdCiAgfSwKICB7CiAgICAidHlwZSI6ICJyZWNvcmQiLAogICAgIm5hbWUiOiAiY29tLm1pY3Jvc29mdC5henVyZS5zdG9yYWdlLnF1ZXJ5QmxvYkNvbnRlbnRzLmVycm9yIiwKICAgICJkb2MiOiAiQW4gZXJyb3IgdGhhdCBvY2N1cnJlZCB3aGlsZSBwcm9jZXNzaW5nIHRoZSBxdWVyeS4iLAogICAgImZpZWxkcyI6IFsKICAgICAgewogICAgICAgICJuYW1lIjogImZhdGFsIiwKICAgICAgICAidHlwZSI6ICJib29sZWFuIiwKICAgICAgICAiZG9jIjogIklmIHRydWUsIHRoaXMgZXJyb3IgcHJldmVudHMgZnVydGhlciBxdWVyeSBwcm9jZXNzaW5nLiAgTW9yZSByZXN1bHQgZGF0YSBtYXkgYmUgcmV0dXJuZWQsIGJ1dCB0aGVyZSBpcyBubyBndWFyYW50ZWUgdGhhdCBhbGwgb2YgdGhlIG9yaWdpbmFsIGRhdGEgd2lsbCBiZSBwcm9jZXNzZWQuICBJZiBmYWxzZSwgdGhpcyBlcnJvciBkb2VzIG5vdCBwcmV2ZW50IGZ1cnRoZXIgcXVlcnkgcHJvY2Vzc2luZy4iCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAibmFtZSI6ICJuYW1lIiwKICAgICAgICAidHlwZSI6ICJzdHJpbmciLAogICAgICAgICJkb2MiOiAiVGhlIG5hbWUgb2YgdGhlIGVycm9yIgogICAgICB9LAogICAgICB7CiAgICAgICAgIm5hbWUiOiAiZGVzY3JpcHRpb24iLAogICAgICAgICJ0eXBlIjogInN0cmluZyIsCiAgICAgICAgImRvYyI6ICJBIGRlc2NyaXB0aW9uIG9mIHRoZSBlcnJvciIKICAgICAgfSwKICAgICAgewogICAgICAgICJuYW1lIjogInBvc2l0aW9uIiwKICAgICAgICAidHlwZSI6ICJsb25nIiwKICAgICAgICAiZG9jIjogIlRoZSByZWNvcmQgb2Zmc2V0IGluIHRoZSBibG9iIGF0IHdoaWNoIHRoZSBlcnJvciBvY2N1cnJlZCIKICAgICAgfQogICAgXQogIH0sCiAgewogICAgInR5cGUiOiAicmVjb3JkIiwKICAgICJuYW1lIjogImNvbS5taWNyb3NvZnQuYXp1cmUuc3RvcmFnZS5xdWVyeUJsb2JDb250ZW50cy5wcm9ncmVzcyIsCiAgICAiZG9jIjogIkluZm9ybWF0aW9uIGFib3V0IHRoZSBwcm9ncmVzcyBvZiB0aGUgcXVlcnkiLAogICAgImZpZWxkcyI6IFsKICAgICAgewogICAgICAgICJuYW1lIjogImJ5dGVzU2Nhbm5lZCIsCiAgICAgICAgInR5cGUiOiAibG9uZyIsCiAgICAgICAgImRvYyI6ICJUaGUgbnVtYmVyIG9mIGJ5dGVzIHRoYXQgaGF2ZSBiZWVuIHNjYW5uZWQiCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAibmFtZSI6ICJ0b3RhbEJ5dGVzIiwKICAgICAgICAidHlwZSI6ICJsb25nIiwKICAgICAgICAiZG9jIjogIlRoZSB0b3RhbCBudW1iZXIgb2YgYnl0ZXMgdG8gYmUgc2Nhbm5lZCBpbiB0aGlzIHF1ZXJ5IgogICAgICB9CiAgICBdCiAgfSwKICB7CiAgICAidHlwZSI6ICJyZWNvcmQiLAogICAgIm5hbWUiOiAiY29tLm1pY3Jvc29mdC5henVyZS5zdG9yYWdlLnF1ZXJ5QmxvYkNvbnRlbnRzLmVuZCIsCiAgICAiZG9jIjogIlNlbnQgYXMgdGhlIGZpbmFsIG1lc3NhZ2Ugb2YgdGhlIHJlc3BvbnNlLCBpbmRpY2F0aW5nIHRoYXQgYWxsIHJlc3VsdHMgaGF2ZSBiZWVuIHNlbnQuIiwKICAgICJmaWVsZHMiOiBbCiAgICAgIHsKICAgICAgICAibmFtZSI6ICJ0b3RhbEJ5dGVzIiwKICAgICAgICAidHlwZSI6ICJsb25nIiwKICAgICAgICAiZG9jIjogIlRoZSB0b3RhbCBudW1iZXIgb2YgYnl0ZXMgc2Nhbm5lZCBpbiB0aGlzIHF1ZXJ5IgogICAgICB9CiAgICBdCiAgfQpdCgDeM2yr7288T4x7C6FAmRvxAjwAODAsbWRpZmp0NTUuZWEzLG1kaWZqdDU1LmVhMwreM2yr7288T4x7C6FAmRvxAg4Ewu4EruMJ3jNsq+9vPE+MewuhQJkb8QIIBq7jCd4zbKvvbzxPjHsLoUCZG/E=",
+ "x-ms-client-request-id" : "5cc1bb19-1442-4ba9-8b6b-ef48d030a25e",
+ "Content-Type" : "avro/binary"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "0552dd5300552dd53f1815453da38e28aaeb04c77914", "0552dd5310552dd53f1875385a60d53559cbf4589a0c" ]
+}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestQueryParquetOutputIA.json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestQueryParquetOutputIA.json
new file mode 100644
index 000000000000..12e2e568cfd0
--- /dev/null
+++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/FileAPITestQueryParquetOutputIA.json
@@ -0,0 +1,47 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.preprod.core.windows.net/cc6a6a5f0cc6a6a5f9822127170a77059f1094174a08?restype=container",
+ "Headers" : {
+ "x-ms-version" : "2020-08-04",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 azsdk-java-azure-storage-file-datalake/12.6.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "df7766dc-f6f9-4b15-ac19-4a9fd89ad051"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-08-04",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D925EABEB91657",
+ "Last-Modified" : "Wed, 02 Jun 2021 17:20:40 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "a876e5f3-d01e-0011-11d3-57f814000000",
+ "x-ms-client-request-id" : "df7766dc-f6f9-4b15-ac19-4a9fd89ad051",
+ "Date" : "Wed, 02 Jun 2021 17:20:39 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.dfs.preprod.core.windows.net/cc6a6a5f0cc6a6a5f9822127170a77059f1094174a08/cc6a6a5f1cc6a6a5f9828975162aad6e755064580b84?resource=file",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.6.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "906eab91-c8b4-42fa-944a-2e689bd59b2f"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D925EABF1BE8F0",
+ "Last-Modified" : "Wed, 02 Jun 2021 17:20:40 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "x-ms-request-id" : "3a459b71-e01f-0012-01d3-57fb13000000",
+ "x-ms-client-request-id" : "906eab91-c8b4-42fa-944a-2e689bd59b2f",
+ "Date" : "Wed, 02 Jun 2021 17:20:40 GMT"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "cc6a6a5f0cc6a6a5f9822127170a77059f1094174a08", "cc6a6a5f1cc6a6a5f9828975162aad6e755064580b84" ]
+}
\ No newline at end of file
From cf6093a9241c5261a16bcf18aeee339e9dda7a38 Mon Sep 17 00:00:00 2001
From: Gauri Prasad <51212198+gapra-msft@users.noreply.github.com>
Date: Thu, 17 Jun 2021 10:41:32 -0700
Subject: [PATCH 4/9] Implemented Immutable Storage with Versioning (#21718)
---
.../azure/storage/blob/BlobAsyncClient.java | 21 +-
.../blob/BlobContainerAsyncClient.java | 2 +-
.../blob/BlobServiceClientBuilder.java | 25 +-
.../blob/implementation/AppendBlobsImpl.java | 7 +-
.../blob/implementation/BlobsImpl.java | 54 +-
.../blob/implementation/BlockBlobsImpl.java | 12 +-
.../blob/implementation/PageBlobsImpl.java | 7 +-
.../models/ArrowConfiguration.java | 2 +-
.../implementation/models/ArrowField.java | 2 +-
.../models/BlobItemInternal.java | 26 +
.../models/BlobItemPropertiesInternal.java | 1 +
.../models/BlobsGetPropertiesHeaders.java | 1 +
.../BlobsSetImmutabilityPolicyHeaders.java | 1 +
.../models/DelimitedTextConfiguration.java | 48 +-
.../models/JsonTextConfiguration.java | 8 +-
.../implementation/models/QueryFormat.java | 18 +-
.../implementation/models/QueryRequest.java | 15 +-
.../blob/implementation/util/ModelHelper.java | 14 +
.../models/BlobContainerItemProperties.java | 2 +-
.../blob/models/BlobContainerProperties.java | 36 +
.../blob/models/BlobDownloadHeaders.java | 79 ++
.../blob/models/BlobImmutabilityPolicy.java | 47 ++
.../models/BlobImmutabilityPolicyMode.java | 10 +-
.../blob/models/BlobItemProperties.java | 77 ++
.../blob/models/BlobLegalHoldResult.java | 27 +
.../storage/blob/models/BlobListDetails.java | 48 ++
.../storage/blob/models/BlobProperties.java | 93 +++
.../blob/models/ListBlobsIncludeItem.java | 5 +-
.../blob/options/AppendBlobCreateOptions.java | 39 +
.../blob/options/BlobBeginCopyOptions.java | 39 +
.../blob/options/BlobCopyFromUrlOptions.java | 39 +
.../options/BlobParallelUploadOptions.java | 39 +
.../BlockBlobCommitBlockListOptions.java | 39 +
.../options/BlockBlobSimpleUploadOptions.java | 39 +
.../blob/options/PageBlobCreateOptions.java | 39 +
.../blob/sas/BlobContainerSasPermission.java | 30 +-
.../storage/blob/sas/BlobSasPermission.java | 30 +-
.../specialized/AppendBlobAsyncClient.java | 8 +-
.../blob/specialized/BlobAsyncClientBase.java | 196 ++++-
.../blob/specialized/BlobClientBase.java | 116 +++
.../specialized/BlockBlobAsyncClient.java | 15 +-
.../blob/specialized/PageBlobAsyncClient.java | 10 +-
...lobAsyncClientBaseJavaDocCodeSnippets.java | 58 ++
.../BlobClientBaseJavaDocCodeSnippets.java | 59 ++
.../com/azure/storage/blob/APISpec.groovy | 2 +-
.../blob/BlobServiceSasModelsTest.groovy | 108 +--
.../com/azure/storage/blob/CPKNTest.groovy | 4 +-
.../com/azure/storage/blob/CPKTest.groovy | 5 +-
.../ImmutableStorageWithVersioningTest.groovy | 683 ++++++++++++++++++
...leStorageWithVersioningTestAccountSas.json | 92 +++
...ageWithVersioningTestAppendBlobCreate.json | 108 +++
...tableStorageWithVersioningTestBlobSas.json | 92 +++
...ersioningTestBlockBlobCommitBlockList.json | 112 +++
...rageWithVersioningTestBlockBlobUpload.json | 114 +++
...WithVersioningTestContainerProperties.json | 100 +++
...StorageWithVersioningTestContainerSas.json | 92 +++
...mmutableStorageWithVersioningTestCopy.json | 159 ++++
...ersioningTestDeleteImmutabilityPolicy.json | 125 ++++
...ningTestDeleteImmutabilityPolicyError.json | 73 ++
...ioningTestDeleteImmutabilityPolicyMin.json | 125 ++++
...orageWithVersioningTestPageBlobCreate.json | 108 +++
...ioningTestSetImmutabilityPolicyACFail.json | 73 ++
...sioningTestSetImmutabilityPolicyAC[0].json | 72 ++
...sioningTestSetImmutabilityPolicyAC[1].json | 72 ++
...sioningTestSetImmutabilityPolicyError.json | 73 ++
...VersioningTestSetImmutabilityPolicyIA.json | 51 ++
...ersioningTestSetImmutabilityPolicyMin.json | 72 ++
...ersioningTestSetImmutabilityPolicy[0].json | 129 ++++
...geWithVersioningTestSetLegalHoldError.json | 73 ++
...eWithVersioningTestSetLegalHoldMin[0].json | 71 ++
...eWithVersioningTestSetLegalHoldMin[1].json | 71 ++
...rageWithVersioningTestSetLegalHold[0].json | 127 ++++
...rageWithVersioningTestSetLegalHold[1].json | 127 ++++
...ableStorageWithVersioningTestSyncCopy.json | 162 +++++
.../azure-storage-blob/swagger/README.md | 36 +-
.../BlobStorageCustomization.java | 4 +
sdk/storage/azure-storage-common/CHANGELOG.md | 2 +-
.../common/sas/AccountSasPermission.java | 32 +-
.../implementation/SasModelsTest.groovy | 58 +-
79 files changed, 4713 insertions(+), 177 deletions(-)
create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobImmutabilityPolicy.java
rename sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/{implementation => }/models/BlobImmutabilityPolicyMode.java (93%)
create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobLegalHoldResult.java
create mode 100644 sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ImmutableStorageWithVersioningTest.groovy
create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestAccountSas.json
create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestAppendBlobCreate.json
create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestBlobSas.json
create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestBlockBlobCommitBlockList.json
create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestBlockBlobUpload.json
create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestContainerProperties.json
create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestContainerSas.json
create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestCopy.json
create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestDeleteImmutabilityPolicy.json
create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestDeleteImmutabilityPolicyError.json
create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestDeleteImmutabilityPolicyMin.json
create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestPageBlobCreate.json
create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyACFail.json
create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyAC[0].json
create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyAC[1].json
create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyError.json
create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyIA.json
create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyMin.json
create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicy[0].json
create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetLegalHoldError.json
create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetLegalHoldMin[0].json
create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetLegalHoldMin[1].json
create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetLegalHold[0].json
create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetLegalHold[1].json
create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSyncCopy.json
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java
index 0eab682c039d..74127d47445a 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java
@@ -14,6 +14,7 @@
import com.azure.storage.blob.implementation.util.ModelHelper;
import com.azure.storage.blob.models.AccessTier;
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.BlockBlobItem;
@@ -515,16 +516,19 @@ buffers is not a common scenario for async like it is in sync (and we already bu
final BlobRequestConditions requestConditions = options.getRequestConditions() == null
? new BlobRequestConditions() : options.getRequestConditions();
final boolean computeMd5 = options.isComputeMd5();
+ final BlobImmutabilityPolicy immutabilityPolicy = options.getImmutabilityPolicy() == null
+ ? new BlobImmutabilityPolicy() : options.getImmutabilityPolicy();
+ final Boolean legalHold = options.isLegalHold();
BlockBlobAsyncClient blockBlobAsyncClient = getBlockBlobAsyncClient();
Function, Mono>> uploadInChunksFunction = (stream) ->
uploadInChunks(blockBlobAsyncClient, stream, parallelTransferOptions, headers, metadata, tags,
- tier, requestConditions, computeMd5);
+ tier, requestConditions, computeMd5, immutabilityPolicy, legalHold);
BiFunction, Long, Mono>> uploadFullBlobFunction =
(stream, length) -> uploadFullBlob(blockBlobAsyncClient, stream, length, parallelTransferOptions,
- headers, metadata, tags, tier, requestConditions, computeMd5);
+ headers, metadata, tags, tier, requestConditions, computeMd5, immutabilityPolicy, legalHold);
Flux data = options.getDataFlux() == null ? Utility.convertStreamToByteBuffer(
options.getDataStream(), options.getLength(),
@@ -541,7 +545,8 @@ buffers is not a common scenario for async like it is in sync (and we already bu
private Mono> uploadFullBlob(BlockBlobAsyncClient blockBlobAsyncClient,
Flux data, long length, ParallelTransferOptions parallelTransferOptions, BlobHttpHeaders headers,
Map metadata, Map tags, AccessTier tier,
- BlobRequestConditions requestConditions, boolean computeMd5) {
+ BlobRequestConditions requestConditions, boolean computeMd5, BlobImmutabilityPolicy immutabilityPolicy,
+ Boolean legalHold) {
/*
Note that there is no need to buffer here as the flux returned by the size gate in this case is created
@@ -559,14 +564,17 @@ private Mono> uploadFullBlob(BlockBlobAsyncClient blockB
.setTags(tags)
.setTier(tier)
.setRequestConditions(requestConditions)
- .setContentMd5(fluxMd5Wrapper.getMd5()))
+ .setContentMd5(fluxMd5Wrapper.getMd5())
+ .setImmutabilityPolicy(immutabilityPolicy)
+ .setLegalHold(legalHold))
.flatMap(blockBlobAsyncClient::uploadWithResponse);
}
private Mono> uploadInChunks(BlockBlobAsyncClient blockBlobAsyncClient,
Flux data, ParallelTransferOptions parallelTransferOptions, BlobHttpHeaders headers,
Map metadata, Map tags, AccessTier tier,
- BlobRequestConditions requestConditions, boolean computeMd5) {
+ BlobRequestConditions requestConditions, boolean computeMd5, BlobImmutabilityPolicy immutabilityPolicy,
+ Boolean legalHold) {
// TODO: Sample/api reference
// See ProgressReporter for an explanation on why this lock is necessary and why we use AtomicLong.
AtomicLong totalProgress = new AtomicLong();
@@ -609,7 +617,8 @@ private Mono> uploadInChunks(BlockBlobAsyncClient blockB
.flatMap(ids ->
blockBlobAsyncClient.commitBlockListWithResponse(new BlockBlobCommitBlockListOptions(ids)
.setHeaders(headers).setMetadata(metadata).setTags(tags).setTier(tier)
- .setRequestConditions(requestConditions)));
+ .setRequestConditions(requestConditions).setImmutabilityPolicy(immutabilityPolicy)
+ .setLegalHold(legalHold)));
}
/**
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java
index 51be77a1aad5..99e495de8aea 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java
@@ -505,7 +505,7 @@ Mono> getPropertiesWithResponse(String leaseId
hd.getLastModified(), hd.getXMsLeaseDuration(), hd.getXMsLeaseState(), hd.getXMsLeaseStatus(),
hd.getXMsBlobPublicAccess(), Boolean.TRUE.equals(hd.isXMsHasImmutabilityPolicy()),
Boolean.TRUE.equals(hd.isXMsHasLegalHold()), hd.getXMsDefaultEncryptionScope(),
- hd.isXMsDenyEncryptionScopeOverride());
+ hd.isXMsDenyEncryptionScopeOverride(), hd.isXMsImmutableStorageWithVersioningEnabled());
return new SimpleResponse<>(rb, properties);
});
}
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClientBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClientBuilder.java
index e506f577b69d..386b7af2e9d6 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClientBuilder.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClientBuilder.java
@@ -9,6 +9,8 @@
import com.azure.core.http.HttpClient;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelinePosition;
+import com.azure.core.http.policy.AzureSasCredentialPolicy;
+import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpPipelinePolicy;
import com.azure.core.util.ClientOptions;
@@ -25,6 +27,7 @@
import com.azure.storage.common.implementation.connectionstring.StorageConnectionString;
import com.azure.storage.common.implementation.connectionstring.StorageEndpoint;
import com.azure.storage.common.policy.RequestRetryOptions;
+import com.azure.storage.common.policy.StorageSharedKeyCredentialPolicy;
import java.net.MalformedURLException;
import java.net.URL;
@@ -100,11 +103,6 @@ public BlobServiceAsyncClient buildAsyncClient() {
boolean anonymousAccess = false;
- if (Objects.isNull(storageSharedKeyCredential) && Objects.isNull(tokenCredential)
- && Objects.isNull(azureSasCredential) && Objects.isNull(sasToken)) {
- anonymousAccess = true;
- }
-
if (Objects.nonNull(customerProvidedKey) && Objects.nonNull(encryptionScope)) {
throw logger.logExceptionAsError(new IllegalArgumentException("Customer provided key and encryption "
+ "scope cannot both be set"));
@@ -116,6 +114,23 @@ public BlobServiceAsyncClient buildAsyncClient() {
endpoint, retryOptions, logOptions,
clientOptions, httpClient, perCallPolicies, perRetryPolicies, configuration, logger);
+ boolean foundCredential = false;
+ for (int i = 0; i < pipeline.getPolicyCount(); i++) {
+ if (pipeline.getPolicy(i) instanceof StorageSharedKeyCredentialPolicy) {
+ foundCredential = true;
+ break;
+ }
+ if (pipeline.getPolicy(i) instanceof BearerTokenAuthenticationPolicy) {
+ foundCredential = true;
+ break;
+ }
+ if (pipeline.getPolicy(i) instanceof AzureSasCredentialPolicy) {
+ foundCredential = true;
+ break;
+ }
+ }
+ anonymousAccess = !foundCredential;
+
return new BlobServiceAsyncClient(pipeline, endpoint, serviceVersion, accountName, customerProvidedKey,
encryptionScope, blobContainerEncryptionScope, anonymousAccess);
}
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java
index 0f5b9bea4d58..cecf00942c8f 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java
@@ -24,10 +24,10 @@
import com.azure.storage.blob.implementation.models.AppendBlobsAppendBlockResponse;
import com.azure.storage.blob.implementation.models.AppendBlobsCreateResponse;
import com.azure.storage.blob.implementation.models.AppendBlobsSealResponse;
-import com.azure.storage.blob.implementation.models.BlobImmutabilityPolicyMode;
import com.azure.storage.blob.implementation.models.EncryptionScope;
import com.azure.storage.blob.implementation.models.StorageErrorException;
import com.azure.storage.blob.models.BlobHttpHeaders;
+import com.azure.storage.blob.models.BlobImmutabilityPolicyMode;
import com.azure.storage.blob.models.CpkInfo;
import com.azure.storage.blob.models.EncryptionAlgorithmType;
import java.net.URL;
@@ -162,6 +162,7 @@ Mono appendBlockFromUrl(
@HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch,
@HeaderParam("x-ms-version") String version,
@HeaderParam("x-ms-client-request-id") String requestId,
+ @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization,
@HeaderParam("Accept") String accept,
Context context);
@@ -497,6 +498,8 @@ public Mono appendBlockWithResponseAsync(
* @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without 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 copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to
+ * copy source.
* @param cpkInfo Parameter group.
* @param encryptionScope Parameter group.
* @param context The context to associate with this operation.
@@ -529,6 +532,7 @@ public Mono appendBlockFromUrlWithRespons
String sourceIfMatch,
String sourceIfNoneMatch,
String requestId,
+ String copySourceAuthorization,
CpkInfo cpkInfo,
EncryptionScope encryptionScope,
Context context) {
@@ -595,6 +599,7 @@ public Mono appendBlockFromUrlWithRespons
sourceIfNoneMatch,
this.client.getVersion(),
requestId,
+ copySourceAuthorization,
accept,
context);
}
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java
index 23133e3b561c..8aa992bf243b 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java
@@ -28,7 +28,6 @@
import com.azure.core.util.DateTimeRfc1123;
import com.azure.storage.blob.implementation.models.BlobDeleteType;
import com.azure.storage.blob.implementation.models.BlobExpiryOptions;
-import com.azure.storage.blob.implementation.models.BlobImmutabilityPolicyMode;
import com.azure.storage.blob.implementation.models.BlobTags;
import com.azure.storage.blob.implementation.models.BlobsAbortCopyFromURLResponse;
import com.azure.storage.blob.implementation.models.BlobsAcquireLeaseResponse;
@@ -62,6 +61,7 @@
import com.azure.storage.blob.implementation.models.StorageErrorException;
import com.azure.storage.blob.models.AccessTier;
import com.azure.storage.blob.models.BlobHttpHeaders;
+import com.azure.storage.blob.models.BlobImmutabilityPolicyMode;
import com.azure.storage.blob.models.CpkInfo;
import com.azure.storage.blob.models.DeleteSnapshotsOptionType;
import com.azure.storage.blob.models.EncryptionAlgorithmType;
@@ -302,10 +302,12 @@ Mono setHttpHeaders(
@Put("/{containerName}/{blob}")
@ExpectedResponses({200})
- @UnexpectedResponseExceptionType(StorageErrorException.class)
+ @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class)
Mono setImmutabilityPolicy(
@HostParam("url") String url,
@QueryParam("comp") String comp,
+ @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob,
@QueryParam("timeout") Integer timeout,
@HeaderParam("x-ms-version") String version,
@HeaderParam("x-ms-client-request-id") String requestId,
@@ -317,10 +319,12 @@ Mono setImmutabilityPolicy(
@Delete("/{containerName}/{blob}")
@ExpectedResponses({200})
- @UnexpectedResponseExceptionType(StorageErrorException.class)
+ @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class)
Mono deleteImmutabilityPolicy(
@HostParam("url") String url,
@QueryParam("comp") String comp,
+ @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob,
@QueryParam("timeout") Integer timeout,
@HeaderParam("x-ms-version") String version,
@HeaderParam("x-ms-client-request-id") String requestId,
@@ -329,10 +333,12 @@ Mono deleteImmutabilityPolicy(
@Put("/{containerName}/{blob}")
@ExpectedResponses({200})
- @UnexpectedResponseExceptionType(StorageErrorException.class)
+ @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class)
Mono setLegalHold(
@HostParam("url") String url,
@QueryParam("comp") String comp,
+ @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob,
@QueryParam("timeout") Integer timeout,
@HeaderParam("x-ms-version") String version,
@HeaderParam("x-ms-client-request-id") String requestId,
@@ -561,6 +567,7 @@ Mono copyFromURL(
@HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry,
@HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode,
@HeaderParam("x-ms-legal-hold") Boolean legalHold,
+ @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization,
@HeaderParam("Accept") String accept,
Context context);
@@ -1395,6 +1402,8 @@ public Mono setHttpHeadersWithResponseAsync(
/**
* The Set Immutability Policy operation sets the immutability policy on the blob.
*
+ * @param containerName The container name.
+ * @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
* href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
* Timeouts for Blob Service Operations.</a>.
@@ -1412,6 +1421,8 @@ public Mono setHttpHeadersWithResponseAsync(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono setImmutabilityPolicyWithResponseAsync(
+ String containerName,
+ String blob,
Integer timeout,
String requestId,
OffsetDateTime ifUnmodifiedSince,
@@ -1427,6 +1438,8 @@ public Mono setImmutabilityPolicyWithRespons
return service.setImmutabilityPolicy(
this.client.getUrl(),
comp,
+ containerName,
+ blob,
timeout,
this.client.getVersion(),
requestId,
@@ -1440,6 +1453,8 @@ public Mono setImmutabilityPolicyWithRespons
/**
* The Delete Immutability Policy operation deletes the immutability policy on the blob.
*
+ * @param containerName The container name.
+ * @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
* href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
* Timeouts for Blob Service Operations.</a>.
@@ -1453,16 +1468,26 @@ public Mono setImmutabilityPolicyWithRespons
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono deleteImmutabilityPolicyWithResponseAsync(
- Integer timeout, String requestId, Context context) {
+ String containerName, String blob, Integer timeout, String requestId, Context context) {
final String comp = "immutabilityPolicies";
final String accept = "application/xml";
return service.deleteImmutabilityPolicy(
- this.client.getUrl(), comp, timeout, this.client.getVersion(), requestId, accept, context);
+ this.client.getUrl(),
+ comp,
+ containerName,
+ blob,
+ timeout,
+ this.client.getVersion(),
+ requestId,
+ accept,
+ context);
}
/**
* The Set Legal Hold operation sets a legal hold on the blob.
*
+ * @param containerName The container name.
+ * @param blob The blob name.
* @param legalHold Specified if a legal hold should be set on the blob.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
* href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
@@ -1477,11 +1502,20 @@ public Mono deleteImmutabilityPolicyWithR
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono setLegalHoldWithResponseAsync(
- boolean legalHold, Integer timeout, String requestId, Context context) {
+ String containerName, String blob, boolean legalHold, Integer timeout, String requestId, Context context) {
final String comp = "legalhold";
final String accept = "application/xml";
return service.setLegalHold(
- this.client.getUrl(), comp, timeout, this.client.getVersion(), requestId, legalHold, accept, context);
+ this.client.getUrl(),
+ comp,
+ containerName,
+ blob,
+ timeout,
+ this.client.getVersion(),
+ requestId,
+ legalHold,
+ accept,
+ context);
}
/**
@@ -2167,6 +2201,8 @@ public Mono startCopyFromURLWithResponseAsync(
* @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire.
* @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob.
* @param legalHold Specified if a legal hold should be set on the blob.
+ * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to
+ * copy source.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws StorageErrorException thrown if the request is rejected by server.
@@ -2197,6 +2233,7 @@ public Mono copyFromURLWithResponseAsync(
OffsetDateTime immutabilityPolicyExpiry,
BlobImmutabilityPolicyMode immutabilityPolicyMode,
Boolean legalHold,
+ String copySourceAuthorization,
Context context) {
final String xMsRequiresSync = "true";
final String accept = "application/xml";
@@ -2237,6 +2274,7 @@ public Mono copyFromURLWithResponseAsync(
immutabilityPolicyExpiryConverted,
immutabilityPolicyMode,
legalHold,
+ copySourceAuthorization,
accept,
context);
}
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java
index 9770b1489f9f..87bb9c108eba 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java
@@ -21,7 +21,6 @@
import com.azure.core.util.Base64Util;
import com.azure.core.util.Context;
import com.azure.core.util.DateTimeRfc1123;
-import com.azure.storage.blob.implementation.models.BlobImmutabilityPolicyMode;
import com.azure.storage.blob.implementation.models.BlockBlobsCommitBlockListResponse;
import com.azure.storage.blob.implementation.models.BlockBlobsGetBlockListResponse;
import com.azure.storage.blob.implementation.models.BlockBlobsPutBlobFromUrlResponse;
@@ -32,6 +31,7 @@
import com.azure.storage.blob.implementation.models.StorageErrorException;
import com.azure.storage.blob.models.AccessTier;
import com.azure.storage.blob.models.BlobHttpHeaders;
+import com.azure.storage.blob.models.BlobImmutabilityPolicyMode;
import com.azure.storage.blob.models.BlockListType;
import com.azure.storage.blob.models.BlockLookupList;
import com.azure.storage.blob.models.CpkInfo;
@@ -148,6 +148,7 @@ Mono putBlobFromUrl(
@HeaderParam("x-ms-tags") String blobTagsString,
@HeaderParam("x-ms-copy-source") URL copySource,
@HeaderParam("x-ms-copy-source-blob-properties") Boolean copySourceBlobProperties,
+ @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization,
@HeaderParam("Accept") String accept,
Context context);
@@ -201,6 +202,7 @@ Mono stageBlockFromURL(
@HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch,
@HeaderParam("x-ms-version") String version,
@HeaderParam("x-ms-client-request-id") String requestId,
+ @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization,
@HeaderParam("Accept") String accept,
Context context);
@@ -473,6 +475,8 @@ public Mono uploadWithResponseAsync(
* @param blobTagsString Optional. Used to set blob tags in various blob operations.
* @param copySourceBlobProperties Optional, default is true. Indicates if properties from the source blob should be
* copied.
+ * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to
+ * copy source.
* @param blobHttpHeaders Parameter group.
* @param cpkInfo Parameter group.
* @param encryptionScope Parameter group.
@@ -507,6 +511,7 @@ public Mono putBlobFromUrlWithResponseAsync(
byte[] sourceContentMD5,
String blobTagsString,
Boolean copySourceBlobProperties,
+ String copySourceAuthorization,
BlobHttpHeaders blobHttpHeaders,
CpkInfo cpkInfo,
EncryptionScope encryptionScope,
@@ -611,6 +616,7 @@ public Mono putBlobFromUrlWithResponseAsync(
blobTagsString,
copySource,
copySourceBlobProperties,
+ copySourceAuthorization,
accept,
context);
}
@@ -729,6 +735,8 @@ public Mono stageBlockWithResponseAsync(
* @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without 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 copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to
+ * copy source.
* @param cpkInfo Parameter group.
* @param encryptionScope Parameter group.
* @param context The context to associate with this operation.
@@ -754,6 +762,7 @@ public Mono stageBlockFromURLWithResponseAs
String sourceIfMatch,
String sourceIfNoneMatch,
String requestId,
+ String copySourceAuthorization,
CpkInfo cpkInfo,
EncryptionScope encryptionScope,
Context context) {
@@ -808,6 +817,7 @@ public Mono stageBlockFromURLWithResponseAs
sourceIfNoneMatch,
this.client.getVersion(),
requestId,
+ copySourceAuthorization,
accept,
context);
}
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 88dd509959c1..89720d3a2ffc 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
@@ -21,7 +21,6 @@
import com.azure.core.util.Base64Util;
import com.azure.core.util.Context;
import com.azure.core.util.DateTimeRfc1123;
-import com.azure.storage.blob.implementation.models.BlobImmutabilityPolicyMode;
import com.azure.storage.blob.implementation.models.EncryptionScope;
import com.azure.storage.blob.implementation.models.PageBlobsClearPagesResponse;
import com.azure.storage.blob.implementation.models.PageBlobsCopyIncrementalResponse;
@@ -35,6 +34,7 @@
import com.azure.storage.blob.implementation.models.PremiumPageBlobAccessTier;
import com.azure.storage.blob.implementation.models.StorageErrorException;
import com.azure.storage.blob.models.BlobHttpHeaders;
+import com.azure.storage.blob.models.BlobImmutabilityPolicyMode;
import com.azure.storage.blob.models.CpkInfo;
import com.azure.storage.blob.models.EncryptionAlgorithmType;
import com.azure.storage.blob.models.SequenceNumberActionType;
@@ -208,6 +208,7 @@ Mono uploadPagesFromURL(
@HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch,
@HeaderParam("x-ms-version") String version,
@HeaderParam("x-ms-client-request-id") String requestId,
+ @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization,
@HeaderParam("Accept") String accept,
Context context);
@@ -757,6 +758,8 @@ public Mono clearPagesWithResponseAsync(
* @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without 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 copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to
+ * copy source.
* @param cpkInfo Parameter group.
* @param encryptionScope Parameter group.
* @param context The context to associate with this operation.
@@ -790,6 +793,7 @@ public Mono uploadPagesFromURLWithResponseA
String sourceIfMatch,
String sourceIfNoneMatch,
String requestId,
+ String copySourceAuthorization,
CpkInfo cpkInfo,
EncryptionScope encryptionScope,
Context context) {
@@ -858,6 +862,7 @@ public Mono uploadPagesFromURLWithResponseA
sourceIfNoneMatch,
this.client.getVersion(),
requestId,
+ copySourceAuthorization,
accept,
context);
}
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ArrowConfiguration.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ArrowConfiguration.java
index 31dc9df2689e..887b18437081 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ArrowConfiguration.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ArrowConfiguration.java
@@ -12,7 +12,7 @@
import java.util.ArrayList;
import java.util.List;
-/** arrow configuration. */
+/** Groups the settings used for formatting the response if the response should be Arrow formatted. */
@JacksonXmlRootElement(localName = "ArrowConfiguration")
@Fluent
public final class ArrowConfiguration {
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ArrowField.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ArrowField.java
index d64199574ed8..eebe8075c040 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ArrowField.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ArrowField.java
@@ -8,7 +8,7 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
-/** field of an arrow schema. */
+/** Groups settings regarding specific field of an arrow schema. */
@JacksonXmlRootElement(localName = "Field")
@Fluent
public final class ArrowField {
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemInternal.java
index 3aeb32ebad74..223e34a14e65 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemInternal.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemInternal.java
@@ -67,6 +67,12 @@ public final class BlobItemInternal {
@JsonProperty(value = "OrMetadata")
private Map objectReplicationMetadata;
+ /*
+ * The HasVersionsOnly property.
+ */
+ @JsonProperty(value = "HasVersionsOnly")
+ private Boolean hasVersionsOnly;
+
/*
* The IsPrefix property.
*/
@@ -253,6 +259,26 @@ public BlobItemInternal setObjectReplicationMetadata(Map objectR
return this;
}
+ /**
+ * Get the hasVersionsOnly property: The HasVersionsOnly property.
+ *
+ * @return the hasVersionsOnly value.
+ */
+ public Boolean isHasVersionsOnly() {
+ return this.hasVersionsOnly;
+ }
+
+ /**
+ * Set the hasVersionsOnly property: The HasVersionsOnly property.
+ *
+ * @param hasVersionsOnly the hasVersionsOnly value to set.
+ * @return the BlobItemInternal object itself.
+ */
+ public BlobItemInternal setHasVersionsOnly(Boolean hasVersionsOnly) {
+ this.hasVersionsOnly = hasVersionsOnly;
+ return this;
+ }
+
/**
* Get the isPrefix property: The IsPrefix property.
*
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemPropertiesInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemPropertiesInternal.java
index 446e4a682d1a..443916a33dc4 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemPropertiesInternal.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemPropertiesInternal.java
@@ -9,6 +9,7 @@
import com.azure.core.util.DateTimeRfc1123;
import com.azure.storage.blob.models.AccessTier;
import com.azure.storage.blob.models.ArchiveStatus;
+import com.azure.storage.blob.models.BlobImmutabilityPolicyMode;
import com.azure.storage.blob.models.BlobType;
import com.azure.storage.blob.models.CopyStatusType;
import com.azure.storage.blob.models.LeaseDurationType;
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetPropertiesHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetPropertiesHeaders.java
index 671d3c8a9e5a..b86ca93fb023 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetPropertiesHeaders.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetPropertiesHeaders.java
@@ -8,6 +8,7 @@
import com.azure.core.annotation.HeaderCollection;
import com.azure.core.util.CoreUtils;
import com.azure.core.util.DateTimeRfc1123;
+import com.azure.storage.blob.models.BlobImmutabilityPolicyMode;
import com.azure.storage.blob.models.BlobType;
import com.azure.storage.blob.models.CopyStatusType;
import com.azure.storage.blob.models.LeaseDurationType;
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetImmutabilityPolicyHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetImmutabilityPolicyHeaders.java
index 74eb4099d88f..2b7553f45126 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetImmutabilityPolicyHeaders.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetImmutabilityPolicyHeaders.java
@@ -6,6 +6,7 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.DateTimeRfc1123;
+import com.azure.storage.blob.models.BlobImmutabilityPolicyMode;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
import java.time.OffsetDateTime;
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DelimitedTextConfiguration.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DelimitedTextConfiguration.java
index 37da273fa7c3..a0b4209499a0 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DelimitedTextConfiguration.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DelimitedTextConfiguration.java
@@ -8,42 +8,42 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
-/** delimited text configuration. */
+/** Groups the settings used for interpreting the blob data if the blob is delimited text formatted. */
@JacksonXmlRootElement(localName = "DelimitedTextConfiguration")
@Fluent
public final class DelimitedTextConfiguration {
/*
- * column separator
+ * The string used to separate columns.
*/
- @JsonProperty(value = "ColumnSeparator", required = true)
+ @JsonProperty(value = "ColumnSeparator")
private String columnSeparator;
/*
- * field quote
+ * The string used to quote a specific field.
*/
- @JsonProperty(value = "FieldQuote", required = true)
+ @JsonProperty(value = "FieldQuote")
private String fieldQuote;
/*
- * record separator
+ * The string used to separate records.
*/
- @JsonProperty(value = "RecordSeparator", required = true)
+ @JsonProperty(value = "RecordSeparator")
private String recordSeparator;
/*
- * escape char
+ * The string used as an escape character.
*/
- @JsonProperty(value = "EscapeChar", required = true)
+ @JsonProperty(value = "EscapeChar")
private String escapeChar;
/*
- * has headers
+ * Represents whether the data has headers.
*/
- @JsonProperty(value = "HasHeaders", required = true)
- private boolean headersPresent;
+ @JsonProperty(value = "HasHeaders")
+ private Boolean headersPresent;
/**
- * Get the columnSeparator property: column separator.
+ * Get the columnSeparator property: The string used to separate columns.
*
* @return the columnSeparator value.
*/
@@ -52,7 +52,7 @@ public String getColumnSeparator() {
}
/**
- * Set the columnSeparator property: column separator.
+ * Set the columnSeparator property: The string used to separate columns.
*
* @param columnSeparator the columnSeparator value to set.
* @return the DelimitedTextConfiguration object itself.
@@ -63,7 +63,7 @@ public DelimitedTextConfiguration setColumnSeparator(String columnSeparator) {
}
/**
- * Get the fieldQuote property: field quote.
+ * Get the fieldQuote property: The string used to quote a specific field.
*
* @return the fieldQuote value.
*/
@@ -72,7 +72,7 @@ public String getFieldQuote() {
}
/**
- * Set the fieldQuote property: field quote.
+ * Set the fieldQuote property: The string used to quote a specific field.
*
* @param fieldQuote the fieldQuote value to set.
* @return the DelimitedTextConfiguration object itself.
@@ -83,7 +83,7 @@ public DelimitedTextConfiguration setFieldQuote(String fieldQuote) {
}
/**
- * Get the recordSeparator property: record separator.
+ * Get the recordSeparator property: The string used to separate records.
*
* @return the recordSeparator value.
*/
@@ -92,7 +92,7 @@ public String getRecordSeparator() {
}
/**
- * Set the recordSeparator property: record separator.
+ * Set the recordSeparator property: The string used to separate records.
*
* @param recordSeparator the recordSeparator value to set.
* @return the DelimitedTextConfiguration object itself.
@@ -103,7 +103,7 @@ public DelimitedTextConfiguration setRecordSeparator(String recordSeparator) {
}
/**
- * Get the escapeChar property: escape char.
+ * Get the escapeChar property: The string used as an escape character.
*
* @return the escapeChar value.
*/
@@ -112,7 +112,7 @@ public String getEscapeChar() {
}
/**
- * Set the escapeChar property: escape char.
+ * Set the escapeChar property: The string used as an escape character.
*
* @param escapeChar the escapeChar value to set.
* @return the DelimitedTextConfiguration object itself.
@@ -123,21 +123,21 @@ public DelimitedTextConfiguration setEscapeChar(String escapeChar) {
}
/**
- * Get the headersPresent property: has headers.
+ * Get the headersPresent property: Represents whether the data has headers.
*
* @return the headersPresent value.
*/
- public boolean isHeadersPresent() {
+ public Boolean isHeadersPresent() {
return this.headersPresent;
}
/**
- * Set the headersPresent property: has headers.
+ * Set the headersPresent property: Represents whether the data has headers.
*
* @param headersPresent the headersPresent value to set.
* @return the DelimitedTextConfiguration object itself.
*/
- public DelimitedTextConfiguration setHeadersPresent(boolean headersPresent) {
+ public DelimitedTextConfiguration setHeadersPresent(Boolean headersPresent) {
this.headersPresent = headersPresent;
return this;
}
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/JsonTextConfiguration.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/JsonTextConfiguration.java
index 9bf067a122de..63e827253c19 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/JsonTextConfiguration.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/JsonTextConfiguration.java
@@ -13,13 +13,13 @@
@Fluent
public final class JsonTextConfiguration {
/*
- * record separator
+ * The string used to separate records.
*/
- @JsonProperty(value = "RecordSeparator", required = true)
+ @JsonProperty(value = "RecordSeparator")
private String recordSeparator;
/**
- * Get the recordSeparator property: record separator.
+ * Get the recordSeparator property: The string used to separate records.
*
* @return the recordSeparator value.
*/
@@ -28,7 +28,7 @@ public String getRecordSeparator() {
}
/**
- * Set the recordSeparator property: record separator.
+ * Set the recordSeparator property: The string used to separate records.
*
* @param recordSeparator the recordSeparator value to set.
* @return the JsonTextConfiguration object itself.
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/QueryFormat.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/QueryFormat.java
index 5318374672fd..76008b0d81c3 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/QueryFormat.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/QueryFormat.java
@@ -19,7 +19,8 @@ public final class QueryFormat {
private QueryFormatType type;
/*
- * delimited text configuration
+ * Groups the settings used for interpreting the blob data if the blob is
+ * delimited text formatted.
*/
@JsonProperty(value = "DelimitedTextConfiguration")
private DelimitedTextConfiguration delimitedTextConfiguration;
@@ -31,7 +32,8 @@ public final class QueryFormat {
private JsonTextConfiguration jsonTextConfiguration;
/*
- * arrow configuration
+ * Groups the settings used for formatting the response if the response
+ * should be Arrow formatted.
*/
@JsonProperty(value = "ArrowConfiguration")
private ArrowConfiguration arrowConfiguration;
@@ -63,7 +65,8 @@ public QueryFormat setType(QueryFormatType type) {
}
/**
- * Get the delimitedTextConfiguration property: delimited text configuration.
+ * Get the delimitedTextConfiguration property: Groups the settings used for interpreting the blob data if the blob
+ * is delimited text formatted.
*
* @return the delimitedTextConfiguration value.
*/
@@ -72,7 +75,8 @@ public DelimitedTextConfiguration getDelimitedTextConfiguration() {
}
/**
- * Set the delimitedTextConfiguration property: delimited text configuration.
+ * Set the delimitedTextConfiguration property: Groups the settings used for interpreting the blob data if the blob
+ * is delimited text formatted.
*
* @param delimitedTextConfiguration the delimitedTextConfiguration value to set.
* @return the QueryFormat object itself.
@@ -103,7 +107,8 @@ public QueryFormat setJsonTextConfiguration(JsonTextConfiguration jsonTextConfig
}
/**
- * Get the arrowConfiguration property: arrow configuration.
+ * Get the arrowConfiguration property: Groups the settings used for formatting the response if the response should
+ * be Arrow formatted.
*
* @return the arrowConfiguration value.
*/
@@ -112,7 +117,8 @@ public ArrowConfiguration getArrowConfiguration() {
}
/**
- * Set the arrowConfiguration property: arrow configuration.
+ * Set the arrowConfiguration property: Groups the settings used for formatting the response if the response should
+ * be Arrow formatted.
*
* @param arrowConfiguration the arrowConfiguration value to set.
* @return the QueryFormat object itself.
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/QueryRequest.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/QueryRequest.java
index 27f7c77c817c..cdb99cfa0107 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/QueryRequest.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/QueryRequest.java
@@ -8,18 +8,19 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
-/** the quick query body. */
+/** Groups the set of query request settings. */
@JacksonXmlRootElement(localName = "QueryRequest")
@Fluent
public final class QueryRequest {
/*
- * the query type
+ * Required. The type of the provided query expression.
*/
@JsonProperty(value = "QueryType", required = true)
private String queryType;
/*
- * a query statement
+ * The query expression in SQL. The maximum size of the query expression is
+ * 256KiB.
*/
@JsonProperty(value = "Expression", required = true)
private String expression;
@@ -42,7 +43,7 @@ public QueryRequest() {
}
/**
- * Get the queryType property: the query type.
+ * Get the queryType property: Required. The type of the provided query expression.
*
* @return the queryType value.
*/
@@ -51,7 +52,7 @@ public String getQueryType() {
}
/**
- * Set the queryType property: the query type.
+ * Set the queryType property: Required. The type of the provided query expression.
*
* @param queryType the queryType value to set.
* @return the QueryRequest object itself.
@@ -62,7 +63,7 @@ public QueryRequest setQueryType(String queryType) {
}
/**
- * Get the expression property: a query statement.
+ * Get the expression property: The query expression in SQL. The maximum size of the query expression is 256KiB.
*
* @return the expression value.
*/
@@ -71,7 +72,7 @@ public String getExpression() {
}
/**
- * Set the expression property: a query statement.
+ * Set the expression property: The query expression in SQL. The maximum size of the query expression is 256KiB.
*
* @param expression the expression value to set.
* @return the QueryRequest object itself.
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java
index 7d1e0f31de4b..22c6f70adbf5 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java
@@ -18,6 +18,8 @@
import com.azure.storage.blob.implementation.models.FilterBlobItem;
import com.azure.storage.blob.models.BlobBeginCopySourceRequestConditions;
import com.azure.storage.blob.models.BlobDownloadHeaders;
+import com.azure.storage.blob.models.BlobImmutabilityPolicy;
+import com.azure.storage.blob.models.BlobImmutabilityPolicyMode;
import com.azure.storage.blob.models.BlobItem;
import com.azure.storage.blob.models.BlobItemProperties;
import com.azure.storage.blob.models.BlobLeaseRequestConditions;
@@ -239,6 +241,13 @@ public static BlobDownloadHeaders populateBlobDownloadHeaders(
headers.setObjectReplicationSourcePolicies(objectReplicationSourcePolicies);
headers.setSealed(internalHeaders.isXMsBlobSealed());
headers.setLastAccessedTime(internalHeaders.getXMsLastAccessTime());
+ headers.setCurrentVersion(internalHeaders.isXMsIsCurrentVersion());
+
+ headers.setImmutabilityPolicy(new BlobImmutabilityPolicy()
+ .setPolicyMode(internalHeaders.getXMsImmutabilityPolicyMode() == null ? null
+ : BlobImmutabilityPolicyMode.fromString(internalHeaders.getXMsImmutabilityPolicyMode()))
+ .setExpiryTime(internalHeaders.getXMsImmutabilityPolicyUntilDate()));
+ headers.setHasLegalHold(internalHeaders.isXMsLegalHold());
return headers;
}
@@ -329,6 +338,11 @@ public static BlobItemProperties populateBlobItemProperties(BlobItemPropertiesIn
blobItemProperties.setRehydratePriority(blobItemPropertiesInternal.getRehydratePriority());
blobItemProperties.setSealed(blobItemPropertiesInternal.isSealed());
blobItemProperties.setLastAccessedTime(blobItemPropertiesInternal.getLastAccessedOn());
+ blobItemProperties.setExpiryTime(blobItemPropertiesInternal.getExpiresOn());
+ blobItemProperties.setImmutabilityPolicy(new BlobImmutabilityPolicy()
+ .setExpiryTime(blobItemPropertiesInternal.getImmutabilityPolicyExpiresOn())
+ .setPolicyMode(blobItemPropertiesInternal.getImmutabilityPolicyMode()));
+ blobItemProperties.setHasLegalHold(blobItemPropertiesInternal.isLegalHold());
return blobItemProperties;
}
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerItemProperties.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerItemProperties.java
index 8ee9941b2f2d..45577d0158ed 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerItemProperties.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerItemProperties.java
@@ -364,7 +364,7 @@ public Boolean isImmutableStorageWithVersioningEnabled() {
* @param isImmutableStorageWithVersioningEnabled the isImmutableStorageWithVersioningEnabled value to set.
* @return the BlobContainerItemProperties object itself.
*/
- public BlobContainerItemProperties setIsImmutableStorageWithVersioningEnabled(
+ public BlobContainerItemProperties setImmutableStorageWithVersioningEnabled(
Boolean isImmutableStorageWithVersioningEnabled) {
this.isImmutableStorageWithVersioningEnabled = isImmutableStorageWithVersioningEnabled;
return this;
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerProperties.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerProperties.java
index d67cbb799b59..dc48dd654ca4 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerProperties.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerProperties.java
@@ -25,6 +25,7 @@ public final class BlobContainerProperties {
private final boolean hasLegalHold;
private final String defaultEncryptionScope;
private final Boolean encryptionScopeOverridePrevented;
+ private final Boolean isImmutableStorageWithVersioningEnabled;
/**
* Constructs a {@link BlobContainerProperties}.
@@ -67,6 +68,33 @@ public BlobContainerProperties(final Map metadata, final String
final LeaseStatusType leaseStatus, final PublicAccessType blobPublicAccess, final boolean hasImmutabilityPolicy,
final boolean hasLegalHold, final String defaultEncryptionScope,
final Boolean encryptionScopeOverridePrevented) {
+ this(metadata, eTag, lastModified, leaseDuration, leaseState, leaseStatus, blobPublicAccess,
+ hasImmutabilityPolicy, hasLegalHold, defaultEncryptionScope, encryptionScopeOverridePrevented,
+ null);
+ }
+
+ /**
+ * Constructs a {@link BlobContainerProperties}.
+ *
+ * @param metadata Metadata associated with the container.
+ * @param eTag ETag of the container.
+ * @param lastModified Datetime when the container was last modified.
+ * @param leaseDuration Type of the lease on the container.
+ * @param leaseState State of the lease on the container.
+ * @param leaseStatus Status of the lease on the container.
+ * @param blobPublicAccess Public access status for the container.
+ * @param hasImmutabilityPolicy Flag indicating if the container has an immutability policy set on it.
+ * @param hasLegalHold Flag indicating if the container has a legal hold.
+ * @param defaultEncryptionScope The container's default encryption scope to encrypt blobs with.
+ * @param encryptionScopeOverridePrevented Whether or not a container's default encryption scope can be overriden
+ * @param isImmutableStorageWithVersioningEnabled Whether or not immutable storage with versioning is enabled on
+ * this container.
+ */
+ public BlobContainerProperties(final Map metadata, final String eTag,
+ final OffsetDateTime lastModified, final LeaseDurationType leaseDuration, final LeaseStateType leaseState,
+ final LeaseStatusType leaseStatus, final PublicAccessType blobPublicAccess, final boolean hasImmutabilityPolicy,
+ final boolean hasLegalHold, final String defaultEncryptionScope,
+ final Boolean encryptionScopeOverridePrevented, final Boolean isImmutableStorageWithVersioningEnabled) {
this.metadata = metadata;
this.eTag = eTag;
this.lastModified = lastModified;
@@ -78,6 +106,7 @@ public BlobContainerProperties(final Map metadata, final String
this.hasLegalHold = hasLegalHold;
this.defaultEncryptionScope = defaultEncryptionScope;
this.encryptionScopeOverridePrevented = encryptionScopeOverridePrevented;
+ this.isImmutableStorageWithVersioningEnabled = isImmutableStorageWithVersioningEnabled;
}
/**
@@ -156,4 +185,11 @@ public String getDefaultEncryptionScope() {
public Boolean isEncryptionScopeOverridePrevented() {
return encryptionScopeOverridePrevented;
}
+
+ /**
+ * @return Whether or not immutable storage with versioning is enabled on this container.
+ */
+ public Boolean isImmutableStorageWithVersioningEnabled() {
+ return isImmutableStorageWithVersioningEnabled;
+ }
}
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDownloadHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDownloadHeaders.java
index 7f8fa4c22d81..c088ba179ffd 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDownloadHeaders.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDownloadHeaders.java
@@ -332,6 +332,23 @@ public final class BlobDownloadHeaders {
@JsonProperty(value = "LastAccessTime")
private OffsetDateTime lastAccessedTime;
+ /*
+ * The x-ms-is-current-version property.
+ */
+ @JsonProperty(value = "x-ms-is-current-version")
+ private Boolean currentVersion;
+
+ /*
+ * The x-ms-immutability-policy-mode and x-ms-immutability-policy-until-date property.
+ */
+ private BlobImmutabilityPolicy immutabilityPolicy;
+
+ /*
+ * The x-ms-legal-hold property.
+ */
+ @JsonProperty(value = "x-ms-legal-hold")
+ private Boolean hasLegalHold;
+
/**
* Get the lastModified property: Returns the date and time the container
* was last modified. Any operation that modifies the blob, including an
@@ -1304,4 +1321,66 @@ public BlobDownloadHeaders setLastAccessedTime(OffsetDateTime lastAccessedTime)
this.lastAccessedTime = lastAccessedTime;
return this;
}
+
+ /**
+ * Get the currentVersion property: The x-ms-is-current-version property.
+ *
+ * @return the currentVersion value.
+ */
+ public Boolean isCurrentVersion() {
+ return this.currentVersion;
+ }
+
+ /**
+ * Set the currentVersion property: The x-ms-is-current-version property.
+ *
+ * @param currentVersion the currentVersion value to set.
+ * @return the BlobDownloadHeaders object itself.
+ */
+ public BlobDownloadHeaders setCurrentVersion(Boolean currentVersion) {
+ this.currentVersion = currentVersion;
+ return this;
+ }
+
+ /**
+ * Get the immutabilityPolicy property: The x-ms-immutability-policy-mode and x-ms-immutability-policy-until-date
+ * property.
+ *
+ * @return the immutabilityPolicy value.
+ */
+ public BlobImmutabilityPolicy getImmutabilityPolicy() {
+ return this.immutabilityPolicy;
+ }
+
+ /**
+ * Set the immutabilityPolicy property: x-ms-immutability-policy-mode and x-ms-immutability-policy-until-date
+ * property.
+ *
+ * @param immutabilityPolicy the immutabilityPolicy value to set.
+ * @return the BlobDownloadHeaders object itself.
+ */
+ public BlobDownloadHeaders setImmutabilityPolicy(BlobImmutabilityPolicy immutabilityPolicy) {
+ this.immutabilityPolicy = immutabilityPolicy;
+ return this;
+ }
+
+ /**
+ * Get the hasLegalHold property: The x-ms-legal-hold property.
+ *
+ * @return the hasLegalHold value.
+ */
+ public Boolean hasLegalHold() {
+ return this.hasLegalHold;
+ }
+
+ /**
+ * Set the hasLegalHold property: The x-ms-legal-hold property.
+ *
+ * @param hasLegalHold the xMsLegalHold value to set.
+ * @return the BlobDownloadHeaders object itself.
+ */
+ public BlobDownloadHeaders setHasLegalHold(Boolean hasLegalHold) {
+ this.hasLegalHold = hasLegalHold;
+ return this;
+ }
}
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobImmutabilityPolicy.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobImmutabilityPolicy.java
new file mode 100644
index 000000000000..c6308f8efb38
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobImmutabilityPolicy.java
@@ -0,0 +1,47 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.storage.blob.models;
+
+import java.time.OffsetDateTime;
+
+/**
+ * Optional parameters for setting the immutability policy of a blob, blob snapshot or blob version.
+ */
+public class BlobImmutabilityPolicy {
+
+ private OffsetDateTime expiryTime;
+ private BlobImmutabilityPolicyMode policyMode;
+
+ /**
+ * @return The time when the immutability policy expires.
+ */
+ public OffsetDateTime getExpiryTime() {
+ return expiryTime;
+ }
+
+ /**
+ * @param expiryTime The time when the immutability policy expires.
+ * @return The updated BlobImmutabilityPolicy
+ */
+ public BlobImmutabilityPolicy setExpiryTime(OffsetDateTime expiryTime) {
+ this.expiryTime = expiryTime;
+ return this;
+ }
+
+ /**
+ * @return The immutability policy mode.
+ */
+ public BlobImmutabilityPolicyMode getPolicyMode() {
+ return policyMode;
+ }
+
+ /**
+ * @param policyMode The immutability policy mode.
+ * @return The updated BlobImmutabilityPolicy
+ */
+ public BlobImmutabilityPolicy setPolicyMode(BlobImmutabilityPolicyMode policyMode) {
+ this.policyMode = policyMode;
+ return this;
+ }
+}
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobImmutabilityPolicyMode.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobImmutabilityPolicyMode.java
similarity index 93%
rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobImmutabilityPolicyMode.java
rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobImmutabilityPolicyMode.java
index 4c483833f7ac..c43ac19042d5 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobImmutabilityPolicyMode.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobImmutabilityPolicyMode.java
@@ -2,21 +2,21 @@
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
-package com.azure.storage.blob.implementation.models;
+package com.azure.storage.blob.models;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
/** Defines values for BlobImmutabilityPolicyMode. */
public enum BlobImmutabilityPolicyMode {
+ /** Enum value Mutable. */
+ MUTABLE("Mutable"),
+
/** Enum value Unlocked. */
UNLOCKED("Unlocked"),
/** Enum value Locked. */
- LOCKED("Locked"),
-
- /** Enum value Mutable. */
- MUTABLE("Mutable");
+ LOCKED("Locked");
/** The actual serialized value for a BlobImmutabilityPolicyMode instance. */
private final String value;
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItemProperties.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItemProperties.java
index 233ea037bacf..29bbe0d8b89f 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItemProperties.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItemProperties.java
@@ -237,6 +237,23 @@ public final class BlobItemProperties {
@JsonProperty(value = "LastAccessTime")
private OffsetDateTime lastAccessedTime;
+ /*
+ * The Expiry-Time property.
+ */
+ @JsonProperty(value = "Expiry-Time")
+ private OffsetDateTime expiryTime;
+
+ /*
+ * The ImmutabilityPolicyUntilDate and ImmutabilityPolicyMode property.
+ */
+ private BlobImmutabilityPolicy immutabilityPolicy;
+
+ /*
+ * The LegalHold property.
+ */
+ @JsonProperty(value = "LegalHold")
+ private Boolean hasLegalHold;
+
/**
* Get the creationTime property: The creationTime property.
*
@@ -985,4 +1002,64 @@ public BlobItemProperties setLastAccessedTime(OffsetDateTime lastAccessedTime) {
this.lastAccessedTime = lastAccessedTime;
return this;
}
+
+ /**
+ * Get the expiryTime property: The Expiry-Time property.
+ *
+ * @return the expiryTime value.
+ */
+ public OffsetDateTime getExpiryTime() {
+ return this.expiryTime;
+ }
+
+ /**
+ * Set the expiryTime property: The Expiry-Time property.
+ *
+ * @param expiryTime the expiryTime value to set.
+ * @return the BlobItemProperties object itself.
+ */
+ public BlobItemProperties setExpiryTime(OffsetDateTime expiryTime) {
+ this.expiryTime = expiryTime;
+ return this;
+ }
+
+ /**
+ * Get the immutabilityPolicy property: The ImmutabilityPolicyUntilDate and ImmutabilityPolicyMode property.
+ *
+ * @return the immutabilityPolicy value.
+ */
+ public BlobImmutabilityPolicy getImmutabilityPolicy() {
+ return this.immutabilityPolicy;
+ }
+
+ /**
+ * Set the immutabilityPolicy property: The ImmutabilityPolicyUntilDate and ImmutabilityPolicyMode property.
+ *
+ * @param immutabilityPolicy the immutabilityPolicy value to set.
+ * @return the BlobItemProperties object itself.
+ */
+ public BlobItemProperties setImmutabilityPolicy(BlobImmutabilityPolicy immutabilityPolicy) {
+ this.immutabilityPolicy = immutabilityPolicy;
+ return this;
+ }
+
+ /**
+ * Get the hasLegalHold property: The LegalHold property.
+ *
+ * @return the hasLegalHold value.
+ */
+ public Boolean hasLegalHold() {
+ return this.hasLegalHold;
+ }
+
+ /**
+ * Set the hasLegalHold property: The LegalHold property.
+ *
+ * @param hasLegalHold the v value to set.
+ * @return the BlobItemProperties object itself.
+ */
+ public BlobItemProperties setHasLegalHold(Boolean hasLegalHold) {
+ this.hasLegalHold = hasLegalHold;
+ return this;
+ }
}
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobLegalHoldResult.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobLegalHoldResult.java
new file mode 100644
index 000000000000..a25179528491
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobLegalHoldResult.java
@@ -0,0 +1,27 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.storage.blob.models;
+
+/**
+ * The blob legal hold result.
+ */
+public class BlobLegalHoldResult {
+
+ private final boolean hasLegalHold;
+
+ /**
+ * Creates a new BlobLegalHoldResult
+ * @param hasLegalHold whether or not a legal hold is enabled on the blob.
+ */
+ public BlobLegalHoldResult(boolean hasLegalHold) {
+ this.hasLegalHold = hasLegalHold;
+ }
+
+ /**
+ * @return whether or not a legal hold is enabled on the blob.
+ */
+ public boolean hasLegalHold() {
+ return hasLegalHold;
+ }
+}
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobListDetails.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobListDetails.java
index ba7e4ae38999..044dd4ac6e66 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobListDetails.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobListDetails.java
@@ -23,6 +23,8 @@ public final class BlobListDetails {
private boolean retrieveUncommittedBlobs;
private boolean retrieveDeletedBlobs;
private boolean retrieveVersions;
+ private boolean retrieveImmutabilityPolicy;
+ private boolean retrieveLegalHold;
/**
* Constructs an unpopulated {@link BlobListDetails}.
@@ -172,6 +174,46 @@ public BlobListDetails setRetrieveDeletedBlobs(boolean retrieveDeletedBlobs) {
return this;
}
+ /**
+ * Whether immutability policy for the blob should be returned.
+ *
+ * @return a flag indicating if immutability policy for the blob will be returned in the listing
+ */
+ public boolean getRetrieveImmutabilityPolicy() {
+ return retrieveImmutabilityPolicy;
+ }
+
+ /**
+ * Whether immutability policy for the blob should be returned.
+ *
+ * @param retrieveImmutabilityPolicy Flag indicating whether immutability policy for the blob should be returned
+ * @return the updated BlobListDetails object
+ */
+ public BlobListDetails setRetrieveImmutabilityPolicy(boolean retrieveImmutabilityPolicy) {
+ this.retrieveImmutabilityPolicy = retrieveImmutabilityPolicy;
+ return this;
+ }
+
+ /**
+ * Whether legal hold for the blob should be returned.
+ *
+ * @return a flag indicating if legal hold for the blob will be returned in the listing
+ */
+ public boolean getRetrieveLegalHold() {
+ return retrieveLegalHold;
+ }
+
+ /**
+ * Whether legal hold for the blob should be returned.
+ *
+ * @param retrieveLegalHold Flag indicating whetherlegal hold for the blob should be returned
+ * @return the updated BlobListDetails object
+ */
+ public BlobListDetails setRetrieveLegalHold(boolean retrieveLegalHold) {
+ this.retrieveLegalHold = retrieveLegalHold;
+ return this;
+ }
+
/**
* @return a list of the flag set to true
*/
@@ -198,6 +240,12 @@ public ArrayList toList() {
if (this.retrieveVersions) {
details.add(ListBlobsIncludeItem.VERSIONS);
}
+ if (this.retrieveImmutabilityPolicy) {
+ details.add(ListBlobsIncludeItem.IMMUTABILITYPOLICY);
+ }
+ if (this.retrieveLegalHold) {
+ details.add(ListBlobsIncludeItem.LEGALHOLD);
+ }
return details;
}
}
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobProperties.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobProperties.java
index ac761eb38760..cf75ae65dede 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobProperties.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobProperties.java
@@ -58,6 +58,9 @@ public final class BlobProperties {
private final Boolean isSealed;
private final OffsetDateTime lastAccessedTime;
private final OffsetDateTime expiresOn;
+ private final BlobImmutabilityPolicy immutabilityPolicy;
+ private final Boolean hasLegalHold;
+
/**
* Constructs a {@link BlobProperties}.
*
@@ -311,6 +314,80 @@ public BlobProperties(final OffsetDateTime creationTime, final OffsetDateTime la
final List objectReplicationSourcePolicies,
final String objectReplicationDestinationPolicyId, final RehydratePriority rehydratePriority,
final Boolean isSealed, final OffsetDateTime lastAccessedTime, final OffsetDateTime expiresOn) {
+ this(creationTime, lastModified, eTag, blobSize, contentType, contentMd5, contentEncoding, contentDisposition,
+ contentLanguage, cacheControl, blobSequenceNumber, blobType, leaseStatus, leaseState, leaseDuration,
+ copyId, copyStatus, copySource, copyProgress, copyCompletionTime, copyStatusDescription, isServerEncrypted,
+ isIncrementalCopy, copyDestinationSnapshot, accessTier, isAccessTierInferred, archiveStatus,
+ encryptionKeySha256, encryptionScope, accessTierChangeTime, metadata, committedBlockCount, tagCount,
+ versionId, isCurrentVersion, objectReplicationSourcePolicies, objectReplicationDestinationPolicyId,
+ rehydratePriority, isSealed, lastAccessedTime, expiresOn, null, false);
+ }
+
+ /**
+ * Constructs a {@link BlobProperties}.
+ *
+ * @param creationTime Creation time of the blob.
+ * @param lastModified Datetime when the blob was last modified.
+ * @param eTag ETag of the blob.
+ * @param blobSize Size of the blob.
+ * @param contentType Content type specified for the blob.
+ * @param contentMd5 Content MD5 specified for the blob.
+ * @param contentEncoding Content encoding specified for the blob.
+ * @param contentDisposition Content disposition specified for the blob.
+ * @param contentLanguage Content language specified for the blob.
+ * @param cacheControl Cache control specified for the blob.
+ * @param blobSequenceNumber The current sequence number for a page blob, if the blob is an append or block blob
+ * pass {@code null}.
+ * @param blobType Type of the blob.
+ * @param leaseStatus Status of the lease on the blob.
+ * @param leaseState State of the lease on the blob.
+ * @param leaseDuration Type of lease on the blob.
+ * @param copyId Identifier of the last copy operation performed on the blob.
+ * @param copyStatus Status of the last copy operation performed on the blob.
+ * @param copySource Source of the last copy operation performed on the blob.
+ * @param copyProgress Progress of the last copy operation performed on the blob.
+ * @param copyCompletionTime Datetime when the last copy operation on the blob completed.
+ * @param copyStatusDescription Description of the last copy operation on the blob.
+ * @param isServerEncrypted Flag indicating if the blob's content is encrypted on the server.
+ * @param isIncrementalCopy Flag indicating if the blob was incrementally copied.
+ * @param copyDestinationSnapshot Snapshot identifier of the last incremental copy snapshot for the blob.
+ * @param accessTier Access tier of the blob.
+ * @param isAccessTierInferred Flag indicating if the access tier of the blob was inferred from properties of the
+ * blob.
+ * @param archiveStatus Archive status of the blob.
+ * @param encryptionKeySha256 SHA256 of the customer provided encryption key used to encrypt the blob on the server.
+ * @param encryptionScope The name of the encryption scope under which the blob is encrypted.
+ * @param accessTierChangeTime Datetime when the access tier of the blob last changed.
+ * @param metadata Metadata associated with the blob.
+ * @param committedBlockCount Number of blocks committed to an append blob, if the blob is a block or page blob
+ * pass {@code null}.
+ * @param versionId The version identifier of the blob.
+ * @param isCurrentVersion Flag indicating if version identifier points to current version of the blob.
+ * @param tagCount Number of tags associated with the blob.
+ * @param objectReplicationSourcePolicies The already parsed object replication policies.
+ * @param objectReplicationDestinationPolicyId The policy id on the destination blob.
+ * @param rehydratePriority The rehydrate priority
+ * @param isSealed Whether or not the blob is sealed.
+ * @param lastAccessedTime The date and time the blob was read or written to.
+ * @param expiresOn The time when the blob is going to expire.
+ * @param immutabilityPolicy the immutability policy of the blob.
+ * @param hasLegalHold whether or not the blob has a legal hold.
+ */
+ public BlobProperties(final OffsetDateTime creationTime, final OffsetDateTime lastModified, final String eTag,
+ final long blobSize, final String contentType, final byte[] contentMd5, final String contentEncoding,
+ final String contentDisposition, final String contentLanguage, final String cacheControl,
+ final Long blobSequenceNumber, final BlobType blobType, final LeaseStatusType leaseStatus,
+ final LeaseStateType leaseState, final LeaseDurationType leaseDuration, final String copyId,
+ final CopyStatusType copyStatus, final String copySource, final String copyProgress,
+ final OffsetDateTime copyCompletionTime, final String copyStatusDescription, final Boolean isServerEncrypted,
+ final Boolean isIncrementalCopy, final String copyDestinationSnapshot, final AccessTier accessTier,
+ final Boolean isAccessTierInferred, final ArchiveStatus archiveStatus, final String encryptionKeySha256,
+ final String encryptionScope, final OffsetDateTime accessTierChangeTime, final Map metadata,
+ final Integer committedBlockCount, final Long tagCount, final String versionId, final Boolean isCurrentVersion,
+ final List objectReplicationSourcePolicies,
+ final String objectReplicationDestinationPolicyId, final RehydratePriority rehydratePriority,
+ final Boolean isSealed, final OffsetDateTime lastAccessedTime, final OffsetDateTime expiresOn,
+ BlobImmutabilityPolicy immutabilityPolicy, Boolean hasLegalHold) {
this.creationTime = creationTime;
this.lastModified = lastModified;
this.eTag = eTag;
@@ -352,6 +429,8 @@ public BlobProperties(final OffsetDateTime creationTime, final OffsetDateTime la
this.isSealed = isSealed;
this.lastAccessedTime = lastAccessedTime;
this.expiresOn = expiresOn;
+ this.immutabilityPolicy = immutabilityPolicy;
+ this.hasLegalHold = hasLegalHold;
}
/**
@@ -655,4 +734,18 @@ public OffsetDateTime getLastAccessedTime() {
public OffsetDateTime getExpiresOn() {
return expiresOn;
}
+
+ /**
+ * @return the immutability policy.
+ */
+ public BlobImmutabilityPolicy getImmutabilityPolicy() {
+ return immutabilityPolicy;
+ }
+
+ /**
+ * @return whether or not the blob has a legal hold.
+ */
+ public Boolean hasLegalHold() {
+ return hasLegalHold;
+ }
}
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsIncludeItem.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsIncludeItem.java
index ad4397648c4d..c6e027742245 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsIncludeItem.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsIncludeItem.java
@@ -34,7 +34,10 @@ public enum ListBlobsIncludeItem {
IMMUTABILITYPOLICY("immutabilitypolicy"),
/** Enum value legalhold. */
- LEGALHOLD("legalhold");
+ LEGALHOLD("legalhold"),
+
+ /** Enum value deletedwithversions. */
+ DELETEDWITHVERSIONS("deletedwithversions");
/** The actual serialized value for a ListBlobsIncludeItem instance. */
private final String value;
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/AppendBlobCreateOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/AppendBlobCreateOptions.java
index 27ab7db71b62..8991c7916c1d 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/AppendBlobCreateOptions.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/AppendBlobCreateOptions.java
@@ -5,6 +5,7 @@
import com.azure.core.annotation.Fluent;
import com.azure.storage.blob.models.BlobHttpHeaders;
+import com.azure.storage.blob.models.BlobImmutabilityPolicy;
import com.azure.storage.blob.models.BlobRequestConditions;
import java.util.Map;
@@ -18,6 +19,8 @@ public class AppendBlobCreateOptions {
private Map metadata;
private Map tags;
private BlobRequestConditions requestConditions;
+ private BlobImmutabilityPolicy immutabilityPolicy;
+ private Boolean legalHold;
/**
* @return {@link BlobHttpHeaders}
@@ -82,4 +85,40 @@ public AppendBlobCreateOptions setRequestConditions(BlobRequestConditions reques
this.requestConditions = requestConditions;
return this;
}
+
+ /**
+ * @return {@link BlobImmutabilityPolicy}
+ */
+ public BlobImmutabilityPolicy getImmutabilityPolicy() {
+ return immutabilityPolicy;
+ }
+
+ /**
+ * Note that this parameter is only applicable to a blob within a container that has immutable storage with
+ * versioning enabled.
+ * @param immutabilityPolicy {@link BlobImmutabilityPolicy}
+ * @return The updated options.
+ */
+ public AppendBlobCreateOptions setImmutabilityPolicy(BlobImmutabilityPolicy immutabilityPolicy) {
+ this.immutabilityPolicy = immutabilityPolicy;
+ return this;
+ }
+
+ /**
+ * @return If a legal hold should be placed on the blob.
+ */
+ public Boolean isLegalHold() {
+ return legalHold;
+ }
+
+ /**
+ * Note that this parameter is only applicable to a blob within a container that has immutable storage with
+ * versioning enabled.
+ * @param legalHold Indicates if a legal hold should be placed on the blob.
+ * @return The updated options.
+ */
+ public AppendBlobCreateOptions setLegalHold(Boolean legalHold) {
+ this.legalHold = legalHold;
+ return this;
+ }
}
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlobBeginCopyOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlobBeginCopyOptions.java
index ecf3da6949d0..a025c6bf33e7 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlobBeginCopyOptions.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlobBeginCopyOptions.java
@@ -5,6 +5,7 @@
import com.azure.core.annotation.Fluent;
import com.azure.storage.blob.models.AccessTier;
+import com.azure.storage.blob.models.BlobImmutabilityPolicy;
import com.azure.storage.blob.models.BlobRequestConditions;
import com.azure.storage.blob.models.BlobBeginCopySourceRequestConditions;
import com.azure.storage.blob.models.RehydratePriority;
@@ -27,6 +28,8 @@ public class BlobBeginCopyOptions {
private BlobRequestConditions destinationRequestConditions;
private Duration pollInterval;
private Boolean sealDestination;
+ private BlobImmutabilityPolicy immutabilityPolicy;
+ private Boolean legalHold;
/**
* @param sourceUrl The source URL to copy from. URLs outside of Azure may only be copied to block blobs.
@@ -176,4 +179,40 @@ public BlobBeginCopyOptions setSealDestination(Boolean sealDestination) {
this.sealDestination = sealDestination;
return this;
}
+
+ /**
+ * @return {@link BlobImmutabilityPolicy}
+ */
+ public BlobImmutabilityPolicy getImmutabilityPolicy() {
+ return immutabilityPolicy;
+ }
+
+ /**
+ * Note that this parameter is only applicable to a blob within a container that has immutable storage with
+ * versioning enabled.
+ * @param immutabilityPolicy {@link BlobImmutabilityPolicy}
+ * @return The updated options.
+ */
+ public BlobBeginCopyOptions setImmutabilityPolicy(BlobImmutabilityPolicy immutabilityPolicy) {
+ this.immutabilityPolicy = immutabilityPolicy;
+ return this;
+ }
+
+ /**
+ * @return If a legal hold should be placed on the blob.
+ */
+ public Boolean isLegalHold() {
+ return legalHold;
+ }
+
+ /**
+ * Note that this parameter is only applicable to a blob within a container that has immutable storage with
+ * versioning enabled.
+ * @param legalHold Indicates if a legal hold should be placed on the blob.
+ * @return The updated options.
+ */
+ public BlobBeginCopyOptions setLegalHold(Boolean legalHold) {
+ this.legalHold = legalHold;
+ return this;
+ }
}
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlobCopyFromUrlOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlobCopyFromUrlOptions.java
index 5e92e2d9d499..bb96450327a8 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlobCopyFromUrlOptions.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlobCopyFromUrlOptions.java
@@ -6,6 +6,7 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.http.RequestConditions;
import com.azure.storage.blob.models.AccessTier;
+import com.azure.storage.blob.models.BlobImmutabilityPolicy;
import com.azure.storage.blob.models.BlobRequestConditions;
import com.azure.storage.common.implementation.StorageImplUtils;
@@ -22,6 +23,8 @@ public class BlobCopyFromUrlOptions {
private AccessTier tier;
private RequestConditions sourceRequestConditions;
private BlobRequestConditions destinationRequestConditions;
+ private BlobImmutabilityPolicy immutabilityPolicy;
+ private Boolean legalHold;
/**
* @param copySource The source URL to copy from. URLs outside of Azure may only be copied to block blobs.
@@ -118,4 +121,40 @@ public BlobCopyFromUrlOptions setDestinationRequestConditions(BlobRequestConditi
this.destinationRequestConditions = destinationRequestConditions;
return this;
}
+
+ /**
+ * @return {@link BlobImmutabilityPolicy}
+ */
+ public BlobImmutabilityPolicy getImmutabilityPolicy() {
+ return immutabilityPolicy;
+ }
+
+ /**
+ * Note that this parameter is only applicable to a blob within a container that has immutable storage with
+ * versioning enabled.
+ * @param immutabilityPolicy {@link BlobImmutabilityPolicy}
+ * @return The updated options.
+ */
+ public BlobCopyFromUrlOptions setImmutabilityPolicy(BlobImmutabilityPolicy immutabilityPolicy) {
+ this.immutabilityPolicy = immutabilityPolicy;
+ return this;
+ }
+
+ /**
+ * @return If a legal hold should be placed on the blob.
+ */
+ public Boolean isLegalHold() {
+ return legalHold;
+ }
+
+ /**
+ * Note that this parameter is only applicable to a blob within a container that has immutable storage with
+ * versioning enabled.
+ * @param legalHold Indicates if a legal hold should be placed on the blob.
+ * @return The updated options.
+ */
+ public BlobCopyFromUrlOptions setLegalHold(Boolean legalHold) {
+ this.legalHold = legalHold;
+ return this;
+ }
}
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlobParallelUploadOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlobParallelUploadOptions.java
index b4825c1b2a0b..3943a4230f46 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlobParallelUploadOptions.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlobParallelUploadOptions.java
@@ -9,6 +9,7 @@
import com.azure.storage.blob.BlobClient;
import com.azure.storage.blob.models.AccessTier;
import com.azure.storage.blob.models.BlobHttpHeaders;
+import com.azure.storage.blob.models.BlobImmutabilityPolicy;
import com.azure.storage.blob.models.BlobRequestConditions;
import com.azure.storage.blob.models.ParallelTransferOptions;
import com.azure.storage.common.implementation.StorageImplUtils;
@@ -35,6 +36,8 @@ public class BlobParallelUploadOptions {
private BlobRequestConditions requestConditions;
private boolean computeMd5;
private Duration timeout;
+ private BlobImmutabilityPolicy immutabilityPolicy;
+ private Boolean legalHold;
/**
* Constructs a new {@code BlobParallelUploadOptions}.
@@ -274,4 +277,40 @@ public BlobParallelUploadOptions setTimeout(Duration timeout) {
this.timeout = timeout;
return this;
}
+
+ /**
+ * @return {@link BlobImmutabilityPolicy}
+ */
+ public BlobImmutabilityPolicy getImmutabilityPolicy() {
+ return immutabilityPolicy;
+ }
+
+ /**
+ * Note that this parameter is only applicable to a blob within a container that has immutable storage with
+ * versioning enabled.
+ * @param immutabilityPolicy {@link BlobImmutabilityPolicy}
+ * @return The updated options.
+ */
+ public BlobParallelUploadOptions setImmutabilityPolicy(BlobImmutabilityPolicy immutabilityPolicy) {
+ this.immutabilityPolicy = immutabilityPolicy;
+ return this;
+ }
+
+ /**
+ * @return If a legal hold should be placed on the blob.
+ */
+ public Boolean isLegalHold() {
+ return legalHold;
+ }
+
+ /**
+ * Note that this parameter is only applicable to a blob within a container that has immutable storage with
+ * versioning enabled.
+ * @param legalHold Indicates if a legal hold should be placed on the blob.
+ * @return The updated options.
+ */
+ public BlobParallelUploadOptions setLegalHold(Boolean legalHold) {
+ this.legalHold = legalHold;
+ return this;
+ }
}
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlockBlobCommitBlockListOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlockBlobCommitBlockListOptions.java
index 8f1fa15aa107..3227f8f6ebae 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlockBlobCommitBlockListOptions.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlockBlobCommitBlockListOptions.java
@@ -6,6 +6,7 @@
import com.azure.core.annotation.Fluent;
import com.azure.storage.blob.models.AccessTier;
import com.azure.storage.blob.models.BlobHttpHeaders;
+import com.azure.storage.blob.models.BlobImmutabilityPolicy;
import com.azure.storage.blob.models.BlobRequestConditions;
import java.util.Collections;
@@ -23,6 +24,8 @@ public class BlockBlobCommitBlockListOptions {
private Map tags;
private AccessTier tier;
private BlobRequestConditions requestConditions;
+ private BlobImmutabilityPolicy immutabilityPolicy;
+ private Boolean legalHold;
/**
* @param base64BlockIds A list of base64 encode {@code String}s that specifies the block IDs to be committed.
@@ -117,4 +120,40 @@ public BlockBlobCommitBlockListOptions setRequestConditions(BlobRequestCondition
this.requestConditions = requestConditions;
return this;
}
+
+ /**
+ * @return {@link BlobImmutabilityPolicy}
+ */
+ public BlobImmutabilityPolicy getImmutabilityPolicy() {
+ return immutabilityPolicy;
+ }
+
+ /**
+ * Note that this parameter is only applicable to a blob within a container that has immutable storage with
+ * versioning enabled.
+ * @param immutabilityPolicy {@link BlobImmutabilityPolicy}
+ * @return The updated options.
+ */
+ public BlockBlobCommitBlockListOptions setImmutabilityPolicy(BlobImmutabilityPolicy immutabilityPolicy) {
+ this.immutabilityPolicy = immutabilityPolicy;
+ return this;
+ }
+
+ /**
+ * @return If a legal hold should be placed on the blob.
+ */
+ public Boolean isLegalHold() {
+ return legalHold;
+ }
+
+ /**
+ * Note that this parameter is only applicable to a blob within a container that has immutable storage with
+ * versioning enabled.
+ * @param legalHold Indicates if a legal hold should be placed on the blob.
+ * @return The updated options.
+ */
+ public BlockBlobCommitBlockListOptions setLegalHold(Boolean legalHold) {
+ this.legalHold = legalHold;
+ return this;
+ }
}
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlockBlobSimpleUploadOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlockBlobSimpleUploadOptions.java
index bf1c9e0a83ae..d99af6534346 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlockBlobSimpleUploadOptions.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlockBlobSimpleUploadOptions.java
@@ -6,6 +6,7 @@
import com.azure.core.util.CoreUtils;
import com.azure.storage.blob.models.AccessTier;
import com.azure.storage.blob.models.BlobHttpHeaders;
+import com.azure.storage.blob.models.BlobImmutabilityPolicy;
import com.azure.storage.blob.models.BlobRequestConditions;
import com.azure.storage.common.implementation.StorageImplUtils;
import reactor.core.publisher.Flux;
@@ -27,6 +28,8 @@ public class BlockBlobSimpleUploadOptions {
private AccessTier tier;
private byte[] contentMd5;
private BlobRequestConditions requestConditions;
+ private BlobImmutabilityPolicy immutabilityPolicy;
+ private Boolean legalHold;
/**
* @param data The data to write to the blob. Note that this {@code Flux} must be replayable if retries are enabled
@@ -179,4 +182,40 @@ public BlockBlobSimpleUploadOptions setRequestConditions(BlobRequestConditions r
this.requestConditions = requestConditions;
return this;
}
+
+ /**
+ * @return {@link BlobImmutabilityPolicy}
+ */
+ public BlobImmutabilityPolicy getImmutabilityPolicy() {
+ return immutabilityPolicy;
+ }
+
+ /**
+ * Note that this parameter is only applicable to a blob within a container that has immutable storage with
+ * versioning enabled.
+ * @param immutabilityPolicy {@link BlobImmutabilityPolicy}
+ * @return The updated options.
+ */
+ public BlockBlobSimpleUploadOptions setImmutabilityPolicy(BlobImmutabilityPolicy immutabilityPolicy) {
+ this.immutabilityPolicy = immutabilityPolicy;
+ return this;
+ }
+
+ /**
+ * @return If a legal hold should be placed on the blob.
+ */
+ public Boolean isLegalHold() {
+ return legalHold;
+ }
+
+ /**
+ * Note that this parameter is only applicable to a blob within a container that has immutable storage with
+ * versioning enabled.
+ * @param legalHold Indicates if a legal hold should be placed on the blob.
+ * @return The updated options.
+ */
+ public BlockBlobSimpleUploadOptions setLegalHold(Boolean legalHold) {
+ this.legalHold = legalHold;
+ return this;
+ }
}
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/PageBlobCreateOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/PageBlobCreateOptions.java
index 89f6e3b4e801..915b1da1071c 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/PageBlobCreateOptions.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/PageBlobCreateOptions.java
@@ -4,6 +4,7 @@
package com.azure.storage.blob.options;
import com.azure.storage.blob.models.BlobHttpHeaders;
+import com.azure.storage.blob.models.BlobImmutabilityPolicy;
import com.azure.storage.blob.models.BlobRequestConditions;
import java.util.Map;
@@ -18,6 +19,8 @@ public class PageBlobCreateOptions {
private Map metadata;
private Map tags;
private BlobRequestConditions requestConditions;
+ private BlobImmutabilityPolicy immutabilityPolicy;
+ private Boolean legalHold;
/**
* @param size Specifies the maximum size for the page blob, up to 8 TB. The page blob size must be aligned to a
@@ -116,4 +119,40 @@ public PageBlobCreateOptions setRequestConditions(BlobRequestConditions requestC
this.requestConditions = requestConditions;
return this;
}
+
+ /**
+ * @return {@link BlobImmutabilityPolicy}
+ */
+ public BlobImmutabilityPolicy getImmutabilityPolicy() {
+ return immutabilityPolicy;
+ }
+
+ /**
+ * Note that this parameter is only applicable to a blob within a container that has immutable storage with
+ * versioning enabled.
+ * @param immutabilityPolicy {@link BlobImmutabilityPolicy}
+ * @return The updated options.
+ */
+ public PageBlobCreateOptions setImmutabilityPolicy(BlobImmutabilityPolicy immutabilityPolicy) {
+ this.immutabilityPolicy = immutabilityPolicy;
+ return this;
+ }
+
+ /**
+ * @return If a legal hold should be placed on the blob.
+ */
+ public Boolean isLegalHold() {
+ return legalHold;
+ }
+
+ /**
+ * Note that this parameter is only applicable to a blob within a container that has immutable storage with
+ * versioning enabled.
+ * @param legalHold Indicates if a legal hold should be placed on the blob.
+ * @return The updated options.
+ */
+ public PageBlobCreateOptions setLegalHold(Boolean legalHold) {
+ this.legalHold = legalHold;
+ return this;
+ }
}
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/sas/BlobContainerSasPermission.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/sas/BlobContainerSasPermission.java
index 71387cc63efd..f939f6458c0c 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/sas/BlobContainerSasPermission.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/sas/BlobContainerSasPermission.java
@@ -35,6 +35,8 @@ public final class BlobContainerSasPermission {
private boolean executePermission;
+ private boolean immutabilityPolicyPermission;
+
/**
* Initializes an {@code BlobContainerSasPermission} object with all fields set to false.
*/
@@ -47,7 +49,8 @@ public BlobContainerSasPermission() {
*
* @param permissionString A {@code String} which represents the {@code BlobContainerSasPermission}.
* @return A {@code BlobContainerSasPermission} generated from the given {@code String}.
- * @throws IllegalArgumentException If {@code permissionString} contains a character other than r, a, c, w, d, x, l or t.
+ * @throws IllegalArgumentException If {@code permString} contains a character other than r, a, c, w, d, x, l, t or
+ * i.
*/
public static BlobContainerSasPermission parse(String permissionString) {
BlobContainerSasPermission permissions = new BlobContainerSasPermission();
@@ -85,6 +88,9 @@ public static BlobContainerSasPermission parse(String permissionString) {
case 'e':
permissions.executePermission = true;
break;
+ case 'i':
+ permissions.immutabilityPolicyPermission = true;
+ break;
default:
throw new IllegalArgumentException(
String.format(Locale.ROOT, Constants.ENUM_COULD_NOT_BE_PARSED_INVALID_VALUE,
@@ -274,6 +280,24 @@ public BlobContainerSasPermission setExecutePermission(boolean hasExecutePermiss
return this;
}
+ /**
+ * @return the set immutability policy permission status.
+ */
+ public boolean hasImmutabilityPolicyPermission() {
+ return immutabilityPolicyPermission;
+ }
+
+ /**
+ * Sets the set immutability policy permission status.
+ *
+ * @param immutabilityPolicyPermission Permission status to set
+ * @return the updated BlobSasPermission object.
+ */
+ public BlobContainerSasPermission setImmutabilityPolicyPermission(boolean immutabilityPolicyPermission) {
+ this.immutabilityPolicyPermission = immutabilityPolicyPermission;
+ return this;
+ }
+
/**
* Converts the given permissions to a {@code String}. Using this method will guarantee the permissions are in an
* order accepted by the service.
@@ -326,6 +350,10 @@ public String toString() {
builder.append('e');
}
+ if (this.immutabilityPolicyPermission) {
+ builder.append('i');
+ }
+
return builder.toString();
}
}
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/sas/BlobSasPermission.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/sas/BlobSasPermission.java
index a4b55cd4d914..7098aff0abb4 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/sas/BlobSasPermission.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/sas/BlobSasPermission.java
@@ -35,6 +35,8 @@ public final class BlobSasPermission {
private boolean executePermission;
+ private boolean immutabilityPolicyPermission;
+
/**
* Initializes a {@code BlobSasPermission} object with all fields set to false.
*/
@@ -47,8 +49,8 @@ public BlobSasPermission() {
*
* @param permissionString A {@code String} which represents the {@code BlobSasPermission}.
* @return A {@code BlobSasPermission} generated from the given {@code String}.
- * @throws IllegalArgumentException If {@code permissionString} contains a character other than r, a, c, w, d, x, l, t,
- * m, or e.
+ * @throws IllegalArgumentException If {@code permString} contains a character other than r, a, c, w, d, x, l, t,
+ * m, e or i.
*/
public static BlobSasPermission parse(String permissionString) {
BlobSasPermission permissions = new BlobSasPermission();
@@ -86,6 +88,9 @@ public static BlobSasPermission parse(String permissionString) {
case 'e':
permissions.executePermission = true;
break;
+ case 'i':
+ permissions.immutabilityPolicyPermission = true;
+ break;
default:
throw new IllegalArgumentException(
String.format(Locale.ROOT, Constants.ENUM_COULD_NOT_BE_PARSED_INVALID_VALUE,
@@ -275,6 +280,23 @@ public BlobSasPermission setExecutePermission(boolean hasExecutePermission) {
return this;
}
+ /**
+ * @return the set immutability policy permission status.
+ */
+ public boolean hasImmutabilityPolicyPermission() {
+ return immutabilityPolicyPermission;
+ }
+
+ /**
+ * Sets the set immutability policy permission status.
+ *
+ * @param immutabilityPolicyPermission Permission status to set
+ * @return the updated BlobSasPermission object.
+ */
+ public BlobSasPermission setImmutabilityPolicyPermission(boolean immutabilityPolicyPermission) {
+ this.immutabilityPolicyPermission = immutabilityPolicyPermission;
+ return this;
+ }
/**
* Converts the given permissions to a {@code String}. Using this method will guarantee the permissions are in an
@@ -329,6 +351,10 @@ public String toString() {
builder.append('e');
}
+ if (this.immutabilityPolicyPermission) {
+ builder.append('i');
+ }
+
return builder.toString();
}
}
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobAsyncClient.java
index 83a1ba8b4f7f..da6752f193aa 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobAsyncClient.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobAsyncClient.java
@@ -21,6 +21,7 @@
import com.azure.storage.blob.implementation.models.AppendBlobsAppendBlockHeaders;
import com.azure.storage.blob.implementation.models.AppendBlobsCreateHeaders;
import com.azure.storage.blob.implementation.models.EncryptionScope;
+import com.azure.storage.blob.models.BlobImmutabilityPolicy;
import com.azure.storage.blob.options.AppendBlobCreateOptions;
import com.azure.storage.blob.models.AppendBlobRequestConditions;
import com.azure.storage.blob.models.AppendBlobItem;
@@ -194,12 +195,15 @@ Mono> createWithResponse(AppendBlobCreateOptions option
BlobRequestConditions requestConditions = options.getRequestConditions();
requestConditions = (requestConditions == null) ? new BlobRequestConditions() : requestConditions;
context = context == null ? Context.NONE : context;
+ BlobImmutabilityPolicy immutabilityPolicy = options.getImmutabilityPolicy() == null
+ ? new BlobImmutabilityPolicy() : options.getImmutabilityPolicy();
return this.azureBlobStorage.getAppendBlobs().createWithResponseAsync(containerName, blobName, 0, null,
options.getMetadata(), requestConditions.getLeaseId(), requestConditions.getIfModifiedSince(),
requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(),
requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null,
- tagsToString(options.getTags()), null, null, null, options.getHeaders(), getCustomerProvidedKey(),
+ tagsToString(options.getTags()), immutabilityPolicy.getExpiryTime(), immutabilityPolicy.getPolicyMode(),
+ options.isLegalHold(), options.getHeaders(), getCustomerProvidedKey(),
encryptionScope, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE))
.map(rb -> {
AppendBlobsCreateHeaders hd = rb.getDeserializedHeaders();
@@ -369,7 +373,7 @@ Mono> appendBlockFromUrlWithResponse(String sourceUrl,
destRequestConditions.getIfMatch(), destRequestConditions.getIfNoneMatch(),
destRequestConditions.getTagsConditions(), sourceRequestConditions.getIfModifiedSince(),
sourceRequestConditions.getIfUnmodifiedSince(), sourceRequestConditions.getIfMatch(),
- sourceRequestConditions.getIfNoneMatch(), null, getCustomerProvidedKey(), encryptionScope,
+ sourceRequestConditions.getIfNoneMatch(), null, null, getCustomerProvidedKey(), encryptionScope,
context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE))
.map(rb -> {
AppendBlobsAppendBlockFromUrlHeaders hd = rb.getDeserializedHeaders();
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java
index 8a358e19ecb9..f92df4953b6e 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java
@@ -30,6 +30,7 @@
import com.azure.storage.blob.implementation.models.BlobTags;
import com.azure.storage.blob.implementation.models.BlobsGetAccountInfoHeaders;
import com.azure.storage.blob.implementation.models.BlobsGetPropertiesHeaders;
+import com.azure.storage.blob.implementation.models.BlobsSetImmutabilityPolicyHeaders;
import com.azure.storage.blob.implementation.models.BlobsStartCopyFromURLHeaders;
import com.azure.storage.blob.implementation.models.EncryptionScope;
import com.azure.storage.blob.implementation.models.QueryRequest;
@@ -46,6 +47,9 @@
import com.azure.storage.blob.models.BlobCopyInfo;
import com.azure.storage.blob.models.BlobDownloadAsyncResponse;
import com.azure.storage.blob.models.BlobHttpHeaders;
+import com.azure.storage.blob.models.BlobImmutabilityPolicy;
+import com.azure.storage.blob.models.BlobImmutabilityPolicyMode;
+import com.azure.storage.blob.models.BlobLegalHoldResult;
import com.azure.storage.blob.models.BlobProperties;
import com.azure.storage.blob.models.BlobQueryAsyncResponse;
import com.azure.storage.blob.models.BlobRange;
@@ -542,13 +546,16 @@ public PollerFlux beginCopy(BlobBeginCopyOptions options) {
options.getDestinationRequestConditions() == null
? new BlobRequestConditions()
: options.getDestinationRequestConditions();
+ final BlobImmutabilityPolicy immutabilityPolicy = options.getImmutabilityPolicy() == null
+ ? new BlobImmutabilityPolicy() : options.getImmutabilityPolicy();
return new PollerFlux<>(interval,
(pollingContext) -> {
try {
return onStart(options.getSourceUrl(), options.getMetadata(), options.getTags(),
options.getTier(), options.getRehydratePriority(), options.isSealDestination(),
- sourceModifiedCondition, destinationRequestConditions);
+ sourceModifiedCondition, destinationRequestConditions, immutabilityPolicy,
+ options.isLegalHold());
} catch (RuntimeException ex) {
return monoError(logger, ex);
}
@@ -581,7 +588,8 @@ public PollerFlux beginCopy(BlobBeginCopyOptions options) {
private Mono onStart(String sourceUrl, Map metadata, Map tags,
AccessTier tier, RehydratePriority priority, Boolean sealBlob,
BlobBeginCopySourceRequestConditions sourceModifiedRequestConditions,
- BlobRequestConditions destinationRequestConditions) {
+ BlobRequestConditions destinationRequestConditions, BlobImmutabilityPolicy immutabilityPolicy,
+ Boolean legalHold) {
URL url;
try {
url = new URL(sourceUrl);
@@ -597,7 +605,8 @@ private Mono onStart(String sourceUrl, Map metadat
destinationRequestConditions.getIfModifiedSince(), destinationRequestConditions.getIfUnmodifiedSince(),
destinationRequestConditions.getIfMatch(), destinationRequestConditions.getIfNoneMatch(),
destinationRequestConditions.getTagsConditions(), destinationRequestConditions.getLeaseId(), null,
- tagsToString(tags), sealBlob, null, null, null, context))
+ tagsToString(tags), sealBlob, immutabilityPolicy.getExpiryTime(), immutabilityPolicy.getPolicyMode(),
+ legalHold, context))
.map(response -> {
final BlobsStartCopyFromURLHeaders headers = response.getDeserializedHeaders();
@@ -816,6 +825,8 @@ Mono> copyFromUrlWithResponse(BlobCopyFromUrlOptions options, C
? new RequestConditions() : options.getSourceRequestConditions();
BlobRequestConditions destRequestConditions = options.getDestinationRequestConditions() == null
? new BlobRequestConditions() : options.getDestinationRequestConditions();
+ BlobImmutabilityPolicy immutabilityPolicy = options.getImmutabilityPolicy() == null
+ ? new BlobImmutabilityPolicy() : options.getImmutabilityPolicy();
URL url;
try {
@@ -832,7 +843,8 @@ Mono> copyFromUrlWithResponse(BlobCopyFromUrlOptions options, C
destRequestConditions.getIfUnmodifiedSince(), destRequestConditions.getIfMatch(),
destRequestConditions.getIfNoneMatch(), destRequestConditions.getTagsConditions(),
destRequestConditions.getLeaseId(), null, null,
- tagsToString(options.getTags()), null, null, null, context)
+ tagsToString(options.getTags()), immutabilityPolicy.getExpiryTime(), immutabilityPolicy.getPolicyMode(),
+ options.isLegalHold(), null, context)
.map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getXMsCopyId()));
}
@@ -1291,7 +1303,7 @@ private static Response buildBlobPropertiesResponse(BlobDownload
hd.getEncryptionKeySha256(), hd.getEncryptionScope(), null, hd.getMetadata(),
hd.getBlobCommittedBlockCount(), hd.getTagCount(), hd.getVersionId(), null,
hd.getObjectReplicationSourcePolicies(), hd.getObjectReplicationDestinationPolicyId(), null,
- hd.isSealed(), hd.getLastAccessedTime(), null);
+ hd.isSealed(), hd.getLastAccessedTime(), null, hd.getImmutabilityPolicy(), hd.hasLegalHold());
return new SimpleResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), properties);
}
@@ -1445,7 +1457,9 @@ Mono> getPropertiesWithResponse(BlobRequestConditions r
ModelHelper.getObjectReplicationSourcePolicies(hd.getXMsOr()),
ModelHelper.getObjectReplicationDestinationPolicyId(hd.getXMsOr()),
RehydratePriority.fromString(hd.getXMsRehydratePriority()), hd.isXMsBlobSealed(),
- hd.getXMsLastAccessTime(), hd.getXMsExpiryTime());
+ hd.getXMsLastAccessTime(), hd.getXMsExpiryTime(), new BlobImmutabilityPolicy()
+ .setExpiryTime(hd.getXMsImmutabilityPolicyUntilDate())
+ .setPolicyMode(hd.getXMsImmutabilityPolicyMode()), hd.isXMsLegalHold());
return new SimpleResponse<>(rb, properties);
});
}
@@ -2083,4 +2097,174 @@ qr, getCustomerProvidedKey(), context)
.read(),
ModelHelper.transformQueryHeaders(response.getHeaders())));
}
+
+ /**
+ * Sets the immutability policy on a blob, blob snapshot or blob version.
+ * NOTE: Blob Versioning must be enabled on your storage account and the blob must be in a container with
+ * object level immutable policy enabled to call this API.
+ *
+ * Code Samples
+ *
+ * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.setImmutabilityPolicy#BlobImmutabilityPolicy}
+ *
+ * @param immutabilityPolicy {@link BlobImmutabilityPolicy The immutability policy}.
+ * @return A reactive response containing the immutability policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono setImmutabilityPolicy(BlobImmutabilityPolicy immutabilityPolicy) {
+ try {
+ return setImmutabilityPolicyWithResponse(immutabilityPolicy, null).flatMap(FluxUtil::toMono);
+ } catch (RuntimeException ex) {
+ return monoError(logger, ex);
+ }
+ }
+
+ /**
+ * Sets the immutability policy on a blob, blob snapshot or blob version.
+ * NOTE: Blob Versioning must be enabled on your storage account and the blob must be in a container with
+ * immutable storage with versioning enabled to call this API.
+ *
+ * Code Samples
+ *
+ * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.setImmutabilityPolicyWithResponse#BlobImmutabilityPolicy-BlobRequestConditions}
+ *
+ * @param immutabilityPolicy {@link BlobImmutabilityPolicy The immutability policy}.
+ * @param requestConditions {@link BlobRequestConditions}
+ * @return A reactive response containing the immutability policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> setImmutabilityPolicyWithResponse(
+ BlobImmutabilityPolicy immutabilityPolicy, BlobRequestConditions requestConditions) {
+ try {
+ return withContext(context -> setImmutabilityPolicyWithResponse(immutabilityPolicy, requestConditions,
+ context));
+ } catch (RuntimeException ex) {
+ return monoError(logger, ex);
+ }
+ }
+
+ Mono> setImmutabilityPolicyWithResponse(
+ BlobImmutabilityPolicy immutabilityPolicy, BlobRequestConditions requestConditions, Context context) {
+ context = context == null ? Context.NONE : context;
+ BlobImmutabilityPolicy finalImmutabilityPolicy = immutabilityPolicy == null ? new BlobImmutabilityPolicy()
+ : immutabilityPolicy;
+ if (BlobImmutabilityPolicyMode.MUTABLE.equals(finalImmutabilityPolicy.getPolicyMode())) {
+ throw logger.logExceptionAsError(new IllegalArgumentException(
+ String.format("immutabilityPolicy.policyMode must be %s or %s",
+ BlobImmutabilityPolicyMode.LOCKED.toString(), BlobImmutabilityPolicyMode.UNLOCKED.toString())));
+ }
+
+ BlobRequestConditions finalRequestConditions = requestConditions == null
+ ? new BlobRequestConditions() : requestConditions;
+ // TODO (gapra) : Discuss, should we just expose ifUnmodifiedSince here?
+ return this.azureBlobStorage.getBlobs().setImmutabilityPolicyWithResponseAsync(containerName, blobName, null,
+ null, finalRequestConditions.getIfUnmodifiedSince(), finalImmutabilityPolicy.getExpiryTime(),
+ finalImmutabilityPolicy.getPolicyMode(),
+ context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE))
+ .map(response -> {
+ BlobsSetImmutabilityPolicyHeaders headers = response.getDeserializedHeaders();
+ BlobImmutabilityPolicy responsePolicy = new BlobImmutabilityPolicy()
+ .setPolicyMode(headers.getXMsImmutabilityPolicyMode())
+ .setExpiryTime(headers.getXMsImmutabilityPolicyUntilDate());
+ return new SimpleResponse<>(response, responsePolicy);
+ });
+ }
+
+ /**
+ * Deletes the immutability policy on a blob, blob snapshot or blob version.
+ * NOTE: Blob Versioning must be enabled on your storage account and the blob must be in a container with
+ * object level immutable policy enabled to call this API.
+ *
+ * Code Samples
+ *
+ * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.deleteImmutabilityPolicy}
+ *
+ * @return A reactive response signalling completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono deleteImmutabilityPolicy() {
+ try {
+ return deleteImmutabilityPolicyWithResponse().flatMap(FluxUtil::toMono);
+ } catch (RuntimeException ex) {
+ return monoError(logger, ex);
+ }
+ }
+
+ /**
+ * Deletes the immutability policy on a blob, blob snapshot or blob version.
+ * NOTE: Blob Versioning must be enabled on your storage account and the blob must be in a container with
+ * immutable storage with versioning enabled to call this API.
+ *
+ * Code Samples
+ *
+ * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.deleteImmutabilityPolicyWithResponse}
+ *
+ * @return A reactive response signalling completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> deleteImmutabilityPolicyWithResponse() {
+ try {
+ return withContext(this::deleteImmutabilityPolicyWithResponse);
+ } catch (RuntimeException ex) {
+ return monoError(logger, ex);
+ }
+ }
+
+ Mono> deleteImmutabilityPolicyWithResponse(Context context) {
+ context = context == null ? Context.NONE : context;
+ return this.azureBlobStorage.getBlobs().deleteImmutabilityPolicyWithResponseAsync(containerName, blobName,
+ null, null, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE))
+ .map(response -> new SimpleResponse<>(response, null));
+ }
+
+ /**
+ * Sets a legal hold on the blob.
+ * NOTE: Blob Versioning must be enabled on your storage account and the blob must be in a container with
+ * object level immutable policy enabled to call this API.
+ *
+ * Code Samples
+ *
+ * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.setLegalHold#boolean}
+ *
+ * @param legalHold Whether or not you want a legal hold on the blob.
+ * @return A reactive response containing the legal hold result.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono setLegalHold(boolean legalHold) {
+ try {
+ return setLegalHoldWithResponse(legalHold).flatMap(FluxUtil::toMono);
+ } catch (RuntimeException ex) {
+ return monoError(logger, ex);
+ }
+ }
+
+ /**
+ * Sets a legal hold on the blob.
+ * NOTE: Blob Versioning must be enabled on your storage account and the blob must be in a container with
+ * immutable storage with versioning enabled to call this API.
+ *
+ * Code Samples
+ *
+ * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.setLegalHoldWithResponse#boolean}
+ *
+ * @param legalHold Whether or not you want a legal hold on the blob.
+ * @return A reactive response containing the legal hold result.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> setLegalHoldWithResponse(boolean legalHold) {
+ try {
+ return withContext(context -> setLegalHoldWithResponse(legalHold, context));
+ } catch (RuntimeException ex) {
+ return monoError(logger, ex);
+ }
+ }
+
+ Mono> setLegalHoldWithResponse(boolean legalHold, Context context) {
+ context = context == null ? Context.NONE : context;
+ return this.azureBlobStorage.getBlobs().setLegalHoldWithResponseAsync(containerName, blobName,
+ legalHold, null, null,
+ context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE))
+ .map(response -> new SimpleResponse<>(response,
+ new BlobLegalHoldResult(response.getDeserializedHeaders().isXMsLegalHold())));
+ }
}
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java
index 2b5ed3c1b8fd..343ba77368cb 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java
@@ -20,6 +20,8 @@
import com.azure.storage.blob.implementation.util.ModelHelper;
import com.azure.storage.blob.models.BlobDownloadContentAsyncResponse;
import com.azure.storage.blob.models.BlobDownloadContentResponse;
+import com.azure.storage.blob.models.BlobImmutabilityPolicy;
+import com.azure.storage.blob.models.BlobLegalHoldResult;
import com.azure.storage.blob.models.ConsistentReadControl;
import com.azure.storage.blob.options.BlobBeginCopyOptions;
import com.azure.storage.blob.options.BlobCopyFromUrlOptions;
@@ -1527,4 +1529,118 @@ public BlobQueryResponse queryWithResponse(BlobQueryOptions queryOptions, Durati
return blockWithOptionalTimeout(download, timeout);
}
+
+ /**
+ * Sets the immutability policy on a blob, blob snapshot or blob version.
+ * NOTE: Blob Versioning must be enabled on your storage account and the blob must be in a container with
+ * immutable storage with versioning enabled to call this API.
+ *
+ * Code Samples
+ *
+ * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.setImmutabilityPolicy#BlobImmutabilityPolicy}
+ *
+ * @param immutabilityPolicy {@link BlobImmutabilityPolicy The immutability policy}.
+ * @return The immutability policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public BlobImmutabilityPolicy setImmutabilityPolicy(BlobImmutabilityPolicy immutabilityPolicy) {
+ return setImmutabilityPolicyWithResponse(immutabilityPolicy, null, null, Context.NONE).getValue();
+ }
+
+ /**
+ * Sets the immutability policy on a blob, blob snapshot or blob version.
+ * NOTE: Blob Versioning must be enabled on your storage account and the blob must be in a container with
+ * immutable storage with versioning enabled to call this API.
+ *
+ * Code Samples
+ *
+ * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.setImmutabilityPolicyWithResponse#BlobImmutabilityPolicy-BlobRequestConditions-Duration-Context}
+ *
+ * @param immutabilityPolicy {@link BlobImmutabilityPolicy The immutability policy}.
+ * @param requestConditions {@link BlobRequestConditions}
+ * @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 response containing the immutability policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response setImmutabilityPolicyWithResponse(BlobImmutabilityPolicy immutabilityPolicy,
+ BlobRequestConditions requestConditions, Duration timeout, Context context) {
+ Mono> response = client.setImmutabilityPolicyWithResponse(immutabilityPolicy,
+ requestConditions, context);
+
+ return blockWithOptionalTimeout(response, timeout);
+ }
+
+ /**
+ * Delete the immutability policy on a blob, blob snapshot or blob version.
+ * NOTE: Blob Versioning must be enabled on your storage account and the blob must be in a container with
+ * immutable storage with versioning enabled to call this API.
+ *
+ * Code Samples
+ *
+ * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.deleteImmutabilityPolicy}
+ *
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void deleteImmutabilityPolicy() {
+ deleteImmutabilityPolicyWithResponse(null, Context.NONE).getValue();
+ }
+
+ /**
+ * Delete the immutability policy on a blob, blob snapshot or blob version.
+ * NOTE: Blob Versioning must be enabled on your storage account and the blob must be in a container with
+ * immutable storage with versioning enabled to call this API.
+ *
+ * Code Samples
+ *
+ * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.deleteImmutabilityPolicyWithResponse#Duration-Context}
+ *
+ * @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 response containing the immutability policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response deleteImmutabilityPolicyWithResponse(Duration timeout, Context context) {
+ Mono> response = client.deleteImmutabilityPolicyWithResponse(context);
+
+ return blockWithOptionalTimeout(response, timeout);
+ }
+
+ /**
+ * Sets a legal hold on the blob.
+ * NOTE: Blob Versioning must be enabled on your storage account and the blob must be in a container with
+ * immutable storage with versioning enabled to call this API.
+ *
+ * Code Samples
+ *
+ * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.setLegalHold#boolean}
+ *
+ * @param legalHold Whether or not you want a legal hold on the blob.
+ * @return The legal hold result.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public BlobLegalHoldResult setLegalHold(boolean legalHold) {
+ return setLegalHoldWithResponse(legalHold, null, Context.NONE).getValue();
+ }
+
+ /**
+ * Sets a legal hold on the blob.
+ * NOTE: Blob Versioning must be enabled on your storage account and the blob must be in a container with
+ * immutable storage with versioning enabled to call this API.
+ *
+ * Code Samples
+ *
+ * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.setLegalHoldWithResponse#boolean-Duration-Context}
+ *
+ * @param legalHold Whether or not you want a legal hold on the blob.
+ * @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 response containing the legal hold result.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response setLegalHoldWithResponse(boolean legalHold, Duration timeout, Context context) {
+ Mono> response = client.setLegalHoldWithResponse(legalHold, context);
+
+ return blockWithOptionalTimeout(response, timeout);
+ }
}
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java
index 25dd01dc286e..64c8ea9c06d4 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java
@@ -20,6 +20,7 @@
import com.azure.storage.blob.implementation.models.EncryptionScope;
import com.azure.storage.blob.models.AccessTier;
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.BlockBlobItem;
@@ -261,13 +262,16 @@ Mono> uploadWithResponse(BlockBlobSimpleUploadOptions op
BlobRequestConditions requestConditions = options.getRequestConditions() == null ? new BlobRequestConditions()
: options.getRequestConditions();
context = context == null ? Context.NONE : context;
+ BlobImmutabilityPolicy immutabilityPolicy = options.getImmutabilityPolicy() == null
+ ? new BlobImmutabilityPolicy() : options.getImmutabilityPolicy();
return this.azureBlobStorage.getBlockBlobs().uploadWithResponseAsync(containerName, blobName,
options.getLength(), data, null, options.getContentMd5(), options.getMetadata(),
requestConditions.getLeaseId(), options.getTier(), requestConditions.getIfModifiedSince(),
requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(),
requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null,
- tagsToString(options.getTags()), null, null, null, options.getHeaders(), getCustomerProvidedKey(),
+ tagsToString(options.getTags()), immutabilityPolicy.getExpiryTime(), immutabilityPolicy.getPolicyMode(),
+ options.isLegalHold(), options.getHeaders(), getCustomerProvidedKey(),
encryptionScope, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE))
.map(rb -> {
BlockBlobsUploadHeaders hd = rb.getDeserializedHeaders();
@@ -387,7 +391,7 @@ Mono> uploadFromUrlWithResponse(BlobUploadFromUrlOptions
sourceRequestConditions.getIfMatch(), sourceRequestConditions.getIfNoneMatch(),
sourceRequestConditions.getTagsConditions(),
null, options.getContentMd5(), tagsToString(options.getTags()),
- options.isCopySourceBlobProperties(), options.getHeaders(), getCustomerProvidedKey(), encryptionScope,
+ options.isCopySourceBlobProperties(), null, options.getHeaders(), getCustomerProvidedKey(), encryptionScope,
context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE))
.map(rb -> {
BlockBlobsPutBlobFromUrlHeaders hd = rb.getDeserializedHeaders();
@@ -554,7 +558,7 @@ Mono> stageBlockFromUrlWithResponse(String base64BlockId, String
return this.azureBlobStorage.getBlockBlobs().stageBlockFromURLWithResponseAsync(containerName, blobName, base64BlockId, 0,
url, sourceRange.toHeaderValue(), sourceContentMd5, null, null, leaseId,
sourceRequestConditions.getIfModifiedSince(), sourceRequestConditions.getIfUnmodifiedSince(),
- sourceRequestConditions.getIfMatch(), sourceRequestConditions.getIfNoneMatch(), null,
+ sourceRequestConditions.getIfMatch(), sourceRequestConditions.getIfNoneMatch(), null, null,
getCustomerProvidedKey(), encryptionScope,
context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE))
.map(response -> new SimpleResponse<>(response, null));
@@ -752,13 +756,16 @@ Mono> commitBlockListWithResponse(BlockBlobCommitBlockLi
BlobRequestConditions requestConditions = options.getRequestConditions() == null ? new BlobRequestConditions()
: options.getRequestConditions();
context = context == null ? Context.NONE : context;
+ BlobImmutabilityPolicy immutabilityPolicy = options.getImmutabilityPolicy() == null
+ ? new BlobImmutabilityPolicy() : options.getImmutabilityPolicy();
return this.azureBlobStorage.getBlockBlobs().commitBlockListWithResponseAsync(containerName, blobName,
new BlockLookupList().setLatest(options.getBase64BlockIds()), null, null, null, options.getMetadata(),
requestConditions.getLeaseId(), options.getTier(), requestConditions.getIfModifiedSince(),
requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(),
requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null,
- tagsToString(options.getTags()), null, null, null, options.getHeaders(), getCustomerProvidedKey(),
+ tagsToString(options.getTags()), immutabilityPolicy.getExpiryTime(), immutabilityPolicy.getPolicyMode(),
+ options.isLegalHold(), options.getHeaders(), getCustomerProvidedKey(),
encryptionScope, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE))
.map(rb -> {
BlockBlobsCommitBlockListHeaders hd = rb.getDeserializedHeaders();
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 013f067bd9e7..74d7a8bee802 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
@@ -25,6 +25,7 @@
import com.azure.storage.blob.implementation.models.PageBlobsUploadPagesHeaders;
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.CopyStatusType;
@@ -246,13 +247,16 @@ Mono> createWithResponse(PageBlobCreateOptions options, C
new IllegalArgumentException("SequenceNumber must be greater than or equal to 0."));
}
context = context == null ? Context.NONE : context;
+ BlobImmutabilityPolicy immutabilityPolicy = options.getImmutabilityPolicy() == null
+ ? new BlobImmutabilityPolicy() : options.getImmutabilityPolicy();
return this.azureBlobStorage.getPageBlobs().createWithResponseAsync(containerName, blobName, 0,
options.getSize(), null, null, options.getMetadata(), requestConditions.getLeaseId(),
requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(),
requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(),
- options.getSequenceNumber(), null, tagsToString(options.getTags()), null, null, null, options.getHeaders(),
- getCustomerProvidedKey(), encryptionScope,
+ options.getSequenceNumber(), null, tagsToString(options.getTags()),
+ immutabilityPolicy.getExpiryTime(), immutabilityPolicy.getPolicyMode(), options.isLegalHold(),
+ options.getHeaders(), getCustomerProvidedKey(), encryptionScope,
context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE))
.map(rb -> {
PageBlobsCreateHeaders hd = rb.getDeserializedHeaders();
@@ -470,7 +474,7 @@ Mono> uploadPagesFromUrlWithResponse(PageRange range, Str
destRequestConditions.getIfMatch(), destRequestConditions.getIfNoneMatch(),
destRequestConditions.getTagsConditions(), sourceRequestConditions.getIfModifiedSince(),
sourceRequestConditions.getIfUnmodifiedSince(), sourceRequestConditions.getIfMatch(),
- sourceRequestConditions.getIfNoneMatch(), null, getCustomerProvidedKey(), encryptionScope,
+ sourceRequestConditions.getIfNoneMatch(), null, null, getCustomerProvidedKey(), encryptionScope,
context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE))
.map(rb -> {
PageBlobsUploadPagesFromURLHeaders hd = rb.getDeserializedHeaders();
diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java
index f8d59599cb58..244a47f6cefd 100644
--- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java
+++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java
@@ -11,6 +11,8 @@
import com.azure.storage.blob.BlobServiceVersion;
import com.azure.storage.blob.models.AccessTier;
import com.azure.storage.blob.models.BlobBeginCopySourceRequestConditions;
+import com.azure.storage.blob.models.BlobImmutabilityPolicy;
+import com.azure.storage.blob.models.BlobImmutabilityPolicyMode;
import com.azure.storage.blob.options.BlobBeginCopyOptions;
import com.azure.storage.blob.options.BlobCopyFromUrlOptions;
import com.azure.storage.blob.models.BlobCopyInfo;
@@ -736,4 +738,60 @@ public void queryWithResponse() {
});
// END: com.azure.storage.blob.specialized.BlobAsyncClientBase.queryWithResponse#BlobQueryOptions
}
+
+ /**
+ * Code snippet for {@link BlobAsyncClientBase#setImmutabilityPolicy(BlobImmutabilityPolicy)} and
+ * {@link BlobAsyncClientBase#setImmutabilityPolicyWithResponse(BlobImmutabilityPolicy, BlobRequestConditions)}
+ */
+ public void setImmutabilityPolicy() {
+ // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.setImmutabilityPolicy#BlobImmutabilityPolicy
+ BlobImmutabilityPolicy policy = new BlobImmutabilityPolicy()
+ .setPolicyMode(BlobImmutabilityPolicyMode.LOCKED)
+ .setExpiryTime(OffsetDateTime.now().plusDays(1));
+ client.setImmutabilityPolicy(policy).subscribe(response -> System.out.println("Completed. Set immutability "
+ + "policy to " + response.getPolicyMode()));
+ // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.setImmutabilityPolicy#BlobImmutabilityPolicy
+
+ // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.setImmutabilityPolicyWithResponse#BlobImmutabilityPolicy-BlobRequestConditions
+ BlobImmutabilityPolicy immutabilityPolicy = new BlobImmutabilityPolicy()
+ .setPolicyMode(BlobImmutabilityPolicyMode.LOCKED)
+ .setExpiryTime(OffsetDateTime.now().plusDays(1));
+ BlobRequestConditions requestConditions = new BlobRequestConditions()
+ .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(1));
+ client.setImmutabilityPolicyWithResponse(immutabilityPolicy, requestConditions).subscribe(response ->
+ System.out.println("Completed. Set immutability policy to " + response.getValue().getPolicyMode()));
+ // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.setImmutabilityPolicyWithResponse#BlobImmutabilityPolicy-BlobRequestConditions
+ }
+
+ /**
+ * Code snippet for {@link BlobAsyncClientBase#deleteImmutabilityPolicy()} and
+ * {@link BlobAsyncClientBase#deleteImmutabilityPolicyWithResponse()}
+ */
+ public void deleteImmutabilityPolicy() {
+ // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.deleteImmutabilityPolicy
+ client.deleteImmutabilityPolicy().subscribe(response -> System.out.println("Completed immutability policy"
+ + " deletion."));
+ // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.deleteImmutabilityPolicy
+
+ // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.deleteImmutabilityPolicyWithResponse
+ client.deleteImmutabilityPolicyWithResponse().subscribe(response ->
+ System.out.println("Delete immutability policy completed with status: " + response.getStatusCode()));
+ // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.deleteImmutabilityPolicyWithResponse
+ }
+
+ /**
+ * Code snippet for {@link BlobAsyncClientBase#setLegalHold(boolean)} and
+ * {@link BlobAsyncClientBase#setLegalHoldWithResponse(boolean)}
+ */
+ public void setLegalHold() {
+ // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.setLegalHold#boolean
+ client.setLegalHold(true).subscribe(response -> System.out.println("Legal hold status: "
+ + response.hasLegalHold()));
+ // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.setLegalHold#boolean
+
+ // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.setLegalHoldWithResponse#boolean
+ client.setLegalHoldWithResponse(true).subscribe(response ->
+ System.out.println("Legal hold status: " + response.getValue().hasLegalHold()));
+ // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.setLegalHoldWithResponse#boolean
+ }
}
diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobClientBaseJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobClientBaseJavaDocCodeSnippets.java
index 0b90402ac35a..059e2c2ef719 100644
--- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobClientBaseJavaDocCodeSnippets.java
+++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobClientBaseJavaDocCodeSnippets.java
@@ -4,6 +4,7 @@
package com.azure.storage.blob.specialized;
import com.azure.core.http.RequestConditions;
+import com.azure.core.http.rest.Response;
import com.azure.core.util.BinaryData;
import com.azure.core.util.Context;
import com.azure.core.util.polling.LongRunningOperationStatus;
@@ -12,6 +13,8 @@
import com.azure.storage.blob.BlobServiceClientBuilder;
import com.azure.storage.blob.models.BlobBeginCopySourceRequestConditions;
import com.azure.storage.blob.models.BlobDownloadContentResponse;
+import com.azure.storage.blob.models.BlobImmutabilityPolicy;
+import com.azure.storage.blob.models.BlobImmutabilityPolicyMode;
import com.azure.storage.blob.options.BlobBeginCopyOptions;
import com.azure.storage.blob.options.BlobCopyFromUrlOptions;
import com.azure.storage.blob.models.BlobProperties;
@@ -705,4 +708,60 @@ public void queryWithResponse() {
.getStatusCode());
// END: com.azure.storage.blob.specialized.BlobClientBase.queryWithResponse#BlobQueryOptions-Duration-Context
}
+
+ /**
+ * Code snippet for {@link BlobClientBase#setImmutabilityPolicy(BlobImmutabilityPolicy)} and
+ * {@link BlobClientBase#setImmutabilityPolicyWithResponse(BlobImmutabilityPolicy, BlobRequestConditions, Duration, Context)}
+ */
+ public void setImmutabilityPolicy() {
+ // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.setImmutabilityPolicy#BlobImmutabilityPolicy
+ BlobImmutabilityPolicy policy = new BlobImmutabilityPolicy()
+ .setPolicyMode(BlobImmutabilityPolicyMode.LOCKED)
+ .setExpiryTime(OffsetDateTime.now().plusDays(1));
+ BlobImmutabilityPolicy setPolicy = client.setImmutabilityPolicy(policy);
+ System.out.println("Successfully completed setting the immutability policy");
+ // END: com.azure.storage.blob.specialized.BlobClientBase.setImmutabilityPolicy#BlobImmutabilityPolicy
+
+ // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.setImmutabilityPolicyWithResponse#BlobImmutabilityPolicy-BlobRequestConditions-Duration-Context
+ BlobImmutabilityPolicy immutabilityPolicy = new BlobImmutabilityPolicy()
+ .setPolicyMode(BlobImmutabilityPolicyMode.LOCKED)
+ .setExpiryTime(OffsetDateTime.now().plusDays(1));
+ BlobRequestConditions requestConditions = new BlobRequestConditions()
+ .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(1));
+ Response response = client.setImmutabilityPolicyWithResponse(immutabilityPolicy,
+ requestConditions, timeout, new Context(key1, value1));
+ System.out.println("Successfully completed setting the immutability policy");
+ // END: com.azure.storage.blob.specialized.BlobClientBase.setImmutabilityPolicyWithResponse#BlobImmutabilityPolicy-BlobRequestConditions-Duration-Context
+ }
+
+ /**
+ * Code snippet for {@link BlobClientBase#deleteImmutabilityPolicy()} and
+ * {@link BlobClientBase#deleteImmutabilityPolicyWithResponse(Duration, Context)}
+ */
+ public void deleteImmutabilityPolicy() {
+ // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.deleteImmutabilityPolicy
+ client.deleteImmutabilityPolicy();
+ System.out.println("Completed immutability policy deletion.");
+ // END: com.azure.storage.blob.specialized.BlobClientBase.deleteImmutabilityPolicy
+
+ // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.deleteImmutabilityPolicyWithResponse#Duration-Context
+ System.out.println("Delete immutability policy completed with status: "
+ + client.deleteImmutabilityPolicyWithResponse(timeout, new Context(key1, value1)).getStatusCode());
+ // END: com.azure.storage.blob.specialized.BlobClientBase.deleteImmutabilityPolicyWithResponse#Duration-Context
+ }
+
+ /**
+ * Code snippet for {@link BlobClientBase#setLegalHold(boolean)} and
+ * {@link BlobClientBase#setLegalHoldWithResponse(boolean, Duration, Context)}
+ */
+ public void setLegalHold() {
+ // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.setLegalHold#boolean
+ System.out.println("Legal hold status: " + client.setLegalHold(true));
+ // END: com.azure.storage.blob.specialized.BlobClientBase.setLegalHold#boolean
+
+ // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.setLegalHoldWithResponse#boolean-Duration-Context
+ System.out.println("Legal hold status: " + client.setLegalHoldWithResponse(true, timeout,
+ new Context(key1, value1)));
+ // END: com.azure.storage.blob.specialized.BlobClientBase.setLegalHoldWithResponse#boolean-Duration-Context
+ }
}
diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy
index 65f283ca5a00..5cebc5661fa7 100644
--- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy
+++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy
@@ -774,7 +774,7 @@ class APISpec extends StorageSpec {
}
def getPollingDuration(long liveTestDurationInMillis) {
- return (env.testMode == TestMode.PLAYBACK) ? Duration.ofMillis(10) : Duration.ofMillis(liveTestDurationInMillis)
+ return (env.testMode == TestMode.PLAYBACK) ? Duration.ofMillis(1) : Duration.ofMillis(liveTestDurationInMillis)
}
def getPerCallVersionPolicy() {
diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobServiceSasModelsTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobServiceSasModelsTest.groovy
index aceeea173203..2281d0e4e65a 100644
--- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobServiceSasModelsTest.groovy
+++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobServiceSasModelsTest.groovy
@@ -38,23 +38,25 @@ class BlobServiceSasModelsTest extends Specification {
.setListPermission(list)
.setMovePermission(move)
.setExecutePermission(execute)
+ .setImmutabilityPolicyPermission(setImmutabilityPolicy)
expect:
perms.toString() == expectedString
where:
- read | write | delete | create | add | deleteVersion | tags | list | move | execute || expectedString
- true | false | false | false | false | false | false | false | false | false || "r"
- false | true | false | false | false | false | false | false | false | false || "w"
- false | false | true | false | false | false | false | false | false | false || "d"
- false | false | false | true | false | false | false | false | false | false || "c"
- false | false | false | false | true | false | false | false | false | false || "a"
- false | false | false | false | false | true | false | false | false | false || "x"
- false | false | false | false | false | false | true | false | false | false || "t"
- false | false | false | false | false | false | false | true | false | false || "l"
- false | false | false | false | false | false | false | false | true | false || "m"
- false | false | false | false | false | false | false | false | false | true || "e"
- true | true | true | true | true | true | true | true | true | true || "racwdxltme"
+ read | write | delete | create | add | deleteVersion | tags | list | move | execute | setImmutabilityPolicy || expectedString
+ true | false | false | false | false | false | false | false | false | false | false || "r"
+ false | true | false | false | false | false | false | false | false | false | false || "w"
+ false | false | true | false | false | false | false | false | false | false | false || "d"
+ false | false | false | true | false | false | false | false | false | false | false || "c"
+ false | false | false | false | true | false | false | false | false | false | false || "a"
+ false | false | false | false | false | true | false | false | false | false | false || "x"
+ false | false | false | false | false | false | true | false | false | false | false || "t"
+ false | false | false | false | false | false | false | true | false | false | false || "l"
+ false | false | false | false | false | false | false | false | true | false | false || "m"
+ false | false | false | false | false | false | false | false | false | true | false || "e"
+ false | false | false | false | false | false | false | false | false | false | true || "i"
+ true | true | true | true | true | true | true | true | true | true | true || "racwdxltmei"
}
@Unroll
@@ -73,21 +75,23 @@ class BlobServiceSasModelsTest extends Specification {
perms.hasListPermission() == list
perms.hasMovePermission() == move
perms.hasExecutePermission() == execute
+ perms.hasImmutabilityPolicyPermission() == setImmutabilityPolicy
where:
- permString || read | write | delete | create | add | deleteVersion | tags | list | move | execute
- "r" || true | false | false | false | false | false | false | false | false | false
- "w" || false | true | false | false | false | false | false | false | false | false
- "d" || false | false | true | false | false | false | false | false | false | false
- "c" || false | false | false | true | false | false | false | false | false | false
- "a" || false | false | false | false | true | false | false | false | false | false
- "x" || false | false | false | false | false | true | false | false | false | false
- "t" || false | false | false | false | false | false | true | false | false | false
- "l" || false | false | false | false | false | false | false | true | false | false
- "m" || false | false | false | false | false | false | false | false | true | false
- "e" || false | false | false | false | false | false | false | false | false | true
- "racwdxltme" || true | true | true | true | true | true | true | true | true | true
- "dtcxewlrma" || true | true | true | true | true | true | true | true | true | true
+ permString || read | write | delete | create | add | deleteVersion | tags | list | move | execute | setImmutabilityPolicy
+ "r" || true | false | false | false | false | false | false | false | false | false | false
+ "w" || false | true | false | false | false | false | false | false | false | false | false
+ "d" || false | false | true | false | false | false | false | false | false | false | false
+ "c" || false | false | false | true | false | false | false | false | false | false | false
+ "a" || false | false | false | false | true | false | false | false | false | false | false
+ "x" || false | false | false | false | false | true | false | false | false | false | false
+ "t" || false | false | false | false | false | false | true | false | false | false | false
+ "l" || false | false | false | false | false | false | false | true | false | false | false
+ "m" || false | false | false | false | false | false | false | false | true | false | false
+ "e" || false | false | false | false | false | false | false | false | false | true | false
+ "i" || false | false | false | false | false | false | false | false | false | false | true
+ "racwdxltmei" || true | true | true | true | true | true | true | true | true | true | true
+ "dtcxiewlrma" || true | true | true | true | true | true | true | true | true | true | true
}
def "BlobSASPermissions parse IA"() {
@@ -120,23 +124,25 @@ class BlobServiceSasModelsTest extends Specification {
.setTagsPermission(tags)
.setMovePermission(move)
.setExecutePermission(execute)
+ .setImmutabilityPolicyPermission(setImmutabilityPolicy)
expect:
perms.toString() == expectedString
where:
- read | write | delete | create | add | deleteVersion | tags | list | move | execute || expectedString
- true | false | false | false | false | false | false | false | false | false || "r"
- false | true | false | false | false | false | false | false | false | false || "w"
- false | false | true | false | false | false | false | false | false | false || "d"
- false | false | false | true | false | false | false | false | false | false || "c"
- false | false | false | false | true | false | false | false | false | false || "a"
- false | false | false | false | false | true | false | false | false | false || "x"
- false | false | false | false | false | false | true | false | false | false || "t"
- false | false | false | false | false | false | false | true | false | false || "l"
- false | false | false | false | false | false | false | false | true | false || "m"
- false | false | false | false | false | false | false | false | false | true || "e"
- true | true | true | true | true | true | true | true | true | true || "racwdxltme"
+ read | write | delete | create | add | deleteVersion | tags | list | move | execute | setImmutabilityPolicy || expectedString
+ true | false | false | false | false | false | false | false | false | false | false || "r"
+ false | true | false | false | false | false | false | false | false | false | false || "w"
+ false | false | true | false | false | false | false | false | false | false | false || "d"
+ false | false | false | true | false | false | false | false | false | false | false || "c"
+ false | false | false | false | true | false | false | false | false | false | false || "a"
+ false | false | false | false | false | true | false | false | false | false | false || "x"
+ false | false | false | false | false | false | true | false | false | false | false || "t"
+ false | false | false | false | false | false | false | true | false | false | false || "l"
+ false | false | false | false | false | false | false | false | true | false | false || "m"
+ false | false | false | false | false | false | false | false | false | true | false || "e"
+ false | false | false | false | false | false | false | false | false | false | true || "i"
+ true | true | true | true | true | true | true | true | true | true | true || "racwdxltmei"
}
@Unroll
@@ -155,21 +161,23 @@ class BlobServiceSasModelsTest extends Specification {
perms.hasListPermission() == list
perms.hasMovePermission() == move
perms.hasExecutePermission() == execute
+ perms.hasImmutabilityPolicyPermission() == setImmutabilityPolicy
where:
- permString || read | write | delete | create | add | deleteVersion | tags | list | move | execute
- "r" || true | false | false | false | false | false | false | false | false | false
- "w" || false | true | false | false | false | false | false | false | false | false
- "d" || false | false | true | false | false | false | false | false | false | false
- "c" || false | false | false | true | false | false | false | false | false | false
- "a" || false | false | false | false | true | false | false | false | false | false
- "x" || false | false | false | false | false | true | false | false | false | false
- "t" || false | false | false | false | false | false | true | false | false | false
- "l" || false | false | false | false | false | false | false | true | false | false
- "m" || false | false | false | false | false | false | false | false | true | false
- "e" || false | false | false | false | false | false | false | false | false | true
- "racwdxltme" || true | true | true | true | true | true | true | true | true | true
- "dtcxewlrma" || true | true | true | true | true | true | true | true | true | true
+ permString || read | write | delete | create | add | deleteVersion | tags | list | move | execute | setImmutabilityPolicy
+ "r" || true | false | false | false | false | false | false | false | false | false | false
+ "w" || false | true | false | false | false | false | false | false | false | false | false
+ "d" || false | false | true | false | false | false | false | false | false | false | false
+ "c" || false | false | false | true | false | false | false | false | false | false | false
+ "a" || false | false | false | false | true | false | false | false | false | false | false
+ "x" || false | false | false | false | false | true | false | false | false | false | false
+ "t" || false | false | false | false | false | false | true | false | false | false | false
+ "l" || false | false | false | false | false | false | false | true | false | false | false
+ "m" || false | false | false | false | false | false | false | false | true | false | false
+ "e" || false | false | false | false | false | false | false | false | false | true | false
+ "i" || false | false | false | false | false | false | false | false | false | false | true
+ "racwdxltmei" || true | true | true | true | true | true | true | true | true | true | true
+ "dticxewlrma" || true | true | true | true | true | true | true | true | true | true | true
}
def "ContainerSASPermissions parse IA"() {
diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/CPKNTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/CPKNTest.groovy
index af5dacfac3a0..88d71669d3d4 100644
--- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/CPKNTest.groovy
+++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/CPKNTest.groovy
@@ -1,6 +1,8 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
package com.azure.storage.blob
-import com.azure.core.test.TestMode
import com.azure.storage.blob.models.BlobContainerEncryptionScope
import com.azure.storage.blob.models.BlobItem
import com.azure.storage.blob.models.BlobStorageException
diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/CPKTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/CPKTest.groovy
index aa158b5a79ce..01ae2cdf01c7 100644
--- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/CPKTest.groovy
+++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/CPKTest.groovy
@@ -1,7 +1,8 @@
-package com.azure.storage.blob
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+package com.azure.storage.blob
-import com.azure.core.test.TestMode
import com.azure.storage.blob.models.CustomerProvidedKey
import com.azure.storage.blob.models.PageRange
import com.azure.storage.blob.sas.BlobSasPermission
diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ImmutableStorageWithVersioningTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ImmutableStorageWithVersioningTest.groovy
new file mode 100644
index 000000000000..aaf441258acd
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ImmutableStorageWithVersioningTest.groovy
@@ -0,0 +1,683 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.storage.blob
+
+import com.azure.core.credential.TokenCredential
+import com.azure.core.http.HttpHeaders
+import com.azure.core.http.HttpMethod
+import com.azure.core.http.HttpPipeline
+import com.azure.core.http.HttpPipelineBuilder
+import com.azure.core.http.HttpRequest
+import com.azure.core.http.policy.BearerTokenAuthenticationPolicy
+import com.azure.core.test.TestMode
+import com.azure.identity.EnvironmentCredentialBuilder
+import com.azure.storage.blob.models.BlobErrorCode
+import com.azure.storage.blob.models.BlobImmutabilityPolicy
+import com.azure.storage.blob.models.BlobImmutabilityPolicyMode
+import com.azure.storage.blob.models.BlobListDetails
+import com.azure.storage.blob.models.BlobRequestConditions
+import com.azure.storage.blob.models.BlobStorageException
+import com.azure.storage.blob.models.LeaseStateType
+import com.azure.storage.blob.models.ListBlobContainersOptions
+import com.azure.storage.blob.models.ListBlobsOptions
+import com.azure.storage.blob.models.ParallelTransferOptions
+import com.azure.storage.blob.models.PublicAccessType
+import com.azure.storage.blob.options.AppendBlobCreateOptions
+import com.azure.storage.blob.options.BlobBeginCopyOptions
+import com.azure.storage.blob.options.BlobBreakLeaseOptions
+import com.azure.storage.blob.options.BlobCopyFromUrlOptions
+import com.azure.storage.blob.options.BlobParallelUploadOptions
+import com.azure.storage.blob.options.BlockBlobCommitBlockListOptions
+import com.azure.storage.blob.options.BlockBlobSimpleUploadOptions
+import com.azure.storage.blob.options.PageBlobCreateOptions
+import com.azure.storage.blob.sas.BlobContainerSasPermission
+import com.azure.storage.blob.sas.BlobSasPermission
+import com.azure.storage.blob.sas.BlobServiceSasSignatureValues
+import com.azure.storage.common.sas.AccountSasPermission
+import com.azure.storage.common.sas.AccountSasResourceType
+import com.azure.storage.common.sas.AccountSasService
+import com.azure.storage.common.sas.AccountSasSignatureValues
+import com.azure.storage.common.test.shared.extensions.LiveOnly
+import com.azure.storage.common.test.shared.extensions.RequiredServiceVersion
+import com.fasterxml.jackson.databind.ObjectMapper
+import reactor.core.publisher.Flux
+import spock.lang.ResourceLock
+import spock.lang.Unroll
+
+import java.nio.ByteBuffer
+import java.nio.charset.StandardCharsets
+import java.time.Duration
+import java.time.temporal.ChronoUnit
+
+@ResourceLock("ManagementPlaneThrottling")
+class ImmutableStorageWithVersioningTest extends APISpec {
+
+ private BlobContainerClient vlwContainer;
+ private BlobClient vlwBlob
+ private String accountName = env.primaryAccount.name
+ private String containerName
+ private String resourceGroupName = "XClient"
+ private String subscriptionId = "ba45b233-e2ef-4169-8808-49eb0d8eba0d"
+ private String apiVersion = "2021-04-01"
+ private TokenCredential credential = new EnvironmentCredentialBuilder().build()
+ private BearerTokenAuthenticationPolicy credentialPolicy = new BearerTokenAuthenticationPolicy(credential, "https://management.azure.com/.default")
+
+ def setup() {
+ containerName = generateContainerName()
+
+ if (env.testMode != TestMode.PLAYBACK) {
+ String url = String.format("https://management.azure.com/subscriptions/%s/resourceGroups/%s/providers/"
+ + "Microsoft.Storage/storageAccounts/%s/blobServices/default/containers/%s?api-version=%s", subscriptionId,
+ resourceGroupName, accountName, containerName, apiVersion)
+ HttpPipeline httpPipeline = new HttpPipelineBuilder()
+ .policies(credentialPolicy)
+ .httpClient(getHttpClient())
+ .build()
+
+ def immutableStorageWithVersioning = new ImmutableStorageWithVersioning()
+ immutableStorageWithVersioning.enabled = true
+ def properties = new Properties()
+ properties.immutableStorageWithVersioning = immutableStorageWithVersioning
+ def body = new Body()
+ body.id = String.format("/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Storage/storageAccounts/"
+ + "%s/blobServices/default/containers/%s", subscriptionId, resourceGroupName, accountName, containerName)
+ body.name = containerName
+ body.type = "Microsoft.Storage/storageAccounts/blobServices/containers"
+ body.properties = properties
+
+ String serializedBody = new ObjectMapper().writeValueAsString(body)
+
+ httpPipeline.send(new HttpRequest(HttpMethod.PUT, new URL(url), new HttpHeaders(),
+ Flux.just(ByteBuffer.wrap(serializedBody.getBytes(StandardCharsets.UTF_8)))))
+ .block()
+ }
+
+ vlwContainer = primaryBlobServiceClient.getBlobContainerClient(containerName)
+ vlwBlob = vlwContainer.getBlobClient(generateBlobName())
+ vlwBlob.upload(new ByteArrayInputStream(new byte[0]), 0)
+ }
+
+ private final class Body {
+ public String id
+ public String name
+ public String type
+ public Properties properties
+ }
+ private final class Properties {
+ public ImmutableStorageWithVersioning immutableStorageWithVersioning
+ }
+ private final class ImmutableStorageWithVersioning {
+ public boolean enabled
+ }
+
+ def cleanup() {
+
+ if (env.testMode != TestMode.PLAYBACK) {
+ HttpPipeline httpPipeline = new HttpPipelineBuilder()
+ .policies(credentialPolicy)
+ .httpClient(getHttpClient())
+ .build()
+ def cleanupClient = new BlobServiceClientBuilder()
+ .httpClient(getHttpClient())
+ .credential(env.primaryAccount.credential)
+ .endpoint(env.primaryAccount.blobEndpoint)
+ .buildClient()
+
+ def options = new ListBlobContainersOptions().setPrefix(namer.getResourcePrefix())
+ for (def container : cleanupClient.listBlobContainers(options, null)) {
+ def containerClient = cleanupClient.getBlobContainerClient(container.getName())
+
+ if (container.getProperties().getLeaseState() == LeaseStateType.LEASED) {
+ createLeaseClient(containerClient).breakLeaseWithResponse(new BlobBreakLeaseOptions().setBreakPeriod(Duration.ofSeconds(0)), null, null)
+ }
+ if (container.getProperties().isImmutableStorageWithVersioningEnabled()) {
+ options = new ListBlobsOptions().setDetails(new BlobListDetails().setRetrieveImmutabilityPolicy(true).setRetrieveLegalHold(true))
+ for (def blob: containerClient.listBlobs(options, null)) {
+ def blobClient = containerClient.getBlobClient(blob.getName())
+ if (blob.getProperties().hasLegalHold()) {
+ blobClient.setLegalHold(false)
+ }
+ if (blob.getProperties().getImmutabilityPolicyMode() != null) {
+ sleepIfRecord(5 * 1000)
+ blobClient.deleteImmutabilityPolicy()
+ }
+ blobClient.delete()
+ }
+ }
+
+ String url = String.format("https://management.azure.com/subscriptions/%s/resourceGroups/%s/providers/"
+ + "Microsoft.Storage/storageAccounts/%s/blobServices/default/containers/%s?api-version=%s", subscriptionId,
+ resourceGroupName, accountName, container.getName(), apiVersion)
+ httpPipeline.send(new HttpRequest(HttpMethod.DELETE, new URL(url), new HttpHeaders(), Flux.empty()))
+ .block()
+ }
+ }
+
+ }
+
+ @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
+ def "set immutability policy min"() {
+ setup:
+ def expiryTime = getNamer().getUtcNow().plusSeconds(2)
+ def immutabilityPolicy = new BlobImmutabilityPolicy()
+ .setExpiryTime(expiryTime)
+ .setPolicyMode(BlobImmutabilityPolicyMode.UNLOCKED)
+
+ // The service rounds Immutability Policy Expiry to the nearest second.
+ def expectedImmutabilityPolicyExpiry = expiryTime.truncatedTo(ChronoUnit.SECONDS)
+
+ when:
+ def response = vlwBlob.setImmutabilityPolicy(immutabilityPolicy)
+
+ then:
+ expectedImmutabilityPolicyExpiry == response.getExpiryTime()
+ BlobImmutabilityPolicyMode.UNLOCKED == response.getPolicyMode()
+ }
+
+ @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
+ @Unroll
+ def "set immutability policy"() {
+ setup:
+ def expiryTime = getNamer().getUtcNow().plusSeconds(2)
+ def immutabilityPolicy = new BlobImmutabilityPolicy()
+ .setExpiryTime(expiryTime)
+ .setPolicyMode(policyMode)
+
+ // The service rounds Immutability Policy Expiry to the nearest second.
+ def expectedImmutabilityPolicyExpiry = expiryTime.truncatedTo(ChronoUnit.SECONDS)
+
+ when: "set immutability policy"
+ def response = vlwBlob.setImmutabilityPolicyWithResponse(immutabilityPolicy, null, null, null).getValue()
+
+ then:
+ expectedImmutabilityPolicyExpiry == response.getExpiryTime()
+ policyMode == response.getPolicyMode()
+
+ when: "get properties"
+ response = vlwBlob.getProperties()
+
+ then:
+ expectedImmutabilityPolicyExpiry == response.getImmutabilityPolicy().getExpiryTime()
+ policyMode.toString() == response.getImmutabilityPolicy().getPolicyMode().toString()
+
+ when: "list blob"
+ def options = new ListBlobsOptions().setDetails(new BlobListDetails().setRetrieveImmutabilityPolicy(true).setRetrieveLegalHold(true))
+ response = vlwContainer.listBlobs(options, null).iterator()
+
+ then:
+ def blob = response.next()
+ !response.hasNext()
+ blob.getName() == vlwBlob.getBlobName()
+ expectedImmutabilityPolicyExpiry == blob.getProperties().getImmutabilityPolicy().getExpiryTime()
+ policyMode.toString() == blob.getProperties().getImmutabilityPolicy().getPolicyMode().toString()
+
+
+ where:
+ policyMode || _
+ BlobImmutabilityPolicyMode.UNLOCKED || _
+ }
+
+ @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
+ @Unroll
+ def "set immutability policy AC"() {
+ setup:
+ def bac = new BlobRequestConditions()
+ .setIfUnmodifiedSince(unmodified)
+ def expiryTime = getNamer().getUtcNow().plusSeconds(2)
+ def immutabilityPolicy = new BlobImmutabilityPolicy()
+ .setExpiryTime(expiryTime)
+ .setPolicyMode(BlobImmutabilityPolicyMode.UNLOCKED)
+
+ when:
+ def response = vlwBlob.setImmutabilityPolicyWithResponse(immutabilityPolicy, bac, null, null)
+
+ then:
+ response.getStatusCode() == 200
+
+ where:
+ unmodified || _
+ null || _
+ newDate || _
+ }
+
+ @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
+ def "set immutability policy AC fail"() {
+ setup:
+ def bac = new BlobRequestConditions()
+ .setIfUnmodifiedSince(oldDate)
+ def expiryTime = getNamer().getUtcNow().plusSeconds(2)
+ def immutabilityPolicy = new BlobImmutabilityPolicy()
+ .setExpiryTime(expiryTime)
+ .setPolicyMode(BlobImmutabilityPolicyMode.UNLOCKED)
+
+ when:
+ vlwBlob.setImmutabilityPolicyWithResponse(immutabilityPolicy, bac, null, null)
+
+ then:
+ def e = thrown(BlobStorageException)
+ e.getErrorCode() == BlobErrorCode.CONDITION_NOT_MET
+ }
+
+ @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
+ def "set immutability policy error"() {
+ setup:
+ def blob = vlwContainer.getBlobClient(generateBlobName())
+ def expiryTime = getNamer().getUtcNow().plusSeconds(2)
+ def immutabilityPolicy = new BlobImmutabilityPolicy()
+ .setExpiryTime(expiryTime)
+ .setPolicyMode(BlobImmutabilityPolicyMode.UNLOCKED)
+
+ when:
+ blob.setImmutabilityPolicyWithResponse(immutabilityPolicy, null, null, null)
+
+ then:
+ def e = thrown(BlobStorageException)
+ e.getErrorCode() == BlobErrorCode.BLOB_NOT_FOUND
+ }
+
+ @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
+ def "set immutability policy IA"() {
+ setup:
+ def expiryTime = getNamer().getUtcNow().plusSeconds(2)
+ def immutabilityPolicy = new BlobImmutabilityPolicy()
+ .setExpiryTime(expiryTime)
+ .setPolicyMode(BlobImmutabilityPolicyMode.MUTABLE)
+
+ when:
+ vlwBlob.setImmutabilityPolicyWithResponse(immutabilityPolicy, null, null, null)
+
+ then:
+ def e = thrown(IllegalArgumentException)
+ e.getMessage() == "immutabilityPolicy.policyMode must be Locked or Unlocked"
+ }
+
+ @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
+ def "delete immutability policy min"() {
+ setup:
+ def expiryTime = getNamer().getUtcNow().plusSeconds(2)
+ def immutabilityPolicy = new BlobImmutabilityPolicy()
+ .setExpiryTime(expiryTime)
+ .setPolicyMode(BlobImmutabilityPolicyMode.UNLOCKED)
+ vlwBlob.setImmutabilityPolicy(immutabilityPolicy)
+
+ when:
+ vlwBlob.deleteImmutabilityPolicy()
+
+ then:
+ def properties = vlwBlob.getProperties()
+ properties.getImmutabilityPolicy().getPolicyMode() == null
+ properties.getImmutabilityPolicy().getExpiryTime() == null
+ }
+
+ @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
+ def "delete immutability policy"() {
+ setup:
+ def expiryTime = getNamer().getUtcNow().plusSeconds(2)
+ def immutabilityPolicy = new BlobImmutabilityPolicy()
+ .setExpiryTime(expiryTime)
+ .setPolicyMode(BlobImmutabilityPolicyMode.UNLOCKED)
+ vlwBlob.setImmutabilityPolicy(immutabilityPolicy)
+
+ when:
+ vlwBlob.deleteImmutabilityPolicyWithResponse(null, null)
+
+ then:
+ def properties = vlwBlob.getProperties()
+ properties.getImmutabilityPolicy().getPolicyMode() == null
+ properties.getImmutabilityPolicy().getExpiryTime() == null
+ }
+
+ @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
+ def "delete immutability policy error"() {
+ setup:
+ def blob = vlwContainer.getBlobClient(generateBlobName())
+
+ when:
+ blob.deleteImmutabilityPolicyWithResponse(null, null)
+
+ then:
+ def e = thrown(BlobStorageException)
+ e.getErrorCode() == BlobErrorCode.BLOB_NOT_FOUND
+ }
+
+ @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
+ @Unroll
+ def "set legal hold min"() {
+ when:
+ def response = vlwBlob.setLegalHold(legalHold)
+
+ then:
+ response.hasLegalHold() == legalHold
+
+ where:
+ legalHold || _
+ true || _
+ false || _
+ }
+
+ @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
+ @Unroll
+ def "set legal hold"() {
+ when: "set legal hold"
+ def response = vlwBlob.setLegalHoldWithResponse(legalHold, null, null)
+
+ then:
+ response.getValue().hasLegalHold() == legalHold
+
+ when: "get properties"
+ response = vlwBlob.getProperties()
+
+ then:
+ legalHold == response.hasLegalHold()
+
+ when: "list blob"
+ def options = new ListBlobsOptions().setDetails(new BlobListDetails().setRetrieveImmutabilityPolicy(true).setRetrieveLegalHold(true))
+ response = vlwContainer.listBlobs(options, null).iterator()
+
+ then:
+ def blob = response.next()
+ !response.hasNext()
+ blob.getName() == vlwBlob.getBlobName()
+ legalHold == blob.getProperties().hasLegalHold()
+
+ where:
+ legalHold || _
+ true || _
+ false || _
+ }
+
+ @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
+ def "set legal hold error"() {
+ setup:
+ def blob = vlwContainer.getBlobClient(generateBlobName())
+
+ when:
+ blob.setLegalHoldWithResponse(false, null, null)
+
+ then:
+ def e = thrown(BlobStorageException)
+ e.getErrorCode() == BlobErrorCode.BLOB_NOT_FOUND
+ }
+
+ @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
+ def "container properties"() {
+ when:
+ def response = vlwContainer.getProperties()
+
+ then:
+ response.isImmutableStorageWithVersioningEnabled()
+
+ when:
+ response = vlwContainer.getServiceClient().listBlobContainers(new ListBlobContainersOptions().setPrefix(vlwContainer.getBlobContainerName()), null).iterator()
+
+ then:
+ def container = response.next()
+ !response.hasNext()
+ container.getProperties().isImmutableStorageWithVersioningEnabled()
+ }
+
+ @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
+ def "append blob create"() {
+ setup:
+ def appendBlob = vlwContainer.getBlobClient(generateBlobName()).getAppendBlobClient()
+ def expiryTime = getNamer().getUtcNow().plusSeconds(2)
+ // The service rounds Immutability Policy Expiry to the nearest second.
+ def expectedImmutabilityPolicyExpiry = expiryTime.truncatedTo(ChronoUnit.SECONDS)
+ def immutabilityPolicy = new BlobImmutabilityPolicy()
+ .setExpiryTime(expiryTime)
+ .setPolicyMode(BlobImmutabilityPolicyMode.UNLOCKED)
+
+ when:
+ appendBlob.createWithResponse(new AppendBlobCreateOptions()
+ .setImmutabilityPolicy(immutabilityPolicy)
+ .setLegalHold(true), null, null)
+
+ then:
+ def response = appendBlob.getProperties()
+ expectedImmutabilityPolicyExpiry == response.getImmutabilityPolicy().getExpiryTime()
+ BlobImmutabilityPolicyMode.UNLOCKED.toString() == response.getImmutabilityPolicy().getPolicyMode().toString()
+ response.hasLegalHold()
+ }
+
+ @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
+ def "page blob create"() {
+ setup:
+ def pageBlob = vlwContainer.getBlobClient(generateBlobName()).getPageBlobClient()
+ def expiryTime = getNamer().getUtcNow().plusSeconds(2)
+ // The service rounds Immutability Policy Expiry to the nearest second.
+ def expectedImmutabilityPolicyExpiry = expiryTime.truncatedTo(ChronoUnit.SECONDS)
+ def immutabilityPolicy = new BlobImmutabilityPolicy()
+ .setExpiryTime(expiryTime)
+ .setPolicyMode(BlobImmutabilityPolicyMode.UNLOCKED)
+
+ when:
+ pageBlob.createWithResponse(new PageBlobCreateOptions(512)
+ .setImmutabilityPolicy(immutabilityPolicy)
+ .setLegalHold(true), null, null)
+
+ then:
+ def response = pageBlob.getProperties()
+ expectedImmutabilityPolicyExpiry == response.getImmutabilityPolicy().getExpiryTime()
+ BlobImmutabilityPolicyMode.UNLOCKED.toString() == response.getImmutabilityPolicy().getPolicyMode().toString()
+ response.hasLegalHold()
+ }
+
+ @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
+ def "block blob commit block list"() {
+ setup:
+ def blockBlob = vlwBlob.getBlockBlobClient()
+ def expiryTime = getNamer().getUtcNow().plusSeconds(2)
+ // The service rounds Immutability Policy Expiry to the nearest second.
+ def expectedImmutabilityPolicyExpiry = expiryTime.truncatedTo(ChronoUnit.SECONDS)
+ def immutabilityPolicy = new BlobImmutabilityPolicy()
+ .setExpiryTime(expiryTime)
+ .setPolicyMode(BlobImmutabilityPolicyMode.UNLOCKED)
+
+ when:
+ blockBlob.commitBlockListWithResponse(new BlockBlobCommitBlockListOptions(new ArrayList())
+ .setImmutabilityPolicy(immutabilityPolicy)
+ .setLegalHold(true), null, null)
+
+ then:
+ def response = blockBlob.getProperties()
+ expectedImmutabilityPolicyExpiry == response.getImmutabilityPolicy().getExpiryTime()
+ BlobImmutabilityPolicyMode.UNLOCKED.toString() == response.getImmutabilityPolicy().getPolicyMode().toString()
+ response.hasLegalHold()
+ }
+
+ @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
+ def "block blob upload"() {
+ setup:
+ def blockBlob = vlwBlob.getBlockBlobClient()
+ def expiryTime = getNamer().getUtcNow().plusSeconds(2)
+ // The service rounds Immutability Policy Expiry to the nearest second.
+ def expectedImmutabilityPolicyExpiry = expiryTime.truncatedTo(ChronoUnit.SECONDS)
+ def immutabilityPolicy = new BlobImmutabilityPolicy()
+ .setExpiryTime(expiryTime)
+ .setPolicyMode(BlobImmutabilityPolicyMode.UNLOCKED)
+
+ when:
+ blockBlob.uploadWithResponse(new BlockBlobSimpleUploadOptions(data.defaultFlux, data.defaultDataSize)
+ .setImmutabilityPolicy(immutabilityPolicy)
+ .setLegalHold(true), null, null)
+
+ then:
+ def response = blockBlob.getProperties()
+ expectedImmutabilityPolicyExpiry == response.getImmutabilityPolicy().getExpiryTime()
+ BlobImmutabilityPolicyMode.UNLOCKED.toString() == response.getImmutabilityPolicy().getPolicyMode().toString()
+ response.hasLegalHold()
+ }
+
+ @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
+ @Unroll
+ @LiveOnly
+ def "blob upload"() {
+ setup:
+ def expiryTime = getNamer().getUtcNow().plusSeconds(2)
+ // The service rounds Immutability Policy Expiry to the nearest second.
+ def expectedImmutabilityPolicyExpiry = expiryTime.truncatedTo(ChronoUnit.SECONDS)
+ def immutabilityPolicy = new BlobImmutabilityPolicy()
+ .setExpiryTime(expiryTime)
+ .setPolicyMode(BlobImmutabilityPolicyMode.UNLOCKED)
+
+ when:
+ vlwBlob.uploadWithResponse(new BlobParallelUploadOptions(data.defaultFlux)
+ .setParallelTransferOptions(new ParallelTransferOptions().setBlockSizeLong(blockSize).setMaxSingleUploadSizeLong(blockSize))
+ .setImmutabilityPolicy(immutabilityPolicy)
+ .setLegalHold(true), null, null)
+
+ then:
+ def response = vlwBlob.getProperties()
+ expectedImmutabilityPolicyExpiry == response.getImmutabilityPolicy().getExpiryTime()
+ BlobImmutabilityPolicyMode.UNLOCKED.toString() == response.getImmutabilityPolicy().getPolicyMode().toString()
+ response.hasLegalHold()
+
+ where:
+ blockSize || _
+ 1 || _ // Tests multi-part upload
+ null || _ // Tests single shot upload
+ }
+
+ @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
+ def "sync copy"() {
+ setup:
+ vlwContainer.setAccessPolicy(PublicAccessType.CONTAINER, null)
+ def destination = vlwContainer.getBlobClient(generateBlobName()).getBlockBlobClient()
+ def expiryTime = getNamer().getUtcNow().plusSeconds(2)
+ // The service rounds Immutability Policy Expiry to the nearest second.
+ def expectedImmutabilityPolicyExpiry = expiryTime.truncatedTo(ChronoUnit.SECONDS)
+ def immutabilityPolicy = new BlobImmutabilityPolicy()
+ .setExpiryTime(expiryTime)
+ .setPolicyMode(BlobImmutabilityPolicyMode.UNLOCKED)
+
+ when:
+ destination.copyFromUrlWithResponse(new BlobCopyFromUrlOptions(vlwBlob.getBlobUrl())
+ .setImmutabilityPolicy(immutabilityPolicy)
+ .setLegalHold(true), null, null)
+
+ then:
+ def response = destination.getProperties()
+ expectedImmutabilityPolicyExpiry == response.getImmutabilityPolicy().getExpiryTime()
+ BlobImmutabilityPolicyMode.UNLOCKED.toString() == response.getImmutabilityPolicy().getPolicyMode().toString()
+ response.hasLegalHold()
+
+ cleanup:
+ vlwContainer.setAccessPolicy(null, null)
+ }
+
+ @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
+ def "copy"() {
+ setup:
+ def destination = vlwContainer.getBlobClient(generateBlobName()).getBlockBlobClient()
+ def expiryTime = getNamer().getUtcNow().plusSeconds(2)
+ // The service rounds Immutability Policy Expiry to the nearest second.
+ def expectedImmutabilityPolicyExpiry = expiryTime.truncatedTo(ChronoUnit.SECONDS)
+ def immutabilityPolicy = new BlobImmutabilityPolicy()
+ .setExpiryTime(expiryTime)
+ .setPolicyMode(BlobImmutabilityPolicyMode.UNLOCKED)
+
+ when:
+ def poller = destination.beginCopy(new BlobBeginCopyOptions(vlwBlob.getBlobUrl())
+ .setImmutabilityPolicy(immutabilityPolicy)
+ .setLegalHold(true).setPollInterval(getPollingDuration(1000)))
+ poller.waitForCompletion()
+
+ then:
+ def response = destination.getProperties()
+ expectedImmutabilityPolicyExpiry == response.getImmutabilityPolicy().getExpiryTime()
+ BlobImmutabilityPolicyMode.UNLOCKED.toString() == response.getImmutabilityPolicy().getPolicyMode().toString()
+ response.hasLegalHold()
+ }
+
+ /* SAS tests */
+ @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
+ def "account sas"() {
+ setup:
+ def expiryTime = namer.getUtcNow().plusDays(1)
+ def permissions = AccountSasPermission.parse("rwdxlacuptfi")
+ def service = new AccountSasService().setBlobAccess(true)
+ def resource = new AccountSasResourceType().setObject(true).setContainer(true)
+ def sasValues = new AccountSasSignatureValues(expiryTime, permissions, service, resource)
+ expiryTime = getNamer().getUtcNow().plusSeconds(2)
+ // The service rounds Immutability Policy Expiry to the nearest second.
+ def expectedImmutabilityPolicyExpiry = expiryTime.truncatedTo(ChronoUnit.SECONDS)
+ def immutabilityPolicy = new BlobImmutabilityPolicy()
+ .setExpiryTime(expiryTime)
+ .setPolicyMode(BlobImmutabilityPolicyMode.UNLOCKED)
+ def sas = primaryBlobServiceClient.generateAccountSas(sasValues)
+ def client = getBlobClient(sas, vlwContainer.getBlobContainerUrl(), vlwBlob.getBlobName())
+
+ when:
+ def response = client.setImmutabilityPolicy(immutabilityPolicy)
+
+ then:
+ expectedImmutabilityPolicyExpiry == response.getExpiryTime()
+ BlobImmutabilityPolicyMode.UNLOCKED.toString() == response.getPolicyMode().toString()
+
+ when:
+ response = client.setLegalHold(false)
+
+ then:
+ !response.hasLegalHold()
+ }
+
+ @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
+ def "container sas"() {
+ setup:
+ def expiryTime = namer.getUtcNow().plusDays(1)
+ def permissions = BlobContainerSasPermission.parse("racwdxltmei")
+ def sasValues = new BlobServiceSasSignatureValues(expiryTime, permissions)
+ expiryTime = getNamer().getUtcNow().plusSeconds(2)
+ // The service rounds Immutability Policy Expiry to the nearest second.
+ def expectedImmutabilityPolicyExpiry = expiryTime.truncatedTo(ChronoUnit.SECONDS)
+ def immutabilityPolicy = new BlobImmutabilityPolicy()
+ .setExpiryTime(expiryTime)
+ .setPolicyMode(BlobImmutabilityPolicyMode.UNLOCKED)
+ def sas = vlwContainer.generateSas(sasValues)
+ def client = getBlobClient(sas, vlwContainer.getBlobContainerUrl(), vlwBlob.getBlobName())
+
+ when:
+ def response = client.setImmutabilityPolicy(immutabilityPolicy)
+
+ then:
+ expectedImmutabilityPolicyExpiry == response.getExpiryTime()
+ BlobImmutabilityPolicyMode.UNLOCKED.toString() == response.getPolicyMode().toString()
+
+ when:
+ response = client.setLegalHold(false)
+
+ then:
+ !response.hasLegalHold()
+ }
+
+ @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
+ def "blob sas"() {
+ setup:
+ def expiryTime = namer.getUtcNow().plusDays(1)
+ def permissions = BlobSasPermission.parse("racwdxtlmei")
+ def sasValues = new BlobServiceSasSignatureValues(expiryTime, permissions)
+ expiryTime = getNamer().getUtcNow().plusSeconds(2)
+ // The service rounds Immutability Policy Expiry to the nearest second.
+ def expectedImmutabilityPolicyExpiry = expiryTime.truncatedTo(ChronoUnit.SECONDS)
+ def immutabilityPolicy = new BlobImmutabilityPolicy()
+ .setExpiryTime(expiryTime)
+ .setPolicyMode(BlobImmutabilityPolicyMode.UNLOCKED)
+ def sas = vlwBlob.generateSas(sasValues)
+ def client = getBlobClient(sas, vlwContainer.getBlobContainerUrl(), vlwBlob.getBlobName())
+
+ when:
+ def response = client.setImmutabilityPolicy(immutabilityPolicy)
+
+ then:
+ expectedImmutabilityPolicyExpiry == response.getExpiryTime()
+ BlobImmutabilityPolicyMode.UNLOCKED.toString() == response.getPolicyMode().toString()
+
+ when:
+ response = client.setLegalHold(false)
+
+ then:
+ !response.hasLegalHold()
+ }
+
+}
diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestAccountSas.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestAccountSas.json
new file mode 100644
index 000000000000..e9f77df7757a
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestAccountSas.json
@@ -0,0 +1,92 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/b3e29cea0b3e29cea2626041815d31a7ca8994aec877?restype=container",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "14bcfc1d-10c3-405b-9616-8bf0cde241fe"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D921461D6D270A",
+ "Last-Modified" : "Thu, 27 May 2021 19:32:07 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "72ac30a7-501e-0090-672e-53e0ac000000",
+ "x-ms-client-request-id" : "14bcfc1d-10c3-405b-9616-8bf0cde241fe",
+ "Date" : "Thu, 27 May 2021 19:32:06 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/b3e29cea1b3e29cea262102965f662e4767134970929/b3e29cea2b3e29cea26225384ffb25649a66b4fa6855",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "fae88e85-9e7a-496d-b4e0-72a072eb8fae",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-content-crc64" : "AAAAAAAAAAA=",
+ "Last-Modified" : "Thu, 27 May 2021 19:32:07 GMT",
+ "x-ms-version-id" : "2021-05-27T19:32:07.9900351Z",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Thu, 27 May 2021 19:32:07 GMT",
+ "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==",
+ "eTag" : "0x8D921461DBBA6BF",
+ "x-ms-request-id" : "72ac3102-501e-0090-212e-53e0ac000000",
+ "x-ms-client-request-id" : "fae88e85-9e7a-496d-b4e0-72a072eb8fae"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/b3e29cea1b3e29cea262102965f662e4767134970929/b3e29cea2b3e29cea26225384ffb25649a66b4fa6855?comp=immutabilityPolicies&sv=2020-10-02&ss=b&srt=co&se=2021-05-28T19%3A32%3A08Z&sp=rwdxlacuptfi&sig=REDACTED",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "e3bda891-4f63-44f9-bdee-33bbc4d0b3b3"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-immutability-policy-mode" : "unlocked",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-immutability-policy-until-date" : "Thu, 27 May 2021 19:32:10 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-request-id" : "72ac3124-501e-0090-3e2e-53e0ac000000",
+ "x-ms-client-request-id" : "e3bda891-4f63-44f9-bdee-33bbc4d0b3b3",
+ "Date" : "Thu, 27 May 2021 19:32:07 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/b3e29cea1b3e29cea262102965f662e4767134970929/b3e29cea2b3e29cea26225384ffb25649a66b4fa6855?comp=legalhold&sv=2020-10-02&ss=b&srt=co&se=2021-05-28T19%3A32%3A08Z&sp=rwdxlacuptfi&sig=REDACTED",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "775183b6-1d16-469c-9066-c3069caecfb6"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-legal-hold" : "false",
+ "x-ms-request-id" : "72ac313e-501e-0090-522e-53e0ac000000",
+ "x-ms-client-request-id" : "775183b6-1d16-469c-9066-c3069caecfb6",
+ "Date" : "Thu, 27 May 2021 19:32:07 GMT"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "b3e29cea0b3e29cea2626041815d31a7ca8994aec877", "b3e29cea1b3e29cea262102965f662e4767134970929", "b3e29cea2b3e29cea26225384ffb25649a66b4fa6855", "2021-05-27T19:32:08.903747700Z", "2021-05-27T19:32:08.961483200Z" ]
+}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestAppendBlobCreate.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestAppendBlobCreate.json
new file mode 100644
index 000000000000..27073964bb5f
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestAppendBlobCreate.json
@@ -0,0 +1,108 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/3acd3d2703acd3d2728d59408c3c96ff9ca2b416cacd?restype=container",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "1584034e-365a-4a73-9004-14d9ae50b4ae"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D92145F522C770",
+ "Last-Modified" : "Thu, 27 May 2021 19:30:59 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "6fae7b92-a01e-002d-3a2e-5369b1000000",
+ "x-ms-client-request-id" : "1584034e-365a-4a73-9004-14d9ae50b4ae",
+ "Date" : "Thu, 27 May 2021 19:30:59 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/3acd3d2713acd3d2728d084871af8b3daca1444f8941/3acd3d2723acd3d2728d139092bed77e0a1c343f7bb0",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "35c7e1d5-ec62-468d-9527-f4b3b734d897",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-content-crc64" : "AAAAAAAAAAA=",
+ "Last-Modified" : "Thu, 27 May 2021 19:31:00 GMT",
+ "x-ms-version-id" : "2021-05-27T19:31:00.4770663Z",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Thu, 27 May 2021 19:31:00 GMT",
+ "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==",
+ "eTag" : "0x8D92145F57DFD67",
+ "x-ms-request-id" : "6fae7bfd-a01e-002d-122e-5369b1000000",
+ "x-ms-client-request-id" : "35c7e1d5-ec62-468d-9527-f4b3b734d897"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/3acd3d2713acd3d2728d084871af8b3daca1444f8941/3acd3d2733acd3d2728d86294aecd491f72994ce28d7",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "3b14f7b2-52d0-415f-b161-c86959d97f58"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D92145F591FE3A",
+ "Last-Modified" : "Thu, 27 May 2021 19:31:00 GMT",
+ "x-ms-version-id" : "2021-05-27T19:31:00.6081594Z",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "6fae7c06-a01e-002d-1b2e-5369b1000000",
+ "x-ms-request-server-encrypted" : "true",
+ "x-ms-client-request-id" : "3b14f7b2-52d0-415f-b161-c86959d97f58",
+ "Date" : "Thu, 27 May 2021 19:31:00 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "HEAD",
+ "Uri" : "https://REDACTED.blob.core.windows.net/3acd3d2713acd3d2728d084871af8b3daca1444f8941/3acd3d2733acd3d2728d86294aecd491f72994ce28d7",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "4141d73a-c4bb-489a-9b2a-781e0fc59f2b"
+ },
+ "Response" : {
+ "x-ms-is-current-version" : "true",
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-lease-status" : "unlocked",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-immutability-policy-until-date" : "Thu, 27 May 2021 19:31:03 GMT",
+ "x-ms-lease-state" : "available",
+ "x-ms-blob-committed-block-count" : "0",
+ "Last-Modified" : "Thu, 27 May 2021 19:31:00 GMT",
+ "x-ms-version-id" : "2021-05-27T19:31:00.6081594Z",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-legal-hold" : "true",
+ "Date" : "Thu, 27 May 2021 19:31:00 GMT",
+ "x-ms-blob-type" : "AppendBlob",
+ "Accept-Ranges" : "bytes",
+ "x-ms-server-encrypted" : "true",
+ "x-ms-immutability-policy-mode" : "unlocked",
+ "x-ms-creation-time" : "Thu, 27 May 2021 19:31:00 GMT",
+ "eTag" : "0x8D92145F591FE3A",
+ "x-ms-request-id" : "6fae7c1b-a01e-002d-262e-5369b1000000",
+ "x-ms-client-request-id" : "4141d73a-c4bb-489a-9b2a-781e0fc59f2b",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "3acd3d2703acd3d2728d59408c3c96ff9ca2b416cacd", "3acd3d2713acd3d2728d084871af8b3daca1444f8941", "3acd3d2723acd3d2728d139092bed77e0a1c343f7bb0", "3acd3d2733acd3d2728d86294aecd491f72994ce28d7", "2021-05-27T19:31:01.400830300Z" ]
+}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestBlobSas.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestBlobSas.json
new file mode 100644
index 000000000000..97f9a20b9a2f
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestBlobSas.json
@@ -0,0 +1,92 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/63d094ba063d094ba06a426019282cc2a0828436da12?restype=container",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "a9c65418-d204-4279-86d2-dfe3bad38288"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D9214625B1602C",
+ "Last-Modified" : "Thu, 27 May 2021 19:32:21 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "72ac3c7a-501e-0090-5c2f-53e0ac000000",
+ "x-ms-client-request-id" : "a9c65418-d204-4279-86d2-dfe3bad38288",
+ "Date" : "Thu, 27 May 2021 19:32:20 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/63d094ba163d094ba06a741161e86f18e44904e199c3/63d094ba263d094ba06a02168a3a3bebddffa4bf7a64",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "bb5a8d68-ad12-4aff-ada5-075e5b536c75",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-content-crc64" : "AAAAAAAAAAA=",
+ "Last-Modified" : "Thu, 27 May 2021 19:32:21 GMT",
+ "x-ms-version-id" : "2021-05-27T19:32:21.9069192Z",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Thu, 27 May 2021 19:32:21 GMT",
+ "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==",
+ "eTag" : "0x8D9214626073308",
+ "x-ms-request-id" : "72ac3ce7-501e-0090-302f-53e0ac000000",
+ "x-ms-client-request-id" : "bb5a8d68-ad12-4aff-ada5-075e5b536c75"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/63d094ba163d094ba06a741161e86f18e44904e199c3/63d094ba263d094ba06a02168a3a3bebddffa4bf7a64?comp=immutabilityPolicies&sv=2020-10-02&se=2021-05-28T19%3A32%3A22Z&sr=b&sp=racwdxltmei&sig=REDACTED",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "3f108c91-d35b-47c6-b6b7-cf5093713786"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-immutability-policy-mode" : "unlocked",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-immutability-policy-until-date" : "Thu, 27 May 2021 19:32:24 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-request-id" : "72ac3cfb-501e-0090-412f-53e0ac000000",
+ "x-ms-client-request-id" : "3f108c91-d35b-47c6-b6b7-cf5093713786",
+ "Date" : "Thu, 27 May 2021 19:32:21 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/63d094ba163d094ba06a741161e86f18e44904e199c3/63d094ba263d094ba06a02168a3a3bebddffa4bf7a64?comp=legalhold&sv=2020-10-02&se=2021-05-28T19%3A32%3A22Z&sr=b&sp=racwdxltmei&sig=REDACTED",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "fa29218b-a6ca-45b9-a570-0a978e142412"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-legal-hold" : "false",
+ "x-ms-request-id" : "72ac3d0d-501e-0090-522f-53e0ac000000",
+ "x-ms-client-request-id" : "fa29218b-a6ca-45b9-a570-0a978e142412",
+ "Date" : "Thu, 27 May 2021 19:32:21 GMT"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "63d094ba063d094ba06a426019282cc2a0828436da12", "63d094ba163d094ba06a741161e86f18e44904e199c3", "63d094ba263d094ba06a02168a3a3bebddffa4bf7a64", "2021-05-27T19:32:22.823801200Z", "2021-05-27T19:32:22.840795800Z" ]
+}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestBlockBlobCommitBlockList.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestBlockBlobCommitBlockList.json
new file mode 100644
index 000000000000..cdff28d55017
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestBlockBlobCommitBlockList.json
@@ -0,0 +1,112 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/0d73644400d7364443cc83999b6206e8df4f64657b82?restype=container",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "ee051c03-d731-43ac-9efe-ab1ef517b3f1"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D921460AEBBD0A",
+ "Last-Modified" : "Thu, 27 May 2021 19:31:36 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "72ac1421-501e-0090-7b2e-53e0ac000000",
+ "x-ms-client-request-id" : "ee051c03-d731-43ac-9efe-ab1ef517b3f1",
+ "Date" : "Thu, 27 May 2021 19:31:35 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/0d73644410d7364443cc189079debf198110c435eaca/0d73644420d7364443cc62709f00d9176b9494fa1a48",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "7b4d4a30-689c-4c45-b808-07f480741bbf",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-content-crc64" : "AAAAAAAAAAA=",
+ "Last-Modified" : "Thu, 27 May 2021 19:31:37 GMT",
+ "x-ms-version-id" : "2021-05-27T19:31:37.0370424Z",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Thu, 27 May 2021 19:31:36 GMT",
+ "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==",
+ "eTag" : "0x8D921460B489978",
+ "x-ms-request-id" : "72ac1490-501e-0090-4f2e-53e0ac000000",
+ "x-ms-client-request-id" : "7b4d4a30-689c-4c45-b808-07f480741bbf"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/0d73644410d7364443cc189079debf198110c435eaca/0d73644420d7364443cc62709f00d9176b9494fa1a48?comp=blocklist",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "e017e175-17fa-4c1d-a2ac-7c136d81ece6",
+ "Content-Type" : "application/xml"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-content-crc64" : "p1vsGtjjPsk=",
+ "Last-Modified" : "Thu, 27 May 2021 19:31:37 GMT",
+ "x-ms-version-id" : "2021-05-27T19:31:37.3042321Z",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Thu, 27 May 2021 19:31:36 GMT",
+ "eTag" : "0x8D921460B711065",
+ "x-ms-request-id" : "72ac14fd-501e-0090-2b2e-53e0ac000000",
+ "x-ms-client-request-id" : "e017e175-17fa-4c1d-a2ac-7c136d81ece6"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "HEAD",
+ "Uri" : "https://REDACTED.blob.core.windows.net/0d73644410d7364443cc189079debf198110c435eaca/0d73644420d7364443cc62709f00d9176b9494fa1a48",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "286f7a1b-101d-49b7-a905-73241cd65fc6"
+ },
+ "Response" : {
+ "x-ms-is-current-version" : "true",
+ "content-length" : "0",
+ "x-ms-lease-status" : "unlocked",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-lease-state" : "available",
+ "Last-Modified" : "Thu, 27 May 2021 19:31:37 GMT",
+ "x-ms-version-id" : "2021-05-27T19:31:37.3042321Z",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-blob-type" : "BlockBlob",
+ "x-ms-immutability-policy-mode" : "unlocked",
+ "x-ms-access-tier-inferred" : "true",
+ "x-ms-access-tier" : "Hot",
+ "x-ms-creation-time" : "Thu, 27 May 2021 19:31:37 GMT",
+ "eTag" : "0x8D921460B711065",
+ "x-ms-request-id" : "72ac150d-501e-0090-392e-53e0ac000000",
+ "Content-Type" : "application/octet-stream",
+ "x-ms-last-access-time" : "Thu, 27 May 2021 19:31:37 GMT",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-immutability-policy-until-date" : "Thu, 27 May 2021 19:31:39 GMT",
+ "x-ms-legal-hold" : "true",
+ "Date" : "Thu, 27 May 2021 19:31:36 GMT",
+ "Accept-Ranges" : "bytes",
+ "x-ms-server-encrypted" : "true",
+ "x-ms-client-request-id" : "286f7a1b-101d-49b7-a905-73241cd65fc6"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "0d73644400d7364443cc83999b6206e8df4f64657b82", "0d73644410d7364443cc189079debf198110c435eaca", "0d73644420d7364443cc62709f00d9176b9494fa1a48", "2021-05-27T19:31:37.959028Z" ]
+}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestBlockBlobUpload.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestBlockBlobUpload.json
new file mode 100644
index 000000000000..2e444f4db97e
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestBlockBlobUpload.json
@@ -0,0 +1,114 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/9f11288f09f11288ffcc2964735412cd5a1ba47af87b?restype=container",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "d62f00aa-13c8-41ea-91da-7f71d951ab93"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D921460F3B6E3A",
+ "Last-Modified" : "Thu, 27 May 2021 19:31:43 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "72ac1a5e-501e-0090-0c2e-53e0ac000000",
+ "x-ms-client-request-id" : "d62f00aa-13c8-41ea-91da-7f71d951ab93",
+ "Date" : "Thu, 27 May 2021 19:31:42 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/9f11288f19f11288ffcc70202f4c27a8223cd482fa5f/9f11288f29f11288ffcc68929653e8cf5354a45c29ee",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "30b575a6-188c-435f-825d-5e9ab412b413",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-content-crc64" : "AAAAAAAAAAA=",
+ "Last-Modified" : "Thu, 27 May 2021 19:31:44 GMT",
+ "x-ms-version-id" : "2021-05-27T19:31:44.3222203Z",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Thu, 27 May 2021 19:31:43 GMT",
+ "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==",
+ "eTag" : "0x8D921460FA03ABB",
+ "x-ms-request-id" : "72ac1ade-501e-0090-712e-53e0ac000000",
+ "x-ms-client-request-id" : "30b575a6-188c-435f-825d-5e9ab412b413"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/9f11288f19f11288ffcc70202f4c27a8223cd482fa5f/9f11288f29f11288ffcc68929653e8cf5354a45c29ee",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "0883c007-5696-44f5-8e08-c573de3d327f",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-content-crc64" : "6RYQPwaVsyQ=",
+ "Last-Modified" : "Thu, 27 May 2021 19:31:44 GMT",
+ "x-ms-version-id" : "2021-05-27T19:31:44.4142842Z",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Thu, 27 May 2021 19:31:43 GMT",
+ "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==",
+ "eTag" : "0x8D921460FAE1FEA",
+ "x-ms-request-id" : "72ac1af8-501e-0090-042e-53e0ac000000",
+ "x-ms-client-request-id" : "0883c007-5696-44f5-8e08-c573de3d327f"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "HEAD",
+ "Uri" : "https://REDACTED.blob.core.windows.net/9f11288f19f11288ffcc70202f4c27a8223cd482fa5f/9f11288f29f11288ffcc68929653e8cf5354a45c29ee",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "819965ff-ac5b-4b80-a1c7-50a7f085ef51"
+ },
+ "Response" : {
+ "x-ms-is-current-version" : "true",
+ "content-length" : "7",
+ "x-ms-lease-status" : "unlocked",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-lease-state" : "available",
+ "Last-Modified" : "Thu, 27 May 2021 19:31:44 GMT",
+ "x-ms-version-id" : "2021-05-27T19:31:44.4142842Z",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-blob-type" : "BlockBlob",
+ "x-ms-immutability-policy-mode" : "unlocked",
+ "x-ms-access-tier-inferred" : "true",
+ "x-ms-access-tier" : "Hot",
+ "x-ms-creation-time" : "Thu, 27 May 2021 19:31:44 GMT",
+ "eTag" : "0x8D921460FAE1FEA",
+ "x-ms-request-id" : "72ac1b16-501e-0090-182e-53e0ac000000",
+ "Content-Type" : "application/octet-stream",
+ "x-ms-last-access-time" : "Thu, 27 May 2021 19:31:44 GMT",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-immutability-policy-until-date" : "Thu, 27 May 2021 19:31:47 GMT",
+ "x-ms-legal-hold" : "true",
+ "Date" : "Thu, 27 May 2021 19:31:43 GMT",
+ "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==",
+ "Accept-Ranges" : "bytes",
+ "x-ms-server-encrypted" : "true",
+ "x-ms-client-request-id" : "819965ff-ac5b-4b80-a1c7-50a7f085ef51"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "9f11288f09f11288ffcc2964735412cd5a1ba47af87b", "9f11288f19f11288ffcc70202f4c27a8223cd482fa5f", "9f11288f29f11288ffcc68929653e8cf5354a45c29ee", "2021-05-27T19:31:45.236012400Z" ]
+}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestContainerProperties.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestContainerProperties.json
new file mode 100644
index 000000000000..55d82875b5d4
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestContainerProperties.json
@@ -0,0 +1,100 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/20b1648e020b1648e0e51941938b0cb5d545641ecad0?restype=container",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "57c425db-f35b-40fc-9318-c5f44f57f6b4"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D92145F3FE0F7F",
+ "Last-Modified" : "Thu, 27 May 2021 19:30:57 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "6fae7a29-a01e-002d-112e-5369b1000000",
+ "x-ms-client-request-id" : "57c425db-f35b-40fc-9318-c5f44f57f6b4",
+ "Date" : "Thu, 27 May 2021 19:30:57 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/20b1648e120b1648e0e5212131bc817ec08f4408ab64/20b1648e220b1648e0e547157668c96682a7944929f7",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "1b9423f9-9a05-439c-946e-2572fcdf2900",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-content-crc64" : "AAAAAAAAAAA=",
+ "Last-Modified" : "Thu, 27 May 2021 19:30:58 GMT",
+ "x-ms-version-id" : "2021-05-27T19:30:58.6177449Z",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Thu, 27 May 2021 19:30:58 GMT",
+ "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==",
+ "eTag" : "0x8D92145F46247A9",
+ "x-ms-request-id" : "6fae7aaa-a01e-002d-732e-5369b1000000",
+ "x-ms-client-request-id" : "1b9423f9-9a05-439c-946e-2572fcdf2900"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "GET",
+ "Uri" : "https://REDACTED.blob.core.windows.net/20b1648e120b1648e0e5212131bc817ec08f4408ab64?restype=container",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "46ae6777-d646-42ff-ad02-5dc0497b4b79"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-lease-status" : "unlocked",
+ "x-ms-immutable-storage-with-versioning-enabled" : "true",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-lease-state" : "available",
+ "x-ms-deny-encryption-scope-override" : "false",
+ "Last-Modified" : "Thu, 27 May 2021 19:30:58 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-has-legal-hold" : "false",
+ "Date" : "Thu, 27 May 2021 19:30:58 GMT",
+ "x-ms-default-encryption-scope" : "$account-encryption-key",
+ "x-ms-has-immutability-policy" : "false",
+ "eTag" : "0x8D92145F450C477",
+ "x-ms-request-id" : "6fae7abf-a01e-002d-052e-5369b1000000",
+ "x-ms-client-request-id" : "46ae6777-d646-42ff-ad02-5dc0497b4b79"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "GET",
+ "Uri" : "https://REDACTED.blob.core.windows.net?comp=list&prefix=20b1648e120b1648e0e5212131bc817ec08f4408ab64",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "a567e7b0-f46f-4c3d-abad-f824d542f789"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-request-id" : "6fae7aca-a01e-002d-0e2e-5369b1000000",
+ "Body" : "20b1648e120b1648e0e5212131bc817ec08f4408ab6420b1648e120b1648e0e5212131bc817ec08f4408ab64Thu, 27 May 2021 19:30:58 GMT\"0x8D92145F450C477\"unlockedavailable$account-encryption-keyfalsefalsefalsetrue",
+ "x-ms-client-request-id" : "a567e7b0-f46f-4c3d-abad-f824d542f789",
+ "Date" : "Thu, 27 May 2021 19:30:58 GMT",
+ "Content-Type" : "application/xml"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "20b1648e020b1648e0e51941938b0cb5d545641ecad0", "20b1648e120b1648e0e5212131bc817ec08f4408ab64", "20b1648e220b1648e0e547157668c96682a7944929f7" ]
+}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestContainerSas.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestContainerSas.json
new file mode 100644
index 000000000000..c5122dc94d01
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestContainerSas.json
@@ -0,0 +1,92 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/5fca972505fca97256f966501f3191159df764d70b76?restype=container",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "7d441442-8beb-4908-ac46-91c0b1ab07f4"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D921462184317A",
+ "Last-Modified" : "Thu, 27 May 2021 19:32:14 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "72ac36ba-501e-0090-3a2e-53e0ac000000",
+ "x-ms-client-request-id" : "7d441442-8beb-4908-ac46-91c0b1ab07f4",
+ "Date" : "Thu, 27 May 2021 19:32:13 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/5fca972515fca97256f915961d0f67ae1cfe3486a81f/5fca972525fca97256f955912e6f2cb59b63646b2815",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "5fbdd76f-4232-4e6c-9485-cf656cb184a3",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-content-crc64" : "AAAAAAAAAAA=",
+ "Last-Modified" : "Thu, 27 May 2021 19:32:14 GMT",
+ "x-ms-version-id" : "2021-05-27T19:32:14.8829329Z",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Thu, 27 May 2021 19:32:14 GMT",
+ "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==",
+ "eTag" : "0x8D9214621D76C91",
+ "x-ms-request-id" : "72ac3712-501e-0090-012e-53e0ac000000",
+ "x-ms-client-request-id" : "5fbdd76f-4232-4e6c-9485-cf656cb184a3"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/5fca972515fca97256f915961d0f67ae1cfe3486a81f/5fca972525fca97256f955912e6f2cb59b63646b2815?comp=immutabilityPolicies&sv=2020-10-02&se=2021-05-28T19%3A32%3A15Z&sr=c&sp=racwdxltmei&sig=REDACTED",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "6665cf74-1072-4fef-9129-0b203e7c671b"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-immutability-policy-mode" : "unlocked",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-immutability-policy-until-date" : "Thu, 27 May 2021 19:32:17 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-request-id" : "72ac3723-501e-0090-0e2e-53e0ac000000",
+ "x-ms-client-request-id" : "6665cf74-1072-4fef-9129-0b203e7c671b",
+ "Date" : "Thu, 27 May 2021 19:32:14 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/5fca972515fca97256f915961d0f67ae1cfe3486a81f/5fca972525fca97256f955912e6f2cb59b63646b2815?comp=legalhold&sv=2020-10-02&se=2021-05-28T19%3A32%3A15Z&sr=c&sp=racwdxltmei&sig=REDACTED",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "38eebf60-b5a1-40d6-ac2b-cf4e3f78395c"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-legal-hold" : "false",
+ "x-ms-request-id" : "72ac3731-501e-0090-182e-53e0ac000000",
+ "x-ms-client-request-id" : "38eebf60-b5a1-40d6-ac2b-cf4e3f78395c",
+ "Date" : "Thu, 27 May 2021 19:32:14 GMT"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "5fca972505fca97256f966501f3191159df764d70b76", "5fca972515fca97256f915961d0f67ae1cfe3486a81f", "5fca972525fca97256f955912e6f2cb59b63646b2815", "2021-05-27T19:32:15.796732500Z", "2021-05-27T19:32:15.821731300Z" ]
+}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestCopy.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestCopy.json
new file mode 100644
index 000000000000..507ff6cf975f
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestCopy.json
@@ -0,0 +1,159 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/d59f871e0d59f871e88608595bb07ab5ca34e44d4910?restype=container",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "6d5abcf6-cf68-4137-a843-7aa00c3bacc3"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D92146187753A0",
+ "Last-Modified" : "Thu, 27 May 2021 19:31:59 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "72ac2912-501e-0090-122e-53e0ac000000",
+ "x-ms-client-request-id" : "6d5abcf6-cf68-4137-a843-7aa00c3bacc3",
+ "Date" : "Thu, 27 May 2021 19:31:58 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/d59f871e1d59f871e88696273b789283c9d274fe7bab/d59f871e2d59f871e88601602ae6e26821b264666bd9",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "c4e88e99-e92f-4085-a757-b55ac1c28135",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-content-crc64" : "AAAAAAAAAAA=",
+ "Last-Modified" : "Thu, 27 May 2021 19:31:59 GMT",
+ "x-ms-version-id" : "2021-05-27T19:31:59.6961403Z",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Thu, 27 May 2021 19:31:58 GMT",
+ "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==",
+ "eTag" : "0x8D9214618CA1A7B",
+ "x-ms-request-id" : "72ac2980-501e-0090-6c2e-53e0ac000000",
+ "x-ms-client-request-id" : "c4e88e99-e92f-4085-a757-b55ac1c28135"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/d59f871e1d59f871e88696273b789283c9d274fe7bab/d59f871e3d59f871e88613392aa9c0a46bba6488e82d",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "94ace7ed-38a2-4f92-8206-faa844f601b7"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-copy-id" : "d83afc8e-7ba5-4311-8a8b-289ae8c96b7d",
+ "Last-Modified" : "Thu, 27 May 2021 19:31:59 GMT",
+ "x-ms-version-id" : "2021-05-27T19:31:59.8962822Z",
+ "retry-after" : "0",
+ "StatusCode" : "202",
+ "Date" : "Thu, 27 May 2021 19:31:59 GMT",
+ "eTag" : "0x8D9214618E87D6E",
+ "x-ms-copy-status" : "success",
+ "x-ms-request-id" : "72ac29a4-501e-0090-082e-53e0ac000000",
+ "x-ms-client-request-id" : "94ace7ed-38a2-4f92-8206-faa844f601b7"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "HEAD",
+ "Uri" : "https://REDACTED.blob.core.windows.net/d59f871e1d59f871e88696273b789283c9d274fe7bab/d59f871e3d59f871e88613392aa9c0a46bba6488e82d",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "b837b62e-3d75-440b-8158-bcf858a9c643"
+ },
+ "Response" : {
+ "x-ms-is-current-version" : "true",
+ "content-length" : "0",
+ "x-ms-lease-status" : "unlocked",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-lease-state" : "available",
+ "Last-Modified" : "Thu, 27 May 2021 19:31:59 GMT",
+ "x-ms-version-id" : "2021-05-27T19:31:59.8962822Z",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-blob-type" : "BlockBlob",
+ "x-ms-immutability-policy-mode" : "unlocked",
+ "x-ms-access-tier-inferred" : "true",
+ "x-ms-access-tier" : "Hot",
+ "x-ms-creation-time" : "Thu, 27 May 2021 19:31:59 GMT",
+ "eTag" : "0x8D9214618E87D6E",
+ "x-ms-request-id" : "72ac2aa1-501e-0090-5d2e-53e0ac000000",
+ "Content-Type" : "application/octet-stream",
+ "x-ms-last-access-time" : "Thu, 27 May 2021 19:31:59 GMT",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-copy-id" : "d83afc8e-7ba5-4311-8a8b-289ae8c96b7d",
+ "x-ms-immutability-policy-until-date" : "Thu, 27 May 2021 19:32:02 GMT",
+ "x-ms-copy-source" : "https://seanmcccanary3.blob.core.windows.net/d59f871e1d59f871e88696273b789283c9d274fe7bab/d59f871e2d59f871e88601602ae6e26821b264666bd9",
+ "x-ms-copy-progress" : "0/0",
+ "x-ms-legal-hold" : "true",
+ "Date" : "Thu, 27 May 2021 19:32:00 GMT",
+ "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==",
+ "Accept-Ranges" : "bytes",
+ "x-ms-copy-completion-time" : "Thu, 27 May 2021 19:31:59 GMT",
+ "x-ms-server-encrypted" : "true",
+ "x-ms-copy-status" : "success",
+ "x-ms-client-request-id" : "b837b62e-3d75-440b-8158-bcf858a9c643"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "HEAD",
+ "Uri" : "https://REDACTED.blob.core.windows.net/d59f871e1d59f871e88696273b789283c9d274fe7bab/d59f871e3d59f871e88613392aa9c0a46bba6488e82d",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "e1919beb-65ab-412d-95b9-9c4e29dc85e4"
+ },
+ "Response" : {
+ "x-ms-is-current-version" : "true",
+ "content-length" : "0",
+ "x-ms-lease-status" : "unlocked",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-lease-state" : "available",
+ "Last-Modified" : "Thu, 27 May 2021 19:31:59 GMT",
+ "x-ms-version-id" : "2021-05-27T19:31:59.8962822Z",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-blob-type" : "BlockBlob",
+ "x-ms-immutability-policy-mode" : "unlocked",
+ "x-ms-access-tier-inferred" : "true",
+ "x-ms-access-tier" : "Hot",
+ "x-ms-creation-time" : "Thu, 27 May 2021 19:31:59 GMT",
+ "eTag" : "0x8D9214618E87D6E",
+ "x-ms-request-id" : "72ac2abf-501e-0090-752e-53e0ac000000",
+ "Content-Type" : "application/octet-stream",
+ "x-ms-last-access-time" : "Thu, 27 May 2021 19:31:59 GMT",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-copy-id" : "d83afc8e-7ba5-4311-8a8b-289ae8c96b7d",
+ "x-ms-immutability-policy-until-date" : "Thu, 27 May 2021 19:32:02 GMT",
+ "x-ms-copy-source" : "https://seanmcccanary3.blob.core.windows.net/d59f871e1d59f871e88696273b789283c9d274fe7bab/d59f871e2d59f871e88601602ae6e26821b264666bd9",
+ "x-ms-copy-progress" : "0/0",
+ "x-ms-legal-hold" : "true",
+ "Date" : "Thu, 27 May 2021 19:32:00 GMT",
+ "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==",
+ "Accept-Ranges" : "bytes",
+ "x-ms-copy-completion-time" : "Thu, 27 May 2021 19:31:59 GMT",
+ "x-ms-server-encrypted" : "true",
+ "x-ms-copy-status" : "success",
+ "x-ms-client-request-id" : "e1919beb-65ab-412d-95b9-9c4e29dc85e4"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "d59f871e0d59f871e88608595bb07ab5ca34e44d4910", "d59f871e1d59f871e88696273b789283c9d274fe7bab", "d59f871e2d59f871e88601602ae6e26821b264666bd9", "d59f871e3d59f871e88613392aa9c0a46bba6488e82d", "2021-05-27T19:32:00.613943300Z" ]
+}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestDeleteImmutabilityPolicy.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestDeleteImmutabilityPolicy.json
new file mode 100644
index 000000000000..5efd5e3fb636
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestDeleteImmutabilityPolicy.json
@@ -0,0 +1,125 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/a91327200a91327207cd77478567fec3cf8b84f6284b?restype=container",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "29a6c8b9-9c0c-4fa9-868e-bd9c385bb88a"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D92145EB885EFD",
+ "Last-Modified" : "Thu, 27 May 2021 19:30:43 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "6fae6e71-a01e-002d-7e2e-5369b1000000",
+ "x-ms-client-request-id" : "29a6c8b9-9c0c-4fa9-868e-bd9c385bb88a",
+ "Date" : "Thu, 27 May 2021 19:30:43 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/a91327201a91327207cd30720211e6ee9c333400d814/a91327202a91327207cd0421834d4f021930a4665a0f",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "96e0ec08-c245-43df-9a1e-9658df3e0134",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-content-crc64" : "AAAAAAAAAAA=",
+ "Last-Modified" : "Thu, 27 May 2021 19:30:44 GMT",
+ "x-ms-version-id" : "2021-05-27T19:30:44.4116548Z",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Thu, 27 May 2021 19:30:44 GMT",
+ "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==",
+ "eTag" : "0x8D92145EBEA9A44",
+ "x-ms-request-id" : "6fae6f21-a01e-002d-112e-5369b1000000",
+ "x-ms-client-request-id" : "96e0ec08-c245-43df-9a1e-9658df3e0134"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/a91327201a91327207cd30720211e6ee9c333400d814/a91327202a91327207cd0421834d4f021930a4665a0f?comp=immutabilityPolicies",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "038a3860-d6d1-4944-882e-39f18eb6a962"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-immutability-policy-mode" : "unlocked",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-immutability-policy-until-date" : "Thu, 27 May 2021 19:30:47 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-request-id" : "6fae6f2f-a01e-002d-1e2e-5369b1000000",
+ "x-ms-client-request-id" : "038a3860-d6d1-4944-882e-39f18eb6a962",
+ "Date" : "Thu, 27 May 2021 19:30:44 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "DELETE",
+ "Uri" : "https://REDACTED.blob.core.windows.net/a91327201a91327207cd30720211e6ee9c333400d814/a91327202a91327207cd0421834d4f021930a4665a0f?comp=immutabilityPolicies",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "190a6aba-4e42-4d6b-a61e-b00ba1fa27eb"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-request-id" : "6fae6f3d-a01e-002d-292e-5369b1000000",
+ "x-ms-client-request-id" : "190a6aba-4e42-4d6b-a61e-b00ba1fa27eb",
+ "Date" : "Thu, 27 May 2021 19:30:44 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "HEAD",
+ "Uri" : "https://REDACTED.blob.core.windows.net/a91327201a91327207cd30720211e6ee9c333400d814/a91327202a91327207cd0421834d4f021930a4665a0f",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "251d8eaa-9f95-48f5-946d-1c7984e84a8b"
+ },
+ "Response" : {
+ "x-ms-is-current-version" : "true",
+ "content-length" : "0",
+ "x-ms-last-access-time" : "Thu, 27 May 2021 19:30:44 GMT",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-lease-status" : "unlocked",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-lease-state" : "available",
+ "Last-Modified" : "Thu, 27 May 2021 19:30:44 GMT",
+ "x-ms-version-id" : "2021-05-27T19:30:44.4116548Z",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "Date" : "Thu, 27 May 2021 19:30:44 GMT",
+ "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==",
+ "x-ms-blob-type" : "BlockBlob",
+ "Accept-Ranges" : "bytes",
+ "x-ms-server-encrypted" : "true",
+ "x-ms-access-tier-inferred" : "true",
+ "x-ms-access-tier" : "Hot",
+ "x-ms-creation-time" : "Thu, 27 May 2021 19:30:44 GMT",
+ "eTag" : "0x8D92145EBEA9A44",
+ "x-ms-request-id" : "6fae6f48-a01e-002d-332e-5369b1000000",
+ "x-ms-client-request-id" : "251d8eaa-9f95-48f5-946d-1c7984e84a8b",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "a91327200a91327207cd77478567fec3cf8b84f6284b", "a91327201a91327207cd30720211e6ee9c333400d814", "a91327202a91327207cd0421834d4f021930a4665a0f", "2021-05-27T19:30:45.334388200Z" ]
+}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestDeleteImmutabilityPolicyError.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestDeleteImmutabilityPolicyError.json
new file mode 100644
index 000000000000..bae1619875c2
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestDeleteImmutabilityPolicyError.json
@@ -0,0 +1,73 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/019d317f0019d317f610559030c97ae3c06864cdd9ca?restype=container",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "4f82ab18-b1aa-475f-8803-cbdca0c00901"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D92145ECC07B68",
+ "Last-Modified" : "Thu, 27 May 2021 19:30:45 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "6fae702a-a01e-002d-6f2e-5369b1000000",
+ "x-ms-client-request-id" : "4f82ab18-b1aa-475f-8803-cbdca0c00901",
+ "Date" : "Thu, 27 May 2021 19:30:45 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/019d317f1019d317f61063016d580a9a5a85641e29b9/019d317f2019d317f61027136e56c9fb3df5444f8960",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "44ff3b0e-e434-4b58-afb4-d792bb4560f9",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-content-crc64" : "AAAAAAAAAAA=",
+ "Last-Modified" : "Thu, 27 May 2021 19:30:46 GMT",
+ "x-ms-version-id" : "2021-05-27T19:30:46.3440281Z",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Thu, 27 May 2021 19:30:46 GMT",
+ "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==",
+ "eTag" : "0x8D92145ED117599",
+ "x-ms-request-id" : "6fae70a1-a01e-002d-542e-5369b1000000",
+ "x-ms-client-request-id" : "44ff3b0e-e434-4b58-afb4-d792bb4560f9"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "DELETE",
+ "Uri" : "https://REDACTED.blob.core.windows.net/019d317f1019d317f61063016d580a9a5a85641e29b9/019d317f3019d317f61082993145c90efd94440dc838?comp=immutabilityPolicies",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "214788a5-049e-4c94-8f76-6880dc758ee4"
+ },
+ "Response" : {
+ "content-length" : "216",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-error-code" : "BlobNotFound",
+ "retry-after" : "0",
+ "StatusCode" : "404",
+ "x-ms-request-id" : "6fae70b0-a01e-002d-622e-5369b1000000",
+ "Body" : "\nBlobNotFoundThe specified blob does not exist.\nRequestId:6fae70b0-a01e-002d-622e-5369b1000000\nTime:2021-05-27T19:30:46.4107590Z",
+ "x-ms-client-request-id" : "214788a5-049e-4c94-8f76-6880dc758ee4",
+ "Date" : "Thu, 27 May 2021 19:30:46 GMT",
+ "Content-Type" : "application/xml"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "019d317f0019d317f610559030c97ae3c06864cdd9ca", "019d317f1019d317f61063016d580a9a5a85641e29b9", "019d317f2019d317f61027136e56c9fb3df5444f8960", "019d317f3019d317f61082993145c90efd94440dc838" ]
+}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestDeleteImmutabilityPolicyMin.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestDeleteImmutabilityPolicyMin.json
new file mode 100644
index 000000000000..984c4813b5ec
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestDeleteImmutabilityPolicyMin.json
@@ -0,0 +1,125 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/ff00eec20ff00eec27c31594172217a1edd3f425f841?restype=container",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "65ba2212-eda3-4753-b67f-b540afd59fd5"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D92145EA61D1F8",
+ "Last-Modified" : "Thu, 27 May 2021 19:30:41 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "6fae6cb2-a01e-002d-082e-5369b1000000",
+ "x-ms-client-request-id" : "65ba2212-eda3-4753-b67f-b540afd59fd5",
+ "Date" : "Thu, 27 May 2021 19:30:41 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/ff00eec21ff00eec27c302490adb0e220ce704e93bc1/ff00eec22ff00eec27c3036410d75f25eedcd4dbca52",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "de8b4a72-7826-4b41-a79f-ad60c415c867",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-content-crc64" : "AAAAAAAAAAA=",
+ "Last-Modified" : "Thu, 27 May 2021 19:30:42 GMT",
+ "x-ms-version-id" : "2021-05-27T19:30:42.4432559Z",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Thu, 27 May 2021 19:30:42 GMT",
+ "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==",
+ "eTag" : "0x8D92145EABE3FAF",
+ "x-ms-request-id" : "6fae6d44-a01e-002d-7f2e-5369b1000000",
+ "x-ms-client-request-id" : "de8b4a72-7826-4b41-a79f-ad60c415c867"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/ff00eec21ff00eec27c302490adb0e220ce704e93bc1/ff00eec22ff00eec27c3036410d75f25eedcd4dbca52?comp=immutabilityPolicies",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "bdf3c0e8-aea6-49ec-beee-2725a49b9fad"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-immutability-policy-mode" : "unlocked",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-immutability-policy-until-date" : "Thu, 27 May 2021 19:30:45 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-request-id" : "6fae6d60-a01e-002d-172e-5369b1000000",
+ "x-ms-client-request-id" : "bdf3c0e8-aea6-49ec-beee-2725a49b9fad",
+ "Date" : "Thu, 27 May 2021 19:30:42 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "DELETE",
+ "Uri" : "https://REDACTED.blob.core.windows.net/ff00eec21ff00eec27c302490adb0e220ce704e93bc1/ff00eec22ff00eec27c3036410d75f25eedcd4dbca52?comp=immutabilityPolicies",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "c15d53c1-718a-4bc2-87b0-f37840b8939d"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-request-id" : "6fae6d68-a01e-002d-1f2e-5369b1000000",
+ "x-ms-client-request-id" : "c15d53c1-718a-4bc2-87b0-f37840b8939d",
+ "Date" : "Thu, 27 May 2021 19:30:42 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "HEAD",
+ "Uri" : "https://REDACTED.blob.core.windows.net/ff00eec21ff00eec27c302490adb0e220ce704e93bc1/ff00eec22ff00eec27c3036410d75f25eedcd4dbca52",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "5e44acd0-a70c-4018-ac8c-d3c934bf75ed"
+ },
+ "Response" : {
+ "x-ms-is-current-version" : "true",
+ "content-length" : "0",
+ "x-ms-last-access-time" : "Thu, 27 May 2021 19:30:42 GMT",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-lease-status" : "unlocked",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-lease-state" : "available",
+ "Last-Modified" : "Thu, 27 May 2021 19:30:42 GMT",
+ "x-ms-version-id" : "2021-05-27T19:30:42.4432559Z",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "Date" : "Thu, 27 May 2021 19:30:42 GMT",
+ "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==",
+ "x-ms-blob-type" : "BlockBlob",
+ "Accept-Ranges" : "bytes",
+ "x-ms-server-encrypted" : "true",
+ "x-ms-access-tier-inferred" : "true",
+ "x-ms-access-tier" : "Hot",
+ "x-ms-creation-time" : "Thu, 27 May 2021 19:30:42 GMT",
+ "eTag" : "0x8D92145EABE3FAF",
+ "x-ms-request-id" : "6fae6d80-a01e-002d-2e2e-5369b1000000",
+ "x-ms-client-request-id" : "5e44acd0-a70c-4018-ac8c-d3c934bf75ed",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "ff00eec20ff00eec27c31594172217a1edd3f425f841", "ff00eec21ff00eec27c302490adb0e220ce704e93bc1", "ff00eec22ff00eec27c3036410d75f25eedcd4dbca52", "2021-05-27T19:30:43.365659Z" ]
+}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestPageBlobCreate.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestPageBlobCreate.json
new file mode 100644
index 000000000000..519ac639e70b
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestPageBlobCreate.json
@@ -0,0 +1,108 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/e79977f40e79977f423d6785597fedba291924093a19?restype=container",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "79449c3c-afa2-4904-85ba-72981c71350e"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D92145F96380CC",
+ "Last-Modified" : "Thu, 27 May 2021 19:31:07 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "6fae8143-a01e-002d-5e2e-5369b1000000",
+ "x-ms-client-request-id" : "79449c3c-afa2-4904-85ba-72981c71350e",
+ "Date" : "Thu, 27 May 2021 19:31:06 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/e79977f41e79977f423d86256c0e10cae126a4129a7c/e79977f42e79977f423d9924652e03092df4d4969b56",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "317fd6a0-b0d4-40bf-9511-39642b46b67c",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-content-crc64" : "AAAAAAAAAAA=",
+ "Last-Modified" : "Thu, 27 May 2021 19:31:29 GMT",
+ "x-ms-version-id" : "2021-05-27T19:31:29.4246329Z",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Thu, 27 May 2021 19:31:28 GMT",
+ "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==",
+ "eTag" : "0x8D9214606BF09B9",
+ "x-ms-request-id" : "72ac0cbc-501e-0090-592e-53e0ac000000",
+ "x-ms-client-request-id" : "317fd6a0-b0d4-40bf-9511-39642b46b67c"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/e79977f41e79977f423d86256c0e10cae126a4129a7c/e79977f43e79977f423d5483050fb3a9c06d547e19d1",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "dca4eff8-8cde-427d-a1f2-eed801fd1d60"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D9214606E16509",
+ "Last-Modified" : "Thu, 27 May 2021 19:31:29 GMT",
+ "x-ms-version-id" : "2021-05-27T19:31:29.6497929Z",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "72ac0d0c-501e-0090-1e2e-53e0ac000000",
+ "x-ms-request-server-encrypted" : "true",
+ "x-ms-client-request-id" : "dca4eff8-8cde-427d-a1f2-eed801fd1d60",
+ "Date" : "Thu, 27 May 2021 19:31:28 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "HEAD",
+ "Uri" : "https://REDACTED.blob.core.windows.net/e79977f41e79977f423d86256c0e10cae126a4129a7c/e79977f43e79977f423d5483050fb3a9c06d547e19d1",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "e8422a80-b2ad-428d-a945-169b5e0226a9"
+ },
+ "Response" : {
+ "x-ms-is-current-version" : "true",
+ "content-length" : "512",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-lease-status" : "unlocked",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-immutability-policy-until-date" : "Thu, 27 May 2021 19:31:32 GMT",
+ "x-ms-lease-state" : "available",
+ "x-ms-blob-sequence-number" : "0",
+ "Last-Modified" : "Thu, 27 May 2021 19:31:29 GMT",
+ "x-ms-version-id" : "2021-05-27T19:31:29.6497929Z",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-legal-hold" : "true",
+ "Date" : "Thu, 27 May 2021 19:31:29 GMT",
+ "x-ms-blob-type" : "PageBlob",
+ "Accept-Ranges" : "bytes",
+ "x-ms-server-encrypted" : "true",
+ "x-ms-immutability-policy-mode" : "unlocked",
+ "x-ms-creation-time" : "Thu, 27 May 2021 19:31:29 GMT",
+ "eTag" : "0x8D9214606E16509",
+ "x-ms-request-id" : "72ac0d29-501e-0090-3b2e-53e0ac000000",
+ "x-ms-client-request-id" : "e8422a80-b2ad-428d-a945-169b5e0226a9",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "e79977f40e79977f423d6785597fedba291924093a19", "e79977f41e79977f423d86256c0e10cae126a4129a7c", "e79977f42e79977f423d9924652e03092df4d4969b56", "e79977f43e79977f423d5483050fb3a9c06d547e19d1", "2021-05-27T19:31:30.367948100Z" ]
+}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyACFail.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyACFail.json
new file mode 100644
index 000000000000..24d0aedb711f
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyACFail.json
@@ -0,0 +1,73 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/6f9714f106f9714f1e2e9999704236d02bf43499183d?restype=container",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "e9fd5d16-5f2d-4a65-976c-275e26a1ea9c"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D92145E703648C",
+ "Last-Modified" : "Thu, 27 May 2021 19:30:36 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "6fae67af-a01e-002d-522e-5369b1000000",
+ "x-ms-client-request-id" : "e9fd5d16-5f2d-4a65-976c-275e26a1ea9c",
+ "Date" : "Thu, 27 May 2021 19:30:35 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/6f9714f116f9714f1e2e0906934f0e7cc2c6c41a2b61/6f9714f126f9714f1e2e723114916c5b2201b4df4a6f",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "41ae27b1-860b-41e5-8ecd-5297e3b64ee3",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-content-crc64" : "AAAAAAAAAAA=",
+ "Last-Modified" : "Thu, 27 May 2021 19:30:36 GMT",
+ "x-ms-version-id" : "2021-05-27T19:30:36.7472078Z",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Thu, 27 May 2021 19:30:36 GMT",
+ "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==",
+ "eTag" : "0x8D92145E758F2AF",
+ "x-ms-request-id" : "6fae6817-a01e-002d-2d2e-5369b1000000",
+ "x-ms-client-request-id" : "41ae27b1-860b-41e5-8ecd-5297e3b64ee3"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/6f9714f116f9714f1e2e0906934f0e7cc2c6c41a2b61/6f9714f126f9714f1e2e723114916c5b2201b4df4a6f?comp=immutabilityPolicies",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "e6a10127-1132-4def-8694-9ce96d7dab27"
+ },
+ "Response" : {
+ "content-length" : "253",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-error-code" : "ConditionNotMet",
+ "retry-after" : "0",
+ "StatusCode" : "412",
+ "x-ms-request-id" : "6fae6821-a01e-002d-372e-5369b1000000",
+ "Body" : "\nConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:6fae6821-a01e-002d-372e-5369b1000000\nTime:2021-05-27T19:30:36.8249644Z",
+ "x-ms-client-request-id" : "e6a10127-1132-4def-8694-9ce96d7dab27",
+ "Date" : "Thu, 27 May 2021 19:30:36 GMT",
+ "Content-Type" : "application/xml"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "6f9714f106f9714f1e2e9999704236d02bf43499183d", "6f9714f116f9714f1e2e0906934f0e7cc2c6c41a2b61", "6f9714f126f9714f1e2e723114916c5b2201b4df4a6f", "2021-05-27T19:30:37.668717700Z" ]
+}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyAC[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyAC[0].json
new file mode 100644
index 000000000000..742ec187a1c3
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyAC[0].json
@@ -0,0 +1,72 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/bee3c81f0bee3c81ff0476185073e89b6dea64827bd3?restype=container",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "999d1dc6-fe46-4928-b584-da364bf50768"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D92145DE955648",
+ "Last-Modified" : "Thu, 27 May 2021 19:30:22 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "6fae5b79-a01e-002d-372e-5369b1000000",
+ "x-ms-client-request-id" : "999d1dc6-fe46-4928-b584-da364bf50768",
+ "Date" : "Thu, 27 May 2021 19:30:21 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/bee3c81f1bee3c81ff0410058d394bf05f8024576b5a/bee3c81f2bee3c81ff04014883c8f6729bd2b425991b",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "dec599d6-9239-4389-a6b4-c34b6c57d000",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-content-crc64" : "AAAAAAAAAAA=",
+ "Last-Modified" : "Thu, 27 May 2021 19:30:22 GMT",
+ "x-ms-version-id" : "2021-05-27T19:30:22.6531915Z",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Thu, 27 May 2021 19:30:22 GMT",
+ "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==",
+ "eTag" : "0x8D92145DEF2864B",
+ "x-ms-request-id" : "6fae5c0b-a01e-002d-322e-5369b1000000",
+ "x-ms-client-request-id" : "dec599d6-9239-4389-a6b4-c34b6c57d000"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/bee3c81f1bee3c81ff0410058d394bf05f8024576b5a/bee3c81f2bee3c81ff04014883c8f6729bd2b425991b?comp=immutabilityPolicies",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "9d11a59e-aa68-498d-9033-70082d60d631"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-immutability-policy-mode" : "unlocked",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-immutability-policy-until-date" : "Thu, 27 May 2021 19:30:25 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-request-id" : "6fae5c2a-a01e-002d-4d2e-5369b1000000",
+ "x-ms-client-request-id" : "9d11a59e-aa68-498d-9033-70082d60d631",
+ "Date" : "Thu, 27 May 2021 19:30:22 GMT"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "bee3c81f0bee3c81ff0476185073e89b6dea64827bd3", "bee3c81f1bee3c81ff0410058d394bf05f8024576b5a", "bee3c81f2bee3c81ff04014883c8f6729bd2b425991b", "2021-05-27T19:30:23.613626900Z" ]
+}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyAC[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyAC[1].json
new file mode 100644
index 000000000000..526533ce86c1
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyAC[1].json
@@ -0,0 +1,72 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/a7f8f95e0a7f8f95efad973804e834057ad6a49a58b7?restype=container",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "928e8a2d-065a-4e58-8530-6f1a8a8df36d"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D92145E2BF9D61",
+ "Last-Modified" : "Thu, 27 May 2021 19:30:29 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "6fae60f6-a01e-002d-2a2e-5369b1000000",
+ "x-ms-client-request-id" : "928e8a2d-065a-4e58-8530-6f1a8a8df36d",
+ "Date" : "Thu, 27 May 2021 19:30:28 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/a7f8f95e1a7f8f95efad34142e396f162341742d3a6f/a7f8f95e2a7f8f95efad36451c059d6e8eb2a4740a3c",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "2966f37a-e9f1-457c-8612-b62fe42142fe",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-content-crc64" : "AAAAAAAAAAA=",
+ "Last-Modified" : "Thu, 27 May 2021 19:30:29 GMT",
+ "x-ms-version-id" : "2021-05-27T19:30:29.5961257Z",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Thu, 27 May 2021 19:30:29 GMT",
+ "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==",
+ "eTag" : "0x8D92145E315EEA9",
+ "x-ms-request-id" : "6fae6173-a01e-002d-132e-5369b1000000",
+ "x-ms-client-request-id" : "2966f37a-e9f1-457c-8612-b62fe42142fe"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/a7f8f95e1a7f8f95efad34142e396f162341742d3a6f/a7f8f95e2a7f8f95efad36451c059d6e8eb2a4740a3c?comp=immutabilityPolicies",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "3ec0b61d-e687-4f61-b93a-5607ddd4064b"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-immutability-policy-mode" : "unlocked",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-immutability-policy-until-date" : "Thu, 27 May 2021 19:30:32 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-request-id" : "6fae6184-a01e-002d-202e-5369b1000000",
+ "x-ms-client-request-id" : "3ec0b61d-e687-4f61-b93a-5607ddd4064b",
+ "Date" : "Thu, 27 May 2021 19:30:29 GMT"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "a7f8f95e0a7f8f95efad973804e834057ad6a49a58b7", "a7f8f95e1a7f8f95efad34142e396f162341742d3a6f", "a7f8f95e2a7f8f95efad36451c059d6e8eb2a4740a3c", "2021-05-27T19:30:30.518837300Z" ]
+}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyError.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyError.json
new file mode 100644
index 000000000000..c464ae2209b9
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyError.json
@@ -0,0 +1,73 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/a29af0b60a29af0b6342749099d4bec3197634b878b7?restype=container",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "f34a7aab-716b-44ae-8135-b09b7d4153aa"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D92145E840B203",
+ "Last-Modified" : "Thu, 27 May 2021 19:30:38 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "6fae6960-a01e-002d-3a2e-5369b1000000",
+ "x-ms-client-request-id" : "f34a7aab-716b-44ae-8135-b09b7d4153aa",
+ "Date" : "Thu, 27 May 2021 19:30:37 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/a29af0b61a29af0b634299937f377e27a4f294fd0b9c/a29af0b62a29af0b63426959523d1951d13cf47afb0e",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "8287997f-3ebd-4371-8c08-b46864a1a021",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-content-crc64" : "AAAAAAAAAAA=",
+ "Last-Modified" : "Thu, 27 May 2021 19:30:38 GMT",
+ "x-ms-version-id" : "2021-05-27T19:30:38.8637116Z",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Thu, 27 May 2021 19:30:38 GMT",
+ "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==",
+ "eTag" : "0x8D92145E89BE6A9",
+ "x-ms-request-id" : "6fae69eb-a01e-002d-342e-5369b1000000",
+ "x-ms-client-request-id" : "8287997f-3ebd-4371-8c08-b46864a1a021"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/a29af0b61a29af0b634299937f377e27a4f294fd0b9c/a29af0b63a29af0b634256958026593c9b7164dbfa11?comp=immutabilityPolicies",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "adcceb4b-0d34-4851-9086-e4ecde64dee7"
+ },
+ "Response" : {
+ "content-length" : "216",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-error-code" : "BlobNotFound",
+ "retry-after" : "0",
+ "StatusCode" : "404",
+ "x-ms-request-id" : "6fae6a07-a01e-002d-4b2e-5369b1000000",
+ "Body" : "\nBlobNotFoundThe specified blob does not exist.\nRequestId:6fae6a07-a01e-002d-4b2e-5369b1000000\nTime:2021-05-27T19:30:38.9424666Z",
+ "x-ms-client-request-id" : "adcceb4b-0d34-4851-9086-e4ecde64dee7",
+ "Date" : "Thu, 27 May 2021 19:30:38 GMT",
+ "Content-Type" : "application/xml"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "a29af0b60a29af0b6342749099d4bec3197634b878b7", "a29af0b61a29af0b634299937f377e27a4f294fd0b9c", "a29af0b62a29af0b63426959523d1951d13cf47afb0e", "a29af0b63a29af0b634256958026593c9b7164dbfa11", "2021-05-27T19:30:39.786663Z" ]
+}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyIA.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyIA.json
new file mode 100644
index 000000000000..7a4212fed072
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyIA.json
@@ -0,0 +1,51 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/1194909e01194909ea1801848275ac675a531443dbb8?restype=container",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "cbda0cdc-af4d-4407-8c38-2cace594aed8"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D92145E950574C",
+ "Last-Modified" : "Thu, 27 May 2021 19:30:40 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "6fae6b02-a01e-002d-272e-5369b1000000",
+ "x-ms-client-request-id" : "cbda0cdc-af4d-4407-8c38-2cace594aed8",
+ "Date" : "Thu, 27 May 2021 19:30:39 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/1194909e11194909ea1883281460da4c7491949879d6/1194909e21194909ea185473504fa080b36824d868ad",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "790cbe6f-26bb-4a7c-90d6-5df60cfad855",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-content-crc64" : "AAAAAAAAAAA=",
+ "Last-Modified" : "Thu, 27 May 2021 19:30:40 GMT",
+ "x-ms-version-id" : "2021-05-27T19:30:40.6599886Z",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Thu, 27 May 2021 19:30:40 GMT",
+ "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==",
+ "eTag" : "0x8D92145E9AE24CE",
+ "x-ms-request-id" : "6fae6bb5-a01e-002d-392e-5369b1000000",
+ "x-ms-client-request-id" : "790cbe6f-26bb-4a7c-90d6-5df60cfad855"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "1194909e01194909ea1801848275ac675a531443dbb8", "1194909e11194909ea1883281460da4c7491949879d6", "1194909e21194909ea185473504fa080b36824d868ad", "2021-05-27T19:30:41.579827500Z" ]
+}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyMin.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyMin.json
new file mode 100644
index 000000000000..a9b3277abe50
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyMin.json
@@ -0,0 +1,72 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/35fa8f77035fa8f77f044077222823529fb0140f78fe?restype=container",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "3768d026-b423-4436-b6c2-bc8bbbd90719"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D92145D4BE00CD",
+ "Last-Modified" : "Thu, 27 May 2021 19:30:05 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "6fae4a60-a01e-002d-1c2e-5369b1000000",
+ "x-ms-client-request-id" : "3768d026-b423-4436-b6c2-bc8bbbd90719",
+ "Date" : "Thu, 27 May 2021 19:30:05 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/35fa8f77135fa8f77f04064142f07614b9904485fac2/35fa8f77235fa8f77f0442672aea10378e9a34819835",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "bddb632e-0eb2-473a-addf-60e40e00b27e",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-content-crc64" : "AAAAAAAAAAA=",
+ "Last-Modified" : "Thu, 27 May 2021 19:30:07 GMT",
+ "x-ms-version-id" : "2021-05-27T19:30:07.9797693Z",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Thu, 27 May 2021 19:30:07 GMT",
+ "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==",
+ "eTag" : "0x8D92145D63389BD",
+ "x-ms-request-id" : "6fae4cd8-a01e-002d-292e-5369b1000000",
+ "x-ms-client-request-id" : "bddb632e-0eb2-473a-addf-60e40e00b27e"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/35fa8f77135fa8f77f04064142f07614b9904485fac2/35fa8f77235fa8f77f0442672aea10378e9a34819835?comp=immutabilityPolicies",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "db913330-eebb-43d3-955b-c537abda4cae"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-immutability-policy-mode" : "unlocked",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-immutability-policy-until-date" : "Thu, 27 May 2021 19:30:10 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-request-id" : "6fae4cfe-a01e-002d-472e-5369b1000000",
+ "x-ms-client-request-id" : "db913330-eebb-43d3-955b-c537abda4cae",
+ "Date" : "Thu, 27 May 2021 19:30:07 GMT"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "35fa8f77035fa8f77f044077222823529fb0140f78fe", "35fa8f77135fa8f77f04064142f07614b9904485fac2", "35fa8f77235fa8f77f0442672aea10378e9a34819835", "2021-05-27T19:30:08.925445400Z" ]
+}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicy[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicy[0].json
new file mode 100644
index 000000000000..adf9b01c0128
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicy[0].json
@@ -0,0 +1,129 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/f9f8d7be0f9f8d7be03c35094f9e47268a06d484bbc1?restype=container",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "785132cb-0f3b-4e63-a987-07a4c78c4460"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D92145DA564B2E",
+ "Last-Modified" : "Thu, 27 May 2021 19:30:14 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "6fae5479-a01e-002d-712e-5369b1000000",
+ "x-ms-client-request-id" : "785132cb-0f3b-4e63-a987-07a4c78c4460",
+ "Date" : "Thu, 27 May 2021 19:30:14 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/f9f8d7be1f9f8d7be03c75436721de7444a2d44e28ba/f9f8d7be2f9f8d7be03c9162320d9e24b68624109898",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "68d448d5-f1e6-45d9-8065-5392f4d707ef",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-content-crc64" : "AAAAAAAAAAA=",
+ "Last-Modified" : "Thu, 27 May 2021 19:30:15 GMT",
+ "x-ms-version-id" : "2021-05-27T19:30:15.4750957Z",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Thu, 27 May 2021 19:30:15 GMT",
+ "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==",
+ "eTag" : "0x8D92145DAAB3BED",
+ "x-ms-request-id" : "6fae5532-a01e-002d-062e-5369b1000000",
+ "x-ms-client-request-id" : "68d448d5-f1e6-45d9-8065-5392f4d707ef"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/f9f8d7be1f9f8d7be03c75436721de7444a2d44e28ba/f9f8d7be2f9f8d7be03c9162320d9e24b68624109898?comp=immutabilityPolicies",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "14983565-5eda-4e3f-9f6e-41fad056c1e1"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-immutability-policy-mode" : "unlocked",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-immutability-policy-until-date" : "Thu, 27 May 2021 19:30:18 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-request-id" : "6fae5544-a01e-002d-142e-5369b1000000",
+ "x-ms-client-request-id" : "14983565-5eda-4e3f-9f6e-41fad056c1e1",
+ "Date" : "Thu, 27 May 2021 19:30:15 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "HEAD",
+ "Uri" : "https://REDACTED.blob.core.windows.net/f9f8d7be1f9f8d7be03c75436721de7444a2d44e28ba/f9f8d7be2f9f8d7be03c9162320d9e24b68624109898",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "ca09735e-c5db-4664-bc78-f4ce623f83dc"
+ },
+ "Response" : {
+ "x-ms-is-current-version" : "true",
+ "content-length" : "0",
+ "x-ms-lease-status" : "unlocked",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-lease-state" : "available",
+ "Last-Modified" : "Thu, 27 May 2021 19:30:15 GMT",
+ "x-ms-version-id" : "2021-05-27T19:30:15.4750957Z",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-blob-type" : "BlockBlob",
+ "x-ms-immutability-policy-mode" : "unlocked",
+ "x-ms-access-tier-inferred" : "true",
+ "x-ms-access-tier" : "Hot",
+ "x-ms-creation-time" : "Thu, 27 May 2021 19:30:15 GMT",
+ "eTag" : "0x8D92145DAAB3BED",
+ "x-ms-request-id" : "6fae556f-a01e-002d-322e-5369b1000000",
+ "Content-Type" : "application/octet-stream",
+ "x-ms-last-access-time" : "Thu, 27 May 2021 19:30:15 GMT",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-immutability-policy-until-date" : "Thu, 27 May 2021 19:30:18 GMT",
+ "Date" : "Thu, 27 May 2021 19:30:15 GMT",
+ "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==",
+ "Accept-Ranges" : "bytes",
+ "x-ms-server-encrypted" : "true",
+ "x-ms-client-request-id" : "ca09735e-c5db-4664-bc78-f4ce623f83dc"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "GET",
+ "Uri" : "https://REDACTED.blob.core.windows.net/f9f8d7be1f9f8d7be03c75436721de7444a2d44e28ba?restype=container&comp=list&include=immutabilitypolicy%2Clegalhold",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "bad06dd6-7d1d-490c-bc84-9e2050bb3202"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-request-id" : "6fae5584-a01e-002d-452e-5369b1000000",
+ "Body" : "f9f8d7be2f9f8d7be03c9162320d9e24b686241098982021-05-27T19:30:15.4750957ZtrueThu, 27 May 2021 19:30:15 GMTThu, 27 May 2021 19:30:15 GMT0x8D92145DAAB3BED0application/octet-stream1B2M2Y8AsgTpgAmY7PhCfg==Thu, 27 May 2021 19:30:15 GMTBlockBlobHottrueunlockedavailabletrueThu, 27 May 2021 19:30:18 GMTunlocked",
+ "x-ms-client-request-id" : "bad06dd6-7d1d-490c-bc84-9e2050bb3202",
+ "Date" : "Thu, 27 May 2021 19:30:15 GMT",
+ "Content-Type" : "application/xml"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "f9f8d7be0f9f8d7be03c35094f9e47268a06d484bbc1", "f9f8d7be1f9f8d7be03c75436721de7444a2d44e28ba", "f9f8d7be2f9f8d7be03c9162320d9e24b68624109898", "2021-05-27T19:30:16.401924500Z" ]
+}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetLegalHoldError.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetLegalHoldError.json
new file mode 100644
index 000000000000..8cb53e99fb82
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetLegalHoldError.json
@@ -0,0 +1,73 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/1cad1a8201cad1a8226d2748443d1e3edf0574ef6ad9?restype=container",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "cdeebd59-c27f-4ca6-b9bd-b0a8845a809b"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D92145F292F321",
+ "Last-Modified" : "Thu, 27 May 2021 19:30:55 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "6fae7880-a01e-002d-272e-5369b1000000",
+ "x-ms-client-request-id" : "cdeebd59-c27f-4ca6-b9bd-b0a8845a809b",
+ "Date" : "Thu, 27 May 2021 19:30:55 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/1cad1a8211cad1a8226d34657002385c9d9044b90bc1/1cad1a8221cad1a8226d623027e8f1a55026d499fad6",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "0ed0f080-bb09-4a97-ab3b-229f0f671ec1",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-content-crc64" : "AAAAAAAAAAA=",
+ "Last-Modified" : "Thu, 27 May 2021 19:30:56 GMT",
+ "x-ms-version-id" : "2021-05-27T19:30:56.1499911Z",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Thu, 27 May 2021 19:30:55 GMT",
+ "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==",
+ "eTag" : "0x8D92145F2E9BB07",
+ "x-ms-request-id" : "6fae78e6-a01e-002d-012e-5369b1000000",
+ "x-ms-client-request-id" : "0ed0f080-bb09-4a97-ab3b-229f0f671ec1"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/1cad1a8211cad1a8226d34657002385c9d9044b90bc1/1cad1a8231cad1a8226d76925417631f1c7ae4db2876?comp=legalhold",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "1444b24c-2d64-40be-8036-cc64a89345dc"
+ },
+ "Response" : {
+ "content-length" : "216",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-error-code" : "BlobNotFound",
+ "retry-after" : "0",
+ "StatusCode" : "404",
+ "x-ms-request-id" : "6fae7900-a01e-002d-142e-5369b1000000",
+ "Body" : "\nBlobNotFoundThe specified blob does not exist.\nRequestId:6fae7900-a01e-002d-142e-5369b1000000\nTime:2021-05-27T19:30:56.2297226Z",
+ "x-ms-client-request-id" : "1444b24c-2d64-40be-8036-cc64a89345dc",
+ "Date" : "Thu, 27 May 2021 19:30:55 GMT",
+ "Content-Type" : "application/xml"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "1cad1a8201cad1a8226d2748443d1e3edf0574ef6ad9", "1cad1a8211cad1a8226d34657002385c9d9044b90bc1", "1cad1a8221cad1a8226d623027e8f1a55026d499fad6", "1cad1a8231cad1a8226d76925417631f1c7ae4db2876" ]
+}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetLegalHoldMin[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetLegalHoldMin[0].json
new file mode 100644
index 000000000000..eaa303ace91f
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetLegalHoldMin[0].json
@@ -0,0 +1,71 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/c4f321c00c4f321c0c8a8530446859f65530e46fab2e?restype=container",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "e305fc7b-16b8-4603-bf3d-9f1a932d85c2"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D92145EDBA9934",
+ "Last-Modified" : "Thu, 27 May 2021 19:30:47 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "6fae719e-a01e-002d-1d2e-5369b1000000",
+ "x-ms-client-request-id" : "e305fc7b-16b8-4603-bf3d-9f1a932d85c2",
+ "Date" : "Thu, 27 May 2021 19:30:47 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/c4f321c01c4f321c0c8a08080f64f872d2bca47d1a26/c4f321c02c4f321c0c8a32656154152657b384460beb",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "89ea3ee3-81d7-4386-b793-a3fac901cb45",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-content-crc64" : "AAAAAAAAAAA=",
+ "Last-Modified" : "Thu, 27 May 2021 19:30:48 GMT",
+ "x-ms-version-id" : "2021-05-27T19:30:48.0242222Z",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Thu, 27 May 2021 19:30:47 GMT",
+ "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==",
+ "eTag" : "0x8D92145EE11D62E",
+ "x-ms-request-id" : "6fae7207-a01e-002d-702e-5369b1000000",
+ "x-ms-client-request-id" : "89ea3ee3-81d7-4386-b793-a3fac901cb45"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/c4f321c01c4f321c0c8a08080f64f872d2bca47d1a26/c4f321c02c4f321c0c8a32656154152657b384460beb?comp=legalhold",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "338e547a-bc9d-4235-9f67-b7f6d8ea2e34"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-legal-hold" : "true",
+ "x-ms-request-id" : "6fae723a-a01e-002d-162e-5369b1000000",
+ "x-ms-client-request-id" : "338e547a-bc9d-4235-9f67-b7f6d8ea2e34",
+ "Date" : "Thu, 27 May 2021 19:30:48 GMT"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "c4f321c00c4f321c0c8a8530446859f65530e46fab2e", "c4f321c01c4f321c0c8a08080f64f872d2bca47d1a26", "c4f321c02c4f321c0c8a32656154152657b384460beb" ]
+}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetLegalHoldMin[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetLegalHoldMin[1].json
new file mode 100644
index 000000000000..dd130611a321
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetLegalHoldMin[1].json
@@ -0,0 +1,71 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/dde810810dde810814c564663cd263218ded24c53b70?restype=container",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "fffe5fef-634c-4303-abf0-01e85fd92a59"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D92145EF0900CB",
+ "Last-Modified" : "Thu, 27 May 2021 19:30:49 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "6fae735e-a01e-002d-032e-5369b1000000",
+ "x-ms-client-request-id" : "fffe5fef-634c-4303-abf0-01e85fd92a59",
+ "Date" : "Thu, 27 May 2021 19:30:49 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/dde810811dde810814c5748314d1a13006b394eeb8f2/dde810812dde810814c59645123276b064a5e4a0ab2c",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "0b1c1e1d-6caa-410d-8b44-e809e44a2e43",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-content-crc64" : "AAAAAAAAAAA=",
+ "Last-Modified" : "Thu, 27 May 2021 19:30:50 GMT",
+ "x-ms-version-id" : "2021-05-27T19:30:50.4499397Z",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Thu, 27 May 2021 19:30:50 GMT",
+ "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==",
+ "eTag" : "0x8D92145EF83D1B3",
+ "x-ms-request-id" : "6fae7417-a01e-002d-192e-5369b1000000",
+ "x-ms-client-request-id" : "0b1c1e1d-6caa-410d-8b44-e809e44a2e43"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/dde810811dde810814c5748314d1a13006b394eeb8f2/dde810812dde810814c59645123276b064a5e4a0ab2c?comp=legalhold",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "669920e5-9740-4209-b702-46e82dee24d5"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-legal-hold" : "false",
+ "x-ms-request-id" : "6fae742b-a01e-002d-2b2e-5369b1000000",
+ "x-ms-client-request-id" : "669920e5-9740-4209-b702-46e82dee24d5",
+ "Date" : "Thu, 27 May 2021 19:30:50 GMT"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "dde810810dde810814c564663cd263218ded24c53b70", "dde810811dde810814c5748314d1a13006b394eeb8f2", "dde810812dde810814c59645123276b064a5e4a0ab2c" ]
+}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetLegalHold[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetLegalHold[0].json
new file mode 100644
index 000000000000..6e87a4aba1d0
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetLegalHold[0].json
@@ -0,0 +1,127 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/0038749a00038749aa4e5464192f4d7266364456b990?restype=container",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "306dbf9e-102d-43c8-aa22-120a58ab1ab7"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D92145F0442B07",
+ "Last-Modified" : "Thu, 27 May 2021 19:30:51 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "6fae7530-a01e-002d-7d2e-5369b1000000",
+ "x-ms-client-request-id" : "306dbf9e-102d-43c8-aa22-120a58ab1ab7",
+ "Date" : "Thu, 27 May 2021 19:30:51 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/0038749a10038749aa4e208526673b23e0591437b9ee/0038749a20038749aa4e175695cd9337dc9d6435087a",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "94061b0f-de3a-4384-8d33-e923edb9cd71",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-content-crc64" : "AAAAAAAAAAA=",
+ "Last-Modified" : "Thu, 27 May 2021 19:30:52 GMT",
+ "x-ms-version-id" : "2021-05-27T19:30:52.2692331Z",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Thu, 27 May 2021 19:30:51 GMT",
+ "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==",
+ "eTag" : "0x8D92145F09992EB",
+ "x-ms-request-id" : "6fae75bd-a01e-002d-6d2e-5369b1000000",
+ "x-ms-client-request-id" : "94061b0f-de3a-4384-8d33-e923edb9cd71"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/0038749a10038749aa4e208526673b23e0591437b9ee/0038749a20038749aa4e175695cd9337dc9d6435087a?comp=legalhold",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "fd8d74a7-3c20-4aac-ad4a-b86d2d62cc12"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-legal-hold" : "true",
+ "x-ms-request-id" : "6fae75c8-a01e-002d-762e-5369b1000000",
+ "x-ms-client-request-id" : "fd8d74a7-3c20-4aac-ad4a-b86d2d62cc12",
+ "Date" : "Thu, 27 May 2021 19:30:52 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "HEAD",
+ "Uri" : "https://REDACTED.blob.core.windows.net/0038749a10038749aa4e208526673b23e0591437b9ee/0038749a20038749aa4e175695cd9337dc9d6435087a",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "3ff0f7ad-05e9-48dc-b67e-4cdaebcc95bf"
+ },
+ "Response" : {
+ "x-ms-is-current-version" : "true",
+ "content-length" : "0",
+ "x-ms-last-access-time" : "Thu, 27 May 2021 19:30:52 GMT",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-lease-status" : "unlocked",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-lease-state" : "available",
+ "Last-Modified" : "Thu, 27 May 2021 19:30:52 GMT",
+ "x-ms-version-id" : "2021-05-27T19:30:52.2692331Z",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-legal-hold" : "true",
+ "Date" : "Thu, 27 May 2021 19:30:52 GMT",
+ "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==",
+ "x-ms-blob-type" : "BlockBlob",
+ "Accept-Ranges" : "bytes",
+ "x-ms-server-encrypted" : "true",
+ "x-ms-access-tier-inferred" : "true",
+ "x-ms-access-tier" : "Hot",
+ "x-ms-creation-time" : "Thu, 27 May 2021 19:30:52 GMT",
+ "eTag" : "0x8D92145F09992EB",
+ "x-ms-request-id" : "6fae75d6-a01e-002d-012e-5369b1000000",
+ "x-ms-client-request-id" : "3ff0f7ad-05e9-48dc-b67e-4cdaebcc95bf",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "GET",
+ "Uri" : "https://REDACTED.blob.core.windows.net/0038749a10038749aa4e208526673b23e0591437b9ee?restype=container&comp=list&include=immutabilitypolicy%2Clegalhold",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "b52e0c58-162a-4a3a-89c0-dee3f501e74f"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-request-id" : "6fae75ed-a01e-002d-0f2e-5369b1000000",
+ "Body" : "0038749a20038749aa4e175695cd9337dc9d6435087a2021-05-27T19:30:52.2692331ZtrueThu, 27 May 2021 19:30:52 GMTThu, 27 May 2021 19:30:52 GMT0x8D92145F09992EB0application/octet-stream1B2M2Y8AsgTpgAmY7PhCfg==Thu, 27 May 2021 19:30:52 GMTBlockBlobHottrueunlockedavailabletruetrue",
+ "x-ms-client-request-id" : "b52e0c58-162a-4a3a-89c0-dee3f501e74f",
+ "Date" : "Thu, 27 May 2021 19:30:52 GMT",
+ "Content-Type" : "application/xml"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "0038749a00038749aa4e5464192f4d7266364456b990", "0038749a10038749aa4e208526673b23e0591437b9ee", "0038749a20038749aa4e175695cd9337dc9d6435087a" ]
+}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetLegalHold[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetLegalHold[1].json
new file mode 100644
index 000000000000..cf6bbb457349
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetLegalHold[1].json
@@ -0,0 +1,127 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/192345db0192345db76951814025818c3afb944e4802?restype=container",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "3041533d-d404-4a18-b368-ec0164cf5990"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D92145F170D3B5",
+ "Last-Modified" : "Thu, 27 May 2021 19:30:53 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "6fae76ee-a01e-002d-5d2e-5369b1000000",
+ "x-ms-client-request-id" : "3041533d-d404-4a18-b368-ec0164cf5990",
+ "Date" : "Thu, 27 May 2021 19:30:53 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/192345db1192345db769129816c5586fdf56a48c7909/192345db2192345db76907154af2a6809768b449f80c",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "b4e7418e-16ac-4de7-8ddd-2a31e2580fb7",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-content-crc64" : "AAAAAAAAAAA=",
+ "Last-Modified" : "Thu, 27 May 2021 19:30:54 GMT",
+ "x-ms-version-id" : "2021-05-27T19:30:54.2296259Z",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Thu, 27 May 2021 19:30:53 GMT",
+ "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==",
+ "eTag" : "0x8D92145F1C4B4C3",
+ "x-ms-request-id" : "6fae7760-a01e-002d-382e-5369b1000000",
+ "x-ms-client-request-id" : "b4e7418e-16ac-4de7-8ddd-2a31e2580fb7"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/192345db1192345db769129816c5586fdf56a48c7909/192345db2192345db76907154af2a6809768b449f80c?comp=legalhold",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "c7d5a4e3-ec19-4341-a643-cd6e64d6da72"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-legal-hold" : "false",
+ "x-ms-request-id" : "6fae7778-a01e-002d-4c2e-5369b1000000",
+ "x-ms-client-request-id" : "c7d5a4e3-ec19-4341-a643-cd6e64d6da72",
+ "Date" : "Thu, 27 May 2021 19:30:54 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "HEAD",
+ "Uri" : "https://REDACTED.blob.core.windows.net/192345db1192345db769129816c5586fdf56a48c7909/192345db2192345db76907154af2a6809768b449f80c",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "ebefa5c1-b93a-4d37-9f44-c230caf8042d"
+ },
+ "Response" : {
+ "x-ms-is-current-version" : "true",
+ "content-length" : "0",
+ "x-ms-last-access-time" : "Thu, 27 May 2021 19:30:54 GMT",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-lease-status" : "unlocked",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-lease-state" : "available",
+ "Last-Modified" : "Thu, 27 May 2021 19:30:54 GMT",
+ "x-ms-version-id" : "2021-05-27T19:30:54.2296259Z",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-legal-hold" : "false",
+ "Date" : "Thu, 27 May 2021 19:30:54 GMT",
+ "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==",
+ "x-ms-blob-type" : "BlockBlob",
+ "Accept-Ranges" : "bytes",
+ "x-ms-server-encrypted" : "true",
+ "x-ms-access-tier-inferred" : "true",
+ "x-ms-access-tier" : "Hot",
+ "x-ms-creation-time" : "Thu, 27 May 2021 19:30:54 GMT",
+ "eTag" : "0x8D92145F1C4B4C3",
+ "x-ms-request-id" : "6fae778c-a01e-002d-5f2e-5369b1000000",
+ "x-ms-client-request-id" : "ebefa5c1-b93a-4d37-9f44-c230caf8042d",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "GET",
+ "Uri" : "https://REDACTED.blob.core.windows.net/192345db1192345db769129816c5586fdf56a48c7909?restype=container&comp=list&include=immutabilitypolicy%2Clegalhold",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "f1c3f117-7fd9-4957-adf7-fe85c8bdb5ec"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-request-id" : "6fae779a-a01e-002d-6a2e-5369b1000000",
+ "Body" : "192345db2192345db76907154af2a6809768b449f80c2021-05-27T19:30:54.2296259ZtrueThu, 27 May 2021 19:30:54 GMTThu, 27 May 2021 19:30:54 GMT0x8D92145F1C4B4C30application/octet-stream1B2M2Y8AsgTpgAmY7PhCfg==Thu, 27 May 2021 19:30:54 GMTBlockBlobHottrueunlockedavailabletruefalse",
+ "x-ms-client-request-id" : "f1c3f117-7fd9-4957-adf7-fe85c8bdb5ec",
+ "Date" : "Thu, 27 May 2021 19:30:54 GMT",
+ "Content-Type" : "application/xml"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "192345db0192345db76951814025818c3afb944e4802", "192345db1192345db769129816c5586fdf56a48c7909", "192345db2192345db76907154af2a6809768b449f80c" ]
+}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSyncCopy.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSyncCopy.json
new file mode 100644
index 000000000000..093fddff421e
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSyncCopy.json
@@ -0,0 +1,162 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/d26dfd8c0d26dfd8c66c643965f9fa5d417fb493c876?restype=container",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "376d5c0b-053b-42e3-8872-7d157b517456"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D9214613929A8E",
+ "Last-Modified" : "Thu, 27 May 2021 19:31:50 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "72ac20e1-501e-0090-462e-53e0ac000000",
+ "x-ms-client-request-id" : "376d5c0b-053b-42e3-8872-7d157b517456",
+ "Date" : "Thu, 27 May 2021 19:31:50 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/d26dfd8c1d26dfd8c66c760042309e5a7dac44cbe962/d26dfd8c2d26dfd8c66c056963ddec71061124ac0a65",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "0af9e98e-f497-41f6-b2ae-bdf05d9071d7",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-content-crc64" : "AAAAAAAAAAA=",
+ "Last-Modified" : "Thu, 27 May 2021 19:31:51 GMT",
+ "x-ms-version-id" : "2021-05-27T19:31:51.5923811Z",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Thu, 27 May 2021 19:31:50 GMT",
+ "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==",
+ "eTag" : "0x8D9214613F59163",
+ "x-ms-request-id" : "72ac21b2-501e-0090-6d2e-53e0ac000000",
+ "x-ms-client-request-id" : "0af9e98e-f497-41f6-b2ae-bdf05d9071d7"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/d26dfd8c1d26dfd8c66c760042309e5a7dac44cbe962?restype=container&comp=acl",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "fb0bfee0-8fbe-4c2d-8cfa-490d5c3076de",
+ "Content-Type" : "application/xml"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D9214614015612",
+ "Last-Modified" : "Thu, 27 May 2021 19:31:51 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-request-id" : "72ac21c2-501e-0090-7a2e-53e0ac000000",
+ "x-ms-client-request-id" : "fb0bfee0-8fbe-4c2d-8cfa-490d5c3076de",
+ "Date" : "Thu, 27 May 2021 19:31:50 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/d26dfd8c1d26dfd8c66c760042309e5a7dac44cbe962/d26dfd8c3d26dfd8c66c5153743fb081fb0274d9199a",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "647fabee-69ee-4a41-8402-4df1d4a6d9dd"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-copy-id" : "11b3722b-93c1-4f73-a16e-15aab4bbc0ed",
+ "x-ms-content-crc64" : "AAAAAAAAAAA=",
+ "Last-Modified" : "Thu, 27 May 2021 19:31:51 GMT",
+ "x-ms-version-id" : "2021-05-27T19:31:52.5570663Z",
+ "retry-after" : "0",
+ "StatusCode" : "202",
+ "Date" : "Thu, 27 May 2021 19:31:51 GMT",
+ "eTag" : "0x8D92146141E7949",
+ "x-ms-copy-status" : "success",
+ "x-ms-request-id" : "72ac21d0-501e-0090-072e-53e0ac000000",
+ "x-ms-client-request-id" : "647fabee-69ee-4a41-8402-4df1d4a6d9dd"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "HEAD",
+ "Uri" : "https://REDACTED.blob.core.windows.net/d26dfd8c1d26dfd8c66c760042309e5a7dac44cbe962/d26dfd8c3d26dfd8c66c5153743fb081fb0274d9199a",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "7eb58e7c-5c9b-4774-8a50-32adb6de31e0"
+ },
+ "Response" : {
+ "x-ms-is-current-version" : "true",
+ "content-length" : "0",
+ "x-ms-lease-status" : "unlocked",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-lease-state" : "available",
+ "Last-Modified" : "Thu, 27 May 2021 19:31:51 GMT",
+ "x-ms-version-id" : "2021-05-27T19:31:52.5570663Z",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-blob-type" : "BlockBlob",
+ "x-ms-immutability-policy-mode" : "unlocked",
+ "x-ms-access-tier-inferred" : "true",
+ "x-ms-access-tier" : "Hot",
+ "x-ms-creation-time" : "Thu, 27 May 2021 19:31:51 GMT",
+ "eTag" : "0x8D92146141E7949",
+ "x-ms-request-id" : "72ac227a-501e-0090-122e-53e0ac000000",
+ "Content-Type" : "application/octet-stream",
+ "x-ms-last-access-time" : "Thu, 27 May 2021 19:31:51 GMT",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-copy-id" : "11b3722b-93c1-4f73-a16e-15aab4bbc0ed",
+ "x-ms-immutability-policy-until-date" : "Thu, 27 May 2021 19:31:54 GMT",
+ "x-ms-copy-source" : "https://seanmcccanary3.blob.core.windows.net/d26dfd8c1d26dfd8c66c760042309e5a7dac44cbe962/d26dfd8c2d26dfd8c66c056963ddec71061124ac0a65",
+ "x-ms-copy-progress" : "0/0",
+ "x-ms-legal-hold" : "true",
+ "Date" : "Thu, 27 May 2021 19:31:51 GMT",
+ "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==",
+ "Accept-Ranges" : "bytes",
+ "x-ms-copy-completion-time" : "Thu, 27 May 2021 19:31:51 GMT",
+ "x-ms-server-encrypted" : "true",
+ "x-ms-copy-status" : "success",
+ "x-ms-client-request-id" : "7eb58e7c-5c9b-4774-8a50-32adb6de31e0"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/d26dfd8c1d26dfd8c66c760042309e5a7dac44cbe962?restype=container&comp=acl",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "1fdb99bd-e71d-4e1d-b2f8-b2549626c48c",
+ "Content-Type" : "application/xml"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D9214614A358A0",
+ "Last-Modified" : "Thu, 27 May 2021 19:31:52 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-request-id" : "72ac228d-501e-0090-212e-53e0ac000000",
+ "x-ms-client-request-id" : "1fdb99bd-e71d-4e1d-b2f8-b2549626c48c",
+ "Date" : "Thu, 27 May 2021 19:31:52 GMT"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "d26dfd8c0d26dfd8c66c643965f9fa5d417fb493c876", "d26dfd8c1d26dfd8c66c760042309e5a7dac44cbe962", "d26dfd8c2d26dfd8c66c056963ddec71061124ac0a65", "d26dfd8c3d26dfd8c66c5153743fb081fb0274d9199a", "2021-05-27T19:31:52.581737600Z" ]
+}
\ 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 2cfdc9d3b232..31fbf55f2ecf 100644
--- a/sdk/storage/azure-storage-blob/swagger/README.md
+++ b/sdk/storage/azure-storage-blob/swagger/README.md
@@ -29,7 +29,7 @@ license-header: MICROSOFT_MIT_SMALL
context-client-method-parameter: true
optional-constant-as-enum: true
models-subpackage: implementation.models
-custom-types: BlobAccessPolicy,AccessTier,AccountKind,ArchiveStatus,BlobHttpHeaders,BlobContainerItem,BlobContainerItemProperties,BlobContainerEncryptionScope,BlobServiceProperties,BlobType,Block,BlockList,BlockListType,BlockLookupList,BlobPrefix,ClearRange,CopyStatusType,BlobCorsRule,CpkInfo,CustomerProvidedKeyInfo,DeleteSnapshotsOptionType,EncryptionAlgorithmType,FilterBlobsItem,GeoReplication,GeoReplicationStatusType,KeyInfo,LeaseDurationType,LeaseStateType,LeaseStatusType,ListBlobContainersIncludeType,ListBlobsIncludeItem,BlobAnalyticsLogging,BlobMetrics,PageList,PageRange,PathRenameMode,PublicAccessType,RehydratePriority,BlobRetentionPolicy,SequenceNumberActionType,BlobSignedIdentifier,SkuName,StaticWebsite,BlobErrorCode,BlobServiceStatistics,SyncCopyStatusType,UserDelegationKey,BlobQueryHeaders,GeoReplicationStatus
+custom-types: BlobAccessPolicy,AccessTier,AccountKind,ArchiveStatus,BlobHttpHeaders,BlobContainerItem,BlobContainerItemProperties,BlobContainerEncryptionScope,BlobServiceProperties,BlobType,Block,BlockList,BlockListType,BlockLookupList,BlobPrefix,ClearRange,CopyStatusType,BlobCorsRule,CpkInfo,CustomerProvidedKeyInfo,DeleteSnapshotsOptionType,EncryptionAlgorithmType,FilterBlobsItem,GeoReplication,GeoReplicationStatusType,KeyInfo,LeaseDurationType,LeaseStateType,LeaseStatusType,ListBlobContainersIncludeType,ListBlobsIncludeItem,BlobAnalyticsLogging,BlobMetrics,PageList,PageRange,PathRenameMode,PublicAccessType,RehydratePriority,BlobRetentionPolicy,SequenceNumberActionType,BlobSignedIdentifier,SkuName,StaticWebsite,BlobErrorCode,BlobServiceStatistics,SyncCopyStatusType,UserDelegationKey,BlobQueryHeaders,GeoReplicationStatus,BlobImmutabilityPolicyMode
custom-types-subpackage: models
customization-jar-path: target/azure-storage-blob-customization-1.0.0-beta.1.jar
customization-class: com.azure.storage.blob.customization.BlobStorageCustomization
@@ -727,6 +727,40 @@ directive:
}
```
+### /{containerName}/{blob}?comp=immutabilityPolicies
+``` yaml
+directive:
+- from: swagger-document
+ where: $["x-ms-paths"]["/{containerName}/{blob}?comp=immutabilityPolicies"]
+ transform: >
+ let putParam = $.put.parameters[0];
+ if (!putParam["$ref"].endsWith("ContainerName")) {
+ const path = putParam["$ref"].replace(/[#].*$/, "#/parameters/");
+ $.put.parameters.splice(0, 0, { "$ref": path + "ContainerName" });
+ $.put.parameters.splice(1, 0, { "$ref": path + "Blob" });
+ }
+ let deleteParam = $.delete.parameters[0];
+ if (!deleteParam["$ref"].endsWith("ContainerName")) {
+ const path = deleteParam["$ref"].replace(/[#].*$/, "#/parameters/");
+ $.delete.parameters.splice(0, 0, { "$ref": path + "ContainerName" });
+ $.delete.parameters.splice(1, 0, { "$ref": path + "Blob" });
+ }
+```
+
+### /{containerName}/{blob}?comp=legalhold
+``` yaml
+directive:
+- from: swagger-document
+ where: $["x-ms-paths"]["/{containerName}/{blob}?comp=legalhold"]
+ transform: >
+ let param = $.put.parameters[0];
+ if (!param["$ref"].endsWith("ContainerName")) {
+ const path = param["$ref"].replace(/[#].*$/, "#/parameters/");
+ $.put.parameters.splice(0, 0, { "$ref": path + "ContainerName" });
+ $.put.parameters.splice(1, 0, { "$ref": path + "Blob" });
+ }
+```
+
### BlobItemInternal
``` yaml
directive:
diff --git a/sdk/storage/azure-storage-blob/swagger/src/main/java/com/azure/storage/blob/customization/BlobStorageCustomization.java b/sdk/storage/azure-storage-blob/swagger/src/main/java/com/azure/storage/blob/customization/BlobStorageCustomization.java
index ee81f7e2e0ca..8774460e0732 100644
--- a/sdk/storage/azure-storage-blob/swagger/src/main/java/com/azure/storage/blob/customization/BlobStorageCustomization.java
+++ b/sdk/storage/azure-storage-blob/swagger/src/main/java/com/azure/storage/blob/customization/BlobStorageCustomization.java
@@ -35,6 +35,9 @@ public void customize(LibraryCustomization customization) {
modifyUnexpectedResponseExceptionType(blobsImpl.getMethod("undelete"));
modifyUnexpectedResponseExceptionType(blobsImpl.getMethod("setExpiry"));
modifyUnexpectedResponseExceptionType(blobsImpl.getMethod("setHttpHeaders"));
+ modifyUnexpectedResponseExceptionType(blobsImpl.getMethod("setImmutabilityPolicy"));
+ modifyUnexpectedResponseExceptionType(blobsImpl.getMethod("deleteImmutabilityPolicy"));
+ modifyUnexpectedResponseExceptionType(blobsImpl.getMethod("setLegalHold"));
modifyUnexpectedResponseExceptionType(blobsImpl.getMethod("setMetadata"));
modifyUnexpectedResponseExceptionType(blobsImpl.getMethod("acquireLease"));
modifyUnexpectedResponseExceptionType(blobsImpl.getMethod("releaseLease"));
@@ -132,6 +135,7 @@ public void customize(LibraryCustomization customization) {
ClassCustomization blobContainerItemProperties = models.getClass("BlobContainerItemProperties");
blobContainerItemProperties.getMethod("isEncryptionScopeOverridePrevented").setReturnType("boolean", "return Boolean.TRUE.equals(%s);", true);
+ blobContainerItemProperties.getMethod("setIsImmutableStorageWithVersioningEnabled").rename("setImmutableStorageWithVersioningEnabled");
// Block - Generator
ClassCustomization block = models.getClass("Block");
diff --git a/sdk/storage/azure-storage-common/CHANGELOG.md b/sdk/storage/azure-storage-common/CHANGELOG.md
index a6fb8cb85dfa..1a4ea76ec1f5 100644
--- a/sdk/storage/azure-storage-common/CHANGELOG.md
+++ b/sdk/storage/azure-storage-common/CHANGELOG.md
@@ -1,7 +1,7 @@
# Release History
## 12.12.0-beta.2 (Unreleased)
-
+- Added support for the set immutability policy permission for Account SAS.
## 12.12.0-beta.1 (2021-05-13)
- Fixed bug in Utility.convertStreamToByteBuffer where variable updates would happen incorrectly if we hit the end of stream.
diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasPermission.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasPermission.java
index 334006a3daed..31d8ac161774 100644
--- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasPermission.java
+++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasPermission.java
@@ -45,6 +45,8 @@ public final class AccountSasPermission {
private boolean filterTagsPermission;
+ private boolean immutabilityPolicyPermission;
+
/**
* Initializes an {@link AccountSasPermission} object with all fields set to false.
*/
@@ -59,8 +61,8 @@ public AccountSasPermission() {
*
* @return An {@link AccountSasPermission} object generated from the given {@link String}.
*
- * @throws IllegalArgumentException If {@code permissionString} contains a character other than r, w, d, x, l, a, c, u, p,
- * t or f.
+ * @throws IllegalArgumentException If {@code permString} contains a character other than r, w, d, x, l, a, c, u, p,
+ * t, f or i.
*/
public static AccountSasPermission parse(String permissionString) {
AccountSasPermission permissions = new AccountSasPermission();
@@ -101,6 +103,9 @@ public static AccountSasPermission parse(String permissionString) {
case 'f':
permissions.filterTagsPermission = true;
break;
+ case 'i':
+ permissions.immutabilityPolicyPermission = true;
+ break;
default:
throw new IllegalArgumentException(
String.format(Locale.ROOT, Constants.ENUM_COULD_NOT_BE_PARSED_INVALID_VALUE,
@@ -304,7 +309,6 @@ public AccountSasPermission setTagsPermission(boolean tagsPermission) {
return this;
}
-
/**
* @return the filter tags permission status.
*/
@@ -323,6 +327,24 @@ public AccountSasPermission setFilterTagsPermission(boolean filterTagsPermission
return this;
}
+ /**
+ * @return the set immutability policy permission status.
+ */
+ public boolean hasImmutabilityPolicyPermission() {
+ return immutabilityPolicyPermission;
+ }
+
+ /**
+ * Sets the set immutability policy permission status.
+ *
+ * @param immutabilityPolicyPermission Permission status to set
+ * @return the updated AccountSasPermission object.
+ */
+ public AccountSasPermission setImmutabilityPolicyPermission(boolean immutabilityPolicyPermission) {
+ this.immutabilityPolicyPermission = immutabilityPolicyPermission;
+ return this;
+ }
+
/**
* Converts the given permissions to a {@link String}. Using this method will guarantee the permissions are in an
* order accepted by the service.
@@ -379,6 +401,10 @@ public String toString() {
builder.append('f');
}
+ if (this.immutabilityPolicyPermission) {
+ builder.append('i');
+ }
+
return builder.toString();
}
}
diff --git a/sdk/storage/azure-storage-common/src/test/java/com/azure/storage/common/implementation/SasModelsTest.groovy b/sdk/storage/azure-storage-common/src/test/java/com/azure/storage/common/implementation/SasModelsTest.groovy
index a59d5ae74c12..520a86fdc331 100644
--- a/sdk/storage/azure-storage-common/src/test/java/com/azure/storage/common/implementation/SasModelsTest.groovy
+++ b/sdk/storage/azure-storage-common/src/test/java/com/azure/storage/common/implementation/SasModelsTest.groovy
@@ -92,24 +92,26 @@ class SasModelsTest extends Specification {
.setDeleteVersionPermission(deleteVersion)
.setTagsPermission(tags)
.setFilterTagsPermission(filterTags)
+ .setImmutabilityPolicyPermission(setImmutabilityPolicy)
expect:
perms.toString() == expectedString
where:
- read | write | delete | list | add | create | update | process | deleteVersion | tags | filterTags || expectedString
- true | false | false | false | false | false | false | false | false | false | false || "r"
- false | true | false | false | false | false | false | false | false | false | false || "w"
- false | false | true | false | false | false | false | false | false | false | false || "d"
- false | false | false | true | false | false | false | false | false | false | false || "l"
- false | false | false | false | true | false | false | false | false | false | false || "a"
- false | false | false | false | false | true | false | false | false | false | false || "c"
- false | false | false | false | false | false | true | false | false | false | false || "u"
- false | false | false | false | false | false | false | true | false | false | false || "p"
- false | false | false | false | false | false | false | false | true | false | false || "x"
- false | false | false | false | false | false | false | false | false | true | false || "t"
- false | false | false | false | false | false | false | false | false | false | true || "f"
- true | true | true | true | true | true | true | true | true | true | true || "rwdxlacuptf"
+ read | write | delete | list | add | create | update | process | deleteVersion | tags | filterTags | setImmutabilityPolicy || expectedString
+ true | false | false | false | false | false | false | false | false | false | false | false || "r"
+ false | true | false | false | false | false | false | false | false | false | false | false || "w"
+ false | false | true | false | false | false | false | false | false | false | false | false || "d"
+ false | false | false | true | false | false | false | false | false | false | false | false || "l"
+ false | false | false | false | true | false | false | false | false | false | false | false || "a"
+ false | false | false | false | false | true | false | false | false | false | false | false || "c"
+ false | false | false | false | false | false | true | false | false | false | false | false || "u"
+ false | false | false | false | false | false | false | true | false | false | false | false || "p"
+ false | false | false | false | false | false | false | false | true | false | false | false || "x"
+ false | false | false | false | false | false | false | false | false | true | false | false || "t"
+ false | false | false | false | false | false | false | false | false | false | true | false || "f"
+ false | false | false | false | false | false | false | false | false | false | false | true || "i"
+ true | true | true | true | true | true | true | true | true | true | true | true || "rwdxlacuptfi"
}
@Unroll
@@ -129,22 +131,24 @@ class SasModelsTest extends Specification {
perms.hasDeleteVersionPermission() == deleteVersion
perms.hasTagsPermission() == tags
perms.hasFilterTagsPermission() == filterTags
+ perms.hasImmutabilityPolicyPermission() == immutabilityPolicy
where:
- permString || read | write | delete | list | add | create | update | process | deleteVersion | tags | filterTags
- "r" || true | false | false | false | false | false | false | false | false | false | false
- "w" || false | true | false | false | false | false | false | false | false | false | false
- "d" || false | false | true | false | false | false | false | false | false | false | false
- "l" || false | false | false | true | false | false | false | false | false | false | false
- "a" || false | false | false | false | true | false | false | false | false | false | false
- "c" || false | false | false | false | false | true | false | false | false | false | false
- "u" || false | false | false | false | false | false | true | false | false | false | false
- "p" || false | false | false | false | false | false | false | true | false | false | false
- "x" || false | false | false | false | false | false | false | false | true | false | false
- "t" || false | false | false | false | false | false | false | false | false | true | false
- "f" || false | false | false | false | false | false | false | false | false | false | true
- "rwdxlacuptf" || true | true | true | true | true | true | true | true | true | true | true
- "lwfrutpcaxd" || true | true | true | true | true | true | true | true | true | true | true
+ permString || read | write | delete | list | add | create | update | process | deleteVersion | tags | filterTags | immutabilityPolicy
+ "r" || true | false | false | false | false | false | false | false | false | false | false | false
+ "w" || false | true | false | false | false | false | false | false | false | false | false | false
+ "d" || false | false | true | false | false | false | false | false | false | false | false | false
+ "l" || false | false | false | true | false | false | false | false | false | false | false | false
+ "a" || false | false | false | false | true | false | false | false | false | false | false | false
+ "c" || false | false | false | false | false | true | false | false | false | false | false | false
+ "u" || false | false | false | false | false | false | true | false | false | false | false | false
+ "p" || false | false | false | false | false | false | false | true | false | false | false | false
+ "x" || false | false | false | false | false | false | false | false | true | false | false | false
+ "t" || false | false | false | false | false | false | false | false | false | true | false | false
+ "f" || false | false | false | false | false | false | false | false | false | false | true | false
+ "i" || false | false | false | false | false | false | false | false | false | false | false | true
+ "rwdxlacuptfi" || true | true | true | true | true | true | true | true | true | true | true | true
+ "lwfriutpcaxd" || true | true | true | true | true | true | true | true | true | true | true | true
}
def "AccountSASPermissions parse IA"() {
From a13f37f74b1e5912d4d12fb6a25d9f523b9cf7ab Mon Sep 17 00:00:00 2001
From: James <41338290+jaschrep-msft@users.noreply.github.com>
Date: Thu, 17 Jun 2021 10:43:28 -0700
Subject: [PATCH 5/9] File listing v2 (#21720)
* swagger generation and hookup
regenerated files swagger for listing
hooked up generated and handwritten models
expanded client API to support new models
* testing and fixes
expanded test parameters for file listing.
swagger transform added.
* rerecorded file listing test
* more testing
also fixed a method name casing
* docstrings and samples
* checkstyle
* reverted primative boolean extended info arg
REST api accepts true or an absence of value. Alligning with .NET for
now on Boolean vs boolean.
* checkpoint
* pr feedback
* misused variable fix
* fixed test
* send nothing, not false: include-extended-info
other minor fixes
rerecorded tests
* import cleanup
* swagger regeneration and test fixes
* API comments
extendedInfo boolean => Boolean
renamed options class
* reidentified samples for options class name change
Co-authored-by: jschrepp-MSFT <41338290+jschrepp-MSFT@users.noreply.github.com>
---
.../file/share/ShareDirectoryAsyncClient.java | 71 +++-
.../file/share/ShareDirectoryClient.java | 31 +-
.../share/implementation/DirectoriesImpl.java | 14 +
.../file/share/implementation/FilesImpl.java | 5 +-
.../implementation/models/DirectoryItem.java | 104 +++++
.../share/implementation/models/FileItem.java | 78 ++++
.../implementation/models/FileProperty.java | 165 ++++++++
...istFilesAndDirectoriesSegmentResponse.java | 26 ++
.../models/ListFilesIncludeType.java | 53 +++
.../implementation/util/ModelHelper.java | 10 +
.../file/share/models/ShareFileItem.java | 53 +++
.../share/models/ShareFileItemProperties.java | 80 ++++
.../ShareListFilesAndDirectoriesOptions.java | 168 ++++++++
...ShareDirectoryAsyncJavaDocCodeSamples.java | 17 +
.../ShareDirectoryJavaDocCodeSamples.java | 15 +
.../file/share/DirectoryAPITests.groovy | 92 ++++-
...PITestsListFilesAndDirectoriesArgs[0].json | 344 +++++++---------
...PITestsListFilesAndDirectoriesArgs[1].json | 372 ++++++++----------
...PITestsListFilesAndDirectoriesArgs[2].json | 336 +++++++---------
...PITestsListFilesAndDirectoriesArgs[3].json | 278 +++++++++++++
...PITestsListFilesAndDirectoriesArgs[4].json | 278 +++++++++++++
...PITestsListFilesAndDirectoriesArgs[5].json | 278 +++++++++++++
...PITestsListFilesAndDirectoriesArgs[6].json | 278 +++++++++++++
...PITestsListFilesAndDirectoriesArgs[7].json | 278 +++++++++++++
...PITestsListFilesAndDirectoriesArgs[8].json | 278 +++++++++++++
...ilesAndDirectoriesExtendedInfoResults.json | 133 +++++++
.../swagger/README.md | 2 +-
.../azure-storage-file-share/swagger/pom.xml | 2 +-
.../ShareStorageCustomization.java | 3 +-
29 files changed, 3232 insertions(+), 610 deletions(-)
create mode 100644 sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/ListFilesIncludeType.java
create mode 100644 sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareFileItemProperties.java
create mode 100644 sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/options/ShareListFilesAndDirectoriesOptions.java
create mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsListFilesAndDirectoriesArgs[3].json
create mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsListFilesAndDirectoriesArgs[4].json
create mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsListFilesAndDirectoriesArgs[5].json
create mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsListFilesAndDirectoriesArgs[6].json
create mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsListFilesAndDirectoriesArgs[7].json
create mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsListFilesAndDirectoriesArgs[8].json
create mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsListFilesAndDirectoriesExtendedInfoResults.json
diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareDirectoryAsyncClient.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareDirectoryAsyncClient.java
index e543e913219d..872863374cb5 100644
--- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareDirectoryAsyncClient.java
+++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareDirectoryAsyncClient.java
@@ -26,9 +26,12 @@
import com.azure.storage.file.share.implementation.models.DirectoriesListFilesAndDirectoriesSegmentResponse;
import com.azure.storage.file.share.implementation.models.DirectoriesSetMetadataResponse;
import com.azure.storage.file.share.implementation.models.DirectoriesSetPropertiesResponse;
+import com.azure.storage.file.share.implementation.models.ListFilesIncludeType;
+import com.azure.storage.file.share.implementation.util.ModelHelper;
import com.azure.storage.file.share.implementation.util.ShareSasImplUtil;
import com.azure.storage.file.share.models.CloseHandlesInfo;
import com.azure.storage.file.share.models.HandleItem;
+import com.azure.storage.file.share.models.NtfsFileAttributes;
import com.azure.storage.file.share.models.ShareDirectoryInfo;
import com.azure.storage.file.share.models.ShareDirectoryProperties;
import com.azure.storage.file.share.models.ShareDirectorySetMetadataInfo;
@@ -37,6 +40,7 @@
import com.azure.storage.file.share.models.ShareFileItem;
import com.azure.storage.file.share.models.ShareRequestConditions;
import com.azure.storage.file.share.models.ShareStorageException;
+import com.azure.storage.file.share.options.ShareListFilesAndDirectoriesOptions;
import com.azure.storage.file.share.sas.ShareServiceSasSignatureValues;
import reactor.core.publisher.Mono;
@@ -46,6 +50,7 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
+import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
@@ -605,18 +610,66 @@ public PagedFlux listFilesAndDirectories() {
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedFlux listFilesAndDirectories(String prefix, Integer maxResultsPerPage) {
try {
- return listFilesAndDirectoriesWithOptionalTimeout(prefix, maxResultsPerPage, null, Context.NONE);
+ return listFilesAndDirectoriesWithOptionalTimeout(new ShareListFilesAndDirectoriesOptions()
+ .setPrefix(prefix).setMaxResultsPerPage(maxResultsPerPage), null, Context.NONE);
} catch (RuntimeException ex) {
return pagedFluxError(logger, ex);
}
}
- PagedFlux listFilesAndDirectoriesWithOptionalTimeout(String prefix, Integer maxResultsPerPage,
- Duration timeout, Context context) {
+ /**
+ * Lists all sub-directories and files in this directory with their prefix or snapshots.
+ *
+ * Code Samples
+ *
+ * List all sub-directories with "subdir" prefix and return 10 results in the account
+ *
+ * {@codesnippet com.azure.storage.file.share.ShareDirectoryAsyncClient.listFilesAndDirectories#ShareListFilesAndDirectoriesOptions}
+ *
+ * For more information, see the
+ * Azure
+ * Docs.
+ *
+ * @param options Optional parameters.
+ * the server will return up to 5,000 items.
+ * @return {@link ShareFileItem File info} in this directory with prefix and max number of return results.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listFilesAndDirectories(ShareListFilesAndDirectoriesOptions options) {
+ try {
+ return listFilesAndDirectoriesWithOptionalTimeout(options, null, Context.NONE);
+ } catch (RuntimeException ex) {
+ return pagedFluxError(logger, ex);
+ }
+ }
+
+ PagedFlux listFilesAndDirectoriesWithOptionalTimeout(
+ ShareListFilesAndDirectoriesOptions options, Duration timeout, Context context) {
+ final ShareListFilesAndDirectoriesOptions modifiedOptions = options == null
+ ? new ShareListFilesAndDirectoriesOptions() : options;
+
+ List includeTypes = new LinkedList<>();
+ if (modifiedOptions.includeAttributes()) {
+ includeTypes.add(ListFilesIncludeType.ATTRIBUTES);
+ }
+ if (modifiedOptions.includeETag()) {
+ includeTypes.add(ListFilesIncludeType.ETAG);
+ }
+ if (modifiedOptions.includeTimestamps()) {
+ includeTypes.add(ListFilesIncludeType.TIMESTAMPS);
+ }
+ if (modifiedOptions.includePermissionKey()) {
+ includeTypes.add(ListFilesIncludeType.PERMISSION_KEY);
+ }
+
+ // these options must be absent from request if empty or false
+ final List finalIncludeTypes = includeTypes.size() == 0 ? null : includeTypes;
+
BiFunction>> retriever =
(marker, pageSize) -> StorageImplUtils.applyOptionalTimeout(this.azureFileStorageClient.getDirectories()
- .listFilesAndDirectoriesSegmentWithResponseAsync(shareName, directoryPath, prefix, snapshot,
- marker, pageSize == null ? maxResultsPerPage : pageSize, null, context), timeout)
+ .listFilesAndDirectoriesSegmentWithResponseAsync(shareName, directoryPath, modifiedOptions.getPrefix(),
+ snapshot, marker, pageSize == null ? modifiedOptions.getMaxResultsPerPage() : pageSize, null,
+ finalIncludeTypes, modifiedOptions.includeExtendedInfo(), context), timeout)
.map(response -> new PagedResponseBase<>(response.getRequest(),
response.getStatusCode(),
response.getHeaders(),
@@ -1224,10 +1277,14 @@ private List convertResponseAndGetNumOfResults(
Set shareFileItems = new TreeSet<>(Comparator.comparing(ShareFileItem::getName));
if (response.getValue().getSegment() != null) {
response.getValue().getSegment().getDirectoryItems()
- .forEach(directoryItem -> shareFileItems.add(new ShareFileItem(directoryItem.getName(),
- true, null)));
+ .forEach(directoryItem -> shareFileItems.add(new ShareFileItem(directoryItem.getName(), true,
+ directoryItem.getFileId(), ModelHelper.transformFileProperty(directoryItem.getProperties()),
+ NtfsFileAttributes.toAttributes(directoryItem.getAttributes()), directoryItem.getPermissionKey(),
+ null)));
response.getValue().getSegment().getFileItems()
.forEach(fileItem -> shareFileItems.add(new ShareFileItem(fileItem.getName(), false,
+ fileItem.getFileId(), ModelHelper.transformFileProperty(fileItem.getProperties()),
+ NtfsFileAttributes.toAttributes(fileItem.getAttributes()), fileItem.getPermissionKey(),
fileItem.getProperties().getContentLength())));
}
diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareDirectoryClient.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareDirectoryClient.java
index 8c0d0fedeabc..9f03fc384284 100644
--- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareDirectoryClient.java
+++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareDirectoryClient.java
@@ -23,6 +23,7 @@
import com.azure.storage.file.share.models.ShareRequestConditions;
import com.azure.storage.file.share.models.ShareStorageException;
import com.azure.storage.file.share.models.ShareFileItem;
+import com.azure.storage.file.share.options.ShareListFilesAndDirectoriesOptions;
import com.azure.storage.file.share.sas.ShareServiceSasSignatureValues;
import reactor.core.publisher.Mono;
@@ -438,8 +439,36 @@ public PagedIterable listFilesAndDirectories() {
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listFilesAndDirectories(String prefix, Integer maxResultsPerPage,
Duration timeout, Context context) {
+ return listFilesAndDirectories(new ShareListFilesAndDirectoriesOptions().setPrefix(prefix)
+ .setMaxResultsPerPage(maxResultsPerPage), timeout, context);
+ }
+
+ /**
+ * Lists all sub-directories and files in this directory with their prefix or snapshots.
+ *
+ * Code Samples
+ *
+ * List all sub-directories and files in this directory with "subdir" prefix and return 10 results in the
+ * account
+ *
+ * {@codesnippet com.azure.storage.file.share.ShareDirectoryClient.listFilesAndDirectories#ShareListFilesAndDirectoriesOptions-duration-context}
+ *
+ * For more information, see the
+ * Azure
+ * Docs.
+ *
+ * @param options Optional parameters.
+ * @param timeout An optional timeout applied to the operation. If a response is not returned before the timeout
+ * concludes a {@link RuntimeException} will be thrown.
+ * @param context Additional context that is passed through the Http pipeline during the service call.
+ * @return {@link ShareFileItem File info} in this directory with prefix and max number of return results.
+ * @throws RuntimeException if the operation doesn't complete before the timeout concludes.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listFilesAndDirectories(ShareListFilesAndDirectoriesOptions options,
+ Duration timeout, Context context) {
return new PagedIterable<>(shareDirectoryAsyncClient
- .listFilesAndDirectoriesWithOptionalTimeout(prefix, maxResultsPerPage, timeout, context));
+ .listFilesAndDirectoriesWithOptionalTimeout(options, timeout, context));
}
/**
diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/DirectoriesImpl.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/DirectoriesImpl.java
index fb541c8e6e12..9b43c49fb7fe 100644
--- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/DirectoriesImpl.java
+++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/DirectoriesImpl.java
@@ -19,6 +19,8 @@
import com.azure.core.annotation.UnexpectedResponseExceptionType;
import com.azure.core.http.rest.RestProxy;
import com.azure.core.util.Context;
+import com.azure.core.util.serializer.CollectionFormat;
+import com.azure.core.util.serializer.JacksonAdapter;
import com.azure.storage.file.share.implementation.models.DirectoriesCreateResponse;
import com.azure.storage.file.share.implementation.models.DirectoriesDeleteResponse;
import com.azure.storage.file.share.implementation.models.DirectoriesForceCloseHandlesResponse;
@@ -27,7 +29,9 @@
import com.azure.storage.file.share.implementation.models.DirectoriesListHandlesResponse;
import com.azure.storage.file.share.implementation.models.DirectoriesSetMetadataResponse;
import com.azure.storage.file.share.implementation.models.DirectoriesSetPropertiesResponse;
+import com.azure.storage.file.share.implementation.models.ListFilesIncludeType;
import com.azure.storage.file.share.implementation.models.StorageErrorException;
+import java.util.List;
import java.util.Map;
import reactor.core.publisher.Mono;
@@ -152,6 +156,8 @@ Mono listFilesAndDirectoriesS
@QueryParam("maxresults") Integer maxresults,
@QueryParam("timeout") Integer timeout,
@HeaderParam("x-ms-version") String version,
+ @QueryParam("include") String include,
+ @HeaderParam("x-ms-file-extended-info") Boolean includeExtendedInfo,
@HeaderParam("Accept") String accept,
Context context);
@@ -417,6 +423,8 @@ public Mono setMetadataWithResponseAsync(
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
* href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting
* Timeouts for File Service Operations.</a>.
+ * @param include Include this parameter to specify one or more datasets to include in the response.
+ * @param includeExtendedInfo The includeExtendedInfo parameter.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws StorageErrorException thrown if the request is rejected by server.
@@ -432,10 +440,14 @@ public Mono listFilesAndDirec
String marker,
Integer maxresults,
Integer timeout,
+ List include,
+ Boolean includeExtendedInfo,
Context context) {
final String restype = "directory";
final String comp = "list";
final String accept = "application/xml";
+ String includeConverted =
+ JacksonAdapter.createDefaultSerializerAdapter().serializeList(include, CollectionFormat.CSV);
return service.listFilesAndDirectoriesSegment(
this.client.getUrl(),
restype,
@@ -448,6 +460,8 @@ public Mono listFilesAndDirec
maxresults,
timeout,
this.client.getVersion(),
+ includeConverted,
+ includeExtendedInfo,
accept,
context);
}
diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/FilesImpl.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/FilesImpl.java
index a6422c8682ba..ab2b3ac0cff5 100644
--- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/FilesImpl.java
+++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/FilesImpl.java
@@ -45,11 +45,10 @@
import com.azure.storage.file.share.models.PermissionCopyModeType;
import com.azure.storage.file.share.models.ShareFileHttpHeaders;
import com.azure.storage.file.share.models.SourceModifiedAccessConditions;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
import java.nio.ByteBuffer;
import java.util.Map;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
/** An instance of this class provides access to all the operations defined in Files. */
public final class FilesImpl {
diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/DirectoryItem.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/DirectoryItem.java
index 4b8ed214a414..19f7c08ba660 100644
--- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/DirectoryItem.java
+++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/DirectoryItem.java
@@ -18,6 +18,30 @@ public final class DirectoryItem {
@JsonProperty(value = "Name", required = true)
private String name;
+ /*
+ * The FileId property.
+ */
+ @JsonProperty(value = "FileId")
+ private String fileId;
+
+ /*
+ * File properties.
+ */
+ @JsonProperty(value = "Properties")
+ private FileProperty properties;
+
+ /*
+ * The Attributes property.
+ */
+ @JsonProperty(value = "Attributes")
+ private String attributes;
+
+ /*
+ * The PermissionKey property.
+ */
+ @JsonProperty(value = "PermissionKey")
+ private String permissionKey;
+
/**
* Get the name property: The Name property.
*
@@ -37,4 +61,84 @@ public DirectoryItem setName(String name) {
this.name = name;
return this;
}
+
+ /**
+ * Get the fileId property: The FileId property.
+ *
+ * @return the fileId value.
+ */
+ public String getFileId() {
+ return this.fileId;
+ }
+
+ /**
+ * Set the fileId property: The FileId property.
+ *
+ * @param fileId the fileId value to set.
+ * @return the DirectoryItem object itself.
+ */
+ public DirectoryItem setFileId(String fileId) {
+ this.fileId = fileId;
+ return this;
+ }
+
+ /**
+ * Get the properties property: File properties.
+ *
+ * @return the properties value.
+ */
+ public FileProperty getProperties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: File properties.
+ *
+ * @param properties the properties value to set.
+ * @return the DirectoryItem object itself.
+ */
+ public DirectoryItem setProperties(FileProperty properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the attributes property: The Attributes property.
+ *
+ * @return the attributes value.
+ */
+ public String getAttributes() {
+ return this.attributes;
+ }
+
+ /**
+ * Set the attributes property: The Attributes property.
+ *
+ * @param attributes the attributes value to set.
+ * @return the DirectoryItem object itself.
+ */
+ public DirectoryItem setAttributes(String attributes) {
+ this.attributes = attributes;
+ return this;
+ }
+
+ /**
+ * Get the permissionKey property: The PermissionKey property.
+ *
+ * @return the permissionKey value.
+ */
+ public String getPermissionKey() {
+ return this.permissionKey;
+ }
+
+ /**
+ * Set the permissionKey property: The PermissionKey property.
+ *
+ * @param permissionKey the permissionKey value to set.
+ * @return the DirectoryItem object itself.
+ */
+ public DirectoryItem setPermissionKey(String permissionKey) {
+ this.permissionKey = permissionKey;
+ return this;
+ }
}
diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/FileItem.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/FileItem.java
index 3c956faf0f38..b8609f87e028 100644
--- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/FileItem.java
+++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/FileItem.java
@@ -18,12 +18,30 @@ public final class FileItem {
@JsonProperty(value = "Name", required = true)
private String name;
+ /*
+ * The FileId property.
+ */
+ @JsonProperty(value = "FileId")
+ private String fileId;
+
/*
* File properties.
*/
@JsonProperty(value = "Properties", required = true)
private FileProperty properties;
+ /*
+ * The Attributes property.
+ */
+ @JsonProperty(value = "Attributes")
+ private String attributes;
+
+ /*
+ * The PermissionKey property.
+ */
+ @JsonProperty(value = "PermissionKey")
+ private String permissionKey;
+
/**
* Get the name property: The Name property.
*
@@ -44,6 +62,26 @@ public FileItem setName(String name) {
return this;
}
+ /**
+ * Get the fileId property: The FileId property.
+ *
+ * @return the fileId value.
+ */
+ public String getFileId() {
+ return this.fileId;
+ }
+
+ /**
+ * Set the fileId property: The FileId property.
+ *
+ * @param fileId the fileId value to set.
+ * @return the FileItem object itself.
+ */
+ public FileItem setFileId(String fileId) {
+ this.fileId = fileId;
+ return this;
+ }
+
/**
* Get the properties property: File properties.
*
@@ -63,4 +101,44 @@ public FileItem setProperties(FileProperty properties) {
this.properties = properties;
return this;
}
+
+ /**
+ * Get the attributes property: The Attributes property.
+ *
+ * @return the attributes value.
+ */
+ public String getAttributes() {
+ return this.attributes;
+ }
+
+ /**
+ * Set the attributes property: The Attributes property.
+ *
+ * @param attributes the attributes value to set.
+ * @return the FileItem object itself.
+ */
+ public FileItem setAttributes(String attributes) {
+ this.attributes = attributes;
+ return this;
+ }
+
+ /**
+ * Get the permissionKey property: The PermissionKey property.
+ *
+ * @return the permissionKey value.
+ */
+ public String getPermissionKey() {
+ return this.permissionKey;
+ }
+
+ /**
+ * Set the permissionKey property: The PermissionKey property.
+ *
+ * @param permissionKey the permissionKey value to set.
+ * @return the FileItem object itself.
+ */
+ public FileItem setPermissionKey(String permissionKey) {
+ this.permissionKey = permissionKey;
+ return this;
+ }
}
diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/FileProperty.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/FileProperty.java
index 80c87e512508..e0b1c58d02f5 100644
--- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/FileProperty.java
+++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/FileProperty.java
@@ -5,8 +5,10 @@
package com.azure.storage.file.share.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;
/** File properties. */
@JacksonXmlRootElement(localName = "FileProperty")
@@ -22,6 +24,42 @@ public final class FileProperty {
@JsonProperty(value = "Content-Length", required = true)
private long contentLength;
+ /*
+ * The CreationTime property.
+ */
+ @JsonProperty(value = "CreationTime")
+ private OffsetDateTime creationTime;
+
+ /*
+ * The LastAccessTime property.
+ */
+ @JsonProperty(value = "LastAccessTime")
+ private OffsetDateTime lastAccessTime;
+
+ /*
+ * The LastWriteTime property.
+ */
+ @JsonProperty(value = "LastWriteTime")
+ private OffsetDateTime lastWriteTime;
+
+ /*
+ * The ChangeTime property.
+ */
+ @JsonProperty(value = "ChangeTime")
+ private OffsetDateTime changeTime;
+
+ /*
+ * The Last-Modified property.
+ */
+ @JsonProperty(value = "Last-Modified")
+ private DateTimeRfc1123 lastModified;
+
+ /*
+ * The Etag property.
+ */
+ @JsonProperty(value = "Etag")
+ private String etag;
+
/**
* Get the contentLength property: Content length of the file. This value may not be up-to-date since an SMB client
* may have modified the file locally. The value of Content-Length may not reflect that fact until the handle is
@@ -45,4 +83,131 @@ public FileProperty setContentLength(long contentLength) {
this.contentLength = contentLength;
return this;
}
+
+ /**
+ * Get the creationTime property: The CreationTime property.
+ *
+ * @return the creationTime value.
+ */
+ public OffsetDateTime getCreationTime() {
+ return this.creationTime;
+ }
+
+ /**
+ * Set the creationTime property: The CreationTime property.
+ *
+ * @param creationTime the creationTime value to set.
+ * @return the FileProperty object itself.
+ */
+ public FileProperty setCreationTime(OffsetDateTime creationTime) {
+ this.creationTime = creationTime;
+ return this;
+ }
+
+ /**
+ * Get the lastAccessTime property: The LastAccessTime property.
+ *
+ * @return the lastAccessTime value.
+ */
+ public OffsetDateTime getLastAccessTime() {
+ return this.lastAccessTime;
+ }
+
+ /**
+ * Set the lastAccessTime property: The LastAccessTime property.
+ *
+ * @param lastAccessTime the lastAccessTime value to set.
+ * @return the FileProperty object itself.
+ */
+ public FileProperty setLastAccessTime(OffsetDateTime lastAccessTime) {
+ this.lastAccessTime = lastAccessTime;
+ return this;
+ }
+
+ /**
+ * Get the lastWriteTime property: The LastWriteTime property.
+ *
+ * @return the lastWriteTime value.
+ */
+ public OffsetDateTime getLastWriteTime() {
+ return this.lastWriteTime;
+ }
+
+ /**
+ * Set the lastWriteTime property: The LastWriteTime property.
+ *
+ * @param lastWriteTime the lastWriteTime value to set.
+ * @return the FileProperty object itself.
+ */
+ public FileProperty setLastWriteTime(OffsetDateTime lastWriteTime) {
+ this.lastWriteTime = lastWriteTime;
+ return this;
+ }
+
+ /**
+ * Get the changeTime property: The ChangeTime property.
+ *
+ * @return the changeTime value.
+ */
+ public OffsetDateTime getChangeTime() {
+ return this.changeTime;
+ }
+
+ /**
+ * Set the changeTime property: The ChangeTime property.
+ *
+ * @param changeTime the changeTime value to set.
+ * @return the FileProperty object itself.
+ */
+ public FileProperty setChangeTime(OffsetDateTime changeTime) {
+ this.changeTime = changeTime;
+ 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 FileProperty object itself.
+ */
+ public FileProperty setLastModified(OffsetDateTime lastModified) {
+ if (lastModified == null) {
+ this.lastModified = null;
+ } else {
+ this.lastModified = new DateTimeRfc1123(lastModified);
+ }
+ 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 FileProperty object itself.
+ */
+ public FileProperty setEtag(String etag) {
+ this.etag = etag;
+ return this;
+ }
}
diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/ListFilesAndDirectoriesSegmentResponse.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/ListFilesAndDirectoriesSegmentResponse.java
index e343fc016ba6..57038fe0f41f 100644
--- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/ListFilesAndDirectoriesSegmentResponse.java
+++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/ListFilesAndDirectoriesSegmentResponse.java
@@ -67,6 +67,12 @@ public final class ListFilesAndDirectoriesSegmentResponse {
@JsonProperty(value = "NextMarker", required = true)
private String nextMarker;
+ /*
+ * The DirectoryId property.
+ */
+ @JsonProperty(value = "DirectoryId")
+ private String directoryId;
+
/**
* Get the serviceEndpoint property: The ServiceEndpoint property.
*
@@ -246,4 +252,24 @@ public ListFilesAndDirectoriesSegmentResponse setNextMarker(String nextMarker) {
this.nextMarker = nextMarker;
return this;
}
+
+ /**
+ * Get the directoryId property: The DirectoryId property.
+ *
+ * @return the directoryId value.
+ */
+ public String getDirectoryId() {
+ return this.directoryId;
+ }
+
+ /**
+ * Set the directoryId property: The DirectoryId property.
+ *
+ * @param directoryId the directoryId value to set.
+ * @return the ListFilesAndDirectoriesSegmentResponse object itself.
+ */
+ public ListFilesAndDirectoriesSegmentResponse setDirectoryId(String directoryId) {
+ this.directoryId = directoryId;
+ return this;
+ }
}
diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/ListFilesIncludeType.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/ListFilesIncludeType.java
new file mode 100644
index 000000000000..50bfdb1440fa
--- /dev/null
+++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/ListFilesIncludeType.java
@@ -0,0 +1,53 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.storage.file.share.implementation.models;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/** Defines values for ListFilesIncludeType. */
+public enum ListFilesIncludeType {
+ /** Enum value Timestamps. */
+ TIMESTAMPS("Timestamps"),
+
+ /** Enum value Etag. */
+ ETAG("Etag"),
+
+ /** Enum value Attributes. */
+ ATTRIBUTES("Attributes"),
+
+ /** Enum value PermissionKey. */
+ PERMISSION_KEY("PermissionKey");
+
+ /** The actual serialized value for a ListFilesIncludeType instance. */
+ private final String value;
+
+ ListFilesIncludeType(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a ListFilesIncludeType instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed ListFilesIncludeType object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static ListFilesIncludeType fromString(String value) {
+ ListFilesIncludeType[] items = ListFilesIncludeType.values();
+ for (ListFilesIncludeType 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-file-share/src/main/java/com/azure/storage/file/share/implementation/util/ModelHelper.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/util/ModelHelper.java
index 5d53544ca68f..89eaac8aaea2 100644
--- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/util/ModelHelper.java
+++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/util/ModelHelper.java
@@ -11,10 +11,12 @@
import com.azure.storage.common.implementation.Constants;
import com.azure.storage.common.implementation.StorageImplUtils;
import com.azure.storage.file.share.implementation.models.DeleteSnapshotsOptionType;
+import com.azure.storage.file.share.implementation.models.FileProperty;
import com.azure.storage.file.share.implementation.models.ServicesListSharesSegmentHeaders;
import com.azure.storage.file.share.implementation.models.ShareItemInternal;
import com.azure.storage.file.share.implementation.models.SharePropertiesInternal;
import com.azure.storage.file.share.models.ShareFileDownloadHeaders;
+import com.azure.storage.file.share.models.ShareFileItemProperties;
import com.azure.storage.file.share.models.ShareItem;
import com.azure.storage.file.share.models.ShareProperties;
import com.azure.storage.file.share.models.ShareProtocols;
@@ -188,4 +190,12 @@ public static ShareFileDownloadHeaders transformFileDownloadHeaders(HttpHeaders
throw LOGGER.logExceptionAsError(new RuntimeException(e));
}
}
+
+ public static ShareFileItemProperties transformFileProperty(FileProperty property) {
+ if (property == null) {
+ return null;
+ }
+ return new ShareFileItemProperties(property.getCreationTime(), property.getLastAccessTime(),
+ property.getLastWriteTime(), property.getChangeTime(), property.getLastModified(), property.getEtag());
+ }
}
diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareFileItem.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareFileItem.java
index 813a339eb0be..13ff60e76667 100644
--- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareFileItem.java
+++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareFileItem.java
@@ -5,6 +5,8 @@
import com.azure.core.annotation.Immutable;
+import java.util.EnumSet;
+
/**
* Contains file or directory reference information in the storage File service.
*/
@@ -12,6 +14,10 @@
public final class ShareFileItem {
private final String name;
private final boolean isDirectory;
+ private final String id;
+ private final ShareFileItemProperties properties;
+ private final EnumSet fileAttributes;
+ private final String permissionKey;
private final Long fileSize;
/**
@@ -22,8 +28,28 @@ public final class ShareFileItem {
* @param fileSize Size of a file. Pass {@code null} if the reference is a directory.
*/
public ShareFileItem(final String name, final boolean isDirectory, final Long fileSize) {
+ this(name, isDirectory, null, null, null, null, fileSize);
+ }
+
+ /**
+ * Creates an instance of file or directory reference information about a specific Share.
+ *
+ * @param name Name of the file or the directory.
+ * @param isDirectory A boolean set to true if the reference is a directory, false if the reference is a file.
+ * @param id ID of the file or directory.
+ * @param properties Properties of the file or directory.
+ * @param fileAttributes NTFS attributes of the file or directory.
+ * @param permissionKey Permission key of the file or directory.
+ * @param fileSize Size of a file. Pass {@code null} if the reference is a directory.
+ */
+ public ShareFileItem(final String name, final boolean isDirectory, String id, ShareFileItemProperties properties,
+ EnumSet fileAttributes, String permissionKey, final Long fileSize) {
this.name = name;
this.isDirectory = isDirectory;
+ this.id = id;
+ this.properties = properties;
+ this.fileAttributes = fileAttributes;
+ this.permissionKey = permissionKey;
this.fileSize = fileSize;
}
@@ -48,4 +74,31 @@ public Long getFileSize() {
return fileSize;
}
+ /**
+ * @return ID of the file or directory.
+ */
+ public String getId() {
+ return id;
+ }
+
+ /**
+ * @return Properties of the file or directory.
+ */
+ public ShareFileItemProperties getProperties() {
+ return properties;
+ }
+
+ /**
+ * @return NTFS attributes of the file or directory.
+ */
+ public EnumSet getFileAttributes() {
+ return fileAttributes;
+ }
+
+ /**
+ * @return Permission key of the file or directory.
+ */
+ public String getPermissionKey() {
+ return permissionKey;
+ }
}
diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareFileItemProperties.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareFileItemProperties.java
new file mode 100644
index 000000000000..69b9c5dd08e0
--- /dev/null
+++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareFileItemProperties.java
@@ -0,0 +1,80 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.storage.file.share.models;
+
+import java.time.OffsetDateTime;
+
+/**
+ * Share item properties for items on a listing operation.
+ */
+public class ShareFileItemProperties {
+ private final OffsetDateTime createdOn;
+ private final OffsetDateTime lastAccessedOn;
+ private final OffsetDateTime lastWrittenOn;
+ private final OffsetDateTime changedOn;
+ private final OffsetDateTime lastModified;
+ private final String eTag;
+
+ /**
+ * Creates an instance of share item properties.
+ *
+ * @param createdOn Datetime the item was created.
+ * @param lastAccessedOn Datetime the item was last accessed.
+ * @param lastWrittenOn Datetime the item was last written.
+ * @param changedOn Datetime the item was last changed.
+ * @param lastModified Datetime the item was last modified.
+ * @param eTag ETag of the item.
+ */
+ public ShareFileItemProperties(OffsetDateTime createdOn, OffsetDateTime lastAccessedOn,
+ OffsetDateTime lastWrittenOn, OffsetDateTime changedOn, OffsetDateTime lastModified, String eTag) {
+ this.createdOn = createdOn;
+ this.lastAccessedOn = lastAccessedOn;
+ this.lastWrittenOn = lastWrittenOn;
+ this.changedOn = changedOn;
+ this.lastModified = lastModified;
+ this.eTag = eTag;
+ }
+
+ /**
+ * @return Datetime this item was created.
+ */
+ public OffsetDateTime getCreatedOn() {
+ return createdOn;
+ }
+
+ /**
+ * @return Datetime this item was last accessed.
+ */
+ public OffsetDateTime getLastAccessedOn() {
+ return lastAccessedOn;
+ }
+
+ /**
+ * @return Datetime this item was last written.
+ */
+ public OffsetDateTime getLastWrittenOn() {
+ return lastWrittenOn;
+ }
+
+ /**
+ * @return Datetime this item was last changed.
+ */
+ public OffsetDateTime getChangedOn() {
+ return changedOn;
+ }
+
+ /**
+ * @return Datetime this item was last modified.
+ */
+ public OffsetDateTime getLastModified() {
+ return lastModified;
+ }
+
+ /**
+ * @return ETag of this item.
+ */
+ public String getETag() {
+ return eTag;
+ }
+}
diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/options/ShareListFilesAndDirectoriesOptions.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/options/ShareListFilesAndDirectoriesOptions.java
new file mode 100644
index 000000000000..a274505e5282
--- /dev/null
+++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/options/ShareListFilesAndDirectoriesOptions.java
@@ -0,0 +1,168 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.storage.file.share.options;
+
+import com.azure.core.util.logging.ClientLogger;
+
+/**
+ * Extended options for a directory listing operation.
+ */
+public class ShareListFilesAndDirectoriesOptions {
+ private final ClientLogger logger = new ClientLogger(ShareListFilesAndDirectoriesOptions.class);
+
+ private String prefix;
+ private Integer maxResultsPerPage;
+ private boolean includeTimestamps;
+ private boolean includeETag;
+ private boolean includeAttributes;
+ private boolean includePermissionKey;
+ private Boolean includeExtendedInfo;
+
+ /**
+ * @return prefix for this listing operation.
+ */
+ public String getPrefix() {
+ return prefix;
+ }
+
+ /**
+ * Sets the prefix for a listing operation.
+ *
+ * @param prefix the prefix.
+ * @return updated options.
+ */
+ public ShareListFilesAndDirectoriesOptions setPrefix(String prefix) {
+ this.prefix = prefix;
+ return this;
+ }
+
+ /**
+ * @return max results per page for this listing operation.
+ */
+ public Integer getMaxResultsPerPage() {
+ return maxResultsPerPage;
+ }
+
+ /**
+ * Sets the max results per page for a listing operation.
+ *
+ * @param maxResultsPerPage the max results per page.
+ * @return updated options.
+ */
+ public ShareListFilesAndDirectoriesOptions setMaxResultsPerPage(Integer maxResultsPerPage) {
+ this.maxResultsPerPage = maxResultsPerPage;
+ return this;
+ }
+
+ /**
+ * Note that setting timestamps, etag, attributes, or permission key will also set this option as true. Attempting
+ * to set it back to false while any of these options are true will be unsuccessful.
+ *
+ * Including extended info in a listing operation can result in a more expensive operation, but will present
+ * more accurate information on the listing item.
+ *
+ * @return whether to include extended info on this listing operation.
+ */
+ public Boolean includeExtendedInfo() {
+ return includeExtendedInfo;
+ }
+
+ /**
+ * Note that setting timestamps, etag, attributes, or permission key will also set this option as true. Attempting
+ * to set it back to false will be unsuccessful.
+ *
+ * Sets the prefix for a listing operation.
+ *
+ * Including extended info in a listing operation can result in a more expensive operation, but will present
+ * more accurate information on the listing item.
+ *
+ * @param includeExtendedInfo whether to include extended info.
+ * @return updated options.
+ * @throws IllegalStateException Throws when attempting to set null when other parameters require it to be true.
+ */
+ public ShareListFilesAndDirectoriesOptions setIncludeExtendedInfo(Boolean includeExtendedInfo) {
+ if (includeTimestamps || includeETag || includeAttributes || includePermissionKey) {
+ throw logger.logExceptionAsError(
+ new IllegalStateException("includeExtendedInfo must be true in the current state."));
+ }
+ this.includeExtendedInfo = includeExtendedInfo;
+ return this;
+ }
+
+ /**
+ * @return whether to include timestamps on this listing operation.
+ */
+ public boolean includeTimestamps() {
+ return includeTimestamps;
+ }
+
+ /**
+ * @param includeTimestamps whether to include timestamps on this listing operation.
+ * @return updated options
+ */
+ public ShareListFilesAndDirectoriesOptions setIncludeTimestamps(boolean includeTimestamps) {
+ this.includeTimestamps = includeTimestamps;
+ if (includeTimestamps) {
+ this.includeExtendedInfo = true;
+ }
+ return this;
+ }
+
+ /**
+ * @return whether to include the etag on this listing operation.
+ */
+ public boolean includeETag() {
+ return includeETag;
+ }
+
+ /**
+ * @param includeETag whether to include the etag on this listing operation.
+ * @return updated options
+ */
+ public ShareListFilesAndDirectoriesOptions setIncludeETag(boolean includeETag) {
+ this.includeETag = includeETag;
+ if (includeETag) {
+ this.includeExtendedInfo = true;
+ }
+ return this;
+ }
+
+ /**
+ * @return whether to include file attributes on this listing operation.
+ */
+ public boolean includeAttributes() {
+ return includeAttributes;
+ }
+
+ /**
+ * @param includeAttributes whether to include file attributes on this listing operation.
+ * @return updated options
+ */
+ public ShareListFilesAndDirectoriesOptions setIncludeAttributes(boolean includeAttributes) {
+ this.includeAttributes = includeAttributes;
+ if (includeAttributes) {
+ this.includeExtendedInfo = true;
+ }
+ return this;
+ }
+
+ /**
+ * @return whether to include the permission key on this listing operation.
+ */
+ public boolean includePermissionKey() {
+ return includePermissionKey;
+ }
+
+ /**
+ * @param includePermissionKey whether to include the permission key on this listing operation.
+ * @return updated options
+ */
+ public ShareListFilesAndDirectoriesOptions setIncludePermissionKey(boolean includePermissionKey) {
+ this.includePermissionKey = includePermissionKey;
+ if (includePermissionKey) {
+ this.includeExtendedInfo = true;
+ }
+ return this;
+ }
+}
diff --git a/sdk/storage/azure-storage-file-share/src/samples/java/com/azure/storage/file/share/ShareDirectoryAsyncJavaDocCodeSamples.java b/sdk/storage/azure-storage-file-share/src/samples/java/com/azure/storage/file/share/ShareDirectoryAsyncJavaDocCodeSamples.java
index ca954b15126f..c6e3cad55cda 100644
--- a/sdk/storage/azure-storage-file-share/src/samples/java/com/azure/storage/file/share/ShareDirectoryAsyncJavaDocCodeSamples.java
+++ b/sdk/storage/azure-storage-file-share/src/samples/java/com/azure/storage/file/share/ShareDirectoryAsyncJavaDocCodeSamples.java
@@ -7,6 +7,7 @@
import com.azure.storage.file.share.models.NtfsFileAttributes;
import com.azure.storage.file.share.models.ShareFileHttpHeaders;
import com.azure.storage.file.share.models.ShareRequestConditions;
+import com.azure.storage.file.share.options.ShareListFilesAndDirectoriesOptions;
import com.azure.storage.file.share.sas.ShareFileSasPermission;
import com.azure.storage.file.share.sas.ShareServiceSasSignatureValues;
@@ -276,6 +277,22 @@ public void listDirectoriesAndFilesAsyncMaxOverload() {
// END: com.azure.storage.file.share.ShareDirectoryAsyncClient.listFilesAndDirectories#string-integer
}
+ /**
+ * Generates a code sample for using {@link ShareDirectoryAsyncClient#listFilesAndDirectories(
+ *ShareListFilesAndDirectoriesOptions)}
+ */
+ public void listDirectoriesAndFilesAsyncOptionsBagOverload() {
+ ShareDirectoryAsyncClient shareDirectoryAsyncClient = createAsyncClientWithSASToken();
+ // BEGIN: com.azure.storage.file.share.ShareDirectoryAsyncClient.listFilesAndDirectories#ShareListFilesAndDirectoriesOptions
+ shareDirectoryAsyncClient.listFilesAndDirectories(new ShareListFilesAndDirectoriesOptions()
+ .setPrefix("subdir").setMaxResultsPerPage(10))
+ .subscribe(fileRef -> System.out.printf("Is the resource a directory? %b. The resource name is: %s.",
+ fileRef.isDirectory(), fileRef.getName()),
+ error -> System.err.println(error.toString()),
+ () -> System.out.println("Completed listing the directories and files."));
+ // END: com.azure.storage.file.share.ShareDirectoryAsyncClient.listFilesAndDirectories#ShareListFilesAndDirectoriesOptions
+ }
+
/**
* Generates a code sample for using {@link ShareDirectoryAsyncClient#deleteFile(String)} ()}
*/
diff --git a/sdk/storage/azure-storage-file-share/src/samples/java/com/azure/storage/file/share/ShareDirectoryJavaDocCodeSamples.java b/sdk/storage/azure-storage-file-share/src/samples/java/com/azure/storage/file/share/ShareDirectoryJavaDocCodeSamples.java
index f6551ccb8e10..d6f1c1271e89 100644
--- a/sdk/storage/azure-storage-file-share/src/samples/java/com/azure/storage/file/share/ShareDirectoryJavaDocCodeSamples.java
+++ b/sdk/storage/azure-storage-file-share/src/samples/java/com/azure/storage/file/share/ShareDirectoryJavaDocCodeSamples.java
@@ -13,6 +13,7 @@
import com.azure.storage.file.share.models.HandleItem;
import com.azure.storage.file.share.models.NtfsFileAttributes;
import com.azure.storage.file.share.models.ShareRequestConditions;
+import com.azure.storage.file.share.options.ShareListFilesAndDirectoriesOptions;
import com.azure.storage.file.share.sas.ShareFileSasPermission;
import com.azure.storage.file.share.sas.ShareServiceSasSignatureValues;
@@ -265,6 +266,20 @@ public void listDirectoriesAndFilesMaxOverload() {
// END: com.azure.storage.file.share.ShareDirectoryClient.listFilesAndDirectories#string-integer-duration-context
}
+ /**
+ * Generates a code sample for using {@link ShareDirectoryClient#listFilesAndDirectories(
+ * ShareListFilesAndDirectoriesOptions, Duration, Context)}
+ */
+ public void listDirectoriesAndFilesOptionsBagOverload() {
+ ShareDirectoryClient shareDirectoryClient = createClientWithSASToken();
+ // BEGIN: com.azure.storage.file.share.ShareDirectoryClient.listFilesAndDirectories#ShareListFilesAndDirectoriesOptions-duration-context
+ shareDirectoryClient.listFilesAndDirectories(new ShareListFilesAndDirectoriesOptions()
+ .setPrefix("subdir").setMaxResultsPerPage(10), Duration.ofSeconds(1), new Context(key1, value1))
+ .forEach(fileRef -> System.out.printf("Is the resource a directory? %b. The resource name is: %s.",
+ fileRef.isDirectory(), fileRef.getName()));
+ // END: com.azure.storage.file.share.ShareDirectoryClient.listFilesAndDirectories#ShareListFilesAndDirectoriesOptions-duration-context
+ }
+
/**
* Generates a code sample for using {@link ShareDirectoryClient#deleteFile(String)} ()}
*/
diff --git a/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/DirectoryAPITests.groovy b/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/DirectoryAPITests.groovy
index 163c16e7fdf6..4ee1c1bf8d1a 100644
--- a/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/DirectoryAPITests.groovy
+++ b/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/DirectoryAPITests.groovy
@@ -6,16 +6,20 @@ package com.azure.storage.file.share
import com.azure.storage.common.StorageSharedKeyCredential
import com.azure.storage.common.implementation.Constants
import com.azure.storage.common.test.shared.extensions.RequiredServiceVersion
+
import com.azure.storage.file.share.models.ShareErrorCode
import com.azure.storage.file.share.models.ShareFileHttpHeaders
import com.azure.storage.file.share.models.NtfsFileAttributes
+import com.azure.storage.file.share.models.ShareFileItem
import com.azure.storage.file.share.models.ShareSnapshotInfo
import com.azure.storage.file.share.models.ShareStorageException
+import com.azure.storage.file.share.options.ShareListFilesAndDirectoriesOptions
import spock.lang.Unroll
import java.time.LocalDateTime
import java.time.OffsetDateTime
import java.time.ZoneOffset
+import java.util.stream.Collectors
class DirectoryAPITests extends APISpec {
ShareDirectoryClient primaryDirectoryClient
@@ -380,7 +384,7 @@ class DirectoryAPITests extends APISpec {
def "List files and directories args"() {
given:
primaryDirectoryClient.create()
- def nameList = new LinkedList()
+ def nameList = [] as List
def dirPrefix = namer.getRandomName(60)
for (int i = 0; i < 2; i++) {
def subDirClient = primaryDirectoryClient.getSubdirectoryClient(dirPrefix + i)
@@ -392,23 +396,91 @@ class DirectoryAPITests extends APISpec {
}
primaryDirectoryClient.createFile(dirPrefix + 2, 1024)
for (int i = 0; i < 3; i++) {
- nameList.add(dirPrefix + i)
+ nameList << (dirPrefix + i)
}
when:
- def fileRefIter = primaryDirectoryClient.listFilesAndDirectories(namer.getResourcePrefix() + extraPrefix, maxResults, null, null).iterator()
+ def options = new ShareListFilesAndDirectoriesOptions()
+ .setPrefix(namer.getResourcePrefix() + extraPrefix)
+ .setMaxResultsPerPage(maxResults)
+ .setIncludeExtendedInfo(includeExtendedInfo) // set FIRST since subsequent can autoset this one
+ .setIncludeTimestamps(timestamps)
+ .setIncludeETag(etag)
+ .setIncludeAttributes(attributes)
+ .setIncludePermissionKey(permissionKey)
+ def returnedFileList = primaryDirectoryClient.listFilesAndDirectories(options, null, null).collect()
then:
- for (int i = 0; i < numOfResults; i++) {
- Objects.equals(nameList.pop(), fileRefIter.next().getName())
+ options.includeExtendedInfo() == includeExtendedInfoIsTrue
+ if (expectingResults) {
+ assert nameList == returnedFileList*.getName()
+ }
+ else {
+ assert returnedFileList.size() == 0
}
- !fileRefIter.hasNext()
where:
- extraPrefix | maxResults | numOfResults
- "" | null | 3
- "" | 1 | 3
- "noOp" | 3 | 0
+ extraPrefix | maxResults | timestamps | etag | attributes | permissionKey | includeExtendedInfo || includeExtendedInfoIsTrue | expectingResults
+ "" | null | false | false | false | false | null || null | true
+ "" | 1 | false | false | false | false | null || null | true
+ "noOp" | 3 | false | false | false | false | null || null | false
+ "" | null | true | false | false | false | null || true | true
+ "" | null | false | true | false | false | null || true | true
+ "" | null | false | false | true | false | null || true | true
+ "" | null | false | false | false | true | null || true | true
+ "" | null | true | true | true | true | null || true | true
+ "" | null | false | false | false | false | true || true | true
+ }
+
+ def "List files and directories extended info results"() {
+ given:
+ def parentDir = primaryDirectoryClient
+ parentDir.create()
+ def file = parentDir.createFile(namer.getRandomName(60), 1024)
+ def dir = parentDir.createSubdirectory(namer.getRandomName(60))
+
+ when:
+ def listResults = parentDir.listFilesAndDirectories(
+ new ShareListFilesAndDirectoriesOptions()
+ .setIncludeExtendedInfo(true).setIncludeTimestamps(true).setIncludePermissionKey(true).setIncludeETag(true)
+ .setIncludeAttributes(true),
+ null, null)
+ .stream().collect(Collectors.toList())
+
+ then:
+ ShareFileItem dirListItem
+ ShareFileItem fileListItem
+ if (listResults[0].isDirectory()) {
+ dirListItem = listResults[0]
+ fileListItem = listResults[1]
+ } else {
+ dirListItem = listResults[1]
+ fileListItem = listResults[0]
+ }
+
+ new File(dir.getDirectoryPath()).getName() == dirListItem.getName()
+ dirListItem.isDirectory()
+ dirListItem.getId() && !dirListItem.getId().allWhitespace
+ EnumSet.of(NtfsFileAttributes.DIRECTORY) == dirListItem.fileAttributes
+ dirListItem.getPermissionKey() && !dirListItem.getPermissionKey().allWhitespace
+ dirListItem.getProperties().getCreatedOn()
+ dirListItem.getProperties().getLastAccessedOn()
+ dirListItem.getProperties().getLastWrittenOn()
+ dirListItem.getProperties().getChangedOn()
+ dirListItem.getProperties().getLastModified()
+ dirListItem.getProperties().getETag() && !dirListItem.getProperties().getETag().allWhitespace
+
+ new File(file.getFilePath()).getName() == fileListItem.getName()
+ !fileListItem.isDirectory()
+ fileListItem.getId() && !fileListItem.getId().allWhitespace
+ EnumSet.of(NtfsFileAttributes.ARCHIVE) == fileListItem.fileAttributes
+ fileListItem.getPermissionKey() && !fileListItem.getPermissionKey().allWhitespace
+ fileListItem.getProperties().getCreatedOn()
+ fileListItem.getProperties().getLastAccessedOn()
+ fileListItem.getProperties().getLastWrittenOn()
+ fileListItem.getProperties().getChangedOn()
+ fileListItem.getProperties().getLastModified()
+ fileListItem.getProperties().getETag() && !fileListItem.getProperties().getETag().allWhitespace
}
def "List max results by page"() {
diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsListFilesAndDirectoriesArgs[0].json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsListFilesAndDirectoriesArgs[0].json
index a2931b8f4a46..e41cd660332a 100644
--- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsListFilesAndDirectoriesArgs[0].json
+++ b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsListFilesAndDirectoriesArgs[0].json
@@ -1,318 +1,278 @@
{
"networkCallRecords" : [ {
"Method" : "PUT",
- "Uri" : "https://REDACTED.file.core.windows.net/39f631bd39f631bd166929843f7f5c78120d4d6d9a?restype=share",
+ "Uri" : "https://REDACTED.file.core.windows.net/39f631bd39f631bd36f127205fd877079b804a66ba?restype=share",
"Headers" : {
- "x-ms-version" : "2020-06-12",
- "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)",
- "x-ms-client-request-id" : "d02145dd-fbb0-4ec1-90b0-cb9567083571"
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "9e0cfe05-2230-4e07-a1ed-261864236928"
},
"Response" : {
- "content-length" : "0",
- "x-ms-version" : "2020-06-12",
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
"Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
- "eTag" : "0x8D910031CA6F4A2",
- "Last-Modified" : "Wed, 05 May 2021 20:19:40 GMT",
+ "eTag" : "0x8D92791D1058BEC",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
"retry-after" : "0",
"StatusCode" : "201",
- "x-ms-request-id" : "9ef28ed7-901a-0064-0eeb-413b29000000",
- "x-ms-client-request-id" : "d02145dd-fbb0-4ec1-90b0-cb9567083571",
- "Date" : "Wed, 05 May 2021 20:19:39 GMT"
+ "x-ms-request-id" : "c6d2de5e-501a-001c-7e7a-59e384000000",
+ "x-ms-client-request-id" : "9e0cfe05-2230-4e07-a1ed-261864236928",
+ "Date" : "Fri, 04 Jun 2021 19:49:07 GMT"
},
"Exception" : null
}, {
"Method" : "PUT",
- "Uri" : "https://REDACTED.file.core.windows.net/39f631bd39f631bd166929843f7f5c78120d4d6d9a/39f631bd39f631bd166617164e4649e7dfc749b982?restype=directory",
+ "Uri" : "https://REDACTED.file.core.windows.net/39f631bd39f631bd36f127205fd877079b804a66ba/39f631bd39f631bd36f72529cb9d4259bcf54a35a6?restype=directory",
"Headers" : {
- "x-ms-version" : "2020-06-12",
- "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)",
- "x-ms-client-request-id" : "79c6d528-4a15-4126-8564-e23d8d55f795"
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "a3f77b7d-cfd4-4b4b-9e01-d29237f3e8c6"
},
"Response" : {
- "content-length" : "0",
- "x-ms-version" : "2020-06-12",
- "x-ms-file-permission-key" : "3917056552249722909*6811422022089678740",
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "2663978480635205383*5486365400479318158",
"x-ms-file-id" : "13835128424026341376",
"Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
- "x-ms-file-creation-time" : "2021-05-05T20:19:40.2185092Z",
- "Last-Modified" : "Wed, 05 May 2021 20:19:40 GMT",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.2717450Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
"retry-after" : "0",
"StatusCode" : "201",
"x-ms-request-server-encrypted" : "true",
- "Date" : "Wed, 05 May 2021 20:19:39 GMT",
+ "Date" : "Fri, 04 Jun 2021 19:49:07 GMT",
"x-ms-file-attributes" : "Directory",
- "x-ms-file-change-time" : "2021-05-05T20:19:40.2185092Z",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.2717450Z",
"x-ms-file-parent-id" : "0",
- "eTag" : "0x8D910031CB4AD84",
- "x-ms-request-id" : "edeb589b-d01a-0038-41eb-416e71000000",
- "x-ms-client-request-id" : "79c6d528-4a15-4126-8564-e23d8d55f795",
- "x-ms-file-last-write-time" : "2021-05-05T20:19:40.2185092Z"
+ "eTag" : "0x8D92791D12C490A",
+ "x-ms-request-id" : "2667989e-501a-0003-567a-59a3d1000000",
+ "x-ms-client-request-id" : "a3f77b7d-cfd4-4b4b-9e01-d29237f3e8c6",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.2717450Z"
},
"Exception" : null
}, {
"Method" : "PUT",
- "Uri" : "https://REDACTED.file.core.windows.net/39f631bd39f631bd166929843f7f5c78120d4d6d9a/39f631bd39f631bd166617164e4649e7dfc749b982%2F39f631bd39f631bd16660112e00bc44e0240435d8a0?restype=directory",
+ "Uri" : "https://REDACTED.file.core.windows.net/39f631bd39f631bd36f127205fd877079b804a66ba/39f631bd39f631bd36f72529cb9d4259bcf54a35a6%2F39f631bd39f631bd36f67159ed3f8a9f79ac419a820?restype=directory",
"Headers" : {
- "x-ms-version" : "2020-06-12",
- "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)",
- "x-ms-client-request-id" : "58169ec4-106d-4847-87a0-cd2310e7085a"
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "3f689a3d-0668-4a70-90d5-be441857a2a5"
},
"Response" : {
- "content-length" : "0",
- "x-ms-version" : "2020-06-12",
- "x-ms-file-permission-key" : "3917056552249722909*6811422022089678740",
- "x-ms-file-id" : "13835093239654252544",
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "2663978480635205383*5486365400479318158",
+ "x-ms-file-id" : "11529285414812647424",
"Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
- "x-ms-file-creation-time" : "2021-05-05T20:19:40.3045713Z",
- "Last-Modified" : "Wed, 05 May 2021 20:19:40 GMT",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.3756850Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
"retry-after" : "0",
"StatusCode" : "201",
"x-ms-request-server-encrypted" : "true",
- "Date" : "Wed, 05 May 2021 20:19:39 GMT",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
"x-ms-file-attributes" : "Directory",
- "x-ms-file-change-time" : "2021-05-05T20:19:40.3045713Z",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.3756850Z",
"x-ms-file-parent-id" : "13835128424026341376",
- "eTag" : "0x8D910031CC1CF51",
- "x-ms-request-id" : "a0ad10bb-f01a-004d-1feb-41055d000000",
- "x-ms-client-request-id" : "58169ec4-106d-4847-87a0-cd2310e7085a",
- "x-ms-file-last-write-time" : "2021-05-05T20:19:40.3045713Z"
+ "eTag" : "0x8D92791D13C2532",
+ "x-ms-request-id" : "266798a0-501a-0003-577a-59a3d1000000",
+ "x-ms-client-request-id" : "3f689a3d-0668-4a70-90d5-be441857a2a5",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.3756850Z"
},
"Exception" : null
}, {
"Method" : "PUT",
- "Uri" : "https://REDACTED.file.core.windows.net/39f631bd39f631bd166929843f7f5c78120d4d6d9a/39f631bd39f631bd166617164e4649e7dfc749b982%2F39f631bd39f631bd16660112e00bc44e0240435d8a0%2F39f631bd39f631bd16660112e00bc44e0240435d8a3",
+ "Uri" : "https://REDACTED.file.core.windows.net/39f631bd39f631bd36f127205fd877079b804a66ba/39f631bd39f631bd36f72529cb9d4259bcf54a35a6%2F39f631bd39f631bd36f67159ed3f8a9f79ac419a820%2F39f631bd39f631bd36f67159ed3f8a9f79ac419a823",
"Headers" : {
- "x-ms-version" : "2020-06-12",
- "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)",
- "x-ms-client-request-id" : "fc3d152f-478c-46d5-9df7-e2e817a5a206"
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "cac6cb04-ef7c-4941-9ec1-a9861b255aa1"
},
"Response" : {
- "content-length" : "0",
- "x-ms-version" : "2020-06-12",
- "x-ms-file-permission-key" : "17737392480967489306*6811422022089678740",
- "x-ms-file-id" : "13835163608398430208",
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "13835093239654252544",
"Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
- "x-ms-file-creation-time" : "2021-05-05T20:19:40.4396668Z",
- "Last-Modified" : "Wed, 05 May 2021 20:19:40 GMT",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.5226003Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
"retry-after" : "0",
"StatusCode" : "201",
"x-ms-request-server-encrypted" : "true",
- "Date" : "Wed, 05 May 2021 20:19:39 GMT",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
"x-ms-file-attributes" : "Archive",
- "x-ms-file-change-time" : "2021-05-05T20:19:40.4396668Z",
- "x-ms-file-parent-id" : "13835093239654252544",
- "eTag" : "0x8D910031CD66C7C",
- "x-ms-request-id" : "53b03bfa-d01a-0017-4feb-4163ba000000",
- "x-ms-client-request-id" : "fc3d152f-478c-46d5-9df7-e2e817a5a206",
- "x-ms-file-last-write-time" : "2021-05-05T20:19:40.4396668Z"
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.5226003Z",
+ "x-ms-file-parent-id" : "11529285414812647424",
+ "eTag" : "0x8D92791D1529013",
+ "x-ms-request-id" : "f92279b8-701a-002e-177a-59103a000000",
+ "x-ms-client-request-id" : "cac6cb04-ef7c-4941-9ec1-a9861b255aa1",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.5226003Z"
},
"Exception" : null
}, {
"Method" : "PUT",
- "Uri" : "https://REDACTED.file.core.windows.net/39f631bd39f631bd166929843f7f5c78120d4d6d9a/39f631bd39f631bd166617164e4649e7dfc749b982%2F39f631bd39f631bd16660112e00bc44e0240435d8a0%2F39f631bd39f631bd16660112e00bc44e0240435d8a4",
+ "Uri" : "https://REDACTED.file.core.windows.net/39f631bd39f631bd36f127205fd877079b804a66ba/39f631bd39f631bd36f72529cb9d4259bcf54a35a6%2F39f631bd39f631bd36f67159ed3f8a9f79ac419a820%2F39f631bd39f631bd36f67159ed3f8a9f79ac419a824",
"Headers" : {
- "x-ms-version" : "2020-06-12",
- "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)",
- "x-ms-client-request-id" : "3c21a29c-85b8-4b27-80dc-b82c3727d1e2"
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "a8b71c7f-22f8-40a6-bb67-3892c4bf0a38"
},
"Response" : {
- "content-length" : "0",
- "x-ms-version" : "2020-06-12",
- "x-ms-file-permission-key" : "17737392480967489306*6811422022089678740",
- "x-ms-file-id" : "11529320599184736256",
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "13835163608398430208",
"Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
- "x-ms-file-creation-time" : "2021-05-05T20:19:40.5397386Z",
- "Last-Modified" : "Wed, 05 May 2021 20:19:40 GMT",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.6315378Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
"retry-after" : "0",
"StatusCode" : "201",
"x-ms-request-server-encrypted" : "true",
- "Date" : "Wed, 05 May 2021 20:19:39 GMT",
+ "Date" : "Fri, 04 Jun 2021 19:49:07 GMT",
"x-ms-file-attributes" : "Archive",
- "x-ms-file-change-time" : "2021-05-05T20:19:40.5397386Z",
- "x-ms-file-parent-id" : "13835093239654252544",
- "eTag" : "0x8D910031CE5B18A",
- "x-ms-request-id" : "53b03bfc-d01a-0017-50eb-4163ba000000",
- "x-ms-client-request-id" : "3c21a29c-85b8-4b27-80dc-b82c3727d1e2",
- "x-ms-file-last-write-time" : "2021-05-05T20:19:40.5397386Z"
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.6315378Z",
+ "x-ms-file-parent-id" : "11529285414812647424",
+ "eTag" : "0x8D92791D1632F72",
+ "x-ms-request-id" : "5079ffe6-a01a-0005-6e7a-59e2e0000000",
+ "x-ms-client-request-id" : "a8b71c7f-22f8-40a6-bb67-3892c4bf0a38",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.6315378Z"
},
"Exception" : null
}, {
"Method" : "PUT",
- "Uri" : "https://REDACTED.file.core.windows.net/39f631bd39f631bd166929843f7f5c78120d4d6d9a/39f631bd39f631bd166617164e4649e7dfc749b982%2F39f631bd39f631bd16660112e00bc44e0240435d8a1?restype=directory",
+ "Uri" : "https://REDACTED.file.core.windows.net/39f631bd39f631bd36f127205fd877079b804a66ba/39f631bd39f631bd36f72529cb9d4259bcf54a35a6%2F39f631bd39f631bd36f67159ed3f8a9f79ac419a821?restype=directory",
"Headers" : {
- "x-ms-version" : "2020-06-12",
- "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)",
- "x-ms-client-request-id" : "0f44d707-a952-4883-bcd2-95a4cfa6827f"
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "fa0cadad-d6e7-4a34-a9b0-0e31417c9e22"
},
"Response" : {
- "content-length" : "0",
- "x-ms-version" : "2020-06-12",
- "x-ms-file-permission-key" : "3917056552249722909*6811422022089678740",
- "x-ms-file-id" : "13835075647468208128",
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "2663978480635205383*5486365400479318158",
+ "x-ms-file-id" : "16140971433240035328",
"Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
- "x-ms-file-creation-time" : "2021-05-05T20:19:40.6428123Z",
- "Last-Modified" : "Wed, 05 May 2021 20:19:40 GMT",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.7304807Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
"retry-after" : "0",
"StatusCode" : "201",
"x-ms-request-server-encrypted" : "true",
- "Date" : "Wed, 05 May 2021 20:19:40 GMT",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
"x-ms-file-attributes" : "Directory",
- "x-ms-file-change-time" : "2021-05-05T20:19:40.6428123Z",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.7304807Z",
"x-ms-file-parent-id" : "13835128424026341376",
- "eTag" : "0x8D910031CF56BDB",
- "x-ms-request-id" : "c82a9308-701a-0053-2deb-41e985000000",
- "x-ms-client-request-id" : "0f44d707-a952-4883-bcd2-95a4cfa6827f",
- "x-ms-file-last-write-time" : "2021-05-05T20:19:40.6428123Z"
+ "eTag" : "0x8D92791D1724867",
+ "x-ms-request-id" : "266798a7-501a-0003-5b7a-59a3d1000000",
+ "x-ms-client-request-id" : "fa0cadad-d6e7-4a34-a9b0-0e31417c9e22",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.7304807Z"
},
"Exception" : null
}, {
"Method" : "PUT",
- "Uri" : "https://REDACTED.file.core.windows.net/39f631bd39f631bd166929843f7f5c78120d4d6d9a/39f631bd39f631bd166617164e4649e7dfc749b982%2F39f631bd39f631bd16660112e00bc44e0240435d8a1%2F39f631bd39f631bd16660112e00bc44e0240435d8a5",
+ "Uri" : "https://REDACTED.file.core.windows.net/39f631bd39f631bd36f127205fd877079b804a66ba/39f631bd39f631bd36f72529cb9d4259bcf54a35a6%2F39f631bd39f631bd36f67159ed3f8a9f79ac419a821%2F39f631bd39f631bd36f67159ed3f8a9f79ac419a825",
"Headers" : {
- "x-ms-version" : "2020-06-12",
- "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)",
- "x-ms-client-request-id" : "4a1308e7-5bd4-4299-8f2a-169a9fe24049"
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "79e5f022-1075-497d-b13e-5ca4afddec42"
},
"Response" : {
- "content-length" : "0",
- "x-ms-version" : "2020-06-12",
- "x-ms-file-permission-key" : "17737392480967489306*6811422022089678740",
- "x-ms-file-id" : "13835146016212385792",
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "11529250230440558592",
"Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
- "x-ms-file-creation-time" : "2021-05-05T20:19:40.7268731Z",
- "Last-Modified" : "Wed, 05 May 2021 20:19:40 GMT",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.8614053Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
"retry-after" : "0",
"StatusCode" : "201",
"x-ms-request-server-encrypted" : "true",
- "Date" : "Wed, 05 May 2021 20:19:40 GMT",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
"x-ms-file-attributes" : "Archive",
- "x-ms-file-change-time" : "2021-05-05T20:19:40.7268731Z",
- "x-ms-file-parent-id" : "13835075647468208128",
- "eTag" : "0x8D910031D023F7B",
- "x-ms-request-id" : "5fe79b09-001a-0066-49eb-418591000000",
- "x-ms-client-request-id" : "4a1308e7-5bd4-4299-8f2a-169a9fe24049",
- "x-ms-file-last-write-time" : "2021-05-05T20:19:40.7268731Z"
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.8614053Z",
+ "x-ms-file-parent-id" : "16140971433240035328",
+ "eTag" : "0x8D92791D18642A5",
+ "x-ms-request-id" : "f92279bf-701a-002e-1b7a-59103a000000",
+ "x-ms-client-request-id" : "79e5f022-1075-497d-b13e-5ca4afddec42",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.8614053Z"
},
"Exception" : null
}, {
"Method" : "PUT",
- "Uri" : "https://REDACTED.file.core.windows.net/39f631bd39f631bd166929843f7f5c78120d4d6d9a/39f631bd39f631bd166617164e4649e7dfc749b982%2F39f631bd39f631bd16660112e00bc44e0240435d8a1%2F39f631bd39f631bd16660112e00bc44e0240435d8a6",
+ "Uri" : "https://REDACTED.file.core.windows.net/39f631bd39f631bd36f127205fd877079b804a66ba/39f631bd39f631bd36f72529cb9d4259bcf54a35a6%2F39f631bd39f631bd36f67159ed3f8a9f79ac419a821%2F39f631bd39f631bd36f67159ed3f8a9f79ac419a826",
"Headers" : {
- "x-ms-version" : "2020-06-12",
- "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)",
- "x-ms-client-request-id" : "55c8f4c2-f683-41ee-a292-5a48f4122e8d"
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "c52841f8-a870-43a2-83ff-8c384581fc11"
},
"Response" : {
- "content-length" : "0",
- "x-ms-version" : "2020-06-12",
- "x-ms-file-permission-key" : "17737392480967489306*6811422022089678740",
- "x-ms-file-id" : "13835110831840296960",
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "11529320599184736256",
"Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
- "x-ms-file-creation-time" : "2021-05-05T20:19:40.8059309Z",
- "Last-Modified" : "Wed, 05 May 2021 20:19:40 GMT",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.9703428Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
"retry-after" : "0",
"StatusCode" : "201",
"x-ms-request-server-encrypted" : "true",
- "Date" : "Wed, 05 May 2021 20:19:40 GMT",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
"x-ms-file-attributes" : "Archive",
- "x-ms-file-change-time" : "2021-05-05T20:19:40.8059309Z",
- "x-ms-file-parent-id" : "13835075647468208128",
- "eTag" : "0x8D910031D0E4FAD",
- "x-ms-request-id" : "324ddc7c-401a-0015-70eb-41dd02000000",
- "x-ms-client-request-id" : "55c8f4c2-f683-41ee-a292-5a48f4122e8d",
- "x-ms-file-last-write-time" : "2021-05-05T20:19:40.8059309Z"
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.9703428Z",
+ "x-ms-file-parent-id" : "16140971433240035328",
+ "eTag" : "0x8D92791D196E204",
+ "x-ms-request-id" : "5079ffec-a01a-0005-727a-59e2e0000000",
+ "x-ms-client-request-id" : "c52841f8-a870-43a2-83ff-8c384581fc11",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.9703428Z"
},
"Exception" : null
}, {
"Method" : "PUT",
- "Uri" : "https://REDACTED.file.core.windows.net/39f631bd39f631bd166929843f7f5c78120d4d6d9a/39f631bd39f631bd166617164e4649e7dfc749b982%2F39f631bd39f631bd16660112e00bc44e0240435d8a2",
+ "Uri" : "https://REDACTED.file.core.windows.net/39f631bd39f631bd36f127205fd877079b804a66ba/39f631bd39f631bd36f72529cb9d4259bcf54a35a6%2F39f631bd39f631bd36f67159ed3f8a9f79ac419a822",
"Headers" : {
- "x-ms-version" : "2020-06-12",
- "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)",
- "x-ms-client-request-id" : "b9694649-73e6-4537-a16e-46c0c3e0731b"
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "b5c5da81-f507-4d2d-92a6-7cc65f55216f"
},
"Response" : {
- "content-length" : "0",
- "x-ms-version" : "2020-06-12",
- "x-ms-file-permission-key" : "17737392480967489306*6811422022089678740",
- "x-ms-file-id" : "13835181200584474624",
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "13835075647468208128",
"Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
- "x-ms-file-creation-time" : "2021-05-05T20:19:40.8849861Z",
- "Last-Modified" : "Wed, 05 May 2021 20:19:40 GMT",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:09.0572930Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:09 GMT",
"retry-after" : "0",
"StatusCode" : "201",
"x-ms-request-server-encrypted" : "true",
- "Date" : "Wed, 05 May 2021 20:19:40 GMT",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
"x-ms-file-attributes" : "Archive",
- "x-ms-file-change-time" : "2021-05-05T20:19:40.8849861Z",
+ "x-ms-file-change-time" : "2021-06-04T19:49:09.0572930Z",
"x-ms-file-parent-id" : "13835128424026341376",
- "eTag" : "0x8D910031D1A5FC5",
- "x-ms-request-id" : "6442f147-001a-0076-15eb-4140f9000000",
- "x-ms-client-request-id" : "b9694649-73e6-4537-a16e-46c0c3e0731b",
- "x-ms-file-last-write-time" : "2021-05-05T20:19:40.8849861Z"
+ "eTag" : "0x8D92791D1A42682",
+ "x-ms-request-id" : "0c0bd3b4-001a-0007-137a-59dd0f000000",
+ "x-ms-client-request-id" : "b5c5da81-f507-4d2d-92a6-7cc65f55216f",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:09.0572930Z"
},
"Exception" : null
}, {
"Method" : "GET",
- "Uri" : "https://REDACTED.file.core.windows.net/39f631bd39f631bd166929843f7f5c78120d4d6d9a/39f631bd39f631bd166617164e4649e7dfc749b982?restype=directory&comp=list&prefix=39f631bd",
+ "Uri" : "https://REDACTED.file.core.windows.net/39f631bd39f631bd36f127205fd877079b804a66ba/39f631bd39f631bd36f72529cb9d4259bcf54a35a6?restype=directory&comp=list&prefix=39f631bd",
"Headers" : {
- "x-ms-version" : "2020-06-12",
- "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)",
- "x-ms-client-request-id" : "3bbc0db7-9d96-4a97-8905-4e92dc9cc845"
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "8c4fb9d6-3168-4b5a-b054-ce3c50029311"
},
"Response" : {
"Transfer-Encoding" : "chunked",
- "x-ms-version" : "2020-06-12",
+ "x-ms-version" : "2020-10-02",
"Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
"retry-after" : "0",
"StatusCode" : "200",
- "x-ms-request-id" : "ef935b56-001a-0059-79eb-414d32000000",
- "Body" : "39f631bd39f631bd39f631bd16660112e00bc44e0240435d8a039f631bd39f631bd16660112e00bc44e0240435d8a139f631bd39f631bd16660112e00bc44e0240435d8a21024",
- "x-ms-client-request-id" : "3bbc0db7-9d96-4a97-8905-4e92dc9cc845",
- "Date" : "Wed, 05 May 2021 20:19:40 GMT",
+ "x-ms-request-id" : "d927019a-d01a-0012-177a-59af7f000000",
+ "Body" : "39f631bd1383512842402634137639f631bd39f631bd36f67159ed3f8a9f79ac419a8201152928541481264742439f631bd39f631bd36f67159ed3f8a9f79ac419a8211614097143324003532839f631bd39f631bd36f67159ed3f8a9f79ac419a822138350756474682081281024",
+ "x-ms-client-request-id" : "8c4fb9d6-3168-4b5a-b054-ce3c50029311",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
"Content-Type" : "application/xml"
},
"Exception" : null
- }, {
- "Method" : "GET",
- "Uri" : "https://REDACTED.file.core.windows.net?comp=list&prefix=39f631bd&include=",
- "Headers" : {
- "x-ms-version" : "2020-06-12",
- "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)",
- "x-ms-client-request-id" : "56ce6654-3d43-4b79-a01d-87622ee0754a"
- },
- "Response" : {
- "Transfer-Encoding" : "chunked",
- "x-ms-version" : "2020-06-12",
- "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
- "retry-after" : "0",
- "StatusCode" : "200",
- "x-ms-request-id" : "d97a4b0a-801a-0078-46eb-416949000000",
- "Body" : "39f631bd39f631bd39f631bd166929843f7f5c78120d4d6d9aWed, 05 May 2021 20:19:40 GMT\"0x8D910031CA6F4A2\"unlockedavailable5120TransactionOptimizedWed, 05 May 2021 20:19:40 GMT$account-encryption-keyfalse",
- "x-ms-client-request-id" : "56ce6654-3d43-4b79-a01d-87622ee0754a",
- "Date" : "Wed, 05 May 2021 20:19:40 GMT",
- "Content-Type" : "application/xml"
- },
- "Exception" : null
- }, {
- "Method" : "DELETE",
- "Uri" : "https://REDACTED.file.core.windows.net/39f631bd39f631bd166929843f7f5c78120d4d6d9a?restype=share",
- "Headers" : {
- "x-ms-version" : "2020-06-12",
- "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)",
- "x-ms-client-request-id" : "affa99a4-4800-43ce-b8ee-a22f1ad83327"
- },
- "Response" : {
- "content-length" : "0",
- "x-ms-version" : "2020-06-12",
- "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
- "retry-after" : "0",
- "StatusCode" : "202",
- "x-ms-request-id" : "2c916f56-a01a-0032-3beb-41cac6000000",
- "x-ms-client-request-id" : "affa99a4-4800-43ce-b8ee-a22f1ad83327",
- "Date" : "Wed, 05 May 2021 20:19:40 GMT"
- },
- "Exception" : null
} ],
- "variables" : [ "39f631bd39f631bd166929843f7f5c78120d4d6d9a", "39f631bd39f631bd166617164e4649e7dfc749b982", "39f631bd39f631bd16660112e00bc44e0240435d8a" ]
+ "variables" : [ "39f631bd39f631bd36f127205fd877079b804a66ba", "39f631bd39f631bd36f72529cb9d4259bcf54a35a6", "39f631bd39f631bd36f67159ed3f8a9f79ac419a82" ]
}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsListFilesAndDirectoriesArgs[1].json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsListFilesAndDirectoriesArgs[1].json
index 46ee714cd18e..6cbf727e1f61 100644
--- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsListFilesAndDirectoriesArgs[1].json
+++ b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsListFilesAndDirectoriesArgs[1].json
@@ -1,360 +1,320 @@
{
"networkCallRecords" : [ {
"Method" : "PUT",
- "Uri" : "https://REDACTED.file.core.windows.net/20ed00fc20ed00fc21656911e972facb03454663a0?restype=share",
+ "Uri" : "https://REDACTED.file.core.windows.net/20ed00fc20ed00fc26637377a30f9f2883ed4393af?restype=share",
"Headers" : {
- "x-ms-version" : "2020-06-12",
- "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)",
- "x-ms-client-request-id" : "6cdc0a7e-ee4e-4fc4-a97d-dcd3a9122250"
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "a320e2ec-54ec-4ebe-bd55-09ff7f45cbc7"
},
"Response" : {
- "content-length" : "0",
- "x-ms-version" : "2020-06-12",
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
"Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
- "eTag" : "0x8D910031D6F417F",
- "Last-Modified" : "Wed, 05 May 2021 20:19:41 GMT",
+ "eTag" : "0x8D92791D1055688",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
"retry-after" : "0",
"StatusCode" : "201",
- "x-ms-request-id" : "f606c216-201a-004e-38eb-41e439000000",
- "x-ms-client-request-id" : "6cdc0a7e-ee4e-4fc4-a97d-dcd3a9122250",
- "Date" : "Wed, 05 May 2021 20:19:40 GMT"
+ "x-ms-request-id" : "d121b8c1-401a-0021-377a-59bb8d000000",
+ "x-ms-client-request-id" : "a320e2ec-54ec-4ebe-bd55-09ff7f45cbc7",
+ "Date" : "Fri, 04 Jun 2021 19:49:07 GMT"
},
"Exception" : null
}, {
"Method" : "PUT",
- "Uri" : "https://REDACTED.file.core.windows.net/20ed00fc20ed00fc21656911e972facb03454663a0/20ed00fc20ed00fc2161584460810e9dbdc043d5a8?restype=directory",
+ "Uri" : "https://REDACTED.file.core.windows.net/20ed00fc20ed00fc26637377a30f9f2883ed4393af/20ed00fc20ed00fc26633926f6385796ba7b480fb2?restype=directory",
"Headers" : {
- "x-ms-version" : "2020-06-12",
- "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)",
- "x-ms-client-request-id" : "f1167319-7d11-45db-b9a9-a0d7da789b94"
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "635676f0-7081-4e1a-a736-42274c013ca1"
},
"Response" : {
- "content-length" : "0",
- "x-ms-version" : "2020-06-12",
- "x-ms-file-permission-key" : "3917056552249722909*6811422022089678740",
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "2663978480635205383*5486365400479318158",
"x-ms-file-id" : "13835128424026341376",
"Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
- "x-ms-file-creation-time" : "2021-05-05T20:19:41.5674748Z",
- "Last-Modified" : "Wed, 05 May 2021 20:19:41 GMT",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.3576956Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
"retry-after" : "0",
"StatusCode" : "201",
"x-ms-request-server-encrypted" : "true",
- "Date" : "Wed, 05 May 2021 20:19:41 GMT",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
"x-ms-file-attributes" : "Directory",
- "x-ms-file-change-time" : "2021-05-05T20:19:41.5674748Z",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.3576956Z",
"x-ms-file-parent-id" : "0",
- "eTag" : "0x8D910031D82837C",
- "x-ms-request-id" : "35d39904-101a-006a-4beb-411299000000",
- "x-ms-client-request-id" : "f1167319-7d11-45db-b9a9-a0d7da789b94",
- "x-ms-file-last-write-time" : "2021-05-05T20:19:41.5674748Z"
+ "eTag" : "0x8D92791D139667C",
+ "x-ms-request-id" : "0c0bd3a6-001a-0007-0a7a-59dd0f000000",
+ "x-ms-client-request-id" : "635676f0-7081-4e1a-a736-42274c013ca1",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.3576956Z"
},
"Exception" : null
}, {
"Method" : "PUT",
- "Uri" : "https://REDACTED.file.core.windows.net/20ed00fc20ed00fc21656911e972facb03454663a0/20ed00fc20ed00fc2161584460810e9dbdc043d5a8%2F20ed00fc20ed00fc2161008417b4b1565d4f425a9a0?restype=directory",
+ "Uri" : "https://REDACTED.file.core.windows.net/20ed00fc20ed00fc26637377a30f9f2883ed4393af/20ed00fc20ed00fc26633926f6385796ba7b480fb2%2F20ed00fc20ed00fc266623975cf491ffaeec4cbfa90?restype=directory",
"Headers" : {
- "x-ms-version" : "2020-06-12",
- "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)",
- "x-ms-client-request-id" : "9dc84130-82b9-4c20-9c42-0f6f386a9439"
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "4436c2f2-18f0-4d31-898e-0133f0cc8c3c"
},
"Response" : {
- "content-length" : "0",
- "x-ms-version" : "2020-06-12",
- "x-ms-file-permission-key" : "3917056552249722909*6811422022089678740",
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "2663978480635205383*5486365400479318158",
"x-ms-file-id" : "13835093239654252544",
"Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
- "x-ms-file-creation-time" : "2021-05-05T20:19:41.6515354Z",
- "Last-Modified" : "Wed, 05 May 2021 20:19:41 GMT",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.4636347Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
"retry-after" : "0",
"StatusCode" : "201",
"x-ms-request-server-encrypted" : "true",
- "Date" : "Wed, 05 May 2021 20:19:41 GMT",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
"x-ms-file-attributes" : "Directory",
- "x-ms-file-change-time" : "2021-05-05T20:19:41.6515354Z",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.4636347Z",
"x-ms-file-parent-id" : "13835128424026341376",
- "eTag" : "0x8D910031D8F571A",
- "x-ms-request-id" : "9ef28eec-901a-0064-1aeb-413b29000000",
- "x-ms-client-request-id" : "9dc84130-82b9-4c20-9c42-0f6f386a9439",
- "x-ms-file-last-write-time" : "2021-05-05T20:19:41.6515354Z"
+ "eTag" : "0x8D92791D14990BB",
+ "x-ms-request-id" : "266798a1-501a-0003-587a-59a3d1000000",
+ "x-ms-client-request-id" : "4436c2f2-18f0-4d31-898e-0133f0cc8c3c",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.4636347Z"
},
"Exception" : null
}, {
"Method" : "PUT",
- "Uri" : "https://REDACTED.file.core.windows.net/20ed00fc20ed00fc21656911e972facb03454663a0/20ed00fc20ed00fc2161584460810e9dbdc043d5a8%2F20ed00fc20ed00fc2161008417b4b1565d4f425a9a0%2F20ed00fc20ed00fc2161008417b4b1565d4f425a9a3",
+ "Uri" : "https://REDACTED.file.core.windows.net/20ed00fc20ed00fc26637377a30f9f2883ed4393af/20ed00fc20ed00fc26633926f6385796ba7b480fb2%2F20ed00fc20ed00fc266623975cf491ffaeec4cbfa90%2F20ed00fc20ed00fc266623975cf491ffaeec4cbfa93",
"Headers" : {
- "x-ms-version" : "2020-06-12",
- "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)",
- "x-ms-client-request-id" : "c0702595-d2ea-4cb2-831b-70671c886ad3"
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "d7c45b11-9cc1-4398-b782-fc69d3eaba45"
},
"Response" : {
- "content-length" : "0",
- "x-ms-version" : "2020-06-12",
- "x-ms-file-permission-key" : "17737392480967489306*6811422022089678740",
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
"x-ms-file-id" : "13835163608398430208",
"Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
- "x-ms-file-creation-time" : "2021-05-05T20:19:41.7976393Z",
- "Last-Modified" : "Wed, 05 May 2021 20:19:41 GMT",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.6115495Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
"retry-after" : "0",
"StatusCode" : "201",
"x-ms-request-server-encrypted" : "true",
- "Date" : "Wed, 05 May 2021 20:19:41 GMT",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
"x-ms-file-attributes" : "Archive",
- "x-ms-file-change-time" : "2021-05-05T20:19:41.7976393Z",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.6115495Z",
"x-ms-file-parent-id" : "13835093239654252544",
- "eTag" : "0x8D910031DA5A249",
- "x-ms-request-id" : "ad0f3e5a-401a-0067-05eb-41da4d000000",
- "x-ms-client-request-id" : "c0702595-d2ea-4cb2-831b-70671c886ad3",
- "x-ms-file-last-write-time" : "2021-05-05T20:19:41.7976393Z"
+ "eTag" : "0x8D92791D16022A7",
+ "x-ms-request-id" : "c6d2de80-501a-001c-1d7a-59e384000000",
+ "x-ms-client-request-id" : "d7c45b11-9cc1-4398-b782-fc69d3eaba45",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.6115495Z"
},
"Exception" : null
}, {
"Method" : "PUT",
- "Uri" : "https://REDACTED.file.core.windows.net/20ed00fc20ed00fc21656911e972facb03454663a0/20ed00fc20ed00fc2161584460810e9dbdc043d5a8%2F20ed00fc20ed00fc2161008417b4b1565d4f425a9a0%2F20ed00fc20ed00fc2161008417b4b1565d4f425a9a4",
+ "Uri" : "https://REDACTED.file.core.windows.net/20ed00fc20ed00fc26637377a30f9f2883ed4393af/20ed00fc20ed00fc26633926f6385796ba7b480fb2%2F20ed00fc20ed00fc266623975cf491ffaeec4cbfa90%2F20ed00fc20ed00fc266623975cf491ffaeec4cbfa94",
"Headers" : {
- "x-ms-version" : "2020-06-12",
- "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)",
- "x-ms-client-request-id" : "c3587509-1299-4a13-b662-d2b3b3751dbd"
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "e32e75d5-5da2-4432-ae8a-77320be6bc01"
},
"Response" : {
- "content-length" : "0",
- "x-ms-version" : "2020-06-12",
- "x-ms-file-permission-key" : "17737392480967489306*6811422022089678740",
- "x-ms-file-id" : "13835075647468208128",
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "11529285414812647424",
"Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
- "x-ms-file-creation-time" : "2021-05-05T20:19:41.9387393Z",
- "Last-Modified" : "Wed, 05 May 2021 20:19:41 GMT",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.7124911Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
"retry-after" : "0",
"StatusCode" : "201",
"x-ms-request-server-encrypted" : "true",
- "Date" : "Wed, 05 May 2021 20:19:41 GMT",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
"x-ms-file-attributes" : "Archive",
- "x-ms-file-change-time" : "2021-05-05T20:19:41.9387393Z",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.7124911Z",
"x-ms-file-parent-id" : "13835093239654252544",
- "eTag" : "0x8D910031DBB2A01",
- "x-ms-request-id" : "03a9d7bf-001a-0004-12eb-4147b6000000",
- "x-ms-client-request-id" : "c3587509-1299-4a13-b662-d2b3b3751dbd",
- "x-ms-file-last-write-time" : "2021-05-05T20:19:41.9387393Z"
+ "eTag" : "0x8D92791D16F89AF",
+ "x-ms-request-id" : "0c0bd3ae-001a-0007-0f7a-59dd0f000000",
+ "x-ms-client-request-id" : "e32e75d5-5da2-4432-ae8a-77320be6bc01",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.7124911Z"
},
"Exception" : null
}, {
"Method" : "PUT",
- "Uri" : "https://REDACTED.file.core.windows.net/20ed00fc20ed00fc21656911e972facb03454663a0/20ed00fc20ed00fc2161584460810e9dbdc043d5a8%2F20ed00fc20ed00fc2161008417b4b1565d4f425a9a1?restype=directory",
+ "Uri" : "https://REDACTED.file.core.windows.net/20ed00fc20ed00fc26637377a30f9f2883ed4393af/20ed00fc20ed00fc26633926f6385796ba7b480fb2%2F20ed00fc20ed00fc266623975cf491ffaeec4cbfa91?restype=directory",
"Headers" : {
- "x-ms-version" : "2020-06-12",
- "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)",
- "x-ms-client-request-id" : "1f5cef05-05d1-41bb-a406-2c469301503e"
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "1fecc47d-2698-4fd0-b8cd-a3e1fcfe745c"
},
"Response" : {
- "content-length" : "0",
- "x-ms-version" : "2020-06-12",
- "x-ms-file-permission-key" : "3917056552249722909*6811422022089678740",
- "x-ms-file-id" : "13835146016212385792",
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "2663978480635205383*5486365400479318158",
+ "x-ms-file-id" : "13835075647468208128",
"Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
- "x-ms-file-creation-time" : "2021-05-05T20:19:42.1168660Z",
- "Last-Modified" : "Wed, 05 May 2021 20:19:42 GMT",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.8094354Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
"retry-after" : "0",
"StatusCode" : "201",
"x-ms-request-server-encrypted" : "true",
- "Date" : "Wed, 05 May 2021 20:19:41 GMT",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
"x-ms-file-attributes" : "Directory",
- "x-ms-file-change-time" : "2021-05-05T20:19:42.1168660Z",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.8094354Z",
"x-ms-file-parent-id" : "13835128424026341376",
- "eTag" : "0x8D910031DD65814",
- "x-ms-request-id" : "c7637764-b01a-0011-21eb-415005000000",
- "x-ms-client-request-id" : "1f5cef05-05d1-41bb-a406-2c469301503e",
- "x-ms-file-last-write-time" : "2021-05-05T20:19:42.1168660Z"
+ "eTag" : "0x8D92791D17E5492",
+ "x-ms-request-id" : "38a9363a-d01a-002c-0b7a-592fd5000000",
+ "x-ms-client-request-id" : "1fecc47d-2698-4fd0-b8cd-a3e1fcfe745c",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.8094354Z"
},
"Exception" : null
}, {
"Method" : "PUT",
- "Uri" : "https://REDACTED.file.core.windows.net/20ed00fc20ed00fc21656911e972facb03454663a0/20ed00fc20ed00fc2161584460810e9dbdc043d5a8%2F20ed00fc20ed00fc2161008417b4b1565d4f425a9a1%2F20ed00fc20ed00fc2161008417b4b1565d4f425a9a5",
+ "Uri" : "https://REDACTED.file.core.windows.net/20ed00fc20ed00fc26637377a30f9f2883ed4393af/20ed00fc20ed00fc26633926f6385796ba7b480fb2%2F20ed00fc20ed00fc266623975cf491ffaeec4cbfa91%2F20ed00fc20ed00fc266623975cf491ffaeec4cbfa95",
"Headers" : {
- "x-ms-version" : "2020-06-12",
- "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)",
- "x-ms-client-request-id" : "1e7e8e2b-2e02-4264-868a-b0e0658d1819"
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "17b6d354-6861-47e7-a097-1e539bce015a"
},
"Response" : {
- "content-length" : "0",
- "x-ms-version" : "2020-06-12",
- "x-ms-file-permission-key" : "17737392480967489306*6811422022089678740",
- "x-ms-file-id" : "13835110831840296960",
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "13835146016212385792",
"Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
- "x-ms-file-creation-time" : "2021-05-05T20:19:42.2779807Z",
- "Last-Modified" : "Wed, 05 May 2021 20:19:42 GMT",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.9383613Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
"retry-after" : "0",
"StatusCode" : "201",
"x-ms-request-server-encrypted" : "true",
- "Date" : "Wed, 05 May 2021 20:19:41 GMT",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
"x-ms-file-attributes" : "Archive",
- "x-ms-file-change-time" : "2021-05-05T20:19:42.2779807Z",
- "x-ms-file-parent-id" : "13835146016212385792",
- "eTag" : "0x8D910031DEEED9F",
- "x-ms-request-id" : "dfc614a9-c01a-0046-5eeb-41fe36000000",
- "x-ms-client-request-id" : "1e7e8e2b-2e02-4264-868a-b0e0658d1819",
- "x-ms-file-last-write-time" : "2021-05-05T20:19:42.2779807Z"
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.9383613Z",
+ "x-ms-file-parent-id" : "13835075647468208128",
+ "eTag" : "0x8D92791D19200BD",
+ "x-ms-request-id" : "d121b8de-401a-0021-4c7a-59bb8d000000",
+ "x-ms-client-request-id" : "17b6d354-6861-47e7-a097-1e539bce015a",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.9383613Z"
},
"Exception" : null
}, {
"Method" : "PUT",
- "Uri" : "https://REDACTED.file.core.windows.net/20ed00fc20ed00fc21656911e972facb03454663a0/20ed00fc20ed00fc2161584460810e9dbdc043d5a8%2F20ed00fc20ed00fc2161008417b4b1565d4f425a9a1%2F20ed00fc20ed00fc2161008417b4b1565d4f425a9a6",
+ "Uri" : "https://REDACTED.file.core.windows.net/20ed00fc20ed00fc26637377a30f9f2883ed4393af/20ed00fc20ed00fc26633926f6385796ba7b480fb2%2F20ed00fc20ed00fc266623975cf491ffaeec4cbfa91%2F20ed00fc20ed00fc266623975cf491ffaeec4cbfa96",
"Headers" : {
- "x-ms-version" : "2020-06-12",
- "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)",
- "x-ms-client-request-id" : "e7e5ffd0-b611-4ba7-8d3c-895e8365ddd3"
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "963783fe-1ba5-4ced-9198-b7fef976bc49"
},
"Response" : {
- "content-length" : "0",
- "x-ms-version" : "2020-06-12",
- "x-ms-file-permission-key" : "17737392480967489306*6811422022089678740",
- "x-ms-file-id" : "13835181200584474624",
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "11529320599184736256",
"Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
- "x-ms-file-creation-time" : "2021-05-05T20:19:42.3760504Z",
- "Last-Modified" : "Wed, 05 May 2021 20:19:42 GMT",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:09.0512962Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:09 GMT",
"retry-after" : "0",
"StatusCode" : "201",
"x-ms-request-server-encrypted" : "true",
- "Date" : "Wed, 05 May 2021 20:19:42 GMT",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
"x-ms-file-attributes" : "Archive",
- "x-ms-file-change-time" : "2021-05-05T20:19:42.3760504Z",
- "x-ms-file-parent-id" : "13835146016212385792",
- "eTag" : "0x8D910031DFDE478",
- "x-ms-request-id" : "edeb58b7-d01a-0038-52eb-416e71000000",
- "x-ms-client-request-id" : "e7e5ffd0-b611-4ba7-8d3c-895e8365ddd3",
- "x-ms-file-last-write-time" : "2021-05-05T20:19:42.3760504Z"
+ "x-ms-file-change-time" : "2021-06-04T19:49:09.0512962Z",
+ "x-ms-file-parent-id" : "13835075647468208128",
+ "eTag" : "0x8D92791D1A33C42",
+ "x-ms-request-id" : "c6d2de99-501a-001c-327a-59e384000000",
+ "x-ms-client-request-id" : "963783fe-1ba5-4ced-9198-b7fef976bc49",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:09.0512962Z"
},
"Exception" : null
}, {
"Method" : "PUT",
- "Uri" : "https://REDACTED.file.core.windows.net/20ed00fc20ed00fc21656911e972facb03454663a0/20ed00fc20ed00fc2161584460810e9dbdc043d5a8%2F20ed00fc20ed00fc2161008417b4b1565d4f425a9a2",
+ "Uri" : "https://REDACTED.file.core.windows.net/20ed00fc20ed00fc26637377a30f9f2883ed4393af/20ed00fc20ed00fc26633926f6385796ba7b480fb2%2F20ed00fc20ed00fc266623975cf491ffaeec4cbfa92",
"Headers" : {
- "x-ms-version" : "2020-06-12",
- "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)",
- "x-ms-client-request-id" : "e1b27b35-fc3f-4033-99e3-c018a807b3a7"
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "4cfe6701-ca64-4db2-a770-8bed99f84a0a"
},
"Response" : {
- "content-length" : "0",
- "x-ms-version" : "2020-06-12",
- "x-ms-file-permission-key" : "17737392480967489306*6811422022089678740",
- "x-ms-file-id" : "13835066851375185920",
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "13835110831840296960",
"Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
- "x-ms-file-creation-time" : "2021-05-05T20:19:42.4811244Z",
- "Last-Modified" : "Wed, 05 May 2021 20:19:42 GMT",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:09.1392455Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:09 GMT",
"retry-after" : "0",
"StatusCode" : "201",
"x-ms-request-server-encrypted" : "true",
- "Date" : "Wed, 05 May 2021 20:19:42 GMT",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
"x-ms-file-attributes" : "Archive",
- "x-ms-file-change-time" : "2021-05-05T20:19:42.4811244Z",
+ "x-ms-file-change-time" : "2021-06-04T19:49:09.1392455Z",
"x-ms-file-parent-id" : "13835128424026341376",
- "eTag" : "0x8D910031E0DECEC",
- "x-ms-request-id" : "d97a4b21-801a-0078-55eb-416949000000",
- "x-ms-client-request-id" : "e1b27b35-fc3f-4033-99e3-c018a807b3a7",
- "x-ms-file-last-write-time" : "2021-05-05T20:19:42.4811244Z"
+ "eTag" : "0x8D92791D1B0A7C7",
+ "x-ms-request-id" : "5079ffee-a01a-0005-747a-59e2e0000000",
+ "x-ms-client-request-id" : "4cfe6701-ca64-4db2-a770-8bed99f84a0a",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:09.1392455Z"
},
"Exception" : null
}, {
"Method" : "GET",
- "Uri" : "https://REDACTED.file.core.windows.net/20ed00fc20ed00fc21656911e972facb03454663a0/20ed00fc20ed00fc2161584460810e9dbdc043d5a8?restype=directory&comp=list&prefix=20ed00fc&maxresults=1",
+ "Uri" : "https://REDACTED.file.core.windows.net/20ed00fc20ed00fc26637377a30f9f2883ed4393af/20ed00fc20ed00fc26633926f6385796ba7b480fb2?restype=directory&comp=list&prefix=20ed00fc&maxresults=1",
"Headers" : {
- "x-ms-version" : "2020-06-12",
- "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)",
- "x-ms-client-request-id" : "1e4a35ee-2413-4feb-bf15-5d828befaedb"
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "6061ce9c-7411-432a-be12-a12bbcf6d437"
},
"Response" : {
"Transfer-Encoding" : "chunked",
- "x-ms-version" : "2020-06-12",
+ "x-ms-version" : "2020-10-02",
"Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
"retry-after" : "0",
"StatusCode" : "200",
- "x-ms-request-id" : "081e2afb-501a-006b-7aeb-414d45000000",
- "Body" : "20ed00fc120ed00fc20ed00fc2161008417b4b1565d4f425a9a01!60!MjBlZDAwZmMyMGVkMDBmYzIxNjEwMDg0MTdiNGIxNTY1ZDRmNDI1YTlhMQ--",
- "x-ms-client-request-id" : "1e4a35ee-2413-4feb-bf15-5d828befaedb",
- "Date" : "Wed, 05 May 2021 20:19:42 GMT",
+ "x-ms-request-id" : "38a93643-d01a-002c-117a-592fd5000000",
+ "Body" : "20ed00fc11383512842402634137620ed00fc20ed00fc266623975cf491ffaeec4cbfa90138350932396542525441!60!MjBlZDAwZmMyMGVkMDBmYzI2NjYyMzk3NWNmNDkxZmZhZWVjNGNiZmE5MQ--",
+ "x-ms-client-request-id" : "6061ce9c-7411-432a-be12-a12bbcf6d437",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
"Content-Type" : "application/xml"
},
"Exception" : null
}, {
"Method" : "GET",
- "Uri" : "https://REDACTED.file.core.windows.net/20ed00fc20ed00fc21656911e972facb03454663a0/20ed00fc20ed00fc2161584460810e9dbdc043d5a8?restype=directory&comp=list&prefix=20ed00fc&marker=1%2160%21MjBlZDAwZmMyMGVkMDBmYzIxNjEwMDg0MTdiNGIxNTY1ZDRmNDI1YTlhMQ--&maxresults=1",
+ "Uri" : "https://REDACTED.file.core.windows.net/20ed00fc20ed00fc26637377a30f9f2883ed4393af/20ed00fc20ed00fc26633926f6385796ba7b480fb2?restype=directory&comp=list&prefix=20ed00fc&marker=1%2160%21MjBlZDAwZmMyMGVkMDBmYzI2NjYyMzk3NWNmNDkxZmZhZWVjNGNiZmE5MQ--&maxresults=1",
"Headers" : {
- "x-ms-version" : "2020-06-12",
- "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)",
- "x-ms-client-request-id" : "dd1cfbbd-c054-414b-a0cd-8ebb368f3247"
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "0f8fabca-e46e-4d26-9d3c-c10cc4d62250"
},
"Response" : {
"Transfer-Encoding" : "chunked",
- "x-ms-version" : "2020-06-12",
+ "x-ms-version" : "2020-10-02",
"Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
"retry-after" : "0",
"StatusCode" : "200",
- "x-ms-request-id" : "03a9d7c7-001a-0004-17eb-4147b6000000",
- "Body" : "20ed00fc1!60!MjBlZDAwZmMyMGVkMDBmYzIxNjEwMDg0MTdiNGIxNTY1ZDRmNDI1YTlhMQ--120ed00fc20ed00fc2161008417b4b1565d4f425a9a11!60!MjBlZDAwZmMyMGVkMDBmYzIxNjEwMDg0MTdiNGIxNTY1ZDRmNDI1YTlhMg--",
- "x-ms-client-request-id" : "dd1cfbbd-c054-414b-a0cd-8ebb368f3247",
- "Date" : "Wed, 05 May 2021 20:19:42 GMT",
+ "x-ms-request-id" : "38a93644-d01a-002c-127a-592fd5000000",
+ "Body" : "20ed00fc1!60!MjBlZDAwZmMyMGVkMDBmYzI2NjYyMzk3NWNmNDkxZmZhZWVjNGNiZmE5MQ--11383512842402634137620ed00fc20ed00fc266623975cf491ffaeec4cbfa91138350756474682081281!60!MjBlZDAwZmMyMGVkMDBmYzI2NjYyMzk3NWNmNDkxZmZhZWVjNGNiZmE5Mg--",
+ "x-ms-client-request-id" : "0f8fabca-e46e-4d26-9d3c-c10cc4d62250",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
"Content-Type" : "application/xml"
},
"Exception" : null
}, {
"Method" : "GET",
- "Uri" : "https://REDACTED.file.core.windows.net/20ed00fc20ed00fc21656911e972facb03454663a0/20ed00fc20ed00fc2161584460810e9dbdc043d5a8?restype=directory&comp=list&prefix=20ed00fc&marker=1%2160%21MjBlZDAwZmMyMGVkMDBmYzIxNjEwMDg0MTdiNGIxNTY1ZDRmNDI1YTlhMg--&maxresults=1",
+ "Uri" : "https://REDACTED.file.core.windows.net/20ed00fc20ed00fc26637377a30f9f2883ed4393af/20ed00fc20ed00fc26633926f6385796ba7b480fb2?restype=directory&comp=list&prefix=20ed00fc&marker=1%2160%21MjBlZDAwZmMyMGVkMDBmYzI2NjYyMzk3NWNmNDkxZmZhZWVjNGNiZmE5Mg--&maxresults=1",
"Headers" : {
- "x-ms-version" : "2020-06-12",
- "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)",
- "x-ms-client-request-id" : "87d0110d-2975-483a-b17e-3fe03c467d10"
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "3d3ccb0d-ba44-4385-8dce-b671c503c42c"
},
"Response" : {
"Transfer-Encoding" : "chunked",
- "x-ms-version" : "2020-06-12",
+ "x-ms-version" : "2020-10-02",
"Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
"retry-after" : "0",
"StatusCode" : "200",
- "x-ms-request-id" : "8b065725-b01a-0001-71eb-41956d000000",
- "Body" : "20ed00fc1!60!MjBlZDAwZmMyMGVkMDBmYzIxNjEwMDg0MTdiNGIxNTY1ZDRmNDI1YTlhMg--120ed00fc20ed00fc2161008417b4b1565d4f425a9a21024",
- "x-ms-client-request-id" : "87d0110d-2975-483a-b17e-3fe03c467d10",
- "Date" : "Wed, 05 May 2021 20:19:42 GMT",
+ "x-ms-request-id" : "38a93645-d01a-002c-137a-592fd5000000",
+ "Body" : "20ed00fc1!60!MjBlZDAwZmMyMGVkMDBmYzI2NjYyMzk3NWNmNDkxZmZhZWVjNGNiZmE5Mg--11383512842402634137620ed00fc20ed00fc266623975cf491ffaeec4cbfa92138351108318402969601024",
+ "x-ms-client-request-id" : "3d3ccb0d-ba44-4385-8dce-b671c503c42c",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
"Content-Type" : "application/xml"
},
"Exception" : null
- }, {
- "Method" : "GET",
- "Uri" : "https://REDACTED.file.core.windows.net?comp=list&prefix=20ed00fc&include=",
- "Headers" : {
- "x-ms-version" : "2020-06-12",
- "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)",
- "x-ms-client-request-id" : "c8f23c5a-0df5-4bc4-a364-4cd37afb30f0"
- },
- "Response" : {
- "Transfer-Encoding" : "chunked",
- "x-ms-version" : "2020-06-12",
- "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
- "retry-after" : "0",
- "StatusCode" : "200",
- "x-ms-request-id" : "9ef28ef8-901a-0064-22eb-413b29000000",
- "Body" : "20ed00fc20ed00fc20ed00fc21656911e972facb03454663a0Wed, 05 May 2021 20:19:41 GMT\"0x8D910031D6F417F\"unlockedavailable5120TransactionOptimizedWed, 05 May 2021 20:19:41 GMT$account-encryption-keyfalse",
- "x-ms-client-request-id" : "c8f23c5a-0df5-4bc4-a364-4cd37afb30f0",
- "Date" : "Wed, 05 May 2021 20:19:42 GMT",
- "Content-Type" : "application/xml"
- },
- "Exception" : null
- }, {
- "Method" : "DELETE",
- "Uri" : "https://REDACTED.file.core.windows.net/20ed00fc20ed00fc21656911e972facb03454663a0?restype=share",
- "Headers" : {
- "x-ms-version" : "2020-06-12",
- "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)",
- "x-ms-client-request-id" : "5b9a2585-7915-4e81-830b-2f7567e831be"
- },
- "Response" : {
- "content-length" : "0",
- "x-ms-version" : "2020-06-12",
- "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
- "retry-after" : "0",
- "StatusCode" : "202",
- "x-ms-request-id" : "4685f244-901a-0016-70eb-413c66000000",
- "x-ms-client-request-id" : "5b9a2585-7915-4e81-830b-2f7567e831be",
- "Date" : "Wed, 05 May 2021 20:19:42 GMT"
- },
- "Exception" : null
} ],
- "variables" : [ "20ed00fc20ed00fc21656911e972facb03454663a0", "20ed00fc20ed00fc2161584460810e9dbdc043d5a8", "20ed00fc20ed00fc2161008417b4b1565d4f425a9a" ]
+ "variables" : [ "20ed00fc20ed00fc26637377a30f9f2883ed4393af", "20ed00fc20ed00fc26633926f6385796ba7b480fb2", "20ed00fc20ed00fc266623975cf491ffaeec4cbfa9" ]
}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsListFilesAndDirectoriesArgs[2].json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsListFilesAndDirectoriesArgs[2].json
index 50d41cd74b85..5cbff171ab36 100644
--- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsListFilesAndDirectoriesArgs[2].json
+++ b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsListFilesAndDirectoriesArgs[2].json
@@ -1,318 +1,278 @@
{
"networkCallRecords" : [ {
"Method" : "PUT",
- "Uri" : "https://REDACTED.file.core.windows.net/0bc0533f0bc0533f4ea72257916a543c66ff4570bf?restype=share",
+ "Uri" : "https://REDACTED.file.core.windows.net/0bc0533f0bc0533f457938379b699a9bd02f4ecfb1?restype=share",
"Headers" : {
- "x-ms-version" : "2020-06-12",
- "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)",
- "x-ms-client-request-id" : "ce5f2d24-d4c3-4241-a748-83c0d46fd7a6"
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "73650229-c70b-4bd1-904b-1b2e1755e33a"
},
"Response" : {
- "content-length" : "0",
- "x-ms-version" : "2020-06-12",
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
"Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
- "eTag" : "0x8D910031E043AAE",
- "Last-Modified" : "Wed, 05 May 2021 20:19:42 GMT",
+ "eTag" : "0x8D92791D1062246",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
"retry-after" : "0",
"StatusCode" : "201",
- "x-ms-request-id" : "a0ad10d9-f01a-004d-32eb-41055d000000",
- "x-ms-client-request-id" : "ce5f2d24-d4c3-4241-a748-83c0d46fd7a6",
- "Date" : "Wed, 05 May 2021 20:19:42 GMT"
+ "x-ms-request-id" : "5079ffda-a01a-0005-697a-59e2e0000000",
+ "x-ms-client-request-id" : "73650229-c70b-4bd1-904b-1b2e1755e33a",
+ "Date" : "Fri, 04 Jun 2021 19:49:07 GMT"
},
"Exception" : null
}, {
"Method" : "PUT",
- "Uri" : "https://REDACTED.file.core.windows.net/0bc0533f0bc0533f4ea72257916a543c66ff4570bf/0bc0533f0bc0533f4ea684886e542d27852f4343ad?restype=directory",
+ "Uri" : "https://REDACTED.file.core.windows.net/0bc0533f0bc0533f457938379b699a9bd02f4ecfb1/0bc0533f0bc0533f45737623425cb4ce42f842a7a9?restype=directory",
"Headers" : {
- "x-ms-version" : "2020-06-12",
- "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)",
- "x-ms-client-request-id" : "38194ebd-7eed-45ad-833e-e4f92e33f1c4"
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "c4d180e3-c938-4122-9d72-5bc8fd193601"
},
"Response" : {
- "content-length" : "0",
- "x-ms-version" : "2020-06-12",
- "x-ms-file-permission-key" : "3917056552249722909*6811422022089678740",
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "2663978480635205383*5486365400479318158",
"x-ms-file-id" : "13835128424026341376",
"Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
- "x-ms-file-creation-time" : "2021-05-05T20:19:42.5771936Z",
- "Last-Modified" : "Wed, 05 May 2021 20:19:42 GMT",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.3536977Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
"retry-after" : "0",
"StatusCode" : "201",
"x-ms-request-server-encrypted" : "true",
- "Date" : "Wed, 05 May 2021 20:19:42 GMT",
+ "Date" : "Fri, 04 Jun 2021 19:49:07 GMT",
"x-ms-file-attributes" : "Directory",
- "x-ms-file-change-time" : "2021-05-05T20:19:42.5771936Z",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.3536977Z",
"x-ms-file-parent-id" : "0",
- "eTag" : "0x8D910031E1C95A0",
- "x-ms-request-id" : "259141d8-201a-0061-32eb-41e9f2000000",
- "x-ms-client-request-id" : "38194ebd-7eed-45ad-833e-e4f92e33f1c4",
- "x-ms-file-last-write-time" : "2021-05-05T20:19:42.5771936Z"
+ "eTag" : "0x8D92791D138CA51",
+ "x-ms-request-id" : "f92279b1-701a-002e-147a-59103a000000",
+ "x-ms-client-request-id" : "c4d180e3-c938-4122-9d72-5bc8fd193601",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.3536977Z"
},
"Exception" : null
}, {
"Method" : "PUT",
- "Uri" : "https://REDACTED.file.core.windows.net/0bc0533f0bc0533f4ea72257916a543c66ff4570bf/0bc0533f0bc0533f4ea684886e542d27852f4343ad%2F0bc0533f0bc0533f4ea88442e7579a09549f45b7b20?restype=directory",
+ "Uri" : "https://REDACTED.file.core.windows.net/0bc0533f0bc0533f457938379b699a9bd02f4ecfb1/0bc0533f0bc0533f45737623425cb4ce42f842a7a9%2F0bc0533f0bc0533f45722974194ca2ef6da741d6850?restype=directory",
"Headers" : {
- "x-ms-version" : "2020-06-12",
- "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)",
- "x-ms-client-request-id" : "21f5ff77-964d-4a31-9b3d-a2182cdc64d3"
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "9c45675d-7254-4050-8049-9447898cbf29"
},
"Response" : {
- "content-length" : "0",
- "x-ms-version" : "2020-06-12",
- "x-ms-file-permission-key" : "3917056552249722909*6811422022089678740",
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "2663978480635205383*5486365400479318158",
"x-ms-file-id" : "13835093239654252544",
"Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
- "x-ms-file-creation-time" : "2021-05-05T20:19:42.6692586Z",
- "Last-Modified" : "Wed, 05 May 2021 20:19:42 GMT",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.4546394Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
"retry-after" : "0",
"StatusCode" : "201",
"x-ms-request-server-encrypted" : "true",
- "Date" : "Wed, 05 May 2021 20:19:42 GMT",
+ "Date" : "Fri, 04 Jun 2021 19:49:07 GMT",
"x-ms-file-attributes" : "Directory",
- "x-ms-file-change-time" : "2021-05-05T20:19:42.6692586Z",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.4546394Z",
"x-ms-file-parent-id" : "13835128424026341376",
- "eTag" : "0x8D910031E2AA1EA",
- "x-ms-request-id" : "edeb58bc-d01a-0038-54eb-416e71000000",
- "x-ms-client-request-id" : "21f5ff77-964d-4a31-9b3d-a2182cdc64d3",
- "x-ms-file-last-write-time" : "2021-05-05T20:19:42.6692586Z"
+ "eTag" : "0x8D92791D148315A",
+ "x-ms-request-id" : "38a93630-d01a-002c-047a-592fd5000000",
+ "x-ms-client-request-id" : "9c45675d-7254-4050-8049-9447898cbf29",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.4546394Z"
},
"Exception" : null
}, {
"Method" : "PUT",
- "Uri" : "https://REDACTED.file.core.windows.net/0bc0533f0bc0533f4ea72257916a543c66ff4570bf/0bc0533f0bc0533f4ea684886e542d27852f4343ad%2F0bc0533f0bc0533f4ea88442e7579a09549f45b7b20%2F0bc0533f0bc0533f4ea88442e7579a09549f45b7b23",
+ "Uri" : "https://REDACTED.file.core.windows.net/0bc0533f0bc0533f457938379b699a9bd02f4ecfb1/0bc0533f0bc0533f45737623425cb4ce42f842a7a9%2F0bc0533f0bc0533f45722974194ca2ef6da741d6850%2F0bc0533f0bc0533f45722974194ca2ef6da741d6853",
"Headers" : {
- "x-ms-version" : "2020-06-12",
- "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)",
- "x-ms-client-request-id" : "769887df-49b9-44a2-a3a6-260646c8786b"
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "e3090423-4e0f-41d5-b906-e49873bdc006"
},
"Response" : {
- "content-length" : "0",
- "x-ms-version" : "2020-06-12",
- "x-ms-file-permission-key" : "17737392480967489306*6811422022089678740",
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
"x-ms-file-id" : "13835163608398430208",
"Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
- "x-ms-file-creation-time" : "2021-05-05T20:19:42.7533184Z",
- "Last-Modified" : "Wed, 05 May 2021 20:19:42 GMT",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.5765696Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
"retry-after" : "0",
"StatusCode" : "201",
"x-ms-request-server-encrypted" : "true",
- "Date" : "Wed, 05 May 2021 20:19:42 GMT",
+ "Date" : "Fri, 04 Jun 2021 19:49:07 GMT",
"x-ms-file-attributes" : "Archive",
- "x-ms-file-change-time" : "2021-05-05T20:19:42.7533184Z",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.5765696Z",
"x-ms-file-parent-id" : "13835093239654252544",
- "eTag" : "0x8D910031E377580",
- "x-ms-request-id" : "5fe79b1c-001a-0066-55eb-418591000000",
- "x-ms-client-request-id" : "769887df-49b9-44a2-a3a6-260646c8786b",
- "x-ms-file-last-write-time" : "2021-05-05T20:19:42.7533184Z"
+ "eTag" : "0x8D92791D15ACC40",
+ "x-ms-request-id" : "d121b8d4-401a-0021-457a-59bb8d000000",
+ "x-ms-client-request-id" : "e3090423-4e0f-41d5-b906-e49873bdc006",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.5765696Z"
},
"Exception" : null
}, {
"Method" : "PUT",
- "Uri" : "https://REDACTED.file.core.windows.net/0bc0533f0bc0533f4ea72257916a543c66ff4570bf/0bc0533f0bc0533f4ea684886e542d27852f4343ad%2F0bc0533f0bc0533f4ea88442e7579a09549f45b7b20%2F0bc0533f0bc0533f4ea88442e7579a09549f45b7b24",
+ "Uri" : "https://REDACTED.file.core.windows.net/0bc0533f0bc0533f457938379b699a9bd02f4ecfb1/0bc0533f0bc0533f45737623425cb4ce42f842a7a9%2F0bc0533f0bc0533f45722974194ca2ef6da741d6850%2F0bc0533f0bc0533f45722974194ca2ef6da741d6854",
"Headers" : {
- "x-ms-version" : "2020-06-12",
- "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)",
- "x-ms-client-request-id" : "9c7965d8-51b5-493d-9c30-41c69a11bf00"
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "90b0598b-94f1-456b-aa2d-bf3f4491c878"
},
"Response" : {
- "content-length" : "0",
- "x-ms-version" : "2020-06-12",
- "x-ms-file-permission-key" : "17737392480967489306*6811422022089678740",
- "x-ms-file-id" : "13835075647468208128",
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "11529285414812647424",
"Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
- "x-ms-file-creation-time" : "2021-05-05T20:19:42.8323748Z",
- "Last-Modified" : "Wed, 05 May 2021 20:19:42 GMT",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.6994986Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
"retry-after" : "0",
"StatusCode" : "201",
"x-ms-request-server-encrypted" : "true",
- "Date" : "Wed, 05 May 2021 20:19:42 GMT",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
"x-ms-file-attributes" : "Archive",
- "x-ms-file-change-time" : "2021-05-05T20:19:42.8323748Z",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.6994986Z",
"x-ms-file-parent-id" : "13835093239654252544",
- "eTag" : "0x8D910031E4385A4",
- "x-ms-request-id" : "6442f162-001a-0076-26eb-4140f9000000",
- "x-ms-client-request-id" : "9c7965d8-51b5-493d-9c30-41c69a11bf00",
- "x-ms-file-last-write-time" : "2021-05-05T20:19:42.8323748Z"
+ "eTag" : "0x8D92791D16D8E2A",
+ "x-ms-request-id" : "f92279bc-701a-002e-197a-59103a000000",
+ "x-ms-client-request-id" : "90b0598b-94f1-456b-aa2d-bf3f4491c878",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.6994986Z"
},
"Exception" : null
}, {
"Method" : "PUT",
- "Uri" : "https://REDACTED.file.core.windows.net/0bc0533f0bc0533f4ea72257916a543c66ff4570bf/0bc0533f0bc0533f4ea684886e542d27852f4343ad%2F0bc0533f0bc0533f4ea88442e7579a09549f45b7b21?restype=directory",
+ "Uri" : "https://REDACTED.file.core.windows.net/0bc0533f0bc0533f457938379b699a9bd02f4ecfb1/0bc0533f0bc0533f45737623425cb4ce42f842a7a9%2F0bc0533f0bc0533f45722974194ca2ef6da741d6851?restype=directory",
"Headers" : {
- "x-ms-version" : "2020-06-12",
- "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)",
- "x-ms-client-request-id" : "21df7269-9ada-479a-8cec-473741419e8f"
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "f659669e-81ac-4980-90d1-708c78fb5d8a"
},
"Response" : {
- "content-length" : "0",
- "x-ms-version" : "2020-06-12",
- "x-ms-file-permission-key" : "3917056552249722909*6811422022089678740",
- "x-ms-file-id" : "13835146016212385792",
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "2663978480635205383*5486365400479318158",
+ "x-ms-file-id" : "13835075647468208128",
"Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
- "x-ms-file-creation-time" : "2021-05-05T20:19:42.9134322Z",
- "Last-Modified" : "Wed, 05 May 2021 20:19:42 GMT",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.7954433Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
"retry-after" : "0",
"StatusCode" : "201",
"x-ms-request-server-encrypted" : "true",
- "Date" : "Wed, 05 May 2021 20:19:41 GMT",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
"x-ms-file-attributes" : "Directory",
- "x-ms-file-change-time" : "2021-05-05T20:19:42.9134322Z",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.7954433Z",
"x-ms-file-parent-id" : "13835128424026341376",
- "eTag" : "0x8D910031E4FE3F2",
- "x-ms-request-id" : "dfc614b1-c01a-0046-63eb-41fe36000000",
- "x-ms-client-request-id" : "21df7269-9ada-479a-8cec-473741419e8f",
- "x-ms-file-last-write-time" : "2021-05-05T20:19:42.9134322Z"
+ "eTag" : "0x8D92791D17C3201",
+ "x-ms-request-id" : "0c0bd3af-001a-0007-107a-59dd0f000000",
+ "x-ms-client-request-id" : "f659669e-81ac-4980-90d1-708c78fb5d8a",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.7954433Z"
},
"Exception" : null
}, {
"Method" : "PUT",
- "Uri" : "https://REDACTED.file.core.windows.net/0bc0533f0bc0533f4ea72257916a543c66ff4570bf/0bc0533f0bc0533f4ea684886e542d27852f4343ad%2F0bc0533f0bc0533f4ea88442e7579a09549f45b7b21%2F0bc0533f0bc0533f4ea88442e7579a09549f45b7b25",
+ "Uri" : "https://REDACTED.file.core.windows.net/0bc0533f0bc0533f457938379b699a9bd02f4ecfb1/0bc0533f0bc0533f45737623425cb4ce42f842a7a9%2F0bc0533f0bc0533f45722974194ca2ef6da741d6851%2F0bc0533f0bc0533f45722974194ca2ef6da741d6855",
"Headers" : {
- "x-ms-version" : "2020-06-12",
- "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)",
- "x-ms-client-request-id" : "ada949b5-19dc-40f6-ba95-982f47d9143f"
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "327b13a4-dcfd-457e-8497-7671d977a0d8"
},
"Response" : {
- "content-length" : "0",
- "x-ms-version" : "2020-06-12",
- "x-ms-file-permission-key" : "17737392480967489306*6811422022089678740",
- "x-ms-file-id" : "13835110831840296960",
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "11529250230440558592",
"Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
- "x-ms-file-creation-time" : "2021-05-05T20:19:43.0415228Z",
- "Last-Modified" : "Wed, 05 May 2021 20:19:43 GMT",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.8913882Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
"retry-after" : "0",
"StatusCode" : "201",
"x-ms-request-server-encrypted" : "true",
- "Date" : "Wed, 05 May 2021 20:19:42 GMT",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
"x-ms-file-attributes" : "Archive",
- "x-ms-file-change-time" : "2021-05-05T20:19:43.0415228Z",
- "x-ms-file-parent-id" : "13835146016212385792",
- "eTag" : "0x8D910031E636F7C",
- "x-ms-request-id" : "67e7048c-901a-004b-33eb-4136e2000000",
- "x-ms-client-request-id" : "ada949b5-19dc-40f6-ba95-982f47d9143f",
- "x-ms-file-last-write-time" : "2021-05-05T20:19:43.0415228Z"
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.8913882Z",
+ "x-ms-file-parent-id" : "13835075647468208128",
+ "eTag" : "0x8D92791D18AD5DA",
+ "x-ms-request-id" : "38a9363c-d01a-002c-0c7a-592fd5000000",
+ "x-ms-client-request-id" : "327b13a4-dcfd-457e-8497-7671d977a0d8",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.8913882Z"
},
"Exception" : null
}, {
"Method" : "PUT",
- "Uri" : "https://REDACTED.file.core.windows.net/0bc0533f0bc0533f4ea72257916a543c66ff4570bf/0bc0533f0bc0533f4ea684886e542d27852f4343ad%2F0bc0533f0bc0533f4ea88442e7579a09549f45b7b21%2F0bc0533f0bc0533f4ea88442e7579a09549f45b7b26",
+ "Uri" : "https://REDACTED.file.core.windows.net/0bc0533f0bc0533f457938379b699a9bd02f4ecfb1/0bc0533f0bc0533f45737623425cb4ce42f842a7a9%2F0bc0533f0bc0533f45722974194ca2ef6da741d6851%2F0bc0533f0bc0533f45722974194ca2ef6da741d6856",
"Headers" : {
- "x-ms-version" : "2020-06-12",
- "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)",
- "x-ms-client-request-id" : "fec80e51-5560-4aa6-98e0-83d67807f8f9"
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "ca6e458f-0c12-4d9a-80ca-6607cc39edb2"
},
"Response" : {
- "content-length" : "0",
- "x-ms-version" : "2020-06-12",
- "x-ms-file-permission-key" : "17737392480967489306*6811422022089678740",
- "x-ms-file-id" : "13835181200584474624",
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "13835146016212385792",
"Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
- "x-ms-file-creation-time" : "2021-05-05T20:19:43.1846243Z",
- "Last-Modified" : "Wed, 05 May 2021 20:19:43 GMT",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:09.0143175Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:09 GMT",
"retry-after" : "0",
"StatusCode" : "201",
"x-ms-request-server-encrypted" : "true",
- "Date" : "Wed, 05 May 2021 20:19:42 GMT",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
"x-ms-file-attributes" : "Archive",
- "x-ms-file-change-time" : "2021-05-05T20:19:43.1846243Z",
- "x-ms-file-parent-id" : "13835146016212385792",
- "eTag" : "0x8D910031E794563",
- "x-ms-request-id" : "4685f246-901a-0016-72eb-413c66000000",
- "x-ms-client-request-id" : "fec80e51-5560-4aa6-98e0-83d67807f8f9",
- "x-ms-file-last-write-time" : "2021-05-05T20:19:43.1846243Z"
+ "x-ms-file-change-time" : "2021-06-04T19:49:09.0143175Z",
+ "x-ms-file-parent-id" : "13835075647468208128",
+ "eTag" : "0x8D92791D19D97C7",
+ "x-ms-request-id" : "d9270195-d01a-0012-157a-59af7f000000",
+ "x-ms-client-request-id" : "ca6e458f-0c12-4d9a-80ca-6607cc39edb2",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:09.0143175Z"
},
"Exception" : null
}, {
"Method" : "PUT",
- "Uri" : "https://REDACTED.file.core.windows.net/0bc0533f0bc0533f4ea72257916a543c66ff4570bf/0bc0533f0bc0533f4ea684886e542d27852f4343ad%2F0bc0533f0bc0533f4ea88442e7579a09549f45b7b22",
+ "Uri" : "https://REDACTED.file.core.windows.net/0bc0533f0bc0533f457938379b699a9bd02f4ecfb1/0bc0533f0bc0533f45737623425cb4ce42f842a7a9%2F0bc0533f0bc0533f45722974194ca2ef6da741d6852",
"Headers" : {
- "x-ms-version" : "2020-06-12",
- "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)",
- "x-ms-client-request-id" : "11fd82af-93db-4d88-b52e-4561309e1cab"
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "6d1f0caa-748c-418d-a485-45c4675451c3"
},
"Response" : {
- "content-length" : "0",
- "x-ms-version" : "2020-06-12",
- "x-ms-file-permission-key" : "17737392480967489306*6811422022089678740",
- "x-ms-file-id" : "13835066851375185920",
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "16140971433240035328",
"Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
- "x-ms-file-creation-time" : "2021-05-05T20:19:43.2626797Z",
- "Last-Modified" : "Wed, 05 May 2021 20:19:43 GMT",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:09.1052654Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:09 GMT",
"retry-after" : "0",
"StatusCode" : "201",
"x-ms-request-server-encrypted" : "true",
- "Date" : "Wed, 05 May 2021 20:19:42 GMT",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
"x-ms-file-attributes" : "Archive",
- "x-ms-file-change-time" : "2021-05-05T20:19:43.2626797Z",
+ "x-ms-file-change-time" : "2021-06-04T19:49:09.1052654Z",
"x-ms-file-parent-id" : "13835128424026341376",
- "eTag" : "0x8D910031E852E6D",
- "x-ms-request-id" : "f2c5a75d-601a-004f-5beb-41bbe5000000",
- "x-ms-client-request-id" : "11fd82af-93db-4d88-b52e-4561309e1cab",
- "x-ms-file-last-write-time" : "2021-05-05T20:19:43.2626797Z"
+ "eTag" : "0x8D92791D1AB786E",
+ "x-ms-request-id" : "f92279c4-701a-002e-1e7a-59103a000000",
+ "x-ms-client-request-id" : "6d1f0caa-748c-418d-a485-45c4675451c3",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:09.1052654Z"
},
"Exception" : null
}, {
"Method" : "GET",
- "Uri" : "https://REDACTED.file.core.windows.net/0bc0533f0bc0533f4ea72257916a543c66ff4570bf/0bc0533f0bc0533f4ea684886e542d27852f4343ad?restype=directory&comp=list&prefix=0bc0533fnoOp&maxresults=3",
+ "Uri" : "https://REDACTED.file.core.windows.net/0bc0533f0bc0533f457938379b699a9bd02f4ecfb1/0bc0533f0bc0533f45737623425cb4ce42f842a7a9?restype=directory&comp=list&prefix=0bc0533fnoOp&maxresults=3",
"Headers" : {
- "x-ms-version" : "2020-06-12",
- "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)",
- "x-ms-client-request-id" : "e1a11134-3e9f-4593-b793-ad5c3713b62e"
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "d5d89f70-befa-4827-b21b-b46e0b9dd2a1"
},
"Response" : {
"Transfer-Encoding" : "chunked",
- "x-ms-version" : "2020-06-12",
+ "x-ms-version" : "2020-10-02",
"Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
"retry-after" : "0",
"StatusCode" : "200",
- "x-ms-request-id" : "d97a4b2d-801a-0078-5deb-416949000000",
- "Body" : "0bc0533fnoOp3",
- "x-ms-client-request-id" : "e1a11134-3e9f-4593-b793-ad5c3713b62e",
- "Date" : "Wed, 05 May 2021 20:19:42 GMT",
+ "x-ms-request-id" : "d121b8e6-401a-0021-537a-59bb8d000000",
+ "Body" : "0bc0533fnoOp313835128424026341376",
+ "x-ms-client-request-id" : "d5d89f70-befa-4827-b21b-b46e0b9dd2a1",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
"Content-Type" : "application/xml"
},
"Exception" : null
- }, {
- "Method" : "GET",
- "Uri" : "https://REDACTED.file.core.windows.net?comp=list&prefix=0bc0533f&include=",
- "Headers" : {
- "x-ms-version" : "2020-06-12",
- "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)",
- "x-ms-client-request-id" : "40ccc7c1-8e01-4676-afc4-daf55b4b9195"
- },
- "Response" : {
- "Transfer-Encoding" : "chunked",
- "x-ms-version" : "2020-06-12",
- "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
- "retry-after" : "0",
- "StatusCode" : "200",
- "x-ms-request-id" : "0eb6bd45-c01a-0024-7aeb-413c11000000",
- "Body" : "0bc0533f0bc0533f0bc0533f4ea72257916a543c66ff4570bfWed, 05 May 2021 20:19:42 GMT\"0x8D910031E043AAE\"unlockedavailable5120TransactionOptimizedWed, 05 May 2021 20:19:42 GMT$account-encryption-keyfalse",
- "x-ms-client-request-id" : "40ccc7c1-8e01-4676-afc4-daf55b4b9195",
- "Date" : "Wed, 05 May 2021 20:19:43 GMT",
- "Content-Type" : "application/xml"
- },
- "Exception" : null
- }, {
- "Method" : "DELETE",
- "Uri" : "https://REDACTED.file.core.windows.net/0bc0533f0bc0533f4ea72257916a543c66ff4570bf?restype=share",
- "Headers" : {
- "x-ms-version" : "2020-06-12",
- "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)",
- "x-ms-client-request-id" : "cb81d1bb-f07c-47c8-bdbe-094e38a5e608"
- },
- "Response" : {
- "content-length" : "0",
- "x-ms-version" : "2020-06-12",
- "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
- "retry-after" : "0",
- "StatusCode" : "202",
- "x-ms-request-id" : "6442f16c-001a-0076-2beb-4140f9000000",
- "x-ms-client-request-id" : "cb81d1bb-f07c-47c8-bdbe-094e38a5e608",
- "Date" : "Wed, 05 May 2021 20:19:42 GMT"
- },
- "Exception" : null
} ],
- "variables" : [ "0bc0533f0bc0533f4ea72257916a543c66ff4570bf", "0bc0533f0bc0533f4ea684886e542d27852f4343ad", "0bc0533f0bc0533f4ea88442e7579a09549f45b7b2" ]
+ "variables" : [ "0bc0533f0bc0533f457938379b699a9bd02f4ecfb1", "0bc0533f0bc0533f45737623425cb4ce42f842a7a9", "0bc0533f0bc0533f45722974194ca2ef6da741d685" ]
}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsListFilesAndDirectoriesArgs[3].json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsListFilesAndDirectoriesArgs[3].json
new file mode 100644
index 000000000000..7f4033ac3464
--- /dev/null
+++ b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsListFilesAndDirectoriesArgs[3].json
@@ -0,0 +1,278 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/12db627e12db627ef2c10015b5f027b9b8964b6fac?restype=share",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "a1a55c8d-7768-4917-b3a5-4a109fde572e"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D92791D104E67A",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "34fa9492-c01a-0030-517a-59b723000000",
+ "x-ms-client-request-id" : "a1a55c8d-7768-4917-b3a5-4a109fde572e",
+ "Date" : "Fri, 04 Jun 2021 19:49:07 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/12db627e12db627ef2c10015b5f027b9b8964b6fac/12db627e12db627ef2c71601b8f3a791ab2f4ac3ad?restype=directory",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "f35900e1-364b-4a7f-8405-90d2f0f23837"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "2663978480635205383*5486365400479318158",
+ "x-ms-file-id" : "13835128424026341376",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.3007283Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:07 GMT",
+ "x-ms-file-attributes" : "Directory",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.3007283Z",
+ "x-ms-file-parent-id" : "0",
+ "eTag" : "0x8D92791D130B533",
+ "x-ms-request-id" : "d121b8c6-401a-0021-3a7a-59bb8d000000",
+ "x-ms-client-request-id" : "f35900e1-364b-4a7f-8405-90d2f0f23837",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.3007283Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/12db627e12db627ef2c10015b5f027b9b8964b6fac/12db627e12db627ef2c71601b8f3a791ab2f4ac3ad%2F12db627e12db627ef2c76805384b22244e5c4d9ba70?restype=directory",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "29f237c4-c60d-4d00-b7f8-3072a09cf7d2"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "2663978480635205383*5486365400479318158",
+ "x-ms-file-id" : "13835093239654252544",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.4436461Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:07 GMT",
+ "x-ms-file-attributes" : "Directory",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.4436461Z",
+ "x-ms-file-parent-id" : "13835128424026341376",
+ "eTag" : "0x8D92791D14683ED",
+ "x-ms-request-id" : "5079ffe2-a01a-0005-6c7a-59e2e0000000",
+ "x-ms-client-request-id" : "29f237c4-c60d-4d00-b7f8-3072a09cf7d2",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.4436461Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/12db627e12db627ef2c10015b5f027b9b8964b6fac/12db627e12db627ef2c71601b8f3a791ab2f4ac3ad%2F12db627e12db627ef2c76805384b22244e5c4d9ba70%2F12db627e12db627ef2c76805384b22244e5c4d9ba73",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "8541a986-3f80-412e-a7e9-76aae9113ee3"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "13835163608398430208",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.5455874Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:07 GMT",
+ "x-ms-file-attributes" : "Archive",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.5455874Z",
+ "x-ms-file-parent-id" : "13835093239654252544",
+ "eTag" : "0x8D92791D1561202",
+ "x-ms-request-id" : "38a93633-d01a-002c-067a-592fd5000000",
+ "x-ms-client-request-id" : "8541a986-3f80-412e-a7e9-76aae9113ee3",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.5455874Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/12db627e12db627ef2c10015b5f027b9b8964b6fac/12db627e12db627ef2c71601b8f3a791ab2f4ac3ad%2F12db627e12db627ef2c76805384b22244e5c4d9ba70%2F12db627e12db627ef2c76805384b22244e5c4d9ba74",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "568f3520-f1ee-4fdf-9b18-582979782b0c"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "11529285414812647424",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.6655180Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:07 GMT",
+ "x-ms-file-attributes" : "Archive",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.6655180Z",
+ "x-ms-file-parent-id" : "13835093239654252544",
+ "eTag" : "0x8D92791D1685ECC",
+ "x-ms-request-id" : "d121b8d7-401a-0021-477a-59bb8d000000",
+ "x-ms-client-request-id" : "568f3520-f1ee-4fdf-9b18-582979782b0c",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.6655180Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/12db627e12db627ef2c10015b5f027b9b8964b6fac/12db627e12db627ef2c71601b8f3a791ab2f4ac3ad%2F12db627e12db627ef2c76805384b22244e5c4d9ba71?restype=directory",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "87ee59ec-e259-40be-abfa-1add0dbbb5c0"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "2663978480635205383*5486365400479318158",
+ "x-ms-file-id" : "13835075647468208128",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.7824507Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "x-ms-file-attributes" : "Directory",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.7824507Z",
+ "x-ms-file-parent-id" : "13835128424026341376",
+ "eTag" : "0x8D92791D17A367B",
+ "x-ms-request-id" : "f92279bd-701a-002e-1a7a-59103a000000",
+ "x-ms-client-request-id" : "87ee59ec-e259-40be-abfa-1add0dbbb5c0",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.7824507Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/12db627e12db627ef2c10015b5f027b9b8964b6fac/12db627e12db627ef2c71601b8f3a791ab2f4ac3ad%2F12db627e12db627ef2c76805384b22244e5c4d9ba71%2F12db627e12db627ef2c76805384b22244e5c4d9ba75",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "641bfbaf-bdb9-42db-832e-e57df8b4c1cb"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "13835146016212385792",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.8803945Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "x-ms-file-attributes" : "Archive",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.8803945Z",
+ "x-ms-file-parent-id" : "13835075647468208128",
+ "eTag" : "0x8D92791D1892869",
+ "x-ms-request-id" : "0c0bd3b1-001a-0007-117a-59dd0f000000",
+ "x-ms-client-request-id" : "641bfbaf-bdb9-42db-832e-e57df8b4c1cb",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.8803945Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/12db627e12db627ef2c10015b5f027b9b8964b6fac/12db627e12db627ef2c71601b8f3a791ab2f4ac3ad%2F12db627e12db627ef2c76805384b22244e5c4d9ba71%2F12db627e12db627ef2c76805384b22244e5c4d9ba76",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "b58bcb40-6938-44db-9a53-ec39be584984"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "11529320599184736256",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.9803374Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "x-ms-file-attributes" : "Archive",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.9803374Z",
+ "x-ms-file-parent-id" : "13835075647468208128",
+ "eTag" : "0x8D92791D198686E",
+ "x-ms-request-id" : "38a9363e-d01a-002c-0e7a-592fd5000000",
+ "x-ms-client-request-id" : "b58bcb40-6938-44db-9a53-ec39be584984",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.9803374Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/12db627e12db627ef2c10015b5f027b9b8964b6fac/12db627e12db627ef2c71601b8f3a791ab2f4ac3ad%2F12db627e12db627ef2c76805384b22244e5c4d9ba72",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "06402611-bfe6-4c80-b6fa-89be1d0dbfa4"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "13835110831840296960",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:09.0762817Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:09 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "x-ms-file-attributes" : "Archive",
+ "x-ms-file-change-time" : "2021-06-04T19:49:09.0762817Z",
+ "x-ms-file-parent-id" : "13835128424026341376",
+ "eTag" : "0x8D92791D1A70C41",
+ "x-ms-request-id" : "266798ac-501a-0003-5f7a-59a3d1000000",
+ "x-ms-client-request-id" : "06402611-bfe6-4c80-b6fa-89be1d0dbfa4",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:09.0762817Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "GET",
+ "Uri" : "https://REDACTED.file.core.windows.net/12db627e12db627ef2c10015b5f027b9b8964b6fac/12db627e12db627ef2c71601b8f3a791ab2f4ac3ad?restype=directory&comp=list&prefix=12db627e&include=Timestamps",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "faef36dd-9040-4dcf-bc1b-55a395885651"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-request-id" : "38a93640-d01a-002c-107a-592fd5000000",
+ "Body" : "12db627e1383512842402634137612db627e12db627ef2c76805384b22244e5c4d9ba70138350932396542525442021-06-04T19:49:08.4436461Z2021-06-04T19:49:08.4436461Z2021-06-04T19:49:08.4436461Z2021-06-04T19:49:08.4436461ZFri, 04 Jun 2021 19:49:08 GMT12db627e12db627ef2c76805384b22244e5c4d9ba71138350756474682081282021-06-04T19:49:08.7824507Z2021-06-04T19:49:08.7824507Z2021-06-04T19:49:08.7824507Z2021-06-04T19:49:08.7824507ZFri, 04 Jun 2021 19:49:08 GMT12db627e12db627ef2c76805384b22244e5c4d9ba721383511083184029696010242021-06-04T19:49:09.0762817Z2021-06-04T19:49:09.0762817Z2021-06-04T19:49:09.0762817Z2021-06-04T19:49:09.0762817ZFri, 04 Jun 2021 19:49:09 GMT",
+ "x-ms-client-request-id" : "faef36dd-9040-4dcf-bc1b-55a395885651",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "Content-Type" : "application/xml"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "12db627e12db627ef2c10015b5f027b9b8964b6fac", "12db627e12db627ef2c71601b8f3a791ab2f4ac3ad", "12db627e12db627ef2c76805384b22244e5c4d9ba7" ]
+}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsListFilesAndDirectoriesArgs[4].json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsListFilesAndDirectoriesArgs[4].json
new file mode 100644
index 000000000000..b72998b53c5c
--- /dev/null
+++ b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsListFilesAndDirectoriesArgs[4].json
@@ -0,0 +1,278 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/5d9af4b95d9af4b9ac5665916caf91b1a8dc4b3687?restype=share",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "6ff9a01b-2c75-434a-86d1-002aa84e2444"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D92791D106460B",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "f92279ac-701a-002e-127a-59103a000000",
+ "x-ms-client-request-id" : "6ff9a01b-2c75-434a-86d1-002aa84e2444",
+ "Date" : "Fri, 04 Jun 2021 19:49:07 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/5d9af4b95d9af4b9ac5665916caf91b1a8dc4b3687/5d9af4b95d9af4b9ac520618918f2f64b43443db80?restype=directory",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "35fcc965-cd71-4453-a43d-3040f9b16b66"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "2663978480635205383*5486365400479318158",
+ "x-ms-file-id" : "13835128424026341376",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.2697460Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:07 GMT",
+ "x-ms-file-attributes" : "Directory",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.2697460Z",
+ "x-ms-file-parent-id" : "0",
+ "eTag" : "0x8D92791D12BFAF4",
+ "x-ms-request-id" : "f92279af-701a-002e-137a-59103a000000",
+ "x-ms-client-request-id" : "35fcc965-cd71-4453-a43d-3040f9b16b66",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.2697460Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/5d9af4b95d9af4b9ac5665916caf91b1a8dc4b3687/5d9af4b95d9af4b9ac520618918f2f64b43443db80%2F5d9af4b95d9af4b9ac5219256cd40d273d0244c88d0?restype=directory",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "758e99ce-63d9-4596-b7ac-30f4cb1569ac"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "2663978480635205383*5486365400479318158",
+ "x-ms-file-id" : "13835093239654252544",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.3936753Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:07 GMT",
+ "x-ms-file-attributes" : "Directory",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.3936753Z",
+ "x-ms-file-parent-id" : "13835128424026341376",
+ "eTag" : "0x8D92791D13EE3F1",
+ "x-ms-request-id" : "d121b8c8-401a-0021-3b7a-59bb8d000000",
+ "x-ms-client-request-id" : "758e99ce-63d9-4596-b7ac-30f4cb1569ac",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.3936753Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/5d9af4b95d9af4b9ac5665916caf91b1a8dc4b3687/5d9af4b95d9af4b9ac520618918f2f64b43443db80%2F5d9af4b95d9af4b9ac5219256cd40d273d0244c88d0%2F5d9af4b95d9af4b9ac5219256cd40d273d0244c88d3",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "5dbd3f04-ec60-4054-9215-cbb18512e6c1"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "13835163608398430208",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.5275976Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:07 GMT",
+ "x-ms-file-attributes" : "Archive",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.5275976Z",
+ "x-ms-file-parent-id" : "13835093239654252544",
+ "eTag" : "0x8D92791D1535348",
+ "x-ms-request-id" : "5079ffe4-a01a-0005-6d7a-59e2e0000000",
+ "x-ms-client-request-id" : "5dbd3f04-ec60-4054-9215-cbb18512e6c1",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.5275976Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/5d9af4b95d9af4b9ac5665916caf91b1a8dc4b3687/5d9af4b95d9af4b9ac520618918f2f64b43443db80%2F5d9af4b95d9af4b9ac5219256cd40d273d0244c88d0%2F5d9af4b95d9af4b9ac5219256cd40d273d0244c88d4",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "5d382cfb-15f2-4995-9ee7-5a4007638baf"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "13835075647468208128",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.6425316Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "x-ms-file-attributes" : "Archive",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.6425316Z",
+ "x-ms-file-parent-id" : "13835093239654252544",
+ "eTag" : "0x8D92791D164DCE4",
+ "x-ms-request-id" : "266798a5-501a-0003-5a7a-59a3d1000000",
+ "x-ms-client-request-id" : "5d382cfb-15f2-4995-9ee7-5a4007638baf",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.6425316Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/5d9af4b95d9af4b9ac5665916caf91b1a8dc4b3687/5d9af4b95d9af4b9ac520618918f2f64b43443db80%2F5d9af4b95d9af4b9ac5219256cd40d273d0244c88d1?restype=directory",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "3cbbe221-4a41-4107-8ba3-472b9fa39747"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "2663978480635205383*5486365400479318158",
+ "x-ms-file-id" : "13835146016212385792",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.7914462Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "x-ms-file-attributes" : "Directory",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.7914462Z",
+ "x-ms-file-parent-id" : "13835128424026341376",
+ "eTag" : "0x8D92791D17B95DE",
+ "x-ms-request-id" : "c6d2de8b-501a-001c-267a-59e384000000",
+ "x-ms-client-request-id" : "3cbbe221-4a41-4107-8ba3-472b9fa39747",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.7914462Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/5d9af4b95d9af4b9ac5665916caf91b1a8dc4b3687/5d9af4b95d9af4b9ac520618918f2f64b43443db80%2F5d9af4b95d9af4b9ac5219256cd40d273d0244c88d1%2F5d9af4b95d9af4b9ac5219256cd40d273d0244c88d5",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "b3a5b528-045f-44a9-95de-1fff8e4b4b14"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "11529320599184736256",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.8823935Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:07 GMT",
+ "x-ms-file-attributes" : "Archive",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.8823935Z",
+ "x-ms-file-parent-id" : "13835146016212385792",
+ "eTag" : "0x8D92791D189767F",
+ "x-ms-request-id" : "5079ffeb-a01a-0005-717a-59e2e0000000",
+ "x-ms-client-request-id" : "b3a5b528-045f-44a9-95de-1fff8e4b4b14",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.8823935Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/5d9af4b95d9af4b9ac5665916caf91b1a8dc4b3687/5d9af4b95d9af4b9ac520618918f2f64b43443db80%2F5d9af4b95d9af4b9ac5219256cd40d273d0244c88d1%2F5d9af4b95d9af4b9ac5219256cd40d273d0244c88d6",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "6aa429ae-7f78-47a2-a349-fb556a504d45"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "11529232638254514176",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.9913313Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "x-ms-file-attributes" : "Archive",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.9913313Z",
+ "x-ms-file-parent-id" : "13835146016212385792",
+ "eTag" : "0x8D92791D19A15E1",
+ "x-ms-request-id" : "266798ab-501a-0003-5e7a-59a3d1000000",
+ "x-ms-client-request-id" : "6aa429ae-7f78-47a2-a349-fb556a504d45",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.9913313Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/5d9af4b95d9af4b9ac5665916caf91b1a8dc4b3687/5d9af4b95d9af4b9ac520618918f2f64b43443db80%2F5d9af4b95d9af4b9ac5219256cd40d273d0244c88d2",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "0623d21e-4c60-4eaa-bffa-d3d518917f9c"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "13835110831840296960",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:09.0962706Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:09 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "x-ms-file-attributes" : "Archive",
+ "x-ms-file-change-time" : "2021-06-04T19:49:09.0962706Z",
+ "x-ms-file-parent-id" : "13835128424026341376",
+ "eTag" : "0x8D92791D1AA1912",
+ "x-ms-request-id" : "d9270198-d01a-0012-167a-59af7f000000",
+ "x-ms-client-request-id" : "0623d21e-4c60-4eaa-bffa-d3d518917f9c",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:09.0962706Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "GET",
+ "Uri" : "https://REDACTED.file.core.windows.net/5d9af4b95d9af4b9ac5665916caf91b1a8dc4b3687/5d9af4b95d9af4b9ac520618918f2f64b43443db80?restype=directory&comp=list&prefix=5d9af4b9&include=Etag",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "71ca7962-d390-433c-ad6c-8728020b9324"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-request-id" : "f92279c5-701a-002e-1f7a-59103a000000",
+ "Body" : "5d9af4b9138351284240263413765d9af4b95d9af4b9ac5219256cd40d273d0244c88d013835093239654252544\"0x8D92791D13EE3F1\"5d9af4b95d9af4b9ac5219256cd40d273d0244c88d113835146016212385792\"0x8D92791D17B95DE\"5d9af4b95d9af4b9ac5219256cd40d273d0244c88d2138351108318402969601024\"0x8D92791D1AA1912\"",
+ "x-ms-client-request-id" : "71ca7962-d390-433c-ad6c-8728020b9324",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "Content-Type" : "application/xml"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "5d9af4b95d9af4b9ac5665916caf91b1a8dc4b3687", "5d9af4b95d9af4b9ac520618918f2f64b43443db80", "5d9af4b95d9af4b9ac5219256cd40d273d0244c88d" ]
+}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsListFilesAndDirectoriesArgs[5].json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsListFilesAndDirectoriesArgs[5].json
new file mode 100644
index 000000000000..b3e4613c8a9b
--- /dev/null
+++ b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsListFilesAndDirectoriesArgs[5].json
@@ -0,0 +1,278 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/4481c5f84481c5f871623113a679fc43063c45198d?restype=share",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "e4a47c8b-6b80-4add-b19f-67b6b986b1af"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D92791D10660E1",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "2667989b-501a-0003-557a-59a3d1000000",
+ "x-ms-client-request-id" : "e4a47c8b-6b80-4add-b19f-67b6b986b1af",
+ "Date" : "Fri, 04 Jun 2021 19:49:07 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/4481c5f84481c5f871623113a679fc43063c45198d/4481c5f84481c5f8716939698d4bd3ab1e7e499589?restype=directory",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "168f76bf-e238-4f1b-b8fe-d5559ead4f82"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "2663978480635205383*5486365400479318158",
+ "x-ms-file-id" : "13835128424026341376",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.2697460Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:07 GMT",
+ "x-ms-file-attributes" : "Directory",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.2697460Z",
+ "x-ms-file-parent-id" : "0",
+ "eTag" : "0x8D92791D12BFAF4",
+ "x-ms-request-id" : "5079ffdd-a01a-0005-6a7a-59e2e0000000",
+ "x-ms-client-request-id" : "168f76bf-e238-4f1b-b8fe-d5559ead4f82",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.2697460Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/4481c5f84481c5f871623113a679fc43063c45198d/4481c5f84481c5f8716939698d4bd3ab1e7e499589%2F4481c5f84481c5f871692822fdda897e8b4e49e8940?restype=directory",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "6de6dd04-3dcc-44c9-9308-813c683f6fab"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "2663978480635205383*5486365400479318158",
+ "x-ms-file-id" : "13835093239654252544",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.3676898Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:07 GMT",
+ "x-ms-file-attributes" : "Directory",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.3676898Z",
+ "x-ms-file-parent-id" : "13835128424026341376",
+ "eTag" : "0x8D92791D13AECE2",
+ "x-ms-request-id" : "38a9362e-d01a-002c-037a-592fd5000000",
+ "x-ms-client-request-id" : "6de6dd04-3dcc-44c9-9308-813c683f6fab",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.3676898Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/4481c5f84481c5f871623113a679fc43063c45198d/4481c5f84481c5f8716939698d4bd3ab1e7e499589%2F4481c5f84481c5f871692822fdda897e8b4e49e8940%2F4481c5f84481c5f871692822fdda897e8b4e49e8943",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "0ac5bf91-d116-4d72-8def-1dc6ba9268ad"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "13835163608398430208",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.5146050Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "x-ms-file-attributes" : "Archive",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.5146050Z",
+ "x-ms-file-parent-id" : "13835093239654252544",
+ "eTag" : "0x8D92791D15157C2",
+ "x-ms-request-id" : "c6d2de79-501a-001c-177a-59e384000000",
+ "x-ms-client-request-id" : "0ac5bf91-d116-4d72-8def-1dc6ba9268ad",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.5146050Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/4481c5f84481c5f871623113a679fc43063c45198d/4481c5f84481c5f8716939698d4bd3ab1e7e499589%2F4481c5f84481c5f871692822fdda897e8b4e49e8940%2F4481c5f84481c5f871692822fdda897e8b4e49e8944",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "a5c6559b-7a73-47c2-82fd-fa55a95bb8a3"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "13835075647468208128",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.6325372Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "x-ms-file-attributes" : "Archive",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.6325372Z",
+ "x-ms-file-parent-id" : "13835093239654252544",
+ "eTag" : "0x8D92791D163567C",
+ "x-ms-request-id" : "0c0bd3ab-001a-0007-0d7a-59dd0f000000",
+ "x-ms-client-request-id" : "a5c6559b-7a73-47c2-82fd-fa55a95bb8a3",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.6325372Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/4481c5f84481c5f871623113a679fc43063c45198d/4481c5f84481c5f8716939698d4bd3ab1e7e499589%2F4481c5f84481c5f871692822fdda897e8b4e49e8941?restype=directory",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "4fd8b5f6-8c08-4d2e-bce6-74cfc654fd34"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "2663978480635205383*5486365400479318158",
+ "x-ms-file-id" : "11529250230440558592",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.7214861Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:07 GMT",
+ "x-ms-file-attributes" : "Directory",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.7214861Z",
+ "x-ms-file-parent-id" : "13835128424026341376",
+ "eTag" : "0x8D92791D170E90D",
+ "x-ms-request-id" : "38a93639-d01a-002c-0a7a-592fd5000000",
+ "x-ms-client-request-id" : "4fd8b5f6-8c08-4d2e-bce6-74cfc654fd34",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.7214861Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/4481c5f84481c5f871623113a679fc43063c45198d/4481c5f84481c5f8716939698d4bd3ab1e7e499589%2F4481c5f84481c5f871692822fdda897e8b4e49e8941%2F4481c5f84481c5f871692822fdda897e8b4e49e8945",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "05950aa6-b592-47c2-9507-1fe96dee4f0c"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "13835146016212385792",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.8484131Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "x-ms-file-attributes" : "Archive",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.8484131Z",
+ "x-ms-file-parent-id" : "11529250230440558592",
+ "eTag" : "0x8D92791D1844723",
+ "x-ms-request-id" : "d121b8dc-401a-0021-4b7a-59bb8d000000",
+ "x-ms-client-request-id" : "05950aa6-b592-47c2-9507-1fe96dee4f0c",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.8484131Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/4481c5f84481c5f871623113a679fc43063c45198d/4481c5f84481c5f8716939698d4bd3ab1e7e499589%2F4481c5f84481c5f871692822fdda897e8b4e49e8941%2F4481c5f84481c5f871692822fdda897e8b4e49e8946",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "a008a23f-f6a1-47a9-8897-eb2cc8c76276"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "11529320599184736256",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.9683439Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "x-ms-file-attributes" : "Archive",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.9683439Z",
+ "x-ms-file-parent-id" : "11529250230440558592",
+ "eTag" : "0x8D92791D19693EF",
+ "x-ms-request-id" : "c6d2de95-501a-001c-2e7a-59e384000000",
+ "x-ms-client-request-id" : "a008a23f-f6a1-47a9-8897-eb2cc8c76276",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.9683439Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/4481c5f84481c5f871623113a679fc43063c45198d/4481c5f84481c5f8716939698d4bd3ab1e7e499589%2F4481c5f84481c5f871692822fdda897e8b4e49e8942",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "32f05f6c-a283-47fb-ad76-80331db2e200"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "11529285414812647424",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:09.0542946Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:09 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "x-ms-file-attributes" : "Archive",
+ "x-ms-file-change-time" : "2021-06-04T19:49:09.0542946Z",
+ "x-ms-file-parent-id" : "13835128424026341376",
+ "eTag" : "0x8D92791D1A3B162",
+ "x-ms-request-id" : "5079ffed-a01a-0005-737a-59e2e0000000",
+ "x-ms-client-request-id" : "32f05f6c-a283-47fb-ad76-80331db2e200",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:09.0542946Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "GET",
+ "Uri" : "https://REDACTED.file.core.windows.net/4481c5f84481c5f871623113a679fc43063c45198d/4481c5f84481c5f8716939698d4bd3ab1e7e499589?restype=directory&comp=list&prefix=4481c5f8&include=Attributes",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "6a4bc071-cf6c-4d5a-884e-0609373557f7"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-request-id" : "0c0bd3b8-001a-0007-157a-59dd0f000000",
+ "Body" : "4481c5f8138351284240263413764481c5f84481c5f871692822fdda897e8b4e49e894013835093239654252544Directory4481c5f84481c5f871692822fdda897e8b4e49e894111529250230440558592Directory4481c5f84481c5f871692822fdda897e8b4e49e8942115292854148126474241024Archive",
+ "x-ms-client-request-id" : "6a4bc071-cf6c-4d5a-884e-0609373557f7",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "Content-Type" : "application/xml"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "4481c5f84481c5f871623113a679fc43063c45198d", "4481c5f84481c5f8716939698d4bd3ab1e7e499589", "4481c5f84481c5f871692822fdda897e8b4e49e894" ]
+}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsListFilesAndDirectoriesArgs[6].json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsListFilesAndDirectoriesArgs[6].json
new file mode 100644
index 000000000000..d1c0e56acebc
--- /dev/null
+++ b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsListFilesAndDirectoriesArgs[6].json
@@ -0,0 +1,278 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/6fac963b6fac963b3813534446d4e4d29b284cc2af?restype=share",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "45a0e502-1f7e-49a2-8b38-819a9106a383"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D92791D1052A17",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "d9270192-d01a-0012-147a-59af7f000000",
+ "x-ms-client-request-id" : "45a0e502-1f7e-49a2-8b38-819a9106a383",
+ "Date" : "Fri, 04 Jun 2021 19:49:07 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/6fac963b6fac963b3813534446d4e4d29b284cc2af/6fac963b6fac963b381660836d5f4bd68ea14cf885?restype=directory",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "d059c2d8-cc25-47c7-a3e9-8b8ac2b8778f"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "2663978480635205383*5486365400479318158",
+ "x-ms-file-id" : "13835128424026341376",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.2697460Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "x-ms-file-attributes" : "Directory",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.2697460Z",
+ "x-ms-file-parent-id" : "0",
+ "eTag" : "0x8D92791D12BFAF4",
+ "x-ms-request-id" : "0c0bd3a4-001a-0007-097a-59dd0f000000",
+ "x-ms-client-request-id" : "d059c2d8-cc25-47c7-a3e9-8b8ac2b8778f",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.2697460Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/6fac963b6fac963b3813534446d4e4d29b284cc2af/6fac963b6fac963b381660836d5f4bd68ea14cf885%2F6fac963b6fac963b38109349720adf5eb37842348e0?restype=directory",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "9a0935a1-68b6-498b-9999-8f609e4a7caa"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "2663978480635205383*5486365400479318158",
+ "x-ms-file-id" : "13835093239654252544",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.4386490Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:07 GMT",
+ "x-ms-file-attributes" : "Directory",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.4386490Z",
+ "x-ms-file-parent-id" : "13835128424026341376",
+ "eTag" : "0x8D92791D145C0BA",
+ "x-ms-request-id" : "f92279b3-701a-002e-157a-59103a000000",
+ "x-ms-client-request-id" : "9a0935a1-68b6-498b-9999-8f609e4a7caa",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.4386490Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/6fac963b6fac963b3813534446d4e4d29b284cc2af/6fac963b6fac963b381660836d5f4bd68ea14cf885%2F6fac963b6fac963b38109349720adf5eb37842348e0%2F6fac963b6fac963b38109349720adf5eb37842348e3",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "5d1ff555-eabc-45f8-b42b-700ebb50c2ee"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "11529285414812647424",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.5315952Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "x-ms-file-attributes" : "Archive",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.5315952Z",
+ "x-ms-file-parent-id" : "13835093239654252544",
+ "eTag" : "0x8D92791D153EF70",
+ "x-ms-request-id" : "0c0bd3aa-001a-0007-0c7a-59dd0f000000",
+ "x-ms-client-request-id" : "5d1ff555-eabc-45f8-b42b-700ebb50c2ee",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.5315952Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/6fac963b6fac963b3813534446d4e4d29b284cc2af/6fac963b6fac963b381660836d5f4bd68ea14cf885%2F6fac963b6fac963b38109349720adf5eb37842348e0%2F6fac963b6fac963b38109349720adf5eb37842348e4",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "78e0c76e-3576-48ff-9a9b-e065705b4346"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "13835163608398430208",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.6315378Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:07 GMT",
+ "x-ms-file-attributes" : "Archive",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.6315378Z",
+ "x-ms-file-parent-id" : "13835093239654252544",
+ "eTag" : "0x8D92791D1632F72",
+ "x-ms-request-id" : "38a93637-d01a-002c-097a-592fd5000000",
+ "x-ms-client-request-id" : "78e0c76e-3576-48ff-9a9b-e065705b4346",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.6315378Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/6fac963b6fac963b3813534446d4e4d29b284cc2af/6fac963b6fac963b381660836d5f4bd68ea14cf885%2F6fac963b6fac963b38109349720adf5eb37842348e1?restype=directory",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "75937653-269a-46ad-9af5-1ef121c041aa"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "2663978480635205383*5486365400479318158",
+ "x-ms-file-id" : "13835075647468208128",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.7564657Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "x-ms-file-attributes" : "Directory",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.7564657Z",
+ "x-ms-file-parent-id" : "13835128424026341376",
+ "eTag" : "0x8D92791D1763F71",
+ "x-ms-request-id" : "d121b8d9-401a-0021-497a-59bb8d000000",
+ "x-ms-client-request-id" : "75937653-269a-46ad-9af5-1ef121c041aa",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.7564657Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/6fac963b6fac963b3813534446d4e4d29b284cc2af/6fac963b6fac963b381660836d5f4bd68ea14cf885%2F6fac963b6fac963b38109349720adf5eb37842348e1%2F6fac963b6fac963b38109349720adf5eb37842348e5",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "23453cbc-962f-4b93-a51d-de2b752fb07a"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "13835146016212385792",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.8833935Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "x-ms-file-attributes" : "Archive",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.8833935Z",
+ "x-ms-file-parent-id" : "13835075647468208128",
+ "eTag" : "0x8D92791D1899D8F",
+ "x-ms-request-id" : "c6d2de90-501a-001c-2a7a-59e384000000",
+ "x-ms-client-request-id" : "23453cbc-962f-4b93-a51d-de2b752fb07a",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.8833935Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/6fac963b6fac963b3813534446d4e4d29b284cc2af/6fac963b6fac963b381660836d5f4bd68ea14cf885%2F6fac963b6fac963b38109349720adf5eb37842348e1%2F6fac963b6fac963b38109349720adf5eb37842348e6",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "9dbce625-7d7c-4c8e-a783-768e71cf89c2"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "16140971433240035328",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.9713423Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "x-ms-file-attributes" : "Archive",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.9713423Z",
+ "x-ms-file-parent-id" : "13835075647468208128",
+ "eTag" : "0x8D92791D197090F",
+ "x-ms-request-id" : "0c0bd3b3-001a-0007-127a-59dd0f000000",
+ "x-ms-client-request-id" : "9dbce625-7d7c-4c8e-a783-768e71cf89c2",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.9713423Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/6fac963b6fac963b3813534446d4e4d29b284cc2af/6fac963b6fac963b381660836d5f4bd68ea14cf885%2F6fac963b6fac963b38109349720adf5eb37842348e2",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "720781c1-723f-418d-86b0-82f0fc5ddaf0"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "11529320599184736256",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:09.0612904Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:09 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "x-ms-file-attributes" : "Archive",
+ "x-ms-file-change-time" : "2021-06-04T19:49:09.0612904Z",
+ "x-ms-file-parent-id" : "13835128424026341376",
+ "eTag" : "0x8D92791D1A4C2A8",
+ "x-ms-request-id" : "38a9363f-d01a-002c-0f7a-592fd5000000",
+ "x-ms-client-request-id" : "720781c1-723f-418d-86b0-82f0fc5ddaf0",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:09.0612904Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "GET",
+ "Uri" : "https://REDACTED.file.core.windows.net/6fac963b6fac963b3813534446d4e4d29b284cc2af/6fac963b6fac963b381660836d5f4bd68ea14cf885?restype=directory&comp=list&prefix=6fac963b&include=PermissionKey",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "87ad7d29-16f5-4266-aba3-3c45f2702186"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-request-id" : "266798ae-501a-0003-607a-59a3d1000000",
+ "Body" : "6fac963b138351284240263413766fac963b6fac963b38109349720adf5eb37842348e0138350932396542525442663978480635205383*54863654004793181586fac963b6fac963b38109349720adf5eb37842348e1138350756474682081282663978480635205383*54863654004793181586fac963b6fac963b38109349720adf5eb37842348e211529320599184736256102416466167399171598336*5486365400479318158",
+ "x-ms-client-request-id" : "87ad7d29-16f5-4266-aba3-3c45f2702186",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "Content-Type" : "application/xml"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "6fac963b6fac963b3813534446d4e4d29b284cc2af", "6fac963b6fac963b381660836d5f4bd68ea14cf885", "6fac963b6fac963b38109349720adf5eb37842348e" ]
+}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsListFilesAndDirectoriesArgs[7].json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsListFilesAndDirectoriesArgs[7].json
new file mode 100644
index 000000000000..91748990b1c4
--- /dev/null
+++ b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsListFilesAndDirectoriesArgs[7].json
@@ -0,0 +1,278 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/76b7a77a76b7a77a3400827473ad901866334cc19f?restype=share",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "b174c91b-e7f7-4e5f-bd33-51d8a4c51307"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D92791D106202C",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "38a9362a-d01a-002c-017a-592fd5000000",
+ "x-ms-client-request-id" : "b174c91b-e7f7-4e5f-bd33-51d8a4c51307",
+ "Date" : "Fri, 04 Jun 2021 19:49:07 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/76b7a77a76b7a77a3400827473ad901866334cc19f/76b7a77a76b7a77a340480422849c2f9538a4e2aab?restype=directory",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "d65db226-72c2-4729-9a9a-83a68298ebce"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "2663978480635205383*5486365400479318158",
+ "x-ms-file-id" : "13835128424026341376",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.2697460Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:07 GMT",
+ "x-ms-file-attributes" : "Directory",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.2697460Z",
+ "x-ms-file-parent-id" : "0",
+ "eTag" : "0x8D92791D12BFAF4",
+ "x-ms-request-id" : "38a9362d-d01a-002c-027a-592fd5000000",
+ "x-ms-client-request-id" : "d65db226-72c2-4729-9a9a-83a68298ebce",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.2697460Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/76b7a77a76b7a77a3400827473ad901866334cc19f/76b7a77a76b7a77a340480422849c2f9538a4e2aab%2F76b7a77a76b7a77a340435051c36eed38be54fa3af0?restype=directory",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "3fd0c367-8d8f-4dea-9f98-01c57f90c664"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "2663978480635205383*5486365400479318158",
+ "x-ms-file-id" : "13835093239654252544",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.4446454Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "x-ms-file-attributes" : "Directory",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.4446454Z",
+ "x-ms-file-parent-id" : "13835128424026341376",
+ "eTag" : "0x8D92791D146AAF6",
+ "x-ms-request-id" : "0c0bd3a8-001a-0007-0b7a-59dd0f000000",
+ "x-ms-client-request-id" : "3fd0c367-8d8f-4dea-9f98-01c57f90c664",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.4446454Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/76b7a77a76b7a77a3400827473ad901866334cc19f/76b7a77a76b7a77a340480422849c2f9538a4e2aab%2F76b7a77a76b7a77a340435051c36eed38be54fa3af0%2F76b7a77a76b7a77a340435051c36eed38be54fa3af3",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "a449acc4-f86f-40ed-8733-cabf15b69b7e"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "13835163608398430208",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.5545819Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "x-ms-file-attributes" : "Archive",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.5545819Z",
+ "x-ms-file-parent-id" : "13835093239654252544",
+ "eTag" : "0x8D92791D157715B",
+ "x-ms-request-id" : "266798a3-501a-0003-597a-59a3d1000000",
+ "x-ms-client-request-id" : "a449acc4-f86f-40ed-8733-cabf15b69b7e",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.5545819Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/76b7a77a76b7a77a3400827473ad901866334cc19f/76b7a77a76b7a77a340480422849c2f9538a4e2aab%2F76b7a77a76b7a77a340435051c36eed38be54fa3af0%2F76b7a77a76b7a77a340435051c36eed38be54fa3af4",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "0abd71f9-2563-4f45-aeae-c7b63d9b30b5"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "13835075647468208128",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.6994986Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "x-ms-file-attributes" : "Archive",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.6994986Z",
+ "x-ms-file-parent-id" : "13835093239654252544",
+ "eTag" : "0x8D92791D16D8E2A",
+ "x-ms-request-id" : "c6d2de83-501a-001c-1f7a-59e384000000",
+ "x-ms-client-request-id" : "0abd71f9-2563-4f45-aeae-c7b63d9b30b5",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.6994986Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/76b7a77a76b7a77a3400827473ad901866334cc19f/76b7a77a76b7a77a340480422849c2f9538a4e2aab%2F76b7a77a76b7a77a340435051c36eed38be54fa3af1?restype=directory",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "23afe36a-0963-4940-91e2-c50a5d62171c"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "2663978480635205383*5486365400479318158",
+ "x-ms-file-id" : "13835146016212385792",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.8034389Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:07 GMT",
+ "x-ms-file-attributes" : "Directory",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.8034389Z",
+ "x-ms-file-parent-id" : "13835128424026341376",
+ "eTag" : "0x8D92791D17D6A55",
+ "x-ms-request-id" : "5079ffe9-a01a-0005-707a-59e2e0000000",
+ "x-ms-client-request-id" : "23afe36a-0963-4940-91e2-c50a5d62171c",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.8034389Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/76b7a77a76b7a77a3400827473ad901866334cc19f/76b7a77a76b7a77a340480422849c2f9538a4e2aab%2F76b7a77a76b7a77a340435051c36eed38be54fa3af1%2F76b7a77a76b7a77a340435051c36eed38be54fa3af5",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "3de37073-0bdc-4151-921c-9154ab31c2d0"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "11529320599184736256",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.9073793Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "x-ms-file-attributes" : "Archive",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.9073793Z",
+ "x-ms-file-parent-id" : "13835146016212385792",
+ "eTag" : "0x8D92791D18D4681",
+ "x-ms-request-id" : "266798aa-501a-0003-5d7a-59a3d1000000",
+ "x-ms-client-request-id" : "3de37073-0bdc-4151-921c-9154ab31c2d0",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.9073793Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/76b7a77a76b7a77a3400827473ad901866334cc19f/76b7a77a76b7a77a340480422849c2f9538a4e2aab%2F76b7a77a76b7a77a340435051c36eed38be54fa3af1%2F76b7a77a76b7a77a340435051c36eed38be54fa3af6",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "e1da20d2-e478-44a2-aea0-7e6d213ebc44"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "13835110831840296960",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:09.0223128Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:09 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "x-ms-file-attributes" : "Archive",
+ "x-ms-file-change-time" : "2021-06-04T19:49:09.0223128Z",
+ "x-ms-file-parent-id" : "13835146016212385792",
+ "eTag" : "0x8D92791D19ED018",
+ "x-ms-request-id" : "f92279c2-701a-002e-1d7a-59103a000000",
+ "x-ms-client-request-id" : "e1da20d2-e478-44a2-aea0-7e6d213ebc44",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:09.0223128Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/76b7a77a76b7a77a3400827473ad901866334cc19f/76b7a77a76b7a77a340480422849c2f9538a4e2aab%2F76b7a77a76b7a77a340435051c36eed38be54fa3af2",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "ac76f29f-be7b-4dcb-bfb4-7cf50886ecad"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "13835181200584474624",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:09.1192571Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:09 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "x-ms-file-attributes" : "Archive",
+ "x-ms-file-change-time" : "2021-06-04T19:49:09.1192571Z",
+ "x-ms-file-parent-id" : "13835128424026341376",
+ "eTag" : "0x8D92791D1AD9AFB",
+ "x-ms-request-id" : "d121b8e3-401a-0021-517a-59bb8d000000",
+ "x-ms-client-request-id" : "ac76f29f-be7b-4dcb-bfb4-7cf50886ecad",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:09.1192571Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "GET",
+ "Uri" : "https://REDACTED.file.core.windows.net/76b7a77a76b7a77a3400827473ad901866334cc19f/76b7a77a76b7a77a340480422849c2f9538a4e2aab?restype=directory&comp=list&prefix=76b7a77a&include=Attributes%2CEtag%2CTimestamps%2CPermissionKey",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "e3079cba-114b-42fd-a74e-382de5b8f166"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-request-id" : "c6d2de9d-501a-001c-357a-59e384000000",
+ "Body" : "76b7a77a1383512842402634137676b7a77a76b7a77a340435051c36eed38be54fa3af0138350932396542525442021-06-04T19:49:08.4446454Z2021-06-04T19:49:08.4446454Z2021-06-04T19:49:08.4446454Z2021-06-04T19:49:08.4446454ZFri, 04 Jun 2021 19:49:08 GMT\"0x8D92791D146AAF6\"Directory2663978480635205383*548636540047931815876b7a77a76b7a77a340435051c36eed38be54fa3af1138351460162123857922021-06-04T19:49:08.8034389Z2021-06-04T19:49:08.8034389Z2021-06-04T19:49:08.8034389Z2021-06-04T19:49:08.8034389ZFri, 04 Jun 2021 19:49:08 GMT\"0x8D92791D17D6A55\"Directory2663978480635205383*548636540047931815876b7a77a76b7a77a340435051c36eed38be54fa3af21383518120058447462410242021-06-04T19:49:09.1192571Z2021-06-04T19:49:09.1192571Z2021-06-04T19:49:09.1192571Z2021-06-04T19:49:09.1192571ZFri, 04 Jun 2021 19:49:09 GMT\"0x8D92791D1AD9AFB\"Archive16466167399171598336*5486365400479318158",
+ "x-ms-client-request-id" : "e3079cba-114b-42fd-a74e-382de5b8f166",
+ "Date" : "Fri, 04 Jun 2021 19:49:09 GMT",
+ "Content-Type" : "application/xml"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "76b7a77a76b7a77a3400827473ad901866334cc19f", "76b7a77a76b7a77a340480422849c2f9538a4e2aab", "76b7a77a76b7a77a340435051c36eed38be54fa3af" ]
+}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsListFilesAndDirectoriesArgs[8].json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsListFilesAndDirectoriesArgs[8].json
new file mode 100644
index 000000000000..0ee99635d55f
--- /dev/null
+++ b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsListFilesAndDirectoriesArgs[8].json
@@ -0,0 +1,278 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/f12fbbb5f12fbbb53ef243205f091b52527143fc91?restype=share",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "d8bcd933-4282-4933-9b01-5a287094a7fe"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D92791D10618F8",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "0c0bd3a1-001a-0007-087a-59dd0f000000",
+ "x-ms-client-request-id" : "d8bcd933-4282-4933-9b01-5a287094a7fe",
+ "Date" : "Fri, 04 Jun 2021 19:49:07 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/f12fbbb5f12fbbb53ef243205f091b52527143fc91/f12fbbb5f12fbbb53ef502513300cb92e2f94e6796?restype=directory",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "38e53cbc-91a5-4170-bc5d-83daff9fc68c"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "2663978480635205383*5486365400479318158",
+ "x-ms-file-id" : "13835128424026341376",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.3586950Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:07 GMT",
+ "x-ms-file-attributes" : "Directory",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.3586950Z",
+ "x-ms-file-parent-id" : "0",
+ "eTag" : "0x8D92791D1398D86",
+ "x-ms-request-id" : "5079ffe0-a01a-0005-6b7a-59e2e0000000",
+ "x-ms-client-request-id" : "38e53cbc-91a5-4170-bc5d-83daff9fc68c",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.3586950Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/f12fbbb5f12fbbb53ef243205f091b52527143fc91/f12fbbb5f12fbbb53ef502513300cb92e2f94e6796%2Ff12fbbb5f12fbbb53ef75678244f33ef25534d3b8c0?restype=directory",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "004010a6-ed34-4df5-a690-ec434a0cd8a0"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "2663978480635205383*5486365400479318158",
+ "x-ms-file-id" : "13835093239654252544",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.4846226Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:07 GMT",
+ "x-ms-file-attributes" : "Directory",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.4846226Z",
+ "x-ms-file-parent-id" : "13835128424026341376",
+ "eTag" : "0x8D92791D14CC492",
+ "x-ms-request-id" : "d121b8ce-401a-0021-407a-59bb8d000000",
+ "x-ms-client-request-id" : "004010a6-ed34-4df5-a690-ec434a0cd8a0",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.4846226Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/f12fbbb5f12fbbb53ef243205f091b52527143fc91/f12fbbb5f12fbbb53ef502513300cb92e2f94e6796%2Ff12fbbb5f12fbbb53ef75678244f33ef25534d3b8c0%2Ff12fbbb5f12fbbb53ef75678244f33ef25534d3b8c3",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "df51a192-9400-43a5-af1c-7c2293932796"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "13835163608398430208",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.6135484Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "x-ms-file-attributes" : "Archive",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.6135484Z",
+ "x-ms-file-parent-id" : "13835093239654252544",
+ "eTag" : "0x8D92791D16070BC",
+ "x-ms-request-id" : "f92279ba-701a-002e-187a-59103a000000",
+ "x-ms-client-request-id" : "df51a192-9400-43a5-af1c-7c2293932796",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.6135484Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/f12fbbb5f12fbbb53ef243205f091b52527143fc91/f12fbbb5f12fbbb53ef502513300cb92e2f94e6796%2Ff12fbbb5f12fbbb53ef75678244f33ef25534d3b8c0%2Ff12fbbb5f12fbbb53ef75678244f33ef25534d3b8c4",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "72519a03-934f-46cd-b154-d20c3941d327"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "11529285414812647424",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.7214861Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:07 GMT",
+ "x-ms-file-attributes" : "Archive",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.7214861Z",
+ "x-ms-file-parent-id" : "13835093239654252544",
+ "eTag" : "0x8D92791D170E90D",
+ "x-ms-request-id" : "5079ffe8-a01a-0005-6f7a-59e2e0000000",
+ "x-ms-client-request-id" : "72519a03-934f-46cd-b154-d20c3941d327",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.7214861Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/f12fbbb5f12fbbb53ef243205f091b52527143fc91/f12fbbb5f12fbbb53ef502513300cb92e2f94e6796%2Ff12fbbb5f12fbbb53ef75678244f33ef25534d3b8c1?restype=directory",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "f4250a5e-0581-45bc-ac5a-bfe59d28e2ab"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "2663978480635205383*5486365400479318158",
+ "x-ms-file-id" : "13835075647468208128",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.8174307Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "x-ms-file-attributes" : "Directory",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.8174307Z",
+ "x-ms-file-parent-id" : "13835128424026341376",
+ "eTag" : "0x8D92791D17F8CE3",
+ "x-ms-request-id" : "266798a8-501a-0003-5c7a-59a3d1000000",
+ "x-ms-client-request-id" : "f4250a5e-0581-45bc-ac5a-bfe59d28e2ab",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.8174307Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/f12fbbb5f12fbbb53ef243205f091b52527143fc91/f12fbbb5f12fbbb53ef502513300cb92e2f94e6796%2Ff12fbbb5f12fbbb53ef75678244f33ef25534d3b8c1%2Ff12fbbb5f12fbbb53ef75678244f33ef25534d3b8c5",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "e25a8269-db7a-4a84-9f03-a67182a801e6"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "11529320599184736256",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:08.9413596Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "x-ms-file-attributes" : "Archive",
+ "x-ms-file-change-time" : "2021-06-04T19:49:08.9413596Z",
+ "x-ms-file-parent-id" : "13835075647468208128",
+ "eTag" : "0x8D92791D19275DC",
+ "x-ms-request-id" : "f92279c0-701a-002e-1c7a-59103a000000",
+ "x-ms-client-request-id" : "e25a8269-db7a-4a84-9f03-a67182a801e6",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:08.9413596Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/f12fbbb5f12fbbb53ef243205f091b52527143fc91/f12fbbb5f12fbbb53ef502513300cb92e2f94e6796%2Ff12fbbb5f12fbbb53ef75678244f33ef25534d3b8c1%2Ff12fbbb5f12fbbb53ef75678244f33ef25534d3b8c6",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "1b4e9fce-4f66-4f61-b1eb-022dcbdd85cb"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "11529250230440558592",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:09.0283094Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:09 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "x-ms-file-attributes" : "Archive",
+ "x-ms-file-change-time" : "2021-06-04T19:49:09.0283094Z",
+ "x-ms-file-parent-id" : "13835075647468208128",
+ "eTag" : "0x8D92791D19FBA56",
+ "x-ms-request-id" : "d121b8e2-401a-0021-507a-59bb8d000000",
+ "x-ms-client-request-id" : "1b4e9fce-4f66-4f61-b1eb-022dcbdd85cb",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:09.0283094Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/f12fbbb5f12fbbb53ef243205f091b52527143fc91/f12fbbb5f12fbbb53ef502513300cb92e2f94e6796%2Ff12fbbb5f12fbbb53ef75678244f33ef25534d3b8c2",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "3ba81ffa-aea8-4861-8d82-8393e5f00fc1"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "13835146016212385792",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:09.1362477Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:09 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "x-ms-file-attributes" : "Archive",
+ "x-ms-file-change-time" : "2021-06-04T19:49:09.1362477Z",
+ "x-ms-file-parent-id" : "13835128424026341376",
+ "eTag" : "0x8D92791D1B032AD",
+ "x-ms-request-id" : "c6d2de9a-501a-001c-337a-59e384000000",
+ "x-ms-client-request-id" : "3ba81ffa-aea8-4861-8d82-8393e5f00fc1",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:09.1362477Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "GET",
+ "Uri" : "https://REDACTED.file.core.windows.net/f12fbbb5f12fbbb53ef243205f091b52527143fc91/f12fbbb5f12fbbb53ef502513300cb92e2f94e6796?restype=directory&comp=list&prefix=f12fbbb5",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "6cb73b6f-e662-40e7-ad47-d4096483b1f4"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-request-id" : "5079fff0-a01a-0005-757a-59e2e0000000",
+ "Body" : "f12fbbb513835128424026341376f12fbbb5f12fbbb53ef75678244f33ef25534d3b8c013835093239654252544f12fbbb5f12fbbb53ef75678244f33ef25534d3b8c113835075647468208128f12fbbb5f12fbbb53ef75678244f33ef25534d3b8c2138351460162123857921024",
+ "x-ms-client-request-id" : "6cb73b6f-e662-40e7-ad47-d4096483b1f4",
+ "Date" : "Fri, 04 Jun 2021 19:49:08 GMT",
+ "Content-Type" : "application/xml"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "f12fbbb5f12fbbb53ef243205f091b52527143fc91", "f12fbbb5f12fbbb53ef502513300cb92e2f94e6796", "f12fbbb5f12fbbb53ef75678244f33ef25534d3b8c" ]
+}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsListFilesAndDirectoriesExtendedInfoResults.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsListFilesAndDirectoriesExtendedInfoResults.json
new file mode 100644
index 000000000000..9ad4e4ba5eeb
--- /dev/null
+++ b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsListFilesAndDirectoriesExtendedInfoResults.json
@@ -0,0 +1,133 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/d362b48fd362b48fc8c14593af6865c49ed74ccd9d?restype=share",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "8489ffc8-ff6d-4d30-b14d-6176494013ed"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D92791E1A00FDF",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:35 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "c6d2e1c5-501a-001c-2e7a-59e384000000",
+ "x-ms-client-request-id" : "8489ffc8-ff6d-4d30-b14d-6176494013ed",
+ "Date" : "Fri, 04 Jun 2021 19:49:35 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/d362b48fd362b48fc8c14593af6865c49ed74ccd9d/d362b48fd362b48fc8c5202909a43a98507b4cb09b?restype=directory",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "b06e12f3-8c01-428d-816c-bc601d00c68e"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "2663978480635205383*5486365400479318158",
+ "x-ms-file-id" : "13835128424026341376",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:36.1047273Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:36 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:35 GMT",
+ "x-ms-file-attributes" : "Directory",
+ "x-ms-file-change-time" : "2021-06-04T19:49:36.1047273Z",
+ "x-ms-file-parent-id" : "0",
+ "eTag" : "0x8D92791E1C342E9",
+ "x-ms-request-id" : "c6d2e1d0-501a-001c-387a-59e384000000",
+ "x-ms-client-request-id" : "b06e12f3-8c01-428d-816c-bc601d00c68e",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:36.1047273Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/d362b48fd362b48fc8c14593af6865c49ed74ccd9d/d362b48fd362b48fc8c5202909a43a98507b4cb09b%2Fd362b48fd362b48fc8c39264d0d8715cca8c4b25b2",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "20cf125e-2af5-41b1-8f72-503b94ba2160"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "16466167399171598336*5486365400479318158",
+ "x-ms-file-id" : "11529285414812647424",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:36.2156635Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:36 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:35 GMT",
+ "x-ms-file-attributes" : "Archive",
+ "x-ms-file-change-time" : "2021-06-04T19:49:36.2156635Z",
+ "x-ms-file-parent-id" : "13835128424026341376",
+ "eTag" : "0x8D92791E1D4305B",
+ "x-ms-request-id" : "c6d2e1d6-501a-001c-3e7a-59e384000000",
+ "x-ms-client-request-id" : "20cf125e-2af5-41b1-8f72-503b94ba2160",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:36.2156635Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.file.core.windows.net/d362b48fd362b48fc8c14593af6865c49ed74ccd9d/d362b48fd362b48fc8c5202909a43a98507b4cb09b%2Fd362b48fd362b48fc8c20541c3e4690c478d47b88f?restype=directory",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "a69d43d4-4121-438d-820f-d3470ed54184"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "x-ms-file-permission-key" : "2663978480635205383*5486365400479318158",
+ "x-ms-file-id" : "16140971433240035328",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-file-creation-time" : "2021-06-04T19:49:36.3156059Z",
+ "Last-Modified" : "Fri, 04 Jun 2021 19:49:36 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 04 Jun 2021 19:49:35 GMT",
+ "x-ms-file-attributes" : "Directory",
+ "x-ms-file-change-time" : "2021-06-04T19:49:36.3156059Z",
+ "x-ms-file-parent-id" : "13835128424026341376",
+ "eTag" : "0x8D92791E1E3705B",
+ "x-ms-request-id" : "c6d2e1dc-501a-001c-447a-59e384000000",
+ "x-ms-client-request-id" : "a69d43d4-4121-438d-820f-d3470ed54184",
+ "x-ms-file-last-write-time" : "2021-06-04T19:49:36.3156059Z"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "GET",
+ "Uri" : "https://REDACTED.file.core.windows.net/d362b48fd362b48fc8c14593af6865c49ed74ccd9d/d362b48fd362b48fc8c5202909a43a98507b4cb09b?restype=directory&comp=list&include=Attributes%2CEtag%2CTimestamps%2CPermissionKey",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.9; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "3773c99e-42b6-4913-bdf4-6cf7cec4ebdf"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-request-id" : "c6d2e1e3-501a-001c-4b7a-59e384000000",
+ "Body" : "13835128424026341376d362b48fd362b48fc8c20541c3e4690c478d47b88f161409714332400353282021-06-04T19:49:36.3156059Z2021-06-04T19:49:36.3156059Z2021-06-04T19:49:36.3156059Z2021-06-04T19:49:36.3156059ZFri, 04 Jun 2021 19:49:36 GMT\"0x8D92791E1E3705B\"Directory2663978480635205383*5486365400479318158d362b48fd362b48fc8c39264d0d8715cca8c4b25b21152928541481264742410242021-06-04T19:49:36.2156635Z2021-06-04T19:49:36.2156635Z2021-06-04T19:49:36.2156635Z2021-06-04T19:49:36.2156635ZFri, 04 Jun 2021 19:49:36 GMT\"0x8D92791E1D4305B\"Archive16466167399171598336*5486365400479318158",
+ "x-ms-client-request-id" : "3773c99e-42b6-4913-bdf4-6cf7cec4ebdf",
+ "Date" : "Fri, 04 Jun 2021 19:49:35 GMT",
+ "Content-Type" : "application/xml"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "d362b48fd362b48fc8c14593af6865c49ed74ccd9d", "d362b48fd362b48fc8c5202909a43a98507b4cb09b", "d362b48fd362b48fc8c39264d0d8715cca8c4b25b2", "d362b48fd362b48fc8c20541c3e4690c478d47b88f" ]
+}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-file-share/swagger/README.md b/sdk/storage/azure-storage-file-share/swagger/README.md
index 76d4497062d6..73fbc0541d01 100644
--- a/sdk/storage/azure-storage-file-share/swagger/README.md
+++ b/sdk/storage/azure-storage-file-share/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/Azure/azure-rest-api-specs/storage-dataplane-preview/specification/storage/data-plane/Microsoft.FileStorage/preview/2020-04-08/file.json
+input-file: https://raw.githubusercontent.com/seanmcc-msft/azure-rest-api-specs/feature/storage/listFilesV2/specification/storage/data-plane/Microsoft.FileStorage/preview/2020-10-02/file.json
java: true
output-folder: ../
namespace: com.azure.storage.file.share
diff --git a/sdk/storage/azure-storage-file-share/swagger/pom.xml b/sdk/storage/azure-storage-file-share/swagger/pom.xml
index 35d132db2439..57ab653cfba8 100644
--- a/sdk/storage/azure-storage-file-share/swagger/pom.xml
+++ b/sdk/storage/azure-storage-file-share/swagger/pom.xml
@@ -20,7 +20,7 @@
com.azure.tools
azure-autorest-customization
- 1.0.0-beta.2
+ 1.0.0-beta.4
junit
diff --git a/sdk/storage/azure-storage-file-share/swagger/src/main/java/com/azure/storage/file/share/customization/ShareStorageCustomization.java b/sdk/storage/azure-storage-file-share/swagger/src/main/java/com/azure/storage/file/share/customization/ShareStorageCustomization.java
index a3e34f108b4f..65cc8d7a5251 100644
--- a/sdk/storage/azure-storage-file-share/swagger/src/main/java/com/azure/storage/file/share/customization/ShareStorageCustomization.java
+++ b/sdk/storage/azure-storage-file-share/swagger/src/main/java/com/azure/storage/file/share/customization/ShareStorageCustomization.java
@@ -9,13 +9,14 @@
import com.azure.autorest.customization.MethodCustomization;
import com.azure.autorest.customization.PackageCustomization;
import com.azure.autorest.customization.PropertyCustomization;
+import org.slf4j.Logger;
/**
* Customization class for File Share Storage.
*/
public class ShareStorageCustomization extends Customization {
@Override
- public void customize(LibraryCustomization customization) {
+ public void customize(LibraryCustomization customization, Logger logger) {
PackageCustomization implementation = customization.getPackage("com.azure.storage.file.share.implementation");
ClassCustomization directoriesImpl = implementation.getClass("DirectoriesImpl");
From 2286afe0d4737f2cc6353553817c111780be95b0 Mon Sep 17 00:00:00 2001
From: Kamil Sobol <61715331+kasobol-msft@users.noreply.github.com>
Date: Fri, 18 Jun 2021 11:04:35 -0700
Subject: [PATCH 6/9] Fix test.
---
.../QueueSASTestsAccountSASCreateDeleteQueue.json | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsAccountSASCreateDeleteQueue.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsAccountSASCreateDeleteQueue.json
index 285006c09eb1..6a81d120fa0a 100644
--- a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsAccountSASCreateDeleteQueue.json
+++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsAccountSASCreateDeleteQueue.json
@@ -1,7 +1,7 @@
{
"networkCallRecords" : [ {
"Method" : "PUT",
- "Uri" : "https://REDACTED.queue.core.windows.net/cf320dddcf320ddd71971375275b773e1ce247a6b5?sv=2020-08-04&ss=q&srt=sco&se=2021-06-12T23%3A00%3A48Z&sp=rdc&sig=REDACTED",
+ "Uri" : "https://REDACTED.queue.core.windows.net/cf320dddcf320ddd71971375275b773e1ce247a6b5?sv=2020-10-02&ss=q&srt=sco&se=2021-06-12T23%3A00%3A48Z&sp=rdc&sig=REDACTED",
"Headers" : {
"x-ms-version" : "2020-08-04",
"User-Agent" : "azsdk-java-azure-storage-queue/12.11.0-beta.1 (11.0.8; Windows 10; 10.0)",
@@ -20,7 +20,7 @@
"Exception" : null
}, {
"Method" : "DELETE",
- "Uri" : "https://REDACTED.queue.core.windows.net/cf320dddcf320ddd71971375275b773e1ce247a6b5?sv=2020-08-04&ss=q&srt=sco&se=2021-06-12T23%3A00%3A48Z&sp=rdc&sig=REDACTED",
+ "Uri" : "https://REDACTED.queue.core.windows.net/cf320dddcf320ddd71971375275b773e1ce247a6b5?sv=2020-10-02&ss=q&srt=sco&se=2021-06-12T23%3A00%3A48Z&sp=rdc&sig=REDACTED",
"Headers" : {
"x-ms-version" : "2020-08-04",
"User-Agent" : "azsdk-java-azure-storage-queue/12.11.0-beta.1 (11.0.8; Windows 10; 10.0)",
@@ -39,4 +39,4 @@
"Exception" : null
} ],
"variables" : [ "cf320dddcf320ddd719373645103c68a347749a394", "2021-06-11T23:00:48.051306Z", "cf320dddcf320ddd71971375275b773e1ce247a6b5" ]
-}
\ No newline at end of file
+}
From e79d228d87389bf7ea61338973b7bafe3d94a9b7 Mon Sep 17 00:00:00 2001
From: Gauri Prasad <51212198+gapra-msft@users.noreply.github.com>
Date: Fri, 18 Jun 2021 13:58:50 -0700
Subject: [PATCH 7/9] Implemented list deleted root blob with versions (#21996)
---
sdk/storage/azure-storage-blob/CHANGELOG.md | 1 +
.../blob/implementation/util/ModelHelper.java | 2 +
.../azure/storage/blob/models/BlobItem.java | 26 ++++
.../storage/blob/models/BlobListDetails.java | 24 ++++
.../storage/blob/ContainerAPITest.groovy | 54 +++++++--
...stBlobsFlatOptionsDeletedWithVersions.json | 112 ++++++++++++++++++
...stBlobsHierOptionsDeletedWithVersions.json | 112 ++++++++++++++++++
7 files changed, 324 insertions(+), 7 deletions(-)
create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestListBlobsFlatOptionsDeletedWithVersions.json
create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestListBlobsHierOptionsDeletedWithVersions.json
diff --git a/sdk/storage/azure-storage-blob/CHANGELOG.md b/sdk/storage/azure-storage-blob/CHANGELOG.md
index 515a5db14bde..93f30a63b262 100644
--- a/sdk/storage/azure-storage-blob/CHANGELOG.md
+++ b/sdk/storage/azure-storage-blob/CHANGELOG.md
@@ -3,6 +3,7 @@
## 12.13.0-beta.1 (Unreleased)
- Added support to get a blob client that uses an encryption scope and customer provided key.
- Added support for the 2020-10-02 service version.
+- Added support to list blobs deleted with versioning enabled.
- Added support to specify Parquet Input Serialization when querying a blob.
## 12.12.0 (2021-06-09)
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java
index 22c6f70adbf5..1516679aeba4 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java
@@ -274,6 +274,8 @@ public static BlobItem populateBlobItem(BlobItemInternal blobItemInternal) {
blobItem.setObjectReplicationSourcePolicies(
transformObjectReplicationMetadata(blobItemInternal.getObjectReplicationMetadata()));
+ blobItem.setHasVersionsOnly(blobItemInternal.isHasVersionsOnly());
+
return blobItem;
}
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItem.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItem.java
index 8d7f452f3738..c3b02028d4c1 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItem.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItem.java
@@ -70,6 +70,12 @@ public final class BlobItem {
@JsonProperty(value = "IsPrefix")
private Boolean isPrefix;
+ /*
+ * The HasVersionsOnly property.
+ */
+ @JsonProperty(value = "HasVersionsOnly")
+ private Boolean hasVersionsOnly;
+
/**
* Get the name property: The name property.
*
@@ -253,6 +259,26 @@ public BlobItem setObjectReplicationSourcePolicies(List
return this;
}
+ /**
+ * Get the hasVersionsOnly property: The HasVersionsOnly property.
+ *
+ * @return the hasVersionsOnly value.
+ */
+ public Boolean hasVersionsOnly() {
+ return this.hasVersionsOnly;
+ }
+
+ /**
+ * Set the hasVersionsOnly property: The HasVersionsOnly property.
+ *
+ * @param hasVersionsOnly the hasVersionsOnly value to set.
+ * @return the BlobItemInternal object itself.
+ */
+ public BlobItem setHasVersionsOnly(Boolean hasVersionsOnly) {
+ this.hasVersionsOnly = hasVersionsOnly;
+ return this;
+ }
+
/**
* Get the isPrefix property: The isPrefix property.
*
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobListDetails.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobListDetails.java
index 044dd4ac6e66..6a19f9c7c769 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobListDetails.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobListDetails.java
@@ -23,6 +23,7 @@ public final class BlobListDetails {
private boolean retrieveUncommittedBlobs;
private boolean retrieveDeletedBlobs;
private boolean retrieveVersions;
+ private boolean retrieveDeletedWithVersions;
private boolean retrieveImmutabilityPolicy;
private boolean retrieveLegalHold;
@@ -174,6 +175,26 @@ public BlobListDetails setRetrieveDeletedBlobs(boolean retrieveDeletedBlobs) {
return this;
}
+ /**
+ * Whether blobs which have been deleted with versioning.
+ *
+ * @return a flag indicating if deleted blobs with versioning will be returned in the listing
+ */
+ public boolean getRetrieveDeletedBlobsWithVersions() {
+ return retrieveDeletedWithVersions;
+ }
+
+ /**
+ * Whether blobs which have been deleted with versioning should be returned.
+ *
+ * @param retrieveDeletedWithVersions Flag indicating whether deleted blobs with versioning should be returned
+ * @return the updated BlobListDetails object
+ */
+ public BlobListDetails setRetrieveDeletedBlobsWithVersions(boolean retrieveDeletedWithVersions) {
+ this.retrieveDeletedWithVersions = retrieveDeletedWithVersions;
+ return this;
+ }
+
/**
* Whether immutability policy for the blob should be returned.
*
@@ -240,6 +261,9 @@ public ArrayList toList() {
if (this.retrieveVersions) {
details.add(ListBlobsIncludeItem.VERSIONS);
}
+ if (this.retrieveDeletedWithVersions) {
+ details.add(ListBlobsIncludeItem.DELETEDWITHVERSIONS);
+ }
if (this.retrieveImmutabilityPolicy) {
details.add(ListBlobsIncludeItem.IMMUTABILITYPOLICY);
}
diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy
index ebdcddea4d7d..bd09796bc6c3 100644
--- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy
+++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy
@@ -3,15 +3,13 @@
package com.azure.storage.blob
-import com.azure.core.http.rest.PagedIterable
-import com.azure.core.http.rest.PagedResponse
+
import com.azure.core.http.rest.Response
import com.azure.identity.DefaultAzureCredentialBuilder
import com.azure.storage.blob.models.AccessTier
import com.azure.storage.blob.models.AppendBlobItem
import com.azure.storage.blob.models.BlobAccessPolicy
import com.azure.storage.blob.models.BlobErrorCode
-import com.azure.storage.blob.models.BlobItem
import com.azure.storage.blob.models.BlobListDetails
import com.azure.storage.blob.models.BlobProperties
import com.azure.storage.blob.models.BlobRequestConditions
@@ -31,14 +29,10 @@ import com.azure.storage.blob.options.BlobSetAccessTierOptions
import com.azure.storage.blob.options.PageBlobCreateOptions
import com.azure.storage.blob.specialized.AppendBlobClient
import com.azure.storage.blob.specialized.BlobClientBase
-import com.azure.storage.common.StorageSharedKeyCredential
import com.azure.storage.common.Utility
-import com.azure.storage.common.implementation.StorageImplUtils
import com.azure.storage.common.test.shared.extensions.PlaybackOnly
import com.azure.storage.common.test.shared.extensions.RequiredServiceVersion
import reactor.test.StepVerifier
-import spock.lang.Requires
-import spock.lang.ResourceLock
import spock.lang.Unroll
import java.time.Duration
@@ -921,6 +915,29 @@ class ContainerAPITest extends APISpec {
.verifyComplete()
}
+ @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
+ def "list blobs flat options deleted with versions"() {
+ setup:
+ def blobName = generateBlobName()
+ def blob = cc.getBlobClient(blobName).getAppendBlobClient()
+ blob.create()
+ def metadata = new HashMap()
+ metadata.put("foo", "bar")
+ blob.setMetadata(metadata)
+ blob.delete()
+ def options = new ListBlobsOptions().setPrefix(blobName)
+ .setDetails(new BlobListDetails().setRetrieveDeletedBlobsWithVersions(true))
+
+ when:
+ def blobs = cc.listBlobs(options, null).iterator()
+
+ then:
+ def b = blobs.next()
+ !blobs.hasNext()
+ b.getName() == blobName
+ b.hasVersionsOnly()
+ }
+
def "List blobs prefix with comma"() {
setup:
def prefix = generateBlobName() + ", " + generateBlobName()
@@ -1303,6 +1320,29 @@ class ContainerAPITest extends APISpec {
}
}
+ @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
+ def "list blobs hier options deleted with versions"() {
+ setup:
+ def blobName = generateBlobName()
+ def blob = cc.getBlobClient(blobName).getAppendBlobClient()
+ blob.create()
+ def metadata = new HashMap()
+ metadata.put("foo", "bar")
+ blob.setMetadata(metadata)
+ blob.delete()
+ def options = new ListBlobsOptions().setPrefix(blobName)
+ .setDetails(new BlobListDetails().setRetrieveDeletedBlobsWithVersions(true))
+
+ when:
+ def blobs = cc.listBlobsByHierarchy("", options, null).iterator()
+
+ then:
+ def b = blobs.next()
+ !blobs.hasNext()
+ b.getName() == blobName
+ b.hasVersionsOnly()
+ }
+
@Unroll
def "List blobs hier options fail"() {
when:
diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestListBlobsFlatOptionsDeletedWithVersions.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestListBlobsFlatOptionsDeletedWithVersions.json
new file mode 100644
index 000000000000..556128b6e9ad
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestListBlobsFlatOptionsDeletedWithVersions.json
@@ -0,0 +1,112 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/8295186e08295186e76780860dbc07e929472486d90d?restype=container",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "230a2772-1c69-4408-9f21-2424e9a84d78"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D9252E3D6FD9CB",
+ "Last-Modified" : "Tue, 01 Jun 2021 18:51:17 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "6d10ded9-c01e-0014-6917-5792ad000000",
+ "x-ms-client-request-id" : "230a2772-1c69-4408-9f21-2424e9a84d78",
+ "Date" : "Tue, 01 Jun 2021 18:51:17 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/8295186e08295186e76780860dbc07e929472486d90d/8295186e18295186e767817414aac029851164b3b9b8",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "4c66d24b-834b-4a3f-845f-996c3121ba78"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D9252E3DB29E26",
+ "Last-Modified" : "Tue, 01 Jun 2021 18:51:18 GMT",
+ "x-ms-version-id" : "2021-06-01T18:51:18.3475238Z",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "6d10dfab-c01e-0014-5c17-5792ad000000",
+ "x-ms-request-server-encrypted" : "true",
+ "x-ms-client-request-id" : "4c66d24b-834b-4a3f-845f-996c3121ba78",
+ "Date" : "Tue, 01 Jun 2021 18:51:18 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/8295186e08295186e76780860dbc07e929472486d90d/8295186e18295186e767817414aac029851164b3b9b8?comp=metadata",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "eb48934a-df4c-47bf-90c5-945199f73eb1"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D9252E3DCCBA9B",
+ "Last-Modified" : "Tue, 01 Jun 2021 18:51:18 GMT",
+ "x-ms-version-id" : "2021-06-01T18:51:18.5196459Z",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-request-id" : "6d10dfdc-c01e-0014-7c17-5792ad000000",
+ "x-ms-request-server-encrypted" : "true",
+ "x-ms-client-request-id" : "eb48934a-df4c-47bf-90c5-945199f73eb1",
+ "Date" : "Tue, 01 Jun 2021 18:51:18 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "DELETE",
+ "Uri" : "https://REDACTED.blob.core.windows.net/8295186e08295186e76780860dbc07e929472486d90d/8295186e18295186e767817414aac029851164b3b9b8",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "6d85a718-b07e-4d6e-ac99-3b622bdf53b3"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-delete-type-permanent" : "false",
+ "retry-after" : "0",
+ "StatusCode" : "202",
+ "x-ms-request-id" : "6d10e00a-c01e-0014-1317-5792ad000000",
+ "x-ms-client-request-id" : "6d85a718-b07e-4d6e-ac99-3b622bdf53b3",
+ "Date" : "Tue, 01 Jun 2021 18:51:18 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "GET",
+ "Uri" : "https://REDACTED.blob.core.windows.net/8295186e08295186e76780860dbc07e929472486d90d?restype=container&comp=list&prefix=8295186e18295186e767817414aac029851164b3b9b8&include=deletedwithversions",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "7bf450cd-e0d3-45a1-b672-6e34f25fa9d2"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-request-id" : "6d10e03a-c01e-0014-2a17-5792ad000000",
+ "Body" : "8295186e18295186e767817414aac029851164b3b9b88295186e18295186e767817414aac029851164b3b9b8trueTue, 01 Jun 2021 18:51:18 GMTTue, 01 Jun 2021 18:51:18 GMT0x8D9252E3DCCBA9B0application/octet-streamAppendBlobunlockedavailabletrue",
+ "x-ms-client-request-id" : "7bf450cd-e0d3-45a1-b672-6e34f25fa9d2",
+ "Date" : "Tue, 01 Jun 2021 18:51:18 GMT",
+ "Content-Type" : "application/xml"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "8295186e08295186e76780860dbc07e929472486d90d", "8295186e18295186e767817414aac029851164b3b9b8" ]
+}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestListBlobsHierOptionsDeletedWithVersions.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestListBlobsHierOptionsDeletedWithVersions.json
new file mode 100644
index 000000000000..62ca418c4b0a
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestListBlobsHierOptionsDeletedWithVersions.json
@@ -0,0 +1,112 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/bd465e190bd465e19dd42664791b7d0f52cdc4260b90?restype=container",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "13f95fba-b06f-4ac1-8f87-41bbd13d6845"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D9252E2EEF2C55",
+ "Last-Modified" : "Tue, 01 Jun 2021 18:50:53 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "c1d30bd1-e01e-0013-0717-57fece000000",
+ "x-ms-client-request-id" : "13f95fba-b06f-4ac1-8f87-41bbd13d6845",
+ "Date" : "Tue, 01 Jun 2021 18:50:52 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/bd465e190bd465e19dd42664791b7d0f52cdc4260b90/bd465e191bd465e19dd460231e493f5fe94664b838a3",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "06615617-d81d-4083-9358-a120d707f7ef"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D9252E2F317F9E",
+ "Last-Modified" : "Tue, 01 Jun 2021 18:50:54 GMT",
+ "x-ms-version-id" : "2021-06-01T18:50:54.0132254Z",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "c1d30c55-e01e-0013-7217-57fece000000",
+ "x-ms-request-server-encrypted" : "true",
+ "x-ms-client-request-id" : "06615617-d81d-4083-9358-a120d707f7ef",
+ "Date" : "Tue, 01 Jun 2021 18:50:53 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/bd465e190bd465e19dd42664791b7d0f52cdc4260b90/bd465e191bd465e19dd460231e493f5fe94664b838a3?comp=metadata",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "0638132e-5519-4644-96f2-fca545f7f3cf"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D9252E2F4112D8",
+ "Last-Modified" : "Tue, 01 Jun 2021 18:50:54 GMT",
+ "x-ms-version-id" : "2021-06-01T18:50:54.1172991Z",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-request-id" : "c1d30c8d-e01e-0013-2417-57fece000000",
+ "x-ms-request-server-encrypted" : "true",
+ "x-ms-client-request-id" : "0638132e-5519-4644-96f2-fca545f7f3cf",
+ "Date" : "Tue, 01 Jun 2021 18:50:53 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "DELETE",
+ "Uri" : "https://REDACTED.blob.core.windows.net/bd465e190bd465e19dd42664791b7d0f52cdc4260b90/bd465e191bd465e19dd460231e493f5fe94664b838a3",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "e8931cba-3b55-40cd-ae18-2f6a0db7f608"
+ },
+ "Response" : {
+ "content-length" : "0",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-delete-type-permanent" : "false",
+ "retry-after" : "0",
+ "StatusCode" : "202",
+ "x-ms-request-id" : "c1d30cc2-e01e-0013-5417-57fece000000",
+ "x-ms-client-request-id" : "e8931cba-3b55-40cd-ae18-2f6a0db7f608",
+ "Date" : "Tue, 01 Jun 2021 18:50:53 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "GET",
+ "Uri" : "https://REDACTED.blob.core.windows.net/bd465e190bd465e19dd42664791b7d0f52cdc4260b90?restype=container&comp=list&prefix=bd465e191bd465e19dd460231e493f5fe94664b838a3&delimiter=&include=deletedwithversions",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "d0616405-0176-47cd-9682-76988c45dfdc"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "retry-after" : "0",
+ "StatusCode" : "200",
+ "x-ms-request-id" : "c1d30cfd-e01e-0013-0217-57fece000000",
+ "Body" : "bd465e191bd465e19dd460231e493f5fe94664b838a3bd465e191bd465e19dd460231e493f5fe94664b838a3trueTue, 01 Jun 2021 18:50:54 GMTTue, 01 Jun 2021 18:50:54 GMT0x8D9252E2F4112D80application/octet-streamAppendBlobunlockedavailabletrue",
+ "x-ms-client-request-id" : "d0616405-0176-47cd-9682-76988c45dfdc",
+ "Date" : "Tue, 01 Jun 2021 18:50:53 GMT",
+ "Content-Type" : "application/xml"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "bd465e190bd465e19dd42664791b7d0f52cdc4260b90", "bd465e191bd465e19dd460231e493f5fe94664b838a3" ]
+}
\ No newline at end of file
From a5d3f394bb8e89549b276647388e8b937737a5ee Mon Sep 17 00:00:00 2001
From: Gauri Prasad <51212198+gapra-msft@users.noreply.github.com>
Date: Fri, 18 Jun 2021 14:31:47 -0700
Subject: [PATCH 8/9] Addressed comments for immutable storage with versioning
(#22388)
---
.../models/InternalBlobLegalHoldResult.java | 29 +++++++++
.../util/BlobRequestConditionProperty.java | 13 ++++
.../blob/implementation/util/ModelHelper.java | 37 ++++++++++++
.../blob/models/BlobLegalHoldResult.java | 16 +----
.../blob/specialized/BlobAsyncClientBase.java | 16 +++--
.../ImmutableStorageWithVersioningTest.groovy | 60 +++++++++++--------
...oningTestSetImmutabilityPolicyACIA[0].json | 51 ++++++++++++++++
...oningTestSetImmutabilityPolicyACIA[1].json | 51 ++++++++++++++++
...oningTestSetImmutabilityPolicyACIA[2].json | 51 ++++++++++++++++
...oningTestSetImmutabilityPolicyACIA[3].json | 51 ++++++++++++++++
...oningTestSetImmutabilityPolicyACIA[4].json | 51 ++++++++++++++++
11 files changed, 382 insertions(+), 44 deletions(-)
create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/InternalBlobLegalHoldResult.java
create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobRequestConditionProperty.java
create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyACIA[0].json
create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyACIA[1].json
create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyACIA[2].json
create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyACIA[3].json
create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyACIA[4].json
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/InternalBlobLegalHoldResult.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/InternalBlobLegalHoldResult.java
new file mode 100644
index 000000000000..a2b07af0a161
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/InternalBlobLegalHoldResult.java
@@ -0,0 +1,29 @@
+// 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.BlobLegalHoldResult;
+
+/**
+ * The blob legal hold result.
+ */
+public class InternalBlobLegalHoldResult implements BlobLegalHoldResult {
+
+ private final boolean hasLegalHold;
+
+ /**
+ * Creates a new BlobLegalHoldResult
+ * @param hasLegalHold whether or not a legal hold is enabled on the blob.
+ */
+ public InternalBlobLegalHoldResult(boolean hasLegalHold) {
+ this.hasLegalHold = hasLegalHold;
+ }
+
+ /**
+ * @return whether or not a legal hold is enabled on the blob.
+ */
+ public boolean hasLegalHold() {
+ return hasLegalHold;
+ }
+}
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobRequestConditionProperty.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobRequestConditionProperty.java
new file mode 100644
index 000000000000..8040c6126095
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobRequestConditionProperty.java
@@ -0,0 +1,13 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.storage.blob.implementation.util;
+
+public enum BlobRequestConditionProperty {
+ LEASE_ID,
+ TAGS_CONDITIONS,
+ IF_MODIFIED_SINCE,
+ IF_UNMODIFIED_SINCE,
+ IF_MATCH,
+ IF_NONE_MATCH;
+}
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java
index 1516679aeba4..1afb9de4ac41 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java
@@ -24,6 +24,7 @@
import com.azure.storage.blob.models.BlobItemProperties;
import com.azure.storage.blob.models.BlobLeaseRequestConditions;
import com.azure.storage.blob.models.BlobQueryHeaders;
+import com.azure.storage.blob.models.BlobRequestConditions;
import com.azure.storage.blob.models.ObjectReplicationPolicy;
import com.azure.storage.blob.models.ObjectReplicationRule;
import com.azure.storage.blob.models.ObjectReplicationStatus;
@@ -37,6 +38,7 @@
import java.net.URL;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.EnumSet;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -500,4 +502,39 @@ public static BlobQueryHeaders transformQueryHeaders(HttpHeaders headers) {
throw LOGGER.logExceptionAsError(new RuntimeException(e));
}
}
+
+ public static void validateConditionsNotPresent(BlobRequestConditions requestConditions,
+ EnumSet invalidConditions) {
+ if (requestConditions == null) {
+ return;
+ }
+ if (invalidConditions.contains(BlobRequestConditionProperty.LEASE_ID)
+ && requestConditions.getLeaseId() != null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException("'leaseId' is not applicable to this API."));
+ }
+ if (invalidConditions.contains(BlobRequestConditionProperty.TAGS_CONDITIONS)
+ && requestConditions.getTagsConditions() != null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException("'tagsConditions' is not applicable to "
+ + "this API."));
+ }
+ if (invalidConditions.contains(BlobRequestConditionProperty.IF_MODIFIED_SINCE)
+ && requestConditions.getIfModifiedSince() != null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException("'ifModifiedSince' is not applicable to "
+ + "this API."));
+ }
+ if (invalidConditions.contains(BlobRequestConditionProperty.IF_UNMODIFIED_SINCE)
+ && requestConditions.getIfUnmodifiedSince() != null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException("'ifUnmodifiedSince' is not applicable to "
+ + "this API."));
+ }
+ if (invalidConditions.contains(BlobRequestConditionProperty.IF_MATCH)
+ && requestConditions.getIfMatch() != null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException("'ifMatch' is not applicable to this API."));
+ }
+ if (invalidConditions.contains(BlobRequestConditionProperty.IF_NONE_MATCH)
+ && requestConditions.getIfNoneMatch() != null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException("'ifNoneMatch' is not applicable to this "
+ + "API."));
+ }
+ }
}
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobLegalHoldResult.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobLegalHoldResult.java
index a25179528491..a174a24933c2 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobLegalHoldResult.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobLegalHoldResult.java
@@ -6,22 +6,10 @@
/**
* The blob legal hold result.
*/
-public class BlobLegalHoldResult {
-
- private final boolean hasLegalHold;
-
- /**
- * Creates a new BlobLegalHoldResult
- * @param hasLegalHold whether or not a legal hold is enabled on the blob.
- */
- public BlobLegalHoldResult(boolean hasLegalHold) {
- this.hasLegalHold = hasLegalHold;
- }
+public interface BlobLegalHoldResult {
/**
* @return whether or not a legal hold is enabled on the blob.
*/
- public boolean hasLegalHold() {
- return hasLegalHold;
- }
+ boolean hasLegalHold();
}
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java
index 4e66bcaa6aa8..e5d0d664ab80 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java
@@ -34,19 +34,21 @@
import com.azure.storage.blob.implementation.models.BlobsSetImmutabilityPolicyHeaders;
import com.azure.storage.blob.implementation.models.BlobsStartCopyFromURLHeaders;
import com.azure.storage.blob.implementation.models.EncryptionScope;
+import com.azure.storage.blob.implementation.models.InternalBlobLegalHoldResult;
import com.azure.storage.blob.implementation.models.QueryRequest;
import com.azure.storage.blob.implementation.models.QuerySerialization;
import com.azure.storage.blob.implementation.util.BlobQueryReader;
+import com.azure.storage.blob.implementation.util.BlobRequestConditionProperty;
import com.azure.storage.blob.implementation.util.BlobSasImplUtil;
import com.azure.storage.blob.implementation.util.ChunkedDownloadUtils;
import com.azure.storage.blob.implementation.util.ModelHelper;
import com.azure.storage.blob.models.AccessTier;
import com.azure.storage.blob.models.ArchiveStatus;
-import com.azure.storage.blob.models.BlobDownloadContentAsyncResponse;
-import com.azure.storage.blob.models.BlobDownloadHeaders;
import com.azure.storage.blob.models.BlobBeginCopySourceRequestConditions;
import com.azure.storage.blob.models.BlobCopyInfo;
import com.azure.storage.blob.models.BlobDownloadAsyncResponse;
+import com.azure.storage.blob.models.BlobDownloadContentAsyncResponse;
+import com.azure.storage.blob.models.BlobDownloadHeaders;
import com.azure.storage.blob.models.BlobHttpHeaders;
import com.azure.storage.blob.models.BlobImmutabilityPolicy;
import com.azure.storage.blob.models.BlobImmutabilityPolicyMode;
@@ -99,6 +101,7 @@
import java.time.Duration;
import java.time.OffsetDateTime;
import java.util.ArrayList;
+import java.util.EnumSet;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
@@ -2240,7 +2243,12 @@ Mono> setImmutabilityPolicyWithResponse(
BlobRequestConditions finalRequestConditions = requestConditions == null
? new BlobRequestConditions() : requestConditions;
- // TODO (gapra) : Discuss, should we just expose ifUnmodifiedSince here?
+
+ ModelHelper.validateConditionsNotPresent(finalRequestConditions,
+ EnumSet.of(BlobRequestConditionProperty.LEASE_ID, BlobRequestConditionProperty.TAGS_CONDITIONS,
+ BlobRequestConditionProperty.IF_MATCH, BlobRequestConditionProperty.IF_NONE_MATCH,
+ BlobRequestConditionProperty.IF_MODIFIED_SINCE));
+
return this.azureBlobStorage.getBlobs().setImmutabilityPolicyWithResponseAsync(containerName, blobName, null,
null, finalRequestConditions.getIfUnmodifiedSince(), finalImmutabilityPolicy.getExpiryTime(),
finalImmutabilityPolicy.getPolicyMode(),
@@ -2349,6 +2357,6 @@ Mono> setLegalHoldWithResponse(boolean legalHold,
legalHold, null, null,
context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE))
.map(response -> new SimpleResponse<>(response,
- new BlobLegalHoldResult(response.getDeserializedHeaders().isXMsLegalHold())));
+ new InternalBlobLegalHoldResult(response.getDeserializedHeaders().isXMsLegalHold())));
}
}
diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ImmutableStorageWithVersioningTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ImmutableStorageWithVersioningTest.groovy
index aaf441258acd..7cbed8318295 100644
--- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ImmutableStorageWithVersioningTest.groovy
+++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ImmutableStorageWithVersioningTest.groovy
@@ -48,9 +48,11 @@ import spock.lang.Unroll
import java.nio.ByteBuffer
import java.nio.charset.StandardCharsets
import java.time.Duration
-import java.time.temporal.ChronoUnit
+ import java.time.OffsetDateTime
+ import java.time.temporal.ChronoUnit
@ResourceLock("ManagementPlaneThrottling")
+@RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
class ImmutableStorageWithVersioningTest extends APISpec {
private BlobContainerClient vlwContainer;
@@ -65,7 +67,6 @@ class ImmutableStorageWithVersioningTest extends APISpec {
def setup() {
containerName = generateContainerName()
-
if (env.testMode != TestMode.PLAYBACK) {
String url = String.format("https://management.azure.com/subscriptions/%s/resourceGroups/%s/providers/"
+ "Microsoft.Storage/storageAccounts/%s/blobServices/default/containers/%s?api-version=%s", subscriptionId,
@@ -138,7 +139,7 @@ class ImmutableStorageWithVersioningTest extends APISpec {
if (blob.getProperties().hasLegalHold()) {
blobClient.setLegalHold(false)
}
- if (blob.getProperties().getImmutabilityPolicyMode() != null) {
+ if (blob.getProperties().getImmutabilityPolicy().getPolicyMode() != null) {
sleepIfRecord(5 * 1000)
blobClient.deleteImmutabilityPolicy()
}
@@ -156,7 +157,6 @@ class ImmutableStorageWithVersioningTest extends APISpec {
}
- @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
def "set immutability policy min"() {
setup:
def expiryTime = getNamer().getUtcNow().plusSeconds(2)
@@ -175,7 +175,6 @@ class ImmutableStorageWithVersioningTest extends APISpec {
BlobImmutabilityPolicyMode.UNLOCKED == response.getPolicyMode()
}
- @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
@Unroll
def "set immutability policy"() {
setup:
@@ -218,7 +217,6 @@ class ImmutableStorageWithVersioningTest extends APISpec {
BlobImmutabilityPolicyMode.UNLOCKED || _
}
- @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
@Unroll
def "set immutability policy AC"() {
setup:
@@ -241,7 +239,6 @@ class ImmutableStorageWithVersioningTest extends APISpec {
newDate || _
}
- @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
def "set immutability policy AC fail"() {
setup:
def bac = new BlobRequestConditions()
@@ -259,7 +256,36 @@ class ImmutableStorageWithVersioningTest extends APISpec {
e.getErrorCode() == BlobErrorCode.CONDITION_NOT_MET
}
- @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
+ @Unroll
+ def "set immutability policy AC IA"() {
+ setup:
+ def bac = new BlobRequestConditions()
+ .setLeaseId(leaseId)
+ .setTagsConditions(tags)
+ .setIfMatch(ifMatch)
+ .setIfNoneMatch(ifNoneMatch)
+ .setIfModifiedSince(ifModifiedSince)
+ def expiryTime = getNamer().getUtcNow().plusSeconds(2)
+ def immutabilityPolicy = new BlobImmutabilityPolicy()
+ .setExpiryTime(expiryTime)
+ .setPolicyMode(BlobImmutabilityPolicyMode.UNLOCKED)
+
+ when:
+ vlwBlob.setImmutabilityPolicyWithResponse(immutabilityPolicy, bac, null, null)
+
+ then:
+ def e = thrown(IllegalArgumentException)
+ e.getMessage() == wrongCondition + " is not applicable to this API."
+
+ where:
+ leaseId | tags | ifMatch | ifNoneMatch | ifModifiedSince || wrongCondition
+ "leaseId" | null | null | null | null || "'leaseId'"
+ null | "tagsConditions" | null | null | null || "'tagsConditions'"
+ null | null | "ifMatch" | null | null || "'ifMatch'"
+ null | null | null | "ifNoneMatch" | null || "'ifNoneMatch'"
+ null | null | null | null | oldDate || "'ifModifiedSince'"
+ }
+
def "set immutability policy error"() {
setup:
def blob = vlwContainer.getBlobClient(generateBlobName())
@@ -276,7 +302,6 @@ class ImmutableStorageWithVersioningTest extends APISpec {
e.getErrorCode() == BlobErrorCode.BLOB_NOT_FOUND
}
- @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
def "set immutability policy IA"() {
setup:
def expiryTime = getNamer().getUtcNow().plusSeconds(2)
@@ -292,7 +317,6 @@ class ImmutableStorageWithVersioningTest extends APISpec {
e.getMessage() == "immutabilityPolicy.policyMode must be Locked or Unlocked"
}
- @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
def "delete immutability policy min"() {
setup:
def expiryTime = getNamer().getUtcNow().plusSeconds(2)
@@ -310,7 +334,6 @@ class ImmutableStorageWithVersioningTest extends APISpec {
properties.getImmutabilityPolicy().getExpiryTime() == null
}
- @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
def "delete immutability policy"() {
setup:
def expiryTime = getNamer().getUtcNow().plusSeconds(2)
@@ -328,7 +351,6 @@ class ImmutableStorageWithVersioningTest extends APISpec {
properties.getImmutabilityPolicy().getExpiryTime() == null
}
- @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
def "delete immutability policy error"() {
setup:
def blob = vlwContainer.getBlobClient(generateBlobName())
@@ -341,7 +363,6 @@ class ImmutableStorageWithVersioningTest extends APISpec {
e.getErrorCode() == BlobErrorCode.BLOB_NOT_FOUND
}
- @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
@Unroll
def "set legal hold min"() {
when:
@@ -356,7 +377,6 @@ class ImmutableStorageWithVersioningTest extends APISpec {
false || _
}
- @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
@Unroll
def "set legal hold"() {
when: "set legal hold"
@@ -387,7 +407,6 @@ class ImmutableStorageWithVersioningTest extends APISpec {
false || _
}
- @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
def "set legal hold error"() {
setup:
def blob = vlwContainer.getBlobClient(generateBlobName())
@@ -400,7 +419,6 @@ class ImmutableStorageWithVersioningTest extends APISpec {
e.getErrorCode() == BlobErrorCode.BLOB_NOT_FOUND
}
- @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
def "container properties"() {
when:
def response = vlwContainer.getProperties()
@@ -417,7 +435,6 @@ class ImmutableStorageWithVersioningTest extends APISpec {
container.getProperties().isImmutableStorageWithVersioningEnabled()
}
- @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
def "append blob create"() {
setup:
def appendBlob = vlwContainer.getBlobClient(generateBlobName()).getAppendBlobClient()
@@ -440,7 +457,6 @@ class ImmutableStorageWithVersioningTest extends APISpec {
response.hasLegalHold()
}
- @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
def "page blob create"() {
setup:
def pageBlob = vlwContainer.getBlobClient(generateBlobName()).getPageBlobClient()
@@ -463,7 +479,6 @@ class ImmutableStorageWithVersioningTest extends APISpec {
response.hasLegalHold()
}
- @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
def "block blob commit block list"() {
setup:
def blockBlob = vlwBlob.getBlockBlobClient()
@@ -486,7 +501,6 @@ class ImmutableStorageWithVersioningTest extends APISpec {
response.hasLegalHold()
}
- @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
def "block blob upload"() {
setup:
def blockBlob = vlwBlob.getBlockBlobClient()
@@ -509,7 +523,6 @@ class ImmutableStorageWithVersioningTest extends APISpec {
response.hasLegalHold()
}
- @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
@Unroll
@LiveOnly
def "blob upload"() {
@@ -539,7 +552,6 @@ class ImmutableStorageWithVersioningTest extends APISpec {
null || _ // Tests single shot upload
}
- @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
def "sync copy"() {
setup:
vlwContainer.setAccessPolicy(PublicAccessType.CONTAINER, null)
@@ -566,7 +578,6 @@ class ImmutableStorageWithVersioningTest extends APISpec {
vlwContainer.setAccessPolicy(null, null)
}
- @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
def "copy"() {
setup:
def destination = vlwContainer.getBlobClient(generateBlobName()).getBlockBlobClient()
@@ -591,7 +602,6 @@ class ImmutableStorageWithVersioningTest extends APISpec {
}
/* SAS tests */
- @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
def "account sas"() {
setup:
def expiryTime = namer.getUtcNow().plusDays(1)
@@ -622,7 +632,6 @@ class ImmutableStorageWithVersioningTest extends APISpec {
!response.hasLegalHold()
}
- @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
def "container sas"() {
setup:
def expiryTime = namer.getUtcNow().plusDays(1)
@@ -651,7 +660,6 @@ class ImmutableStorageWithVersioningTest extends APISpec {
!response.hasLegalHold()
}
- @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "V2020_10_02")
def "blob sas"() {
setup:
def expiryTime = namer.getUtcNow().plusDays(1)
diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyACIA[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyACIA[0].json
new file mode 100644
index 000000000000..4f3f34498bc4
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyACIA[0].json
@@ -0,0 +1,51 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/1e8e8c1301e8e8c13d1e4448478653498e9004a219f2?restype=container",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "da7835f2-2cb0-40eb-9f13-0e808de4b12f"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D93288C91D6509",
+ "Last-Modified" : "Fri, 18 Jun 2021 18:42:12 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "fc34c3f0-f01e-0001-1571-649c3e000000",
+ "x-ms-client-request-id" : "da7835f2-2cb0-40eb-9f13-0e808de4b12f",
+ "Date" : "Fri, 18 Jun 2021 18:42:11 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/1e8e8c1311e8e8c13d1e86956ffcc18240e2b4ad1b61/1e8e8c1321e8e8c13d1e55651a3205039d57541cc88c",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "b96decb4-acca-4a6c-ada0-f82fe8090be7",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-content-crc64" : "AAAAAAAAAAA=",
+ "Last-Modified" : "Fri, 18 Jun 2021 18:42:15 GMT",
+ "x-ms-version-id" : "2021-06-18T18:42:15.2590905Z",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 18 Jun 2021 18:42:15 GMT",
+ "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==",
+ "eTag" : "0x8D93288CB03A639",
+ "x-ms-request-id" : "fc34c401-f01e-0001-2271-649c3e000000",
+ "x-ms-client-request-id" : "b96decb4-acca-4a6c-ada0-f82fe8090be7"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "1e8e8c1301e8e8c13d1e4448478653498e9004a219f2", "1e8e8c1311e8e8c13d1e86956ffcc18240e2b4ad1b61", "1e8e8c1321e8e8c13d1e55651a3205039d57541cc88c", "2021-06-18T18:42:16.251301Z" ]
+}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyACIA[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyACIA[1].json
new file mode 100644
index 000000000000..08ba8e7080c0
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyACIA[1].json
@@ -0,0 +1,51 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/0795bd5200795bd5264a871964e42487c620d4113860?restype=container",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "57037666-1f95-4d07-9930-802b4c50fce4"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D93288CC0E4AE6",
+ "Last-Modified" : "Fri, 18 Jun 2021 18:42:17 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "fc34c419-f01e-0001-3671-649c3e000000",
+ "x-ms-client-request-id" : "57037666-1f95-4d07-9930-802b4c50fce4",
+ "Date" : "Fri, 18 Jun 2021 18:42:16 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/0795bd5210795bd5264a783820c02b3169fc34074a83/0795bd5220795bd5264a93710522f48ec6a7f418d8e3",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "f6693c7e-5d3d-4091-9256-e17a00c03888",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-content-crc64" : "AAAAAAAAAAA=",
+ "Last-Modified" : "Fri, 18 Jun 2021 18:42:19 GMT",
+ "x-ms-version-id" : "2021-06-18T18:42:19.0179529Z",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 18 Jun 2021 18:42:18 GMT",
+ "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==",
+ "eTag" : "0x8D93288CD4134C9",
+ "x-ms-request-id" : "fc34c428-f01e-0001-4271-649c3e000000",
+ "x-ms-client-request-id" : "f6693c7e-5d3d-4091-9256-e17a00c03888"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "0795bd5200795bd5264a871964e42487c620d4113860", "0795bd5210795bd5264a783820c02b3169fc34074a83", "0795bd5220795bd5264a93710522f48ec6a7f418d8e3", "2021-06-18T18:42:19.976318300Z" ]
+}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyACIA[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyACIA[2].json
new file mode 100644
index 000000000000..155f44569994
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyACIA[2].json
@@ -0,0 +1,51 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/2cb8ee9102cb8ee9164102835a79ea298db1a4894aae?restype=container",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "fd680b20-cd02-4150-b4c3-ce35d27c7128"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D93288CE06EB2B",
+ "Last-Modified" : "Fri, 18 Jun 2021 18:42:20 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "fc34c440-f01e-0001-5171-649c3e000000",
+ "x-ms-client-request-id" : "fd680b20-cd02-4150-b4c3-ce35d27c7128",
+ "Date" : "Fri, 18 Jun 2021 18:42:20 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/2cb8ee9112cb8ee9164137518b52f87282b0941deb76/2cb8ee9122cb8ee9164196392ec1ff16ca250421c830",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "8a2d1417-399a-449b-91d6-9b63894ecbbc",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-content-crc64" : "AAAAAAAAAAA=",
+ "Last-Modified" : "Fri, 18 Jun 2021 18:42:21 GMT",
+ "x-ms-version-id" : "2021-06-18T18:42:21.4295815Z",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 18 Jun 2021 18:42:21 GMT",
+ "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==",
+ "eTag" : "0x8D93288CEB13107",
+ "x-ms-request-id" : "fc34c44e-f01e-0001-5a71-649c3e000000",
+ "x-ms-client-request-id" : "8a2d1417-399a-449b-91d6-9b63894ecbbc"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "2cb8ee9102cb8ee9164102835a79ea298db1a4894aae", "2cb8ee9112cb8ee9164137518b52f87282b0941deb76", "2cb8ee9122cb8ee9164196392ec1ff16ca250421c830", "2021-06-18T18:42:22.389302800Z" ]
+}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyACIA[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyACIA[3].json
new file mode 100644
index 000000000000..43467d72fb00
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyACIA[3].json
@@ -0,0 +1,51 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/35a3dfd0035a3dfd06a9905570e076781bcfc459ab19?restype=container",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "5e16c32a-29b4-47b4-908f-218e8bca0407"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D93288CF773572",
+ "Last-Modified" : "Fri, 18 Jun 2021 18:42:22 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "fc34c459-f01e-0001-6471-649c3e000000",
+ "x-ms-client-request-id" : "5e16c32a-29b4-47b4-908f-218e8bca0407",
+ "Date" : "Fri, 18 Jun 2021 18:42:22 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/35a3dfd0135a3dfd06a986521d0138992e11d49bda42/35a3dfd0235a3dfd06a92931554d601c5752c41d4a1d",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "d21b6c89-5215-416f-8aeb-1c91a5e2e8ec",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-content-crc64" : "AAAAAAAAAAA=",
+ "Last-Modified" : "Fri, 18 Jun 2021 18:42:23 GMT",
+ "x-ms-version-id" : "2021-06-18T18:42:23.7032885Z",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 18 Jun 2021 18:42:23 GMT",
+ "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==",
+ "eTag" : "0x8D93288D00C21B5",
+ "x-ms-request-id" : "fc34c460-f01e-0001-6971-649c3e000000",
+ "x-ms-client-request-id" : "d21b6c89-5215-416f-8aeb-1c91a5e2e8ec"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "35a3dfd0035a3dfd06a9905570e076781bcfc459ab19", "35a3dfd0135a3dfd06a986521d0138992e11d49bda42", "35a3dfd0235a3dfd06a92931554d601c5752c41d4a1d", "2021-06-18T18:42:24.657302800Z" ]
+}
\ No newline at end of file
diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyACIA[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyACIA[4].json
new file mode 100644
index 000000000000..8ec72aeea119
--- /dev/null
+++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ImmutableStorageWithVersioningTestSetImmutabilityPolicyACIA[4].json
@@ -0,0 +1,51 @@
+{
+ "networkCallRecords" : [ {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/7ae2491707ae24917e0e112126fda4915ca294f5e942?restype=container",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "dd31cb6e-af83-4c93-9e7d-decd45935e0a"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "eTag" : "0x8D93288D0CC3382",
+ "Last-Modified" : "Fri, 18 Jun 2021 18:42:24 GMT",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-id" : "fc34c46e-f01e-0001-7571-649c3e000000",
+ "x-ms-client-request-id" : "dd31cb6e-af83-4c93-9e7d-decd45935e0a",
+ "Date" : "Fri, 18 Jun 2021 18:42:24 GMT"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.blob.core.windows.net/7ae2491717ae24917e0e668618a86a9b9006a4da9913/7ae2491727ae24917e0e80803ccac87d6b83647ba9ba",
+ "Headers" : {
+ "x-ms-version" : "2020-10-02",
+ "User-Agent" : "azsdk-java-azure-storage-blob/12.12.0-beta.2 (11.0.7; Windows 10; 10.0)",
+ "x-ms-client-request-id" : "0b92404f-d4d0-44db-8aed-950801357fcb",
+ "Content-Type" : "application/octet-stream"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "x-ms-version" : "2020-10-02",
+ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-content-crc64" : "AAAAAAAAAAA=",
+ "Last-Modified" : "Fri, 18 Jun 2021 18:42:25 GMT",
+ "x-ms-version-id" : "2021-06-18T18:42:25.9120332Z",
+ "retry-after" : "0",
+ "StatusCode" : "201",
+ "x-ms-request-server-encrypted" : "true",
+ "Date" : "Fri, 18 Jun 2021 18:42:25 GMT",
+ "Content-MD5" : "1B2M2Y8AsgTpgAmY7PhCfg==",
+ "eTag" : "0x8D93288D15D28CC",
+ "x-ms-request-id" : "fc34c47b-f01e-0001-7e71-649c3e000000",
+ "x-ms-client-request-id" : "0b92404f-d4d0-44db-8aed-950801357fcb"
+ },
+ "Exception" : null
+ } ],
+ "variables" : [ "7ae2491707ae24917e0e112126fda4915ca294f5e942", "7ae2491717ae24917e0e668618a86a9b9006a4da9913", "7ae2491727ae24917e0e80803ccac87d6b83647ba9ba", "2021-06-18T18:42:26.864331800Z" ]
+}
\ No newline at end of file
From b3aac3d4f6fde00f17331cb6a189b3709f0b52ff Mon Sep 17 00:00:00 2001
From: Kamil Sobol <61715331+kasobol-msft@users.noreply.github.com>
Date: Thu, 24 Jun 2021 09:34:04 -0700
Subject: [PATCH 9/9] Develop on main, part 1 (#22451)
* move back service version.
* pin CI.
* fix ci.
* fix ci ?
* fix live tests ?
* use latest service version to filter if not specified in variable.
* use latest service version to filter if not specified in variable.
* does this work ??
* missing stuff.
* move that piece to parent as well.
* rollback yml changes in favor of pom.xml
* fix build ?
* how about this ?
* more ?
* not this.
* rollback some.
* does this work ??
---
eng/DependencyGraph/gen-dep-graph-data.ps1 | 8 +++---
sdk/parents/azure-client-sdk-parent/pom.xml | 4 +++
sdk/storage/azure-storage-blob-batch/pom.xml | 1 +
.../azure-storage-blob-changefeed/pom.xml | 1 +
.../azure-storage-blob-cryptography/pom.xml | 1 +
sdk/storage/azure-storage-blob-nio/pom.xml | 1 +
sdk/storage/azure-storage-blob/pom.xml | 1 +
.../storage/blob/BlobServiceVersion.java | 2 +-
.../azure-storage-common/ci.system.properties | 2 ++
.../common/implementation/Constants.java | 2 +-
.../RequiredServiceVersionExtension.java | 25 ++++++++++++++-----
.../azure-storage-file-datalake/pom.xml | 1 +
.../file/datalake/DataLakeServiceVersion.java | 2 +-
sdk/storage/azure-storage-file-share/pom.xml | 4 +++
.../file/share/ShareServiceVersion.java | 2 +-
sdk/storage/azure-storage-queue/pom.xml | 4 +++
.../storage/queue/QueueServiceVersion.java | 2 +-
17 files changed, 48 insertions(+), 15 deletions(-)
create mode 100644 sdk/storage/azure-storage-common/ci.system.properties
diff --git a/eng/DependencyGraph/gen-dep-graph-data.ps1 b/eng/DependencyGraph/gen-dep-graph-data.ps1
index d3540a9f60bc..0e1e6084cfcd 100644
--- a/eng/DependencyGraph/gen-dep-graph-data.ps1
+++ b/eng/DependencyGraph/gen-dep-graph-data.ps1
@@ -47,7 +47,7 @@ class Library {
$retString += " `"deps`": [`n"
$first = $true
foreach($item in $this.DepHash.GetEnumerator() | Sort-Object Name)
- {
+ {
if (!$first)
{
$retString += ",`n"
@@ -62,7 +62,7 @@ class Library {
}
}
-# While this is similar to library there are no dependencies and the
+# While this is similar to library there are no dependencies and the
# type will be "internalbinary". This entry is applicable to client libraries
# which aren't being built AKA dependencies. Note: If we opt to include
# external_dependencies then the type will be "external".
@@ -70,7 +70,7 @@ class Dependency {
[string]$id # ::
[string]$name # :
[string]$version
- [string]$type = "internalbinary"
+ [string]$type = "internalbinary"
Dependency(
[string]$groupId,
[string]$artifactId,
@@ -116,7 +116,7 @@ Get-ChildItem -Path $Path -Filter pom*.xml -Recurse -File | ForEach-Object {
$xmlPomFile = New-Object xml
$xmlPomFile.Load($pomFile)
- if ($ValidParents -notcontains $xmlPomFile.project.parent.artifactId)
+ if ($ValidParents -notcontains $xmlPomFile.project.parent.artifactId)
{
return
}
diff --git a/sdk/parents/azure-client-sdk-parent/pom.xml b/sdk/parents/azure-client-sdk-parent/pom.xml
index 4cc99452d6f6..62ae0b413d1f 100644
--- a/sdk/parents/azure-client-sdk-parent/pom.xml
+++ b/sdk/parents/azure-client-sdk-parent/pom.xml
@@ -1159,6 +1159,7 @@
true
+ ${AZURE_TEST_SYSTEM_PLAYBACK_PROPERTIES_FILE}
@@ -1183,6 +1184,7 @@
true
+ ${AZURE_TEST_SYSTEM_PLAYBACK_PROPERTIES_FILE}
@@ -1206,6 +1208,7 @@
true
+ ${AZURE_TEST_SYSTEM_PLAYBACK_PROPERTIES_FILE}
@@ -1230,6 +1233,7 @@
true
+ ${AZURE_TEST_SYSTEM_PLAYBACK_PROPERTIES_FILE}
diff --git a/sdk/storage/azure-storage-blob-batch/pom.xml b/sdk/storage/azure-storage-blob-batch/pom.xml
index 49d205f79c09..f55a01f9aa28 100644
--- a/sdk/storage/azure-storage-blob-batch/pom.xml
+++ b/sdk/storage/azure-storage-blob-batch/pom.xml
@@ -35,6 +35,7 @@
src/main/java
src/test/java
+ ../azure-storage-common/ci.system.properties
diff --git a/sdk/storage/azure-storage-blob-changefeed/pom.xml b/sdk/storage/azure-storage-blob-changefeed/pom.xml
index 2faac9993e50..c223ff6651a7 100644
--- a/sdk/storage/azure-storage-blob-changefeed/pom.xml
+++ b/sdk/storage/azure-storage-blob-changefeed/pom.xml
@@ -35,6 +35,7 @@
src/main/java
src/test/java
+ ../azure-storage-common/ci.system.properties
diff --git a/sdk/storage/azure-storage-blob-cryptography/pom.xml b/sdk/storage/azure-storage-blob-cryptography/pom.xml
index 090e827fa8a6..1a195e21a257 100644
--- a/sdk/storage/azure-storage-blob-cryptography/pom.xml
+++ b/sdk/storage/azure-storage-blob-cryptography/pom.xml
@@ -35,6 +35,7 @@
0.18
0.09
+ ../azure-storage-common/ci.system.properties
diff --git a/sdk/storage/azure-storage-blob-nio/pom.xml b/sdk/storage/azure-storage-blob-nio/pom.xml
index b07acc038270..f035af7092b4 100644
--- a/sdk/storage/azure-storage-blob-nio/pom.xml
+++ b/sdk/storage/azure-storage-blob-nio/pom.xml
@@ -34,6 +34,7 @@
src/main/java
src/test/java
+ ../azure-storage-common/ci.system.properties
diff --git a/sdk/storage/azure-storage-blob/pom.xml b/sdk/storage/azure-storage-blob/pom.xml
index e84761c32cfa..d38f9b4d6043 100644
--- a/sdk/storage/azure-storage-blob/pom.xml
+++ b/sdk/storage/azure-storage-blob/pom.xml
@@ -35,6 +35,7 @@
src/main/java
src/test/java
+ ../azure-storage-common/ci.system.properties
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceVersion.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceVersion.java
index bfe0d4b5b3e7..bdfbed88e68e 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceVersion.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceVersion.java
@@ -38,6 +38,6 @@ public String getVersion() {
* @return the latest {@link BlobServiceVersion}
*/
public static BlobServiceVersion getLatest() {
- return V2020_10_02;
+ return V2020_08_04;
}
}
diff --git a/sdk/storage/azure-storage-common/ci.system.properties b/sdk/storage/azure-storage-common/ci.system.properties
new file mode 100644
index 000000000000..dae2d9857f25
--- /dev/null
+++ b/sdk/storage/azure-storage-common/ci.system.properties
@@ -0,0 +1,2 @@
+AZURE_LIVE_TEST_SERVICE_VERSION=V2020_10_02
+AZURE_STORAGE_SAS_SERVICE_VERSION=2020-10-02
diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/Constants.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/Constants.java
index 432cb7b310b0..87a89e5a525d 100644
--- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/Constants.java
+++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/Constants.java
@@ -78,7 +78,7 @@ public final class Constants {
public static final String PROPERTY_AZURE_STORAGE_SAS_SERVICE_VERSION = "AZURE_STORAGE_SAS_SERVICE_VERSION";
public static final String SAS_SERVICE_VERSION = Configuration.getGlobalConfiguration()
- .get(PROPERTY_AZURE_STORAGE_SAS_SERVICE_VERSION, "2020-10-02");
+ .get(PROPERTY_AZURE_STORAGE_SAS_SERVICE_VERSION, "2020-08-04");
private Constants() {
}
diff --git a/sdk/storage/azure-storage-common/src/test-shared/java/com/azure/storage/common/test/shared/extensions/RequiredServiceVersionExtension.java b/sdk/storage/azure-storage-common/src/test-shared/java/com/azure/storage/common/test/shared/extensions/RequiredServiceVersionExtension.java
index aaddf445dac0..8134942d0e9f 100644
--- a/sdk/storage/azure-storage-common/src/test-shared/java/com/azure/storage/common/test/shared/extensions/RequiredServiceVersionExtension.java
+++ b/sdk/storage/azure-storage-common/src/test-shared/java/com/azure/storage/common/test/shared/extensions/RequiredServiceVersionExtension.java
@@ -8,11 +8,13 @@
import org.spockframework.runtime.model.FeatureInfo;
import org.spockframework.runtime.model.SpecInfo;
+import java.lang.reflect.InvocationTargetException;
+
public class RequiredServiceVersionExtension implements IAnnotationDrivenExtension {
@Override
public void visitFeatureAnnotation(RequiredServiceVersion annotation, FeatureInfo feature) {
- String targetServiceVersion = TestEnvironment.getInstance().getServiceVersion();
+ Enum targetServiceVersion = getTargetServiceVersion(annotation.clazz());
String minServiceVersion = annotation.min();
if (shouldSkip(targetServiceVersion, minServiceVersion, annotation.clazz())) {
feature.skip(String.format("Test ignored to run with %s service version", targetServiceVersion));
@@ -21,19 +23,30 @@ public void visitFeatureAnnotation(RequiredServiceVersion annotation, FeatureInf
@Override
public void visitSpecAnnotation(RequiredServiceVersion annotation, SpecInfo spec) {
- String targetServiceVersion = TestEnvironment.getInstance().getServiceVersion();
+ Enum targetServiceVersion = getTargetServiceVersion(annotation.clazz());
String minServiceVersion = annotation.min();
if (shouldSkip(targetServiceVersion, minServiceVersion, annotation.clazz())) {
spec.skip(String.format("Test ignored to run with %s service version", targetServiceVersion));
}
}
- private boolean shouldSkip(String targetServiceVersion, String minServiceVersion, Class clazz) {
- if (targetServiceVersion == null) {
- return false;
+ private Enum getTargetServiceVersion(Class clazz) {
+ String targetServiceVersionFromEnvironment = TestEnvironment.getInstance().getServiceVersion();
+ if (targetServiceVersionFromEnvironment != null) {
+ // Use environment defined version first.
+ return Enum.valueOf(clazz, targetServiceVersionFromEnvironment);
+ } else {
+ // Fall back to "latest" service version otherwise.
+ try {
+ return (Enum) clazz.getMethod("getLatest").invoke(null);
+ } catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {
+ throw new RuntimeException(e);
+ }
}
+ }
- int targetOrdinal = Enum.valueOf(clazz, targetServiceVersion).ordinal();
+ private boolean shouldSkip(Enum targetServiceVersion, String minServiceVersion, Class clazz) {
+ int targetOrdinal = targetServiceVersion.ordinal();
int minOrdinal = Enum.valueOf(clazz, minServiceVersion).ordinal();
return targetOrdinal < minOrdinal;
}
diff --git a/sdk/storage/azure-storage-file-datalake/pom.xml b/sdk/storage/azure-storage-file-datalake/pom.xml
index dd1d44ee7d8d..9e746e0b9e84 100644
--- a/sdk/storage/azure-storage-file-datalake/pom.xml
+++ b/sdk/storage/azure-storage-file-datalake/pom.xml
@@ -35,6 +35,7 @@
src/main/java
src/test/java
+ ../azure-storage-common/ci.system.properties
diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeServiceVersion.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeServiceVersion.java
index 4152f1c501c1..0f297093d777 100644
--- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeServiceVersion.java
+++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeServiceVersion.java
@@ -38,6 +38,6 @@ public String getVersion() {
* @return the latest {@link DataLakeServiceVersion}
*/
public static DataLakeServiceVersion getLatest() {
- return V2020_10_02;
+ return V2020_08_04;
}
}
diff --git a/sdk/storage/azure-storage-file-share/pom.xml b/sdk/storage/azure-storage-file-share/pom.xml
index 1b0c8c07d920..4f0c74a0f7a2 100644
--- a/sdk/storage/azure-storage-file-share/pom.xml
+++ b/sdk/storage/azure-storage-file-share/pom.xml
@@ -32,6 +32,10 @@
HEAD
+
+ ../azure-storage-common/ci.system.properties
+
+
com.azure
diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareServiceVersion.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareServiceVersion.java
index b383bb3e4a59..43e485041c71 100644
--- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareServiceVersion.java
+++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareServiceVersion.java
@@ -39,6 +39,6 @@ public String getVersion() {
* @return the latest {@link ShareServiceVersion}
*/
public static ShareServiceVersion getLatest() {
- return V2020_10_02;
+ return V2020_08_04;
}
}
diff --git a/sdk/storage/azure-storage-queue/pom.xml b/sdk/storage/azure-storage-queue/pom.xml
index 315567f3172a..9bed28abd182 100644
--- a/sdk/storage/azure-storage-queue/pom.xml
+++ b/sdk/storage/azure-storage-queue/pom.xml
@@ -32,6 +32,10 @@
HEAD
+
+ ../azure-storage-common/ci.system.properties
+
+
com.azure
diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceVersion.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceVersion.java
index 6f6cb7aa4aa0..0ad04bd10a1f 100644
--- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceVersion.java
+++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceVersion.java
@@ -38,6 +38,6 @@ public String getVersion() {
* @return the latest {@link QueueServiceVersion}
*/
public static QueueServiceVersion getLatest() {
- return V2020_10_02;
+ return V2020_08_04;
}
}