diff --git a/sdk/storage/storage-blob/recordings/browsers/appendblobclient/recording_can_be_created_with_a_sas_connection_string.json b/sdk/storage/storage-blob/recordings/browsers/appendblobclient/recording_can_be_created_with_a_sas_connection_string.json
new file mode 100644
index 000000000000..0a144f4c7a68
--- /dev/null
+++ b/sdk/storage/storage-blob/recordings/browsers/appendblobclient/recording_can_be_created_with_a_sas_connection_string.json
@@ -0,0 +1,87 @@
+{
+ "recordings": [
+ {
+ "method": "PUT",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464816884703971",
+ "query": {
+ "restype": "container"
+ },
+ "requestBody": null,
+ "status": 201,
+ "response": "",
+ "responseHeaders": {
+ "date": "Thu, 01 Aug 2019 08:29:29 GMT",
+ "last-modified": "Thu, 01 Aug 2019 08:29:29 GMT",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "etag": "\"0x8D7165A5EFCE851\"",
+ "x-ms-request-id": "c2baaab0-601e-0058-3b43-487eea000000",
+ "x-ms-version": "2018-03-28",
+ "content-length": "0"
+ }
+ },
+ {
+ "method": "PUT",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464816884703971/blob156464816937700665",
+ "query": {},
+ "requestBody": null,
+ "status": 201,
+ "response": "",
+ "responseHeaders": {
+ "date": "Thu, 01 Aug 2019 08:29:29 GMT",
+ "last-modified": "Thu, 01 Aug 2019 08:29:29 GMT",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "etag": "\"0x8D7165A5F1E8A2A\"",
+ "x-ms-request-id": "c2baaaeb-601e-0058-7143-487eea000000",
+ "x-ms-version": "2018-03-28",
+ "x-ms-request-server-encrypted": "true",
+ "content-length": "0"
+ }
+ },
+ {
+ "method": "GET",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464816884703971/blob156464816937700665",
+ "query": {},
+ "requestBody": null,
+ "status": 200,
+ "response": "",
+ "responseHeaders": {
+ "x-ms-blob-type": "AppendBlob",
+ "date": "Thu, 01 Aug 2019 08:29:29 GMT",
+ "x-ms-server-encrypted": "true",
+ "content-length": "0",
+ "x-ms-lease-state": "available",
+ "x-ms-lease-status": "unlocked",
+ "x-ms-creation-time": "Thu, 01 Aug 2019 08:29:29 GMT",
+ "last-modified": "Thu, 01 Aug 2019 08:29:29 GMT",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-blob-committed-block-count": "0",
+ "etag": "\"0x8D7165A5F1E8A2A\"",
+ "content-type": "application/octet-stream",
+ "x-ms-request-id": "c2baab1d-601e-0058-2043-487eea000000",
+ "x-ms-version": "2018-03-28",
+ "accept-ranges": "bytes"
+ }
+ },
+ {
+ "method": "DELETE",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464816884703971",
+ "query": {
+ "restype": "container"
+ },
+ "requestBody": null,
+ "status": 202,
+ "response": "",
+ "responseHeaders": {
+ "x-ms-request-id": "c2baab4e-601e-0058-4c43-487eea000000",
+ "x-ms-version": "2018-03-28",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "date": "Thu, 01 Aug 2019 08:29:29 GMT",
+ "content-length": "0"
+ }
+ }
+ ],
+ "uniqueTestInfo": {
+ "container": "container156464816884703971",
+ "blob": "blob156464816937700665"
+ }
+}
\ No newline at end of file
diff --git a/sdk/storage/storage-blob/recordings/browsers/appendblobclient/recording_throws_error_if_constructor_blobname_parameter_is_empty.json b/sdk/storage/storage-blob/recordings/browsers/appendblobclient/recording_throws_error_if_constructor_blobname_parameter_is_empty.json
new file mode 100644
index 000000000000..84e9d67b6591
--- /dev/null
+++ b/sdk/storage/storage-blob/recordings/browsers/appendblobclient/recording_throws_error_if_constructor_blobname_parameter_is_empty.json
@@ -0,0 +1,44 @@
+{
+ "recordings": [
+ {
+ "method": "PUT",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464817017906339",
+ "query": {
+ "restype": "container"
+ },
+ "requestBody": null,
+ "status": 201,
+ "response": "",
+ "responseHeaders": {
+ "date": "Thu, 01 Aug 2019 08:29:30 GMT",
+ "last-modified": "Thu, 01 Aug 2019 08:29:30 GMT",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "etag": "\"0x8D7165A5F9832FA\"",
+ "x-ms-request-id": "c2baabee-601e-0058-5a43-487eea000000",
+ "x-ms-version": "2018-03-28",
+ "content-length": "0"
+ }
+ },
+ {
+ "method": "DELETE",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464817017906339",
+ "query": {
+ "restype": "container"
+ },
+ "requestBody": null,
+ "status": 202,
+ "response": "",
+ "responseHeaders": {
+ "x-ms-request-id": "c2baac2d-601e-0058-0843-487eea000000",
+ "x-ms-version": "2018-03-28",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "date": "Thu, 01 Aug 2019 08:29:30 GMT",
+ "content-length": "0"
+ }
+ }
+ ],
+ "uniqueTestInfo": {
+ "container": "container156464817017906339",
+ "blob": "blob156464817033506304"
+ }
+}
\ No newline at end of file
diff --git a/sdk/storage/storage-blob/recordings/browsers/appendblobclient/recording_throws_error_if_constructor_containername_parameter_is_empty.json b/sdk/storage/storage-blob/recordings/browsers/appendblobclient/recording_throws_error_if_constructor_containername_parameter_is_empty.json
new file mode 100644
index 000000000000..68130bbc79b0
--- /dev/null
+++ b/sdk/storage/storage-blob/recordings/browsers/appendblobclient/recording_throws_error_if_constructor_containername_parameter_is_empty.json
@@ -0,0 +1,44 @@
+{
+ "recordings": [
+ {
+ "method": "PUT",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464816986402447",
+ "query": {
+ "restype": "container"
+ },
+ "requestBody": null,
+ "status": 201,
+ "response": "",
+ "responseHeaders": {
+ "date": "Thu, 01 Aug 2019 08:29:29 GMT",
+ "last-modified": "Thu, 01 Aug 2019 08:29:29 GMT",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "etag": "\"0x8D7165A5F67CB61\"",
+ "x-ms-request-id": "c2baab77-601e-0058-7243-487eea000000",
+ "x-ms-version": "2018-03-28",
+ "content-length": "0"
+ }
+ },
+ {
+ "method": "DELETE",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464816986402447",
+ "query": {
+ "restype": "container"
+ },
+ "requestBody": null,
+ "status": 202,
+ "response": "",
+ "responseHeaders": {
+ "x-ms-request-id": "c2baabbf-601e-0058-3043-487eea000000",
+ "x-ms-version": "2018-03-28",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "date": "Thu, 01 Aug 2019 08:29:30 GMT",
+ "content-length": "0"
+ }
+ }
+ ],
+ "uniqueTestInfo": {
+ "container": "container156464816986402447",
+ "blob": "blob156464817001907840"
+ }
+}
\ No newline at end of file
diff --git a/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_can_be_created_with_a_sas_connection_string.json b/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_can_be_created_with_a_sas_connection_string.json
new file mode 100644
index 000000000000..45e17e3258b8
--- /dev/null
+++ b/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_can_be_created_with_a_sas_connection_string.json
@@ -0,0 +1,112 @@
+{
+ "recordings": [
+ {
+ "method": "PUT",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464898906205197",
+ "query": {
+ "restype": "container"
+ },
+ "requestBody": null,
+ "status": 201,
+ "response": "",
+ "responseHeaders": {
+ "date": "Thu, 01 Aug 2019 08:43:08 GMT",
+ "last-modified": "Thu, 01 Aug 2019 08:43:09 GMT",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "etag": "\"0x8D7165C47DDD717\"",
+ "x-ms-request-id": "bc484851-901e-0046-3a45-48a407000000",
+ "x-ms-version": "2018-03-28",
+ "content-length": "0"
+ }
+ },
+ {
+ "method": "PUT",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464898906205197/blob156464898953605881",
+ "query": {},
+ "requestBody": "Hello World",
+ "status": 201,
+ "response": "",
+ "responseHeaders": {
+ "date": "Thu, 01 Aug 2019 08:43:08 GMT",
+ "last-modified": "Thu, 01 Aug 2019 08:43:09 GMT",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==",
+ "etag": "\"0x8D7165C47F7F808\"",
+ "x-ms-request-id": "bc48489b-901e-0046-7945-48a407000000",
+ "x-ms-version": "2018-03-28",
+ "x-ms-request-server-encrypted": "true",
+ "content-length": "0"
+ }
+ },
+ {
+ "method": "PUT",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464898906205197/blob156464898953605881",
+ "query": {
+ "comp": "metadata"
+ },
+ "requestBody": null,
+ "status": 200,
+ "response": "",
+ "responseHeaders": {
+ "date": "Thu, 01 Aug 2019 08:43:09 GMT",
+ "last-modified": "Thu, 01 Aug 2019 08:43:09 GMT",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "etag": "\"0x8D7165C48134CD5\"",
+ "x-ms-request-id": "bc4848cc-901e-0046-2845-48a407000000",
+ "x-ms-version": "2018-03-28",
+ "x-ms-request-server-encrypted": "true",
+ "content-length": "0"
+ }
+ },
+ {
+ "method": "HEAD",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464898906205197/blob156464898953605881",
+ "query": {},
+ "requestBody": null,
+ "status": 200,
+ "response": "",
+ "responseHeaders": {
+ "x-ms-blob-type": "BlockBlob",
+ "date": "Thu, 01 Aug 2019 08:43:09 GMT",
+ "x-ms-access-tier-inferred": "true",
+ "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==",
+ "x-ms-server-encrypted": "true",
+ "x-ms-access-tier": "Cool",
+ "content-length": "11",
+ "x-ms-lease-state": "available",
+ "x-ms-lease-status": "unlocked",
+ "x-ms-meta-a": "a",
+ "last-modified": "Thu, 01 Aug 2019 08:43:09 GMT",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "etag": "\"0x8D7165C48134CD5\"",
+ "x-ms-creation-time": "Thu, 01 Aug 2019 08:43:09 GMT",
+ "content-type": "application/octet-stream",
+ "x-ms-request-id": "bc484901-901e-0046-5a45-48a407000000",
+ "x-ms-version": "2018-03-28",
+ "accept-ranges": "bytes",
+ "x-ms-meta-b": "b"
+ }
+ },
+ {
+ "method": "DELETE",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464898906205197",
+ "query": {
+ "restype": "container"
+ },
+ "requestBody": null,
+ "status": 202,
+ "response": "",
+ "responseHeaders": {
+ "x-ms-request-id": "bc484939-901e-0046-0a45-48a407000000",
+ "x-ms-version": "2018-03-28",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "date": "Thu, 01 Aug 2019 08:43:09 GMT",
+ "content-length": "0"
+ }
+ }
+ ],
+ "uniqueTestInfo": {
+ "container": "container156464898906205197",
+ "blob": "blob156464898953605881"
+ }
+}
\ No newline at end of file
diff --git a/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_throws_error_if_constructor_blobname_parameter_is_empty.json b/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_throws_error_if_constructor_blobname_parameter_is_empty.json
new file mode 100644
index 000000000000..46861b77c840
--- /dev/null
+++ b/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_throws_error_if_constructor_blobname_parameter_is_empty.json
@@ -0,0 +1,63 @@
+{
+ "recordings": [
+ {
+ "method": "PUT",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464899066808206",
+ "query": {
+ "restype": "container"
+ },
+ "requestBody": null,
+ "status": 201,
+ "response": "",
+ "responseHeaders": {
+ "date": "Thu, 01 Aug 2019 08:43:10 GMT",
+ "last-modified": "Thu, 01 Aug 2019 08:43:10 GMT",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "etag": "\"0x8D7165C48A3E2F4\"",
+ "x-ms-request-id": "bc484a14-901e-0046-4a45-48a407000000",
+ "x-ms-version": "2018-03-28",
+ "content-length": "0"
+ }
+ },
+ {
+ "method": "PUT",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464899066808206/blob156464899082301259",
+ "query": {},
+ "requestBody": "Hello World",
+ "status": 201,
+ "response": "",
+ "responseHeaders": {
+ "date": "Thu, 01 Aug 2019 08:43:10 GMT",
+ "last-modified": "Thu, 01 Aug 2019 08:43:10 GMT",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==",
+ "etag": "\"0x8D7165C48BB8FDB\"",
+ "x-ms-request-id": "bc484a32-901e-0046-6445-48a407000000",
+ "x-ms-version": "2018-03-28",
+ "x-ms-request-server-encrypted": "true",
+ "content-length": "0"
+ }
+ },
+ {
+ "method": "DELETE",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464899066808206",
+ "query": {
+ "restype": "container"
+ },
+ "requestBody": null,
+ "status": 202,
+ "response": "",
+ "responseHeaders": {
+ "x-ms-request-id": "bc484a77-901e-0046-2145-48a407000000",
+ "x-ms-version": "2018-03-28",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "date": "Thu, 01 Aug 2019 08:43:10 GMT",
+ "content-length": "0"
+ }
+ }
+ ],
+ "uniqueTestInfo": {
+ "container": "container156464899066808206",
+ "blob": "blob156464899082301259"
+ }
+}
\ No newline at end of file
diff --git a/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_throws_error_if_constructor_containername_parameter_is_empty.json b/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_throws_error_if_constructor_containername_parameter_is_empty.json
new file mode 100644
index 000000000000..20e94835b9f1
--- /dev/null
+++ b/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_throws_error_if_constructor_containername_parameter_is_empty.json
@@ -0,0 +1,63 @@
+{
+ "recordings": [
+ {
+ "method": "PUT",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464899017701968",
+ "query": {
+ "restype": "container"
+ },
+ "requestBody": null,
+ "status": 201,
+ "response": "",
+ "responseHeaders": {
+ "date": "Thu, 01 Aug 2019 08:43:09 GMT",
+ "last-modified": "Thu, 01 Aug 2019 08:43:10 GMT",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "etag": "\"0x8D7165C48582646\"",
+ "x-ms-request-id": "bc48496a-901e-0046-3245-48a407000000",
+ "x-ms-version": "2018-03-28",
+ "content-length": "0"
+ }
+ },
+ {
+ "method": "PUT",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464899017701968/blob156464899032504994",
+ "query": {},
+ "requestBody": "Hello World",
+ "status": 201,
+ "response": "",
+ "responseHeaders": {
+ "date": "Thu, 01 Aug 2019 08:43:09 GMT",
+ "last-modified": "Thu, 01 Aug 2019 08:43:10 GMT",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==",
+ "etag": "\"0x8D7165C486F37D6\"",
+ "x-ms-request-id": "bc4849a7-901e-0046-6545-48a407000000",
+ "x-ms-version": "2018-03-28",
+ "x-ms-request-server-encrypted": "true",
+ "content-length": "0"
+ }
+ },
+ {
+ "method": "DELETE",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464899017701968",
+ "query": {
+ "restype": "container"
+ },
+ "requestBody": null,
+ "status": 202,
+ "response": "",
+ "responseHeaders": {
+ "x-ms-request-id": "bc4849d5-901e-0046-0e45-48a407000000",
+ "x-ms-version": "2018-03-28",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "date": "Thu, 01 Aug 2019 08:43:09 GMT",
+ "content-length": "0"
+ }
+ }
+ ],
+ "uniqueTestInfo": {
+ "container": "container156464899017701968",
+ "blob": "blob156464899032504994"
+ }
+}
\ No newline at end of file
diff --git a/sdk/storage/storage-blob/recordings/browsers/blobserviceclient/recording_can_be_created_from_a_sas_connection_string.json b/sdk/storage/storage-blob/recordings/browsers/blobserviceclient/recording_can_be_created_from_a_sas_connection_string.json
new file mode 100644
index 000000000000..3f08170a54ca
--- /dev/null
+++ b/sdk/storage/storage-blob/recordings/browsers/blobserviceclient/recording_can_be_created_from_a_sas_connection_string.json
@@ -0,0 +1,24 @@
+{
+ "recordings": [
+ {
+ "method": "GET",
+ "url": "https://fakestorageaccount.blob.core.windows.net/",
+ "query": {
+ "comp": "properties",
+ "restype": "service"
+ },
+ "requestBody": null,
+ "status": 200,
+ "response": "1.0truetruetruetrue51.0truetruetrue31.0truetruetrue4DELETE,GET,HEAD,MERGE,POST,PUT,OPTIONS***86400GETexample.com**8888GETexample.com**8888GETexample.com**8888GETexample.com**8888true7false",
+ "responseHeaders": {
+ "date": "Thu, 01 Aug 2019 08:43:10 GMT",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "transfer-encoding": "chunked",
+ "content-type": "application/xml",
+ "x-ms-request-id": "bc484aac-901e-0046-4c45-48a407000000",
+ "x-ms-version": "2018-03-28"
+ }
+ }
+ ],
+ "uniqueTestInfo": {}
+}
\ No newline at end of file
diff --git a/sdk/storage/storage-blob/recordings/browsers/blockblobclient/recording_can_be_created_with_a_sas_connection_string.json b/sdk/storage/storage-blob/recordings/browsers/blockblobclient/recording_can_be_created_with_a_sas_connection_string.json
new file mode 100644
index 000000000000..ea59a097a8fe
--- /dev/null
+++ b/sdk/storage/storage-blob/recordings/browsers/blockblobclient/recording_can_be_created_with_a_sas_connection_string.json
@@ -0,0 +1,89 @@
+{
+ "recordings": [
+ {
+ "method": "PUT",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464899130406630",
+ "query": {
+ "restype": "container"
+ },
+ "requestBody": null,
+ "status": 201,
+ "response": "",
+ "responseHeaders": {
+ "date": "Thu, 01 Aug 2019 08:43:10 GMT",
+ "last-modified": "Thu, 01 Aug 2019 08:43:11 GMT",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "etag": "\"0x8D7165C490415BE\"",
+ "x-ms-request-id": "bc484afa-901e-0046-1345-48a407000000",
+ "x-ms-version": "2018-03-28",
+ "content-length": "0"
+ }
+ },
+ {
+ "method": "PUT",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464899130406630/blob156464899145205179",
+ "query": {},
+ "requestBody": "randomstring156464899145303081",
+ "status": 201,
+ "response": "",
+ "responseHeaders": {
+ "date": "Thu, 01 Aug 2019 08:43:10 GMT",
+ "last-modified": "Thu, 01 Aug 2019 08:43:11 GMT",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "content-md5": "vYY1dApFp0DW0a1stMDv1g==",
+ "etag": "\"0x8D7165C491B2502\"",
+ "x-ms-request-id": "bc484b46-901e-0046-5845-48a407000000",
+ "x-ms-version": "2018-03-28",
+ "x-ms-request-server-encrypted": "true",
+ "content-length": "0"
+ }
+ },
+ {
+ "method": "GET",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464899130406630/blob156464899145205179",
+ "query": {},
+ "requestBody": null,
+ "status": 200,
+ "response": "randomstring156464899145303081",
+ "responseHeaders": {
+ "x-ms-blob-type": "BlockBlob",
+ "date": "Thu, 01 Aug 2019 08:43:11 GMT",
+ "content-md5": "vYY1dApFp0DW0a1stMDv1g==",
+ "x-ms-server-encrypted": "true",
+ "content-length": "30",
+ "x-ms-lease-state": "available",
+ "x-ms-lease-status": "unlocked",
+ "x-ms-creation-time": "Thu, 01 Aug 2019 08:43:11 GMT",
+ "last-modified": "Thu, 01 Aug 2019 08:43:11 GMT",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "etag": "\"0x8D7165C491B2502\"",
+ "content-type": "application/octet-stream",
+ "x-ms-request-id": "bc484b86-901e-0046-1145-48a407000000",
+ "x-ms-version": "2018-03-28",
+ "accept-ranges": "bytes"
+ }
+ },
+ {
+ "method": "DELETE",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464899130406630",
+ "query": {
+ "restype": "container"
+ },
+ "requestBody": null,
+ "status": 202,
+ "response": "",
+ "responseHeaders": {
+ "x-ms-request-id": "bc484bcf-901e-0046-5345-48a407000000",
+ "x-ms-version": "2018-03-28",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "date": "Thu, 01 Aug 2019 08:43:11 GMT",
+ "content-length": "0"
+ }
+ }
+ ],
+ "uniqueTestInfo": {
+ "container": "container156464899130406630",
+ "blob": "blob156464899145205179",
+ "randomstring": "randomstring156464899145303081"
+ }
+}
\ No newline at end of file
diff --git a/sdk/storage/storage-blob/recordings/browsers/blockblobclient/recording_throws_error_if_constructor_blobname_parameter_is_empty.json b/sdk/storage/storage-blob/recordings/browsers/blockblobclient/recording_throws_error_if_constructor_blobname_parameter_is_empty.json
new file mode 100644
index 000000000000..b5d47ac7a068
--- /dev/null
+++ b/sdk/storage/storage-blob/recordings/browsers/blockblobclient/recording_throws_error_if_constructor_blobname_parameter_is_empty.json
@@ -0,0 +1,44 @@
+{
+ "recordings": [
+ {
+ "method": "PUT",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464899223404252",
+ "query": {
+ "restype": "container"
+ },
+ "requestBody": null,
+ "status": 201,
+ "response": "",
+ "responseHeaders": {
+ "date": "Thu, 01 Aug 2019 08:43:11 GMT",
+ "last-modified": "Thu, 01 Aug 2019 08:43:12 GMT",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "etag": "\"0x8D7165C4992DAFF\"",
+ "x-ms-request-id": "bc484c68-901e-0046-5545-48a407000000",
+ "x-ms-version": "2018-03-28",
+ "content-length": "0"
+ }
+ },
+ {
+ "method": "DELETE",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464899223404252",
+ "query": {
+ "restype": "container"
+ },
+ "requestBody": null,
+ "status": 202,
+ "response": "",
+ "responseHeaders": {
+ "x-ms-request-id": "bc484cbf-901e-0046-2445-48a407000000",
+ "x-ms-version": "2018-03-28",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "date": "Thu, 01 Aug 2019 08:43:11 GMT",
+ "content-length": "0"
+ }
+ }
+ ],
+ "uniqueTestInfo": {
+ "container": "container156464899223404252",
+ "blob": "blob156464899238808687"
+ }
+}
\ No newline at end of file
diff --git a/sdk/storage/storage-blob/recordings/browsers/blockblobclient/recording_throws_error_if_constructor_containername_parameter_is_empty.json b/sdk/storage/storage-blob/recordings/browsers/blockblobclient/recording_throws_error_if_constructor_containername_parameter_is_empty.json
new file mode 100644
index 000000000000..caddd4f827cc
--- /dev/null
+++ b/sdk/storage/storage-blob/recordings/browsers/blockblobclient/recording_throws_error_if_constructor_containername_parameter_is_empty.json
@@ -0,0 +1,44 @@
+{
+ "recordings": [
+ {
+ "method": "PUT",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464899191901079",
+ "query": {
+ "restype": "container"
+ },
+ "requestBody": null,
+ "status": 201,
+ "response": "",
+ "responseHeaders": {
+ "date": "Thu, 01 Aug 2019 08:43:11 GMT",
+ "last-modified": "Thu, 01 Aug 2019 08:43:12 GMT",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "etag": "\"0x8D7165C4962C19C\"",
+ "x-ms-request-id": "bc484bf4-901e-0046-7545-48a407000000",
+ "x-ms-version": "2018-03-28",
+ "content-length": "0"
+ }
+ },
+ {
+ "method": "DELETE",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464899191901079",
+ "query": {
+ "restype": "container"
+ },
+ "requestBody": null,
+ "status": 202,
+ "response": "",
+ "responseHeaders": {
+ "x-ms-request-id": "bc484c2f-901e-0046-2545-48a407000000",
+ "x-ms-version": "2018-03-28",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "date": "Thu, 01 Aug 2019 08:43:11 GMT",
+ "content-length": "0"
+ }
+ }
+ ],
+ "uniqueTestInfo": {
+ "container": "container156464899191901079",
+ "blob": "blob156464899207402866"
+ }
+}
\ No newline at end of file
diff --git a/sdk/storage/storage-blob/recordings/browsers/containerclient/recording_can_be_created_with_a_sas_connection_string.json b/sdk/storage/storage-blob/recordings/browsers/containerclient/recording_can_be_created_with_a_sas_connection_string.json
new file mode 100644
index 000000000000..c20d6f97e560
--- /dev/null
+++ b/sdk/storage/storage-blob/recordings/browsers/containerclient/recording_can_be_created_with_a_sas_connection_string.json
@@ -0,0 +1,66 @@
+{
+ "recordings": [
+ {
+ "method": "PUT",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464899259006029",
+ "query": {
+ "restype": "container"
+ },
+ "requestBody": null,
+ "status": 201,
+ "response": "",
+ "responseHeaders": {
+ "date": "Thu, 01 Aug 2019 08:43:12 GMT",
+ "last-modified": "Thu, 01 Aug 2019 08:43:12 GMT",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "etag": "\"0x8D7165C49C93718\"",
+ "x-ms-request-id": "bc484d06-901e-0046-6245-48a407000000",
+ "x-ms-version": "2018-03-28",
+ "content-length": "0"
+ }
+ },
+ {
+ "method": "GET",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464899259006029",
+ "query": {
+ "restype": "container"
+ },
+ "requestBody": null,
+ "status": 200,
+ "response": "",
+ "responseHeaders": {
+ "x-ms-lease-status": "unlocked",
+ "date": "Thu, 01 Aug 2019 08:43:12 GMT",
+ "x-ms-has-legal-hold": "false",
+ "last-modified": "Thu, 01 Aug 2019 08:43:12 GMT",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "etag": "\"0x8D7165C49C93718\"",
+ "x-ms-request-id": "bc484d33-901e-0046-0b45-48a407000000",
+ "x-ms-version": "2018-03-28",
+ "x-ms-has-immutability-policy": "false",
+ "content-length": "0",
+ "x-ms-lease-state": "available"
+ }
+ },
+ {
+ "method": "DELETE",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464899259006029",
+ "query": {
+ "restype": "container"
+ },
+ "requestBody": null,
+ "status": 202,
+ "response": "",
+ "responseHeaders": {
+ "x-ms-request-id": "bc484d5a-901e-0046-2e45-48a407000000",
+ "x-ms-version": "2018-03-28",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "date": "Thu, 01 Aug 2019 08:43:12 GMT",
+ "content-length": "0"
+ }
+ }
+ ],
+ "uniqueTestInfo": {
+ "container": "container156464899259006029"
+ }
+}
\ No newline at end of file
diff --git a/sdk/storage/storage-blob/recordings/browsers/containerclient/recording_can_be_created_with_a_sas_connection_string_and_a_container_name_and_an_option_bag.json b/sdk/storage/storage-blob/recordings/browsers/containerclient/recording_can_be_created_with_a_sas_connection_string_and_a_container_name_and_an_option_bag.json
new file mode 100644
index 000000000000..de8f7aec74e0
--- /dev/null
+++ b/sdk/storage/storage-blob/recordings/browsers/containerclient/recording_can_be_created_with_a_sas_connection_string_and_a_container_name_and_an_option_bag.json
@@ -0,0 +1,66 @@
+{
+ "recordings": [
+ {
+ "method": "PUT",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464899305706708",
+ "query": {
+ "restype": "container"
+ },
+ "requestBody": null,
+ "status": 201,
+ "response": "",
+ "responseHeaders": {
+ "date": "Thu, 01 Aug 2019 08:43:12 GMT",
+ "last-modified": "Thu, 01 Aug 2019 08:43:13 GMT",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "etag": "\"0x8D7165C4A10AD3C\"",
+ "x-ms-request-id": "bc484d9b-901e-0046-6445-48a407000000",
+ "x-ms-version": "2018-03-28",
+ "content-length": "0"
+ }
+ },
+ {
+ "method": "GET",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464899305706708",
+ "query": {
+ "restype": "container"
+ },
+ "requestBody": null,
+ "status": 200,
+ "response": "",
+ "responseHeaders": {
+ "x-ms-lease-status": "unlocked",
+ "date": "Thu, 01 Aug 2019 08:43:12 GMT",
+ "x-ms-has-legal-hold": "false",
+ "last-modified": "Thu, 01 Aug 2019 08:43:13 GMT",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "etag": "\"0x8D7165C4A10AD3C\"",
+ "x-ms-request-id": "bc484dd9-901e-0046-1a45-48a407000000",
+ "x-ms-version": "2018-03-28",
+ "x-ms-has-immutability-policy": "false",
+ "content-length": "0",
+ "x-ms-lease-state": "available"
+ }
+ },
+ {
+ "method": "DELETE",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464899305706708",
+ "query": {
+ "restype": "container"
+ },
+ "requestBody": null,
+ "status": 202,
+ "response": "",
+ "responseHeaders": {
+ "x-ms-request-id": "bc484e11-901e-0046-4945-48a407000000",
+ "x-ms-version": "2018-03-28",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "date": "Thu, 01 Aug 2019 08:43:12 GMT",
+ "content-length": "0"
+ }
+ }
+ ],
+ "uniqueTestInfo": {
+ "container": "container156464899305706708"
+ }
+}
\ No newline at end of file
diff --git a/sdk/storage/storage-blob/recordings/browsers/containerclient/recording_throws_error_if_constructor_containername_parameter_is_empty.json b/sdk/storage/storage-blob/recordings/browsers/containerclient/recording_throws_error_if_constructor_containername_parameter_is_empty.json
new file mode 100644
index 000000000000..3adb8954694f
--- /dev/null
+++ b/sdk/storage/storage-blob/recordings/browsers/containerclient/recording_throws_error_if_constructor_containername_parameter_is_empty.json
@@ -0,0 +1,43 @@
+{
+ "recordings": [
+ {
+ "method": "PUT",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464899352505621",
+ "query": {
+ "restype": "container"
+ },
+ "requestBody": null,
+ "status": 201,
+ "response": "",
+ "responseHeaders": {
+ "date": "Thu, 01 Aug 2019 08:43:12 GMT",
+ "last-modified": "Thu, 01 Aug 2019 08:43:13 GMT",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "etag": "\"0x8D7165C4A58236C\"",
+ "x-ms-request-id": "bc484e4a-901e-0046-7f45-48a407000000",
+ "x-ms-version": "2018-03-28",
+ "content-length": "0"
+ }
+ },
+ {
+ "method": "DELETE",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464899352505621",
+ "query": {
+ "restype": "container"
+ },
+ "requestBody": null,
+ "status": 202,
+ "response": "",
+ "responseHeaders": {
+ "x-ms-request-id": "bc484e96-901e-0046-4345-48a407000000",
+ "x-ms-version": "2018-03-28",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "date": "Thu, 01 Aug 2019 08:43:13 GMT",
+ "content-length": "0"
+ }
+ }
+ ],
+ "uniqueTestInfo": {
+ "container": "container156464899352505621"
+ }
+}
\ No newline at end of file
diff --git a/sdk/storage/storage-blob/recordings/browsers/pageblobclient/recording_can_be_created_with_a_sas_connection_string.json b/sdk/storage/storage-blob/recordings/browsers/pageblobclient/recording_can_be_created_with_a_sas_connection_string.json
new file mode 100644
index 000000000000..19af3724b013
--- /dev/null
+++ b/sdk/storage/storage-blob/recordings/browsers/pageblobclient/recording_can_be_created_with_a_sas_connection_string.json
@@ -0,0 +1,87 @@
+{
+ "recordings": [
+ {
+ "method": "PUT",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464899383408439",
+ "query": {
+ "restype": "container"
+ },
+ "requestBody": null,
+ "status": 201,
+ "response": "",
+ "responseHeaders": {
+ "date": "Thu, 01 Aug 2019 08:43:13 GMT",
+ "last-modified": "Thu, 01 Aug 2019 08:43:13 GMT",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "etag": "\"0x8D7165C4A86DCFB\"",
+ "x-ms-request-id": "bc484ebe-901e-0046-6945-48a407000000",
+ "x-ms-version": "2018-03-28",
+ "content-length": "0"
+ }
+ },
+ {
+ "method": "PUT",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464899383408439/blob156464899398801534",
+ "query": {},
+ "requestBody": null,
+ "status": 201,
+ "response": "",
+ "responseHeaders": {
+ "date": "Thu, 01 Aug 2019 08:43:13 GMT",
+ "last-modified": "Thu, 01 Aug 2019 08:43:14 GMT",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "etag": "\"0x8D7165C4A9ED1A5\"",
+ "x-ms-request-id": "bc484eff-901e-0046-2245-48a407000000",
+ "x-ms-version": "2018-03-28",
+ "x-ms-request-server-encrypted": "true",
+ "content-length": "0"
+ }
+ },
+ {
+ "method": "GET",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464899383408439/blob156464899398801534",
+ "query": {},
+ "requestBody": null,
+ "status": 200,
+ "response": "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000",
+ "responseHeaders": {
+ "x-ms-blob-type": "PageBlob",
+ "date": "Thu, 01 Aug 2019 08:43:13 GMT",
+ "x-ms-server-encrypted": "true",
+ "content-length": "512",
+ "x-ms-lease-state": "available",
+ "x-ms-lease-status": "unlocked",
+ "x-ms-creation-time": "Thu, 01 Aug 2019 08:43:14 GMT",
+ "last-modified": "Thu, 01 Aug 2019 08:43:14 GMT",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "x-ms-blob-sequence-number": "0",
+ "etag": "\"0x8D7165C4A9ED1A5\"",
+ "content-type": "application/octet-stream",
+ "x-ms-request-id": "bc484f34-901e-0046-4e45-48a407000000",
+ "x-ms-version": "2018-03-28",
+ "accept-ranges": "bytes"
+ }
+ },
+ {
+ "method": "DELETE",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464899383408439",
+ "query": {
+ "restype": "container"
+ },
+ "requestBody": null,
+ "status": 202,
+ "response": "",
+ "responseHeaders": {
+ "x-ms-request-id": "bc484f72-901e-0046-0445-48a407000000",
+ "x-ms-version": "2018-03-28",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "date": "Thu, 01 Aug 2019 08:43:13 GMT",
+ "content-length": "0"
+ }
+ }
+ ],
+ "uniqueTestInfo": {
+ "container": "container156464899383408439",
+ "blob": "blob156464899398801534"
+ }
+}
\ No newline at end of file
diff --git a/sdk/storage/storage-blob/recordings/browsers/pageblobclient/recording_throws_error_if_constructor_blobname_parameter_is_empty.json b/sdk/storage/storage-blob/recordings/browsers/pageblobclient/recording_throws_error_if_constructor_blobname_parameter_is_empty.json
new file mode 100644
index 000000000000..97b9fccbd70c
--- /dev/null
+++ b/sdk/storage/storage-blob/recordings/browsers/pageblobclient/recording_throws_error_if_constructor_blobname_parameter_is_empty.json
@@ -0,0 +1,44 @@
+{
+ "recordings": [
+ {
+ "method": "PUT",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464899476500296",
+ "query": {
+ "restype": "container"
+ },
+ "requestBody": null,
+ "status": 201,
+ "response": "",
+ "responseHeaders": {
+ "date": "Thu, 01 Aug 2019 08:43:14 GMT",
+ "last-modified": "Thu, 01 Aug 2019 08:43:14 GMT",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "etag": "\"0x8D7165C4B1505E1\"",
+ "x-ms-request-id": "bc485038-901e-0046-3345-48a407000000",
+ "x-ms-version": "2018-03-28",
+ "content-length": "0"
+ }
+ },
+ {
+ "method": "DELETE",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464899476500296",
+ "query": {
+ "restype": "container"
+ },
+ "requestBody": null,
+ "status": 202,
+ "response": "",
+ "responseHeaders": {
+ "x-ms-request-id": "bc48506a-901e-0046-6145-48a407000000",
+ "x-ms-version": "2018-03-28",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "date": "Thu, 01 Aug 2019 08:43:14 GMT",
+ "content-length": "0"
+ }
+ }
+ ],
+ "uniqueTestInfo": {
+ "container": "container156464899476500296",
+ "blob": "blob156464899492003371"
+ }
+}
\ No newline at end of file
diff --git a/sdk/storage/storage-blob/recordings/browsers/pageblobclient/recording_throws_error_if_constructor_containername_parameter_is_empty.json b/sdk/storage/storage-blob/recordings/browsers/pageblobclient/recording_throws_error_if_constructor_containername_parameter_is_empty.json
new file mode 100644
index 000000000000..8c0617398c9b
--- /dev/null
+++ b/sdk/storage/storage-blob/recordings/browsers/pageblobclient/recording_throws_error_if_constructor_containername_parameter_is_empty.json
@@ -0,0 +1,44 @@
+{
+ "recordings": [
+ {
+ "method": "PUT",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464899445806110",
+ "query": {
+ "restype": "container"
+ },
+ "requestBody": null,
+ "status": 201,
+ "response": "",
+ "responseHeaders": {
+ "date": "Thu, 01 Aug 2019 08:43:13 GMT",
+ "last-modified": "Thu, 01 Aug 2019 08:43:14 GMT",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "etag": "\"0x8D7165C4AE561C7\"",
+ "x-ms-request-id": "bc484fbf-901e-0046-4c45-48a407000000",
+ "x-ms-version": "2018-03-28",
+ "content-length": "0"
+ }
+ },
+ {
+ "method": "DELETE",
+ "url": "https://fakestorageaccount.blob.core.windows.net/container156464899445806110",
+ "query": {
+ "restype": "container"
+ },
+ "requestBody": null,
+ "status": 202,
+ "response": "",
+ "responseHeaders": {
+ "x-ms-request-id": "bc484ff5-901e-0046-7c45-48a407000000",
+ "x-ms-version": "2018-03-28",
+ "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0",
+ "date": "Thu, 01 Aug 2019 08:43:14 GMT",
+ "content-length": "0"
+ }
+ }
+ ],
+ "uniqueTestInfo": {
+ "container": "container156464899445806110",
+ "blob": "blob156464899460801711"
+ }
+}
\ No newline at end of file
diff --git a/sdk/storage/storage-blob/recordings/node/appendblobclient/recording_can_be_created_with_a_sas_connection_string.js b/sdk/storage/storage-blob/recordings/node/appendblobclient/recording_can_be_created_with_a_sas_connection_string.js
new file mode 100644
index 000000000000..421fef39bedb
--- /dev/null
+++ b/sdk/storage/storage-blob/recordings/node/appendblobclient/recording_can_be_created_with_a_sas_connection_string.js
@@ -0,0 +1,105 @@
+let nock = require('nock');
+
+module.exports.testInfo = {"container":"container156464815460503783","blob":"blob156464815508604163"}
+
+nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
+ .put('/container156464815460503783')
+ .query(true)
+ .reply(201, "", [ 'Content-Length',
+ '0',
+ 'Last-Modified',
+ 'Thu, 01 Aug 2019 08:29:15 GMT',
+ 'ETag',
+ '"0x8D7165A567F0F49"',
+ 'Server',
+ 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
+ 'x-ms-request-id',
+ 'e95af8c0-701e-0008-1043-4861e2000000',
+ 'x-ms-version',
+ '2018-03-28',
+ 'Date',
+ 'Thu, 01 Aug 2019 08:29:14 GMT',
+ 'Connection',
+ 'close' ]);
+
+
+nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
+ .put('/container156464815460503783/blob156464815508604163')
+ .query(true)
+ .reply(201, "", [ 'Content-Length',
+ '0',
+ 'Last-Modified',
+ 'Thu, 01 Aug 2019 08:29:15 GMT',
+ 'ETag',
+ '"0x8D7165A56B77963"',
+ 'Server',
+ 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
+ 'x-ms-request-id',
+ '2b5cd302-501e-0014-5643-48b9f5000000',
+ 'x-ms-version',
+ '2018-03-28',
+ 'x-ms-request-server-encrypted',
+ 'true',
+ 'Date',
+ 'Thu, 01 Aug 2019 08:29:14 GMT',
+ 'Connection',
+ 'close' ]);
+
+
+nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
+ .get('/container156464815460503783/blob156464815508604163')
+ .query(true)
+ .reply(200, "", [ 'Content-Length',
+ '0',
+ 'Content-Type',
+ 'application/octet-stream',
+ 'Last-Modified',
+ 'Thu, 01 Aug 2019 08:29:15 GMT',
+ 'Accept-Ranges',
+ 'bytes',
+ 'ETag',
+ '"0x8D7165A56B77963"',
+ 'Server',
+ 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
+ 'x-ms-request-id',
+ '17ce0276-e01e-00c1-1743-48f128000000',
+ 'x-ms-version',
+ '2018-03-28',
+ 'x-ms-creation-time',
+ 'Thu, 01 Aug 2019 08:29:15 GMT',
+ 'x-ms-lease-status',
+ 'unlocked',
+ 'x-ms-lease-state',
+ 'available',
+ 'x-ms-blob-type',
+ 'AppendBlob',
+ 'x-ms-blob-committed-block-count',
+ '0',
+ 'x-ms-server-encrypted',
+ 'true',
+ 'Access-Control-Expose-Headers',
+ 'x-ms-request-id,Server,x-ms-version,Content-Type,Last-Modified,ETag,x-ms-creation-time,x-ms-lease-status,x-ms-lease-state,x-ms-blob-type,x-ms-blob-committed-block-count,x-ms-server-encrypted,Accept-Ranges,Content-Length,Date,Transfer-Encoding',
+ 'Access-Control-Allow-Origin',
+ '*',
+ 'Date',
+ 'Thu, 01 Aug 2019 08:29:15 GMT',
+ 'Connection',
+ 'close' ]);
+
+
+nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
+ .delete('/container156464815460503783')
+ .query(true)
+ .reply(202, "", [ 'Content-Length',
+ '0',
+ 'Server',
+ 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
+ 'x-ms-request-id',
+ 'c3223aeb-501e-00d3-0143-48c534000000',
+ 'x-ms-version',
+ '2018-03-28',
+ 'Date',
+ 'Thu, 01 Aug 2019 08:29:15 GMT',
+ 'Connection',
+ 'close' ]);
+
diff --git a/sdk/storage/storage-blob/recordings/node/appendblobclient_nodejs_only/recording_throws_error_if_constructor_blobname_parameter_is_empty.js b/sdk/storage/storage-blob/recordings/node/appendblobclient/recording_throws_error_if_constructor_blobname_parameter_is_empty.js
similarity index 63%
rename from sdk/storage/storage-blob/recordings/node/appendblobclient_nodejs_only/recording_throws_error_if_constructor_blobname_parameter_is_empty.js
rename to sdk/storage/storage-blob/recordings/node/appendblobclient/recording_throws_error_if_constructor_blobname_parameter_is_empty.js
index 90ca41d810b1..b3f4a99a6d6e 100644
--- a/sdk/storage/storage-blob/recordings/node/appendblobclient_nodejs_only/recording_throws_error_if_constructor_blobname_parameter_is_empty.js
+++ b/sdk/storage/storage-blob/recordings/node/appendblobclient/recording_throws_error_if_constructor_blobname_parameter_is_empty.js
@@ -1,41 +1,41 @@
let nock = require('nock');
-module.exports.testInfo = {"container":"container156150801881303242","blob":"blob156150801911300509"}
+module.exports.testInfo = {"container":"container156464815663606042","blob":"blob156464815693403828"}
nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
- .put('/container156150801881303242')
+ .put('/container156464815663606042')
.query(true)
.reply(201, "", [ 'Content-Length',
'0',
'Last-Modified',
- 'Wed, 26 Jun 2019 00:13:39 GMT',
+ 'Thu, 01 Aug 2019 08:29:16 GMT',
'ETag',
- '"0x8D6F9CB239C7031"',
+ '"0x8D7165A579BC4A5"',
'Server',
'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
- '2ad63343-f01e-009a-6ab4-2bf654000000',
+ '68f14b14-e01e-008e-1b43-483530000000',
'x-ms-version',
'2018-03-28',
'Date',
- 'Wed, 26 Jun 2019 00:13:39 GMT',
+ 'Thu, 01 Aug 2019 08:29:16 GMT',
'Connection',
'close' ]);
nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
- .delete('/container156150801881303242')
+ .delete('/container156464815663606042')
.query(true)
.reply(202, "", [ 'Content-Length',
'0',
'Server',
'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
- '5629c194-301e-0040-21b4-2b537f000000',
+ 'c3223d46-501e-00d3-1043-48c534000000',
'x-ms-version',
'2018-03-28',
'Date',
- 'Wed, 26 Jun 2019 00:13:39 GMT',
+ 'Thu, 01 Aug 2019 08:29:16 GMT',
'Connection',
'close' ]);
diff --git a/sdk/storage/storage-blob/recordings/node/appendblobclient_nodejs_only/recording_throws_error_if_constructor_containername_parameter_is_empty.js b/sdk/storage/storage-blob/recordings/node/appendblobclient/recording_throws_error_if_constructor_containername_parameter_is_empty.js
similarity index 63%
rename from sdk/storage/storage-blob/recordings/node/appendblobclient_nodejs_only/recording_throws_error_if_constructor_containername_parameter_is_empty.js
rename to sdk/storage/storage-blob/recordings/node/appendblobclient/recording_throws_error_if_constructor_containername_parameter_is_empty.js
index 69421770c9aa..e9d3893fe740 100644
--- a/sdk/storage/storage-blob/recordings/node/appendblobclient_nodejs_only/recording_throws_error_if_constructor_containername_parameter_is_empty.js
+++ b/sdk/storage/storage-blob/recordings/node/appendblobclient/recording_throws_error_if_constructor_containername_parameter_is_empty.js
@@ -1,41 +1,41 @@
let nock = require('nock');
-module.exports.testInfo = {"container":"container156150801817006114","blob":"blob156150801848304774"}
+module.exports.testInfo = {"container":"container156464815604200526","blob":"blob156464815633801223"}
nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
- .put('/container156150801817006114')
+ .put('/container156464815604200526')
.query(true)
.reply(201, "", [ 'Content-Length',
'0',
'Last-Modified',
- 'Wed, 26 Jun 2019 00:13:38 GMT',
+ 'Thu, 01 Aug 2019 08:29:16 GMT',
'ETag',
- '"0x8D6F9CB233AA848"',
+ '"0x8D7165A5740BA93"',
'Server',
'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
- 'd57a7819-d01e-0027-2bb4-2be0d8000000',
+ 'f0ea2222-801e-0052-4f43-486763000000',
'x-ms-version',
'2018-03-28',
'Date',
- 'Wed, 26 Jun 2019 00:13:37 GMT',
+ 'Thu, 01 Aug 2019 08:29:16 GMT',
'Connection',
'close' ]);
nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
- .delete('/container156150801817006114')
+ .delete('/container156464815604200526')
.query(true)
.reply(202, "", [ 'Content-Length',
'0',
'Server',
'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
- 'd6eeb346-e01e-0049-0cb4-2b49f1000000',
+ '6ed8571e-f01e-0091-4843-48ee20000000',
'x-ms-version',
'2018-03-28',
'Date',
- 'Wed, 26 Jun 2019 00:13:38 GMT',
+ 'Thu, 01 Aug 2019 08:29:16 GMT',
'Connection',
'close' ]);
diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/recording_can_be_created_with_a_sas_connection_string.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_can_be_created_with_a_sas_connection_string.js
new file mode 100644
index 000000000000..a90e215d7346
--- /dev/null
+++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_can_be_created_with_a_sas_connection_string.js
@@ -0,0 +1,137 @@
+let nock = require('nock');
+
+module.exports.testInfo = {"container":"container156464896597806984","blob":"blob156464896645106530"}
+
+nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
+ .put('/container156464896597806984')
+ .query(true)
+ .reply(201, "", [ 'Content-Length',
+ '0',
+ 'Last-Modified',
+ 'Thu, 01 Aug 2019 08:42:46 GMT',
+ 'ETag',
+ '"0x8D7165C3A1B304D"',
+ 'Server',
+ 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
+ 'x-ms-request-id',
+ '7895fed4-401e-0029-4d45-480cd3000000',
+ 'x-ms-version',
+ '2018-03-28',
+ 'Date',
+ 'Thu, 01 Aug 2019 08:42:46 GMT',
+ 'Connection',
+ 'close' ]);
+
+
+nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
+ .put('/container156464896597806984/blob156464896645106530', "Hello World")
+ .reply(201, "", [ 'Content-Length',
+ '0',
+ 'Content-MD5',
+ 'sQqNsWTgdUEFt6mb5y4/5Q==',
+ 'Last-Modified',
+ 'Thu, 01 Aug 2019 08:42:46 GMT',
+ 'ETag',
+ '"0x8D7165C3A4E805E"',
+ 'Server',
+ 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
+ 'x-ms-request-id',
+ '6547b4df-101e-00d4-4645-4833b1000000',
+ 'x-ms-version',
+ '2018-03-28',
+ 'x-ms-request-server-encrypted',
+ 'true',
+ 'Date',
+ 'Thu, 01 Aug 2019 08:42:46 GMT',
+ 'Connection',
+ 'close' ]);
+
+
+nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
+ .put('/container156464896597806984/blob156464896645106530')
+ .query(true)
+ .reply(200, "", [ 'Content-Length',
+ '0',
+ 'Last-Modified',
+ 'Thu, 01 Aug 2019 08:42:47 GMT',
+ 'ETag',
+ '"0x8D7165C3A7FAAB6"',
+ 'Server',
+ 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
+ 'x-ms-request-id',
+ 'a5b3a04b-d01e-004a-3545-484af6000000',
+ 'x-ms-version',
+ '2018-03-28',
+ 'x-ms-request-server-encrypted',
+ 'true',
+ 'Date',
+ 'Thu, 01 Aug 2019 08:42:46 GMT',
+ 'Connection',
+ 'close' ]);
+
+
+nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
+ .head('/container156464896597806984/blob156464896645106530')
+ .query(true)
+ .reply(200, "", [ 'Content-Length',
+ '11',
+ 'Content-Type',
+ 'application/octet-stream',
+ 'Content-MD5',
+ 'sQqNsWTgdUEFt6mb5y4/5Q==',
+ 'Last-Modified',
+ 'Thu, 01 Aug 2019 08:42:47 GMT',
+ 'Accept-Ranges',
+ 'bytes',
+ 'ETag',
+ '"0x8D7165C3A7FAAB6"',
+ 'Server',
+ 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
+ 'x-ms-request-id',
+ '5f3d6373-701e-008b-5d45-48c14f000000',
+ 'x-ms-version',
+ '2018-03-28',
+ 'x-ms-meta-a',
+ 'a',
+ 'x-ms-meta-b',
+ 'b',
+ 'x-ms-creation-time',
+ 'Thu, 01 Aug 2019 08:42:46 GMT',
+ 'x-ms-lease-status',
+ 'unlocked',
+ 'x-ms-lease-state',
+ 'available',
+ 'x-ms-blob-type',
+ 'BlockBlob',
+ 'x-ms-server-encrypted',
+ 'true',
+ 'x-ms-access-tier',
+ 'Cool',
+ 'x-ms-access-tier-inferred',
+ 'true',
+ 'Access-Control-Expose-Headers',
+ 'x-ms-request-id,Server,x-ms-version,x-ms-meta-a,x-ms-meta-b,Content-Type,Last-Modified,ETag,x-ms-creation-time,Content-MD5,x-ms-lease-status,x-ms-lease-state,x-ms-blob-type,x-ms-server-encrypted,x-ms-access-tier,x-ms-access-tier-inferred,Accept-Ranges,Content-Length,Date,Transfer-Encoding',
+ 'Access-Control-Allow-Origin',
+ '*',
+ 'Date',
+ 'Thu, 01 Aug 2019 08:42:46 GMT',
+ 'Connection',
+ 'close' ]);
+
+
+nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
+ .delete('/container156464896597806984')
+ .query(true)
+ .reply(202, "", [ 'Content-Length',
+ '0',
+ 'Server',
+ 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
+ 'x-ms-request-id',
+ '752817a1-401e-0044-3145-48a6fd000000',
+ 'x-ms-version',
+ '2018-03-28',
+ 'Date',
+ 'Thu, 01 Aug 2019 08:42:47 GMT',
+ 'Connection',
+ 'close' ]);
+
diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_throws_error_if_constructor_blobname_parameter_is_empty.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_throws_error_if_constructor_blobname_parameter_is_empty.js
similarity index 64%
rename from sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_throws_error_if_constructor_blobname_parameter_is_empty.js
rename to sdk/storage/storage-blob/recordings/node/blobclient/recording_throws_error_if_constructor_blobname_parameter_is_empty.js
index 255b70a0f8ba..b8bd02fd0dc2 100644
--- a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_throws_error_if_constructor_blobname_parameter_is_empty.js
+++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_throws_error_if_constructor_blobname_parameter_is_empty.js
@@ -1,65 +1,65 @@
let nock = require('nock');
-module.exports.testInfo = {"container":"container156150805161403398","blob":"blob156150805190907518"}
+module.exports.testInfo = {"container":"container156464896864300825","blob":"blob156464896894807673"}
nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
- .put('/container156150805161403398')
+ .put('/container156464896864300825')
.query(true)
.reply(201, "", [ 'Content-Length',
'0',
'Last-Modified',
- 'Wed, 26 Jun 2019 00:14:11 GMT',
+ 'Thu, 01 Aug 2019 08:42:48 GMT',
'ETag',
- '"0x8D6F9CB37290322"',
+ '"0x8D7165C3B9AC000"',
'Server',
'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
- '39347e4a-301e-0062-11b4-2b3d49000000',
+ 'ea3872c2-501e-0097-0945-481958000000',
'x-ms-version',
'2018-03-28',
'Date',
- 'Wed, 26 Jun 2019 00:14:11 GMT',
+ 'Thu, 01 Aug 2019 08:42:48 GMT',
'Connection',
'close' ]);
nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
- .put('/container156150805161403398/blob156150805190907518', "Hello World")
+ .put('/container156464896864300825/blob156464896894807673', "Hello World")
.reply(201, "", [ 'Content-Length',
'0',
'Content-MD5',
'sQqNsWTgdUEFt6mb5y4/5Q==',
'Last-Modified',
- 'Wed, 26 Jun 2019 00:14:12 GMT',
+ 'Thu, 01 Aug 2019 08:42:49 GMT',
'ETag',
- '"0x8D6F9CB3756A463"',
+ '"0x8D7165C3BC86756"',
'Server',
'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
- '1e261d60-501e-0097-2db4-2b1958000000',
+ '5dffa2b6-201e-0093-3745-48ecda000000',
'x-ms-version',
'2018-03-28',
'x-ms-request-server-encrypted',
'true',
'Date',
- 'Wed, 26 Jun 2019 00:14:11 GMT',
+ 'Thu, 01 Aug 2019 08:42:48 GMT',
'Connection',
'close' ]);
nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
- .delete('/container156150805161403398')
+ .delete('/container156464896864300825')
.query(true)
.reply(202, "", [ 'Content-Length',
'0',
'Server',
'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
- '483de3c3-001e-00e2-0bb4-2b9ee3000000',
+ 'fc635fc3-701e-00ed-1d45-487315000000',
'x-ms-version',
'2018-03-28',
'Date',
- 'Wed, 26 Jun 2019 00:14:11 GMT',
+ 'Thu, 01 Aug 2019 08:42:49 GMT',
'Connection',
'close' ]);
diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_throws_error_if_constructor_containername_parameter_is_empty.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_throws_error_if_constructor_containername_parameter_is_empty.js
similarity index 64%
rename from sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_throws_error_if_constructor_containername_parameter_is_empty.js
rename to sdk/storage/storage-blob/recordings/node/blobclient/recording_throws_error_if_constructor_containername_parameter_is_empty.js
index 95f1628a1888..f80a20369127 100644
--- a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_throws_error_if_constructor_containername_parameter_is_empty.js
+++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_throws_error_if_constructor_containername_parameter_is_empty.js
@@ -1,65 +1,65 @@
let nock = require('nock');
-module.exports.testInfo = {"container":"container156150805071506528","blob":"blob156150805101102566"}
+module.exports.testInfo = {"container":"container156464896774400269","blob":"blob156464896804302154"}
nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
- .put('/container156150805071506528')
+ .put('/container156464896774400269')
.query(true)
.reply(201, "", [ 'Content-Length',
'0',
'Last-Modified',
- 'Wed, 26 Jun 2019 00:14:10 GMT',
+ 'Thu, 01 Aug 2019 08:42:47 GMT',
'ETag',
- '"0x8D6F9CB36A014C9"',
+ '"0x8D7165C3B10A143"',
'Server',
'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
- '9a0787df-501e-00d3-23b4-2bc534000000',
+ '8c78fcdc-001e-0061-5f45-483e4e000000',
'x-ms-version',
'2018-03-28',
'Date',
- 'Wed, 26 Jun 2019 00:14:10 GMT',
+ 'Thu, 01 Aug 2019 08:42:47 GMT',
'Connection',
'close' ]);
nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
- .put('/container156150805071506528/blob156150805101102566', "Hello World")
+ .put('/container156464896774400269/blob156464896804302154', "Hello World")
.reply(201, "", [ 'Content-Length',
'0',
'Content-MD5',
'sQqNsWTgdUEFt6mb5y4/5Q==',
'Last-Modified',
- 'Wed, 26 Jun 2019 00:14:11 GMT',
+ 'Thu, 01 Aug 2019 08:42:48 GMT',
'ETag',
- '"0x8D6F9CB36CEBE31"',
+ '"0x8D7165C3B3DEA74"',
'Server',
'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
- '0c83e6ab-d01e-00af-53b4-2b5801000000',
+ 'abec6008-301e-002d-2b45-48f951000000',
'x-ms-version',
'2018-03-28',
'x-ms-request-server-encrypted',
'true',
'Date',
- 'Wed, 26 Jun 2019 00:14:10 GMT',
+ 'Thu, 01 Aug 2019 08:42:48 GMT',
'Connection',
'close' ]);
nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
- .delete('/container156150805071506528')
+ .delete('/container156464896774400269')
.query(true)
.reply(202, "", [ 'Content-Length',
'0',
'Server',
'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
- 'd7e7bcea-a01e-0082-22b4-2bdbc1000000',
+ '809dc160-401e-00e5-3045-486866000000',
'x-ms-version',
'2018-03-28',
'Date',
- 'Wed, 26 Jun 2019 00:14:11 GMT',
+ 'Thu, 01 Aug 2019 08:42:47 GMT',
'Connection',
'close' ]);
diff --git a/sdk/storage/storage-blob/recordings/node/blobserviceclient/recording_can_be_created_from_a_sas_connection_string.js b/sdk/storage/storage-blob/recordings/node/blobserviceclient/recording_can_be_created_from_a_sas_connection_string.js
new file mode 100644
index 000000000000..5dae7cea25ab
--- /dev/null
+++ b/sdk/storage/storage-blob/recordings/node/blobserviceclient/recording_can_be_created_from_a_sas_connection_string.js
@@ -0,0 +1,26 @@
+let nock = require('nock');
+
+module.exports.testInfo = {}
+
+nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
+ .get('/')
+ .query(true)
+ .reply(200, "1.0truetruetruetrue51.0truetruetrue31.0truetruetrue4DELETE,GET,HEAD,MERGE,POST,PUT,OPTIONS***86400GETexample.com**8888GETexample.com**8888GETexample.com**8888GETexample.com**8888true7false", [ 'Transfer-Encoding',
+ 'chunked',
+ 'Content-Type',
+ 'application/xml',
+ 'Server',
+ 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
+ 'x-ms-request-id',
+ '37b9597c-a01e-00ef-3545-4871ef000000',
+ 'x-ms-version',
+ '2018-03-28',
+ 'Access-Control-Expose-Headers',
+ 'x-ms-request-id,Server,x-ms-version,Content-Length,Date,Transfer-Encoding',
+ 'Access-Control-Allow-Origin',
+ '*',
+ 'Date',
+ 'Thu, 01 Aug 2019 08:42:49 GMT',
+ 'Connection',
+ 'close' ]);
+
diff --git a/sdk/storage/storage-blob/recordings/node/pageblobclient_nodejs_only/recording_throws_error_if_constructor_blobname_parameter_is_empty.js b/sdk/storage/storage-blob/recordings/node/blockblobclient/recording_throws_error_if_constructor_blobname_parameter_is_empty.js
similarity index 63%
rename from sdk/storage/storage-blob/recordings/node/pageblobclient_nodejs_only/recording_throws_error_if_constructor_blobname_parameter_is_empty.js
rename to sdk/storage/storage-blob/recordings/node/blockblobclient/recording_throws_error_if_constructor_blobname_parameter_is_empty.js
index fd6494a3edfc..acbef614d5bf 100644
--- a/sdk/storage/storage-blob/recordings/node/pageblobclient_nodejs_only/recording_throws_error_if_constructor_blobname_parameter_is_empty.js
+++ b/sdk/storage/storage-blob/recordings/node/blockblobclient/recording_throws_error_if_constructor_blobname_parameter_is_empty.js
@@ -1,41 +1,41 @@
let nock = require('nock');
-module.exports.testInfo = {"container":"container156150809756604374","blob":"blob156150809786006242"}
+module.exports.testInfo = {"container":"container156464897172202589","blob":"blob156464897203102316"}
nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
- .put('/container156150809756604374')
+ .put('/container156464897172202589')
.query(true)
.reply(201, "", [ 'Content-Length',
'0',
'Last-Modified',
- 'Wed, 26 Jun 2019 00:14:57 GMT',
+ 'Thu, 01 Aug 2019 08:42:51 GMT',
'ETag',
- '"0x8D6F9CB528C979D"',
+ '"0x8D7165C3D713732"',
'Server',
'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
- '990e5db2-801e-00da-33b4-2bdfba000000',
+ 'd81a7c7d-201e-0054-6145-48901b000000',
'x-ms-version',
'2018-03-28',
'Date',
- 'Wed, 26 Jun 2019 00:14:57 GMT',
+ 'Thu, 01 Aug 2019 08:42:51 GMT',
'Connection',
'close' ]);
nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
- .delete('/container156150809756604374')
+ .delete('/container156464897172202589')
.query(true)
.reply(202, "", [ 'Content-Length',
'0',
'Server',
'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
- 'c954ae75-501e-00b5-37b4-2b776e000000',
+ '9c977115-301e-0040-2545-48537f000000',
'x-ms-version',
'2018-03-28',
'Date',
- 'Wed, 26 Jun 2019 00:14:57 GMT',
+ 'Thu, 01 Aug 2019 08:42:51 GMT',
'Connection',
'close' ]);
diff --git a/sdk/storage/storage-blob/recordings/node/pageblobclient_nodejs_only/recording_throws_error_if_constructor_containername_parameter_is_empty.js b/sdk/storage/storage-blob/recordings/node/blockblobclient/recording_throws_error_if_constructor_containername_parameter_is_empty.js
similarity index 63%
rename from sdk/storage/storage-blob/recordings/node/pageblobclient_nodejs_only/recording_throws_error_if_constructor_containername_parameter_is_empty.js
rename to sdk/storage/storage-blob/recordings/node/blockblobclient/recording_throws_error_if_constructor_containername_parameter_is_empty.js
index 481165ffa70f..a9f091cab148 100644
--- a/sdk/storage/storage-blob/recordings/node/pageblobclient_nodejs_only/recording_throws_error_if_constructor_containername_parameter_is_empty.js
+++ b/sdk/storage/storage-blob/recordings/node/blockblobclient/recording_throws_error_if_constructor_containername_parameter_is_empty.js
@@ -1,41 +1,41 @@
let nock = require('nock');
-module.exports.testInfo = {"container":"container156150809695603712","blob":"blob156150809726801583"}
+module.exports.testInfo = {"container":"container156464897112401521","blob":"blob156464897142907587"}
nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
- .put('/container156150809695603712')
+ .put('/container156464897112401521')
.query(true)
.reply(201, "", [ 'Content-Length',
'0',
'Last-Modified',
- 'Wed, 26 Jun 2019 00:14:57 GMT',
+ 'Thu, 01 Aug 2019 08:42:51 GMT',
'ETag',
- '"0x8D6F9CB52321B58"',
+ '"0x8D7165C3D15764F"',
'Server',
'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
- '49c1e395-201e-0010-3cb4-2b4c77000000',
+ '0ace0b54-501e-0050-5e45-486599000000',
'x-ms-version',
'2018-03-28',
'Date',
- 'Wed, 26 Jun 2019 00:14:56 GMT',
+ 'Thu, 01 Aug 2019 08:42:50 GMT',
'Connection',
'close' ]);
nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
- .delete('/container156150809695603712')
+ .delete('/container156464897112401521')
.query(true)
.reply(202, "", [ 'Content-Length',
'0',
'Server',
'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
- '2fb26c85-001e-0061-0bb4-2b3e4e000000',
+ '91081c1f-701e-0047-0845-48a5fa000000',
'x-ms-version',
'2018-03-28',
'Date',
- 'Wed, 26 Jun 2019 00:14:57 GMT',
+ 'Thu, 01 Aug 2019 08:42:51 GMT',
'Connection',
'close' ]);
diff --git a/sdk/storage/storage-blob/recordings/node/containerclient/recording_can_be_created_with_a_sas_connection_string.js b/sdk/storage/storage-blob/recordings/node/containerclient/recording_can_be_created_with_a_sas_connection_string.js
new file mode 100644
index 000000000000..e269127ce6cc
--- /dev/null
+++ b/sdk/storage/storage-blob/recordings/node/containerclient/recording_can_be_created_with_a_sas_connection_string.js
@@ -0,0 +1,74 @@
+let nock = require('nock');
+
+module.exports.testInfo = {"container":"container156464897233003891"}
+
+nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
+ .put('/container156464897233003891')
+ .query(true)
+ .reply(201, "", [ 'Content-Length',
+ '0',
+ 'Last-Modified',
+ 'Thu, 01 Aug 2019 08:42:52 GMT',
+ 'ETag',
+ '"0x8D7165C3DCBCB45"',
+ 'Server',
+ 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
+ 'x-ms-request-id',
+ '9944b8e3-601e-0053-5645-48669e000000',
+ 'x-ms-version',
+ '2018-03-28',
+ 'Date',
+ 'Thu, 01 Aug 2019 08:42:51 GMT',
+ 'Connection',
+ 'close' ]);
+
+
+nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
+ .get('/container156464897233003891')
+ .query(true)
+ .reply(200, "", [ 'Content-Length',
+ '0',
+ 'Last-Modified',
+ 'Thu, 01 Aug 2019 08:42:52 GMT',
+ 'ETag',
+ '"0x8D7165C3DCBCB45"',
+ 'Server',
+ 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
+ 'x-ms-request-id',
+ '8fa6f6a2-301e-00ae-1145-4859fc000000',
+ 'x-ms-version',
+ '2018-03-28',
+ 'x-ms-lease-status',
+ 'unlocked',
+ 'x-ms-lease-state',
+ 'available',
+ 'x-ms-has-immutability-policy',
+ 'false',
+ 'x-ms-has-legal-hold',
+ 'false',
+ 'Access-Control-Expose-Headers',
+ 'x-ms-request-id,Server,x-ms-version,Last-Modified,ETag,x-ms-lease-status,x-ms-lease-state,x-ms-has-immutability-policy,x-ms-has-legal-hold,Content-Length,Date,Transfer-Encoding',
+ 'Access-Control-Allow-Origin',
+ '*',
+ 'Date',
+ 'Thu, 01 Aug 2019 08:42:52 GMT',
+ 'Connection',
+ 'close' ]);
+
+
+nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
+ .delete('/container156464897233003891')
+ .query(true)
+ .reply(202, "", [ 'Content-Length',
+ '0',
+ 'Server',
+ 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
+ 'x-ms-request-id',
+ 'bc007f40-601e-00bd-3a45-486c1d000000',
+ 'x-ms-version',
+ '2018-03-28',
+ 'Date',
+ 'Thu, 01 Aug 2019 08:42:52 GMT',
+ 'Connection',
+ 'close' ]);
+
diff --git a/sdk/storage/storage-blob/recordings/node/containerclient/recording_can_be_created_with_a_sas_connection_string_and_a_container_name_and_an_option_bag.js b/sdk/storage/storage-blob/recordings/node/containerclient/recording_can_be_created_with_a_sas_connection_string_and_a_container_name_and_an_option_bag.js
new file mode 100644
index 000000000000..2f35dac7a9d3
--- /dev/null
+++ b/sdk/storage/storage-blob/recordings/node/containerclient/recording_can_be_created_with_a_sas_connection_string_and_a_container_name_and_an_option_bag.js
@@ -0,0 +1,74 @@
+let nock = require('nock');
+
+module.exports.testInfo = {"container":"container156464897340508022"}
+
+nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
+ .put('/container156464897340508022')
+ .query(true)
+ .reply(201, "", [ 'Content-Length',
+ '0',
+ 'Last-Modified',
+ 'Thu, 01 Aug 2019 08:42:53 GMT',
+ 'ETag',
+ '"0x8D7165C3E6F726A"',
+ 'Server',
+ 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
+ 'x-ms-request-id',
+ 'a4a008c5-e01e-00ac-2045-485b06000000',
+ 'x-ms-version',
+ '2018-03-28',
+ 'Date',
+ 'Thu, 01 Aug 2019 08:42:53 GMT',
+ 'Connection',
+ 'close' ]);
+
+
+nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
+ .get('/container156464897340508022')
+ .query(true)
+ .reply(200, "", [ 'Content-Length',
+ '0',
+ 'Last-Modified',
+ 'Thu, 01 Aug 2019 08:42:53 GMT',
+ 'ETag',
+ '"0x8D7165C3E6F726A"',
+ 'Server',
+ 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
+ 'x-ms-request-id',
+ '7f26b299-701e-00a2-4045-48b70d000000',
+ 'x-ms-version',
+ '2018-03-28',
+ 'x-ms-lease-status',
+ 'unlocked',
+ 'x-ms-lease-state',
+ 'available',
+ 'x-ms-has-immutability-policy',
+ 'false',
+ 'x-ms-has-legal-hold',
+ 'false',
+ 'Access-Control-Expose-Headers',
+ 'x-ms-request-id,Server,x-ms-version,Last-Modified,ETag,x-ms-lease-status,x-ms-lease-state,x-ms-has-immutability-policy,x-ms-has-legal-hold,Content-Length,Date,Transfer-Encoding',
+ 'Access-Control-Allow-Origin',
+ '*',
+ 'Date',
+ 'Thu, 01 Aug 2019 08:42:53 GMT',
+ 'Connection',
+ 'close' ]);
+
+
+nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
+ .delete('/container156464897340508022')
+ .query(true)
+ .reply(202, "", [ 'Content-Length',
+ '0',
+ 'Server',
+ 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
+ 'x-ms-request-id',
+ '7be9335a-501e-00d8-4845-48dd40000000',
+ 'x-ms-version',
+ '2018-03-28',
+ 'Date',
+ 'Thu, 01 Aug 2019 08:42:53 GMT',
+ 'Connection',
+ 'close' ]);
+
diff --git a/sdk/storage/storage-blob/recordings/node/containerclient_nodejs_only/recording_throws_error_if_constructor_containername_parameter_is_empty.js b/sdk/storage/storage-blob/recordings/node/containerclient/recording_throws_error_if_constructor_containername_parameter_is_empty.js
similarity index 64%
rename from sdk/storage/storage-blob/recordings/node/containerclient_nodejs_only/recording_throws_error_if_constructor_containername_parameter_is_empty.js
rename to sdk/storage/storage-blob/recordings/node/containerclient/recording_throws_error_if_constructor_containername_parameter_is_empty.js
index 9550da054fc6..5833f200523b 100644
--- a/sdk/storage/storage-blob/recordings/node/containerclient_nodejs_only/recording_throws_error_if_constructor_containername_parameter_is_empty.js
+++ b/sdk/storage/storage-blob/recordings/node/containerclient/recording_throws_error_if_constructor_containername_parameter_is_empty.js
@@ -1,41 +1,41 @@
let nock = require('nock');
-module.exports.testInfo = {"container":"container156150806980404524"}
+module.exports.testInfo = {"container":"container156464897428909701"}
nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
- .put('/container156150806980404524')
+ .put('/container156464897428909701')
.query(true)
.reply(201, "", [ 'Content-Length',
'0',
'Last-Modified',
- 'Wed, 26 Jun 2019 00:14:30 GMT',
+ 'Thu, 01 Aug 2019 08:42:54 GMT',
'ETag',
- '"0x8D6F9CB420056F4"',
+ '"0x8D7165C3EF7864E"',
'Server',
'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
- '6ac4cdfa-201e-007d-61b4-2be659000000',
+ 'bf58de49-c01e-0077-7e45-48ffd0000000',
'x-ms-version',
'2018-03-28',
'Date',
- 'Wed, 26 Jun 2019 00:14:29 GMT',
+ 'Thu, 01 Aug 2019 08:42:54 GMT',
'Connection',
'close' ]);
nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
- .delete('/container156150806980404524')
+ .delete('/container156464897428909701')
.query(true)
.reply(202, "", [ 'Content-Length',
'0',
'Server',
'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
- '483dfd2d-001e-00e2-39b4-2b9ee3000000',
+ 'cb8fd642-101e-0057-0e45-48931c000000',
'x-ms-version',
'2018-03-28',
'Date',
- 'Wed, 26 Jun 2019 00:14:29 GMT',
+ 'Thu, 01 Aug 2019 08:42:54 GMT',
'Connection',
'close' ]);
diff --git a/sdk/storage/storage-blob/recordings/node/pageblobclient/recording_can_be_created_with_a_sas_connection_string.js b/sdk/storage/storage-blob/recordings/node/pageblobclient/recording_can_be_created_with_a_sas_connection_string.js
new file mode 100644
index 000000000000..269b9a152252
--- /dev/null
+++ b/sdk/storage/storage-blob/recordings/node/pageblobclient/recording_can_be_created_with_a_sas_connection_string.js
@@ -0,0 +1,105 @@
+let nock = require('nock');
+
+module.exports.testInfo = {"container":"container156464897489608965","blob":"blob156464897518803924"}
+
+nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
+ .put('/container156464897489608965')
+ .query(true)
+ .reply(201, "", [ 'Content-Length',
+ '0',
+ 'Last-Modified',
+ 'Thu, 01 Aug 2019 08:42:55 GMT',
+ 'ETag',
+ '"0x8D7165C3F52D7DF"',
+ 'Server',
+ 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
+ 'x-ms-request-id',
+ 'bda73ff3-c01e-005e-4445-488992000000',
+ 'x-ms-version',
+ '2018-03-28',
+ 'Date',
+ 'Thu, 01 Aug 2019 08:42:54 GMT',
+ 'Connection',
+ 'close' ]);
+
+
+nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
+ .put('/container156464897489608965/blob156464897518803924')
+ .query(true)
+ .reply(201, "", [ 'Content-Length',
+ '0',
+ 'Last-Modified',
+ 'Thu, 01 Aug 2019 08:42:55 GMT',
+ 'ETag',
+ '"0x8D7165C3F80B7AC"',
+ 'Server',
+ 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
+ 'x-ms-request-id',
+ 'a53cd142-001e-00e9-5345-488697000000',
+ 'x-ms-version',
+ '2018-03-28',
+ 'x-ms-request-server-encrypted',
+ 'true',
+ 'Date',
+ 'Thu, 01 Aug 2019 08:42:54 GMT',
+ 'Connection',
+ 'close' ]);
+
+
+nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
+ .get('/container156464897489608965/blob156464897518803924')
+ .query(true)
+ .reply(200, "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000", [ 'Content-Length',
+ '512',
+ 'Content-Type',
+ 'application/octet-stream',
+ 'Last-Modified',
+ 'Thu, 01 Aug 2019 08:42:55 GMT',
+ 'Accept-Ranges',
+ 'bytes',
+ 'ETag',
+ '"0x8D7165C3F80B7AC"',
+ 'Server',
+ 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
+ 'x-ms-request-id',
+ 'ac943f54-601e-0035-5c45-48d4c4000000',
+ 'x-ms-version',
+ '2018-03-28',
+ 'x-ms-creation-time',
+ 'Thu, 01 Aug 2019 08:42:55 GMT',
+ 'x-ms-lease-status',
+ 'unlocked',
+ 'x-ms-lease-state',
+ 'available',
+ 'x-ms-blob-type',
+ 'PageBlob',
+ 'x-ms-blob-sequence-number',
+ '0',
+ 'x-ms-server-encrypted',
+ 'true',
+ 'Access-Control-Expose-Headers',
+ 'x-ms-request-id,Server,x-ms-version,Content-Type,Last-Modified,ETag,x-ms-creation-time,x-ms-lease-status,x-ms-lease-state,x-ms-blob-type,x-ms-blob-sequence-number,x-ms-server-encrypted,Accept-Ranges,Content-Length,Date,Transfer-Encoding',
+ 'Access-Control-Allow-Origin',
+ '*',
+ 'Date',
+ 'Thu, 01 Aug 2019 08:42:54 GMT',
+ 'Connection',
+ 'close' ]);
+
+
+nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
+ .delete('/container156464897489608965')
+ .query(true)
+ .reply(202, "", [ 'Content-Length',
+ '0',
+ 'Server',
+ 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
+ 'x-ms-request-id',
+ '026c0239-901e-0002-3c45-48786b000000',
+ 'x-ms-version',
+ '2018-03-28',
+ 'Date',
+ 'Thu, 01 Aug 2019 08:42:55 GMT',
+ 'Connection',
+ 'close' ]);
+
diff --git a/sdk/storage/storage-blob/recordings/node/blockblobclient_nodejs_only/recording_throws_error_if_constructor_blobname_parameter_is_empty.js b/sdk/storage/storage-blob/recordings/node/pageblobclient/recording_throws_error_if_constructor_blobname_parameter_is_empty.js
similarity index 63%
rename from sdk/storage/storage-blob/recordings/node/blockblobclient_nodejs_only/recording_throws_error_if_constructor_blobname_parameter_is_empty.js
rename to sdk/storage/storage-blob/recordings/node/pageblobclient/recording_throws_error_if_constructor_blobname_parameter_is_empty.js
index df48b1568cb5..af70351fb491 100644
--- a/sdk/storage/storage-blob/recordings/node/blockblobclient_nodejs_only/recording_throws_error_if_constructor_blobname_parameter_is_empty.js
+++ b/sdk/storage/storage-blob/recordings/node/pageblobclient/recording_throws_error_if_constructor_blobname_parameter_is_empty.js
@@ -1,41 +1,41 @@
let nock = require('nock');
-module.exports.testInfo = {"container":"container156150806209107025","blob":"blob156150806238100451"}
+module.exports.testInfo = {"container":"container156464897671403909","blob":"blob156464897700806450"}
nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
- .put('/container156150806209107025')
+ .put('/container156464897671403909')
.query(true)
.reply(201, "", [ 'Content-Length',
'0',
'Last-Modified',
- 'Wed, 26 Jun 2019 00:14:22 GMT',
+ 'Thu, 01 Aug 2019 08:42:56 GMT',
'ETag',
- '"0x8D6F9CB3D674211"',
+ '"0x8D7165C40688BC5"',
'Server',
'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
- '697ab8a2-801e-007b-4ab4-2b1121000000',
+ '7e075354-a01e-00a0-7e45-48b5f7000000',
'x-ms-version',
'2018-03-28',
'Date',
- 'Wed, 26 Jun 2019 00:14:21 GMT',
+ 'Thu, 01 Aug 2019 08:42:55 GMT',
'Connection',
'close' ]);
nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
- .delete('/container156150806209107025')
+ .delete('/container156464897671403909')
.query(true)
.reply(202, "", [ 'Content-Length',
'0',
'Server',
'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
- '6b3786d7-301e-00ea-6eb4-2b8590000000',
+ '2b0511ad-901e-00a3-6045-48b6f0000000',
'x-ms-version',
'2018-03-28',
'Date',
- 'Wed, 26 Jun 2019 00:14:22 GMT',
+ 'Thu, 01 Aug 2019 08:42:57 GMT',
'Connection',
'close' ]);
diff --git a/sdk/storage/storage-blob/recordings/node/blockblobclient_nodejs_only/recording_throws_error_if_constructor_containername_parameter_is_empty.js b/sdk/storage/storage-blob/recordings/node/pageblobclient/recording_throws_error_if_constructor_containername_parameter_is_empty.js
similarity index 63%
rename from sdk/storage/storage-blob/recordings/node/blockblobclient_nodejs_only/recording_throws_error_if_constructor_containername_parameter_is_empty.js
rename to sdk/storage/storage-blob/recordings/node/pageblobclient/recording_throws_error_if_constructor_containername_parameter_is_empty.js
index f26f5061a45f..a94a66cc3462 100644
--- a/sdk/storage/storage-blob/recordings/node/blockblobclient_nodejs_only/recording_throws_error_if_constructor_containername_parameter_is_empty.js
+++ b/sdk/storage/storage-blob/recordings/node/pageblobclient/recording_throws_error_if_constructor_containername_parameter_is_empty.js
@@ -1,41 +1,41 @@
let nock = require('nock');
-module.exports.testInfo = {"container":"container156150806150606385","blob":"blob156150806179905833"}
+module.exports.testInfo = {"container":"container156464897610800056","blob":"blob156464897641303632"}
nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
- .put('/container156150806150606385')
+ .put('/container156464897610800056')
.query(true)
.reply(201, "", [ 'Content-Length',
'0',
'Last-Modified',
- 'Wed, 26 Jun 2019 00:14:21 GMT',
+ 'Thu, 01 Aug 2019 08:42:56 GMT',
'ETag',
- '"0x8D6F9CB3D0D5789"',
+ '"0x8D7165C400DE795"',
'Server',
'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
- 'a7bca7f7-301e-00e1-0cb4-2b9de4000000',
+ 'abfd03a0-201e-007d-4e45-48e659000000',
'x-ms-version',
'2018-03-28',
'Date',
- 'Wed, 26 Jun 2019 00:14:21 GMT',
+ 'Thu, 01 Aug 2019 08:42:55 GMT',
'Connection',
'close' ]);
nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
- .delete('/container156150806150606385')
+ .delete('/container156464897610800056')
.query(true)
.reply(202, "", [ 'Content-Length',
'0',
'Server',
'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
- 'bdfa760f-701e-006e-62b4-2bd3b8000000',
+ '1bfd3c7c-c01e-00d6-4345-48314b000000',
'x-ms-version',
'2018-03-28',
'Date',
- 'Wed, 26 Jun 2019 00:14:21 GMT',
+ 'Thu, 01 Aug 2019 08:42:56 GMT',
'Connection',
'close' ]);
diff --git a/sdk/storage/storage-blob/src/AppendBlobClient.ts b/sdk/storage/storage-blob/src/AppendBlobClient.ts
index 77782c3dfa4a..4a44f010425f 100644
--- a/sdk/storage/storage-blob/src/AppendBlobClient.ts
+++ b/sdk/storage/storage-blob/src/AppendBlobClient.ts
@@ -116,11 +116,15 @@ export class AppendBlobClient extends BlobClient {
private appendBlobContext: AppendBlob;
/**
- * ONLY AVAILABLE IN NODE.JS RUNTIME.
*
* Creates an instance of AppendBlobClient.
*
- * @param {string} connectionString Connection string for an Azure storage account.
+ * @param {string} connectionString Account connection string or a SAS connection string of an Azure storage account.
+ * [ Note - Account connection string can only be used in NODE.JS runtime. ]
+ * Account connection string example -
+ * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`
+ * SAS connection string example -
+ * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString`
* @param {string} containerName Container name.
* @param {string} blobName Blob name.
* @param {NewPipelineOptions} [options] Optional. Options to configure the HTTP pipeline.
@@ -211,19 +215,35 @@ export class AppendBlobClient extends BlobClient {
blobNameOrOptions &&
typeof blobNameOrOptions === "string"
) {
- if (isNode) {
- const containerName = credentialOrPipelineOrContainerName;
- const blobName = blobNameOrOptions;
+ const containerName = credentialOrPipelineOrContainerName;
+ const blobName = blobNameOrOptions;
- const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
- const sharedKeyCredential = new SharedKeyCredential(
- extractedCreds.accountName,
- extractedCreds.accountKey
- );
- urlOrConnectionString = extractedCreds.url + "/" + containerName + "/" + blobName;
- pipeline = newPipeline(sharedKeyCredential, options);
+ const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
+ if (extractedCreds.kind === "AccountConnString") {
+ if (isNode) {
+ const sharedKeyCredential = new SharedKeyCredential(
+ extractedCreds.accountName,
+ extractedCreds.accountKey
+ );
+ urlOrConnectionString = extractedCreds.url + "/" + containerName + "/" + blobName;
+ pipeline = newPipeline(sharedKeyCredential, options);
+ } else {
+ throw new Error("Account connection string is only supported in Node.js environment");
+ }
+ } else if (extractedCreds.kind === "SASConnString") {
+ urlOrConnectionString =
+ extractedCreds.url +
+ "/" +
+ containerName +
+ "/" +
+ blobName +
+ "?" +
+ extractedCreds.accountSas;
+ pipeline = newPipeline(new AnonymousCredential(), options);
} else {
- throw new Error("Connection string is only supported in Node.js environment");
+ throw new Error(
+ "Connection string must be either an Account connection string or a SAS connection string"
+ );
}
} else {
throw new Error("Expecting non-empty strings for containerName and blobName parameters");
diff --git a/sdk/storage/storage-blob/src/BlobClient.ts b/sdk/storage/storage-blob/src/BlobClient.ts
index b3bd55d17e7e..5b623cfba3d7 100644
--- a/sdk/storage/storage-blob/src/BlobClient.ts
+++ b/sdk/storage/storage-blob/src/BlobClient.ts
@@ -542,11 +542,15 @@ export class BlobClient extends StorageClient {
private blobContext: Blob;
/**
- * ONLY AVAILABLE IN NODE.JS RUNTIME.
*
* Creates an instance of BlobClient from connection string.
*
- * @param {string} connectionString Connection string for an Azure storage account.
+ * @param {string} connectionString Account connection string or a SAS connection string of an Azure storage account.
+ * [ Note - Account connection string can only be used in NODE.JS runtime. ]
+ * Account connection string example -
+ * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`
+ * SAS connection string example -
+ * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString`
* @param {string} containerName Container name.
* @param {string} blobName Blob name.
* @param {NewPipelineOptions} [options] Optional. Options to configure the HTTP pipeline.
@@ -630,19 +634,35 @@ export class BlobClient extends StorageClient {
blobNameOrOptions &&
typeof blobNameOrOptions === "string"
) {
- if (isNode) {
- const containerName = credentialOrPipelineOrContainerName;
- const blobName = blobNameOrOptions;
+ const containerName = credentialOrPipelineOrContainerName;
+ const blobName = blobNameOrOptions;
- const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
- const sharedKeyCredential = new SharedKeyCredential(
- extractedCreds.accountName,
- extractedCreds.accountKey
- );
- urlOrConnectionString = extractedCreds.url + "/" + containerName + "/" + blobName;
- pipeline = newPipeline(sharedKeyCredential, options);
+ const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
+ if (extractedCreds.kind === "AccountConnString") {
+ if (isNode) {
+ const sharedKeyCredential = new SharedKeyCredential(
+ extractedCreds.accountName,
+ extractedCreds.accountKey
+ );
+ urlOrConnectionString = extractedCreds.url + "/" + containerName + "/" + blobName;
+ pipeline = newPipeline(sharedKeyCredential, options);
+ } else {
+ throw new Error("Account connection string is only supported in Node.js environment");
+ }
+ } else if (extractedCreds.kind === "SASConnString") {
+ urlOrConnectionString =
+ extractedCreds.url +
+ "/" +
+ containerName +
+ "/" +
+ blobName +
+ "?" +
+ extractedCreds.accountSas;
+ pipeline = newPipeline(new AnonymousCredential(), options);
} else {
- throw new Error("Connection string is only supported in Node.js environment");
+ throw new Error(
+ "Connection string must be either an Account connection string or a SAS connection string"
+ );
}
} else {
throw new Error("Expecting non-empty strings for containerName and blobName parameters");
diff --git a/sdk/storage/storage-blob/src/BlobServiceClient.ts b/sdk/storage/storage-blob/src/BlobServiceClient.ts
index a79979af60a0..bf344399aee9 100644
--- a/sdk/storage/storage-blob/src/BlobServiceClient.ts
+++ b/sdk/storage/storage-blob/src/BlobServiceClient.ts
@@ -170,22 +170,39 @@ export class BlobServiceClient extends StorageClient {
private serviceContext: Service;
/**
- * ONLY AVAILABLE IN NODE.JS RUNTIME.
*
* Creates an instance of BlobServiceClient from connection string.
*
- * @param {string} connectionString Connection string for an Azure storage account.
+ * @param {string} connectionString Account connection string or a SAS connection string of an Azure storage account.
+ * [ Note - Account connection string can only be used in NODE.JS runtime. ]
+ * Account connection string example -
+ * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`
+ * SAS connection string example -
+ * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString`
* @param {NewPipelineOptions} [options] Optional. Options to configure the HTTP pipeline.
* @memberof BlobServiceClient
*/
public static fromConnectionString(connectionString: string, options?: NewPipelineOptions) {
const extractedCreds = extractConnectionStringParts(connectionString);
- const sharedKeyCredential = new SharedKeyCredential(
- extractedCreds.accountName,
- extractedCreds.accountKey
- );
- const pipeline = newPipeline(sharedKeyCredential, options);
- return new BlobServiceClient(extractedCreds.url, pipeline);
+ if (extractedCreds.kind === "AccountConnString") {
+ if (isNode) {
+ const sharedKeyCredential = new SharedKeyCredential(
+ extractedCreds.accountName,
+ extractedCreds.accountKey
+ );
+ const pipeline = newPipeline(sharedKeyCredential, options);
+ return new BlobServiceClient(extractedCreds.url, pipeline);
+ } else {
+ throw new Error("Account connection string is only supported in Node.js environment");
+ }
+ } else if (extractedCreds.kind === "SASConnString") {
+ const pipeline = newPipeline(new AnonymousCredential(), options);
+ return new BlobServiceClient(extractedCreds.url + "?" + extractedCreds.accountSas, pipeline);
+ } else {
+ throw new Error(
+ "Connection string must be either an Account connection string or a SAS connection string"
+ );
+ }
}
/**
diff --git a/sdk/storage/storage-blob/src/BlockBlobClient.ts b/sdk/storage/storage-blob/src/BlockBlobClient.ts
index 39b35ca3baf5..7ddf2efbd6ce 100644
--- a/sdk/storage/storage-blob/src/BlockBlobClient.ts
+++ b/sdk/storage/storage-blob/src/BlockBlobClient.ts
@@ -389,11 +389,15 @@ export class BlockBlobClient extends BlobClient {
private blockBlobContext: BlockBlob;
/**
- * ONLY AVAILABLE IN NODE.JS RUNTIME.
*
* Creates an instance of BlockBlobClient.
*
- * @param {string} connectionString Connection string for an Azure storage account.
+ * @param {string} connectionString Account connection string or a SAS connection string of an Azure storage account.
+ * [ Note - Account connection string can only be used in NODE.JS runtime. ]
+ * Account connection string example -
+ * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`
+ * SAS connection string example -
+ * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString`
* @param {string} containerName Container name.
* @param {string} blobName Blob name.
* @param {NewPipelineOptions} [options] Optional. Options to configure the HTTP pipeline.
@@ -482,19 +486,35 @@ export class BlockBlobClient extends BlobClient {
blobNameOrOptions &&
typeof blobNameOrOptions === "string"
) {
- if (isNode) {
- const containerName = credentialOrPipelineOrContainerName;
- const blobName = blobNameOrOptions;
+ const containerName = credentialOrPipelineOrContainerName;
+ const blobName = blobNameOrOptions;
- const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
- const sharedKeyCredential = new SharedKeyCredential(
- extractedCreds.accountName,
- extractedCreds.accountKey
- );
- urlOrConnectionString = extractedCreds.url + "/" + containerName + "/" + blobName;
- pipeline = newPipeline(sharedKeyCredential, options);
+ const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
+ if (extractedCreds.kind === "AccountConnString") {
+ if (isNode) {
+ const sharedKeyCredential = new SharedKeyCredential(
+ extractedCreds.accountName,
+ extractedCreds.accountKey
+ );
+ urlOrConnectionString = extractedCreds.url + "/" + containerName + "/" + blobName;
+ pipeline = newPipeline(sharedKeyCredential, options);
+ } else {
+ throw new Error("Account connection string is only supported in Node.js environment");
+ }
+ } else if (extractedCreds.kind === "SASConnString") {
+ urlOrConnectionString =
+ extractedCreds.url +
+ "/" +
+ containerName +
+ "/" +
+ blobName +
+ "?" +
+ extractedCreds.accountSas;
+ pipeline = newPipeline(new AnonymousCredential(), options);
} else {
- throw new Error("Connection string is only supported in Node.js environment");
+ throw new Error(
+ "Connection string must be either an Account connection string or a SAS connection string"
+ );
}
} else {
throw new Error("Expecting non-empty strings for containerName and blobName parameters");
diff --git a/sdk/storage/storage-blob/src/ContainerClient.ts b/sdk/storage/storage-blob/src/ContainerClient.ts
index 9aae5ba5197e..e6d4d1953b8e 100644
--- a/sdk/storage/storage-blob/src/ContainerClient.ts
+++ b/sdk/storage/storage-blob/src/ContainerClient.ts
@@ -443,11 +443,15 @@ export class ContainerClient extends StorageClient {
private containerContext: Container;
/**
- * ONLY AVAILABLE IN NODE.JS RUNTIME.
*
* Creates an instance of ContainerClient.
*
- * @param {string} connectionString Connection string for an Azure storage account.
+ * @param {string} connectionString Account connection string or a SAS connection string of an Azure storage account.
+ * [ Note - Account connection string can only be used in NODE.JS runtime. ]
+ * Account connection string example -
+ * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`
+ * SAS connection string example -
+ * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString`
* @param {string} containerName Container name.
* @param {NewPipelineOptions} [options] Optional. Options to configure the HTTP pipeline.
* @memberof ContainerClient
@@ -527,18 +531,28 @@ export class ContainerClient extends StorageClient {
credentialOrPipelineOrContainerName &&
typeof credentialOrPipelineOrContainerName === "string"
) {
- if (isNode) {
- const containerName = credentialOrPipelineOrContainerName;
+ const containerName = credentialOrPipelineOrContainerName;
- const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
- const sharedKeyCredential = new SharedKeyCredential(
- extractedCreds.accountName,
- extractedCreds.accountKey
- );
- urlOrConnectionString = extractedCreds.url + "/" + containerName + "/";
- pipeline = newPipeline(sharedKeyCredential, options);
+ const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
+ if (extractedCreds.kind === "AccountConnString") {
+ if (isNode) {
+ const sharedKeyCredential = new SharedKeyCredential(
+ extractedCreds.accountName,
+ extractedCreds.accountKey
+ );
+ urlOrConnectionString = extractedCreds.url + "/" + containerName + "/";
+ pipeline = newPipeline(sharedKeyCredential, options);
+ } else {
+ throw new Error("Account connection string is only supported in Node.js environment");
+ }
+ } else if (extractedCreds.kind === "SASConnString") {
+ urlOrConnectionString =
+ extractedCreds.url + "/" + containerName + "?" + extractedCreds.accountSas;
+ pipeline = newPipeline(new AnonymousCredential(), options);
} else {
- throw new Error("Connection string is only supported in Node.js environment");
+ throw new Error(
+ "Connection string must be either an Account connection string or a SAS connection string"
+ );
}
} else {
throw new Error("Expecting non-empty strings for containerName parameter");
diff --git a/sdk/storage/storage-blob/src/PageBlobClient.ts b/sdk/storage/storage-blob/src/PageBlobClient.ts
index 0209a1ae8882..dfe43a877e98 100644
--- a/sdk/storage/storage-blob/src/PageBlobClient.ts
+++ b/sdk/storage/storage-blob/src/PageBlobClient.ts
@@ -275,11 +275,15 @@ export class PageBlobClient extends BlobClient {
private pageBlobContext: PageBlob;
/**
- * ONLY AVAILABLE IN NODE.JS RUNTIME.
*
* Creates an instance of PageBlobClient.
*
- * @param {string} connectionString Connection string for an Azure storage account.
+ * @param {string} connectionString Account connection string or a SAS connection string of an Azure storage account.
+ * [ Note - Account connection string can only be used in NODE.JS runtime. ]
+ * Account connection string example -
+ * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`
+ * SAS connection string example -
+ * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString`
* @param {string} containerName Container name.
* @param {string} blobName Blob name.
* @param {NewPipelineOptions} [options] Optional. Options to configure the HTTP pipeline.
@@ -361,19 +365,35 @@ export class PageBlobClient extends BlobClient {
blobNameOrOptions &&
typeof blobNameOrOptions === "string"
) {
- if (isNode) {
- const containerName = credentialOrPipelineOrContainerName;
- const blobName = blobNameOrOptions;
+ const containerName = credentialOrPipelineOrContainerName;
+ const blobName = blobNameOrOptions;
- const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
- const sharedKeyCredential = new SharedKeyCredential(
- extractedCreds.accountName,
- extractedCreds.accountKey
- );
- urlOrConnectionString = extractedCreds.url + "/" + containerName + "/" + blobName;
- pipeline = newPipeline(sharedKeyCredential, options);
+ const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
+ if (extractedCreds.kind === "AccountConnString") {
+ if (isNode) {
+ const sharedKeyCredential = new SharedKeyCredential(
+ extractedCreds.accountName,
+ extractedCreds.accountKey
+ );
+ urlOrConnectionString = extractedCreds.url + "/" + containerName + "/" + blobName;
+ pipeline = newPipeline(sharedKeyCredential, options);
+ } else {
+ throw new Error("Account connection string is only supported in Node.js environment");
+ }
+ } else if (extractedCreds.kind === "SASConnString") {
+ urlOrConnectionString =
+ extractedCreds.url +
+ "/" +
+ containerName +
+ "/" +
+ blobName +
+ "?" +
+ extractedCreds.accountSas;
+ pipeline = newPipeline(new AnonymousCredential(), options);
} else {
- throw new Error("Connection string is only supported in Node.js environment");
+ throw new Error(
+ "Connection string must be either an Account connection string or a SAS connection string"
+ );
}
} else {
throw new Error("Expecting non-empty strings for containerName and blobName parameters");
diff --git a/sdk/storage/storage-blob/src/utils/utils.common.ts b/sdk/storage/storage-blob/src/utils/utils.common.ts
index 42e4d3ea7742..31b62d1ebbc9 100644
--- a/sdk/storage/storage-blob/src/utils/utils.common.ts
+++ b/sdk/storage/storage-blob/src/utils/utils.common.ts
@@ -72,54 +72,83 @@ export function escapeURLPath(url: string): string {
}
/**
- * ONLY AVAILABLE IN NODE.JS RUNTIME.
- *
* Extracts the parts of an Azure Storage account connection string.
*
* @export
* @param {string} connectionString Connection string.
- * @returns {{ [key: string]: any }} String key value pairs of the storage account's base url for Blob, account name, and account key.
+ * @returns {{ kind: "AccountConnString" | "SASConnString", url: string, [key: string]: any }} String key value pairs of the storage account's url and credentials.
*/
-export function extractConnectionStringParts(connectionString: string): { [key: string]: any } {
- const matchCredentials = connectionString.match(
- "DefaultEndpointsProtocol=(.*);AccountName=(.*);AccountKey=(.*);EndpointSuffix=(.*)"
- );
-
- let defaultEndpointsProtocol;
- let accountName;
- let accountKey;
- let endpointSuffix;
-
- try {
- defaultEndpointsProtocol = matchCredentials![1] || "";
- accountName = matchCredentials![2] || "";
- accountKey = Buffer.from(matchCredentials![3], "base64");
- endpointSuffix = matchCredentials![4] || "";
- } catch (err) {
- throw new Error("Invalid Connection String");
- }
+export function extractConnectionStringParts(
+ connectionString: string
+): { kind: "AccountConnString" | "SASConnString"; url: string; [key: string]: any } {
+ // Account connection string
+ if (
+ connectionString.search("DefaultEndpointsProtocol=") !== -1 &&
+ connectionString.search("AccountKey=") !== -1
+ ) {
+ const matchCredentials = connectionString.match(
+ "DefaultEndpointsProtocol=(.*);AccountName=(.*);AccountKey=(.*);EndpointSuffix=(.*)"
+ );
+
+ let defaultEndpointsProtocol;
+ let accountName;
+ let accountKey;
+ let endpointSuffix;
+
+ try {
+ defaultEndpointsProtocol = matchCredentials![1] || "";
+ accountName = matchCredentials![2] || "";
+ accountKey = Buffer.from(matchCredentials![3], "base64");
+ endpointSuffix = matchCredentials![4] || "";
+ } catch (err) {
+ throw new Error("Invalid Account Connection String");
+ }
+
+ const protocol = defaultEndpointsProtocol.toLowerCase();
+ if (protocol !== "https" && protocol !== "http") {
+ throw new Error(
+ "Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'"
+ );
+ } else if (!accountName) {
+ throw new Error("Invalid AccountName in the provided Connection String");
+ } else if (accountKey.length === 0) {
+ throw new Error("Invalid AccountKey in the provided Connection String");
+ } else if (!endpointSuffix) {
+ throw new Error("Invalid EndpointSuffix in the provided Connection String");
+ }
- const protocol = defaultEndpointsProtocol.toLowerCase();
- if (protocol !== "https" && protocol !== "http") {
- throw new Error(
- "Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'"
+ const url = `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`;
+
+ return {
+ kind: "AccountConnString",
+ url,
+ accountName,
+ accountKey
+ };
+ } else {
+ // SAS connection string
+ const matchCredentials = connectionString.match(
+ "BlobEndpoint=(.*)/;QueueEndpoint=(.*)/;FileEndpoint=(.*)/;TableEndpoint=(.*)/;SharedAccessSignature=(.*)"
);
- } else if (!accountName) {
- throw new Error("Invalid AccountName in the provided Connection String");
- } else if (accountKey.length === 0) {
- throw new Error("Invalid AccountKey in the provided Connection String");
- } else if (!endpointSuffix) {
- throw new Error("Invalid EndpointSuffix in the provided Connection String");
- }
+ let endpoint;
+ let accountSas;
+ try {
+ endpoint = matchCredentials![1] || "";
+ accountSas = matchCredentials![5] || "";
+ } catch (error) {
+ throw new Error("Invalid SAS Connection String");
+ }
- const url = `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`;
+ if (!endpoint) {
+ throw new Error("Invalid QueueEndpoint in the provided SAS Connection String");
+ } else if (!accountSas) {
+ throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String");
+ }
- return {
- url: url,
- accountName: accountName,
- accountKey: accountKey
- };
+ return { kind: "SASConnString", url: endpoint, accountSas };
+ }
}
+
/**
* Internal escape method implmented Strategy Two mentioned in escapeURL() description.
*
diff --git a/sdk/storage/storage-blob/test/appendblobclient.spec.ts b/sdk/storage/storage-blob/test/appendblobclient.spec.ts
index 02e787b50b80..925db739f81e 100644
--- a/sdk/storage/storage-blob/test/appendblobclient.spec.ts
+++ b/sdk/storage/storage-blob/test/appendblobclient.spec.ts
@@ -1,6 +1,6 @@
import * as assert from "assert";
-import { bodyToString, getBSU } from "./utils";
+import { bodyToString, getBSU, getSASConnectionStringFromEnvironment } from "./utils";
import { record } from "./utils/recorder";
import * as dotenv from "dotenv";
import { AppendBlobClient, ContainerClient } from "../src";
@@ -69,4 +69,43 @@ describe("AppendBlobClient", () => {
assert.equal(await bodyToString(downloadResponse, content.length), content);
assert.equal(downloadResponse.contentLength!, content.length);
});
+
+ it("can be created with a sas connection string", async () => {
+ const newClient = new AppendBlobClient(
+ getSASConnectionStringFromEnvironment(),
+ containerName,
+ blobName
+ );
+
+ await newClient.create();
+ await newClient.download();
+ });
+
+ it("throws error if constructor containerName parameter is empty", async () => {
+ try {
+ // tslint:disable-next-line: no-unused-expression
+ new AppendBlobClient(getSASConnectionStringFromEnvironment(), "", "blobName");
+ assert.fail("Expecting an thrown error but didn't get one.");
+ } catch (error) {
+ assert.equal(
+ "Expecting non-empty strings for containerName and blobName parameters",
+ error.message,
+ "Error message is different than expected."
+ );
+ }
+ });
+
+ it("throws error if constructor blobName parameter is empty", async () => {
+ try {
+ // tslint:disable-next-line: no-unused-expression
+ new AppendBlobClient(getSASConnectionStringFromEnvironment(), "containerName", "");
+ assert.fail("Expecting an thrown error but didn't get one.");
+ } catch (error) {
+ assert.equal(
+ "Expecting non-empty strings for containerName and blobName parameters",
+ error.message,
+ "Error message is different than expected."
+ );
+ }
+ });
});
diff --git a/sdk/storage/storage-blob/test/blobclient.spec.ts b/sdk/storage/storage-blob/test/blobclient.spec.ts
index 2db849794ab6..bf0866f09a84 100644
--- a/sdk/storage/storage-blob/test/blobclient.spec.ts
+++ b/sdk/storage/storage-blob/test/blobclient.spec.ts
@@ -2,7 +2,7 @@ import * as assert from "assert";
import { isNode } from "@azure/core-http";
import * as dotenv from "dotenv";
-import { bodyToString, getBSU } from "./utils";
+import { bodyToString, getBSU, getSASConnectionStringFromEnvironment } from "./utils";
import { record, delay } from "./utils/recorder";
import { BlobClient, BlockBlobClient, ContainerClient } from "../src";
dotenv.config({ path: "../.env" });
@@ -246,4 +246,47 @@ describe("BlobClient", () => {
assert.equal(properties.archiveStatus.toLowerCase(), "rehydrate-pending-to-hot");
}
});
+
+ it("can be created with a sas connection string", async () => {
+ const newClient = new BlobClient(
+ getSASConnectionStringFromEnvironment(),
+ containerName,
+ blobName
+ );
+ const metadata = {
+ a: "a",
+ b: "b"
+ };
+ await newClient.setMetadata(metadata);
+ const result = await newClient.getProperties();
+ assert.deepStrictEqual(result.metadata, metadata);
+ });
+
+ it("throws error if constructor containerName parameter is empty", async () => {
+ try {
+ // tslint:disable-next-line: no-unused-expression
+ new BlobClient(getSASConnectionStringFromEnvironment(), "", "blobName");
+ assert.fail("Expecting an thrown error but didn't get one.");
+ } catch (error) {
+ assert.equal(
+ "Expecting non-empty strings for containerName and blobName parameters",
+ error.message,
+ "Error message is different than expected."
+ );
+ }
+ });
+
+ it("throws error if constructor blobName parameter is empty", async () => {
+ try {
+ // tslint:disable-next-line: no-unused-expression
+ new BlobClient(getSASConnectionStringFromEnvironment(), "containerName", "");
+ assert.fail("Expecting an thrown error but didn't get one.");
+ } catch (error) {
+ assert.equal(
+ "Expecting non-empty strings for containerName and blobName parameters",
+ error.message,
+ "Error message is different than expected."
+ );
+ }
+ });
});
diff --git a/sdk/storage/storage-blob/test/blobserviceclient.spec.ts b/sdk/storage/storage-blob/test/blobserviceclient.spec.ts
index 3df256926489..63864f161139 100644
--- a/sdk/storage/storage-blob/test/blobserviceclient.spec.ts
+++ b/sdk/storage/storage-blob/test/blobserviceclient.spec.ts
@@ -2,7 +2,7 @@ import * as assert from "assert";
import * as dotenv from "dotenv";
import { BlobServiceClient } from "../src/BlobServiceClient";
-import { getAlternateBSU, getBSU } from "./utils";
+import { getAlternateBSU, getBSU, getSASConnectionStringFromEnvironment } from "./utils";
import { record, delay } from "./utils/recorder";
dotenv.config({ path: "../.env" });
@@ -231,7 +231,7 @@ describe("BlobServiceClient", () => {
assert.deepEqual(container.metadata!.key, "val");
}
// Gets next marker
- let marker = response.nextMarker;
+ const marker = response.nextMarker;
// Passing next marker as continuationToken
iter = blobServiceClient
.listContainers({
@@ -392,4 +392,15 @@ describe("BlobServiceClient", () => {
assert.ok((error.statusCode as number) === 404);
}
});
+
+ it("can be created from a sas connection string", async () => {
+ const newClient = BlobServiceClient.fromConnectionString(
+ getSASConnectionStringFromEnvironment()
+ );
+
+ const result = await newClient.getProperties();
+
+ assert.ok(typeof result.requestId);
+ assert.ok(result.requestId!.length > 0);
+ });
});
diff --git a/sdk/storage/storage-blob/test/blockblobclient.spec.ts b/sdk/storage/storage-blob/test/blockblobclient.spec.ts
index f5807600ea1f..2a6210ba0ddd 100644
--- a/sdk/storage/storage-blob/test/blockblobclient.spec.ts
+++ b/sdk/storage/storage-blob/test/blockblobclient.spec.ts
@@ -2,7 +2,7 @@ import * as assert from "assert";
import { record } from "./utils/recorder";
import * as dotenv from "dotenv";
-import { base64encode, bodyToString, getBSU } from "./utils";
+import { base64encode, bodyToString, getBSU, getSASConnectionStringFromEnvironment } from "./utils";
import { ContainerClient, BlobClient, BlockBlobClient } from "../src";
dotenv.config({ path: "../.env" });
@@ -198,4 +198,45 @@ describe("BlockBlobClient", () => {
assert.equal(listResponse.committedBlocks![0].name, base64encode("2"));
assert.equal(listResponse.committedBlocks![0].size, body.length);
});
+
+ it("can be created with a sas connection string", async () => {
+ const newClient = new BlockBlobClient(
+ getSASConnectionStringFromEnvironment(),
+ containerName,
+ blobName
+ );
+
+ const body: string = recorder.getUniqueName("randomstring");
+ await newClient.upload(body, body.length);
+ const result = await newClient.download(0);
+ assert.deepStrictEqual(await bodyToString(result, body.length), body);
+ });
+
+ it("throws error if constructor containerName parameter is empty", async () => {
+ try {
+ // tslint:disable-next-line: no-unused-expression
+ new BlockBlobClient(getSASConnectionStringFromEnvironment(), "", "blobName");
+ assert.fail("Expecting an thrown error but didn't get one.");
+ } catch (error) {
+ assert.equal(
+ "Expecting non-empty strings for containerName and blobName parameters",
+ error.message,
+ "Error message is different than expected."
+ );
+ }
+ });
+
+ it("throws error if constructor blobName parameter is empty", async () => {
+ try {
+ // tslint:disable-next-line: no-unused-expression
+ new BlockBlobClient(getSASConnectionStringFromEnvironment(), "containerName", "");
+ assert.fail("Expecting an thrown error but didn't get one.");
+ } catch (error) {
+ assert.equal(
+ "Expecting non-empty strings for containerName and blobName parameters",
+ error.message,
+ "Error message is different than expected."
+ );
+ }
+ });
});
diff --git a/sdk/storage/storage-blob/test/containerclient.spec.ts b/sdk/storage/storage-blob/test/containerclient.spec.ts
index fbaf5018cf93..670a62427e0e 100644
--- a/sdk/storage/storage-blob/test/containerclient.spec.ts
+++ b/sdk/storage/storage-blob/test/containerclient.spec.ts
@@ -1,6 +1,6 @@
import * as assert from "assert";
import * as dotenv from "dotenv";
-import { bodyToString, getBSU } from "./utils";
+import { bodyToString, getBSU, getSASConnectionStringFromEnvironment } from "./utils";
import { record } from "./utils/recorder";
import { ContainerClient } from "../src";
dotenv.config({ path: "../.env" });
@@ -272,7 +272,7 @@ describe("ContainerClient", () => {
i++;
}
// Gets next marker
- let marker = response.nextMarker;
+ const marker = response.nextMarker;
// Passing next marker as continuationToken
iter = containerClient
.listBlobsFlat({
@@ -461,4 +461,54 @@ describe("ContainerClient", () => {
assert.ok((error.statusCode as number) === 404);
}
});
+
+ it("can be created with a sas connection string", async () => {
+ const newClient = new ContainerClient(getSASConnectionStringFromEnvironment(), containerName);
+
+ const result = await newClient.getProperties();
+
+ assert.ok(result.eTag!.length > 0);
+ assert.ok(result.lastModified);
+ assert.ok(!result.leaseDuration);
+ assert.equal(result.leaseState, "available");
+ assert.equal(result.leaseStatus, "unlocked");
+ assert.ok(result.requestId);
+ assert.ok(result.version);
+ assert.ok(result.date);
+ assert.ok(!result.blobPublicAccess);
+ });
+
+ it("can be created with a sas connection string and a container name and an option bag", async () => {
+ const newClient = new ContainerClient(getSASConnectionStringFromEnvironment(), containerName, {
+ retryOptions: {
+ maxTries: 5
+ }
+ });
+
+ const result = await newClient.getProperties();
+
+ assert.ok(result.eTag!.length > 0);
+ assert.ok(result.lastModified);
+ assert.ok(!result.leaseDuration);
+ assert.equal(result.leaseState, "available");
+ assert.equal(result.leaseStatus, "unlocked");
+ assert.ok(result.requestId);
+ assert.ok(result.version);
+ assert.ok(result.date);
+ assert.ok(!result.blobPublicAccess);
+ });
+
+ it("throws error if constructor containerName parameter is empty", async () => {
+ try {
+ // tslint:disable-next-line: no-unused-expression
+ new ContainerClient(getSASConnectionStringFromEnvironment(), "");
+ assert.fail("Expecting an thrown error but didn't get one.");
+ } catch (error) {
+ assert.equal(
+ "Expecting non-empty strings for containerName parameter",
+ error.message,
+ "Error message is different than expected."
+ );
+ }
+ });
});
diff --git a/sdk/storage/storage-blob/test/node/appendblobclient.spec.ts b/sdk/storage/storage-blob/test/node/appendblobclient.spec.ts
index 42b9b1e81f1a..3abf3a7accf4 100644
--- a/sdk/storage/storage-blob/test/node/appendblobclient.spec.ts
+++ b/sdk/storage/storage-blob/test/node/appendblobclient.spec.ts
@@ -1,5 +1,3 @@
-import * as assert from "assert";
-
import * as dotenv from "dotenv";
import { AppendBlobClient, newPipeline, SharedKeyCredential, ContainerClient } from "../../src";
import { getBSU, getConnectionStringFromEnvironment } from "../utils";
@@ -83,32 +81,4 @@ describe("AppendBlobClient Node.js only", () => {
await newClient.create();
await newClient.download();
});
-
- it("throws error if constructor containerName parameter is empty", async () => {
- try {
- // tslint:disable-next-line: no-unused-expression
- new AppendBlobClient(getConnectionStringFromEnvironment(), "", "blobName");
- assert.fail("Expecting an thrown error but didn't get one.");
- } catch (error) {
- assert.equal(
- "Expecting non-empty strings for containerName and blobName parameters",
- error.message,
- "Error message is different than expected."
- );
- }
- });
-
- it("throws error if constructor blobName parameter is empty", async () => {
- try {
- // tslint:disable-next-line: no-unused-expression
- new AppendBlobClient(getConnectionStringFromEnvironment(), "containerName", "");
- assert.fail("Expecting an thrown error but didn't get one.");
- } catch (error) {
- assert.equal(
- "Expecting non-empty strings for containerName and blobName parameters",
- error.message,
- "Error message is different than expected."
- );
- }
- });
});
diff --git a/sdk/storage/storage-blob/test/node/blobclient.spec.ts b/sdk/storage/storage-blob/test/node/blobclient.spec.ts
index 2ca1b4a850ba..fb7b0e430964 100644
--- a/sdk/storage/storage-blob/test/node/blobclient.spec.ts
+++ b/sdk/storage/storage-blob/test/node/blobclient.spec.ts
@@ -324,32 +324,4 @@ describe("BlobClient Node.js only", () => {
const result = await newClient.getProperties();
assert.deepStrictEqual(result.metadata, metadata);
});
-
- it("throws error if constructor containerName parameter is empty", async () => {
- try {
- // tslint:disable-next-line: no-unused-expression
- new BlobClient(getConnectionStringFromEnvironment(), "", "blobName");
- assert.fail("Expecting an thrown error but didn't get one.");
- } catch (error) {
- assert.equal(
- "Expecting non-empty strings for containerName and blobName parameters",
- error.message,
- "Error message is different than expected."
- );
- }
- });
-
- it("throws error if constructor blobName parameter is empty", async () => {
- try {
- // tslint:disable-next-line: no-unused-expression
- new BlobClient(getConnectionStringFromEnvironment(), "containerName", "");
- assert.fail("Expecting an thrown error but didn't get one.");
- } catch (error) {
- assert.equal(
- "Expecting non-empty strings for containerName and blobName parameters",
- error.message,
- "Error message is different than expected."
- );
- }
- });
});
diff --git a/sdk/storage/storage-blob/test/node/blockblobclient.spec.ts b/sdk/storage/storage-blob/test/node/blockblobclient.spec.ts
index 01c76a45ed9f..b37b2e801c7a 100644
--- a/sdk/storage/storage-blob/test/node/blockblobclient.spec.ts
+++ b/sdk/storage/storage-blob/test/node/blockblobclient.spec.ts
@@ -126,32 +126,4 @@ describe("BlockBlobClient Node.js only", () => {
const result = await newClient.download(0);
assert.deepStrictEqual(await bodyToString(result, body.length), body);
});
-
- it("throws error if constructor containerName parameter is empty", async () => {
- try {
- // tslint:disable-next-line: no-unused-expression
- new BlockBlobClient(getConnectionStringFromEnvironment(), "", "blobName");
- assert.fail("Expecting an thrown error but didn't get one.");
- } catch (error) {
- assert.equal(
- "Expecting non-empty strings for containerName and blobName parameters",
- error.message,
- "Error message is different than expected."
- );
- }
- });
-
- it("throws error if constructor blobName parameter is empty", async () => {
- try {
- // tslint:disable-next-line: no-unused-expression
- new BlockBlobClient(getConnectionStringFromEnvironment(), "containerName", "");
- assert.fail("Expecting an thrown error but didn't get one.");
- } catch (error) {
- assert.equal(
- "Expecting non-empty strings for containerName and blobName parameters",
- error.message,
- "Error message is different than expected."
- );
- }
- });
});
diff --git a/sdk/storage/storage-blob/test/node/containerclient.spec.ts b/sdk/storage/storage-blob/test/node/containerclient.spec.ts
index 8db33f1fab37..394fe773eaa4 100644
--- a/sdk/storage/storage-blob/test/node/containerclient.spec.ts
+++ b/sdk/storage/storage-blob/test/node/containerclient.spec.ts
@@ -159,18 +159,4 @@ describe("ContainerClient Node.js only", () => {
assert.ok(result.date);
assert.ok(!result.blobPublicAccess);
});
-
- it("throws error if constructor containerName parameter is empty", async () => {
- try {
- // tslint:disable-next-line: no-unused-expression
- new ContainerClient(getConnectionStringFromEnvironment(), "");
- assert.fail("Expecting an thrown error but didn't get one.");
- } catch (error) {
- assert.equal(
- "Expecting non-empty strings for containerName parameter",
- error.message,
- "Error message is different than expected."
- );
- }
- });
});
diff --git a/sdk/storage/storage-blob/test/node/pageblobclient.spec.ts b/sdk/storage/storage-blob/test/node/pageblobclient.spec.ts
index 9899a31fcbdb..f114b0a6de98 100644
--- a/sdk/storage/storage-blob/test/node/pageblobclient.spec.ts
+++ b/sdk/storage/storage-blob/test/node/pageblobclient.spec.ts
@@ -169,32 +169,4 @@ describe("PageBlobClient Node.js only", () => {
const result = await newClient.download(0);
assert.deepStrictEqual(await bodyToString(result, 512), "\u0000".repeat(512));
});
-
- it("throws error if constructor containerName parameter is empty", async () => {
- try {
- // tslint:disable-next-line: no-unused-expression
- new PageBlobClient(getConnectionStringFromEnvironment(), "", "blobName");
- assert.fail("Expecting an thrown error but didn't get one.");
- } catch (error) {
- assert.equal(
- "Expecting non-empty strings for containerName and blobName parameters",
- error.message,
- "Error message is different than expected."
- );
- }
- });
-
- it("throws error if constructor blobName parameter is empty", async () => {
- try {
- // tslint:disable-next-line: no-unused-expression
- new PageBlobClient(getConnectionStringFromEnvironment(), "containerName", "");
- assert.fail("Expecting an thrown error but didn't get one.");
- } catch (error) {
- assert.equal(
- "Expecting non-empty strings for containerName and blobName parameters",
- error.message,
- "Error message is different than expected."
- );
- }
- });
});
diff --git a/sdk/storage/storage-blob/test/node/utils.spec.ts b/sdk/storage/storage-blob/test/node/utils.spec.ts
index 9869eeb8ea76..2a176994b192 100644
--- a/sdk/storage/storage-blob/test/node/utils.spec.ts
+++ b/sdk/storage/storage-blob/test/node/utils.spec.ts
@@ -36,7 +36,7 @@ describe("Utility Helpers Node.js only", () => {
assert.fail("Expecting an thrown error but didn't get one.");
} catch (error) {
assert.equal(
- "Invalid Connection String",
+ "Invalid Account Connection String",
error.message,
"Connection string error message is different than expected"
);
diff --git a/sdk/storage/storage-blob/test/pageblobclient.spec.ts b/sdk/storage/storage-blob/test/pageblobclient.spec.ts
index 1234637056ff..b66aa38e44b1 100644
--- a/sdk/storage/storage-blob/test/pageblobclient.spec.ts
+++ b/sdk/storage/storage-blob/test/pageblobclient.spec.ts
@@ -1,6 +1,6 @@
import * as assert from "assert";
import * as dotenv from "dotenv";
-import { bodyToString, getBSU } from "./utils";
+import { bodyToString, getBSU, getSASConnectionStringFromEnvironment } from "./utils";
import { ContainerClient, BlobClient, PageBlobClient } from "../src";
import { record } from "./utils/recorder";
dotenv.config({ path: "../.env" });
@@ -149,4 +149,44 @@ describe("PageBlobClient", () => {
propertiesResponse = await pageBlobClient.getProperties();
assert.equal(propertiesResponse.blobSequenceNumber!, 100);
});
+
+ it("can be created with a sas connection string", async () => {
+ const newClient = new PageBlobClient(
+ getSASConnectionStringFromEnvironment(),
+ containerName,
+ blobName
+ );
+
+ await newClient.create(512);
+ const result = await newClient.download(0);
+ assert.deepStrictEqual(await bodyToString(result, 512), "\u0000".repeat(512));
+ });
+
+ it("throws error if constructor containerName parameter is empty", async () => {
+ try {
+ // tslint:disable-next-line: no-unused-expression
+ new PageBlobClient(getSASConnectionStringFromEnvironment(), "", "blobName");
+ assert.fail("Expecting an thrown error but didn't get one.");
+ } catch (error) {
+ assert.equal(
+ "Expecting non-empty strings for containerName and blobName parameters",
+ error.message,
+ "Error message is different than expected."
+ );
+ }
+ });
+
+ it("throws error if constructor blobName parameter is empty", async () => {
+ try {
+ // tslint:disable-next-line: no-unused-expression
+ new PageBlobClient(getSASConnectionStringFromEnvironment(), "containerName", "");
+ assert.fail("Expecting an thrown error but didn't get one.");
+ } catch (error) {
+ assert.equal(
+ "Expecting non-empty strings for containerName and blobName parameters",
+ error.message,
+ "Error message is different than expected."
+ );
+ }
+ });
});
diff --git a/sdk/storage/storage-blob/test/utils/index.browser.ts b/sdk/storage/storage-blob/test/utils/index.browser.ts
index f0cda55e3ee0..229640b653f8 100644
--- a/sdk/storage/storage-blob/test/utils/index.browser.ts
+++ b/sdk/storage/storage-blob/test/utils/index.browser.ts
@@ -108,7 +108,7 @@ export function isIE(): boolean {
// If IE, return version number.
if (Idx > 0) {
return true;
- } else if (!!navigator.userAgent.match(/Trident\/7\./)) {
+ } else if (navigator.userAgent.match(/Trident\/7\./)) {
// IE 11
return true;
} else {
@@ -130,3 +130,8 @@ export function getBrowserFile(name: string, size: number): File {
file.name = name;
return file;
}
+
+export function getSASConnectionStringFromEnvironment(): string {
+ const env = (window as any).__env__;
+ return `BlobEndpoint=https://${env.ACCOUNT_NAME}.blob.core.windows.net/;QueueEndpoint=https://${env.ACCOUNT_NAME}.queue.core.windows.net/;FileEndpoint=https://${env.ACCOUNT_NAME}.file.core.windows.net/;TableEndpoint=https://${env.ACCOUNT_NAME}.table.core.windows.net/;SharedAccessSignature=${env.ACCOUNT_SAS}`;
+}
diff --git a/sdk/storage/storage-blob/test/utils/index.ts b/sdk/storage/storage-blob/test/utils/index.ts
index c5af40d963e5..85debe200075 100644
--- a/sdk/storage/storage-blob/test/utils/index.ts
+++ b/sdk/storage/storage-blob/test/utils/index.ts
@@ -7,6 +7,14 @@ import { BlobServiceClient } from "../../src/BlobServiceClient";
import { getUniqueName } from "./testutils.common";
import * as dotenv from "dotenv";
import { newPipeline } from "../../src/Pipeline";
+import {
+ generateAccountSASQueryParameters,
+ AccountSASPermissions,
+ SASProtocol,
+ AccountSASResourceTypes,
+ AccountSASServices
+} from "../../src";
+import { extractConnectionStringParts } from "../../src/utils/utils.common";
dotenv.config({ path: "../.env" });
export * from "./testutils.common";
@@ -121,3 +129,39 @@ export async function createRandomLocalFile(
ws.on("error", reject);
});
}
+
+export function getSASConnectionStringFromEnvironment(): string {
+ const now = new Date();
+ now.setMinutes(now.getMinutes() - 5); // Skip clock skew with server
+
+ const tmr = new Date();
+ tmr.setDate(tmr.getDate() + 1);
+ const queueServiceClient = getBSU();
+ // By default, credential is always the last element of pipeline factories
+ const factories = (queueServiceClient as any).pipeline.factories;
+ const sharedKeyCredential = factories[factories.length - 1];
+
+ const sas = generateAccountSASQueryParameters(
+ {
+ expiryTime: tmr,
+ ipRange: { start: "0.0.0.0", end: "255.255.255.255" },
+ permissions: AccountSASPermissions.parse("rwdlacup").toString(),
+ protocol: SASProtocol.HTTPSandHTTP,
+ resourceTypes: AccountSASResourceTypes.parse("sco").toString(),
+ services: AccountSASServices.parse("btqf").toString(),
+ startTime: now,
+ version: "2016-05-31"
+ },
+ sharedKeyCredential as SharedKeyCredential
+ ).toString();
+
+ const blobEndpoint = extractConnectionStringParts(getConnectionStringFromEnvironment()).url;
+
+ return `BlobEndpoint=${blobEndpoint}/;QueueEndpoint=${blobEndpoint.replace(
+ ".blob.",
+ ".queue."
+ )}/;FileEndpoint=${blobEndpoint.replace(
+ ".queue.",
+ ".file."
+ )}/;TableEndpoint=${blobEndpoint.replace(".queue.", ".table.")}/;SharedAccessSignature=${sas}`;
+}
diff --git a/sdk/storage/storage-blob/test/utils/recorder.ts b/sdk/storage/storage-blob/test/utils/recorder.ts
index 0a82b9c4398f..03269c63ee01 100644
--- a/sdk/storage/storage-blob/test/utils/recorder.ts
+++ b/sdk/storage/storage-blob/test/utils/recorder.ts
@@ -155,7 +155,8 @@ const skip = [
// Size (263MB), Tempfile
"node/highlevel/recording_downloadtofile_should_success.js",
// Skipping for now, further investigation needed on the errors in playback
- "browsers/blobclient/recording_startcopyfromclient.json"
+ "browsers/blobclient/recording_startcopyfromclient.json",
+ "node/blockblobclient/recording_can_be_created_with_a_sas_connection_string.js"
];
abstract class Recorder {