From 3262acb3cbf1fdc89dc65e1891c1aa92ce439193 Mon Sep 17 00:00:00 2001 From: Lin Jian <1215122919@qq.com> Date: Thu, 21 May 2020 15:34:08 +0800 Subject: [PATCH 01/39] storage-internal-avro parser (#8893) * IReadable * Avro compiles * use storage-internal-avro as shared source in storage-blob * local build config * test and bug fix * rename IReadable to AvroReadable, separate the stream implementation with the interface declaration we need different implementation in browsers * add "private": true to pacakge.json * use Record * me * fix * tentative: use string enum instead of string union to avoid two copies of constant string Co-authored-by: Lin Jian --- common/config/rush/pnpm-lock.yaml | 91 ++++- rush.json | 5 + sdk/storage/storage-blob/api-extractor.json | 4 +- sdk/storage/storage-blob/package.json | 21 +- .../storage-blob/rollup.base.config.js | 12 +- sdk/storage/storage-blob/tsconfig.json | 4 +- .../.vscode/extensions.json | 3 + .../storage-internal-avro/.vscode/launch.json | 59 +++ .../.vscode/settings.json | 27 ++ sdk/storage/storage-internal-avro/README.md | 20 + .../storage-internal-avro/package.json | 82 ++++ .../rollup.base.config.js | 177 ++++++++ .../storage-internal-avro/rollup.config.js | 17 + .../rollup.test.config.js | 6 + .../src/AvroConstants.ts | 4 + .../storage-internal-avro/src/AvroParser.ts | 381 ++++++++++++++++++ .../storage-internal-avro/src/AvroReadable.ts | 4 + .../src/AvroReadableFromStream.ts | 59 +++ .../storage-internal-avro/src/AvroReader.ts | 142 +++++++ .../storage-internal-avro/src/index.ts | 3 + .../src/utils/utils.common.ts | 15 + .../test/avroreadable.spec.ts | 25 ++ .../test/avroreader.spec.ts | 59 +++ .../test/resources/test_null_0.avro | Bin 0 -> 75 bytes .../test/resources/test_null_1.avro | Bin 0 -> 88 bytes .../test/resources/test_null_10.avro | Bin 0 -> 153 bytes .../test/resources/test_null_11.avro | Bin 0 -> 213 bytes .../test/resources/test_null_12.avro | Bin 0 -> 105 bytes .../test/resources/test_null_13.avro | Bin 0 -> 157 bytes .../test/resources/test_null_14.avro | Bin 0 -> 358 bytes .../test/resources/test_null_2.avro | Bin 0 -> 308 bytes .../test/resources/test_null_3.avro | Bin 0 -> 177 bytes .../test/resources/test_null_4.avro | Bin 0 -> 94 bytes .../test/resources/test_null_5.avro | Bin 0 -> 95 bytes .../test/resources/test_null_6.avro | Bin 0 -> 116 bytes .../test/resources/test_null_7.avro | Bin 0 -> 158 bytes .../test/resources/test_null_8.avro | Bin 0 -> 123 bytes .../test/resources/test_null_9.avro | Bin 0 -> 134 bytes .../storage-internal-avro/tsconfig.json | 26 ++ 39 files changed, 1212 insertions(+), 34 deletions(-) create mode 100644 sdk/storage/storage-internal-avro/.vscode/extensions.json create mode 100644 sdk/storage/storage-internal-avro/.vscode/launch.json create mode 100644 sdk/storage/storage-internal-avro/.vscode/settings.json create mode 100644 sdk/storage/storage-internal-avro/README.md create mode 100644 sdk/storage/storage-internal-avro/package.json create mode 100644 sdk/storage/storage-internal-avro/rollup.base.config.js create mode 100644 sdk/storage/storage-internal-avro/rollup.config.js create mode 100644 sdk/storage/storage-internal-avro/rollup.test.config.js create mode 100644 sdk/storage/storage-internal-avro/src/AvroConstants.ts create mode 100644 sdk/storage/storage-internal-avro/src/AvroParser.ts create mode 100644 sdk/storage/storage-internal-avro/src/AvroReadable.ts create mode 100644 sdk/storage/storage-internal-avro/src/AvroReadableFromStream.ts create mode 100644 sdk/storage/storage-internal-avro/src/AvroReader.ts create mode 100644 sdk/storage/storage-internal-avro/src/index.ts create mode 100644 sdk/storage/storage-internal-avro/src/utils/utils.common.ts create mode 100644 sdk/storage/storage-internal-avro/test/avroreadable.spec.ts create mode 100644 sdk/storage/storage-internal-avro/test/avroreader.spec.ts create mode 100644 sdk/storage/storage-internal-avro/test/resources/test_null_0.avro create mode 100644 sdk/storage/storage-internal-avro/test/resources/test_null_1.avro create mode 100644 sdk/storage/storage-internal-avro/test/resources/test_null_10.avro create mode 100644 sdk/storage/storage-internal-avro/test/resources/test_null_11.avro create mode 100644 sdk/storage/storage-internal-avro/test/resources/test_null_12.avro create mode 100644 sdk/storage/storage-internal-avro/test/resources/test_null_13.avro create mode 100644 sdk/storage/storage-internal-avro/test/resources/test_null_14.avro create mode 100644 sdk/storage/storage-internal-avro/test/resources/test_null_2.avro create mode 100644 sdk/storage/storage-internal-avro/test/resources/test_null_3.avro create mode 100644 sdk/storage/storage-internal-avro/test/resources/test_null_4.avro create mode 100644 sdk/storage/storage-internal-avro/test/resources/test_null_5.avro create mode 100644 sdk/storage/storage-internal-avro/test/resources/test_null_6.avro create mode 100644 sdk/storage/storage-internal-avro/test/resources/test_null_7.avro create mode 100644 sdk/storage/storage-internal-avro/test/resources/test_null_8.avro create mode 100644 sdk/storage/storage-internal-avro/test/resources/test_null_9.avro create mode 100644 sdk/storage/storage-internal-avro/tsconfig.json diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index e719193d48ce..c9cfa0167905 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -27,6 +27,7 @@ dependencies: '@rush-temp/storage-blob': 'file:projects/storage-blob.tgz' '@rush-temp/storage-file-datalake': 'file:projects/storage-file-datalake.tgz' '@rush-temp/storage-file-share': 'file:projects/storage-file-share.tgz' + '@rush-temp/storage-internal-avro': 'file:projects/storage-internal-avro.tgz' '@rush-temp/storage-queue': 'file:projects/storage-queue.tgz' '@rush-temp/template': 'file:projects/template.tgz' '@rush-temp/test-utils-perfstress': 'file:projects/test-utils-perfstress.tgz' @@ -7346,12 +7347,14 @@ packages: karma-mocha: 1.3.0 karma-mocha-reporter: 2.2.5_karma@4.4.1 karma-remap-istanbul: 0.6.0_karma@4.4.1 + karma-sourcemap-loader: 0.3.7 mocha: 7.1.1 mocha-junit-reporter: 1.23.3_mocha@7.1.1 nyc: 14.1.1 prettier: 1.19.1 rimraf: 3.0.2 rollup: 1.32.1 + rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 rollup-plugin-visualizer: 3.3.2_rollup@1.32.1 @@ -7362,7 +7365,7 @@ packages: dev: false name: '@rush-temp/ai-form-recognizer' resolution: - integrity: sha512-vPtrVCxruasMOV692Byx4Hc1n9WdZRNrJwSCIlVhxaGMrdgI/sETYrnF23OqFgjg8nXJtNh19xaPwMTHOk4PJw== + integrity: sha512-drftp8AmeOVBMm6hfpBJnt/OziXXLqhNWfZo1oLqfQSBISJxghr/apNc4CKrcSp9qURbWaJkeANWuHxIVeYndQ== tarball: 'file:projects/ai-form-recognizer.tgz' version: 0.0.0 'file:projects/ai-text-analytics.tgz': @@ -7466,7 +7469,7 @@ packages: dev: false name: '@rush-temp/app-configuration' resolution: - integrity: sha512-SQNvkmhpg4EcfyYBmi7l3n60gHtqbUDk3mjTBDSBM33F/01q+CjQiagcClrN98g62mlxhFaK+N+T6q7Ex3g1Ng== + integrity: sha512-QesKkz6aJwUt+oVkUzm4ESihvMHTjl1/Ims68Ue1i9H7jevsWAMDX+U1G+7rb0xCtx013PZdoedC9Qb6dsj/fg== tarball: 'file:projects/app-configuration.tgz' version: 0.0.0 'file:projects/core-amqp.tgz': @@ -7627,7 +7630,7 @@ packages: dev: false name: '@rush-temp/core-auth' resolution: - integrity: sha512-FEhKPyW6XNIk4vlVBgYt+gwtDiSmOhAxTq9YBQxpLaqiyMVjZn25WfcD/zj2/ZLnE5VKQRTxt+cKF52iETQdPw== + integrity: sha512-a8h+Fir7HdvM06N5A+BKxvig7SmvI2pQPUnVNoL2HWpuW5wdcelVyVpODYRiA43kNPsodP0AIlqWJSZOPnwtiw== tarball: 'file:projects/core-auth.tgz' version: 0.0.0 'file:projects/core-http.tgz': @@ -7871,7 +7874,7 @@ packages: dev: false name: '@rush-temp/core-tracing' resolution: - integrity: sha512-GfFzTI4+ug82g0/v2qF8bQlPaoUFvHYrHMnn3qg+dkoJe523z5ppsclkIGwkC5nabXHHNE/nzxxM09dYQU99gA== + integrity: sha512-6lNv0IiPu0TlqcRff8jI141AEY7u/AQxmVK0+H8R+sFgB6T+ZW80B1sqOAW3GjHnKKtNQ8M8l+2SHtzHtF87PQ== tarball: 'file:projects/core-tracing.tgz' version: 0.0.0 'file:projects/cosmos.tgz': @@ -8003,6 +8006,7 @@ packages: cross-env: 6.0.3 debug: 4.1.1 dotenv: 8.2.0 + downlevel-dts: 0.4.0 eslint: 6.8.0 eslint-config-prettier: 6.10.1_eslint@6.8.0 eslint-plugin-no-null: 1.0.2_eslint@6.8.0 @@ -8044,7 +8048,7 @@ packages: dev: false name: '@rush-temp/event-hubs' resolution: - integrity: sha512-bW/dj5xOrcog/7Gw/922ikLp5WOES4Et87oiwjVTzEG9U2LfhstUBDahsAR0f6n6nr6A28xNA0B7h/H0G8qNkA== + integrity: sha512-SvD3McUNYWtff0uFqaogeUbmRCdqLiwVUsRO7SrkIjdVazSydRCU5cl5IUGRKCQ4IMPzGkbXN/yyN1tmG45uGw== tarball: 'file:projects/event-hubs.tgz' version: 0.0.0 'file:projects/event-processor-host.tgz': @@ -8288,7 +8292,7 @@ packages: dev: false name: '@rush-temp/keyvault-certificates' resolution: - integrity: sha512-+H4N1yRRmhJgOU/nza/+W6YVctvTvYZkw7+S+oBQ/WYeOLZR+WHAc6/b9tR3hxiAhri9wxvpb+voD6/DduXS+Q== + integrity: sha512-Jn9KFNDBX87QBJ1Lcjp78dYcE+dsMg5rYpio/JeY0V2mWlNdh7qTKLvCNYDBGbLA74vByV3WeKwIQryHAi+05g== tarball: 'file:projects/keyvault-certificates.tgz' version: 0.0.0 'file:projects/keyvault-keys.tgz': @@ -8354,7 +8358,7 @@ packages: dev: false name: '@rush-temp/keyvault-keys' resolution: - integrity: sha512-sgYATU21SAy92H4+m2jbkwp26PdeRYHMZWmQZ1Gj9+5ZFbLCEcHm4KYukZ66EwBdmIwwodVRg65hROm17zBzfg== + integrity: sha512-eoe4wq30U9rGPBp+IAHTibqqR8RCZQ0ijWtJutDZ8WaiHbmIKaSFbQRY1A0+N/xSYHSKrcZDwTZC3cEpeWHa9A== tarball: 'file:projects/keyvault-keys.tgz' version: 0.0.0 'file:projects/keyvault-secrets.tgz': @@ -8420,7 +8424,7 @@ packages: dev: false name: '@rush-temp/keyvault-secrets' resolution: - integrity: sha512-CRFOhh1AMS5pvaXG3ZM5NboFAkQ5UF21UvbWpdajYCPg5J8s1znnWn01Tc+0b24brxyyUEWDQo6Yzqx8lG/35Q== + integrity: sha512-PjKc2VsK3yhM2nLsw1SEAqNOeKw3mK5APQ/6AJC2QyHWP/lDYghPHH6ep/78LBThcm5K9uLFMwM49ZLnYsnY+A== tarball: 'file:projects/keyvault-secrets.tgz' version: 0.0.0 'file:projects/logger.tgz': @@ -8533,7 +8537,7 @@ packages: dev: false name: '@rush-temp/search-documents' resolution: - integrity: sha512-GYl0ZrFxMq1Qfkfihi1vHdOuSzQp3Q+Z3c2nd+u2RzXcVTiTRE4t0KnON8OUdyXYJvsjrHeLpBdOrwVuY2He/Q== + integrity: sha512-dSUxmkUpg7gC0P73FvSLK5Fr4E8WGpdgaycSvR4ZSA69VpYIodX65aU7uyfkHrpuFCkydY7fbBbaXYiWfmvLTA== tarball: 'file:projects/search-documents.tgz' version: 0.0.0 'file:projects/service-bus.tgz': @@ -8612,7 +8616,7 @@ packages: dev: false name: '@rush-temp/service-bus' resolution: - integrity: sha512-/sInDnVXuGr13OJ6o0ybAgSwdTi6MBF20+2cjGTjcLcHfjuYoVDKqZQOGQCCtUDobnIsx3KyN3sASXIrCv15wQ== + integrity: sha512-ySmiDTgbTBpMYgXNSDGpIzuHs+5raDZenJw/jEBXhioOYpNXL+oDYK5EZQ5S+BKMCmGXOD7QvrpQortMrf3IrA== tarball: 'file:projects/service-bus.tgz' version: 0.0.0 'file:projects/storage-blob.tgz': @@ -8674,7 +8678,7 @@ packages: dev: false name: '@rush-temp/storage-blob' resolution: - integrity: sha512-eR/qeWB9CgdJYsGNIepqVhQamsJILdvpwcQWeSUeQmytJ5yJ8V1fQ5KHDpww195EpgIufovJIQVrJflKdVLxvw== + integrity: sha512-qNcuXw81uBfRLvrBeMcFs/hCXl6FCAglnFkswE98KtSV3Pj2rtxYPQWJxG4/O2GkzCRyVkgxYtfb9uDTYJXZ8w== tarball: 'file:projects/storage-blob.tgz' version: 0.0.0 'file:projects/storage-file-datalake.tgz': @@ -8744,7 +8748,7 @@ packages: dev: false name: '@rush-temp/storage-file-datalake' resolution: - integrity: sha512-Tugmx2vtJKOUGPUbXkCh1Oj/9W0bJ0otjt8Wf0t8Yf/4QzkCfvHzKEFOBT6xUWALbNoSRnvRoxremV2yZrRLrw== + integrity: sha512-ax+/3IKbvusjZpXmloEUa+6cQrULHB6eHFpd6dNzQmQ0a1QOIg3n5uHIEY2X/1kQCOkcMWVITX+imkz6b9Gv2A== tarball: 'file:projects/storage-file-datalake.tgz' version: 0.0.0 'file:projects/storage-file-share.tgz': @@ -8806,9 +8810,67 @@ packages: dev: false name: '@rush-temp/storage-file-share' resolution: - integrity: sha512-u8LJYzcyLwixe5WEH9sDJx4DSChUybX6sHKuFTfyKC98299ipDbcnk7KlDlQkkpMA+4YC2vTE7Zj9jySMF9ezQ== + integrity: sha512-Kzv6N1reNbnI8qxNbwPIXTbMwBaDP9S43wPHoL8akm3ooY8ftesQtF6qCj39Tfw1HozCojH1QRdyahlqIAnTRg== tarball: 'file:projects/storage-file-share.tgz' version: 0.0.0 + 'file:projects/storage-internal-avro.tgz': + dependencies: + '@microsoft/api-extractor': 7.7.11 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.0_rollup@1.32.1 + '@rollup/plugin-node-resolve': 7.1.1_rollup@1.32.1 + '@rollup/plugin-replace': 2.3.1_rollup@1.32.1 + '@types/mocha': 7.0.2 + '@types/node': 8.10.59 + '@typescript-eslint/eslint-plugin': 2.27.0_1b16601d03b675251fc711870248ce8d + '@typescript-eslint/parser': 2.27.0_eslint@6.8.0+typescript@3.8.3 + assert: 1.5.0 + cross-env: 6.0.3 + dotenv: 8.2.0 + downlevel-dts: 0.4.0 + es6-promise: 4.2.8 + eslint: 6.8.0 + eslint-config-prettier: 6.10.1_eslint@6.8.0 + eslint-plugin-no-null: 1.0.2_eslint@6.8.0 + eslint-plugin-no-only-tests: 2.4.0 + eslint-plugin-promise: 4.2.1 + esm: 3.2.25 + inherits: 2.0.4 + karma: 4.4.1 + karma-chrome-launcher: 3.1.0 + karma-coverage: 2.0.1 + karma-edge-launcher: 0.4.2_karma@4.4.1 + karma-env-preprocessor: 0.1.1 + karma-firefox-launcher: 1.3.0 + karma-ie-launcher: 1.0.0_karma@4.4.1 + karma-json-preprocessor: 0.3.3_karma@4.4.1 + karma-json-to-file-reporter: 1.0.1 + karma-junit-reporter: 2.0.1_karma@4.4.1 + karma-mocha: 1.3.0 + karma-mocha-reporter: 2.2.5_karma@4.4.1 + karma-remap-istanbul: 0.6.0_karma@4.4.1 + mocha: 7.1.1 + mocha-junit-reporter: 1.23.3_mocha@7.1.1 + nyc: 14.1.1 + prettier: 1.19.1 + puppeteer: 2.1.1 + rimraf: 3.0.2 + rollup: 1.32.1 + rollup-plugin-shim: 1.0.0 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 + rollup-plugin-terser: 5.3.0_rollup@1.32.1 + rollup-plugin-visualizer: 3.3.2_rollup@1.32.1 + source-map-support: 0.5.16 + ts-node: 8.8.2_typescript@3.8.3 + tslib: 1.11.1 + typescript: 3.8.3 + util: 0.12.2 + dev: false + name: '@rush-temp/storage-internal-avro' + resolution: + integrity: sha512-xQ/8G7hl1NT0N067xLF7XdeD/Fhh+tiMlwEenqOHiUIZ8eMexdCJ5+MhnFOq33oqjMD8dcKku4BjyKQrXBFERg== + tarball: 'file:projects/storage-internal-avro.tgz' + version: 0.0.0 'file:projects/storage-queue.tgz': dependencies: '@azure/core-tracing': 1.0.0-preview.7 @@ -8867,7 +8929,7 @@ packages: dev: false name: '@rush-temp/storage-queue' resolution: - integrity: sha512-7fZ/BCFfKLRNtNOpIkszzJXjIxRDj15LDFPHlynzc02Wc1mxS0NDD7eEptC37QCaBbZzaBqjKnYIC6/O+T2lCA== + integrity: sha512-WcfDHWEOKo17l6dpW4UFbHJgEzQd438F+F61uequ6uc6OH1XAQ/QUU5dWGYiJz+/SU11vyfIW81ZiRsiihQMdg== tarball: 'file:projects/storage-queue.tgz' version: 0.0.0 'file:projects/template.tgz': @@ -9061,6 +9123,7 @@ specifiers: '@rush-temp/storage-blob': 'file:./projects/storage-blob.tgz' '@rush-temp/storage-file-datalake': 'file:./projects/storage-file-datalake.tgz' '@rush-temp/storage-file-share': 'file:./projects/storage-file-share.tgz' + '@rush-temp/storage-internal-avro': 'file:./projects/storage-internal-avro.tgz' '@rush-temp/storage-queue': 'file:./projects/storage-queue.tgz' '@rush-temp/template': 'file:./projects/template.tgz' '@rush-temp/test-utils-perfstress': 'file:./projects/test-utils-perfstress.tgz' diff --git a/rush.json b/rush.json index 003220b9bbef..6e3a14fa0877 100644 --- a/rush.json +++ b/rush.json @@ -447,6 +447,11 @@ "projectFolder": "sdk/servicebus/service-bus", "versionPolicyName": "client" }, + { + "packageName": "@azure/storage-internal-avro", + "projectFolder": "sdk/storage/storage-internal-avro", + "versionPolicyName": "utility" + }, { "packageName": "@azure/storage-blob", "projectFolder": "sdk/storage/storage-blob", diff --git a/sdk/storage/storage-blob/api-extractor.json b/sdk/storage/storage-blob/api-extractor.json index 9d52d2a63383..ede224adc3de 100644 --- a/sdk/storage/storage-blob/api-extractor.json +++ b/sdk/storage/storage-blob/api-extractor.json @@ -1,6 +1,6 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - "mainEntryPointFilePath": "typings/latest/src/index.d.ts", + "mainEntryPointFilePath": "typings/latest/storage-blob/src/index.d.ts", "docModel": { "enabled": false }, @@ -28,4 +28,4 @@ } } } -} +} \ No newline at end of file diff --git a/sdk/storage/storage-blob/package.json b/sdk/storage/storage-blob/package.json index 4ff1955e951c..c5b673095689 100644 --- a/sdk/storage/storage-blob/package.json +++ b/sdk/storage/storage-blob/package.json @@ -4,14 +4,14 @@ "version": "12.2.0", "description": "Microsoft Azure Storage SDK for JavaScript - Blob", "main": "./dist/index.js", - "module": "./dist-esm/src/index.js", + "module": "./dist-esm/storage-blob/src/index.js", "browser": { - "./dist-esm/src/index.js": "./dist-esm/src/index.browser.js", - "./dist-esm/src/credentials/StorageSharedKeyCredential.js": "./dist-esm/src/credentials/StorageSharedKeyCredential.browser.js", - "./dist-esm/src/utils/utils.node.js": "./dist-esm/src/utils/utils.browser.js", - "./dist-esm/test/utils/index.js": "./dist-esm/test/utils/index.browser.js", - "./dist-esm/src/BatchUtils.js": "./dist-esm/src/BatchUtils.browser.js", - "./dist-esm/src/BlobDownloadResponse.js": "./dist-esm/src/BlobDownloadResponse.browser.js", + "./dist-esm/storage-blob/src/index.js": "./dist-esm/storage-blob/src/index.browser.js", + "./dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.js": "./dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.browser.js", + "./dist-esm/storage-blob/src/utils/utils.node.js": "./dist-esm/storage-blob/src/utils/utils.browser.js", + "./dist-esm/storage-blob/test/utils/index.js": "./dist-esm/storage-blob/test/utils/index.browser.js", + "./dist-esm/storage-blob/src/BatchUtils.js": "./dist-esm/storage-blob/src/BatchUtils.browser.js", + "./dist-esm/storage-blob/src/BlobDownloadResponse.js": "./dist-esm/storage-blob/src/BlobDownloadResponse.browser.js", "fs": false, "os": false, "process": false @@ -46,7 +46,7 @@ "execute:samples": "npm run build:samples && npm run execute:js-samples && npm run execute:ts-samples", "format": "prettier --write --config ../../.prettierrc.json \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", "integration-test:browser": "karma start --single-run", - "integration-test:node": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --full-trace -t 300000 dist-esm/test/*.spec.js dist-esm/test/node/*.spec.js", + "integration-test:node": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --full-trace -t 300000 dist-esm/storage-blob/test/*.spec.js dist-esm/storage-blob/test/node/*.spec.js", "integration-test": "npm run integration-test:node && npm run integration-test:browser", "lint:fix": "eslint -c ../../.eslintrc.old.json src test samples --ext .ts --fix", "lint": "eslint -c ../../.eslintrc.old.json src test samples --ext .ts -f html -o storage-blob-lintReport.html || exit 0", @@ -63,7 +63,8 @@ "files": [ "BreakingChanges.md", "dist/", - "dist-esm/src/", + "dist-esm/storage-blob/src/", + "dist-esm/storage-internal-avro/src/", "typings/latest/storage-blob.d.ts", "typings/3.1/storage-blob.d.ts", "README.md", @@ -161,4 +162,4 @@ "typescript": "~3.8.3", "util": "^0.12.1" } -} +} \ No newline at end of file diff --git a/sdk/storage/storage-blob/rollup.base.config.js b/sdk/storage/storage-blob/rollup.base.config.js index f0a687a6f317..d3ff2d0f3dfc 100644 --- a/sdk/storage/storage-blob/rollup.base.config.js +++ b/sdk/storage/storage-blob/rollup.base.config.js @@ -33,7 +33,7 @@ export function nodeConfig(test = false) { "util" ]; const baseConfig = { - input: "dist-esm/src/index.js", + input: "dist-esm/storage-blob/src/index.js", external: depNames.concat(externalNodeBuiltins), output: { file: "dist/index.js", @@ -65,9 +65,9 @@ export function nodeConfig(test = false) { if (test) { // entry point is every test file baseConfig.input = [ - "dist-esm/test/*.spec.js", - "dist-esm/test/node/*.spec.js", - "dist-esm/src/index.js" + "dist-esm/storage-blob/test/*.spec.js", + "dist-esm/storage-blob/test/node/*.spec.js", + "dist-esm/storage-blob/src/index.js" ]; baseConfig.plugins.unshift(multiEntry()); @@ -92,7 +92,7 @@ export function nodeConfig(test = false) { export function browserConfig(test = false) { const baseConfig = { - input: "dist-esm/src/index.browser.js", + input: "dist-esm/storage-blob/src/index.browser.js", output: { file: "dist-browser/azure-storage-blob.js", banner: banner, @@ -159,7 +159,7 @@ export function browserConfig(test = false) { }; if (test) { - baseConfig.input = ["dist-esm/test/*.spec.js", "dist-esm/test/browser/*.spec.js"]; + baseConfig.input = ["dist-esm/storage-blob/test/*.spec.js", "dist-esm/storage-blob/test/browser/*.spec.js"]; baseConfig.plugins.unshift(multiEntry({ exports: false })); baseConfig.output.file = "dist-test/index.browser.js"; // mark fs-extra as external diff --git a/sdk/storage/storage-blob/tsconfig.json b/sdk/storage/storage-blob/tsconfig.json index 7d0f438f54f6..f89af540f58e 100644 --- a/sdk/storage/storage-blob/tsconfig.json +++ b/sdk/storage/storage-blob/tsconfig.json @@ -21,6 +21,6 @@ "esModuleInterop": true }, "compileOnSave": true, - "exclude": ["node_modules", "./samples/**"], - "include": ["./src/**/*.ts", "./test/**/*.ts"] + "exclude": ["node_modules", "../storage-internal-avro/node_modules", "./samples/**"], + "include": ["./src/**/*.ts", "./test/**/*.ts", "../storage-internal-avro/**/*.ts"] } diff --git a/sdk/storage/storage-internal-avro/.vscode/extensions.json b/sdk/storage/storage-internal-avro/.vscode/extensions.json new file mode 100644 index 000000000000..c83e26348e1f --- /dev/null +++ b/sdk/storage/storage-internal-avro/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["esbenp.prettier-vscode"] +} diff --git a/sdk/storage/storage-internal-avro/.vscode/launch.json b/sdk/storage/storage-internal-avro/.vscode/launch.json new file mode 100644 index 000000000000..24dbfc9d74c4 --- /dev/null +++ b/sdk/storage/storage-internal-avro/.vscode/launch.json @@ -0,0 +1,59 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "Debug Javascript Samples", + "program": "${workspaceFolder}/samples/javascript/basic.js", + "preLaunchTask": "npm: build:js-samples" + }, + { + "type": "node", + "request": "launch", + "name": "Debug Typescript Samples", + "program": "${workspaceFolder}/samples/typescript/basic.ts", + "preLaunchTask": "npm: build:ts-samples", + "outFiles": ["${workspaceFolder}/dist-esm/samples/typescript/*.js"] + }, + { + "type": "node", + "request": "launch", + "name": "Debug Mocha Test [Without Rollup]", + "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha", + "args": [ + "-r", + "ts-node/register", + "--timeout", + "999999", + "--colors", + "${workspaceFolder}/test/*.spec.ts", + "${workspaceFolder}/test/node/*.spec.ts" + ], + "env": { "TS_NODE_COMPILER_OPTIONS": "{\"module\": \"commonjs\"}" }, + "envFile": "${workspaceFolder}/../.env", + "console": "integratedTerminal", + "internalConsoleOptions": "neverOpen", + "protocol": "inspector" + }, + { + "type": "node", + "request": "launch", + "name": "Debug Unit Tests", + "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha", + "args": [ + "-u", + "tdd", + "--timeout", + "999999", + "--colors", + "${workspaceFolder}/dist-test/index.node.js" + ], + "internalConsoleOptions": "openOnSessionStart", + "preLaunchTask": "npm: build:test" + } + ] +} diff --git a/sdk/storage/storage-internal-avro/.vscode/settings.json b/sdk/storage/storage-internal-avro/.vscode/settings.json new file mode 100644 index 000000000000..7ceb5ace3e9d --- /dev/null +++ b/sdk/storage/storage-internal-avro/.vscode/settings.json @@ -0,0 +1,27 @@ +{ + "files.exclude": { + "**/.git": true, + "**/.svn": true, + "**/.DS_Store": true + }, + "[typescript]": { + "editor.formatOnSave": true, + "editor.tabSize": 2, + "editor.detectIndentation": false + }, + "[json]": { + "editor.formatOnSave": true, + "editor.tabSize": 2, + "editor.detectIndentation": false + }, + "[yaml]": { + "editor.formatOnSave": true, + "editor.tabSize": 2, + "editor.detectIndentation": false + }, + "editor.rulers": [ + 100 + ], + "typescript.preferences.quoteStyle": "double", + "javascript.preferences.quoteStyle": "double" + } \ No newline at end of file diff --git a/sdk/storage/storage-internal-avro/README.md b/sdk/storage/storage-internal-avro/README.md new file mode 100644 index 000000000000..72ce26939d78 --- /dev/null +++ b/sdk/storage/storage-internal-avro/README.md @@ -0,0 +1,20 @@ +# Azure Storage Internal Avro client library for JavaScript +- For internal use only. + +## Getting started +- For internal use only. + +## Key concepts +- For internal use only. + +## Examples +- For internal use only. + +## Troubleshooting +- For internal use only. + +## Next steps +- For internal use only. + +## Contributing +- For internal use only. \ No newline at end of file diff --git a/sdk/storage/storage-internal-avro/package.json b/sdk/storage/storage-internal-avro/package.json new file mode 100644 index 000000000000..9e628455afe0 --- /dev/null +++ b/sdk/storage/storage-internal-avro/package.json @@ -0,0 +1,82 @@ +{ + "name": "@azure/storage-internal-avro", + "sideEffect": false, + "private": true, + "author": "Microsoft Corporation", + "version": "1.0.0-preview.1", + "description": "internal avro parser", + "license": "MIT", + "repository": "github:Azure/azure-sdk-for-js", + "main": "./srt/index.ts", + "module": "dist-esm/index.js", + "types": "./types/index.d.ts", + "engines": { + "node": ">=8.0.0" + }, + "scripts": { + "build:es6": "tsc -p tsconfig.json", + "build:nodebrowser": "rollup -c 2>&1", + "build": "npm run build:es6 && npm run build:nodebrowser", + "build:test": "npm run build:es6 && rollup -c rollup.test.config.js 2>&1", + "clean": "rimraf dist dist-esm dist-test typings temp dist-browser/*.js* dist-browser/*.zip statistics.html coverage coverage-browser .nyc_output *.tgz *.log test*.xml TEST*.xml", + "unit-test:node": "mocha --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --full-trace -t 120000 dist-test/index.node.js", + "test:node": "npm run clean && npm run build:test && npm run unit-test:node", + "format": "prettier --write --config ../../.prettierrc.json \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"" + }, + "dependencies": { + "tslib": "^1.10.0" + }, + "devDependencies": { + "@azure/identity": "^1.1.0-preview", + "@azure/test-utils-recorder": "^1.0.0", + "@microsoft/api-extractor": "7.7.11", + "@rollup/plugin-multi-entry": "^3.0.0", + "@rollup/plugin-replace": "^2.2.0", + "@types/mocha": "^7.0.2", + "@types/node": "^8.0.0", + "@typescript-eslint/eslint-plugin": "^2.0.0", + "@typescript-eslint/parser": "^2.0.0", + "assert": "^1.4.1", + "cross-env": "^6.0.3", + "dotenv": "^8.2.0", + "downlevel-dts": "~0.4.0", + "es6-promise": "^4.2.5", + "eslint": "^6.1.0", + "eslint-config-prettier": "^6.0.0", + "eslint-plugin-no-null": "^1.0.2", + "eslint-plugin-no-only-tests": "^2.3.0", + "eslint-plugin-promise": "^4.1.1", + "esm": "^3.2.18", + "inherits": "^2.0.3", + "karma": "^4.0.1", + "karma-chrome-launcher": "^3.0.0", + "karma-coverage": "^2.0.0", + "karma-edge-launcher": "^0.4.2", + "karma-env-preprocessor": "^0.1.1", + "karma-firefox-launcher": "^1.1.0", + "karma-ie-launcher": "^1.0.0", + "karma-json-preprocessor": "^0.3.3", + "karma-json-to-file-reporter": "^1.0.1", + "karma-junit-reporter": "^2.0.1", + "karma-mocha": "^1.3.0", + "karma-mocha-reporter": "^2.2.5", + "karma-remap-istanbul": "^0.6.0", + "mocha": "^7.1.1", + "mocha-junit-reporter": "^1.18.0", + "nyc": "^14.0.0", + "prettier": "^1.16.4", + "puppeteer": "^2.0.0", + "rimraf": "^3.0.0", + "rollup": "^1.16.3", + "@rollup/plugin-commonjs": "^11.0.1", + "@rollup/plugin-node-resolve": "^7.0.0", + "rollup-plugin-shim": "^1.0.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "rollup-plugin-terser": "^5.1.1", + "rollup-plugin-visualizer": "^3.1.1", + "source-map-support": "^0.5.9", + "ts-node": "^8.3.0", + "typescript": "~3.8.3", + "util": "^0.12.1" + } +} \ No newline at end of file diff --git a/sdk/storage/storage-internal-avro/rollup.base.config.js b/sdk/storage/storage-internal-avro/rollup.base.config.js new file mode 100644 index 000000000000..6c638d082ff5 --- /dev/null +++ b/sdk/storage/storage-internal-avro/rollup.base.config.js @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +import nodeResolve from "@rollup/plugin-node-resolve"; +import multiEntry from "@rollup/plugin-multi-entry"; +import cjs from "@rollup/plugin-commonjs"; +import replace from "@rollup/plugin-replace"; +import { terser } from "rollup-plugin-terser"; +import sourcemaps from "rollup-plugin-sourcemaps"; +import shim from "rollup-plugin-shim"; +// import visualizer from "rollup-plugin-visualizer"; + +const version = require("./package.json").version; +const banner = [ + "/*!", + ` * Azure Storage SDK for JavaScript - Blob, ${version}`, + " * Copyright (c) Microsoft and contributors. All rights reserved.", + " */" +].join("\n"); + +const pkg = require("./package.json"); +const depNames = Object.keys(pkg.dependencies); +const production = process.env.NODE_ENV === "production"; + +export function nodeConfig(test = false) { + const externalNodeBuiltins = [ + "@azure/core-http", + "crypto", + "fs", + "events", + "os", + "stream", + "util" + ]; + const baseConfig = { + input: "dist-esm/src/index.js", + external: depNames.concat(externalNodeBuiltins), + output: { + file: "dist/index.js", + format: "cjs", + sourcemap: true + }, + preserveSymlinks: false, + plugins: [ + sourcemaps(), + replace({ + delimiters: ["", ""], + values: { + // replace dynamic checks with if (true) since this is for node only. + // Allows rollup's dead code elimination to be more aggressive. + "if (isNode)": "if (true)" + } + }), + nodeResolve({ preferBuiltins: true }), + cjs() + ], + onwarn(warning, warn) { + if (warning.code === "CIRCULAR_DEPENDENCY") { + throw new Error(warning.message); + } + warn(warning); + } + }; + + if (test) { + // entry point is every test file + baseConfig.input = [ + "dist-esm/test/*.spec.js", + "dist-esm/test/node/*.spec.js", + "dist-esm/src/index.js" + ]; + baseConfig.plugins.unshift(multiEntry()); + + // different output file + baseConfig.output.file = "dist-test/index.node.js"; + + // mark assert as external + baseConfig.external.push("assert", "fs", "path", "buffer", "zlib"); + + baseConfig.context = "null"; + + // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0, rollup started respecting + // the "sideEffects" field in package.json. Since our package.json sets "sideEffects=false", this also + // applies to test code, which causes all tests to be removed by tree-shaking. + baseConfig.treeshake = false; + } else if (production) { + baseConfig.plugins.push(terser()); + } + + return baseConfig; +} + +export function browserConfig(test = false) { + const baseConfig = { + input: "dist-esm/src/index.browser.js", + output: { + file: "dist-browser/azure-internal-avro.js", + banner: banner, + format: "umd", + name: "azblob", + sourcemap: true + }, + preserveSymlinks: false, + plugins: [ + sourcemaps(), + replace({ + delimiters: ["", ""], + values: { + // replace dynamic checks with if (false) since this is for + // browser only. Rollup's dead code elimination will remove + // any code guarded by if (isNode) { ... } + "if (isNode)": "if (false)" + } + }), + // fs and os are not used by the browser bundle, so just shim it + // dotenv doesn't work in the browser, so replace it with a no-op function + shim({ + dotenv: `export function config() { }`, + fs: ` + export function stat() { } + export function createReadStream() { } + export function createWriteStream() { } + `, + os: ` + export const type = 1; + export const release = 1; + `, + util: ` + export function promisify() { } + ` + }), + nodeResolve({ + mainFields: ["module", "browser"], + preferBuiltins: false + }), + cjs({ + namedExports: { + events: ["EventEmitter"], + assert: [ + "ok", + "deepEqual", + "equal", + "fail", + "strictEqual", + "deepStrictEqual", + "notDeepEqual", + "notDeepStrictEqual" + ], + "@opentelemetry/api": ["CanonicalCode", "SpanKind", "TraceFlags"] + } + }) + ], + onwarn(warning, warn) { + if (warning.code === "CIRCULAR_DEPENDENCY") { + throw new Error(warning.message); + } + warn(warning); + } + }; + + if (test) { + baseConfig.input = ["dist-esm/test/*.spec.js", "dist-esm/test/browser/*.spec.js"]; + baseConfig.plugins.unshift(multiEntry({ exports: false })); + baseConfig.output.file = "dist-test/index.browser.js"; + // mark fs-extra as external + baseConfig.external = ["fs-extra"]; + + baseConfig.context = "null"; + + // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0, rollup started respecting + // the "sideEffects" field in package.json. Since our package.json sets "sideEffects=false", this also + // applies to test code, which causes all tests to be removed by tree-shaking. + baseConfig.treeshake = false; + } + + return baseConfig; +} diff --git a/sdk/storage/storage-internal-avro/rollup.config.js b/sdk/storage/storage-internal-avro/rollup.config.js new file mode 100644 index 000000000000..a62dabd573b4 --- /dev/null +++ b/sdk/storage/storage-internal-avro/rollup.config.js @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +import * as base from "./rollup.base.config"; + +const inputs = []; + +if (!process.env.ONLY_BROWSER) { + inputs.push(base.nodeConfig()); +} + +// Disable this until we are ready to run rollup for the browser. +// if (!process.env.ONLY_NODE) { +// inputs.push(base.browserConfig()); +// } + +export default inputs; diff --git a/sdk/storage/storage-internal-avro/rollup.test.config.js b/sdk/storage/storage-internal-avro/rollup.test.config.js new file mode 100644 index 000000000000..ad98718cce46 --- /dev/null +++ b/sdk/storage/storage-internal-avro/rollup.test.config.js @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +import * as base from "./rollup.base.config"; + +export default [base.nodeConfig(true), base.browserConfig(true)]; diff --git a/sdk/storage/storage-internal-avro/src/AvroConstants.ts b/sdk/storage/storage-internal-avro/src/AvroConstants.ts new file mode 100644 index 000000000000..c5368c596246 --- /dev/null +++ b/sdk/storage/storage-internal-avro/src/AvroConstants.ts @@ -0,0 +1,4 @@ +export const AVRO_SYNC_MARKER_SIZE: number = 16; +export const AVRO_INIT_BYTES: Uint8Array = new Uint8Array([79, 98, 106, 1]); +export const AVRO_CODEC_KEY: string = "avro.codec"; +export const AVRO_SCHEMA_KEY: string = "avro.schema"; diff --git a/sdk/storage/storage-internal-avro/src/AvroParser.ts b/sdk/storage/storage-internal-avro/src/AvroParser.ts new file mode 100644 index 000000000000..b63a347b4375 --- /dev/null +++ b/sdk/storage/storage-internal-avro/src/AvroParser.ts @@ -0,0 +1,381 @@ +import { AvroReadable } from "./AvroReadable"; +import { KeyValuePair } from "./utils/utils.common"; + +export class AvroParser { + /** + * Reads a fixed number of bytes from the stream. + * + * @static + * @param stream + * @param length + */ + public static async readFixedBytes(stream: AvroReadable, length: number): Promise { + const bytes = await stream.read(length); + if (bytes.length != length) { + throw new Error("Hit stream end."); + } + return bytes; + } + + /** + * Reads a single byte from the stream. + * + * @static + * @param stream + */ + private static async readByte(stream: AvroReadable): Promise { + const buf = await AvroParser.readFixedBytes(stream, 1); + return buf[0]; + } + + private static async readZigZagLong(stream: AvroReadable): Promise { + // copied from https://github.com/apache/avro/blob/master/lang/js/lib/utils.js#L321 + let n = 0; + let k = 0; + let b, h, f, fk; + + do { + b = await AvroParser.readByte(stream); + h = b & 0x80; + n |= (b & 0x7f) << k; + k += 7; + } while (h && k < 28); + + if (h) { + // Switch to float arithmetic, otherwise we might overflow. + f = n; + fk = 268435456; // 2 ** 28. + do { + b = await AvroParser.readByte(stream); + f += (b & 0x7f) * fk; + fk *= 128; + } while (b & 0x80); + return (f % 2 ? -(f + 1) : f) / 2; + } + + return (n >> 1) ^ -(n & 1); + } + + public static async readLong(stream: AvroReadable): Promise { + return AvroParser.readZigZagLong(stream); + } + + public static async readInt(stream: AvroReadable): Promise { + return AvroParser.readZigZagLong(stream); + } + + public static async readNull(): Promise { + return null; + } + + public static async readBoolean(stream: AvroReadable): Promise { + const b = await AvroParser.readByte(stream); + if (b == 1) { + return true; + } else if (b == 0) { + return false; + } else { + throw new Error("Byte was not a boolean."); + } + } + + public static async readFloat(stream: AvroReadable): Promise { + const u8arr = await AvroParser.readFixedBytes(stream, 4); + const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); + return view.getFloat32(0, true); // littleEndian = true + } + + public static async readDouble(stream: AvroReadable): Promise { + const u8arr = await AvroParser.readFixedBytes(stream, 8); + const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); + return view.getFloat64(0, true); // littleEndian = true + } + + public static async readBytes(stream: AvroReadable): Promise { + const size = await AvroParser.readLong(stream); + if (size < 0) { + throw new Error("Bytes size was negative."); + } + + return await stream.read(size); + } + + public static async readString(stream: AvroReadable): Promise { + const u8arr = await AvroParser.readBytes(stream); + + // FIXME: need TextDecoder polyfill for IE + let utf8decoder = new TextDecoder(); + return utf8decoder.decode(u8arr); + } + + private static async readMapPair( + stream: AvroReadable, + readItemMethod: (s: AvroReadable) => Promise + ): Promise> { + const key = await AvroParser.readString(stream); + // FIXME: what about readFixed which need a length as parameter. + const value = await readItemMethod(stream); + return { key, value }; + } + + public static async readMap( + stream: AvroReadable, + readItemMethod: (s: AvroReadable) => Promise + ): Promise> { + const readPairMethod = async (stream: AvroReadable): Promise> => { + return await AvroParser.readMapPair(stream, readItemMethod); + }; + + const pairs: KeyValuePair[] = await AvroParser.readArray(stream, readPairMethod); + let dict: Record = {}; + for (const pair of pairs) { + dict[pair.key] = pair.value; + } + return dict; + } + + private static async readArray( + stream: AvroReadable, + readItemMethod: (s: AvroReadable) => Promise + ): Promise { + let items: T[] = []; + for ( + let count = await AvroParser.readLong(stream); + count != 0; + count = await AvroParser.readLong(stream) + ) { + if (count < 0) { + // Ignore block sizes + await AvroParser.readLong(stream); + count = -count; + } + + while (count--) { + const item: T = await readItemMethod(stream); + items.push(item); + } + } + return items; + } +} + +interface RecordField { + name: string; + type: string | ObjectSchema | (string | ObjectSchema)[]; // Unions may not immediately contain other unions. +} + +enum AvroComplex { + RECORD = 'record', + ENUM = 'enum', + ARRAY = 'array', + MAP = 'map', + UNION = 'union', + FIXED = 'fixed', +} + +interface ObjectSchema { + type: Exclude; + name?: string; + aliases?: string; + fields?: RecordField[]; + symbols?: string[]; + values?: string; + size?: number; +} + +export abstract class AvroType { + /** + * Reads an object from the stream. + * + * @param stream + */ + public abstract read(stream: AvroReadable): Promise; + + /** + * Determines the AvroType from the Avro Schema. + */ + public static fromSchema(schema: string | Object): AvroType { + if (typeof schema == "string") { + return AvroType.fromStringSchema(schema); + } else if (Array.isArray(schema)) { + return AvroType.fromArraySchema(schema); + } else { + return AvroType.fromObjectSchema(schema as ObjectSchema); + } + } + + private static fromStringSchema(schema: string): AvroType { + // FIXME: simpler way to tell if schema is of type AvroPrimitive? + switch (schema) { + case AvroPrimitive.NULL: + case AvroPrimitive.BOOLEAN: + case AvroPrimitive.INT: + case AvroPrimitive.LONG: + case AvroPrimitive.FLOAT: + case AvroPrimitive.DOUBLE: + case AvroPrimitive.BYTES: + case AvroPrimitive.STRING: + return new AvroPrimitiveType(schema as AvroPrimitive); + default: + throw new Error(`Unexpected Avro type ${schema}`); + } + } + + private static fromArraySchema(schema: any[]): AvroType { + return new AvroUnionType(schema.map(AvroType.fromSchema)); + } + + private static fromObjectSchema(schema: ObjectSchema): AvroType { + const type = schema.type; + // Primitives can be defined as strings or objects + try { + return AvroType.fromStringSchema(type); + } catch (err) { } + + switch (type) { + case AvroComplex.RECORD: + if (schema.aliases) { + throw new Error(`aliases currently is not supported, schema: ${schema}`); + } + if (!schema.name) { + throw new Error(`Required attribute 'name' doesn't exist on schema: ${schema}`); + } + + let fields: Record = {}; + if (!schema.fields) { + throw new Error(`Required attribute 'fields' doesn't exist on schema: ${schema}`); + } + for (const field of schema.fields) { + fields[field.name] = AvroType.fromSchema(field.type); + } + return new AvroRecordType(fields, schema.name); + case AvroComplex.ENUM: + if (schema.aliases) { + throw new Error(`aliases currently is not supported, schema: ${schema}`); + } + if (!schema.symbols) { + throw new Error(`Required attribute 'symbols' doesn't exist on schema: ${schema}`); + } + return new AvroEnumType(schema.symbols); + case AvroComplex.MAP: + if (!schema.values) { + throw new Error(`Required attribute 'values' doesn't exist on schema: ${schema}`); + } + return new AvroMapType(AvroType.fromSchema(schema.values)); + case AvroComplex.ARRAY: // Unused today + case AvroComplex.FIXED: // Unused today + default: + throw new Error(`Unexpected Avro type ${type} in ${schema}`); + } + } +} + +enum AvroPrimitive { + NULL = "null", + BOOLEAN = 'boolean', + INT = 'int', + LONG = 'long', + FLOAT = 'float', + DOUBLE = 'double', + BYTES = 'bytes', + STRING = 'string' +} + +class AvroPrimitiveType extends AvroType { + private _primitive: AvroPrimitive; + + constructor(primitive: AvroPrimitive) { + super(); + this._primitive = primitive; + } + + public async read(stream: AvroReadable): Promise { + switch (this._primitive) { + case AvroPrimitive.NULL: + return await AvroParser.readNull(); + case AvroPrimitive.BOOLEAN: + return await AvroParser.readBoolean(stream); + case AvroPrimitive.INT: + return await AvroParser.readInt(stream); + case AvroPrimitive.LONG: + return await AvroParser.readLong(stream); + case AvroPrimitive.FLOAT: + return await AvroParser.readFloat(stream); + case AvroPrimitive.DOUBLE: + return await AvroParser.readDouble(stream); + case AvroPrimitive.BYTES: + return await AvroParser.readBytes(stream); + case AvroPrimitive.STRING: + return await AvroParser.readString(stream); + default: + throw new Error("Unknown Avro Primitive"); + } + } +} + +class AvroEnumType extends AvroType { + private readonly _symbols: string[]; + + constructor(symbols: string[]) { + super(); + this._symbols = symbols; + } + + public async read(stream: AvroReadable): Promise { + const value = await AvroParser.readInt(stream); + return this._symbols[value]; + } +} + +class AvroUnionType extends AvroType { + private readonly _types: AvroType[]; + + constructor(types: AvroType[]) { + super(); + this._types = types; + } + + public async read(stream: AvroReadable): Promise { + const typeIndex = await AvroParser.readInt(stream); + return await this._types[typeIndex].read(stream); + } +} + +class AvroMapType extends AvroType { + private readonly _itemType: AvroType; + + constructor(itemType: AvroType) { + super(); + this._itemType = itemType; + } + + public async read(stream: AvroReadable): Promise { + const readItemMethod = async (s: AvroReadable): Promise => { + return await this._itemType.read(s); + }; + return await AvroParser.readMap(stream, readItemMethod); + } +} + +class AvroRecordType extends AvroType { + private readonly _name: string; + private readonly _fields: Record; + + constructor(fields: Record, name: string) { + super(); + this._fields = fields; + this._name = name; + } + + public async read(stream: AvroReadable): Promise { + let record: Record = {}; + // FIXME: what for? + record["$schema"] = this._name; + for (const key in this._fields) { + if (this._fields.hasOwnProperty(key)) { + record[key] = await this._fields[key].read(stream); + } + } + return record; + } +} diff --git a/sdk/storage/storage-internal-avro/src/AvroReadable.ts b/sdk/storage/storage-internal-avro/src/AvroReadable.ts new file mode 100644 index 000000000000..36151b8fa453 --- /dev/null +++ b/sdk/storage/storage-internal-avro/src/AvroReadable.ts @@ -0,0 +1,4 @@ +export abstract class AvroReadable { + public abstract get position(): number; + public abstract async read(size: number): Promise; +} diff --git a/sdk/storage/storage-internal-avro/src/AvroReadableFromStream.ts b/sdk/storage/storage-internal-avro/src/AvroReadableFromStream.ts new file mode 100644 index 000000000000..afc3352c859f --- /dev/null +++ b/sdk/storage/storage-internal-avro/src/AvroReadableFromStream.ts @@ -0,0 +1,59 @@ +import { Readable } from "stream"; +import { AvroReadable } from './AvroReadable'; + +export class AvroReadableFromStream extends AvroReadable { + private _position: number; + private _readable: Readable; + // private _stillReadable: boolean; + constructor(readable: Readable) { + super(); + this._readable = readable; + this._position = 0; + // workaround due to Readable.readable only availabe after Node.js v11.4 + // this._stillReadable = true; + // this._readable.on("end", () => { + // this._stillReadable = false; + // }); + // this._readable.on("error", () => { + // this._stillReadable = false; + // }); + } + public get position(): number { + return this._position; + } + public async read(size: number): Promise { + if (size <= 0) { + throw new Error(`size parameter should be positive: ${size}`); + } + // readable is true if it is safe to call readable.read(), which means the stream has not been destroyed or emitted 'error' or 'end'. + // if (!this._stillReadable || this._readable.destroyed) { + if (!this._readable.readable) { + throw new Error("Stream no longer readable."); + } + // See if there is already enough data, note that "Only after readable.read() returns null, 'readable' will be emitted." + let chunk = this._readable.read(size); + if (chunk) { + this._position += chunk.length; + // chunk.lenght maybe less than desired size if the stream ends. + return chunk; + } + else { + // register callback to wait for enough data to read + return new Promise((resolve, reject) => { + const callback = () => { + let chunk = this._readable.read(size); + if (chunk) { + this._position += chunk.length; + // chunk.lenght maybe less than desired size if the stream ends. + resolve(chunk); + this._readable.removeListener("readable", callback); + } + }; + this._readable.on("readable", callback); + this._readable.once("error", reject); + this._readable.once("end", reject); + this._readable.once("close", reject); + }); + } + } +} diff --git a/sdk/storage/storage-internal-avro/src/AvroReader.ts b/sdk/storage/storage-internal-avro/src/AvroReader.ts new file mode 100644 index 000000000000..b8a2caef1124 --- /dev/null +++ b/sdk/storage/storage-internal-avro/src/AvroReader.ts @@ -0,0 +1,142 @@ +import { AvroReadable } from "./AvroReadable"; +import { AVRO_SYNC_MARKER_SIZE, AVRO_INIT_BYTES, AVRO_CODEC_KEY, AVRO_SCHEMA_KEY } from "./AvroConstants"; +import { arraysEqual } from "./utils/utils.common"; +import { AvroType, AvroParser } from "./AvroParser"; + +export class AvroReader { + private readonly _dataStream: AvroReadable; + + private readonly _headerStream: AvroReadable; + + private _syncMarker?: Uint8Array; + + private _metadata?: Record; + + private _itemType?: AvroType; + + private _itemsRemainingInBlock?: number; + + /// The byte offset within the Avro file (both header and data) + /// of the start of the current block. + private _blockOffset: number; + public get blockOffset(): number { + return this._blockOffset; + } + + private _objectIndex: number; + public get objectIndex(): number { + return this._objectIndex; + } + + private _initialized: boolean; + + constructor(dataStream: AvroReadable); + + constructor( + dataStream: AvroReadable, + headerStream: AvroReadable, + currentBlockOffset: number, + indexWithinCurrentBlock: number + ); + + constructor( + dataStream: AvroReadable, + headerStream?: AvroReadable, + currentBlockOffset?: number, + indexWithinCurrentBlock?: number + ) { + this._dataStream = dataStream; + this._headerStream = headerStream || dataStream; + this._initialized = false; + this._blockOffset = currentBlockOffset || 0; + this._objectIndex = indexWithinCurrentBlock || 0; + } + + // FUTURE: cancellation / aborter? + private async initialize() { + const header = await AvroParser.readFixedBytes( + this._headerStream, + AVRO_INIT_BYTES.length + ); + if (!arraysEqual(header, AVRO_INIT_BYTES)) { + throw new Error("Stream is not an Avro file."); + } + + // File metadata is written as if defined by the following map schema: + // { "type": "map", "values": "bytes"} + this._metadata = await AvroParser.readMap(this._headerStream, AvroParser.readString); + + // Validate codec + const codec = this._metadata![AVRO_CODEC_KEY]; + if (!(codec == undefined || codec == "null")) { + throw new Error("Codecs are not supported"); + } + + // The 16-byte, randomly-generated sync marker for this file. + this._syncMarker = await AvroParser.readFixedBytes( + this._headerStream, + AVRO_SYNC_MARKER_SIZE + ); + + // Parse the schema + const schema = JSON.parse(this._metadata![AVRO_SCHEMA_KEY]); + this._itemType = AvroType.fromSchema(schema); + + if (this._blockOffset == 0) { + this._blockOffset = this._dataStream.position; + } + + this._itemsRemainingInBlock = await AvroParser.readLong(this._dataStream); + // skip block length + await AvroParser.readLong(this._dataStream); + + this._initialized = true; + if (this._objectIndex && this._objectIndex > 0) { + for (let i = 0; i < this._objectIndex; i++) { + await this._itemType.read(this._dataStream); + this._itemsRemainingInBlock!--; + } + } + } + + public hasNext(): boolean { + return !this._initialized || this._itemsRemainingInBlock! > 0; + } + + public async *parseObjects(): AsyncIterableIterator { + if (!this._initialized) { + await this.initialize(); + } + + while (this.hasNext()) { + const result = await this._itemType!.read(this._dataStream); + + this._itemsRemainingInBlock!--; + this._objectIndex!++; + + if (this._itemsRemainingInBlock == 0) { + const marker = await AvroParser.readFixedBytes(this._dataStream, AVRO_SYNC_MARKER_SIZE); + + this._blockOffset = this._dataStream.position; + this._objectIndex = 0; + + if (!arraysEqual(this._syncMarker!, marker)) { + throw new Error("Stream is not a valid Avro file."); + } + + try { + this._itemsRemainingInBlock = await AvroParser.readLong(this._dataStream); + } catch (err) { + // We hit the end of the stream. + this._itemsRemainingInBlock = 0; + } + + if (this._itemsRemainingInBlock! > 0) { + // Ignore block size + await AvroParser.readLong(this._dataStream); + } + } + yield result; + } + } +} diff --git a/sdk/storage/storage-internal-avro/src/index.ts b/sdk/storage/storage-internal-avro/src/index.ts new file mode 100644 index 000000000000..b8e8047dc0f9 --- /dev/null +++ b/sdk/storage/storage-internal-avro/src/index.ts @@ -0,0 +1,3 @@ +export { AvroReader } from "./AvroReader"; +export { AvroReadable } from "./AvroReadable"; +export { AvroReadableFromStream } from "./AvroReadableFromStream"; diff --git a/sdk/storage/storage-internal-avro/src/utils/utils.common.ts b/sdk/storage/storage-internal-avro/src/utils/utils.common.ts new file mode 100644 index 000000000000..ace1939dd47a --- /dev/null +++ b/sdk/storage/storage-internal-avro/src/utils/utils.common.ts @@ -0,0 +1,15 @@ +export interface KeyValuePair { + key: string; + value: T; +} + +export function arraysEqual(a: Uint8Array, b: Uint8Array) : boolean { + if (a === b) return true; + if (a == null || b == null) return false; + if (a.length != b.length) return false; + + for (let i = 0; i < a.length; ++i) { + if (a[i] !== b[i]) return false; + } + return true; +} diff --git a/sdk/storage/storage-internal-avro/test/avroreadable.spec.ts b/sdk/storage/storage-internal-avro/test/avroreadable.spec.ts new file mode 100644 index 000000000000..d2e382cabc10 --- /dev/null +++ b/sdk/storage/storage-internal-avro/test/avroreadable.spec.ts @@ -0,0 +1,25 @@ +import * as fs from "fs"; +import * as assert from "assert"; +import { AvroReadableFromStream } from "../src"; + +describe("AvroReadableFromStream", () => { + it("read pass end should throw", async () => { + let rs = fs.createReadStream("../README.md"); + + let rfs = new AvroReadableFromStream(rs); + assert.equal(rfs.position, 0); + + await rfs.read(10); + assert.equal(rfs.position, 10); + await rfs.read(100000); + + let exceptionCaught = false; + try { + await rfs.read(10); + } catch (err) { + assert.equal(err.message, "Stream no longer readable."); + exceptionCaught = true; + } + assert.ok(exceptionCaught); + }); +}); diff --git a/sdk/storage/storage-internal-avro/test/avroreader.spec.ts b/sdk/storage/storage-internal-avro/test/avroreader.spec.ts new file mode 100644 index 000000000000..e7e51c180bcb --- /dev/null +++ b/sdk/storage/storage-internal-avro/test/avroreader.spec.ts @@ -0,0 +1,59 @@ +import * as fs from "fs"; +import * as assert from "assert"; +import { AvroReader, AvroReadableFromStream } from "../src"; +import { arraysEqual } from "../src/utils/utils.common"; + +describe("AvroReader", () => { + it("test with local avro files", async () => { + const testCases: TestCase[] = [ + new TestCase("test_null_0.avro", (o) => assert.strictEqual(null, o)), // null + new TestCase("test_null_1.avro", (o) => assert.strictEqual(true, o)), // boolean + new TestCase("test_null_2.avro", (o) => assert.strictEqual("adsfasdf09809dsf-=adsf", o)), // string + new TestCase("test_null_3.avro", (o) => + assert.ok(arraysEqual(new TextEncoder().encode("12345abcd"), o as Uint8Array)) + ), // byte[] + new TestCase("test_null_4.avro", (o) => assert.strictEqual(1234, o)), // int + new TestCase("test_null_5.avro", (o) => assert.strictEqual(1234, o)), // long + new TestCase("test_null_6.avro", (o) => assert.strictEqual(1234.0, o)), // float + new TestCase("test_null_7.avro", (o) => assert.strictEqual(1234.0, o)), // double + // Not supported today. + // new TestCase("test_null_8.avro", o => assert.ok(arraysEqual(new TextEncoder().encode("B"), o as Uint8Array))), // fixed + new TestCase("test_null_9.avro", (o) => assert.strictEqual("B", o)), // enum + // Not supported today. + // new TestCase("test_null_10.avro", o => assert.deepStrictEqual([1, 2, 3], o)), // array + new TestCase("test_null_11.avro", (o) => assert.deepStrictEqual({ a: 1, b: 3, c: 2 }, o)), // map + new TestCase("test_null_12.avro", (o) => assert.strictEqual(null, o)), // union + new TestCase("test_null_13.avro", (o) => { + const expected = { $schema: "Test", f: 5 }; + const expectedEntries = Object.entries(expected); + const actualEntries = Object.entries(o!); + const actualMap = new Map(actualEntries); + assert.strictEqual(expectedEntries.length, actualEntries.length); + for (const [key, value] of expectedEntries) { + assert.deepStrictEqual(actualMap.get(key), value); + } + }) // record + ]; + + for (const testcase of testCases) { + const rs = fs.createReadStream(`./test/resources/${testcase.path}`); + const rfs = new AvroReadableFromStream(rs); + + const avroReader = new AvroReader(rfs); + const iter = avroReader.parseObjects(); + for await (const o of iter) { + testcase.predict(o); + } + } + }); +}); + +type Action = (o: Object | null) => void; +class TestCase { + public path: string; + public predict: Action; + constructor(path: string, action: Action) { + this.path = path; + this.predict = action; + } +} diff --git a/sdk/storage/storage-internal-avro/test/resources/test_null_0.avro b/sdk/storage/storage-internal-avro/test/resources/test_null_0.avro new file mode 100644 index 0000000000000000000000000000000000000000..91c2b2469e5432eb9ec2390151bc9ff3e90ceaa0 GIT binary patch literal 75 zcmeZI%3@>@Nh~YM*GtY%NloU+E6vFf1M`cMGg5OCd6YmRN(`NUQtMNu2+Y1`d^mr~ K=3Z$L3=seW)g9yj literal 0 HcmV?d00001 diff --git a/sdk/storage/storage-internal-avro/test/resources/test_null_1.avro b/sdk/storage/storage-internal-avro/test/resources/test_null_1.avro new file mode 100644 index 0000000000000000000000000000000000000000..01371934eba3764a31d53dd3f9bc1e461702d1ab GIT binary patch literal 88 zcmeZI%3@>@Nh~YM*GtY%NloU+E6vFf1M`cMGg5OCg_M%=^K()Y^OP9s8P`rr>EQjK TbNPM6yO#l9L_`?j09_6MP7xss literal 0 HcmV?d00001 diff --git a/sdk/storage/storage-internal-avro/test/resources/test_null_10.avro b/sdk/storage/storage-internal-avro/test/resources/test_null_10.avro new file mode 100644 index 0000000000000000000000000000000000000000..97aaaa0bb91a78930168294a4d9b4a235d6dd92a GIT binary patch literal 153 zcmeZI%3@>@Nh~YM*GtY%NloU+E6vFf1M`cMGg5OCU8@Nh~YM*GtY%NloU+E6vFf1M`cMGg5OCovM{eDhpDTtQ3@T6AP4d6qL#m zb4pW-K>|7XdFe{E49};o`JAs(f6}V2H`n@m#e0!EjBHGaOiW2^Ovx+^bYP-8005xm BHPQe8 literal 0 HcmV?d00001 diff --git a/sdk/storage/storage-internal-avro/test/resources/test_null_12.avro b/sdk/storage/storage-internal-avro/test/resources/test_null_12.avro new file mode 100644 index 0000000000000000000000000000000000000000..ddf42625f4f320290e6da4136c343b800d139419 GIT binary patch literal 105 zcmeZI%3@>@Nh~YM*GtY%NloU+E6vFf1M`cMGg5OCO`?^GONuh{(v@@+lt7XoIwv2< fk7c+TwR{ENa=xFFChYuieom>MhzJuLpvwUOZ!acI literal 0 HcmV?d00001 diff --git a/sdk/storage/storage-internal-avro/test/resources/test_null_13.avro b/sdk/storage/storage-internal-avro/test/resources/test_null_13.avro new file mode 100644 index 0000000000000000000000000000000000000000..277376ae1aa5801191c8824813be8f020324fbae GIT binary patch literal 157 zcmeZI%3@>@Nh~YM*GtY%NloU+E6vFf1M`cMGg5OCXE9bQl~fj_Dp@Hg6{RNU7o{la zC@AG6=7L2+Qj1GK{Itx}oRngqnrMXTocz3WWVLBZwXwAfaYu7sT72Vj$vnXPB|UzL Mf`|wg9H7eq0E1I9(f|Me literal 0 HcmV?d00001 diff --git a/sdk/storage/storage-internal-avro/test/resources/test_null_14.avro b/sdk/storage/storage-internal-avro/test/resources/test_null_14.avro new file mode 100644 index 0000000000000000000000000000000000000000..3c34ec843837039174125c7b6d7b86554bd35374 GIT binary patch literal 358 zcmeZI%3@>@Nh~YM*GtY%NloU+E6vFf1M`cMGg5OC=P_3+l~fj_Dp@Hg6{RNU7o{la zC@AG6=7L3hGK&j9{Itx}oRngqnrOJ{XeE$QAj#sAqRhN>APX*s#U$taykZ{B$gLMxCiYvk+gsN+Yg$~W$O1+dCXS5M M#1sZ<(dbqH03+gO_W%F@ literal 0 HcmV?d00001 diff --git a/sdk/storage/storage-internal-avro/test/resources/test_null_2.avro b/sdk/storage/storage-internal-avro/test/resources/test_null_2.avro new file mode 100644 index 0000000000000000000000000000000000000000..bf119d9e16f55f99c06d203079cd7b35812f2744 GIT binary patch literal 308 zcmeZI%3@>@Nh~YM*GtY%NloU+E6vFf1M`cMGg5OC1(b?QiZb)kl^8Z(S$pN@?6xH= opWCzEF8(bga)wzaF{L;yu{b5oz|z9N63EuI1&ItZVRVlJ04jEH;{X5v literal 0 HcmV?d00001 diff --git a/sdk/storage/storage-internal-avro/test/resources/test_null_3.avro b/sdk/storage/storage-internal-avro/test/resources/test_null_3.avro new file mode 100644 index 0000000000000000000000000000000000000000..d542117f7f6e950c5858d2f5242d03db1142d117 GIT binary patch literal 177 zcmeZI%3@>@Nh~YM*GtY%NloU+E6vFf1M`cMGg5OC`IM3>OHzxK7|d0}Qa-liyMB4a cZm;{t@4v_iMj=BZV-wTFq~sLZvCypr0FtpdUjP6A literal 0 HcmV?d00001 diff --git a/sdk/storage/storage-internal-avro/test/resources/test_null_4.avro b/sdk/storage/storage-internal-avro/test/resources/test_null_4.avro new file mode 100644 index 0000000000000000000000000000000000000000..b514fd8218419e4dd2b5dfe9bda9f4b678a1581f GIT binary patch literal 94 zcmeZI%3@>@Nh~YM*GtY%NloU+E6vFf1M`cMGg5OCxs)>VN|YGx{5Z8JF?q=kk$qY} QI;waJMKqQOV?uOQ0FbsOYybcN literal 0 HcmV?d00001 diff --git a/sdk/storage/storage-internal-avro/test/resources/test_null_5.avro b/sdk/storage/storage-internal-avro/test/resources/test_null_5.avro new file mode 100644 index 0000000000000000000000000000000000000000..29e8ca4d5f3559887e1628238dff6d8499f315a1 GIT binary patch literal 95 zcmeZI%3@>@Nh~YM*GtY%NloU+E6vFf1M`cMGg5OCd6aVU^U{?VDi@v#HHgi6KXqZr S;X}KQ-W1VTB8&;qRRI97RwwrW literal 0 HcmV?d00001 diff --git a/sdk/storage/storage-internal-avro/test/resources/test_null_6.avro b/sdk/storage/storage-internal-avro/test/resources/test_null_6.avro new file mode 100644 index 0000000000000000000000000000000000000000..df22b0f901a3004e75a9a922eeaf6c61b942fa5f GIT binary patch literal 116 zcmeZI%3@>@Nh~YM*GtY%NloU+E6vFf1M`cMGg5OC`IORf@)Jvx81%y!RhK2p%#Hf7 U#^f4vcdkePgTpKrVlcW+0GJvkApigX literal 0 HcmV?d00001 diff --git a/sdk/storage/storage-internal-avro/test/resources/test_null_7.avro b/sdk/storage/storage-internal-avro/test/resources/test_null_7.avro new file mode 100644 index 0000000000000000000000000000000000000000..1168f99d0d1977ba6a446b5b4599a96efd6f072f GIT binary patch literal 158 zcmeZI%3@>@Nh~YM*GtY%NloU+E6vFf1M`cMGg5OC1(Z_qOOtX^l^6>5J}b~GkAB(O YA*We={AY~F0!9W9@R;mCEgIbl0PIvMivR!s literal 0 HcmV?d00001 diff --git a/sdk/storage/storage-internal-avro/test/resources/test_null_8.avro b/sdk/storage/storage-internal-avro/test/resources/test_null_8.avro new file mode 100644 index 0000000000000000000000000000000000000000..b4136af69b603bc2695bcdffdcd69e9abb650888 GIT binary patch literal 123 zcmeZI%3@>@Nh~YM*GtY%NloU+E6vFf1M`cMGg5OCBdV23DhpDTtQ3^eGAmM3lynr7 u@)C2w0wJlzB_MurW)+BUSj#Y1s# literal 0 HcmV?d00001 diff --git a/sdk/storage/storage-internal-avro/test/resources/test_null_9.avro b/sdk/storage/storage-internal-avro/test/resources/test_null_9.avro new file mode 100644 index 0000000000000000000000000000000000000000..90abc062240449b5df26a9aeeebf602cb9f38d73 GIT binary patch literal 134 zcmeZI%3@>@Nh~YM*GtY%NloU+E6vFf1M`cMGg5OC^Qx6fDhpDTtQ3?|^Gb7-bQF~G z5_7@)kksN55Wl!GHz_}-7^oy#$q^*rq!e4rpyG4uSOkOUm+zatwOxp?(H9Y6f&+9p E09Ilw2LJ#7 literal 0 HcmV?d00001 diff --git a/sdk/storage/storage-internal-avro/tsconfig.json b/sdk/storage/storage-internal-avro/tsconfig.json new file mode 100644 index 000000000000..7d0f438f54f6 --- /dev/null +++ b/sdk/storage/storage-internal-avro/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "alwaysStrict": true, + "noImplicitAny": true, + "preserveConstEnums": true, + "sourceMap": true, + "inlineSources": true, + "newLine": "LF", + "target": "es5", + "moduleResolution": "node", + "noUnusedLocals": true, + "noUnusedParameters": true, + "strict": true, + "module": "esNext", + "outDir": "./dist-esm", + "declaration": true, + "declarationMap": true, + "importHelpers": true, + "declarationDir": "./typings/latest", + "lib": ["dom", "es5", "es6", "es7", "esnext"], + "esModuleInterop": true + }, + "compileOnSave": true, + "exclude": ["node_modules", "./samples/**"], + "include": ["./src/**/*.ts", "./test/**/*.ts"] +} From 8fe8c375fa2af9e1bd699d19cb4c5dc695538815 Mon Sep 17 00:00:00 2001 From: Xiaoning Liu Date: Tue, 19 May 2020 15:42:31 +0800 Subject: [PATCH 02/39] [Storage][Blob] Regenerate with Dec19 swagger --- .../storage-blob/src/BlobServiceClient.ts | 8 +- .../generated/src/models/appendBlobMappers.ts | 1 + .../src/generated/src/models/blobMappers.ts | 11 + .../generated/src/models/containerMappers.ts | 7 +- .../src/generated/src/models/index.ts | 1180 +++++++++++++++-- .../src/generated/src/models/mappers.ts | 1164 +++++++++++++++- .../src/generated/src/models/parameters.ts | 201 ++- .../generated/src/models/serviceMappers.ts | 3 + .../generated/src/operations/appendBlob.ts | 63 +- .../src/generated/src/operations/blob.ts | 287 +++- .../src/generated/src/operations/blockBlob.ts | 10 +- .../src/generated/src/operations/container.ts | 70 +- .../src/generated/src/operations/pageBlob.ts | 13 +- .../src/generated/src/operations/service.ts | 56 + .../src/generated/src/storageClientContext.ts | 2 +- .../storage-blob/src/generatedModels.ts | 4 +- sdk/storage/storage-blob/swagger/README.md | 2 +- 17 files changed, 2886 insertions(+), 196 deletions(-) diff --git a/sdk/storage/storage-blob/src/BlobServiceClient.ts b/sdk/storage/storage-blob/src/BlobServiceClient.ts index d270a5a36cc7..4ad33f0eb288 100644 --- a/sdk/storage/storage-blob/src/BlobServiceClient.ts +++ b/sdk/storage/storage-blob/src/BlobServiceClient.ts @@ -155,7 +155,7 @@ interface ServiceListContainersSegmentOptions extends CommonOptions { * specify that the container's metadata be returned as part of the response * body. Possible values include: 'metadata' */ - include?: ListContainersIncludeType; + include?: ListContainersIncludeType | ListContainersIncludeType[]; } /** @@ -647,11 +647,15 @@ export class BlobServiceClient extends StorageClient { "BlobServiceClient-listContainersSegment", options.tracingOptions ); + try { return await this.serviceContext.listContainersSegment({ abortSignal: options.abortSignal, marker, - ...options, + options: { + ...options, + include: typeof options.include === "string" ? [options.include] : options.include + }, spanOptions }); } catch (e) { diff --git a/sdk/storage/storage-blob/src/generated/src/models/appendBlobMappers.ts b/sdk/storage/storage-blob/src/generated/src/models/appendBlobMappers.ts index b82cb3f2f4aa..2e1327c45d20 100644 --- a/sdk/storage/storage-blob/src/generated/src/models/appendBlobMappers.ts +++ b/sdk/storage/storage-blob/src/generated/src/models/appendBlobMappers.ts @@ -10,5 +10,6 @@ export { AppendBlobAppendBlockFromUrlHeaders, AppendBlobAppendBlockHeaders, AppendBlobCreateHeaders, + AppendBlobSealHeaders, StorageError } from "../models/mappers"; diff --git a/sdk/storage/storage-blob/src/generated/src/models/blobMappers.ts b/sdk/storage/storage-blob/src/generated/src/models/blobMappers.ts index 56eeb7573dd9..00356c263890 100644 --- a/sdk/storage/storage-blob/src/generated/src/models/blobMappers.ts +++ b/sdk/storage/storage-blob/src/generated/src/models/blobMappers.ts @@ -18,16 +18,27 @@ export { BlobGetAccessControlHeaders, BlobGetAccountInfoHeaders, BlobGetPropertiesHeaders, + BlobGetTagsHeaders, + BlobQueryHeaders, BlobReleaseLeaseHeaders, BlobRenameHeaders, BlobRenewLeaseHeaders, BlobSetAccessControlHeaders, + BlobSetExpiryHeaders, BlobSetHTTPHeadersHeaders, BlobSetMetadataHeaders, + BlobSetTagsHeaders, BlobSetTierHeaders, BlobStartCopyFromURLHeaders, + BlobTag, + BlobTags, BlobUndeleteHeaders, DataLakeStorageError, DataLakeStorageErrorError, + DelimitedTextConfiguration, + JsonTextConfiguration, + QueryFormat, + QueryRequest, + QuerySerialization, StorageError } from "../models/mappers"; diff --git a/sdk/storage/storage-blob/src/generated/src/models/containerMappers.ts b/sdk/storage/storage-blob/src/generated/src/models/containerMappers.ts index 22726a267131..8eee9c1c3fff 100644 --- a/sdk/storage/storage-blob/src/generated/src/models/containerMappers.ts +++ b/sdk/storage/storage-blob/src/generated/src/models/containerMappers.ts @@ -10,9 +10,11 @@ export { AccessPolicy, BlobFlatListSegment, BlobHierarchyListSegment, - BlobItem, + BlobItemInternal, BlobPrefix, - BlobProperties, + BlobPropertiesInternal, + BlobTag, + BlobTags, ContainerAcquireLeaseHeaders, ContainerBreakLeaseHeaders, ContainerChangeLeaseHeaders, @@ -25,6 +27,7 @@ export { ContainerListBlobHierarchySegmentHeaders, ContainerReleaseLeaseHeaders, ContainerRenewLeaseHeaders, + ContainerRestoreHeaders, ContainerSetAccessPolicyHeaders, ContainerSetMetadataHeaders, ListBlobsFlatSegmentResponse, diff --git a/sdk/storage/storage-blob/src/generated/src/models/index.ts b/sdk/storage/storage-blob/src/generated/src/models/index.ts index 9192682bf1b1..26db595515f5 100644 --- a/sdk/storage/storage-blob/src/generated/src/models/index.ts +++ b/sdk/storage/storage-blob/src/generated/src/models/index.ts @@ -117,7 +117,7 @@ export interface AccessPolicy { /** * Properties of a blob */ -export interface BlobProperties { +export interface BlobPropertiesInternal { createdOn?: Date; lastModified: Date; etag: string; @@ -178,24 +178,47 @@ export interface BlobProperties { */ encryptionScope?: string; accessTierChangedOn?: Date; + tagCount?: number; + expiresOn?: Date; + isSealed?: boolean; +} + +/** + * An interface representing BlobTag. + */ +export interface BlobTag { + key: string; + value: string; +} + +/** + * Blob tags + */ +export interface BlobTags { + blobTagSet: BlobTag[]; } /** * An Azure Storage blob */ -export interface BlobItem { +export interface BlobItemInternal { name: string; deleted: boolean; snapshot: string; - properties: BlobProperties; + versionId?: string; + isCurrentVersion?: boolean; + properties: BlobPropertiesInternal; metadata?: { [propertyName: string]: string }; + blobTags?: BlobTags; + objectReplicationPolicyId?: string; + objectReplicationRules?: { [propertyName: string]: string }; } /** * An interface representing BlobFlatListSegment. */ export interface BlobFlatListSegment { - blobItems: BlobItem[]; + blobItems: BlobItemInternal[]; } /** @@ -223,7 +246,7 @@ export interface BlobPrefix { */ export interface BlobHierarchyListSegment { blobPrefixes?: BlobPrefix[]; - blobItems: BlobItem[]; + blobItems: BlobItemInternal[]; } /** @@ -297,6 +320,8 @@ export interface ContainerProperties { hasLegalHold?: boolean; defaultEncryptionScope?: string; preventEncryptionScopeOverride?: boolean; + deletedOn?: Date; + remainingRetentionDays?: number; } /** @@ -304,10 +329,48 @@ export interface ContainerProperties { */ export interface ContainerItem { name: string; + deleted?: boolean; + version?: string; properties: ContainerProperties; metadata?: { [propertyName: string]: string }; } +/** + * delimited text configuration + */ +export interface DelimitedTextConfiguration { + /** + * column separator + */ + columnSeparator: string; + /** + * field quote + */ + fieldQuote: string; + /** + * record separator + */ + recordSeparator: string; + /** + * escape char + */ + escapeChar: string; + /** + * has headers + */ + headersPresent: boolean; +} + +/** + * json text configuration + */ +export interface JsonTextConfiguration { + /** + * record separator + */ + recordSeparator: string; +} + /** * An enumeration of containers */ @@ -354,6 +417,25 @@ export interface CorsRule { maxAgeInSeconds: number; } +/** + * Blob info from a Filter Blobs API call + */ +export interface FilterBlobItem { + name: string; + containerName: string; + tagValue: string; +} + +/** + * The result of a Filter Blobs API call + */ +export interface FilterBlobSegment { + serviceEndpoint: string; + where: string; + blobs: FilterBlobItem[]; + continuationToken?: string; +} + /** * Geo-Replication information for the Secondary Storage Service */ @@ -452,6 +534,37 @@ export interface PageList { clearRange?: ClearRange[]; } +/** + * An interface representing QueryFormat. + */ +export interface QueryFormat { + /** + * Possible values include: 'delimited', 'json' + */ + type?: QueryFormatType; + delimitedTextConfiguration?: DelimitedTextConfiguration; + jsonTextConfiguration?: JsonTextConfiguration; +} + +/** + * An interface representing QuerySerialization. + */ +export interface QuerySerialization { + format: QueryFormat; +} + +/** + * the quick query body + */ +export interface QueryRequest { + /** + * a query statement + */ + expression: string; + inputSerialization?: QuerySerialization; + outputSerialization?: QuerySerialization; +} + /** * signed identifier */ @@ -691,7 +804,7 @@ export interface SequenceNumberAccessConditions { /** * Additional parameters for a set of operations, such as: AppendBlob_appendBlock, - * AppendBlob_appendBlockFromUrl. + * AppendBlob_appendBlockFromUrl, AppendBlob_seal. */ export interface AppendPositionAccessConditions { /** @@ -789,9 +902,9 @@ export interface ServiceListContainersSegmentOptionalParams extends coreHttp.Req maxPageSize?: number; /** * Include this parameter to specify that the container's metadata be returned as part of the - * response body. Possible values include: 'metadata' + * response body. */ - include?: ListContainersIncludeType; + include?: ListContainersIncludeType[]; /** * The timeout parameter is expressed in seconds. For more information, see Setting @@ -839,6 +952,46 @@ export interface ServiceSubmitBatchOptionalParams extends coreHttp.RequestOption requestId?: string; } +/** + * Optional Parameters. + */ +export interface ServiceFilterBlobsOptionalParams extends coreHttp.RequestOptionsBase { + /** + * The timeout parameter is expressed in seconds. For more information, see Setting + * Timeouts for Blob Service Operations. + */ + timeoutInSeconds?: number; + /** + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + */ + requestId?: string; + /** + * Filters the results to return only to return only blobs whose tags match the specified + * expression. + */ + where?: string; + /** + * A string value that identifies the portion of the list of containers to be returned with the + * next listing operation. The operation returns the ContinuationToken value within the response + * body if the listing operation did not return all containers remaining to be listed with the + * current page. The ContinuationToken value can be used as the value for the marker parameter in + * a subsequent call to request the next page of list items. The marker value is opaque to the + * client. + */ + marker?: string; + /** + * Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. + * Note that if the listing operation crosses a partition boundary, then the service will return + * a continuation token for retrieving the remainder of the results. For this reason, it is + * possible that the service will return fewer results than specified by maxresults, or than the + * default of 5000. + */ + maxPageSize?: number; +} + /** * Optional Parameters. */ @@ -1011,6 +1164,33 @@ export interface ContainerSetAccessPolicyOptionalParams extends coreHttp.Request modifiedAccessConditions?: ModifiedAccessConditions; } +/** + * Optional Parameters. + */ +export interface ContainerRestoreOptionalParams extends coreHttp.RequestOptionsBase { + /** + * The timeout parameter is expressed in seconds. For more information, see Setting + * Timeouts for Blob Service Operations. + */ + timeoutInSeconds?: number; + /** + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + */ + requestId?: string; + /** + * Optional. Version 2019-12-12 and laster. Specifies the name of the deleted container to + * restore. + */ + deletedContainerName?: string; + /** + * Optional. Version 2019-12-12 and laster. Specifies the version of the deleted container to + * restore. + */ + deletedContainerVersion?: string; +} + /** * Optional Parameters. */ @@ -1469,6 +1649,11 @@ export interface BlobDownloadOptionalParams extends coreHttp.RequestOptionsBase * a Snapshot of a Blob. */ snapshot?: string; + /** + * The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + */ + versionId?: string; /** * The timeout parameter is expressed in seconds. For more information, see Setting @@ -1519,6 +1704,11 @@ export interface BlobGetPropertiesOptionalParams extends coreHttp.RequestOptions * a Snapshot of a Blob. */ snapshot?: string; + /** + * The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + */ + versionId?: string; /** * The timeout parameter is expressed in seconds. For more information, see Setting @@ -1555,6 +1745,11 @@ export interface BlobDeleteMethodOptionalParams extends coreHttp.RequestOptionsB * a Snapshot of a Blob. */ snapshot?: string; + /** + * The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + */ + versionId?: string; /** * The timeout parameter is expressed in seconds. For more information, see Setting @@ -1741,6 +1936,27 @@ export interface BlobUndeleteOptionalParams extends coreHttp.RequestOptionsBase requestId?: string; } +/** + * Optional Parameters. + */ +export interface BlobSetExpiryOptionalParams extends coreHttp.RequestOptionsBase { + /** + * The timeout parameter is expressed in seconds. For more information, see Setting + * Timeouts for Blob Service Operations. + */ + timeoutInSeconds?: number; + /** + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + */ + requestId?: string; + /** + * The time to set the blob to expiry + */ + expiresOn?: string; +} + /** * Optional Parameters. */ @@ -2024,6 +2240,14 @@ export interface BlobStartCopyFromURLOptionalParams extends coreHttp.RequestOpti * analytics logs when storage analytics logging is enabled. */ requestId?: string; + /** + * Optional. Used to set blob tags in various blob operations. + */ + blobTagsString?: string; + /** + * Overrides the sealed state of the destination blob. Service version 2019-12-12 and newer. + */ + sealBlob?: boolean; /** * Additional parameters for the operation */ @@ -2072,6 +2296,14 @@ export interface BlobCopyFromURLOptionalParams extends coreHttp.RequestOptionsBa * Specify the md5 calculated for the range of bytes that must be read from the copy source. */ sourceContentMD5?: Uint8Array; + /** + * Optional. Used to set blob tags in various blob operations. + */ + blobTagsString?: string; + /** + * Overrides the sealed state of the destination blob. Service version 2019-12-12 and newer. + */ + sealBlob?: boolean; /** * Additional parameters for the operation */ @@ -2111,6 +2343,18 @@ export interface BlobAbortCopyFromURLOptionalParams extends coreHttp.RequestOpti * Optional Parameters. */ export interface BlobSetTierOptionalParams extends coreHttp.RequestOptionsBase { + /** + * The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see Creating + * a Snapshot of a Blob. + */ + snapshot?: string; + /** + * The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + */ + versionId?: string; /** * The timeout parameter is expressed in seconds. For more information, see Setting @@ -2133,6 +2377,109 @@ export interface BlobSetTierOptionalParams extends coreHttp.RequestOptionsBase { leaseAccessConditions?: LeaseAccessConditions; } +/** + * Optional Parameters. + */ +export interface BlobQueryOptionalParams extends coreHttp.RequestOptionsBase { + /** + * the query request + */ + queryRequest?: QueryRequest; + /** + * The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see Creating + * a Snapshot of a Blob. + */ + snapshot?: string; + /** + * The timeout parameter is expressed in seconds. For more information, see Setting + * Timeouts for Blob Service Operations. + */ + timeoutInSeconds?: number; + /** + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + */ + requestId?: string; + /** + * Additional parameters for the operation + */ + leaseAccessConditions?: LeaseAccessConditions; + /** + * Additional parameters for the operation + */ + cpkInfo?: CpkInfo; + /** + * Additional parameters for the operation + */ + modifiedAccessConditions?: ModifiedAccessConditions; +} + +/** + * Optional Parameters. + */ +export interface BlobGetTagsOptionalParams extends coreHttp.RequestOptionsBase { + /** + * The timeout parameter is expressed in seconds. For more information, see Setting + * Timeouts for Blob Service Operations. + */ + timeoutInSeconds?: number; + /** + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + */ + requestId?: string; + /** + * The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see Creating + * a Snapshot of a Blob. + */ + snapshot?: string; + /** + * The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + */ + versionId?: string; +} + +/** + * Optional Parameters. + */ +export interface BlobSetTagsOptionalParams extends coreHttp.RequestOptionsBase { + /** + * The timeout parameter is expressed in seconds. For more information, see Setting + * Timeouts for Blob Service Operations. + */ + timeoutInSeconds?: number; + /** + * The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + */ + versionId?: string; + /** + * Specify the transactional md5 for the body, to be validated by the service. + */ + transactionalContentMD5?: Uint8Array; + /** + * Specify the transactional crc64 for the body, to be validated by the service. + */ + transactionalContentCrc64?: Uint8Array; + /** + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + */ + requestId?: string; + /** + * Blob tags + */ + tags?: BlobTags; +} + /** * Optional Parameters. */ @@ -2176,6 +2523,10 @@ export interface PageBlobCreateOptionalParams extends coreHttp.RequestOptionsBas * analytics logs when storage analytics logging is enabled. */ requestId?: string; + /** + * Optional. Used to set blob tags in various blob operations. + */ + blobTagsString?: string; /** * Additional parameters for the operation */ @@ -2549,6 +2900,10 @@ export interface AppendBlobCreateOptionalParams extends coreHttp.RequestOptionsB * analytics logs when storage analytics logging is enabled. */ requestId?: string; + /** + * Optional. Used to set blob tags in various blob operations. + */ + blobTagsString?: string; /** * Additional parameters for the operation */ @@ -2678,7 +3033,7 @@ export interface AppendBlobAppendBlockFromUrlOptionalParams extends coreHttp.Req /** * Optional Parameters. */ -export interface BlockBlobUploadOptionalParams extends coreHttp.RequestOptionsBase { +export interface AppendBlobSealOptionalParams extends coreHttp.RequestOptionsBase { /** * The timeout parameter is expressed in seconds. For more information, see Setting @@ -2686,7 +3041,36 @@ export interface BlockBlobUploadOptionalParams extends coreHttp.RequestOptionsBa */ timeoutInSeconds?: number; /** - * Specify the transactional md5 for the body, to be validated by the service. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + */ + requestId?: string; + /** + * Additional parameters for the operation + */ + leaseAccessConditions?: LeaseAccessConditions; + /** + * Additional parameters for the operation + */ + modifiedAccessConditions?: ModifiedAccessConditions; + /** + * Additional parameters for the operation + */ + appendPositionAccessConditions?: AppendPositionAccessConditions; +} + +/** + * Optional Parameters. + */ +export interface BlockBlobUploadOptionalParams extends coreHttp.RequestOptionsBase { + /** + * The timeout parameter is expressed in seconds. For more information, see Setting + * Timeouts for Blob Service Operations. + */ + timeoutInSeconds?: number; + /** + * Specify the transactional md5 for the body, to be validated by the service. */ transactionalContentMD5?: Uint8Array; /** @@ -2716,6 +3100,10 @@ export interface BlockBlobUploadOptionalParams extends coreHttp.RequestOptionsBa * analytics logs when storage analytics logging is enabled. */ requestId?: string; + /** + * Optional. Used to set blob tags in various blob operations. + */ + blobTagsString?: string; /** * Additional parameters for the operation */ @@ -2867,6 +3255,10 @@ export interface BlockBlobCommitBlockListOptionalParams extends coreHttp.Request * analytics logs when storage analytics logging is enabled. */ requestId?: string; + /** + * Optional. Used to set blob tags in various blob operations. + */ + blobTagsString?: string; /** * Additional parameters for the operation */ @@ -3096,6 +3488,33 @@ export interface ServiceSubmitBatchHeaders { errorCode?: string; } +/** + * Defines headers for FilterBlobs operation. + */ +export interface ServiceFilterBlobsHeaders { + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} + /** * Defines headers for Create operation. */ @@ -3354,6 +3773,33 @@ export interface ContainerSetAccessPolicyHeaders { errorCode?: string; } +/** + * Defines headers for Restore operation. + */ +export interface ContainerRestoreHeaders { + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} + /** * Defines headers for AcquireLease operation. */ @@ -3869,6 +4315,12 @@ export interface BlobDownloadHeaders { */ lastModified?: Date; metadata?: { [propertyName: string]: string }; + /** + * Optional. Only valid when Object Replication is enabled for the storage container and on the + * destination blob of the replication. + */ + objectReplicationPolicyId?: string; + objectReplicationRules?: { [propertyName: string]: string }; /** * The number of bytes present in the response body. */ @@ -3993,6 +4445,12 @@ export interface BlobDownloadHeaders { * for requests made against version 2009-09-19 and above. */ version?: string; + /** + * A DateTime value returned by the service that uniquely identifies the blob. The value of this + * header indicates the blob version, and may be used in subsequent requests to access this + * version of the blob. + */ + versionId?: string; /** * Indicates that the service supports requests for partial blob content. */ @@ -4031,6 +4489,14 @@ export interface BlobDownloadHeaders { * the requested range */ blobContentMD5?: Uint8Array; + /** + * The number of tags associated with the blob + */ + tagCount?: number; + /** + * If this blob has been sealed + */ + isSealed?: boolean; /** * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to * true, then the request returns a crc64 for the range, as long as the range size is less than @@ -4056,6 +4522,12 @@ export interface BlobGetPropertiesHeaders { */ createdOn?: Date; metadata?: { [propertyName: string]: string }; + /** + * Optional. Only valid when Object Replication is enabled for the storage container and on the + * destination blob of the replication. + */ + objectReplicationPolicyId?: string; + objectReplicationRules?: { [propertyName: string]: string }; /** * The blob's type. Possible values include: 'BlockBlob', 'PageBlob', 'AppendBlob' */ @@ -4242,6 +4714,29 @@ export interface BlobGetPropertiesHeaders { * blob was ever set. */ accessTierChangedOn?: Date; + /** + * A DateTime value returned by the service that uniquely identifies the blob. The value of this + * header indicates the blob version, and may be used in subsequent requests to access this + * version of the blob. + */ + versionId?: string; + /** + * The value of this header indicates whether version of this blob is a current version, see also + * x-ms-version-id header. + */ + isCurrentVersion?: boolean; + /** + * The number of tags associated with the blob + */ + tagCount?: number; + /** + * The time this blob will expire. + */ + expiresOn?: Date; + /** + * If this blob has been sealed + */ + isSealed?: boolean; errorCode?: string; } @@ -4430,6 +4925,12 @@ export interface PageBlobCreateHeaders { * for requests made against version 2009-09-19 and above. */ version?: string; + /** + * A DateTime value returned by the service that uniquely identifies the blob. The value of this + * header indicates the blob version, and may be used in subsequent requests to access this + * version of the blob. + */ + versionId?: string; /** * UTC date/time value generated by the service that indicates the time at which the response was * initiated @@ -4489,6 +4990,12 @@ export interface AppendBlobCreateHeaders { * for requests made against version 2009-09-19 and above. */ version?: string; + /** + * A DateTime value returned by the service that uniquely identifies the blob. The value of this + * header indicates the blob version, and may be used in subsequent requests to access this + * version of the blob. + */ + versionId?: string; /** * UTC date/time value generated by the service that indicates the time at which the response was * initiated @@ -4548,6 +5055,12 @@ export interface BlockBlobUploadHeaders { * for requests made against version 2009-09-19 and above. */ version?: string; + /** + * A DateTime value returned by the service that uniquely identifies the blob. The value of this + * header indicates the blob version, and may be used in subsequent requests to access this + * version of the blob. + */ + versionId?: string; /** * UTC date/time value generated by the service that indicates the time at which the response was * initiated @@ -4599,6 +5112,44 @@ export interface BlobUndeleteHeaders { errorCode?: string; } +/** + * Defines headers for SetExpiry operation. + */ +export interface BlobSetExpiryHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated. + */ + date?: Date; + errorCode?: string; +} + /** * Defines headers for SetHTTPHeaders operation. */ @@ -4672,6 +5223,12 @@ export interface BlobSetMetadataHeaders { * for requests made against version 2009-09-19 and above. */ version?: string; + /** + * A DateTime value returned by the service that uniquely identifies the blob. The value of this + * header indicates the blob version, and may be used in subsequent requests to access this + * version of the blob. + */ + versionId?: string; /** * UTC date/time value generated by the service that indicates the time at which the response was * initiated @@ -4937,6 +5494,12 @@ export interface BlobCreateSnapshotHeaders { * for requests made against version 2009-09-19 and above. */ version?: string; + /** + * A DateTime value returned by the service that uniquely identifies the blob. The value of this + * header indicates the blob version, and may be used in subsequent requests to access this + * version of the blob. + */ + versionId?: string; /** * UTC date/time value generated by the service that indicates the time at which the response was * initiated @@ -4981,6 +5544,12 @@ export interface BlobStartCopyFromURLHeaders { * for requests made against version 2009-09-19 and above. */ version?: string; + /** + * A DateTime value returned by the service that uniquely identifies the blob. The value of this + * header indicates the blob version, and may be used in subsequent requests to access this + * version of the blob. + */ + versionId?: string; /** * UTC date/time value generated by the service that indicates the time at which the response was * initiated @@ -5029,6 +5598,12 @@ export interface BlobCopyFromURLHeaders { * for requests made against version 2009-09-19 and above. */ version?: string; + /** + * A DateTime value returned by the service that uniquely identifies the blob. The value of this + * header indicates the blob version, and may be used in subsequent requests to access this + * version of the blob. + */ + versionId?: string; /** * UTC date/time value generated by the service that indicates the time at which the response was * initiated @@ -5292,6 +5867,12 @@ export interface BlockBlobCommitBlockListHeaders { * for requests made against version 2009-09-19 and above. */ version?: string; + /** + * A DateTime value returned by the service that uniquely identifies the blob. The value of this + * header indicates the blob version, and may be used in subsequent requests to access this + * version of the blob. + */ + versionId?: string; /** * UTC date/time value generated by the service that indicates the time at which the response was * initiated @@ -5912,77 +6493,356 @@ export interface AppendBlobAppendBlockFromUrlHeaders { } /** - * Defines values for PublicAccessType. - * Possible values include: 'container', 'blob' - * @readonly - * @enum {string} - */ -export type PublicAccessType = 'container' | 'blob'; - -/** - * Defines values for CopyStatusType. - * Possible values include: 'pending', 'success', 'aborted', 'failed' - * @readonly - * @enum {string} - */ -export type CopyStatusType = 'pending' | 'success' | 'aborted' | 'failed'; - -/** - * Defines values for LeaseDurationType. - * Possible values include: 'infinite', 'fixed' - * @readonly - * @enum {string} - */ -export type LeaseDurationType = 'infinite' | 'fixed'; - -/** - * Defines values for LeaseStateType. - * Possible values include: 'available', 'leased', 'expired', 'breaking', 'broken' - * @readonly - * @enum {string} - */ -export type LeaseStateType = 'available' | 'leased' | 'expired' | 'breaking' | 'broken'; - -/** - * Defines values for LeaseStatusType. - * Possible values include: 'locked', 'unlocked' - * @readonly - * @enum {string} - */ -export type LeaseStatusType = 'locked' | 'unlocked'; - -/** - * Defines values for AccessTier. - * Possible values include: 'P4', 'P6', 'P10', 'P15', 'P20', 'P30', 'P40', 'P50', 'P60', 'P70', - * 'P80', 'Hot', 'Cool', 'Archive' - * @readonly - * @enum {string} - */ -export type AccessTier = 'P4' | 'P6' | 'P10' | 'P15' | 'P20' | 'P30' | 'P40' | 'P50' | 'P60' | 'P70' | 'P80' | 'Hot' | 'Cool' | 'Archive'; - -/** - * Defines values for ArchiveStatus. - * Possible values include: 'rehydrate-pending-to-hot', 'rehydrate-pending-to-cool' - * @readonly - * @enum {string} + * Defines headers for Seal operation. */ -export type ArchiveStatus = 'rehydrate-pending-to-hot' | 'rehydrate-pending-to-cool'; +export interface AppendBlobSealHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * If this blob has been sealed + */ + isSealed?: boolean; + errorCode?: string; +} /** - * Defines values for BlobType. - * Possible values include: 'BlockBlob', 'PageBlob', 'AppendBlob' - * @readonly - * @enum {string} + * Defines headers for Query operation. */ -export type BlobType = 'BlockBlob' | 'PageBlob' | 'AppendBlob'; - -/** - * Defines values for StorageErrorCode. - * Possible values include: 'AccountAlreadyExists', 'AccountBeingCreated', 'AccountIsDisabled', - * 'AuthenticationFailed', 'AuthorizationFailure', 'ConditionHeadersNotSupported', - * 'ConditionNotMet', 'EmptyMetadataKey', 'InsufficientAccountPermissions', 'InternalError', - * 'InvalidAuthenticationInfo', 'InvalidHeaderValue', 'InvalidHttpVerb', 'InvalidInput', - * 'InvalidMd5', 'InvalidMetadata', 'InvalidQueryParameterValue', 'InvalidRange', +export interface BlobQueryHeaders { + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + metadata?: { [propertyName: string]: string }; + /** + * The number of bytes present in the response body. + */ + contentLength?: number; + /** + * The media type of the body of the response. For Download Blob this is + * 'application/octet-stream' + */ + contentType?: string; + /** + * Indicates the range of bytes returned in the event that the client requested a subset of the + * blob by setting the 'Range' request header. + */ + contentRange?: string; + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * If the blob has an MD5 hash and this operation is to read the full blob, this response header + * is returned so that the client can check for message content integrity. + */ + contentMD5?: Uint8Array; + /** + * This header returns the value that was specified for the Content-Encoding request header + */ + contentEncoding?: string; + /** + * This header is returned if it was previously specified for the blob. + */ + cacheControl?: string; + /** + * This header returns the value that was specified for the 'x-ms-blob-content-disposition' + * header. The Content-Disposition response header field conveys additional information about how + * to process the response payload, and also can be used to attach additional metadata. For + * example, if set to attachment, it indicates that the user-agent should not display the + * response, but instead show a Save As dialog with a filename other than the blob name + * specified. + */ + contentDisposition?: string; + /** + * This header returns the value that was specified for the Content-Language request header. + */ + contentLanguage?: string; + /** + * The current sequence number for a page blob. This header is not returned for block blobs or + * append blobs + */ + blobSequenceNumber?: number; + /** + * The blob's type. Possible values include: 'BlockBlob', 'PageBlob', 'AppendBlob' + */ + blobType?: BlobType; + /** + * Conclusion time of the last attempted Copy Blob operation where this blob was the destination + * blob. This value can specify the time of a completed, aborted, or failed copy attempt. This + * header does not appear if a copy is pending, if this blob has never been the destination in a + * Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation + * using Set Blob Properties, Put Blob, or Put Block List. + */ + copyCompletionTime?: Date; + /** + * Only appears when x-ms-copy-status is failed or pending. Describes the cause of the last fatal + * or non-fatal copy operation failure. This header does not appear if this blob has never been + * the destination in a Copy Blob operation, or if this blob has been modified after a concluded + * Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List + */ + copyStatusDescription?: string; + /** + * String identifier for this copy operation. Use with Get Blob Properties to check the status of + * this copy operation, or pass to Abort Copy Blob to abort a pending copy. + */ + copyId?: string; + /** + * Contains the number of bytes copied and the total bytes in the source in the last attempted + * Copy Blob operation where this blob was the destination blob. Can show between 0 and + * Content-Length bytes copied. This header does not appear if this blob has never been the + * destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy + * Blob operation using Set Blob Properties, Put Blob, or Put Block List + */ + copyProgress?: string; + /** + * URL up to 2 KB in length that specifies the source blob or file used in the last attempted + * Copy Blob operation where this blob was the destination blob. This header does not appear if + * this blob has never been the destination in a Copy Blob operation, or if this blob has been + * modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put + * Block List. + */ + copySource?: string; + /** + * State of the copy operation identified by x-ms-copy-id. Possible values include: 'pending', + * 'success', 'aborted', 'failed' + */ + copyStatus?: CopyStatusType; + /** + * When a blob is leased, specifies whether the lease is of infinite or fixed duration. Possible + * values include: 'infinite', 'fixed' + */ + leaseDuration?: LeaseDurationType; + /** + * Lease state of the blob. Possible values include: 'available', 'leased', 'expired', + * 'breaking', 'broken' + */ + leaseState?: LeaseStateType; + /** + * The current lease status of the blob. Possible values include: 'locked', 'unlocked' + */ + leaseStatus?: LeaseStatusType; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * Indicates that the service supports requests for partial blob content. + */ + acceptRanges?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * The number of committed blocks present in the blob. This header is returned only for append + * blobs. + */ + blobCommittedBlockCount?: number; + /** + * The value of this header is set to true if the blob data and application metadata are + * completely encrypted using the specified algorithm. Otherwise, the value is set to false (when + * the blob is unencrypted, or if only parts of the blob/application metadata are encrypted). + */ + isServerEncrypted?: boolean; + /** + * The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned + * when the blob was encrypted with a customer-provided key. + */ + encryptionKeySha256?: string; + /** + * Returns the name of the encryption scope used to encrypt the blob contents and application + * metadata. Note that the absence of this header implies use of the default account encryption + * scope. + */ + encryptionScope?: string; + /** + * If the blob has a MD5 hash, and if request contains range header (Range or x-ms-range), this + * response header is returned with the value of the whole blob's MD5 value. This value may or + * may not be equal to the value returned in Content-MD5 header, with the latter calculated from + * the requested range + */ + blobContentMD5?: Uint8Array; + /** + * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to + * true, then the request returns a crc64 for the range, as long as the range size is less than + * or equal to 4 MB. If both x-ms-range-get-content-crc64 and x-ms-range-get-content-md5 is + * specified in the same request, it will fail with 400(Bad Request) + */ + contentCrc64?: Uint8Array; + errorCode?: string; +} + +/** + * Defines headers for GetTags operation. + */ +export interface BlobGetTagsHeaders { + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} + +/** + * Defines headers for SetTags operation. + */ +export interface BlobSetTagsHeaders { + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} + +/** + * Defines values for PublicAccessType. + * Possible values include: 'container', 'blob' + * @readonly + * @enum {string} + */ +export type PublicAccessType = 'container' | 'blob'; + +/** + * Defines values for CopyStatusType. + * Possible values include: 'pending', 'success', 'aborted', 'failed' + * @readonly + * @enum {string} + */ +export type CopyStatusType = 'pending' | 'success' | 'aborted' | 'failed'; + +/** + * Defines values for LeaseDurationType. + * Possible values include: 'infinite', 'fixed' + * @readonly + * @enum {string} + */ +export type LeaseDurationType = 'infinite' | 'fixed'; + +/** + * Defines values for LeaseStateType. + * Possible values include: 'available', 'leased', 'expired', 'breaking', 'broken' + * @readonly + * @enum {string} + */ +export type LeaseStateType = 'available' | 'leased' | 'expired' | 'breaking' | 'broken'; + +/** + * Defines values for LeaseStatusType. + * Possible values include: 'locked', 'unlocked' + * @readonly + * @enum {string} + */ +export type LeaseStatusType = 'locked' | 'unlocked'; + +/** + * Defines values for AccessTier. + * Possible values include: 'P4', 'P6', 'P10', 'P15', 'P20', 'P30', 'P40', 'P50', 'P60', 'P70', + * 'P80', 'Hot', 'Cool', 'Archive' + * @readonly + * @enum {string} + */ +export type AccessTier = 'P4' | 'P6' | 'P10' | 'P15' | 'P20' | 'P30' | 'P40' | 'P50' | 'P60' | 'P70' | 'P80' | 'Hot' | 'Cool' | 'Archive'; + +/** + * Defines values for ArchiveStatus. + * Possible values include: 'rehydrate-pending-to-hot', 'rehydrate-pending-to-cool' + * @readonly + * @enum {string} + */ +export type ArchiveStatus = 'rehydrate-pending-to-hot' | 'rehydrate-pending-to-cool'; + +/** + * Defines values for BlobType. + * Possible values include: 'BlockBlob', 'PageBlob', 'AppendBlob' + * @readonly + * @enum {string} + */ +export type BlobType = 'BlockBlob' | 'PageBlob' | 'AppendBlob'; + +/** + * Defines values for StorageErrorCode. + * Possible values include: 'AccountAlreadyExists', 'AccountBeingCreated', 'AccountIsDisabled', + * 'AuthenticationFailed', 'AuthorizationFailure', 'ConditionHeadersNotSupported', + * 'ConditionNotMet', 'EmptyMetadataKey', 'InsufficientAccountPermissions', 'InternalError', + * 'InvalidAuthenticationInfo', 'InvalidHeaderValue', 'InvalidHttpVerb', 'InvalidInput', + * 'InvalidMd5', 'InvalidMetadata', 'InvalidQueryParameterValue', 'InvalidRange', * 'InvalidResourceName', 'InvalidUri', 'InvalidXmlDocument', 'InvalidXmlNodeValue', 'Md5Mismatch', * 'MetadataTooLarge', 'MissingContentLengthHeader', 'MissingRequiredQueryParameter', * 'MissingRequiredHeader', 'MissingRequiredXmlNode', 'MultipleConditionHeadersNotSupported', @@ -6027,6 +6887,14 @@ export type StorageErrorCode = 'AccountAlreadyExists' | 'AccountBeingCreated' | */ export type GeoReplicationStatusType = 'live' | 'bootstrap' | 'unavailable'; +/** + * Defines values for QueryFormatType. + * Possible values include: 'delimited', 'json' + * @readonly + * @enum {string} + */ +export type QueryFormatType = 'delimited' | 'json'; + /** * Defines values for RehydratePriority. * Possible values include: 'High', 'Standard' @@ -6035,6 +6903,14 @@ export type GeoReplicationStatusType = 'live' | 'bootstrap' | 'unavailable'; */ export type RehydratePriority = 'High' | 'Standard'; +/** + * Defines values for BlobExpiryOptions. + * Possible values include: 'NeverExpire', 'RelativeToCreation', 'RelativeToNow', 'Absolute' + * @readonly + * @enum {string} + */ +export type BlobExpiryOptions = 'NeverExpire' | 'RelativeToCreation' | 'RelativeToNow' | 'Absolute'; + /** * Defines values for BlockListType. * Possible values include: 'committed', 'uncommitted', 'all' @@ -6061,19 +6937,20 @@ export type EncryptionAlgorithmType = 'AES256'; /** * Defines values for ListBlobsIncludeItem. - * Possible values include: 'copy', 'deleted', 'metadata', 'snapshots', 'uncommittedblobs' + * Possible values include: 'copy', 'deleted', 'metadata', 'snapshots', 'uncommittedblobs', + * 'versions', 'tags' * @readonly * @enum {string} */ -export type ListBlobsIncludeItem = 'copy' | 'deleted' | 'metadata' | 'snapshots' | 'uncommittedblobs'; +export type ListBlobsIncludeItem = 'copy' | 'deleted' | 'metadata' | 'snapshots' | 'uncommittedblobs' | 'versions' | 'tags'; /** * Defines values for ListContainersIncludeType. - * Possible values include: 'metadata' + * Possible values include: 'metadata', 'deleted' * @readonly * @enum {string} */ -export type ListContainersIncludeType = 'metadata'; +export type ListContainersIncludeType = 'metadata' | 'deleted'; /** * Defines values for PathRenameMode. @@ -6277,6 +7154,31 @@ export type ServiceSubmitBatchResponse = ServiceSubmitBatchHeaders & { }; }; +/** + * Contains response data for the filterBlobs operation. + */ +export type ServiceFilterBlobsResponse = FilterBlobSegment & ServiceFilterBlobsHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ServiceFilterBlobsHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: FilterBlobSegment; + }; +}; + /** * Contains response data for the create operation. */ @@ -6377,6 +7279,21 @@ export type ContainerSetAccessPolicyResponse = ContainerSetAccessPolicyHeaders & }; }; +/** + * Contains response data for the restore operation. + */ +export type ContainerRestoreResponse = ContainerRestoreHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ContainerRestoreHeaders; + }; +}; + /** * Contains response data for the acquireLease operation. */ @@ -6713,6 +7630,21 @@ export type BlobUndeleteResponse = BlobUndeleteHeaders & { }; }; +/** + * Contains response data for the setExpiry operation. + */ +export type BlobSetExpiryResponse = BlobSetExpiryHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlobSetExpiryHeaders; + }; +}; + /** * Contains response data for the setHTTPHeaders operation. */ @@ -6908,6 +7840,77 @@ export type BlobGetAccountInfoResponse = BlobGetAccountInfoHeaders & { }; }; +/** + * Contains response data for the query operation. + */ +export type BlobQueryResponse = BlobQueryHeaders & { + /** + * BROWSER ONLY + * + * The response body as a browser Blob. + * Always undefined in node.js. + */ + blobBody?: Promise; + + /** + * NODEJS ONLY + * + * The response body as a node.js Readable stream. + * Always undefined in the browser. + */ + readableStreamBody?: NodeJS.ReadableStream; + + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlobQueryHeaders; + }; +}; + +/** + * Contains response data for the getTags operation. + */ +export type BlobGetTagsResponse = BlobTags & BlobGetTagsHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlobGetTagsHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BlobTags; + }; +}; + +/** + * Contains response data for the setTags operation. + */ +export type BlobSetTagsResponse = BlobSetTagsHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlobSetTagsHeaders; + }; +}; + /** * Contains response data for the create operation. */ @@ -7108,6 +8111,21 @@ export type AppendBlobAppendBlockFromUrlResponse = AppendBlobAppendBlockFromUrlH }; }; +/** + * Contains response data for the seal operation. + */ +export type AppendBlobSealResponse = AppendBlobSealHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: AppendBlobSealHeaders; + }; +}; + /** * Contains response data for the upload operation. */ diff --git a/sdk/storage/storage-blob/src/generated/src/models/mappers.ts b/sdk/storage/storage-blob/src/generated/src/models/mappers.ts index 228e3ed8af10..095fc8e09fa5 100644 --- a/sdk/storage/storage-blob/src/generated/src/models/mappers.ts +++ b/sdk/storage/storage-blob/src/generated/src/models/mappers.ts @@ -191,12 +191,12 @@ export const AccessPolicy: coreHttp.CompositeMapper = { } }; -export const BlobProperties: coreHttp.CompositeMapper = { +export const BlobPropertiesInternal: coreHttp.CompositeMapper = { xmlName: "Properties", - serializedName: "BlobProperties", + serializedName: "BlobPropertiesInternal", type: { name: "Composite", - className: "BlobProperties", + className: "BlobPropertiesInternal", modelProperties: { createdOn: { xmlName: "Creation-Time", @@ -449,17 +449,92 @@ export const BlobProperties: coreHttp.CompositeMapper = { type: { name: "DateTimeRfc1123" } + }, + tagCount: { + xmlName: "TagCount", + serializedName: "TagCount", + type: { + name: "Number" + } + }, + expiresOn: { + xmlName: "Expiry-Time", + serializedName: "Expiry-Time", + type: { + name: "DateTimeRfc1123" + } + }, + isSealed: { + xmlName: "IsSealed", + serializedName: "IsSealed", + type: { + name: "Boolean" + } + } + } + } +}; + +export const BlobTag: coreHttp.CompositeMapper = { + xmlName: "Tag", + serializedName: "BlobTag", + type: { + name: "Composite", + className: "BlobTag", + modelProperties: { + key: { + xmlName: "Key", + required: true, + serializedName: "Key", + type: { + name: "String" + } + }, + value: { + xmlName: "Value", + required: true, + serializedName: "Value", + type: { + name: "String" + } + } + } + } +}; + +export const BlobTags: coreHttp.CompositeMapper = { + xmlName: "Tags", + serializedName: "BlobTags", + type: { + name: "Composite", + className: "BlobTags", + modelProperties: { + blobTagSet: { + xmlIsWrapped: true, + xmlName: "TagSet", + xmlElementName: "Tag", + required: true, + serializedName: "BlobTagSet", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BlobTag" + } + } + } } } } }; -export const BlobItem: coreHttp.CompositeMapper = { +export const BlobItemInternal: coreHttp.CompositeMapper = { xmlName: "Blob", - serializedName: "BlobItem", + serializedName: "BlobItemInternal", type: { name: "Composite", - className: "BlobItem", + className: "BlobItemInternal", modelProperties: { name: { xmlName: "Name", @@ -485,13 +560,27 @@ export const BlobItem: coreHttp.CompositeMapper = { name: "String" } }, + versionId: { + xmlName: "VersionId", + serializedName: "VersionId", + type: { + name: "String" + } + }, + isCurrentVersion: { + xmlName: "IsCurrentVersion", + serializedName: "IsCurrentVersion", + type: { + name: "Boolean" + } + }, properties: { xmlName: "Properties", required: true, serializedName: "Properties", type: { name: "Composite", - className: "BlobProperties" + className: "BlobPropertiesInternal" } }, metadata: { @@ -505,6 +594,33 @@ export const BlobItem: coreHttp.CompositeMapper = { } } } + }, + blobTags: { + xmlName: "Tags", + serializedName: "BlobTags", + type: { + name: "Composite", + className: "BlobTags" + } + }, + objectReplicationPolicyId: { + xmlName: "ObjectReplicationPolicyId", + serializedName: "ObjectReplicationPolicyId", + type: { + name: "String" + } + }, + objectReplicationRules: { + xmlName: "BlobObjectReplicationRules", + serializedName: "ObjectReplicationRules", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } } } } @@ -527,7 +643,7 @@ export const BlobFlatListSegment: coreHttp.CompositeMapper = { element: { type: { name: "Composite", - className: "BlobItem" + className: "BlobItemInternal" } } } @@ -651,7 +767,7 @@ export const BlobHierarchyListSegment: coreHttp.CompositeMapper = { element: { type: { name: "Composite", - className: "BlobItem" + className: "BlobItemInternal" } } } @@ -941,6 +1057,20 @@ export const ContainerProperties: coreHttp.CompositeMapper = { type: { name: "Boolean" } + }, + deletedOn: { + xmlName: "DeletedTime", + serializedName: "DeletedTime", + type: { + name: "DateTimeRfc1123" + } + }, + remainingRetentionDays: { + xmlName: "RemainingRetentionDays", + serializedName: "RemainingRetentionDays", + type: { + name: "Number" + } } } } @@ -961,6 +1091,20 @@ export const ContainerItem: coreHttp.CompositeMapper = { name: "String" } }, + deleted: { + xmlName: "Deleted", + serializedName: "Deleted", + type: { + name: "Boolean" + } + }, + version: { + xmlName: "Version", + serializedName: "Version", + type: { + name: "String" + } + }, properties: { xmlName: "Properties", required: true, @@ -986,6 +1130,74 @@ export const ContainerItem: coreHttp.CompositeMapper = { } }; +export const DelimitedTextConfiguration: coreHttp.CompositeMapper = { + serializedName: "DelimitedTextConfiguration", + type: { + name: "Composite", + className: "DelimitedTextConfiguration", + modelProperties: { + columnSeparator: { + xmlName: "ColumnSeparator", + required: true, + serializedName: "ColumnSeparator", + type: { + name: "String" + } + }, + fieldQuote: { + xmlName: "FieldQuote", + required: true, + serializedName: "FieldQuote", + type: { + name: "String" + } + }, + recordSeparator: { + xmlName: "RecordSeparator", + required: true, + serializedName: "RecordSeparator", + type: { + name: "String" + } + }, + escapeChar: { + xmlName: "EscapeChar", + required: true, + serializedName: "EscapeChar", + type: { + name: "String" + } + }, + headersPresent: { + xmlName: "HasHeaders", + required: true, + serializedName: "HeadersPresent", + type: { + name: "Boolean" + } + } + } + } +}; + +export const JsonTextConfiguration: coreHttp.CompositeMapper = { + serializedName: "JsonTextConfiguration", + type: { + name: "Composite", + className: "JsonTextConfiguration", + modelProperties: { + recordSeparator: { + xmlName: "RecordSeparator", + required: true, + serializedName: "RecordSeparator", + type: { + name: "String" + } + } + } + } +}; + export const ListContainersSegmentResponse: coreHttp.CompositeMapper = { xmlName: "EnumerationResults", serializedName: "ListContainersSegmentResponse", @@ -1103,6 +1315,92 @@ export const CorsRule: coreHttp.CompositeMapper = { } }; +export const FilterBlobItem: coreHttp.CompositeMapper = { + xmlName: "Blob", + serializedName: "FilterBlobItem", + type: { + name: "Composite", + className: "FilterBlobItem", + modelProperties: { + name: { + xmlName: "Name", + required: true, + serializedName: "Name", + type: { + name: "String" + } + }, + containerName: { + xmlName: "ContainerName", + required: true, + serializedName: "ContainerName", + type: { + name: "String" + } + }, + tagValue: { + xmlName: "TagValue", + required: true, + serializedName: "TagValue", + type: { + name: "String" + } + } + } + } +}; + +export const FilterBlobSegment: coreHttp.CompositeMapper = { + xmlName: "EnumerationResults", + serializedName: "FilterBlobSegment", + type: { + name: "Composite", + className: "FilterBlobSegment", + modelProperties: { + serviceEndpoint: { + xmlIsAttribute: true, + xmlName: "ServiceEndpoint", + required: true, + serializedName: "ServiceEndpoint", + type: { + name: "String" + } + }, + where: { + xmlName: "Where", + required: true, + serializedName: "Where", + type: { + name: "String" + } + }, + blobs: { + xmlIsWrapped: true, + xmlName: "Blobs", + xmlElementName: "Blob", + required: true, + serializedName: "Blobs", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FilterBlobItem" + } + } + } + }, + continuationToken: { + xmlName: "NextMarker", + serializedName: "NextMarker", + type: { + name: "String" + } + } + } + } +}; + export const GeoReplication: coreHttp.CompositeMapper = { serializedName: "GeoReplication", type: { @@ -1338,55 +1636,155 @@ export const PageList: coreHttp.CompositeMapper = { } }; -export const SignedIdentifier: coreHttp.CompositeMapper = { - serializedName: "SignedIdentifier", +export const QueryFormat: coreHttp.CompositeMapper = { + serializedName: "QueryFormat", type: { name: "Composite", - className: "SignedIdentifier", + className: "QueryFormat", modelProperties: { - id: { - xmlName: "Id", - required: true, - serializedName: "Id", + type: { + xmlName: "Type", + serializedName: "Type", type: { - name: "String" + name: "Enum", + allowedValues: [ + "delimited", + "json" + ] } }, - accessPolicy: { - xmlName: "AccessPolicy", - required: true, - serializedName: "AccessPolicy", + delimitedTextConfiguration: { + xmlName: "DelimitedTextConfiguration", + serializedName: "DelimitedTextConfiguration", type: { name: "Composite", - className: "AccessPolicy" + className: "DelimitedTextConfiguration" + } + }, + jsonTextConfiguration: { + xmlName: "JsonTextConfiguration", + serializedName: "JsonTextConfiguration", + type: { + name: "Composite", + className: "JsonTextConfiguration" } } } } }; -export const StaticWebsite: coreHttp.CompositeMapper = { - serializedName: "StaticWebsite", +export const QuerySerialization: coreHttp.CompositeMapper = { + serializedName: "QuerySerialization", type: { name: "Composite", - className: "StaticWebsite", + className: "QuerySerialization", modelProperties: { - enabled: { - xmlName: "Enabled", + format: { + xmlName: "Format", required: true, - serializedName: "Enabled", - type: { - name: "Boolean" - } - }, - indexDocument: { - xmlName: "IndexDocument", - serializedName: "IndexDocument", + serializedName: "Format", type: { - name: "String" + name: "Composite", + className: "QueryFormat" } - }, - errorDocument404Path: { + } + } + } +}; + +export const QueryRequest: coreHttp.CompositeMapper = { + serializedName: "QueryRequest", + type: { + name: "Composite", + className: "QueryRequest", + modelProperties: { + queryType: { + xmlName: "QueryType", + required: true, + isConstant: true, + serializedName: "QueryType", + defaultValue: 'SQL', + type: { + name: "String" + } + }, + expression: { + xmlName: "Expression", + required: true, + serializedName: "Expression", + type: { + name: "String" + } + }, + inputSerialization: { + xmlName: "InputSerialization", + serializedName: "InputSerialization", + type: { + name: "Composite", + className: "QuerySerialization" + } + }, + outputSerialization: { + xmlName: "OutputSerialization", + serializedName: "OutputSerialization", + type: { + name: "Composite", + className: "QuerySerialization" + } + } + } + } +}; + +export const SignedIdentifier: coreHttp.CompositeMapper = { + serializedName: "SignedIdentifier", + type: { + name: "Composite", + className: "SignedIdentifier", + modelProperties: { + id: { + xmlName: "Id", + required: true, + serializedName: "Id", + type: { + name: "String" + } + }, + accessPolicy: { + xmlName: "AccessPolicy", + required: true, + serializedName: "AccessPolicy", + type: { + name: "Composite", + className: "AccessPolicy" + } + } + } + } +}; + +export const StaticWebsite: coreHttp.CompositeMapper = { + serializedName: "StaticWebsite", + type: { + name: "Composite", + className: "StaticWebsite", + modelProperties: { + enabled: { + xmlName: "Enabled", + required: true, + serializedName: "Enabled", + type: { + name: "Boolean" + } + }, + indexDocument: { + xmlName: "IndexDocument", + serializedName: "IndexDocument", + type: { + name: "String" + } + }, + errorDocument404Path: { xmlName: "ErrorDocument404Path", serializedName: "ErrorDocument404Path", type: { @@ -2048,6 +2446,46 @@ export const ServiceSubmitBatchHeaders: coreHttp.CompositeMapper = { } }; +export const ServiceFilterBlobsHeaders: coreHttp.CompositeMapper = { + serializedName: "service-filterblobs-headers", + type: { + name: "Composite", + className: "ServiceFilterBlobsHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; + export const ContainerCreateHeaders: coreHttp.CompositeMapper = { serializedName: "container-create-headers", type: { @@ -2429,6 +2867,46 @@ export const ContainerSetAccessPolicyHeaders: coreHttp.CompositeMapper = { } }; +export const ContainerRestoreHeaders: coreHttp.CompositeMapper = { + serializedName: "container-restore-headers", + type: { + name: "Composite", + className: "ContainerRestoreHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; + export const ContainerAcquireLeaseHeaders: coreHttp.CompositeMapper = { serializedName: "container-acquirelease-headers", type: { @@ -3159,6 +3637,24 @@ export const BlobDownloadHeaders: coreHttp.CompositeMapper = { }, headerCollectionPrefix: "x-ms-meta-" }, + objectReplicationPolicyId: { + serializedName: "x-ms-or-policy-id", + type: { + name: "String" + } + }, + objectReplicationRules: { + serializedName: "x-ms-or", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + }, + headerCollectionPrefix: "x-ms-or-" + }, contentLength: { serializedName: "content-length", type: { @@ -3323,6 +3819,12 @@ export const BlobDownloadHeaders: coreHttp.CompositeMapper = { name: "String" } }, + versionId: { + serializedName: "x-ms-version-id", + type: { + name: "String" + } + }, acceptRanges: { serializedName: "accept-ranges", type: { @@ -3365,6 +3867,18 @@ export const BlobDownloadHeaders: coreHttp.CompositeMapper = { name: "ByteArray" } }, + tagCount: { + serializedName: "x-ms-tag-count", + type: { + name: "Number" + } + }, + isSealed: { + serializedName: "x-ms-blob-sealed", + type: { + name: "Boolean" + } + }, contentCrc64: { serializedName: "x-ms-content-crc64", type: { @@ -3411,6 +3925,24 @@ export const BlobGetPropertiesHeaders: coreHttp.CompositeMapper = { }, headerCollectionPrefix: "x-ms-meta-" }, + objectReplicationPolicyId: { + serializedName: "x-ms-or-policy-id", + type: { + name: "String" + } + }, + objectReplicationRules: { + serializedName: "x-ms-or", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + }, + headerCollectionPrefix: "x-ms-or-" + }, blobType: { serializedName: "x-ms-blob-type", type: { @@ -3641,6 +4173,36 @@ export const BlobGetPropertiesHeaders: coreHttp.CompositeMapper = { name: "DateTimeRfc1123" } }, + versionId: { + serializedName: "x-ms-version-id", + type: { + name: "String" + } + }, + isCurrentVersion: { + serializedName: "x-ms-is-current-version", + type: { + name: "Boolean" + } + }, + tagCount: { + serializedName: "x-ms-tag-count", + type: { + name: "Number" + } + }, + expiresOn: { + serializedName: "x-ms-expiry-time", + type: { + name: "DateTimeRfc1123" + } + }, + isSealed: { + serializedName: "x-ms-blob-sealed", + type: { + name: "Boolean" + } + }, errorCode: { serializedName: "x-ms-error-code", type: { @@ -3901,6 +4463,12 @@ export const PageBlobCreateHeaders: coreHttp.CompositeMapper = { name: "String" } }, + versionId: { + serializedName: "x-ms-version-id", + type: { + name: "String" + } + }, date: { serializedName: "date", type: { @@ -3977,6 +4545,12 @@ export const AppendBlobCreateHeaders: coreHttp.CompositeMapper = { name: "String" } }, + versionId: { + serializedName: "x-ms-version-id", + type: { + name: "String" + } + }, date: { serializedName: "date", type: { @@ -4053,6 +4627,12 @@ export const BlockBlobUploadHeaders: coreHttp.CompositeMapper = { name: "String" } }, + versionId: { + serializedName: "x-ms-version-id", + type: { + name: "String" + } + }, date: { serializedName: "date", type: { @@ -4127,11 +4707,11 @@ export const BlobUndeleteHeaders: coreHttp.CompositeMapper = { } }; -export const BlobSetHTTPHeadersHeaders: coreHttp.CompositeMapper = { - serializedName: "blob-sethttpheaders-headers", +export const BlobSetExpiryHeaders: coreHttp.CompositeMapper = { + serializedName: "blob-setexpiry-headers", type: { name: "Composite", - className: "BlobSetHTTPHeadersHeaders", + className: "BlobSetExpiryHeaders", modelProperties: { etag: { serializedName: "etag", @@ -4145,12 +4725,6 @@ export const BlobSetHTTPHeadersHeaders: coreHttp.CompositeMapper = { name: "DateTimeRfc1123" } }, - blobSequenceNumber: { - serializedName: "x-ms-blob-sequence-number", - type: { - name: "Number" - } - }, clientRequestId: { serializedName: "x-ms-client-request-id", type: { @@ -4185,11 +4759,11 @@ export const BlobSetHTTPHeadersHeaders: coreHttp.CompositeMapper = { } }; -export const BlobSetMetadataHeaders: coreHttp.CompositeMapper = { - serializedName: "blob-setmetadata-headers", +export const BlobSetHTTPHeadersHeaders: coreHttp.CompositeMapper = { + serializedName: "blob-sethttpheaders-headers", type: { name: "Composite", - className: "BlobSetMetadataHeaders", + className: "BlobSetHTTPHeadersHeaders", modelProperties: { etag: { serializedName: "etag", @@ -4203,6 +4777,12 @@ export const BlobSetMetadataHeaders: coreHttp.CompositeMapper = { name: "DateTimeRfc1123" } }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + type: { + name: "Number" + } + }, clientRequestId: { serializedName: "x-ms-client-request-id", type: { @@ -4227,18 +4807,76 @@ export const BlobSetMetadataHeaders: coreHttp.CompositeMapper = { name: "DateTimeRfc1123" } }, - isServerEncrypted: { - serializedName: "x-ms-request-server-encrypted", - type: { - name: "Boolean" - } - }, - encryptionKeySha256: { - serializedName: "x-ms-encryption-key-sha256", + errorCode: { + serializedName: "x-ms-error-code", type: { name: "String" } - }, + } + } + } +}; + +export const BlobSetMetadataHeaders: coreHttp.CompositeMapper = { + serializedName: "blob-setmetadata-headers", + type: { + name: "Composite", + className: "BlobSetMetadataHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + versionId: { + serializedName: "x-ms-version-id", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + type: { + name: "Boolean" + } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + type: { + name: "String" + } + }, encryptionScope: { serializedName: "x-ms-encryption-scope", type: { @@ -4581,6 +5219,12 @@ export const BlobCreateSnapshotHeaders: coreHttp.CompositeMapper = { name: "String" } }, + versionId: { + serializedName: "x-ms-version-id", + type: { + name: "String" + } + }, date: { serializedName: "date", type: { @@ -4639,6 +5283,12 @@ export const BlobStartCopyFromURLHeaders: coreHttp.CompositeMapper = { name: "String" } }, + versionId: { + serializedName: "x-ms-version-id", + type: { + name: "String" + } + }, date: { serializedName: "date", type: { @@ -4709,6 +5359,12 @@ export const BlobCopyFromURLHeaders: coreHttp.CompositeMapper = { name: "String" } }, + versionId: { + serializedName: "x-ms-version-id", + type: { + name: "String" + } + }, date: { serializedName: "date", type: { @@ -5078,6 +5734,12 @@ export const BlockBlobCommitBlockListHeaders: coreHttp.CompositeMapper = { name: "String" } }, + versionId: { + serializedName: "x-ms-version-id", + type: { + name: "String" + } + }, date: { serializedName: "date", type: { @@ -5899,3 +6561,387 @@ export const AppendBlobAppendBlockFromUrlHeaders: coreHttp.CompositeMapper = { } } }; + +export const AppendBlobSealHeaders: coreHttp.CompositeMapper = { + serializedName: "appendblob-seal-headers", + type: { + name: "Composite", + className: "AppendBlobSealHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + isSealed: { + serializedName: "x-ms-blob-sealed", + type: { + name: "Boolean" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; + +export const BlobQueryHeaders: coreHttp.CompositeMapper = { + serializedName: "blob-query-headers", + type: { + name: "Composite", + className: "BlobQueryHeaders", + modelProperties: { + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + metadata: { + serializedName: "x-ms-meta", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + }, + headerCollectionPrefix: "x-ms-meta-" + }, + contentLength: { + serializedName: "content-length", + type: { + name: "Number" + } + }, + contentType: { + serializedName: "content-type", + type: { + name: "String" + } + }, + contentRange: { + serializedName: "content-range", + type: { + name: "String" + } + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + contentMD5: { + serializedName: "content-md5", + type: { + name: "ByteArray" + } + }, + contentEncoding: { + serializedName: "content-encoding", + type: { + name: "String" + } + }, + cacheControl: { + serializedName: "cache-control", + type: { + name: "String" + } + }, + contentDisposition: { + serializedName: "content-disposition", + type: { + name: "String" + } + }, + contentLanguage: { + serializedName: "content-language", + type: { + name: "String" + } + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + type: { + name: "Number" + } + }, + blobType: { + serializedName: "x-ms-blob-type", + type: { + name: "Enum", + allowedValues: [ + "BlockBlob", + "PageBlob", + "AppendBlob" + ] + } + }, + copyCompletionTime: { + serializedName: "x-ms-copy-completion-time", + type: { + name: "DateTimeRfc1123" + } + }, + copyStatusDescription: { + serializedName: "x-ms-copy-status-description", + type: { + name: "String" + } + }, + copyId: { + serializedName: "x-ms-copy-id", + type: { + name: "String" + } + }, + copyProgress: { + serializedName: "x-ms-copy-progress", + type: { + name: "String" + } + }, + copySource: { + serializedName: "x-ms-copy-source", + type: { + name: "String" + } + }, + copyStatus: { + serializedName: "x-ms-copy-status", + type: { + name: "Enum", + allowedValues: [ + "pending", + "success", + "aborted", + "failed" + ] + } + }, + leaseDuration: { + serializedName: "x-ms-lease-duration", + type: { + name: "Enum", + allowedValues: [ + "infinite", + "fixed" + ] + } + }, + leaseState: { + serializedName: "x-ms-lease-state", + type: { + name: "Enum", + allowedValues: [ + "available", + "leased", + "expired", + "breaking", + "broken" + ] + } + }, + leaseStatus: { + serializedName: "x-ms-lease-status", + type: { + name: "Enum", + allowedValues: [ + "locked", + "unlocked" + ] + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + acceptRanges: { + serializedName: "accept-ranges", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + blobCommittedBlockCount: { + serializedName: "x-ms-blob-committed-block-count", + type: { + name: "Number" + } + }, + isServerEncrypted: { + serializedName: "x-ms-server-encrypted", + type: { + name: "Boolean" + } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + type: { + name: "String" + } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + type: { + name: "String" + } + }, + blobContentMD5: { + serializedName: "x-ms-blob-content-md5", + type: { + name: "ByteArray" + } + }, + contentCrc64: { + serializedName: "x-ms-content-crc64", + type: { + name: "ByteArray" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; + +export const BlobGetTagsHeaders: coreHttp.CompositeMapper = { + serializedName: "blob-gettags-headers", + type: { + name: "Composite", + className: "BlobGetTagsHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; + +export const BlobSetTagsHeaders: coreHttp.CompositeMapper = { + serializedName: "blob-settags-headers", + type: { + name: "Composite", + className: "BlobSetTagsHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; diff --git a/sdk/storage/storage-blob/src/generated/src/models/parameters.ts b/sdk/storage/storage-blob/src/generated/src/models/parameters.ts index 9bdac5cfa204..1e68f498e48a 100644 --- a/sdk/storage/storage-blob/src/generated/src/models/parameters.ts +++ b/sdk/storage/storage-blob/src/generated/src/models/parameters.ts @@ -220,6 +220,18 @@ export const blobSequenceNumber: coreHttp.OperationParameter = { } } }; +export const blobTagsString: coreHttp.OperationParameter = { + parameterPath: [ + "options", + "blobTagsString" + ], + mapper: { + serializedName: "x-ms-tags", + type: { + name: "String" + } + } +}; export const blobType0: coreHttp.OperationParameter = { parameterPath: "blobType", mapper: { @@ -321,7 +333,7 @@ export const comp10: coreHttp.OperationQueryParameter = { required: true, isConstant: true, serializedName: "comp", - defaultValue: 'copy', + defaultValue: 'expiry', type: { name: "String" } @@ -333,7 +345,7 @@ export const comp11: coreHttp.OperationQueryParameter = { required: true, isConstant: true, serializedName: "comp", - defaultValue: 'tier', + defaultValue: 'snapshot', type: { name: "String" } @@ -345,7 +357,7 @@ export const comp12: coreHttp.OperationQueryParameter = { required: true, isConstant: true, serializedName: "comp", - defaultValue: 'page', + defaultValue: 'copy', type: { name: "String" } @@ -357,7 +369,7 @@ export const comp13: coreHttp.OperationQueryParameter = { required: true, isConstant: true, serializedName: "comp", - defaultValue: 'pagelist', + defaultValue: 'tier', type: { name: "String" } @@ -369,7 +381,7 @@ export const comp14: coreHttp.OperationQueryParameter = { required: true, isConstant: true, serializedName: "comp", - defaultValue: 'incrementalcopy', + defaultValue: 'query', type: { name: "String" } @@ -381,7 +393,7 @@ export const comp15: coreHttp.OperationQueryParameter = { required: true, isConstant: true, serializedName: "comp", - defaultValue: 'appendblock', + defaultValue: 'tags', type: { name: "String" } @@ -393,7 +405,7 @@ export const comp16: coreHttp.OperationQueryParameter = { required: true, isConstant: true, serializedName: "comp", - defaultValue: 'block', + defaultValue: 'page', type: { name: "String" } @@ -405,7 +417,31 @@ export const comp17: coreHttp.OperationQueryParameter = { required: true, isConstant: true, serializedName: "comp", - defaultValue: 'blocklist', + defaultValue: 'pagelist', + type: { + name: "String" + } + } +}; +export const comp18: coreHttp.OperationQueryParameter = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'incrementalcopy', + type: { + name: "String" + } + } +}; +export const comp19: coreHttp.OperationQueryParameter = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'appendblock', type: { name: "String" } @@ -423,6 +459,42 @@ export const comp2: coreHttp.OperationQueryParameter = { } } }; +export const comp20: coreHttp.OperationQueryParameter = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'seal', + type: { + name: "String" + } + } +}; +export const comp21: coreHttp.OperationQueryParameter = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'block', + type: { + name: "String" + } + } +}; +export const comp22: coreHttp.OperationQueryParameter = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'blocklist', + type: { + name: "String" + } + } +}; export const comp3: coreHttp.OperationQueryParameter = { parameterPath: "comp", mapper: { @@ -453,7 +525,7 @@ export const comp5: coreHttp.OperationQueryParameter = { required: true, isConstant: true, serializedName: "comp", - defaultValue: 'metadata', + defaultValue: 'blobs', type: { name: "String" } @@ -465,7 +537,7 @@ export const comp6: coreHttp.OperationQueryParameter = { required: true, isConstant: true, serializedName: "comp", - defaultValue: 'acl', + defaultValue: 'metadata', type: { name: "String" } @@ -477,7 +549,7 @@ export const comp7: coreHttp.OperationQueryParameter = { required: true, isConstant: true, serializedName: "comp", - defaultValue: 'lease', + defaultValue: 'acl', type: { name: "String" } @@ -501,7 +573,7 @@ export const comp9: coreHttp.OperationQueryParameter = { required: true, isConstant: true, serializedName: "comp", - defaultValue: 'snapshot', + defaultValue: 'lease', type: { name: "String" } @@ -614,6 +686,30 @@ export const defaultEncryptionScope: coreHttp.OperationParameter = { } } }; +export const deletedContainerName: coreHttp.OperationParameter = { + parameterPath: [ + "options", + "deletedContainerName" + ], + mapper: { + serializedName: "x-ms-deleted-container-name", + type: { + name: "String" + } + } +}; +export const deletedContainerVersion: coreHttp.OperationParameter = { + parameterPath: [ + "options", + "deletedContainerVersion" + ], + mapper: { + serializedName: "x-ms-deleted-container-version", + type: { + name: "String" + } + } +}; export const deleteSnapshots: coreHttp.OperationParameter = { parameterPath: [ "options", @@ -718,6 +814,28 @@ export const encryptionScope: coreHttp.OperationParameter = { } } }; +export const expiresOn: coreHttp.OperationParameter = { + parameterPath: [ + "options", + "expiresOn" + ], + mapper: { + serializedName: "x-ms-expiry-time", + type: { + name: "String" + } + } +}; +export const expiryOptions: coreHttp.OperationParameter = { + parameterPath: "expiryOptions", + mapper: { + required: true, + serializedName: "x-ms-expiry-option", + type: { + name: "String" + } + } +}; export const group: coreHttp.OperationParameter = { parameterPath: [ "options", @@ -829,12 +947,19 @@ export const include0: coreHttp.OperationQueryParameter = { mapper: { serializedName: "include", type: { - name: "Enum", - allowedValues: [ - "metadata" - ] + name: "Sequence", + element: { + type: { + name: "Enum", + allowedValues: [ + "metadata", + "deleted" + ] + } + } } - } + }, + collectionFormat: coreHttp.QueryCollectionFormat.Csv }; export const include1: coreHttp.OperationQueryParameter = { parameterPath: [ @@ -853,7 +978,9 @@ export const include1: coreHttp.OperationQueryParameter = { "deleted", "metadata", "snapshots", - "uncommittedblobs" + "uncommittedblobs", + "versions", + "tags" ] } } @@ -1277,6 +1404,18 @@ export const restype2: coreHttp.OperationQueryParameter = { } } }; +export const sealBlob: coreHttp.OperationParameter = { + parameterPath: [ + "options", + "sealBlob" + ], + mapper: { + serializedName: "x-ms-seal-blob", + type: { + name: "Boolean" + } + } +}; export const sequenceNumberAction: coreHttp.OperationParameter = { parameterPath: "sequenceNumberAction", mapper: { @@ -1515,7 +1654,31 @@ export const version: coreHttp.OperationParameter = { required: true, isConstant: true, serializedName: "x-ms-version", - defaultValue: '2019-07-07', + defaultValue: '2019-12-12', + type: { + name: "String" + } + } +}; +export const versionId: coreHttp.OperationQueryParameter = { + parameterPath: [ + "options", + "versionId" + ], + mapper: { + serializedName: "versionid", + type: { + name: "String" + } + } +}; +export const where: coreHttp.OperationQueryParameter = { + parameterPath: [ + "options", + "where" + ], + mapper: { + serializedName: "where", type: { name: "String" } diff --git a/sdk/storage/storage-blob/src/generated/src/models/serviceMappers.ts b/sdk/storage/storage-blob/src/generated/src/models/serviceMappers.ts index cd365e14a4ce..26c84704a14b 100644 --- a/sdk/storage/storage-blob/src/generated/src/models/serviceMappers.ts +++ b/sdk/storage/storage-blob/src/generated/src/models/serviceMappers.ts @@ -12,12 +12,15 @@ export { ContainerItem, ContainerProperties, CorsRule, + FilterBlobItem, + FilterBlobSegment, GeoReplication, KeyInfo, ListContainersSegmentResponse, Logging, Metrics, RetentionPolicy, + ServiceFilterBlobsHeaders, ServiceGetAccountInfoHeaders, ServiceGetPropertiesHeaders, ServiceGetStatisticsHeaders, diff --git a/sdk/storage/storage-blob/src/generated/src/operations/appendBlob.ts b/sdk/storage/storage-blob/src/generated/src/operations/appendBlob.ts index 92a4451c3b7a..2834950a8ff5 100644 --- a/sdk/storage/storage-blob/src/generated/src/operations/appendBlob.ts +++ b/sdk/storage/storage-blob/src/generated/src/operations/appendBlob.ts @@ -122,6 +122,31 @@ export class AppendBlob { appendBlockFromUrlOperationSpec, callback) as Promise; } + + /** + * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version + * 2019-12-12 version or later. + * @param [options] The optional parameters + * @returns Promise + */ + seal(options?: Models.AppendBlobSealOptionalParams): Promise; + /** + * @param callback The callback + */ + seal(callback: coreHttp.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + seal(options: Models.AppendBlobSealOptionalParams, callback: coreHttp.ServiceCallback): void; + seal(options?: Models.AppendBlobSealOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + sealOperationSpec, + callback) as Promise; + } } // Operation Specifications @@ -141,6 +166,7 @@ const createOperationSpec: coreHttp.OperationSpec = { Parameters.encryptionScope, Parameters.version, Parameters.requestId, + Parameters.blobTagsString, Parameters.blobType1, Parameters.blobContentType, Parameters.blobContentEncoding, @@ -178,7 +204,7 @@ const appendBlockOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.timeoutInSeconds, - Parameters.comp15 + Parameters.comp19 ], headerParameters: [ Parameters.contentLength, @@ -230,7 +256,7 @@ const appendBlockFromUrlOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.timeoutInSeconds, - Parameters.comp15 + Parameters.comp19 ], headerParameters: [ Parameters.sourceUrl, @@ -269,3 +295,36 @@ const appendBlockFromUrlOperationSpec: coreHttp.OperationSpec = { isXML: true, serializer }; + +const sealOperationSpec: coreHttp.OperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp20 + ], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.leaseId0, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.appendPosition + ], + responses: { + 200: { + headersMapper: Mappers.AppendBlobSealHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobSealHeaders + } + }, + isXML: true, + serializer +}; diff --git a/sdk/storage/storage-blob/src/generated/src/operations/blob.ts b/sdk/storage/storage-blob/src/generated/src/operations/blob.ts index c64ce687951b..7a30216162b6 100644 --- a/sdk/storage/storage-blob/src/generated/src/operations/blob.ts +++ b/sdk/storage/storage-blob/src/generated/src/operations/blob.ts @@ -221,6 +221,37 @@ export class Blob { callback) as Promise; } + /** + * Sets the time a blob will expire and be deleted. + * @param expiryOptions Required. Indicates mode of the expiry time. Possible values include: + * 'NeverExpire', 'RelativeToCreation', 'RelativeToNow', 'Absolute' + * @param [options] The optional parameters + * @returns Promise + */ + setExpiry(expiryOptions: Models.BlobExpiryOptions, options?: Models.BlobSetExpiryOptionalParams): Promise; + /** + * @param expiryOptions Required. Indicates mode of the expiry time. Possible values include: + * 'NeverExpire', 'RelativeToCreation', 'RelativeToNow', 'Absolute' + * @param callback The callback + */ + setExpiry(expiryOptions: Models.BlobExpiryOptions, callback: coreHttp.ServiceCallback): void; + /** + * @param expiryOptions Required. Indicates mode of the expiry time. Possible values include: + * 'NeverExpire', 'RelativeToCreation', 'RelativeToNow', 'Absolute' + * @param options The optional parameters + * @param callback The callback + */ + setExpiry(expiryOptions: Models.BlobExpiryOptions, options: Models.BlobSetExpiryOptionalParams, callback: coreHttp.ServiceCallback): void; + setExpiry(expiryOptions: Models.BlobExpiryOptions, options?: Models.BlobSetExpiryOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + expiryOptions, + options + }, + setExpiryOperationSpec, + callback) as Promise; + } + /** * The Set HTTP Headers operation sets system properties on the blob * @param [options] The optional parameters @@ -606,6 +637,79 @@ export class Blob { getAccountInfoOperationSpec, callback) as Promise; } + + /** + * The Query operation enables users to select/project on blob data by providing simple query + * expressions. + * @param [options] The optional parameters + * @returns Promise + */ + query(options?: Models.BlobQueryOptionalParams): Promise; + /** + * @param callback The callback + */ + query(callback: coreHttp.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + query(options: Models.BlobQueryOptionalParams, callback: coreHttp.ServiceCallback): void; + query(options?: Models.BlobQueryOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + queryOperationSpec, + callback) as Promise; + } + + /** + * The Get Tags operation enables users to get the tags associated with a blob. + * @param [options] The optional parameters + * @returns Promise + */ + getTags(options?: Models.BlobGetTagsOptionalParams): Promise; + /** + * @param callback The callback + */ + getTags(callback: coreHttp.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + getTags(options: Models.BlobGetTagsOptionalParams, callback: coreHttp.ServiceCallback): void; + getTags(options?: Models.BlobGetTagsOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + getTagsOperationSpec, + callback) as Promise; + } + + /** + * The Set Tags operation enables users to set tags on a blob. + * @param [options] The optional parameters + * @returns Promise + */ + setTags(options?: Models.BlobSetTagsOptionalParams): Promise; + /** + * @param callback The callback + */ + setTags(callback: coreHttp.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + setTags(options: Models.BlobSetTagsOptionalParams, callback: coreHttp.ServiceCallback): void; + setTags(options?: Models.BlobSetTagsOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + setTagsOperationSpec, + callback) as Promise; + } } // Operation Specifications @@ -618,6 +722,7 @@ const downloadOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.snapshot, + Parameters.versionId, Parameters.timeoutInSeconds ], headerParameters: [ @@ -671,6 +776,7 @@ const getPropertiesOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.snapshot, + Parameters.versionId, Parameters.timeoutInSeconds ], headerParameters: [ @@ -706,6 +812,7 @@ const deleteMethodOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.snapshot, + Parameters.versionId, Parameters.timeoutInSeconds ], headerParameters: [ @@ -873,6 +980,35 @@ const undeleteOperationSpec: coreHttp.OperationSpec = { serializer }; +const setExpiryOperationSpec: coreHttp.OperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp10 + ], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.expiryOptions, + Parameters.expiresOn + ], + responses: { + 200: { + headersMapper: Mappers.BlobSetExpiryHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetExpiryHeaders + } + }, + isXML: true, + serializer +}; + const setHTTPHeadersOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{containerName}/{blob}", @@ -919,7 +1055,7 @@ const setMetadataOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.timeoutInSeconds, - Parameters.comp5 + Parameters.comp6 ], headerParameters: [ Parameters.metadata, @@ -956,7 +1092,7 @@ const acquireLeaseOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.timeoutInSeconds, - Parameters.comp7 + Parameters.comp9 ], headerParameters: [ Parameters.duration, @@ -990,7 +1126,7 @@ const releaseLeaseOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.timeoutInSeconds, - Parameters.comp7 + Parameters.comp9 ], headerParameters: [ Parameters.leaseId1, @@ -1023,7 +1159,7 @@ const renewLeaseOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.timeoutInSeconds, - Parameters.comp7 + Parameters.comp9 ], headerParameters: [ Parameters.leaseId1, @@ -1056,7 +1192,7 @@ const changeLeaseOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.timeoutInSeconds, - Parameters.comp7 + Parameters.comp9 ], headerParameters: [ Parameters.leaseId1, @@ -1090,7 +1226,7 @@ const breakLeaseOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.timeoutInSeconds, - Parameters.comp7 + Parameters.comp9 ], headerParameters: [ Parameters.breakPeriod, @@ -1123,7 +1259,7 @@ const createSnapshotOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.timeoutInSeconds, - Parameters.comp9 + Parameters.comp11 ], headerParameters: [ Parameters.metadata, @@ -1168,6 +1304,8 @@ const startCopyFromURLOperationSpec: coreHttp.OperationSpec = { Parameters.copySource, Parameters.version, Parameters.requestId, + Parameters.blobTagsString, + Parameters.sealBlob, Parameters.sourceIfModifiedSince, Parameters.sourceIfUnmodifiedSince, Parameters.sourceIfMatch, @@ -1207,6 +1345,8 @@ const copyFromURLOperationSpec: coreHttp.OperationSpec = { Parameters.version, Parameters.requestId, Parameters.sourceContentMD5, + Parameters.blobTagsString, + Parameters.sealBlob, Parameters.xMsRequiresSync, Parameters.sourceIfModifiedSince, Parameters.sourceIfUnmodifiedSince, @@ -1240,7 +1380,7 @@ const abortCopyFromURLOperationSpec: coreHttp.OperationSpec = { queryParameters: [ Parameters.copyId, Parameters.timeoutInSeconds, - Parameters.comp10 + Parameters.comp12 ], headerParameters: [ Parameters.version, @@ -1268,8 +1408,10 @@ const setTierOperationSpec: coreHttp.OperationSpec = { Parameters.url ], queryParameters: [ + Parameters.snapshot, + Parameters.versionId, Parameters.timeoutInSeconds, - Parameters.comp11 + Parameters.comp13 ], headerParameters: [ Parameters.tier1, @@ -1319,3 +1461,130 @@ const getAccountInfoOperationSpec: coreHttp.OperationSpec = { isXML: true, serializer }; + +const queryOperationSpec: coreHttp.OperationSpec = { + httpMethod: "POST", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.snapshot, + Parameters.timeoutInSeconds, + Parameters.comp14 + ], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.leaseId0, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch + ], + requestBody: { + parameterPath: [ + "options", + "queryRequest" + ], + mapper: Mappers.QueryRequest + }, + contentType: "application/xml; charset=utf-8", + responses: { + 200: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Stream" + } + }, + headersMapper: Mappers.BlobQueryHeaders + }, + 206: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Stream" + } + }, + headersMapper: Mappers.BlobQueryHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobQueryHeaders + } + }, + isXML: true, + serializer +}; + +const getTagsOperationSpec: coreHttp.OperationSpec = { + httpMethod: "GET", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp15 + ], + headerParameters: [ + Parameters.version, + Parameters.requestId + ], + responses: { + 200: { + bodyMapper: Mappers.BlobTags, + headersMapper: Mappers.BlobGetTagsHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetTagsHeaders + } + }, + isXML: true, + serializer +}; + +const setTagsOperationSpec: coreHttp.OperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.versionId, + Parameters.comp15 + ], + headerParameters: [ + Parameters.version, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.requestId + ], + requestBody: { + parameterPath: [ + "options", + "tags" + ], + mapper: Mappers.BlobTags + }, + contentType: "application/xml; charset=utf-8", + responses: { + 204: { + headersMapper: Mappers.BlobSetTagsHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetTagsHeaders + } + }, + isXML: true, + serializer +}; diff --git a/sdk/storage/storage-blob/src/generated/src/operations/blockBlob.ts b/sdk/storage/storage-blob/src/generated/src/operations/blockBlob.ts index 8d4724fcbaf3..a929107a11ae 100644 --- a/sdk/storage/storage-blob/src/generated/src/operations/blockBlob.ts +++ b/sdk/storage/storage-blob/src/generated/src/operations/blockBlob.ts @@ -236,6 +236,7 @@ const uploadOperationSpec: coreHttp.OperationSpec = { Parameters.tier0, Parameters.version, Parameters.requestId, + Parameters.blobTagsString, Parameters.blobType2, Parameters.blobContentType, Parameters.blobContentEncoding, @@ -285,7 +286,7 @@ const stageBlockOperationSpec: coreHttp.OperationSpec = { queryParameters: [ Parameters.blockId, Parameters.timeoutInSeconds, - Parameters.comp16 + Parameters.comp21 ], headerParameters: [ Parameters.contentLength, @@ -332,7 +333,7 @@ const stageBlockFromURLOperationSpec: coreHttp.OperationSpec = { queryParameters: [ Parameters.blockId, Parameters.timeoutInSeconds, - Parameters.comp16 + Parameters.comp21 ], headerParameters: [ Parameters.contentLength, @@ -373,7 +374,7 @@ const commitBlockListOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.timeoutInSeconds, - Parameters.comp17 + Parameters.comp22 ], headerParameters: [ Parameters.transactionalContentMD5, @@ -383,6 +384,7 @@ const commitBlockListOperationSpec: coreHttp.OperationSpec = { Parameters.tier0, Parameters.version, Parameters.requestId, + Parameters.blobTagsString, Parameters.blobCacheControl, Parameters.blobContentType, Parameters.blobContentEncoding, @@ -429,7 +431,7 @@ const getBlockListOperationSpec: coreHttp.OperationSpec = { Parameters.snapshot, Parameters.listType, Parameters.timeoutInSeconds, - Parameters.comp17 + Parameters.comp22 ], headerParameters: [ Parameters.version, diff --git a/sdk/storage/storage-blob/src/generated/src/operations/container.ts b/sdk/storage/storage-blob/src/generated/src/operations/container.ts index 97fc2f2e0132..cfd72b005902 100644 --- a/sdk/storage/storage-blob/src/generated/src/operations/container.ts +++ b/sdk/storage/storage-blob/src/generated/src/operations/container.ts @@ -175,6 +175,30 @@ export class Container { callback) as Promise; } + /** + * Restores a previously-deleted container. + * @param [options] The optional parameters + * @returns Promise + */ + restore(options?: Models.ContainerRestoreOptionalParams): Promise; + /** + * @param callback The callback + */ + restore(callback: coreHttp.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + restore(options: Models.ContainerRestoreOptionalParams, callback: coreHttp.ServiceCallback): void; + restore(options?: Models.ContainerRestoreOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + restoreOperationSpec, + callback) as Promise; + } + /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration * can be 15 to 60 seconds, or can be infinite @@ -508,7 +532,7 @@ const setMetadataOperationSpec: coreHttp.OperationSpec = { queryParameters: [ Parameters.timeoutInSeconds, Parameters.restype2, - Parameters.comp5 + Parameters.comp6 ], headerParameters: [ Parameters.metadata, @@ -539,7 +563,7 @@ const getAccessPolicyOperationSpec: coreHttp.OperationSpec = { queryParameters: [ Parameters.timeoutInSeconds, Parameters.restype2, - Parameters.comp6 + Parameters.comp7 ], headerParameters: [ Parameters.version, @@ -581,7 +605,7 @@ const setAccessPolicyOperationSpec: coreHttp.OperationSpec = { queryParameters: [ Parameters.timeoutInSeconds, Parameters.restype2, - Parameters.comp6 + Parameters.comp7 ], headerParameters: [ Parameters.access, @@ -625,6 +649,36 @@ const setAccessPolicyOperationSpec: coreHttp.OperationSpec = { serializer }; +const restoreOperationSpec: coreHttp.OperationSpec = { + httpMethod: "PUT", + path: "{containerName}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp8 + ], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.deletedContainerName, + Parameters.deletedContainerVersion + ], + responses: { + 201: { + headersMapper: Mappers.ContainerRestoreHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRestoreHeaders + } + }, + isXML: true, + serializer +}; + const acquireLeaseOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{containerName}", @@ -633,7 +687,7 @@ const acquireLeaseOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.timeoutInSeconds, - Parameters.comp7, + Parameters.comp9, Parameters.restype2 ], headerParameters: [ @@ -666,7 +720,7 @@ const releaseLeaseOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.timeoutInSeconds, - Parameters.comp7, + Parameters.comp9, Parameters.restype2 ], headerParameters: [ @@ -698,7 +752,7 @@ const renewLeaseOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.timeoutInSeconds, - Parameters.comp7, + Parameters.comp9, Parameters.restype2 ], headerParameters: [ @@ -730,7 +784,7 @@ const breakLeaseOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.timeoutInSeconds, - Parameters.comp7, + Parameters.comp9, Parameters.restype2 ], headerParameters: [ @@ -762,7 +816,7 @@ const changeLeaseOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.timeoutInSeconds, - Parameters.comp7, + Parameters.comp9, Parameters.restype2 ], headerParameters: [ diff --git a/sdk/storage/storage-blob/src/generated/src/operations/pageBlob.ts b/sdk/storage/storage-blob/src/generated/src/operations/pageBlob.ts index d046d1fda559..a5b2b2e75d60 100644 --- a/sdk/storage/storage-blob/src/generated/src/operations/pageBlob.ts +++ b/sdk/storage/storage-blob/src/generated/src/operations/pageBlob.ts @@ -345,6 +345,7 @@ const createOperationSpec: coreHttp.OperationSpec = { Parameters.blobSequenceNumber, Parameters.version, Parameters.requestId, + Parameters.blobTagsString, Parameters.blobType0, Parameters.blobContentType, Parameters.blobContentEncoding, @@ -382,7 +383,7 @@ const uploadPagesOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.timeoutInSeconds, - Parameters.comp12 + Parameters.comp16 ], headerParameters: [ Parameters.contentLength, @@ -437,7 +438,7 @@ const clearPagesOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.timeoutInSeconds, - Parameters.comp12 + Parameters.comp16 ], headerParameters: [ Parameters.contentLength, @@ -479,7 +480,7 @@ const uploadPagesFromURLOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.timeoutInSeconds, - Parameters.comp12 + Parameters.comp16 ], headerParameters: [ Parameters.sourceUrl, @@ -530,7 +531,7 @@ const getPageRangesOperationSpec: coreHttp.OperationSpec = { queryParameters: [ Parameters.snapshot, Parameters.timeoutInSeconds, - Parameters.comp13 + Parameters.comp17 ], headerParameters: [ Parameters.range0, @@ -566,7 +567,7 @@ const getPageRangesDiffOperationSpec: coreHttp.OperationSpec = { Parameters.snapshot, Parameters.timeoutInSeconds, Parameters.prevsnapshot, - Parameters.comp13 + Parameters.comp17 ], headerParameters: [ Parameters.prevSnapshotUrl, @@ -672,7 +673,7 @@ const copyIncrementalOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.timeoutInSeconds, - Parameters.comp14 + Parameters.comp18 ], headerParameters: [ Parameters.copySource, diff --git a/sdk/storage/storage-blob/src/generated/src/operations/service.ts b/sdk/storage/storage-blob/src/generated/src/operations/service.ts index c55db7516de6..bc1751ec3630 100644 --- a/sdk/storage/storage-blob/src/generated/src/operations/service.ts +++ b/sdk/storage/storage-blob/src/generated/src/operations/service.ts @@ -222,6 +222,32 @@ export class Service { submitBatchOperationSpec, callback) as Promise; } + + /** + * The Filter Blobs operation enables callers to list blobs across all containers whose tags match + * a given search expression. Filter blobs searches across all containers within a storage account + * but can be scoped within the expression to a single container. + * @param [options] The optional parameters + * @returns Promise + */ + filterBlobs(options?: Models.ServiceFilterBlobsOptionalParams): Promise; + /** + * @param callback The callback + */ + filterBlobs(callback: coreHttp.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + filterBlobs(options: Models.ServiceFilterBlobsOptionalParams, callback: coreHttp.ServiceCallback): void; + filterBlobs(options?: Models.ServiceFilterBlobsOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + filterBlobsOperationSpec, + callback) as Promise; + } } // Operation Specifications @@ -453,3 +479,33 @@ const submitBatchOperationSpec: coreHttp.OperationSpec = { isXML: true, serializer }; + +const filterBlobsOperationSpec: coreHttp.OperationSpec = { + httpMethod: "GET", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.where, + Parameters.marker0, + Parameters.maxPageSize, + Parameters.comp5 + ], + headerParameters: [ + Parameters.version, + Parameters.requestId + ], + responses: { + 200: { + bodyMapper: Mappers.FilterBlobSegment, + headersMapper: Mappers.ServiceFilterBlobsHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceFilterBlobsHeaders + } + }, + isXML: true, + serializer +}; diff --git a/sdk/storage/storage-blob/src/generated/src/storageClientContext.ts b/sdk/storage/storage-blob/src/generated/src/storageClientContext.ts index 4d00edaa8c00..31b47553f19f 100644 --- a/sdk/storage/storage-blob/src/generated/src/storageClientContext.ts +++ b/sdk/storage/storage-blob/src/generated/src/storageClientContext.ts @@ -39,7 +39,7 @@ export class StorageClientContext extends coreHttp.ServiceClient { super(undefined, options); - this.version = '2019-07-07'; + this.version = '2019-12-12'; this.baseUri = "{url}"; this.requestContentType = "application/json; charset=utf-8"; this.url = url; diff --git a/sdk/storage/storage-blob/src/generatedModels.ts b/sdk/storage/storage-blob/src/generatedModels.ts index 8c44330850ad..5af194232027 100644 --- a/sdk/storage/storage-blob/src/generatedModels.ts +++ b/sdk/storage/storage-blob/src/generatedModels.ts @@ -21,7 +21,7 @@ export { BlobDownloadOptionalParams, BlobGetPropertiesHeaders, BlobGetPropertiesResponse, - BlobProperties, + BlobPropertiesInternal as BlobProperties, BlobUndeleteResponse, BlobHTTPHeaders, BlobSetHTTPHeadersResponse, @@ -37,7 +37,7 @@ export { BlobSetTierHeaders, BlobSetTierResponse, BlobHierarchyListSegment, - BlobItem, + BlobItemInternal as BlobItem, BlobPrefix, BlobDownloadHeaders, BlobDownloadResponse as BlobDownloadResponseModel, diff --git a/sdk/storage/storage-blob/swagger/README.md b/sdk/storage/storage-blob/swagger/README.md index 99985cdd5d54..c2d87cc53606 100644 --- a/sdk/storage/storage-blob/swagger/README.md +++ b/sdk/storage/storage-blob/swagger/README.md @@ -12,7 +12,7 @@ enable-xml: true generate-metadata: false license-header: MICROSOFT_MIT_NO_VERSION output-folder: ../src/generated -input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/storage-dataplane-preview/specification/storage/data-plane/Microsoft.BlobStorage/preview/2019-07-07/blob.json +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/storage-dataplane-preview/specification/storage/data-plane/Microsoft.BlobStorage/preview/2019-12-12/blob.json model-date-time-as-string: true optional-response-headers: true ``` From 6bc681fca7b44972665e3f468d7aac1e5b3b4fc1 Mon Sep 17 00:00:00 2001 From: xiaonlimsft Date: Fri, 22 May 2020 17:22:14 +0800 Subject: [PATCH 03/39] avor parser offset fix; Readable interface update (#9088) --- .../src/AvroReadableFromStream.ts | 29 +++++++++++++------ 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/sdk/storage/storage-internal-avro/src/AvroReadableFromStream.ts b/sdk/storage/storage-internal-avro/src/AvroReadableFromStream.ts index afc3352c859f..62b9b81e3d15 100644 --- a/sdk/storage/storage-internal-avro/src/AvroReadableFromStream.ts +++ b/sdk/storage/storage-internal-avro/src/AvroReadableFromStream.ts @@ -1,11 +1,18 @@ -import { Readable } from "stream"; -import { AvroReadable } from './AvroReadable'; +import { AvroReadable } from "./AvroReadable"; export class AvroReadableFromStream extends AvroReadable { private _position: number; - private _readable: Readable; + private _readable: NodeJS.ReadableStream; + + private toUint8Array(data: string | Buffer): Uint8Array { + if (typeof data === "string") { + return Buffer.from(data); + } + return data; + } + // private _stillReadable: boolean; - constructor(readable: Readable) { + constructor(readable: NodeJS.ReadableStream) { super(); this._readable = readable; this._position = 0; @@ -22,9 +29,14 @@ export class AvroReadableFromStream extends AvroReadable { return this._position; } public async read(size: number): Promise { - if (size <= 0) { + if (size < 0) { throw new Error(`size parameter should be positive: ${size}`); } + + if (size === 0) { + return new Uint8Array(); + } + // readable is true if it is safe to call readable.read(), which means the stream has not been destroyed or emitted 'error' or 'end'. // if (!this._stillReadable || this._readable.destroyed) { if (!this._readable.readable) { @@ -35,9 +47,8 @@ export class AvroReadableFromStream extends AvroReadable { if (chunk) { this._position += chunk.length; // chunk.lenght maybe less than desired size if the stream ends. - return chunk; - } - else { + return this.toUint8Array(chunk); + } else { // register callback to wait for enough data to read return new Promise((resolve, reject) => { const callback = () => { @@ -45,7 +56,7 @@ export class AvroReadableFromStream extends AvroReadable { if (chunk) { this._position += chunk.length; // chunk.lenght maybe less than desired size if the stream ends. - resolve(chunk); + resolve(this.toUint8Array(chunk)); this._readable.removeListener("readable", callback); } }; From d40420590c6af817598cbcd826bfa229cb030266 Mon Sep 17 00:00:00 2001 From: XiaoningLiu Date: Tue, 26 May 2020 17:47:53 +0800 Subject: [PATCH 04/39] [Storage] Regenerate API review --- .../storage-blob/review/storage-blob.api.md | 59 ++++++++++++++++++- 1 file changed, 57 insertions(+), 2 deletions(-) diff --git a/sdk/storage/storage-blob/review/storage-blob.api.md b/sdk/storage/storage-blob/review/storage-blob.api.md index 10c05ece2200..838547c2083c 100644 --- a/sdk/storage/storage-blob/review/storage-blob.api.md +++ b/sdk/storage/storage-blob/review/storage-blob.api.md @@ -196,6 +196,7 @@ export interface AppendBlobCreateHeaders { lastModified?: Date; requestId?: string; version?: string; + versionId?: string; } // @public @@ -393,6 +394,7 @@ export interface BlobCopyFromURLHeaders { lastModified?: Date; requestId?: string; version?: string; + versionId?: string; xMsContentCrc64?: Uint8Array; } @@ -415,6 +417,7 @@ export interface BlobCreateSnapshotHeaders { requestId?: string; snapshot?: string; version?: string; + versionId?: string; } // @public @@ -487,6 +490,7 @@ export interface BlobDownloadHeaders { // (undocumented) errorCode?: string; etag?: string; + isSealed?: boolean; isServerEncrypted?: boolean; lastModified?: Date; leaseDuration?: LeaseDurationType; @@ -496,8 +500,15 @@ export interface BlobDownloadHeaders { metadata?: { [propertyName: string]: string; }; + objectReplicationPolicyId?: string; + // (undocumented) + objectReplicationRules?: { + [propertyName: string]: string; + }; requestId?: string; + tagCount?: number; version?: string; + versionId?: string; } // @public @@ -511,6 +522,7 @@ export interface BlobDownloadOptionalParams extends coreHttp.RequestOptionsBase requestId?: string; snapshot?: string; timeoutInSeconds?: number; + versionId?: string; } // @public @@ -588,7 +600,10 @@ export interface BlobGetPropertiesHeaders { // (undocumented) errorCode?: string; etag?: string; + expiresOn?: Date; + isCurrentVersion?: boolean; isIncrementalCopy?: boolean; + isSealed?: boolean; isServerEncrypted?: boolean; lastModified?: Date; leaseDuration?: LeaseDurationType; @@ -598,8 +613,15 @@ export interface BlobGetPropertiesHeaders { metadata?: { [propertyName: string]: string; }; + objectReplicationPolicyId?: string; + // (undocumented) + objectReplicationRules?: { + [propertyName: string]: string; + }; requestId?: string; + tagCount?: number; version?: string; + versionId?: string; } // @public @@ -636,18 +658,32 @@ export interface BlobHTTPHeaders { // @public export interface BlobItem { + // Warning: (ae-forgotten-export) The symbol "BlobTags" needs to be exported by the entry point index.d.ts + // + // (undocumented) + blobTags?: BlobTags; // (undocumented) deleted: boolean; // (undocumented) + isCurrentVersion?: boolean; + // (undocumented) metadata?: { [propertyName: string]: string; }; // (undocumented) name: string; // (undocumented) + objectReplicationPolicyId?: string; + // (undocumented) + objectReplicationRules?: { + [propertyName: string]: string; + }; + // (undocumented) properties: BlobProperties; // (undocumented) snapshot: string; + // (undocumented) + versionId?: string; } // @public @@ -715,8 +751,12 @@ export interface BlobProperties { // (undocumented) etag: string; // (undocumented) + expiresOn?: Date; + // (undocumented) incrementalCopy?: boolean; // (undocumented) + isSealed?: boolean; + // (undocumented) lastModified: Date; leaseDuration?: LeaseDurationType; leaseState?: LeaseStateType; @@ -725,6 +765,8 @@ export interface BlobProperties { remainingRetentionDays?: number; // (undocumented) serverEncrypted?: boolean; + // (undocumented) + tagCount?: number; } // @public @@ -855,6 +897,7 @@ export interface BlobSetMetadataHeaders { lastModified?: Date; requestId?: string; version?: string; + versionId?: string; } // @public @@ -907,6 +950,7 @@ export interface BlobStartCopyFromURLHeaders { lastModified?: Date; requestId?: string; version?: string; + versionId?: string; } // @public @@ -1002,6 +1046,7 @@ export interface BlockBlobCommitBlockListHeaders { lastModified?: Date; requestId?: string; version?: string; + versionId?: string; xMsContentCrc64?: Uint8Array; } @@ -1154,6 +1199,7 @@ export interface BlockBlobUploadHeaders { lastModified?: Date; requestId?: string; version?: string; + versionId?: string; } // @public @@ -1390,6 +1436,8 @@ export type ContainerGetPropertiesResponse = ContainerGetPropertiesHeaders & { // @public export interface ContainerItem { + // (undocumented) + deleted?: boolean; // (undocumented) metadata?: { [propertyName: string]: string; @@ -1398,6 +1446,8 @@ export interface ContainerItem { name: string; // (undocumented) properties: ContainerProperties; + // (undocumented) + version?: string; } // @public @@ -1456,6 +1506,8 @@ export interface ContainerProperties { // (undocumented) defaultEncryptionScope?: string; // (undocumented) + deletedOn?: Date; + // (undocumented) etag: string; // (undocumented) hasImmutabilityPolicy?: boolean; @@ -1469,6 +1521,8 @@ export interface ContainerProperties { // (undocumented) preventEncryptionScopeOverride?: boolean; publicAccess?: PublicAccessType; + // (undocumented) + remainingRetentionDays?: number; } // @public @@ -1695,10 +1749,10 @@ export interface ListBlobsHierarchySegmentResponse { } // @public -export type ListBlobsIncludeItem = 'copy' | 'deleted' | 'metadata' | 'snapshots' | 'uncommittedblobs'; +export type ListBlobsIncludeItem = 'copy' | 'deleted' | 'metadata' | 'snapshots' | 'uncommittedblobs' | 'versions' | 'tags'; // @public -export type ListContainersIncludeType = 'metadata'; +export type ListContainersIncludeType = 'metadata' | 'deleted'; // @public export interface ListContainersSegmentResponse { @@ -1837,6 +1891,7 @@ export interface PageBlobCreateHeaders { lastModified?: Date; requestId?: string; version?: string; + versionId?: string; } // @public From 031fdceba16d194cb0ccf243a9a74d811a29ca11 Mon Sep 17 00:00:00 2001 From: Lin Jian <1215122919@qq.com> Date: Sun, 7 Jun 2020 14:27:04 +0800 Subject: [PATCH 05/39] [storage] avro parser fix (#9154) * fix * resolve PR comments: remove useless assignment * AvroReadableFromStream: removeListener when read succeeds * remove listener when error callback triggered Co-authored-by: Lin Jian --- .../storage-internal-avro/package.json | 4 +- .../storage-internal-avro/src/AvroParser.ts | 42 ++++++++++--------- .../src/AvroReadableFromStream.ts | 30 +++++++++---- 3 files changed, 45 insertions(+), 31 deletions(-) diff --git a/sdk/storage/storage-internal-avro/package.json b/sdk/storage/storage-internal-avro/package.json index 9e628455afe0..5ac366124c24 100644 --- a/sdk/storage/storage-internal-avro/package.json +++ b/sdk/storage/storage-internal-avro/package.json @@ -3,7 +3,7 @@ "sideEffect": false, "private": true, "author": "Microsoft Corporation", - "version": "1.0.0-preview.1", + "version": "1.0.0", "description": "internal avro parser", "license": "MIT", "repository": "github:Azure/azure-sdk-for-js", @@ -68,7 +68,7 @@ "puppeteer": "^2.0.0", "rimraf": "^3.0.0", "rollup": "^1.16.3", - "@rollup/plugin-commonjs": "^11.0.1", + "@rollup/plugin-commonjs": "11.0.2", "@rollup/plugin-node-resolve": "^7.0.0", "rollup-plugin-shim": "^1.0.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/storage/storage-internal-avro/src/AvroParser.ts b/sdk/storage/storage-internal-avro/src/AvroParser.ts index b63a347b4375..4bb310068953 100644 --- a/sdk/storage/storage-internal-avro/src/AvroParser.ts +++ b/sdk/storage/storage-internal-avro/src/AvroParser.ts @@ -28,32 +28,34 @@ export class AvroParser { return buf[0]; } + // int and long are stored in variable-length zig-zag coding. + // variable-length: https://lucene.apache.org/core/3_5_0/fileformats.html#VInt + // zig-zag: https://developers.google.com/protocol-buffers/docs/encoding?csw=1#types private static async readZigZagLong(stream: AvroReadable): Promise { - // copied from https://github.com/apache/avro/blob/master/lang/js/lib/utils.js#L321 - let n = 0; - let k = 0; - let b, h, f, fk; + let zigZagEncoded = 0; + let significanceInBit = 0; + let byte, haveMoreByte, significanceInFloat; do { - b = await AvroParser.readByte(stream); - h = b & 0x80; - n |= (b & 0x7f) << k; - k += 7; - } while (h && k < 28); - - if (h) { - // Switch to float arithmetic, otherwise we might overflow. - f = n; - fk = 268435456; // 2 ** 28. + byte = await AvroParser.readByte(stream); + haveMoreByte = byte & 0x80; + zigZagEncoded |= (byte & 0x7f) << significanceInBit; + significanceInBit += 7; + } while (haveMoreByte && significanceInBit < 28); // bitwise operation only works for 32-bit integers + + if (haveMoreByte) { + // Switch to float arithmetic + // FIXME: this only works when zigZagEncoded is no more than Number.MAX_SAFE_INTEGER (2**53 - 1) + significanceInFloat = 268435456; // 2 ** 28. do { - b = await AvroParser.readByte(stream); - f += (b & 0x7f) * fk; - fk *= 128; - } while (b & 0x80); - return (f % 2 ? -(f + 1) : f) / 2; + byte = await AvroParser.readByte(stream); + zigZagEncoded += (byte & 0x7f) * significanceInFloat; + significanceInFloat *= 128; // 2 ** 7 + } while (byte & 0x80); + return (zigZagEncoded % 2 ? -(zigZagEncoded + 1) : zigZagEncoded) / 2; } - return (n >> 1) ^ -(n & 1); + return (zigZagEncoded >> 1) ^ -(zigZagEncoded & 1); } public static async readLong(stream: AvroReadable): Promise { diff --git a/sdk/storage/storage-internal-avro/src/AvroReadableFromStream.ts b/sdk/storage/storage-internal-avro/src/AvroReadableFromStream.ts index 62b9b81e3d15..ab8dfea45a49 100644 --- a/sdk/storage/storage-internal-avro/src/AvroReadableFromStream.ts +++ b/sdk/storage/storage-internal-avro/src/AvroReadableFromStream.ts @@ -16,7 +16,7 @@ export class AvroReadableFromStream extends AvroReadable { super(); this._readable = readable; this._position = 0; - // workaround due to Readable.readable only availabe after Node.js v11.4 + // workaround due to Readable.readable only available after Node.js v11.4 // this._stillReadable = true; // this._readable.on("end", () => { // this._stillReadable = false; @@ -46,24 +46,36 @@ export class AvroReadableFromStream extends AvroReadable { let chunk = this._readable.read(size); if (chunk) { this._position += chunk.length; - // chunk.lenght maybe less than desired size if the stream ends. + // chunk.length maybe less than desired size if the stream ends. return this.toUint8Array(chunk); } else { // register callback to wait for enough data to read return new Promise((resolve, reject) => { - const callback = () => { + const readableCallback = () => { let chunk = this._readable.read(size); if (chunk) { this._position += chunk.length; - // chunk.lenght maybe less than desired size if the stream ends. + // chunk.length maybe less than desired size if the stream ends. resolve(this.toUint8Array(chunk)); - this._readable.removeListener("readable", callback); + this._readable.removeListener("readable", readableCallback); + this._readable.removeListener("error", reject); + this._readable.removeListener("end", reject); + this._readable.removeListener("close", reject); } }; - this._readable.on("readable", callback); - this._readable.once("error", reject); - this._readable.once("end", reject); - this._readable.once("close", reject); + + const rejectCallback = () => { + this._readable.removeListener("readable", readableCallback); + this._readable.removeListener("error", rejectCallback); + this._readable.removeListener("end", rejectCallback); + this._readable.removeListener("close", rejectCallback); + reject(); + }; + + this._readable.on("readable", readableCallback); + this._readable.once("error", rejectCallback); + this._readable.once("end", rejectCallback); + this._readable.once("close", rejectCallback); }); } } From 680d9523ae9d739c8400c22d1c02d67f378199e2 Mon Sep 17 00:00:00 2001 From: xiaonlimsft Date: Tue, 9 Jun 2020 11:36:59 +0800 Subject: [PATCH 06/39] [Storage] Dec19 - Quickquery (#9112) * [Storage] Quick query * [Storage] Quick query API review * [Storage] Quick query recording * [Storage] Quick query test case update * [Storage] Resolve comments --- common/config/rush/pnpm-lock.yaml | 117 ++-- sdk/storage/storage-blob/CHANGELOG.md | 4 + sdk/storage/storage-blob/package.json | 3 +- ..._with_access_conditions_ifmodifiedsince.js | 66 +++ ...not_work_with_access_conditions_leaseid.js | 66 +++ .../recording_query_should_work.js | 66 +++ ...ecording_query_should_work_with_aborter.js | 66 +++ ...uery_should_work_with_access_conditions.js | 66 +++ ..._query_should_work_with_blob_properties.js | 66 +++ ...ith_csv_input_and_output_configurations.js | 66 +++ ...ng_query_should_work_with_empty_results.js | 66 +++ ...uery_should_work_with_fatal_error_event.js | 66 +++ ...th_json_input_and_output_configurations.js | 66 +++ ...rding_query_should_work_with_large_file.js | 66 +++ ..._should_work_with_non_fatal_error_event.js | 66 +++ ...g_query_should_work_with_progress_event.js | 66 +++ ...cording_query_should_work_with_snapshot.js | 66 +++ ...ery_should_work_with_where_conditionals.js | 66 +++ .../storage-blob/review/storage-blob.api.md | 50 ++ .../src/BlobQueryResponse.browser.ts | 499 +++++++++++++++++ .../storage-blob/src/BlobQueryResponse.ts | 506 ++++++++++++++++++ sdk/storage/storage-blob/src/Clients.ts | 259 ++++++++- .../storage-blob/src/generatedModels.ts | 1 + .../src/utils/BlobQuickQueryStream.ts | 165 ++++++ .../storage-blob/src/utils/utils.common.ts | 47 +- .../storage-blob/test/node/blobclient.spec.ts | 303 ++++++++++- sdk/storage/storage-blob/test/utils/index.ts | 22 +- .../storage-internal-avro/package.json | 2 +- 28 files changed, 2899 insertions(+), 69 deletions(-) create mode 100644 sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_not_work_with_access_conditions_ifmodifiedsince.js create mode 100644 sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_not_work_with_access_conditions_leaseid.js create mode 100644 sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work.js create mode 100644 sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_aborter.js create mode 100644 sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_access_conditions.js create mode 100644 sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_blob_properties.js create mode 100644 sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_csv_input_and_output_configurations.js create mode 100644 sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_empty_results.js create mode 100644 sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_fatal_error_event.js create mode 100644 sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_json_input_and_output_configurations.js create mode 100644 sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_large_file.js create mode 100644 sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_non_fatal_error_event.js create mode 100644 sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_progress_event.js create mode 100644 sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_snapshot.js create mode 100644 sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_where_conditionals.js create mode 100644 sdk/storage/storage-blob/src/BlobQueryResponse.browser.ts create mode 100644 sdk/storage/storage-blob/src/BlobQueryResponse.ts create mode 100644 sdk/storage/storage-blob/src/utils/BlobQuickQueryStream.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index c9cfa0167905..b79e36ff9d82 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -107,6 +107,14 @@ packages: dev: false resolution: integrity: sha512-pkFCw6OiJrpR+aH1VQe6DYm3fK2KWCC5Jf3m/Pv1RxF08M1Xm08RCyQ5Qe0YyW5L16yYT2nnV48krVhYZ6SGFA== + /@azure/core-tracing/1.0.0-preview.8: + dependencies: + '@opencensus/web-types': 0.0.7 + '@opentelemetry/api': 0.6.1 + tslib: 1.11.1 + dev: false + resolution: + integrity: sha512-ZKUpCd7Dlyfn7bdc+/zC/sf0aRIaNQMDuSj2RhYRFe3p70hVAnYGp3TX4cnG2yoEALp/LTj/XnZGQ8Xzf6Ja/Q== /@azure/eslint-plugin-azure-sdk/2.0.1_9e31f0f459c1656d0a7ef30429cc70f8: dependencies: '@typescript-eslint/parser': 2.27.0_eslint@6.8.0+typescript@3.8.3 @@ -5684,6 +5692,12 @@ packages: dev: false resolution: integrity: sha512-qj4LSEykJ0SEYESQLg9Vee6VXH5xHN1pYj7ozPeUk+l+S1OaGKx1FugAu+g+3pPwK46WXV1PJD9XiRx8+tS4cw== + /rhea/1.0.21: + dependencies: + debug: 3.2.6 + dev: false + resolution: + integrity: sha512-9ddxyJR0nlWmynukzZTWN+bSYWu7KLHVMkIH/7PpFG5RHfV5t7zXIfZ6rqJSJe9wBAgnNr2Xz41KM2nPujWiFQ== /rimraf/2.6.3: dependencies: glob: 7.1.6 @@ -7303,12 +7317,12 @@ packages: dev: false name: '@rush-temp/abort-controller' resolution: - integrity: sha512-fucn99HAuY7tI+KhWCZJUEnokpmiMCibhQlvJ6PyhsYwNkvvmCN1LAqTPvbmNnqGgpzEpbiLUItaD+ao1C5hqQ== + integrity: sha512-+U50rbtOuP97e6o1LzJHG461q/ATB9T6B9X7nFmakGCLoaM+9IJ5Uy24i0Wl53FLewyKPt4JIgG74uSthuuFfQ== tarball: 'file:projects/abort-controller.tgz' version: 0.0.0 'file:projects/ai-form-recognizer.tgz': dependencies: - '@azure/core-tracing': 1.0.0-preview.7 + '@azure/core-tracing': 1.0.0-preview.8 '@microsoft/api-extractor': 7.7.11 '@opentelemetry/api': 0.6.1 '@opentelemetry/types': 0.2.0 @@ -7365,12 +7379,12 @@ packages: dev: false name: '@rush-temp/ai-form-recognizer' resolution: - integrity: sha512-drftp8AmeOVBMm6hfpBJnt/OziXXLqhNWfZo1oLqfQSBISJxghr/apNc4CKrcSp9qURbWaJkeANWuHxIVeYndQ== + integrity: sha512-S7DeKnzahpdWfC5DkYUYawPn+AZQoXPDRfNrVw9aAQ/Sx2EgXBl0kyPw1KjDEGx5gPfv3vX9d7I4MySf2gKBKw== tarball: 'file:projects/ai-form-recognizer.tgz' version: 0.0.0 'file:projects/ai-text-analytics.tgz': dependencies: - '@azure/core-tracing': 1.0.0-preview.7 + '@azure/core-tracing': 1.0.0-preview.8 '@microsoft/api-extractor': 7.7.11 '@opentelemetry/api': 0.6.1 '@opentelemetry/types': 0.2.0 @@ -7425,12 +7439,12 @@ packages: dev: false name: '@rush-temp/ai-text-analytics' resolution: - integrity: sha512-QcTeJNiCvAElVSE1bN60A0+dFQxse/nDD/RuVoKRPDx8cUaiyAg+CReDzqsULIHFxl7wK2haQJ50NkjZtnHMQA== + integrity: sha512-0h0t7T1G3FanBlSu7gQaeigaX8F4Q6p2e+zkeh73smykH9DXnNtkiaczzbosEODnaeq0Bnn4iEXDStk/mqrXnw== tarball: 'file:projects/ai-text-analytics.tgz' version: 0.0.0 'file:projects/app-configuration.tgz': dependencies: - '@azure/core-tracing': 1.0.0-preview.7 + '@azure/core-tracing': 1.0.0-preview.8 '@microsoft/api-extractor': 7.7.11 '@opentelemetry/api': 0.6.1 '@opentelemetry/types': 0.2.0 @@ -7469,7 +7483,7 @@ packages: dev: false name: '@rush-temp/app-configuration' resolution: - integrity: sha512-QesKkz6aJwUt+oVkUzm4ESihvMHTjl1/Ims68Ue1i9H7jevsWAMDX+U1G+7rb0xCtx013PZdoedC9Qb6dsj/fg== + integrity: sha512-eqUTjcKmzKdmatFRLb/vYOOsUmvWygq+Simg4HuMa8E87xSm55mD2LFtqwRUhtYaWh0y739viBXjO5663aAgjQ== tarball: 'file:projects/app-configuration.tgz' version: 0.0.0 'file:projects/core-amqp.tgz': @@ -7519,7 +7533,7 @@ packages: prettier: 1.19.1 process: 0.11.10 puppeteer: 2.1.1 - rhea: 1.0.20 + rhea: 1.0.21 rhea-promise: 1.0.0 rimraf: 3.0.2 rollup: 1.32.1 @@ -7537,7 +7551,7 @@ packages: dev: false name: '@rush-temp/core-amqp' resolution: - integrity: sha512-WyiTsNG2N2Oo6otWDYC8d8JPb4JCIIOtNJ9yb0O9eieETT43yPLHego/gKATaIiNQLtM1nXytcT3j81Pg9qK8w== + integrity: sha512-NdEb9MmK1wTvolMck3O7SchTQRpdvTeJsWLPjaXj4lfhKiE+6UkHkiltM4Hz19Pse6P11CLQOfN0DEbV3kEEIA== tarball: 'file:projects/core-amqp.tgz' version: 0.0.0 'file:projects/core-arm.tgz': @@ -7570,7 +7584,7 @@ packages: dev: false name: '@rush-temp/core-arm' resolution: - integrity: sha512-YX/po4ul39/S1cXgGUdPGYN8uIIK+922fRiN80ruwna7ksfF8OJH46rJcUTUijU5INvWaRPq8YNVJcMQNLqXZw== + integrity: sha512-1qMPTU5XX+O3mEz4qLE0XDqGlnMxYZn/m6/6/Z5tx8b4Ax/SbMlhA0ZAc/HxZmGuOxVo//aN3rSWatio1drukg== tarball: 'file:projects/core-arm.tgz' version: 0.0.0 'file:projects/core-asynciterator-polyfill.tgz': @@ -7588,12 +7602,12 @@ packages: dev: false name: '@rush-temp/core-asynciterator-polyfill' resolution: - integrity: sha512-GeOzC1ryAneCbgzn+3oZeAN8nK5cyWWXEKepTXBESWzcAXy6mv0z0N7qmlK6XwRPGp4UuF9ZLSVbLGl4eNAiYA== + integrity: sha512-69f+DjfbfiipGVM6Vx0KXehWvmc5YstJn+Fayg8f1/OzRbqIBw1skZTIxQATkZUOOSFHhYg5ALjbkdNRTNgMng== tarball: 'file:projects/core-asynciterator-polyfill.tgz' version: 0.0.0 'file:projects/core-auth.tgz': dependencies: - '@azure/core-tracing': 1.0.0-preview.7 + '@azure/core-tracing': 1.0.0-preview.8 '@azure/eslint-plugin-azure-sdk': 2.0.1_9e31f0f459c1656d0a7ef30429cc70f8 '@microsoft/api-extractor': 7.7.11 '@opentelemetry/api': 0.6.1 @@ -7630,12 +7644,12 @@ packages: dev: false name: '@rush-temp/core-auth' resolution: - integrity: sha512-a8h+Fir7HdvM06N5A+BKxvig7SmvI2pQPUnVNoL2HWpuW5wdcelVyVpODYRiA43kNPsodP0AIlqWJSZOPnwtiw== + integrity: sha512-XOCLdTLVtEDNsvnHXQQ3g9x/3cuc0i+gPMzAVW07gtkfaGsad9L21SwkuDj56HOscIcUpBlY/RH+HS5wvZVBBA== tarball: 'file:projects/core-auth.tgz' version: 0.0.0 'file:projects/core-http.tgz': dependencies: - '@azure/core-tracing': 1.0.0-preview.7 + '@azure/core-tracing': 1.0.0-preview.8 '@azure/eslint-plugin-azure-sdk': 2.0.1_9e31f0f459c1656d0a7ef30429cc70f8 '@azure/logger-js': 1.3.2 '@microsoft/api-extractor': 7.7.11 @@ -7708,7 +7722,7 @@ packages: dev: false name: '@rush-temp/core-http' resolution: - integrity: sha512-o5d9utUNW5fOZiD50gQMojx/D99pkyzqaqVf5t//U57WVmNdQqS6NAfOZoOPGcR6ZLFONC99mr+ag9+NrXM0PQ== + integrity: sha512-C3Rzc3Ll8X1bMewSo78GuDbLJrBvlG934evHz110L/pbHgkIMpwCHZgeyCiu+4BX7+J5hvMr9n4+a9nO6o7MZQ== tarball: 'file:projects/core-http.tgz' version: 0.0.0 'file:projects/core-https.tgz': @@ -7759,7 +7773,7 @@ packages: dev: false name: '@rush-temp/core-https' resolution: - integrity: sha512-5s+/AXXkUm6xKyWG76eHP8iwXBMRODjucZlD/LKco8qQr6Ifq9z3FJvom0bXgF+9RxZvJR+jamClpANN87GeDQ== + integrity: sha512-ghT8B1K5CYEO7RLp2joI4uvwHB62Y5bUjRF2z8oZgK582YvdCWUJmiPVExpY8pGK+/5hnPRg49LSEbmWu6Vaeg== tarball: 'file:projects/core-https.tgz' version: 0.0.0 'file:projects/core-lro.tgz': @@ -7815,7 +7829,7 @@ packages: dev: false name: '@rush-temp/core-lro' resolution: - integrity: sha512-JWz73NQbYiVhdyucClGyfF5PugpQH362xVQUWoK06fTqj38XsKzDXXiixzUHcZ5Et+5y5B21XhbJS9591q3ERw== + integrity: sha512-rFIGXMcDoORghUnDOFgkyV1b9j22vLg2WtsAinDKtg8rspMwqYX7CJaSY+v1AIsfCrEwLtlueSitAQuE8NYpJQ== tarball: 'file:projects/core-lro.tgz' version: 0.0.0 'file:projects/core-paging.tgz': @@ -7833,7 +7847,7 @@ packages: dev: false name: '@rush-temp/core-paging' resolution: - integrity: sha512-/N5f2+zh/3u+Vzd2RO7LAN5bZDVNuSjwFG34BQ/WPODnc8xBrlwNySSh5RfDiPFGt5DmccPjFneKkYqHhA5aqg== + integrity: sha512-YM2ktK/Xu8ZPTM8d3yWvGN1SdHr+Ekw3j6bu8PcxVO8PjCqkkQZ/cetvFKWRJtiApxNjMRC+YnBbPRgRhn8nWA== tarball: 'file:projects/core-paging.tgz' version: 0.0.0 'file:projects/core-tracing.tgz': @@ -7874,7 +7888,7 @@ packages: dev: false name: '@rush-temp/core-tracing' resolution: - integrity: sha512-6lNv0IiPu0TlqcRff8jI141AEY7u/AQxmVK0+H8R+sFgB6T+ZW80B1sqOAW3GjHnKKtNQ8M8l+2SHtzHtF87PQ== + integrity: sha512-GAOODMqIJbrrtg5NvzYVmeU5oEyw31NbKJvcgXZJuCvoL+UjHxAXhhl5oShvgKx54Z6OqSDcmHgWJi2sWAKTHw== tarball: 'file:projects/core-tracing.tgz' version: 0.0.0 'file:projects/cosmos.tgz': @@ -7935,7 +7949,7 @@ packages: dev: false name: '@rush-temp/cosmos' resolution: - integrity: sha512-KcNatflolF0H1D+j96XYj3y8saZJ5+c8l5aQ6AjzViYSJJ4/Myc6OI2/NnFBxaz1udObzhBF2lPivJSCo7CQOA== + integrity: sha512-KQvL7GazobTLvfKydVCzGymriq5ryD4MWzKdofwEG0KYiQf/UANkqcVagjJjGJhUg6ivN9iLOKztCMvHyj0VFw== tarball: 'file:projects/cosmos.tgz' version: 0.0.0 'file:projects/eslint-plugin-azure-sdk.tgz': @@ -7968,12 +7982,12 @@ packages: dev: false name: '@rush-temp/eslint-plugin-azure-sdk' resolution: - integrity: sha512-NtNxYK027+o01SFWabyun9+UUx+C7GUrLMUyPLbDR055avcHRvYJA2lJdVJgSUuKq6VfsfKdMNMoSqtxUshHrA== + integrity: sha512-4rgkTckc9Q3R25MDEIybhrx1ZpMwK6PXTh2/cLjbpZ04+AVT0yctfN5HQuFKWOoJ/j/duroFLNoTs38/dsgtRA== tarball: 'file:projects/eslint-plugin-azure-sdk.tgz' version: 0.0.0 'file:projects/event-hubs.tgz': dependencies: - '@azure/core-tracing': 1.0.0-preview.7 + '@azure/core-tracing': 1.0.0-preview.8 '@azure/eslint-plugin-azure-sdk': 2.0.1_9e31f0f459c1656d0a7ef30429cc70f8 '@microsoft/api-extractor': 7.7.11 '@opentelemetry/api': 0.6.1 @@ -8048,7 +8062,7 @@ packages: dev: false name: '@rush-temp/event-hubs' resolution: - integrity: sha512-SvD3McUNYWtff0uFqaogeUbmRCdqLiwVUsRO7SrkIjdVazSydRCU5cl5IUGRKCQ4IMPzGkbXN/yyN1tmG45uGw== + integrity: sha512-l6eRUH+L5Yh7Ddob1ydBnri28dFbcnPrIwuAl6D02yO7HcAKEJeAMvIMtHdsToxVyeccOsdKkXjcNhs1tUCtWg== tarball: 'file:projects/event-hubs.tgz' version: 0.0.0 'file:projects/event-processor-host.tgz': @@ -8105,7 +8119,7 @@ packages: dev: false name: '@rush-temp/event-processor-host' resolution: - integrity: sha512-Pb59V8L43tgDpEAVJucokv8rqlzzPXjPstVBV0S52R+/99013T2BJ0ow/OsTomhEZ3dgPtzuGrKvgese3sEbwQ== + integrity: sha512-o0lja9JmvdssBTAv5EqriAn2EQ3/xc3EQOFfbtHmwVSdlmXANyFx69xu7mcWnGd3dvDfJVCCYnlEC8ZN6LX5dw== tarball: 'file:projects/event-processor-host.tgz' version: 0.0.0 'file:projects/eventhubs-checkpointstore-blob.tgz': @@ -8169,12 +8183,12 @@ packages: dev: false name: '@rush-temp/eventhubs-checkpointstore-blob' resolution: - integrity: sha512-+JoABbLpCHclRXiaCyzgMO5d7BBpb7L9614AkI4JVFNLlomKjLchuwi49D0PwdRFCXCjjqAUXlvFbqecKFs1Xw== + integrity: sha512-UOWIkdN9h/drjlrM19TQ9n2F90F87ve76xhXc4vS6G9MgbDf4/DEJVghHMaavVkWRk8t4hzouyY86E7iwiHkLg== tarball: 'file:projects/eventhubs-checkpointstore-blob.tgz' version: 0.0.0 'file:projects/identity.tgz': dependencies: - '@azure/core-tracing': 1.0.0-preview.7 + '@azure/core-tracing': 1.0.0-preview.8 '@microsoft/api-extractor': 7.7.11 '@opentelemetry/api': 0.6.1 '@opentelemetry/types': 0.2.0 @@ -8226,12 +8240,12 @@ packages: dev: false name: '@rush-temp/identity' resolution: - integrity: sha512-bIsS2X1xbQBtKNKXnTjXoS4A3jP8JUw5hzuxKTpVuVzyrvZWc2KM0Wb9EdSayFWXPRVtS51MUP7NA9DgtfuMzQ== + integrity: sha512-ZMogVt0EVtES/40MkMWXhfAillgcml9v8rK4KtH9x5l5Q1rBdlfN2nwLA7/fGtWd6kwmY6KezRCrM4TaPnksNA== tarball: 'file:projects/identity.tgz' version: 0.0.0 'file:projects/keyvault-certificates.tgz': dependencies: - '@azure/core-tracing': 1.0.0-preview.7 + '@azure/core-tracing': 1.0.0-preview.8 '@azure/eslint-plugin-azure-sdk': 2.0.1_9e31f0f459c1656d0a7ef30429cc70f8 '@microsoft/api-extractor': 7.7.11 '@opentelemetry/api': 0.6.1 @@ -8292,12 +8306,12 @@ packages: dev: false name: '@rush-temp/keyvault-certificates' resolution: - integrity: sha512-Jn9KFNDBX87QBJ1Lcjp78dYcE+dsMg5rYpio/JeY0V2mWlNdh7qTKLvCNYDBGbLA74vByV3WeKwIQryHAi+05g== + integrity: sha512-8zMe3ibaW81OgzRunWJHW57GK5WXNhYwHEwrl4Z9/whvItZgPGuk9F7E+S5PIRk801MRfO8Ipq9YpL7co9Sa2A== tarball: 'file:projects/keyvault-certificates.tgz' version: 0.0.0 'file:projects/keyvault-keys.tgz': dependencies: - '@azure/core-tracing': 1.0.0-preview.7 + '@azure/core-tracing': 1.0.0-preview.8 '@azure/eslint-plugin-azure-sdk': 2.0.1_9e31f0f459c1656d0a7ef30429cc70f8 '@microsoft/api-extractor': 7.7.11 '@opentelemetry/api': 0.6.1 @@ -8358,12 +8372,12 @@ packages: dev: false name: '@rush-temp/keyvault-keys' resolution: - integrity: sha512-eoe4wq30U9rGPBp+IAHTibqqR8RCZQ0ijWtJutDZ8WaiHbmIKaSFbQRY1A0+N/xSYHSKrcZDwTZC3cEpeWHa9A== + integrity: sha512-9qXoMnPOjenPLWHxP0t3sk59kTP7yTEHUkk+6G+RKB0R5ZJNf+nx0hRiD60O49zi3+dyOoiNkoQ1xPupOsXM9w== tarball: 'file:projects/keyvault-keys.tgz' version: 0.0.0 'file:projects/keyvault-secrets.tgz': dependencies: - '@azure/core-tracing': 1.0.0-preview.7 + '@azure/core-tracing': 1.0.0-preview.8 '@azure/eslint-plugin-azure-sdk': 2.0.1_9e31f0f459c1656d0a7ef30429cc70f8 '@microsoft/api-extractor': 7.7.11 '@opentelemetry/api': 0.6.1 @@ -8424,7 +8438,7 @@ packages: dev: false name: '@rush-temp/keyvault-secrets' resolution: - integrity: sha512-PjKc2VsK3yhM2nLsw1SEAqNOeKw3mK5APQ/6AJC2QyHWP/lDYghPHH6ep/78LBThcm5K9uLFMwM49ZLnYsnY+A== + integrity: sha512-9cHdwrE0M3YNfql2qQG1mHrppa2CQEKFL3IqrnD7A61UQW2NBWWwCeuESIWXkTb9nkX0he+E8XW5hvIklyDH8A== tarball: 'file:projects/keyvault-secrets.tgz' version: 0.0.0 'file:projects/logger.tgz': @@ -8477,12 +8491,12 @@ packages: dev: false name: '@rush-temp/logger' resolution: - integrity: sha512-ut5SiKtmdY3S/GA/IShEHhh85rP1p2m/zlP2GrW/JSdKx2w/MNIFCNT/2JJmC2tfy6ye4hWvwIt2v95rWckI0g== + integrity: sha512-MhNFck4q25CPlZFkorhQezRsAXK9Z/TNs5GGF0Ng0JB1c2hOu3VzR9p3SQ8e1l9yKZpEriD009K1Sz9mn8tl7g== tarball: 'file:projects/logger.tgz' version: 0.0.0 'file:projects/search-documents.tgz': dependencies: - '@azure/core-tracing': 1.0.0-preview.7 + '@azure/core-tracing': 1.0.0-preview.8 '@microsoft/api-extractor': 7.7.11 '@opentelemetry/api': 0.6.1 '@opentelemetry/types': 0.2.0 @@ -8537,11 +8551,12 @@ packages: dev: false name: '@rush-temp/search-documents' resolution: - integrity: sha512-dSUxmkUpg7gC0P73FvSLK5Fr4E8WGpdgaycSvR4ZSA69VpYIodX65aU7uyfkHrpuFCkydY7fbBbaXYiWfmvLTA== + integrity: sha512-NZTV+lS2jZrfA1ylRg2mQ8BVZNF1709uChNt5oMi1x0A/+n0krX2Fox27sYf7tDrVdsM1IOt4nPIuopG49p7IQ== tarball: 'file:projects/search-documents.tgz' version: 0.0.0 'file:projects/service-bus.tgz': dependencies: + '@azure/core-tracing': 1.0.0-preview.8 '@azure/eslint-plugin-azure-sdk': 2.0.1_9e31f0f459c1656d0a7ef30429cc70f8 '@microsoft/api-extractor': 7.7.11 '@opentelemetry/api': 0.6.1 @@ -8616,12 +8631,12 @@ packages: dev: false name: '@rush-temp/service-bus' resolution: - integrity: sha512-ySmiDTgbTBpMYgXNSDGpIzuHs+5raDZenJw/jEBXhioOYpNXL+oDYK5EZQ5S+BKMCmGXOD7QvrpQortMrf3IrA== + integrity: sha512-b828xmJrpi/+VYklayvTWJdkjz/Qvl6R7n2VGqZ1FuRcrruU4guNtaXPLr2CbUonsWeihhv5qhXKR4lc+j5ciQ== tarball: 'file:projects/service-bus.tgz' version: 0.0.0 'file:projects/storage-blob.tgz': dependencies: - '@azure/core-tracing': 1.0.0-preview.7 + '@azure/core-tracing': 1.0.0-preview.8 '@microsoft/api-extractor': 7.7.11 '@opentelemetry/api': 0.6.1 '@opentelemetry/types': 0.2.0 @@ -8678,12 +8693,12 @@ packages: dev: false name: '@rush-temp/storage-blob' resolution: - integrity: sha512-qNcuXw81uBfRLvrBeMcFs/hCXl6FCAglnFkswE98KtSV3Pj2rtxYPQWJxG4/O2GkzCRyVkgxYtfb9uDTYJXZ8w== + integrity: sha512-C9XlnxCE4aMhIOrRe5C9tT3/keD6MMAguq/1rUgruetoHeYnAd1q65NGI5YuKKIQ3BfGo3YYiLC/rOu1F3S8og== tarball: 'file:projects/storage-blob.tgz' version: 0.0.0 'file:projects/storage-file-datalake.tgz': dependencies: - '@azure/core-tracing': 1.0.0-preview.7 + '@azure/core-tracing': 1.0.0-preview.8 '@microsoft/api-extractor': 7.7.11 '@opentelemetry/api': 0.6.1 '@opentelemetry/types': 0.2.0 @@ -8748,12 +8763,12 @@ packages: dev: false name: '@rush-temp/storage-file-datalake' resolution: - integrity: sha512-ax+/3IKbvusjZpXmloEUa+6cQrULHB6eHFpd6dNzQmQ0a1QOIg3n5uHIEY2X/1kQCOkcMWVITX+imkz6b9Gv2A== + integrity: sha512-JPD7i5Im/tbFEYgIQyG6j1tzyNcVXXHzWjGkX1Njz/UtVVKp+2zDGj2e7/WFv5z5Tjmq2h/L6H3M9hUIMHs/Lw== tarball: 'file:projects/storage-file-datalake.tgz' version: 0.0.0 'file:projects/storage-file-share.tgz': dependencies: - '@azure/core-tracing': 1.0.0-preview.7 + '@azure/core-tracing': 1.0.0-preview.8 '@microsoft/api-extractor': 7.7.11 '@opentelemetry/api': 0.6.1 '@opentelemetry/types': 0.2.0 @@ -8810,7 +8825,7 @@ packages: dev: false name: '@rush-temp/storage-file-share' resolution: - integrity: sha512-Kzv6N1reNbnI8qxNbwPIXTbMwBaDP9S43wPHoL8akm3ooY8ftesQtF6qCj39Tfw1HozCojH1QRdyahlqIAnTRg== + integrity: sha512-0b+vEmFEbM8wc0JboG10ufdwj5f4JdIWbHtznsOPa4/kgYZBmgPC7akvBkp0JjDpDIEYY94lxqIPIUAzNVPnhg== tarball: 'file:projects/storage-file-share.tgz' version: 0.0.0 'file:projects/storage-internal-avro.tgz': @@ -8868,12 +8883,12 @@ packages: dev: false name: '@rush-temp/storage-internal-avro' resolution: - integrity: sha512-xQ/8G7hl1NT0N067xLF7XdeD/Fhh+tiMlwEenqOHiUIZ8eMexdCJ5+MhnFOq33oqjMD8dcKku4BjyKQrXBFERg== + integrity: sha512-X0WQbD89y7TmMIh5RWV623zVmKy6McHbS7J5t8Du5xXcdA8p8Ry19Xgi5X74ho0Ib/56YEKHeo3QXpiZiteDcQ== tarball: 'file:projects/storage-internal-avro.tgz' version: 0.0.0 'file:projects/storage-queue.tgz': dependencies: - '@azure/core-tracing': 1.0.0-preview.7 + '@azure/core-tracing': 1.0.0-preview.8 '@microsoft/api-extractor': 7.7.11 '@opentelemetry/api': 0.6.1 '@opentelemetry/types': 0.2.0 @@ -8929,7 +8944,7 @@ packages: dev: false name: '@rush-temp/storage-queue' resolution: - integrity: sha512-WcfDHWEOKo17l6dpW4UFbHJgEzQd438F+F61uequ6uc6OH1XAQ/QUU5dWGYiJz+/SU11vyfIW81ZiRsiihQMdg== + integrity: sha512-wdtM6V3zw/sz6aAZgPG6aZMtVvfeTnzrtuc+SEB/pNQ5s2agzcVn1ilkYxL/KzIuy8J/gWBzK4BQcOY+232H0w== tarball: 'file:projects/storage-queue.tgz' version: 0.0.0 'file:projects/template.tgz': @@ -8980,7 +8995,7 @@ packages: dev: false name: '@rush-temp/template' resolution: - integrity: sha512-SrFwboYgyY0oI9obo6qPlcpZ0FiIxmcLg6ZycXRo1iFkJB0/vHSXLn1lZZvQK8VylbZm0j/78chAiP47Y1bNSg== + integrity: sha512-fez95uatWabkhoMC1/bs/GdMSbARJCHPDKBTvLYcriT92DHo483rgZhnrN+KK/KsdAtAAe+NQwc57kR3Axo4ug== tarball: 'file:projects/template.tgz' version: 0.0.0 'file:projects/test-utils-perfstress.tgz': @@ -9008,7 +9023,7 @@ packages: dev: false name: '@rush-temp/test-utils-perfstress' resolution: - integrity: sha512-imbSa1ojeg4y7eaJf9nHwEW7Cz/gPC6VypvpOS8vhqcu28SzLy81hclUOvEHDDzG1Nunfp73qhE3Eygirq2CFQ== + integrity: sha512-4ZLFBeVDO2cVkeIIQOdTOZx/9voPj+vrJuEvp18smNkJ36vFb0h7RqbNPVfzCO8F756AvCPsIpKcA7xvJnujwQ== tarball: 'file:projects/test-utils-perfstress.tgz' version: 0.0.0 'file:projects/test-utils-recorder.tgz': @@ -9069,7 +9084,7 @@ packages: dev: false name: '@rush-temp/test-utils-recorder' resolution: - integrity: sha512-76FDvsZfN/8ax+b5588w5VrnCxbTcCvlMJPaDzc5dFn4VaTKY38YH1MlLEHk2UpNuR+8oCBZ1LIlZfGWMCkVwA== + integrity: sha512-C1muEQ5h7AVq2wY2lR5FIYNg1dy8p8CZ+446TbVcN744D37bc7P4kI+Wn+MXB6twOyT390AVX8qN7TSSCuqRMQ== tarball: 'file:projects/test-utils-recorder.tgz' version: 0.0.0 'file:projects/testhub.tgz': @@ -9081,7 +9096,7 @@ packages: async-lock: 1.2.2 death: 1.1.0 debug: 4.1.1 - rhea: 1.0.20 + rhea: 1.0.21 rimraf: 3.0.2 tslib: 1.11.1 typescript: 3.8.3 @@ -9090,7 +9105,7 @@ packages: dev: false name: '@rush-temp/testhub' resolution: - integrity: sha512-SEdEggE9o4zPC0gonCdcDQ4mIEyVF5EwJsLshA0dkWW+oL5I8LMIFzy2NOiqo+CmIishltIA13FmX4SoSUw/BA== + integrity: sha512-Z6HTwhIIFE79DucKmLYyHiLO/5MWSxWLowoNyqcCIJgl0p54t1oRpa6SRRiVZwrTwzkLU5iA8vrYAnUmfSeGbQ== tarball: 'file:projects/testhub.tgz' version: 0.0.0 registry: '' diff --git a/sdk/storage/storage-blob/CHANGELOG.md b/sdk/storage/storage-blob/CHANGELOG.md index 79f80e115b68..6f3025ce9a2d 100644 --- a/sdk/storage/storage-blob/CHANGELOG.md +++ b/sdk/storage/storage-blob/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History +## 12.2.0 (2020.06) + +- Supported quick query. Added a new API `BlockBlobClient.query()`. + ## 12.1.2 (2020.05) - Fix data corruption failure error [issue #6411](https://github.com/Azure/azure-sdk-for-js/issues/6411) when downloading compressed files. [PR #7993](https://github.com/Azure/azure-sdk-for-js/pull/7993) diff --git a/sdk/storage/storage-blob/package.json b/sdk/storage/storage-blob/package.json index cb34751f9145..52f6f685021c 100644 --- a/sdk/storage/storage-blob/package.json +++ b/sdk/storage/storage-blob/package.json @@ -12,6 +12,7 @@ "./dist-esm/storage-blob/test/utils/index.js": "./dist-esm/storage-blob/test/utils/index.browser.js", "./dist-esm/storage-blob/src/BatchUtils.js": "./dist-esm/storage-blob/src/BatchUtils.browser.js", "./dist-esm/storage-blob/src/BlobDownloadResponse.js": "./dist-esm/storage-blob/src/BlobDownloadResponse.browser.js", + "./dist-esm/storage-blob/src/BlobQueryResponse.js": "./dist-esm/storage-blob/src/BlobQueryResponse.browser.js", "fs": false, "os": false, "process": false @@ -162,4 +163,4 @@ "typescript": "~3.8.3", "util": "^0.12.1" } -} \ No newline at end of file +} diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_not_work_with_access_conditions_ifmodifiedsince.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_not_work_with_access_conditions_ifmodifiedsince.js new file mode 100644 index 000000000000..9d20893531fa --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_not_work_with_access_conditions_ifmodifiedsince.js @@ -0,0 +1,66 @@ +let nock = require('nock'); + +module.exports.hash = "d3a5406b3267717674c01d19eb9a0cd6"; + +module.exports.testInfo = {"uniqueName":{"container":"container159049020600707788","blob":"blob159049020631105138"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159049020600707788') + .query(true) + .reply(201, "", [ 'Transfer-Encoding', + 'chunked', + 'Last-Modified', + 'Tue, 26 May 2020 10:50:06 GMT', + 'ETag', + '"0x8D801628D44D052"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc43fc-101e-000c-484b-3321fe000000', + 'x-ms-client-request-id', + 'd44ec425-3d70-4b48-bbfd-500af3079a59', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Tue, 26 May 2020 10:50:05 GMT' ]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159049020600707788/blob159049020631105138', "Hello World") + .reply(201, "", [ 'Transfer-Encoding', + 'chunked', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Tue, 26 May 2020 10:50:06 GMT', + 'ETag', + '"0x8D801628D735F65"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc43fe-101e-000c-494b-3321fe000000', + 'x-ms-client-request-id', + 'c0445632-63ee-4873-85d8-3ec4ffd1c1af', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'Date', + 'Tue, 26 May 2020 10:50:06 GMT' ]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159049020600707788') + .query(true) + .reply(202, "", [ 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc43ff-101e-000c-4a4b-3321fe000000', + 'x-ms-client-request-id', + 'c5e790f4-af27-4916-b2cd-73923c270e28', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Tue, 26 May 2020 10:50:06 GMT' ]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_not_work_with_access_conditions_leaseid.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_not_work_with_access_conditions_leaseid.js new file mode 100644 index 000000000000..0b06ff09f2ff --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_not_work_with_access_conditions_leaseid.js @@ -0,0 +1,66 @@ +let nock = require('nock'); + +module.exports.hash = "fdc46dc8a237d6cac45f8cfb615e46d8"; + +module.exports.testInfo = {"uniqueName":{"container":"container159049020712800511","blob":"blob159049020739900152"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159049020712800511') + .query(true) + .reply(201, "", [ 'Transfer-Encoding', + 'chunked', + 'Last-Modified', + 'Tue, 26 May 2020 10:50:07 GMT', + 'ETag', + '"0x8D801628DEFAE67"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc4400-101e-000c-4b4b-3321fe000000', + 'x-ms-client-request-id', + '1d191125-143c-44e9-88d9-f32d56e36f07', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Tue, 26 May 2020 10:50:06 GMT' ]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159049020712800511/blob159049020739900152', "Hello World") + .reply(201, "", [ 'Transfer-Encoding', + 'chunked', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Tue, 26 May 2020 10:50:07 GMT', + 'ETag', + '"0x8D801628E193334"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc4403-101e-000c-4c4b-3321fe000000', + 'x-ms-client-request-id', + '80421d4f-2379-421e-93de-296fa2093306', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'Date', + 'Tue, 26 May 2020 10:50:07 GMT' ]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159049020712800511') + .query(true) + .reply(202, "", [ 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc4404-101e-000c-4d4b-3321fe000000', + 'x-ms-client-request-id', + '1a7d9c26-1258-45d6-b9dc-6a93fe8a06db', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Tue, 26 May 2020 10:50:07 GMT' ]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work.js new file mode 100644 index 000000000000..a95c400c9aea --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work.js @@ -0,0 +1,66 @@ +let nock = require('nock'); + +module.exports.hash = "b15cda823b3c55e24298837de650620e"; + +module.exports.testInfo = {"uniqueName":{"container":"container159049020245804719","blob":"blob159049020444905391"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159049020245804719') + .query(true) + .reply(201, "", [ 'Transfer-Encoding', + 'chunked', + 'Last-Modified', + 'Tue, 26 May 2020 10:50:04 GMT', + 'ETag', + '"0x8D801628C2B64CF"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc43f1-101e-000c-424b-3321fe000000', + 'x-ms-client-request-id', + '3e11d2ab-1a6f-4b8f-8c69-e072dcdf0dc8', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Tue, 26 May 2020 10:50:03 GMT' ]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159049020245804719/blob159049020444905391', "Hello World") + .reply(201, "", [ 'Transfer-Encoding', + 'chunked', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Tue, 26 May 2020 10:50:04 GMT', + 'ETag', + '"0x8D801628C58465E"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc43f4-101e-000c-434b-3321fe000000', + 'x-ms-client-request-id', + '463390ef-7745-4351-a496-80ee2e8534b9', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'Date', + 'Tue, 26 May 2020 10:50:04 GMT' ]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159049020245804719') + .query(true) + .reply(202, "", [ 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc43f6-101e-000c-444b-3321fe000000', + 'x-ms-client-request-id', + '6a16e255-713e-4358-a91b-514c044c7a56', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Tue, 26 May 2020 10:50:04 GMT' ]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_aborter.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_aborter.js new file mode 100644 index 000000000000..109a26357882 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_aborter.js @@ -0,0 +1,66 @@ +let nock = require('nock'); + +module.exports.hash = "ae6e959f9b0a752f4a32b51177efba69"; + +module.exports.testInfo = {"uniqueName":{"container":"container159049021276301570","blob":"blob159049021303507117"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159049021276301570') + .query(true) + .reply(201, "", [ 'Transfer-Encoding', + 'chunked', + 'Last-Modified', + 'Tue, 26 May 2020 10:50:12 GMT', + 'ETag', + '"0x8D80162914B8427"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc4420-101e-000c-614b-3321fe000000', + 'x-ms-client-request-id', + 'b39c7bca-7bfd-4c76-b6ed-aec46794d5f1', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Tue, 26 May 2020 10:50:11 GMT' ]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159049021276301570/blob159049021303507117', "Hello World") + .reply(201, "", [ 'Transfer-Encoding', + 'chunked', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Tue, 26 May 2020 10:50:13 GMT', + 'ETag', + '"0x8D80162917555A9"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc4422-101e-000c-624b-3321fe000000', + 'x-ms-client-request-id', + '79def682-2bcd-4b40-abf8-9158cfecf0ae', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'Date', + 'Tue, 26 May 2020 10:50:13 GMT' ]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159049021276301570') + .query(true) + .reply(202, "", [ 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc4423-101e-000c-634b-3321fe000000', + 'x-ms-client-request-id', + 'd97b06c9-2230-4cf6-a478-d719585cd306', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Tue, 26 May 2020 10:50:13 GMT' ]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_access_conditions.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_access_conditions.js new file mode 100644 index 000000000000..10aa5cecce0c --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_access_conditions.js @@ -0,0 +1,66 @@ +let nock = require('nock'); + +module.exports.hash = "96fefb99c10994e85cd42d9cabfa032c"; + +module.exports.testInfo = {"uniqueName":{"container":"container159049020501200734","blob":"blob159049020528500202"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159049020501200734') + .query(true) + .reply(201, "", [ 'Transfer-Encoding', + 'chunked', + 'Last-Modified', + 'Tue, 26 May 2020 10:50:05 GMT', + 'ETag', + '"0x8D801628CACE171"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc43f7-101e-000c-454b-3321fe000000', + 'x-ms-client-request-id', + '19fa1705-8ee5-4a18-8d95-7607f1c830f0', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Tue, 26 May 2020 10:50:04 GMT' ]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159049020501200734/blob159049020528500202', "Hello World") + .reply(201, "", [ 'Transfer-Encoding', + 'chunked', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Tue, 26 May 2020 10:50:05 GMT', + 'ETag', + '"0x8D801628CD6B4F4"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc43f9-101e-000c-464b-3321fe000000', + 'x-ms-client-request-id', + '454eb1f6-660a-4559-838b-49dead83fff0', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'Date', + 'Tue, 26 May 2020 10:50:05 GMT' ]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159049020501200734') + .query(true) + .reply(202, "", [ 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc43fa-101e-000c-474b-3321fe000000', + 'x-ms-client-request-id', + '959877c7-f652-4648-a15b-a6430ce10b18', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Tue, 26 May 2020 10:50:05 GMT' ]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_blob_properties.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_blob_properties.js new file mode 100644 index 000000000000..077822eab309 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_blob_properties.js @@ -0,0 +1,66 @@ +let nock = require('nock'); + +module.exports.hash = "8a0c2d5fbf6f1d5b0f8147a26e784795"; + +module.exports.testInfo = {"uniqueName":{"container":"container159049021092104171","blob":"blob159049021119406322"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159049021092104171') + .query(true) + .reply(201, "", [ 'Transfer-Encoding', + 'chunked', + 'Last-Modified', + 'Tue, 26 May 2020 10:50:11 GMT', + 'ETag', + '"0x8D8016290328DE9"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc4412-101e-000c-574b-3321fe000000', + 'x-ms-client-request-id', + '2db43313-3255-490a-a1dd-d9e32d7b23d6', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Tue, 26 May 2020 10:50:10 GMT' ]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159049021092104171/blob159049021119406322', "Hello World") + .reply(201, "", [ 'Transfer-Encoding', + 'chunked', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Tue, 26 May 2020 10:50:11 GMT', + 'ETag', + '"0x8D80162905C5FDD"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc4415-101e-000c-584b-3321fe000000', + 'x-ms-client-request-id', + '7ef7505d-cd8e-4e86-a350-4775105f82b3', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'Date', + 'Tue, 26 May 2020 10:50:10 GMT' ]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159049021092104171') + .query(true) + .reply(202, "", [ 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc441a-101e-000c-5d4b-3321fe000000', + 'x-ms-client-request-id', + '2b9441d3-d5c6-4776-8aa6-d8fd8f52b1d4', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Tue, 26 May 2020 10:50:10 GMT' ]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_csv_input_and_output_configurations.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_csv_input_and_output_configurations.js new file mode 100644 index 000000000000..8b7c7de87605 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_csv_input_and_output_configurations.js @@ -0,0 +1,66 @@ +let nock = require('nock'); + +module.exports.hash = "e040650f63a5e8c56babaa30c78ad498"; + +module.exports.testInfo = {"uniqueName":{"container":"container159049021675907732","blob":"blob159049021703108035"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159049021675907732') + .query(true) + .reply(201, "", [ 'Transfer-Encoding', + 'chunked', + 'Last-Modified', + 'Tue, 26 May 2020 10:50:16 GMT', + 'ETag', + '"0x8D8016293AD3BE9"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc4432-101e-000c-6d4b-3321fe000000', + 'x-ms-client-request-id', + 'd4c5bfcf-fe11-4814-979b-a7935de0bf46', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Tue, 26 May 2020 10:50:16 GMT' ]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159049021675907732/blob159049021703108035', "Hello World") + .reply(201, "", [ 'Transfer-Encoding', + 'chunked', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Tue, 26 May 2020 10:50:17 GMT', + 'ETag', + '"0x8D8016293D70C51"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc4434-101e-000c-6e4b-3321fe000000', + 'x-ms-client-request-id', + 'dd58bf1e-8f3e-4ea4-a435-25ce1f415d63', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'Date', + 'Tue, 26 May 2020 10:50:16 GMT' ]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159049021675907732') + .query(true) + .reply(202, "", [ 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc4436-101e-000c-6f4b-3321fe000000', + 'x-ms-client-request-id', + '5aa69791-9d06-47ed-b819-e866995b91af', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Tue, 26 May 2020 10:50:17 GMT' ]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_empty_results.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_empty_results.js new file mode 100644 index 000000000000..99a3d11e1e31 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_empty_results.js @@ -0,0 +1,66 @@ +let nock = require('nock'); + +module.exports.hash = "70b8f4226da6556dbebcefbdb4064498"; + +module.exports.testInfo = {"uniqueName":{"container":"container159049021000203886","blob":"blob159049021030405476"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159049021000203886') + .query(true) + .reply(201, "", [ 'Transfer-Encoding', + 'chunked', + 'Last-Modified', + 'Tue, 26 May 2020 10:50:10 GMT', + 'ETag', + '"0x8D801628FA660F9"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc440e-101e-000c-544b-3321fe000000', + 'x-ms-client-request-id', + 'b4fd15a8-a9d4-4c39-b4c9-470ff29d060d', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Tue, 26 May 2020 10:50:09 GMT' ]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159049021000203886/blob159049021030405476', "Hello World") + .reply(201, "", [ 'Transfer-Encoding', + 'chunked', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Tue, 26 May 2020 10:50:10 GMT', + 'ETag', + '"0x8D801628FD4C7DF"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc4410-101e-000c-554b-3321fe000000', + 'x-ms-client-request-id', + '32720e51-f5e8-4dbf-974f-7c7032388c1e', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'Date', + 'Tue, 26 May 2020 10:50:09 GMT' ]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159049021000203886') + .query(true) + .reply(202, "", [ 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc4411-101e-000c-564b-3321fe000000', + 'x-ms-client-request-id', + 'fb170e2c-ef6a-49ab-a830-a4a26aebbcc3', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Tue, 26 May 2020 10:50:10 GMT' ]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_fatal_error_event.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_fatal_error_event.js new file mode 100644 index 000000000000..58954bf45f69 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_fatal_error_event.js @@ -0,0 +1,66 @@ +let nock = require('nock'); + +module.exports.hash = "47d65e9ec5bdaa1fcb744c9fe2908c22"; + +module.exports.testInfo = {"uniqueName":{"container":"container159049021461101822","blob":"blob159049021491407229"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159049021461101822') + .query(true) + .reply(201, "", [ 'Transfer-Encoding', + 'chunked', + 'Last-Modified', + 'Tue, 26 May 2020 10:50:14 GMT', + 'ETag', + '"0x8D8016292658C0A"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc4428-101e-000c-674b-3321fe000000', + 'x-ms-client-request-id', + '43c8cc19-c939-46c7-b515-bbe586e28c57', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Tue, 26 May 2020 10:50:14 GMT' ]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159049021461101822/blob159049021491407229', "Hello World") + .reply(201, "", [ 'Transfer-Encoding', + 'chunked', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Tue, 26 May 2020 10:50:15 GMT', + 'ETag', + '"0x8D801629293F1B9"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc442b-101e-000c-684b-3321fe000000', + 'x-ms-client-request-id', + 'ce2eec59-39e9-40dc-a801-f5c4b04c251f', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'Date', + 'Tue, 26 May 2020 10:50:14 GMT' ]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159049021461101822') + .query(true) + .reply(202, "", [ 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc442c-101e-000c-694b-3321fe000000', + 'x-ms-client-request-id', + 'c1aee181-8417-46dc-9d91-c1bd009ef136', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Tue, 26 May 2020 10:50:15 GMT' ]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_json_input_and_output_configurations.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_json_input_and_output_configurations.js new file mode 100644 index 000000000000..6afecc7316b2 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_json_input_and_output_configurations.js @@ -0,0 +1,66 @@ +let nock = require('nock'); + +module.exports.hash = "da303cb0dbbe576967bf0bcc9e842496"; + +module.exports.testInfo = {"uniqueName":{"container":"container159049021779702431","blob":"blob159049021829309285"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159049021779702431') + .query(true) + .reply(201, "", [ 'Transfer-Encoding', + 'chunked', + 'Last-Modified', + 'Tue, 26 May 2020 10:50:17 GMT', + 'ETag', + '"0x8D80162944B94A2"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc443e-101e-000c-704b-3321fe000000', + 'x-ms-client-request-id', + '88178f2d-8867-4fac-beeb-ebb683a757fb', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Tue, 26 May 2020 10:50:17 GMT' ]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159049021779702431/blob159049021829309285', "Hello World") + .reply(201, "", [ 'Transfer-Encoding', + 'chunked', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Tue, 26 May 2020 10:50:18 GMT', + 'ETag', + '"0x8D8016294980E2D"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc4440-101e-000c-714b-3321fe000000', + 'x-ms-client-request-id', + 'f71ba7cb-4550-40e9-818f-46c284b43b5f', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'Date', + 'Tue, 26 May 2020 10:50:17 GMT' ]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159049021779702431') + .query(true) + .reply(202, "", [ 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc4441-101e-000c-724b-3321fe000000', + 'x-ms-client-request-id', + 'a350bf6e-9386-453c-b604-305901974f51', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Tue, 26 May 2020 10:50:18 GMT' ]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_large_file.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_large_file.js new file mode 100644 index 000000000000..f0371a810809 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_large_file.js @@ -0,0 +1,66 @@ +let nock = require('nock'); + +module.exports.hash = "287ce57afa2ca683639ffe149024b36f"; + +module.exports.testInfo = {"uniqueName":{"container":"container159049021180905322","blob":"blob159049021214800367"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159049021180905322') + .query(true) + .reply(201, "", [ 'Transfer-Encoding', + 'chunked', + 'Last-Modified', + 'Tue, 26 May 2020 10:50:11 GMT', + 'ETag', + '"0x8D8016290B9FF0D"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc441b-101e-000c-5e4b-3321fe000000', + 'x-ms-client-request-id', + '6b414e74-84d3-4442-9307-12df0cd21261', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Tue, 26 May 2020 10:50:11 GMT' ]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159049021180905322/blob159049021214800367', "Hello World") + .reply(201, "", [ 'Transfer-Encoding', + 'chunked', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Tue, 26 May 2020 10:50:12 GMT', + 'ETag', + '"0x8D8016290EE0BCC"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc441d-101e-000c-5f4b-3321fe000000', + 'x-ms-client-request-id', + '0885e6eb-9a93-40c5-ae01-66b9cddbc98c', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'Date', + 'Tue, 26 May 2020 10:50:11 GMT' ]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159049021180905322') + .query(true) + .reply(202, "", [ 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc441f-101e-000c-604b-3321fe000000', + 'x-ms-client-request-id', + 'a829abf7-d4fd-458b-8550-b2048199004e', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Tue, 26 May 2020 10:50:11 GMT' ]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_non_fatal_error_event.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_non_fatal_error_event.js new file mode 100644 index 000000000000..a63fc13948e6 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_non_fatal_error_event.js @@ -0,0 +1,66 @@ +let nock = require('nock'); + +module.exports.hash = "f0edc0e711ff5ae5f1607685a9fb6a14"; + +module.exports.testInfo = {"uniqueName":{"container":"container159049021552904014","blob":"blob159049021613506786"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159049021552904014') + .query(true) + .reply(201, "", [ 'Transfer-Encoding', + 'chunked', + 'Last-Modified', + 'Tue, 26 May 2020 10:50:15 GMT', + 'ETag', + '"0x8D8016292F191DF"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc442d-101e-000c-6a4b-3321fe000000', + 'x-ms-client-request-id', + 'a3249b89-a823-4be2-b04d-e384942336d3', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Tue, 26 May 2020 10:50:15 GMT' ]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159049021552904014/blob159049021613506786', "Hello World") + .reply(201, "", [ 'Transfer-Encoding', + 'chunked', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Tue, 26 May 2020 10:50:16 GMT', + 'ETag', + '"0x8D80162934E62B2"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc4430-101e-000c-6b4b-3321fe000000', + 'x-ms-client-request-id', + '375c202b-6210-4766-a0dc-62b6fa9cfc33', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'Date', + 'Tue, 26 May 2020 10:50:15 GMT' ]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159049021552904014') + .query(true) + .reply(202, "", [ 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc4431-101e-000c-6c4b-3321fe000000', + 'x-ms-client-request-id', + '437212b5-c10f-4bc0-9dc5-cfe38a80f109', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Tue, 26 May 2020 10:50:16 GMT' ]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_progress_event.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_progress_event.js new file mode 100644 index 000000000000..211a559c0fae --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_progress_event.js @@ -0,0 +1,66 @@ +let nock = require('nock'); + +module.exports.hash = "b9b98d2d88adaa863394f90d3f62a4a2"; + +module.exports.testInfo = {"uniqueName":{"container":"container159049021368504809","blob":"blob159049021399100385"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159049021368504809') + .query(true) + .reply(201, "", [ 'Transfer-Encoding', + 'chunked', + 'Last-Modified', + 'Tue, 26 May 2020 10:50:13 GMT', + 'ETag', + '"0x8D8016291D84D74"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc4424-101e-000c-644b-3321fe000000', + 'x-ms-client-request-id', + 'ed28d154-752e-4375-9dce-59adfbb20cea', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Tue, 26 May 2020 10:50:13 GMT' ]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159049021368504809/blob159049021399100385', "Hello World") + .reply(201, "", [ 'Transfer-Encoding', + 'chunked', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Tue, 26 May 2020 10:50:14 GMT', + 'ETag', + '"0x8D80162920728A7"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc4426-101e-000c-654b-3321fe000000', + 'x-ms-client-request-id', + 'd97c5bdb-2072-453d-8ef8-f535c541da65', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'Date', + 'Tue, 26 May 2020 10:50:14 GMT' ]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159049021368504809') + .query(true) + .reply(202, "", [ 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc4427-101e-000c-664b-3321fe000000', + 'x-ms-client-request-id', + '123a03fa-22cd-4b9a-82b6-da84c0279b74', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Tue, 26 May 2020 10:50:14 GMT' ]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_snapshot.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_snapshot.js new file mode 100644 index 000000000000..07ef970d2191 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_snapshot.js @@ -0,0 +1,66 @@ +let nock = require('nock'); + +module.exports.hash = "9fa6b4b0cffd24ba43af3867c4547ad6"; + +module.exports.testInfo = {"uniqueName":{"container":"container159049020812502198","blob":"blob159049020846207708"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159049020812502198') + .query(true) + .reply(201, "", [ 'Transfer-Encoding', + 'chunked', + 'Last-Modified', + 'Tue, 26 May 2020 10:50:08 GMT', + 'ETag', + '"0x8D801628E881292"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc4405-101e-000c-4e4b-3321fe000000', + 'x-ms-client-request-id', + '87e35f42-6c44-44e1-9dce-a7880229747a', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Tue, 26 May 2020 10:50:07 GMT' ]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159049020812502198/blob159049020846207708', "Hello World") + .reply(201, "", [ 'Transfer-Encoding', + 'chunked', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Tue, 26 May 2020 10:50:08 GMT', + 'ETag', + '"0x8D801628EBB5CDE"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc4407-101e-000c-4f4b-3321fe000000', + 'x-ms-client-request-id', + 'fdea3e39-5f7b-4d3a-8224-db0c21c046c6', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'Date', + 'Tue, 26 May 2020 10:50:08 GMT' ]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159049020812502198') + .query(true) + .reply(202, "", [ 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc4408-101e-000c-504b-3321fe000000', + 'x-ms-client-request-id', + '8907ba07-dd16-4215-b804-df32904dc08b', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Tue, 26 May 2020 10:50:08 GMT' ]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_where_conditionals.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_where_conditionals.js new file mode 100644 index 000000000000..acdfcce09666 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_where_conditionals.js @@ -0,0 +1,66 @@ +let nock = require('nock'); + +module.exports.hash = "e1455a2b0a5b90c635259b595020e8ad"; + +module.exports.testInfo = {"uniqueName":{"container":"container159049020904409655","blob":"blob159049020931607154"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159049020904409655') + .query(true) + .reply(201, "", [ 'Transfer-Encoding', + 'chunked', + 'Last-Modified', + 'Tue, 26 May 2020 10:50:09 GMT', + 'ETag', + '"0x8D801628F143F82"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc4409-101e-000c-514b-3321fe000000', + 'x-ms-client-request-id', + 'd0949da6-1973-4501-9474-fa90a511b293', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Tue, 26 May 2020 10:50:08 GMT' ]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159049020904409655/blob159049020931607154', "Hello World") + .reply(201, "", [ 'Transfer-Encoding', + 'chunked', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Tue, 26 May 2020 10:50:09 GMT', + 'ETag', + '"0x8D801628F3E11F6"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc440b-101e-000c-524b-3321fe000000', + 'x-ms-client-request-id', + '6ee721f2-34e6-41bb-89e7-c47d9647ccba', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'Date', + 'Tue, 26 May 2020 10:50:08 GMT' ]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159049020904409655') + .query(true) + .reply(202, "", [ 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '1abc440c-101e-000c-534b-3321fe000000', + 'x-ms-client-request-id', + '826fbcca-21d7-41f1-8cd8-6229c2d4be2f', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Tue, 26 May 2020 10:50:09 GMT' ]); diff --git a/sdk/storage/storage-blob/review/storage-blob.api.md b/sdk/storage/storage-blob/review/storage-blob.api.md index 838547c2083c..a347c7889a19 100644 --- a/sdk/storage/storage-blob/review/storage-blob.api.md +++ b/sdk/storage/storage-blob/review/storage-blob.api.md @@ -769,6 +769,44 @@ export interface BlobProperties { tagCount?: number; } +// @public +export interface BlobQueryCsvTextConfiguration extends BlobQueryTextConfiguration { + columnSeparator: string; + escapeCharacter?: string; + fieldQuote?: string; + hasHeaders: boolean; + kind: "csv"; +} + +// @public +export interface BlobQueryError { + description: string; + isFatal: boolean; + name: string; + position: number; +} + +// @public +export interface BlobQueryJsonTextConfiguration extends BlobQueryTextConfiguration { + kind: "json"; +} + +// Warning: (ae-forgotten-export) The symbol "BlobQueryHeaders" needs to be exported by the entry point index.d.ts +// +// @public +export type BlobQueryResponseModel = BlobQueryHeaders & { + blobBody?: Promise; + readableStreamBody?: NodeJS.ReadableStream; + _response: coreHttp.HttpResponse & { + parsedHeaders: BlobQueryHeaders; + }; +}; + +// @public +export interface BlobQueryTextConfiguration { + recordSeparator: string; +} + // @public export interface BlobReleaseLeaseOptions extends CommonOptions { abortSignal?: AbortSignalLike; @@ -1023,6 +1061,7 @@ export class BlockBlobClient extends BlobClient { constructor(url: string, pipeline: Pipeline); commitBlockList(blocks: string[], options?: BlockBlobCommitBlockListOptions): Promise; getBlockList(listType: BlockListType, options?: BlockBlobGetBlockListOptions): Promise; + query(query: string, options?: BlockBlobQueryOptions): Promise; stageBlock(blockId: string, body: HttpRequestBody, contentLength: number, options?: BlockBlobStageBlockOptions): Promise; stageBlockFromURL(blockId: string, sourceURL: string, offset?: number, count?: number, options?: BlockBlobStageBlockFromURLOptions): Promise; upload(body: HttpRequestBody, contentLength: number, options?: BlockBlobUploadOptions): Promise; @@ -1112,6 +1151,17 @@ export interface BlockBlobParallelUploadOptions extends CommonOptions { onProgress?: (progress: TransferProgressEvent) => void; } +// @public +export interface BlockBlobQueryOptions extends CommonOptions { + abortSignal?: AbortSignalLike; + conditions?: BlobRequestConditions; + customerProvidedKey?: CpkInfo; + inputTextConfiguration?: BlobQueryJsonTextConfiguration | BlobQueryCsvTextConfiguration; + onError?: (error: BlobQueryError) => void; + onProgress?: (progress: TransferProgressEvent) => void; + outputTextConfiguration?: BlobQueryJsonTextConfiguration | BlobQueryCsvTextConfiguration; +} + // @public export interface BlockBlobStageBlockFromURLHeaders { clientRequestId?: string; diff --git a/sdk/storage/storage-blob/src/BlobQueryResponse.browser.ts b/sdk/storage/storage-blob/src/BlobQueryResponse.browser.ts new file mode 100644 index 000000000000..aa07827a13b0 --- /dev/null +++ b/sdk/storage/storage-blob/src/BlobQueryResponse.browser.ts @@ -0,0 +1,499 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +import { HttpResponse } from "@azure/core-http"; + +import { + BlobDownloadResponseModel, + BlobType, + CopyStatusType, + LeaseDurationType, + LeaseStateType, + LeaseStatusType, + BlobDownloadHeaders, + BlobQueryResponseModel +} from "./generatedModels"; +import { Metadata } from "./models"; +import { BlobQuickQueryStreamOptions } from "./utils/BlobQuickQueryStream"; + +/** + * ONLY AVAILABLE IN BROWSER RUNTIME. + * + * BlobQueryResponse implements BlobDownloadResponseModel interface, and in browser runtime it will + * parse avor data returned by blob query. + * + * @export + * @class BlobQueryResponse + * @implements {BlobDownloadResponseModel} + */ +export class BlobQueryResponse implements BlobDownloadResponseModel { + /** + * Indicates that the service supports + * requests for partial file content. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + public get acceptRanges(): string | undefined { + return this.originalResponse.acceptRanges; + } + + /** + * Returns if it was previously specified + * for the file. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + public get cacheControl(): string | undefined { + return this.originalResponse.cacheControl; + } + + /** + * Returns the value that was specified + * for the 'x-ms-content-disposition' header and specifies how to process the + * response. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + public get contentDisposition(): string | undefined { + return this.originalResponse.contentDisposition; + } + + /** + * Returns the value that was specified + * for the Content-Encoding request header. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + public get contentEncoding(): string | undefined { + return this.originalResponse.contentEncoding; + } + + /** + * Returns the value that was specified + * for the Content-Language request header. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + public get contentLanguage(): string | undefined { + return this.originalResponse.contentLanguage; + } + + /** + * The current sequence number for a + * page blob. This header is not returned for block blobs or append blobs. + * + * @readonly + * @type {(number | undefined)} + * @memberof BlobQueryResponse + */ + public get blobSequenceNumber(): number | undefined { + return this.originalResponse.blobSequenceNumber; + } + + /** + * The blob's type. Possible values include: + * 'BlockBlob', 'PageBlob', 'AppendBlob'. + * + * @readonly + * @type {(BlobType | undefined)} + * @memberof BlobQueryResponse + */ + public get blobType(): BlobType | undefined { + return this.originalResponse.blobType; + } + + /** + * The number of bytes present in the + * response body. + * + * @readonly + * @type {(number | undefined)} + * @memberof BlobQueryResponse + */ + public get contentLength(): number | undefined { + return this.originalResponse.contentLength; + } + + /** + * If the file has an MD5 hash and the + * request is to read the full file, this response header is returned so that + * the client can check for message content integrity. If the request is to + * read a specified range and the 'x-ms-range-get-content-md5' is set to + * true, then the request returns an MD5 hash for the range, as long as the + * range size is less than or equal to 4 MB. If neither of these sets of + * conditions is true, then no value is returned for the 'Content-MD5' + * header. + * + * @readonly + * @type {(Uint8Array | undefined)} + * @memberof BlobQueryResponse + */ + public get contentMD5(): Uint8Array | undefined { + return this.originalResponse.contentMD5; + } + + /** + * Indicates the range of bytes returned if + * the client requested a subset of the file by setting the Range request + * header. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + public get contentRange(): string | undefined { + return this.originalResponse.contentRange; + } + + /** + * The content type specified for the file. + * The default content type is 'application/octet-stream' + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + public get contentType(): string | undefined { + return this.originalResponse.contentType; + } + + /** + * Conclusion time of the last attempted + * Copy File operation where this file was the destination file. This value + * can specify the time of a completed, aborted, or failed copy attempt. + * + * @readonly + * @type {(Date | undefined)} + * @memberof BlobQueryResponse + */ + public get copyCompletedOn(): Date | undefined { + return undefined; + } + + /** + * String identifier for the last attempted Copy + * File operation where this file was the destination file. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + public get copyId(): string | undefined { + return this.originalResponse.copyId; + } + + /** + * Contains the number of bytes copied and + * the total bytes in the source in the last attempted Copy File operation + * where this file was the destination file. Can show between 0 and + * Content-Length bytes copied. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + public get copyProgress(): string | undefined { + return this.originalResponse.copyProgress; + } + + /** + * URL up to 2KB in length that specifies the + * source file used in the last attempted Copy File operation where this file + * was the destination file. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + public get copySource(): string | undefined { + return this.originalResponse.copySource; + } + + /** + * State of the copy operation + * identified by 'x-ms-copy-id'. Possible values include: 'pending', + * 'success', 'aborted', 'failed' + * + * @readonly + * @type {(CopyStatusType | undefined)} + * @memberof BlobQueryResponse + */ + public get copyStatus(): CopyStatusType | undefined { + return this.originalResponse.copyStatus; + } + + /** + * Only appears when + * x-ms-copy-status is failed or pending. Describes cause of fatal or + * non-fatal copy operation failure. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + public get copyStatusDescription(): string | undefined { + return this.originalResponse.copyStatusDescription; + } + + /** + * When a blob is leased, + * specifies whether the lease is of infinite or fixed duration. Possible + * values include: 'infinite', 'fixed'. + * + * @readonly + * @type {(LeaseDurationType | undefined)} + * @memberof BlobQueryResponse + */ + public get leaseDuration(): LeaseDurationType | undefined { + return this.originalResponse.leaseDuration; + } + + /** + * Lease state of the blob. Possible + * values include: 'available', 'leased', 'expired', 'breaking', 'broken'. + * + * @readonly + * @type {(LeaseStateType | undefined)} + * @memberof BlobQueryResponse + */ + public get leaseState(): LeaseStateType | undefined { + return this.originalResponse.leaseState; + } + + /** + * The current lease status of the + * blob. Possible values include: 'locked', 'unlocked'. + * + * @readonly + * @type {(LeaseStatusType | undefined)} + * @memberof BlobQueryResponse + */ + public get leaseStatus(): LeaseStatusType | undefined { + return this.originalResponse.leaseStatus; + } + + /** + * A UTC date/time value generated by the service that + * indicates the time at which the response was initiated. + * + * @readonly + * @type {(Date | undefined)} + * @memberof BlobQueryResponse + */ + public get date(): Date | undefined { + return this.originalResponse.date; + } + + /** + * The number of committed blocks + * present in the blob. This header is returned only for append blobs. + * + * @readonly + * @type {(number | undefined)} + * @memberof BlobQueryResponse + */ + public get blobCommittedBlockCount(): number | undefined { + return this.originalResponse.blobCommittedBlockCount; + } + + /** + * The ETag contains a value that you can use to + * perform operations conditionally, in quotes. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + public get etag(): string | undefined { + return this.originalResponse.etag; + } + + /** + * The error code. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + public get errorCode(): string | undefined { + return this.originalResponse.errorCode; + } + + /** + * The value of this header is set to + * true if the file data and application metadata are completely encrypted + * using the specified algorithm. Otherwise, the value is set to false (when + * the file is unencrypted, or if only parts of the file/application metadata + * are encrypted). + * + * @readonly + * @type {(boolean | undefined)} + * @memberof BlobQueryResponse + */ + public get isServerEncrypted(): boolean | undefined { + return this.originalResponse.isServerEncrypted; + } + + /** + * If the blob has a MD5 hash, and if + * request contains range header (Range or x-ms-range), this response header + * is returned with the value of the whole blob's MD5 value. This value may + * or may not be equal to the value returned in Content-MD5 header, with the + * latter calculated from the requested range. + * + * @readonly + * @type {(Uint8Array | undefined)} + * @memberof BlobQueryResponse + */ + public get blobContentMD5(): Uint8Array | undefined { + return this.originalResponse.blobContentMD5; + } + + /** + * Returns the date and time the file was last + * modified. Any operation that modifies the file or its properties updates + * the last modified time. + * + * @readonly + * @type {(Date | undefined)} + * @memberof BlobQueryResponse + */ + public get lastModified(): Date | undefined { + return this.originalResponse.lastModified; + } + + /** + * A name-value pair + * to associate with a file storage object. + * + * @readonly + * @type {(Metadata | undefined)} + * @memberof BlobQueryResponse + */ + public get metadata(): Metadata | undefined { + return this.originalResponse.metadata; + } + + /** + * This header uniquely identifies the request + * that was made and can be used for troubleshooting the request. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + public get requestId(): string | undefined { + return this.originalResponse.requestId; + } + + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + public get clientRequestId(): string | undefined { + return this.originalResponse.clientRequestId; + } + + /** + * Indicates the version of the File service used + * to execute the request. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + public get version(): string | undefined { + return this.originalResponse.version; + } + + /** + * The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned + * when the blob was encrypted with a customer-provided key. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + public get encryptionKeySha256(): string | undefined { + return this.originalResponse.encryptionKeySha256; + } + + /** + * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to + * true, then the request returns a crc64 for the range, as long as the range size is less than + * or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is + * specified in the same request, it will fail with 400(Bad Request) + * + * @type {(Uint8Array | undefined)} + * @memberof BlobQueryResponse + */ + public get contentCrc64(): Uint8Array | undefined { + return this.originalResponse.contentCrc64; + } + + /** + * The response body as a browser Blob. + * Always undefined in node.js. + * + * @readonly + * @type {(Promise | undefined)} + * @memberof BlobQueryResponse + */ + public get blobBody(): Promise | undefined { + throw Error(`Quick query in browser is not supported yet.`); + } + + /** + * The response body as a node.js Readable stream. + * Always undefined in the browser. + * + * @readonly + * @type {(NodeJS.ReadableStream | undefined)} + * @memberof BlobQueryResponse + */ + public get readableStreamBody(): NodeJS.ReadableStream | undefined { + return undefined; + } + + /** + * The HTTP response. + * + * @type {HttpResponse} + * @memberof BlobQueryResponse + */ + public get _response(): HttpResponse & { + parsedHeaders: BlobDownloadHeaders; + } { + return this.originalResponse._response; + } + + private originalResponse: BlobQueryResponseModel; + + /** + * Creates an instance of BlobQueryResponse. + * + * @param {BlobQueryResponseModel} originalResponse + * @param {BlobQuickQueryStreamOptions} [options={}] + * @memberof BlobQueryResponse + */ + public constructor( + originalResponse: BlobQueryResponseModel, + _options: BlobQuickQueryStreamOptions = {} + ) { + this.originalResponse = originalResponse; + } +} diff --git a/sdk/storage/storage-blob/src/BlobQueryResponse.ts b/sdk/storage/storage-blob/src/BlobQueryResponse.ts new file mode 100644 index 000000000000..e90bc74321b5 --- /dev/null +++ b/sdk/storage/storage-blob/src/BlobQueryResponse.ts @@ -0,0 +1,506 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +import { HttpResponse, isNode } from "@azure/core-http"; + +import { + BlobDownloadResponseModel, + BlobType, + CopyStatusType, + LeaseDurationType, + LeaseStateType, + LeaseStatusType, + BlobDownloadHeaders, + BlobQueryResponseModel +} from "./generatedModels"; +import { Metadata } from "./models"; +import { BlobQuickQueryStream, BlobQuickQueryStreamOptions } from "./utils/BlobQuickQueryStream"; + +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * BlobQueryResponse implements BlobDownloadResponseModel interface, and in Node.js runtime it will + * parse avor data returned by blob query. + * + * @export + * @class BlobQueryResponse + * @implements {BlobDownloadResponseModel} + */ +export class BlobQueryResponse implements BlobDownloadResponseModel { + /** + * Indicates that the service supports + * requests for partial file content. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + public get acceptRanges(): string | undefined { + return this.originalResponse.acceptRanges; + } + + /** + * Returns if it was previously specified + * for the file. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + public get cacheControl(): string | undefined { + return this.originalResponse.cacheControl; + } + + /** + * Returns the value that was specified + * for the 'x-ms-content-disposition' header and specifies how to process the + * response. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + public get contentDisposition(): string | undefined { + return this.originalResponse.contentDisposition; + } + + /** + * Returns the value that was specified + * for the Content-Encoding request header. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + public get contentEncoding(): string | undefined { + return this.originalResponse.contentEncoding; + } + + /** + * Returns the value that was specified + * for the Content-Language request header. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + public get contentLanguage(): string | undefined { + return this.originalResponse.contentLanguage; + } + + /** + * The current sequence number for a + * page blob. This header is not returned for block blobs or append blobs. + * + * @readonly + * @type {(number | undefined)} + * @memberof BlobQueryResponse + */ + public get blobSequenceNumber(): number | undefined { + return this.originalResponse.blobSequenceNumber; + } + + /** + * The blob's type. Possible values include: + * 'BlockBlob', 'PageBlob', 'AppendBlob'. + * + * @readonly + * @type {(BlobType | undefined)} + * @memberof BlobQueryResponse + */ + public get blobType(): BlobType | undefined { + return this.originalResponse.blobType; + } + + /** + * The number of bytes present in the + * response body. + * + * @readonly + * @type {(number | undefined)} + * @memberof BlobQueryResponse + */ + public get contentLength(): number | undefined { + return this.originalResponse.contentLength; + } + + /** + * If the file has an MD5 hash and the + * request is to read the full file, this response header is returned so that + * the client can check for message content integrity. If the request is to + * read a specified range and the 'x-ms-range-get-content-md5' is set to + * true, then the request returns an MD5 hash for the range, as long as the + * range size is less than or equal to 4 MB. If neither of these sets of + * conditions is true, then no value is returned for the 'Content-MD5' + * header. + * + * @readonly + * @type {(Uint8Array | undefined)} + * @memberof BlobQueryResponse + */ + public get contentMD5(): Uint8Array | undefined { + return this.originalResponse.contentMD5; + } + + /** + * Indicates the range of bytes returned if + * the client requested a subset of the file by setting the Range request + * header. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + public get contentRange(): string | undefined { + return this.originalResponse.contentRange; + } + + /** + * The content type specified for the file. + * The default content type is 'application/octet-stream' + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + public get contentType(): string | undefined { + return this.originalResponse.contentType; + } + + /** + * Conclusion time of the last attempted + * Copy File operation where this file was the destination file. This value + * can specify the time of a completed, aborted, or failed copy attempt. + * + * @readonly + * @type {(Date | undefined)} + * @memberof BlobQueryResponse + */ + public get copyCompletedOn(): Date | undefined { + return undefined; + } + + /** + * String identifier for the last attempted Copy + * File operation where this file was the destination file. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + public get copyId(): string | undefined { + return this.originalResponse.copyId; + } + + /** + * Contains the number of bytes copied and + * the total bytes in the source in the last attempted Copy File operation + * where this file was the destination file. Can show between 0 and + * Content-Length bytes copied. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + public get copyProgress(): string | undefined { + return this.originalResponse.copyProgress; + } + + /** + * URL up to 2KB in length that specifies the + * source file used in the last attempted Copy File operation where this file + * was the destination file. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + public get copySource(): string | undefined { + return this.originalResponse.copySource; + } + + /** + * State of the copy operation + * identified by 'x-ms-copy-id'. Possible values include: 'pending', + * 'success', 'aborted', 'failed' + * + * @readonly + * @type {(CopyStatusType | undefined)} + * @memberof BlobQueryResponse + */ + public get copyStatus(): CopyStatusType | undefined { + return this.originalResponse.copyStatus; + } + + /** + * Only appears when + * x-ms-copy-status is failed or pending. Describes cause of fatal or + * non-fatal copy operation failure. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + public get copyStatusDescription(): string | undefined { + return this.originalResponse.copyStatusDescription; + } + + /** + * When a blob is leased, + * specifies whether the lease is of infinite or fixed duration. Possible + * values include: 'infinite', 'fixed'. + * + * @readonly + * @type {(LeaseDurationType | undefined)} + * @memberof BlobQueryResponse + */ + public get leaseDuration(): LeaseDurationType | undefined { + return this.originalResponse.leaseDuration; + } + + /** + * Lease state of the blob. Possible + * values include: 'available', 'leased', 'expired', 'breaking', 'broken'. + * + * @readonly + * @type {(LeaseStateType | undefined)} + * @memberof BlobQueryResponse + */ + public get leaseState(): LeaseStateType | undefined { + return this.originalResponse.leaseState; + } + + /** + * The current lease status of the + * blob. Possible values include: 'locked', 'unlocked'. + * + * @readonly + * @type {(LeaseStatusType | undefined)} + * @memberof BlobQueryResponse + */ + public get leaseStatus(): LeaseStatusType | undefined { + return this.originalResponse.leaseStatus; + } + + /** + * A UTC date/time value generated by the service that + * indicates the time at which the response was initiated. + * + * @readonly + * @type {(Date | undefined)} + * @memberof BlobQueryResponse + */ + public get date(): Date | undefined { + return this.originalResponse.date; + } + + /** + * The number of committed blocks + * present in the blob. This header is returned only for append blobs. + * + * @readonly + * @type {(number | undefined)} + * @memberof BlobQueryResponse + */ + public get blobCommittedBlockCount(): number | undefined { + return this.originalResponse.blobCommittedBlockCount; + } + + /** + * The ETag contains a value that you can use to + * perform operations conditionally, in quotes. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + public get etag(): string | undefined { + return this.originalResponse.etag; + } + + /** + * The error code. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + public get errorCode(): string | undefined { + return this.originalResponse.errorCode; + } + + /** + * The value of this header is set to + * true if the file data and application metadata are completely encrypted + * using the specified algorithm. Otherwise, the value is set to false (when + * the file is unencrypted, or if only parts of the file/application metadata + * are encrypted). + * + * @readonly + * @type {(boolean | undefined)} + * @memberof BlobQueryResponse + */ + public get isServerEncrypted(): boolean | undefined { + return this.originalResponse.isServerEncrypted; + } + + /** + * If the blob has a MD5 hash, and if + * request contains range header (Range or x-ms-range), this response header + * is returned with the value of the whole blob's MD5 value. This value may + * or may not be equal to the value returned in Content-MD5 header, with the + * latter calculated from the requested range. + * + * @readonly + * @type {(Uint8Array | undefined)} + * @memberof BlobQueryResponse + */ + public get blobContentMD5(): Uint8Array | undefined { + return this.originalResponse.blobContentMD5; + } + + /** + * Returns the date and time the file was last + * modified. Any operation that modifies the file or its properties updates + * the last modified time. + * + * @readonly + * @type {(Date | undefined)} + * @memberof BlobQueryResponse + */ + public get lastModified(): Date | undefined { + return this.originalResponse.lastModified; + } + + /** + * A name-value pair + * to associate with a file storage object. + * + * @readonly + * @type {(Metadata | undefined)} + * @memberof BlobQueryResponse + */ + public get metadata(): Metadata | undefined { + return this.originalResponse.metadata; + } + + /** + * This header uniquely identifies the request + * that was made and can be used for troubleshooting the request. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + public get requestId(): string | undefined { + return this.originalResponse.requestId; + } + + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + public get clientRequestId(): string | undefined { + return this.originalResponse.clientRequestId; + } + + /** + * Indicates the version of the File service used + * to execute the request. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + public get version(): string | undefined { + return this.originalResponse.version; + } + + /** + * The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned + * when the blob was encrypted with a customer-provided key. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + public get encryptionKeySha256(): string | undefined { + return this.originalResponse.encryptionKeySha256; + } + + /** + * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to + * true, then the request returns a crc64 for the range, as long as the range size is less than + * or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is + * specified in the same request, it will fail with 400(Bad Request) + * + * @type {(Uint8Array | undefined)} + * @memberof BlobQueryResponse + */ + public get contentCrc64(): Uint8Array | undefined { + return this.originalResponse.contentCrc64; + } + + /** + * The response body as a browser Blob. + * Always undefined in node.js. + * + * @readonly + * @type {(Promise | undefined)} + * @memberof BlobQueryResponse + */ + public get blobBody(): Promise | undefined { + return undefined; + } + + /** + * The response body as a node.js Readable stream. + * Always undefined in the browser. + * + * It will parse avor data returned by blob query. + * + * @readonly + * @type {(NodeJS.ReadableStream | undefined)} + * @memberof BlobQueryResponse + */ + public get readableStreamBody(): NodeJS.ReadableStream | undefined { + return isNode ? this.blobDownloadStream : undefined; + } + + /** + * The HTTP response. + * + * @type {HttpResponse} + * @memberof BlobQueryResponse + */ + public get _response(): HttpResponse & { + parsedHeaders: BlobDownloadHeaders; + } { + return this.originalResponse._response; + } + + private originalResponse: BlobQueryResponseModel; + private blobDownloadStream?: BlobQuickQueryStream; + + /** + * Creates an instance of BlobQueryResponse. + * + * @param {BlobQueryResponseModel} originalResponse + * @param {BlobQuickQueryStreamOptions} [options={}] + * @memberof BlobQueryResponse + */ + public constructor( + originalResponse: BlobQueryResponseModel, + options: BlobQuickQueryStreamOptions = {} + ) { + this.originalResponse = originalResponse; + this.blobDownloadStream = new BlobQuickQueryStream( + this.originalResponse.readableStreamBody!, + options + ); + } +} diff --git a/sdk/storage/storage-blob/src/Clients.ts b/sdk/storage/storage-blob/src/Clients.ts index 44450c0db394..d236b9477985 100644 --- a/sdk/storage/storage-blob/src/Clients.ts +++ b/sdk/storage/storage-blob/src/Clients.ts @@ -53,7 +53,8 @@ import { import { setURLParameter, extractConnectionStringParts, - appendToURLPath + appendToURLPath, + toQuerySerialization } from "./utils/utils.common"; import { fsStat, readStreamToLocalFile, streamToBuffer } from "./utils/utils.node"; import { StorageSharedKeyCredential } from "./credentials/StorageSharedKeyCredential"; @@ -135,6 +136,7 @@ import { ETagNone } from "./utils/constants"; import { truncatedISO8061Date } from "./utils/utils.common"; import "@azure/core-paging"; import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { BlobQueryResponse } from "./BlobQueryResponse"; /** * Options to configure the {@link BlobClient.beginCopyFromURL} operation. @@ -862,6 +864,7 @@ export class BlobClient extends StorageClient { * @memberof BlobClient */ private blobContext: StorageBlob; + private _name: string; private _containerName: string; @@ -1237,7 +1240,7 @@ export class BlobClient extends StorageClient { } /** - * Returns true if the Azrue blob resource represented by this client exists; false otherwise. + * Returns true if the Azure blob resource represented by this client exists; false otherwise. * * NOTE: use this function with care since an existing blob might be deleted by other clients or * applications. Vice versa new blobs might be added by other clients or applications after this @@ -2647,6 +2650,177 @@ export interface BlockBlobUploadOptions extends CommonOptions { tier?: BlockBlobTier | string; } +/** + * Blob query error type. + * + * @export + * @interface BlobQueryError + */ +export interface BlobQueryError { + /** + * Whether error is fatal. Fatal error will stop query. + * + * @type {boolean} + * @memberof BlobQueryError + */ + isFatal: boolean; + /** + * Error name. + * + * @type {string} + * @memberof BlobQueryError + */ + name: string; + /** + * Position in bytes of the query. + * + * @type {number} + * @memberof BlobQueryError + */ + position: number; + /** + * Error description. + * + * @type {string} + * @memberof BlobQueryError + */ + description: string; +} + +/** + * Base type for options to query blob. + * + * @export + * @interface BlobQueryTextConfiguration + */ +export interface BlobQueryTextConfiguration { + /** + * Record separator. + * + * @type {string} + * @memberof BlobQueryTextConfiguration + */ + recordSeparator: string; +} + +/** + * Options to query blob with JSON format. + * + * @export + * @interface BlobQueryJsonTextConfiguration + */ +export interface BlobQueryJsonTextConfiguration extends BlobQueryTextConfiguration { + /** + * Query for a JSON format blob. + * + * @type {"json"} + * @memberof BlobQueryJsonTextConfiguration + */ + kind: "json"; +} + +/** + * Options to query blob with CSV format. + * + * @export + * @interface BlobQueryCsvTextConfiguration + */ +export interface BlobQueryCsvTextConfiguration extends BlobQueryTextConfiguration { + /** + * Query for a CSV format blob. + * + * @type {"csv"} + * @memberof BlobQueryCsvTextConfiguration + */ + kind: "csv"; + /** + * Column separator. + * + * @type {string} + * @memberof BlobQueryCsvTextConfiguration + */ + columnSeparator: string; + /** + * Field quote. + * + * @type {string} + * @memberof BlobQueryCsvTextConfiguration + */ + fieldQuote?: string; + /** + * Escape character. + * + * @type {string} + * @memberof BlobQueryCsvTextConfiguration + */ + escapeCharacter?: string; + /** + * Has headers. + * + * @type {boolean} + * @memberof BlobQueryCsvTextConfiguration + */ + hasHeaders: boolean; +} + +/** + * Options to configure {@link BlockBlobClient.query} operation. + * + * @export + * @interface BlockBlobQueryOptions + */ +export interface BlockBlobQueryOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlockBlobUploadOptions + */ + abortSignal?: AbortSignalLike; + /** + * Configurations for the query input. + * + * @type {BlobQueryJsonTextConfiguration | BlobQueryCsvTextConfiguration} + * @memberof BlockBlobQueryOptions + */ + inputTextConfiguration?: BlobQueryJsonTextConfiguration | BlobQueryCsvTextConfiguration; + /** + * Configurations for the query output. + * + * @type {BlobQueryJsonTextConfiguration | BlobQueryCsvTextConfiguration} + * @memberof BlockBlobQueryOptions + */ + outputTextConfiguration?: BlobQueryJsonTextConfiguration | BlobQueryCsvTextConfiguration; + /** + * Callback to receive events on the progress of query operation. + * + * @type {(progress: TransferProgressEvent) => void} + * @memberof BlockBlobUploadOptions + */ + onProgress?: (progress: TransferProgressEvent) => void; + /** + * Callback to receive error events during the query operaiton. + * + * @memberof BlockBlobQueryOptions + */ + onError?: (error: BlobQueryError) => void; + /** + * Conditions to meet when uploading to the block blob. + * + * @type {BlobRequestConditions} + * @memberof BlockBlobUploadOptions + */ + conditions?: BlobRequestConditions; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof BlockBlobUploadOptions + */ + customerProvidedKey?: CpkInfo; +} + /** * Options to configure {@link BlockBlobClient.stageBlock} operation. * @@ -3046,6 +3220,18 @@ export type BlobUploadCommonResponse = BlockBlobUploadHeaders & { * @extends {BlobClient} */ export class BlockBlobClient extends BlobClient { + /** + * blobContext provided by protocol layer. + * + * Note. Ideally BlobClient should set BlobClient.blobContext to protected. However, API + * extractor has issue blocking that. Here we redecelare _blobContext in BlockBlobClient. + * + * @private + * @type {Blobs} + * @memberof BlobClient + */ + private _blobContext: StorageBlob; + /** * blockBlobContext provided by protocol layer. * @@ -3200,6 +3386,7 @@ export class BlockBlobClient extends BlobClient { } super(url, pipeline); this.blockBlobContext = new BlockBlob(this.storageClientContext); + this._blobContext = new StorageBlob(this.storageClientContext); } /** @@ -3222,6 +3409,72 @@ export class BlockBlobClient extends BlobClient { ); } + /** + * Quick query for a JSON or CSV formatted blob. + * + * Example usage (Node.js): + * + * ```js + * // Query and convert a blob to a string + * const queryBlockBlobResponse = await blockBlobClient.query("select * from BlobStorage"); + * const downloaded = await streamToString(queryBlockBlobResponse.readableStreamBody); + * console.log("Query blob content:", downloaded); + * + * async function streamToString(readableStream) { + * return new Promise((resolve, reject) => { + * const chunks = []; + * readableStream.on("data", (data) => { + * chunks.push(data.toString()); + * }); + * readableStream.on("end", () => { + * resolve(chunks.join("")); + * }); + * readableStream.on("error", reject); + * }); + * } + * ``` + * + * @param {string} query + * @param {BlockBlobQueryOptions} [options={}] + * @returns {Promise} + * @memberof BlockBlobClient + */ + public async query( + query: string, + options: BlockBlobQueryOptions = {} + ): Promise { + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + + const { span, spanOptions } = createSpan("BlobClient-query", options.tracingOptions); + + try { + const response = await this._blobContext.query({ + abortSignal: options.abortSignal, + queryRequest: { + expression: query, + inputSerialization: toQuerySerialization(options.inputTextConfiguration), + outputSerialization: toQuerySerialization(options.outputTextConfiguration) + }, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: options.conditions, + spanOptions + }); + return new BlobQueryResponse(response, { + abortSignal: options.abortSignal, + onProgress: options.onProgress, + onError: options.onError + }); + } catch (e) { + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e.message + }); + throw e; + } finally { + span.end(); + } + } + /** * Creates a new block blob, or updates the content of an existing block blob. * Updating an existing block blob overwrites any existing metadata on the blob. @@ -5868,7 +6121,7 @@ export class ContainerClient extends StorageClient { } /** - * Returns true if the Azrue container resource represented by this client exists; false otherwise. + * Returns true if the Azure container resource represented by this client exists; false otherwise. * * NOTE: use this function with care since an existing container might be deleted by other clients or * applications. Vice versa new containers with the same name might be added by other clients or diff --git a/sdk/storage/storage-blob/src/generatedModels.ts b/sdk/storage/storage-blob/src/generatedModels.ts index 5af194232027..ebd570f16948 100644 --- a/sdk/storage/storage-blob/src/generatedModels.ts +++ b/sdk/storage/storage-blob/src/generatedModels.ts @@ -40,6 +40,7 @@ export { BlobItemInternal as BlobItem, BlobPrefix, BlobDownloadHeaders, + BlobQueryResponse as BlobQueryResponseModel, BlobDownloadResponse as BlobDownloadResponseModel, BlobType, BlobUndeleteHeaders, diff --git a/sdk/storage/storage-blob/src/utils/BlobQuickQueryStream.ts b/sdk/storage/storage-blob/src/utils/BlobQuickQueryStream.ts new file mode 100644 index 000000000000..ad7ac101532c --- /dev/null +++ b/sdk/storage/storage-blob/src/utils/BlobQuickQueryStream.ts @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +import { Readable } from "stream"; + +import { AbortError, AbortSignal, AbortSignalLike } from "@azure/abort-controller"; +import { TransferProgressEvent } from "@azure/core-http"; + +import { AvroReadableFromStream, AvroReader } from "../../../storage-internal-avro/src"; +import { BlobQueryError } from "../Clients"; + +export interface BlobQuickQueryStreamOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobQuickQueryStreamOptions + */ + abortSignal?: AbortSignalLike; + + /** + * Read progress event handler + * + * @memberof BlobQuickQueryStreamOptions + */ + onProgress?: (progress: TransferProgressEvent) => void; + + /** + * Callback to receive error events during the query operaiton. + * + * @memberof BlockBlobQueryOptions + */ + onError?: (error: BlobQueryError) => void; +} + +const ABORT_ERROR = new AbortError("The operation was aborted."); + +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * A Node.js BlobQuickQueryStream will internally parse avor data stream for blob query. + * + * @class BlobQuickQueryStream + * @extends {Readable} + */ +export class BlobQuickQueryStream extends Readable { + private aborter: AbortSignalLike; + private source: NodeJS.ReadableStream; + private avroReader: AvroReader; + private avroIter: AsyncIterableIterator; + private onProgress?: (progress: TransferProgressEvent) => void; + private onError?: (error: BlobQueryError) => void; + private abortHandler = () => { + // Workaround before avor reader doesn't support aborter + this.source.pause(); + this.source.removeAllListeners(); + // TODO: Avor reader supports aborter + this.emit("error", ABORT_ERROR); + }; + + /** + * Creates an instance of BlobQuickQueryStream. + * + * @param {NodeJS.ReadableStream} source The current ReadableStream returned from getter + * @param {BlobQuickQueryStreamOptions} [options={}] + * @memberof BlobQuickQueryStream + */ + public constructor(source: NodeJS.ReadableStream, options: BlobQuickQueryStreamOptions = {}) { + super(); + this.aborter = options.abortSignal || AbortSignal.none; + this.source = source; + this.onProgress = options.onProgress; + this.onError = options.onError; + this.avroReader = new AvroReader(new AvroReadableFromStream(this.source)); + this.avroIter = this.avroReader.parseObjects(); + + this.aborter.addEventListener("abort", this.abortHandler); + } + + public _read() { + if (!this.aborter.aborted) { + this.readInternal().catch((err) => { + this.emit("error", err); + }); + } + } + + private async readInternal() { + for await (const obj of this.avroIter) { + if (this.aborter.aborted) { + break; + } + + const schema = (obj as any).$schema; + if (typeof schema !== "string") { + throw Error("Missing schema in avor record."); + } + + let exit = false; + switch (schema) { + case "com.microsoft.azure.storage.queryBlobContents.resultData": + const data = (obj as any).data; + if (data instanceof Uint8Array === false) { + throw Error("Invalid data in avor result record."); + } + if (!this.push(Buffer.from(data))) { + exit = true; + } + break; + case "com.microsoft.azure.storage.queryBlobContents.progress": + const bytesScanned = (obj as any).bytesScanned; + if (typeof bytesScanned !== "number") { + throw Error("Invalid bytesScanned in avor progress record."); + } + if (this.onProgress) { + this.onProgress({ loadedBytes: bytesScanned }); + } + break; + case "com.microsoft.azure.storage.queryBlobContents.end": + if (this.onProgress) { + const totalBytes = (obj as any).totalBytes; + if (typeof totalBytes !== "number") { + throw Error("Invalid totalBytes in avor end record."); + } + this.onProgress({ loadedBytes: totalBytes }); + } + this.push(null); + break; + case "com.microsoft.azure.storage.queryBlobContents.error": + if (this.onError) { + const fatal = (obj as any).fatal; + if (typeof fatal !== "boolean") { + throw Error("Invalid fatal in avor error record."); + } + const name = (obj as any).name; + if (typeof name !== "string") { + throw Error("Invalid name in avor error record."); + } + const description = (obj as any).description; + if (typeof description !== "string") { + throw Error("Invalid description in avor error record."); + } + const position = (obj as any).position; + if (typeof position !== "number") { + throw Error("Invalid position in avor error record."); + } + this.onError({ + position, + name, + isFatal: fatal, + description + }); + } + break; + default: + throw Error(`Unknown schema ${schema} in avor progress record.`); + } + + if (exit) { + break; + } + } + } +} diff --git a/sdk/storage/storage-blob/src/utils/utils.common.ts b/sdk/storage/storage-blob/src/utils/utils.common.ts index 1ee10e9b2d97..72fc4f6fef35 100644 --- a/sdk/storage/storage-blob/src/utils/utils.common.ts +++ b/sdk/storage/storage-blob/src/utils/utils.common.ts @@ -3,7 +3,10 @@ import { AbortSignalLike } from "@azure/abort-controller"; import { HttpHeaders, isNode, URLBuilder } from "@azure/core-http"; -import { HeaderConstants, URLConstants, DevelopmentConnectionString } from "./constants"; + +import { BlobQueryCsvTextConfiguration, BlobQueryJsonTextConfiguration } from "../Clients"; +import { QuerySerialization } from "../generated/src/models"; +import { DevelopmentConnectionString, HeaderConstants, URLConstants } from "./constants"; /** * Reserved URL characters must be properly escaped for Storage services like Blob or File. @@ -550,3 +553,45 @@ export function getAccountNameFromUrl(url: string): string { throw new Error("Unable to extract accountName with provided information."); } } + +/** + * Convert BlobQueryTextConfiguration to QuerySerialization type. + * + * @export + * @param {(BlobQueryJsonTextConfiguration | BlobQueryCsvTextConfiguration)} [textConfiguration] + * @returns {(QuerySerialization | undefined)} + */ +export function toQuerySerialization( + textConfiguration?: BlobQueryJsonTextConfiguration | BlobQueryCsvTextConfiguration +): QuerySerialization | undefined { + if (textConfiguration === undefined) { + return undefined; + } + + switch (textConfiguration.kind) { + case "csv": + return { + format: { + type: "delimited", + delimitedTextConfiguration: { + columnSeparator: textConfiguration.columnSeparator, + fieldQuote: textConfiguration.fieldQuote || "", + recordSeparator: textConfiguration.recordSeparator, + escapeChar: textConfiguration.escapeCharacter || "", + headersPresent: textConfiguration.hasHeaders + } + } + }; + case "json": + return { + format: { + type: "json", + jsonTextConfiguration: { + recordSeparator: textConfiguration.recordSeparator + } + } + }; + default: + throw Error("Invalid BlobQueryTextConfiguration."); + } +} diff --git a/sdk/storage/storage-blob/test/node/blobclient.spec.ts b/sdk/storage/storage-blob/test/node/blobclient.spec.ts index 9bbaa5fb972b..483530b83806 100644 --- a/sdk/storage/storage-blob/test/node/blobclient.spec.ts +++ b/sdk/storage/storage-blob/test/node/blobclient.spec.ts @@ -1,26 +1,32 @@ import * as assert from "assert"; - -import { isNode } from "@azure/core-http"; import * as dotenv from "dotenv"; +import { readFileSync, unlinkSync } from "fs"; +import { join } from "path"; + +import { AbortController } from "@azure/abort-controller"; +import { isNode, TokenCredential } from "@azure/core-http"; +import { delay, record } from "@azure/test-utils-recorder"; + import { BlobClient, - newPipeline, - StorageSharedKeyCredential, - ContainerClient, + BlobSASPermissions, + BlobServiceClient, BlockBlobClient, + ContainerClient, generateBlobSASQueryParameters, - BlobSASPermissions, - BlobServiceClient + newPipeline, + StorageSharedKeyCredential } from "../../src"; import { bodyToString, + createRandomLocalFile, getBSU, getConnectionStringFromEnvironment, recorderEnvSetup } from "../utils"; -import { TokenCredential } from "@azure/core-http"; import { assertClientUsesTokenCredential } from "../utils/assert"; -import { record, delay } from "@azure/test-utils-recorder"; +import { readStreamToLocalFileWithLogs } from "../utils/testutils.node"; + dotenv.config(); describe("BlobClient Node.js only", () => { @@ -30,6 +36,7 @@ describe("BlobClient Node.js only", () => { let blobClient: BlobClient; let blockBlobClient: BlockBlobClient; const content = "Hello World"; + const tempFolderPath = "temp"; let recorder: any; @@ -339,4 +346,282 @@ describe("BlobClient Node.js only", () => { const result = await newClient.getProperties(); assert.deepStrictEqual(result.metadata, metadata); }); + + it("query should work", async () => { + recorder.skip("node", "TODO: Avor reader doesn't work with recorder yet."); + const csvContent = "100,200,300,400\n150,250,350,450\n"; + await blockBlobClient.upload(csvContent, csvContent.length); + + const response = await blockBlobClient.query("select * from BlobStorage"); + assert.deepStrictEqual(await bodyToString(response), csvContent); + }); + + it("query should work with access conditions", async () => { + recorder.skip("node", "TODO: Avor reader doesn't work with recorder yet."); + const csvContent = "100,200,300,400\n150,250,350,450\n"; + const uploadResponse = await blockBlobClient.upload(csvContent, csvContent.length); + + const response = await blockBlobClient.query("select * from BlobStorage", { + conditions: { + ifModifiedSince: new Date("2010/01/01"), + ifUnmodifiedSince: new Date("2100/01/01"), + ifMatch: uploadResponse.etag, + ifNoneMatch: "invalidetag" + } + }); + assert.deepStrictEqual(await bodyToString(response), csvContent); + }); + + it("query should not work with access conditions ifModifiedSince", async () => { + recorder.skip("node", "TODO: Avor reader doesn't work with recorder yet."); + const csvContent = "100,200,300,400\n150,250,350,450\n"; + await blockBlobClient.upload(csvContent, csvContent.length); + + try { + await blockBlobClient.query("select * from BlobStorage", { + conditions: { + ifModifiedSince: new Date("2100/01/01") + } + }); + } catch (err) { + assert.deepStrictEqual(err.statusCode, 304); + return; + } + assert.fail(); + }); + + it("query should not work with access conditions leaseId", async () => { + recorder.skip("node", "TODO: Avor reader doesn't work with recorder yet."); + const csvContent = "100,200,300,400\n150,250,350,450\n"; + await blockBlobClient.upload(csvContent, csvContent.length); + + try { + await blockBlobClient.query("select * from BlobStorage", { + conditions: { + leaseId: "invalid" + } + }); + } catch (err) { + assert.deepStrictEqual(err.statusCode, 400); + return; + } + assert.fail(); + }); + + it("query should work with snapshot", async () => { + recorder.skip("node", "TODO: Avor reader doesn't work with recorder yet."); + const csvContent = "100,200,300,400\n150,250,350,450\n"; + await blockBlobClient.upload(csvContent, csvContent.length); + const snapshotResponse = await blockBlobClient.createSnapshot(); + const blockBlobSnapshotClient = blockBlobClient.withSnapshot(snapshotResponse.snapshot!); + + const response = await blockBlobSnapshotClient.query("select * from BlobStorage"); + assert.deepStrictEqual(await bodyToString(response), csvContent); + }); + + it("query should work with where conditionals", async () => { + recorder.skip("node", "TODO: Avor reader doesn't work with recorder yet."); + const csvContent = "100,200,300,400\n150,250,350,450\n"; + await blockBlobClient.upload(csvContent, csvContent.length); + + const response = await blockBlobClient.query("select _2 from BlobStorage where _1 > 100"); + assert.deepStrictEqual(await bodyToString(response), "250\n"); + }); + + it("query should work with empty results", async () => { + recorder.skip("node", "TODO: Avor reader doesn't work with recorder yet."); + const csvContent = "100,200,300,400\n150,250,350,450\n"; + await blockBlobClient.upload(csvContent, csvContent.length); + + const response = await blockBlobClient.query("select _2 from BlobStorage where _1 > 200"); + + assert.deepStrictEqual(await bodyToString(response), ""); + }); + + it("query should work with blob properties", async () => { + recorder.skip("node", "TODO: Avor reader doesn't work with recorder yet."); + const csvContent = "100,200,300,400\n150,250,350,450\n"; + await blockBlobClient.upload(csvContent, csvContent.length); + + const response = await blockBlobClient.query("select * from BlobStorage"); + assert.deepStrictEqual(response.contentType, "avro/binary"); + assert.deepStrictEqual(typeof response.etag, "string"); + assert.deepStrictEqual(response.blobType, "BlockBlob"); + assert.deepStrictEqual(response.leaseState, "available"); + assert.deepStrictEqual(response.leaseStatus, "unlocked"); + assert.deepStrictEqual(response.acceptRanges, "bytes"); + assert.deepStrictEqual(typeof response.clientRequestId, "string"); + assert.deepStrictEqual(typeof response.requestId, "string"); + assert.deepStrictEqual(typeof response.version, "string"); + assert.deepStrictEqual(typeof response.date, "object"); + }); + + it("query should work with large file", async () => { + recorder.skip("node", "TODO: Avor reader doesn't work with recorder yet."); + // TODO: Avor reader emiter listener leak MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to increase limit + const csvContentUnit = "100,200,300,400\n150,250,350,450\n"; + const tempFileLarge = await createRandomLocalFile( + tempFolderPath, + 1024 * 1024, + Buffer.from(csvContentUnit) + ); + await blockBlobClient.uploadFile(tempFileLarge); + + const response = await blockBlobClient.query("select * from BlobStorage"); + + const downloadedFile = join(tempFolderPath, recorder.getUniqueName("downloadfile.")); + await readStreamToLocalFileWithLogs(response.readableStreamBody!, downloadedFile); + + const downloadedData = await readFileSync(downloadedFile); + const uploadedData = await readFileSync(tempFileLarge); + + unlinkSync(downloadedFile); + unlinkSync(tempFileLarge); + + assert.ok(downloadedData.equals(uploadedData)); + }); + + it("query should work with aborter", async () => { + recorder.skip("node", "TODO: Avor reader doesn't work with recorder yet."); + const csvContentUnit = "100,200,300,400\n150,250,350,450\n"; + const tempFileLarge = await createRandomLocalFile( + tempFolderPath, + 1024 * 256 * 2, + Buffer.from(csvContentUnit) + ); + await blockBlobClient.uploadFile(tempFileLarge); + + const aborter = new AbortController(); + const response = await blockBlobClient.query("select * from BlobStorage", { + abortSignal: aborter.signal, + onProgress: () => { + // Abort parse when first progress event trigger (by default 4MB) + aborter.abort(); + } + }); + + const downloadedFile = join(tempFolderPath, recorder.getUniqueName("downloadfile.")); + + try { + await readStreamToLocalFileWithLogs(response.readableStreamBody!, downloadedFile); + } catch (error) { + // TODO: Avor reader should abort reading from internal stream + assert.deepStrictEqual(error.name, "AbortError"); + unlinkSync(downloadedFile); + return; + } + assert.fail(); + }); + + it("query should work with progress event", async () => { + recorder.skip("node", "TODO: Avor reader doesn't work with recorder yet."); + const csvContent = "100,200,300,400\n150,250,350,450\n"; + await blockBlobClient.upload(csvContent, csvContent.length); + + await new Promise((resolve, reject) => { + blockBlobClient + .query("select * from BlobStorage", { + onProgress: (progress) => { + assert.deepStrictEqual(progress.loadedBytes, csvContent.length); + resolve(); + } + }) + .then((response) => { + return bodyToString(response); + }) + .then((_data) => {}) + .catch(reject); + }); + }); + + it("query should work with fatal error event", async () => { + recorder.skip("node", "TODO: Avor reader doesn't work with recorder yet."); + const csvContent = "100,200,300,400\n150,250,350,450\n"; + await blockBlobClient.upload(csvContent, csvContent.length); + + const response = await blockBlobClient.query("select * from BlobStorage", { + inputTextConfiguration: { + kind: "json", + recordSeparator: "\n" + }, + onError: (err) => { + assert.deepStrictEqual(err.isFatal, true); + assert.deepStrictEqual(err.name, "ParseError"); + assert.deepStrictEqual(err.position, 0); + assert.deepStrictEqual( + err.description, + "Unexpected token ',' at [byte: 3]. Expecting tokens '{', or '['." + ); + return; + } + }); + assert.deepStrictEqual(await bodyToString(response), "\n"); + }); + + it("query should work with non fatal error event", async () => { + recorder.skip("node", "TODO: Avor reader doesn't work with recorder yet."); + const csvContent = "100,hello,300,400\n150,250,350,450\n"; + await blockBlobClient.upload(csvContent, csvContent.length); + + const response = await blockBlobClient.query("select _2 from BlobStorage where _2 > 100", { + onError: (err) => { + assert.deepStrictEqual(err.isFatal, false); + assert.deepStrictEqual(err.name, "InvalidTypeConversion"); + assert.deepStrictEqual(err.position, 0); + assert.deepStrictEqual(err.description, "Invalid type conversion."); + return; + } + }); + assert.deepStrictEqual(await bodyToString(response), "250\n"); + }); + + it("query should work with CSV input and output configurations", async () => { + recorder.skip("node", "TODO: Avor reader doesn't work with recorder yet."); + const csvContent = "100.200.300.400!150.250.350.450!180.280.380.480!"; + await blockBlobClient.upload(csvContent, csvContent.length); + + const response = await blockBlobClient.query("select _1 from BlobStorage", { + inputTextConfiguration: { + kind: "csv", + recordSeparator: "!", + columnSeparator: ".", + // escapeCharacter: "\\", // What does this do? + // fieldQuote: '"', // What does this do? + hasHeaders: true + }, + outputTextConfiguration: { + kind: "csv", + recordSeparator: "!", + columnSeparator: ".", + // escapeCharacter: "\\", + // fieldQuote: '"', + hasHeaders: false + } + }); + assert.deepStrictEqual(await bodyToString(response), "150!180!"); + }); + + it("query should work with JSON input and output configurations", async () => { + recorder.skip("node", "TODO: Avor reader doesn't work with recorder yet."); + const recordSeparator = "\n"; + const jsonContent = + [ + JSON.stringify({ _1: "100", _2: "200", _3: "300", _4: "400" }), + JSON.stringify({ _1: "150", _2: "250", _3: "350", _4: "450" }), + JSON.stringify({ _1: "180", _2: "280", _3: "380", _4: "480" }) + ].join(recordSeparator) + recordSeparator; + await blockBlobClient.upload(jsonContent, jsonContent.length); + + const response = await blockBlobClient.query("select * from BlobStorage", { + inputTextConfiguration: { + kind: "json", + recordSeparator + }, + outputTextConfiguration: { + kind: "json", + recordSeparator + } + }); + assert.deepStrictEqual(await bodyToString(response), jsonContent); + }); }); diff --git a/sdk/storage/storage-blob/test/utils/index.ts b/sdk/storage/storage-blob/test/utils/index.ts index 7a633cda4dab..9102fee4d381 100644 --- a/sdk/storage/storage-blob/test/utils/index.ts +++ b/sdk/storage/storage-blob/test/utils/index.ts @@ -145,17 +145,33 @@ export async function bodyToString( }); } +export async function createRandomLocalFile( + folder: string, + blockNumber: number, + blockContent: Buffer +): Promise; export async function createRandomLocalFile( folder: string, blockNumber: number, blockSize: number +): Promise; +export async function createRandomLocalFile( + folder: string, + blockNumber: number, + blockSizeOrContent: number | Buffer ): Promise { return new Promise((resolve, reject) => { const destFile = path.join(folder, getUniqueName("tempfile.")); const ws = fs.createWriteStream(destFile); let offsetInMB = 0; - function randomValueHex(len = blockSize) { + function randomValueHex() { + if (blockSizeOrContent instanceof Buffer) { + return blockSizeOrContent; + } + + const len = blockSizeOrContent; + return randomBytes(Math.ceil(len / 2)) .toString("hex") // convert to hexadecimal format .slice(0, len); // return required number of characters @@ -163,7 +179,7 @@ export async function createRandomLocalFile( ws.on("open", () => { // tslint:disable-next-line:no-empty - while (offsetInMB++ < blockNumber && ws.write(randomValueHex())) { } + while (offsetInMB++ < blockNumber && ws.write(randomValueHex())) {} if (offsetInMB >= blockNumber) { ws.end(); } @@ -171,7 +187,7 @@ export async function createRandomLocalFile( ws.on("drain", () => { // tslint:disable-next-line:no-empty - while (offsetInMB++ < blockNumber && ws.write(randomValueHex())) { } + while (offsetInMB++ < blockNumber && ws.write(randomValueHex())) {} if (offsetInMB >= blockNumber) { ws.end(); } diff --git a/sdk/storage/storage-internal-avro/package.json b/sdk/storage/storage-internal-avro/package.json index 5ac366124c24..4c080ec10b35 100644 --- a/sdk/storage/storage-internal-avro/package.json +++ b/sdk/storage/storage-internal-avro/package.json @@ -79,4 +79,4 @@ "typescript": "~3.8.3", "util": "^0.12.1" } -} \ No newline at end of file +} From f705b5ca03fa09cc3bead2162a325f1d389dc76d Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Wed, 10 Jun 2020 14:45:26 +0800 Subject: [PATCH 07/39] regenerate storage-blob --- .../storage-blob/review/storage-blob.api.md | 5 +-- .../src/generated/src/models/index.ts | 29 +++++++++++--- .../src/generated/src/models/mappers.ts | 27 ++++++++----- .../src/generated/src/models/parameters.ts | 26 ++++++++++++ .../generated/src/operations/appendBlob.ts | 7 +++- .../src/generated/src/operations/blob.ts | 40 +++++++++++++------ .../src/generated/src/operations/blockBlob.ts | 9 +++-- .../src/generated/src/operations/pageBlob.ts | 13 ++++-- 8 files changed, 116 insertions(+), 40 deletions(-) diff --git a/sdk/storage/storage-blob/review/storage-blob.api.md b/sdk/storage/storage-blob/review/storage-blob.api.md index a347c7889a19..1341266a65b3 100644 --- a/sdk/storage/storage-blob/review/storage-blob.api.md +++ b/sdk/storage/storage-blob/review/storage-blob.api.md @@ -673,9 +673,7 @@ export interface BlobItem { // (undocumented) name: string; // (undocumented) - objectReplicationPolicyId?: string; - // (undocumented) - objectReplicationRules?: { + objectReplicationMetadata?: { [propertyName: string]: string; }; // (undocumented) @@ -1852,6 +1850,7 @@ export interface ModifiedAccessConditions { ifMatch?: string; ifModifiedSince?: Date; ifNoneMatch?: string; + ifTags?: string; ifUnmodifiedSince?: Date; } diff --git a/sdk/storage/storage-blob/src/generated/src/models/index.ts b/sdk/storage/storage-blob/src/generated/src/models/index.ts index 26db595515f5..4c1521a8277e 100644 --- a/sdk/storage/storage-blob/src/generated/src/models/index.ts +++ b/sdk/storage/storage-blob/src/generated/src/models/index.ts @@ -89,7 +89,7 @@ export interface DataLakeStorageError { /** * The service error response object. */ - error?: DataLakeStorageErrorError; + dataLakeStorageErrorDetails?: DataLakeStorageErrorError; } /** @@ -210,8 +210,7 @@ export interface BlobItemInternal { properties: BlobPropertiesInternal; metadata?: { [propertyName: string]: string }; blobTags?: BlobTags; - objectReplicationPolicyId?: string; - objectReplicationRules?: { [propertyName: string]: string }; + objectReplicationMetadata?: { [propertyName: string]: string }; } /** @@ -670,6 +669,10 @@ export interface ModifiedAccessConditions { * Specify an ETag value to operate only on blobs without a matching value. */ ifNoneMatch?: string; + /** + * Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + */ + ifTags?: string; } /** @@ -721,6 +724,10 @@ export interface SourceModifiedAccessConditions { * Specify an ETag value to operate only on blobs without a matching value. */ sourceIfNoneMatch?: string; + /** + * Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + */ + sourceIfTags?: string; } /** @@ -1501,7 +1508,7 @@ export interface DirectoryRenameOptionalParams extends coreHttp.RequestOptionsBa posixUmask?: string; /** * A lease ID for the source path. If specified, the source path must have an active lease and - * the leaase ID must match. + * the lease ID must match. */ sourceLeaseId?: string; /** @@ -1893,7 +1900,7 @@ export interface BlobRenameOptionalParams extends coreHttp.RequestOptionsBase { posixUmask?: string; /** * A lease ID for the source path. If specified, the source path must have an active lease and - * the leaase ID must match. + * the lease ID must match. */ sourceLeaseId?: string; /** @@ -2444,6 +2451,10 @@ export interface BlobGetTagsOptionalParams extends coreHttp.RequestOptionsBase { * of the blob to operate on. It's for service version 2019-10-10 and newer. */ versionId?: string; + /** + * Additional parameters for the operation + */ + modifiedAccessConditions?: ModifiedAccessConditions; } /** @@ -2478,6 +2489,10 @@ export interface BlobSetTagsOptionalParams extends coreHttp.RequestOptionsBase { * Blob tags */ tags?: BlobTags; + /** + * Additional parameters for the operation + */ + modifiedAccessConditions?: ModifiedAccessConditions; } /** @@ -3303,6 +3318,10 @@ export interface BlockBlobGetBlockListOptionalParams extends coreHttp.RequestOpt * Additional parameters for the operation */ leaseAccessConditions?: LeaseAccessConditions; + /** + * Additional parameters for the operation + */ + modifiedAccessConditions?: ModifiedAccessConditions; } /** diff --git a/sdk/storage/storage-blob/src/generated/src/models/mappers.ts b/sdk/storage/storage-blob/src/generated/src/models/mappers.ts index 095fc8e09fa5..65566422db96 100644 --- a/sdk/storage/storage-blob/src/generated/src/models/mappers.ts +++ b/sdk/storage/storage-blob/src/generated/src/models/mappers.ts @@ -148,7 +148,7 @@ export const DataLakeStorageError: coreHttp.CompositeMapper = { name: "Composite", className: "DataLakeStorageError", modelProperties: { - error: { + dataLakeStorageErrorDetails: { xmlName: "error", serializedName: "error", type: { @@ -603,16 +603,9 @@ export const BlobItemInternal: coreHttp.CompositeMapper = { className: "BlobTags" } }, - objectReplicationPolicyId: { - xmlName: "ObjectReplicationPolicyId", - serializedName: "ObjectReplicationPolicyId", - type: { - name: "String" - } - }, - objectReplicationRules: { - xmlName: "BlobObjectReplicationRules", - serializedName: "ObjectReplicationRules", + objectReplicationMetadata: { + xmlName: "OrMetadata", + serializedName: "ObjectReplicationMetadata", type: { name: "Dictionary", value: { @@ -1954,6 +1947,12 @@ export const ModifiedAccessConditions: coreHttp.CompositeMapper = { type: { name: "String" } + }, + ifTags: { + xmlName: "ifTags", + type: { + name: "String" + } } } } @@ -2028,6 +2027,12 @@ export const SourceModifiedAccessConditions: coreHttp.CompositeMapper = { type: { name: "String" } + }, + sourceIfTags: { + xmlName: "sourceIfTags", + type: { + name: "String" + } } } } diff --git a/sdk/storage/storage-blob/src/generated/src/models/parameters.ts b/sdk/storage/storage-blob/src/generated/src/models/parameters.ts index 1e68f498e48a..c985e05682ff 100644 --- a/sdk/storage/storage-blob/src/generated/src/models/parameters.ts +++ b/sdk/storage/storage-blob/src/generated/src/models/parameters.ts @@ -926,6 +926,19 @@ export const ifSequenceNumberLessThanOrEqualTo: coreHttp.OperationParameter = { } } }; +export const ifTags: coreHttp.OperationParameter = { + parameterPath: [ + "options", + "modifiedAccessConditions", + "ifTags" + ], + mapper: { + serializedName: "x-ms-if-tags", + type: { + name: "String" + } + } +}; export const ifUnmodifiedSince: coreHttp.OperationParameter = { parameterPath: [ "options", @@ -1506,6 +1519,19 @@ export const sourceIfNoneMatch: coreHttp.OperationParameter = { } } }; +export const sourceIfTags: coreHttp.OperationParameter = { + parameterPath: [ + "options", + "sourceModifiedAccessConditions", + "sourceIfTags" + ], + mapper: { + serializedName: "x-ms-source-if-tags", + type: { + name: "String" + } + } +}; export const sourceIfUnmodifiedSince: coreHttp.OperationParameter = { parameterPath: [ "options", diff --git a/sdk/storage/storage-blob/src/generated/src/operations/appendBlob.ts b/sdk/storage/storage-blob/src/generated/src/operations/appendBlob.ts index 2834950a8ff5..49d5040217b4 100644 --- a/sdk/storage/storage-blob/src/generated/src/operations/appendBlob.ts +++ b/sdk/storage/storage-blob/src/generated/src/operations/appendBlob.ts @@ -181,7 +181,8 @@ const createOperationSpec: coreHttp.OperationSpec = { Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.ifTags ], responses: { 201: { @@ -222,7 +223,8 @@ const appendBlockOperationSpec: coreHttp.OperationSpec = { Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.ifTags ], requestBody: { parameterPath: "body", @@ -278,6 +280,7 @@ const appendBlockFromUrlOperationSpec: coreHttp.OperationSpec = { Parameters.ifUnmodifiedSince, Parameters.ifMatch, Parameters.ifNoneMatch, + Parameters.ifTags, Parameters.sourceIfModifiedSince, Parameters.sourceIfUnmodifiedSince, Parameters.sourceIfMatch, diff --git a/sdk/storage/storage-blob/src/generated/src/operations/blob.ts b/sdk/storage/storage-blob/src/generated/src/operations/blob.ts index 7a30216162b6..4f7b4deea02e 100644 --- a/sdk/storage/storage-blob/src/generated/src/operations/blob.ts +++ b/sdk/storage/storage-blob/src/generated/src/operations/blob.ts @@ -738,7 +738,8 @@ const downloadOperationSpec: coreHttp.OperationSpec = { Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.ifTags ], responses: { 200: { @@ -789,7 +790,8 @@ const getPropertiesOperationSpec: coreHttp.OperationSpec = { Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.ifTags ], responses: { 200: { @@ -823,7 +825,8 @@ const deleteMethodOperationSpec: coreHttp.OperationSpec = { Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.ifTags ], responses: { 202: { @@ -1032,7 +1035,8 @@ const setHTTPHeadersOperationSpec: coreHttp.OperationSpec = { Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.ifTags ], responses: { 200: { @@ -1069,7 +1073,8 @@ const setMetadataOperationSpec: coreHttp.OperationSpec = { Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.ifTags ], responses: { 200: { @@ -1103,7 +1108,8 @@ const acquireLeaseOperationSpec: coreHttp.OperationSpec = { Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.ifTags ], responses: { 201: { @@ -1136,7 +1142,8 @@ const releaseLeaseOperationSpec: coreHttp.OperationSpec = { Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.ifTags ], responses: { 200: { @@ -1169,7 +1176,8 @@ const renewLeaseOperationSpec: coreHttp.OperationSpec = { Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.ifTags ], responses: { 200: { @@ -1203,7 +1211,8 @@ const changeLeaseOperationSpec: coreHttp.OperationSpec = { Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.ifTags ], responses: { 200: { @@ -1236,7 +1245,8 @@ const breakLeaseOperationSpec: coreHttp.OperationSpec = { Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.ifTags ], responses: { 202: { @@ -1273,6 +1283,7 @@ const createSnapshotOperationSpec: coreHttp.OperationSpec = { Parameters.ifUnmodifiedSince, Parameters.ifMatch, Parameters.ifNoneMatch, + Parameters.ifTags, Parameters.leaseId0 ], responses: { @@ -1310,10 +1321,12 @@ const startCopyFromURLOperationSpec: coreHttp.OperationSpec = { Parameters.sourceIfUnmodifiedSince, Parameters.sourceIfMatch, Parameters.sourceIfNoneMatch, + Parameters.sourceIfTags, Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, Parameters.ifNoneMatch, + Parameters.ifTags, Parameters.leaseId0 ], responses: { @@ -1356,6 +1369,7 @@ const copyFromURLOperationSpec: coreHttp.OperationSpec = { Parameters.ifUnmodifiedSince, Parameters.ifMatch, Parameters.ifNoneMatch, + Parameters.ifTags, Parameters.leaseId0 ], responses: { @@ -1535,7 +1549,8 @@ const getTagsOperationSpec: coreHttp.OperationSpec = { ], headerParameters: [ Parameters.version, - Parameters.requestId + Parameters.requestId, + Parameters.ifTags ], responses: { 200: { @@ -1566,7 +1581,8 @@ const setTagsOperationSpec: coreHttp.OperationSpec = { Parameters.version, Parameters.transactionalContentMD5, Parameters.transactionalContentCrc64, - Parameters.requestId + Parameters.requestId, + Parameters.ifTags ], requestBody: { parameterPath: [ diff --git a/sdk/storage/storage-blob/src/generated/src/operations/blockBlob.ts b/sdk/storage/storage-blob/src/generated/src/operations/blockBlob.ts index a929107a11ae..b3c010908c20 100644 --- a/sdk/storage/storage-blob/src/generated/src/operations/blockBlob.ts +++ b/sdk/storage/storage-blob/src/generated/src/operations/blockBlob.ts @@ -251,7 +251,8 @@ const uploadOperationSpec: coreHttp.OperationSpec = { Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.ifTags ], requestBody: { parameterPath: "body", @@ -398,7 +399,8 @@ const commitBlockListOperationSpec: coreHttp.OperationSpec = { Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.ifTags ], requestBody: { parameterPath: "blocks", @@ -436,7 +438,8 @@ const getBlockListOperationSpec: coreHttp.OperationSpec = { headerParameters: [ Parameters.version, Parameters.requestId, - Parameters.leaseId0 + Parameters.leaseId0, + Parameters.ifTags ], responses: { 200: { diff --git a/sdk/storage/storage-blob/src/generated/src/operations/pageBlob.ts b/sdk/storage/storage-blob/src/generated/src/operations/pageBlob.ts index a5b2b2e75d60..01a2d303301c 100644 --- a/sdk/storage/storage-blob/src/generated/src/operations/pageBlob.ts +++ b/sdk/storage/storage-blob/src/generated/src/operations/pageBlob.ts @@ -360,7 +360,8 @@ const createOperationSpec: coreHttp.OperationSpec = { Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.ifTags ], responses: { 201: { @@ -404,7 +405,8 @@ const uploadPagesOperationSpec: coreHttp.OperationSpec = { Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.ifTags ], requestBody: { parameterPath: "body", @@ -504,6 +506,7 @@ const uploadPagesFromURLOperationSpec: coreHttp.OperationSpec = { Parameters.ifUnmodifiedSince, Parameters.ifMatch, Parameters.ifNoneMatch, + Parameters.ifTags, Parameters.sourceIfModifiedSince, Parameters.sourceIfUnmodifiedSince, Parameters.sourceIfMatch, @@ -541,7 +544,8 @@ const getPageRangesOperationSpec: coreHttp.OperationSpec = { Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.ifTags ], responses: { 200: { @@ -578,7 +582,8 @@ const getPageRangesDiffOperationSpec: coreHttp.OperationSpec = { Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.ifTags ], responses: { 200: { From 33b5925f3a58bd364808333eab6f52c46485c0bb Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Wed, 10 Jun 2020 14:46:06 +0800 Subject: [PATCH 08/39] re-generate storage-file-share --- .../review/storage-file-share.api.md | 10 ++- .../src/generated/src/models/index.ts | 84 ++++++++++++++++++- .../src/generated/src/models/mappers.ts | 80 ++++++++++++++++++ .../src/generated/src/models/parameters.ts | 49 +++++++++-- .../src/generated/src/models/shareMappers.ts | 1 + .../src/generated/src/operations/directory.ts | 4 +- .../src/generated/src/operations/file.ts | 20 ++--- .../src/generated/src/operations/share.ts | 54 ++++++++++++ .../storage-file-share/swagger/README.md | 2 +- 9 files changed, 282 insertions(+), 22 deletions(-) diff --git a/sdk/storage/storage-file-share/review/storage-file-share.api.md b/sdk/storage/storage-file-share/review/storage-file-share.api.md index fa73a6f94ae3..8339c061ec89 100644 --- a/sdk/storage/storage-file-share/review/storage-file-share.api.md +++ b/sdk/storage/storage-file-share/review/storage-file-share.api.md @@ -1087,7 +1087,7 @@ export interface ListHandlesResponse { } // @public -export type ListSharesIncludeType = 'snapshots' | 'metadata'; +export type ListSharesIncludeType = 'snapshots' | 'metadata' | 'deleted'; // @public export interface ListSharesResponse { @@ -1585,6 +1585,8 @@ export type ShareGetStatisticsResponseModel = ShareStats & ShareGetStatisticsHea // @public export interface ShareItem { + // (undocumented) + deleted?: boolean; // (undocumented) metadata?: { [propertyName: string]: string; @@ -1595,6 +1597,8 @@ export interface ShareItem { properties: ShareProperties; // (undocumented) snapshot?: string; + // (undocumented) + version?: string; } // @public @@ -1615,6 +1619,8 @@ export interface SharePermission { // @public export interface ShareProperties { + // (undocumented) + deletedTime?: Date; // (undocumented) etag: string; // (undocumented) @@ -1629,6 +1635,8 @@ export interface ShareProperties { provisionedIops?: number; // (undocumented) quota: number; + // (undocumented) + remainingRetentionDays?: number; } // @public diff --git a/sdk/storage/storage-file-share/src/generated/src/models/index.ts b/sdk/storage/storage-file-share/src/generated/src/models/index.ts index 9c2e8307b240..7fb1d5c868d2 100644 --- a/sdk/storage/storage-file-share/src/generated/src/models/index.ts +++ b/sdk/storage/storage-file-share/src/generated/src/models/index.ts @@ -173,6 +173,8 @@ export interface ShareProperties { provisionedIngressMBps?: number; provisionedEgressMBps?: number; nextAllowedQuotaDowngradeTime?: Date; + deletedTime?: Date; + remainingRetentionDays?: number; } /** @@ -181,6 +183,8 @@ export interface ShareProperties { export interface ShareItem { name: string; snapshot?: string; + deleted?: boolean; + version?: string; properties: ShareProperties; metadata?: { [propertyName: string]: string }; } @@ -627,6 +631,31 @@ export interface ShareGetStatisticsOptionalParams extends coreHttp.RequestOption timeoutInSeconds?: number; } +/** + * Optional Parameters. + */ +export interface ShareRestoreOptionalParams extends coreHttp.RequestOptionsBase { + /** + * The timeout parameter is expressed in seconds. For more information, see Setting + * Timeouts for File Service Operations. + */ + timeoutInSeconds?: number; + /** + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + */ + requestId?: string; + /** + * Specifies the name of the preivously-deleted share. + */ + deletedShareName?: string; + /** + * Specifies the version of the preivously-deleted share. + */ + deletedShareVersion?: string; +} + /** * Optional Parameters. */ @@ -1653,6 +1682,42 @@ export interface ShareGetStatisticsHeaders { errorCode?: string; } +/** + * Defines headers for Restore operation. + */ +export interface ShareRestoreHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally, in quotes. + */ + etag?: string; + /** + * Returns the date and time the share was last modified. Any operation that modifies the share + * or its properties updates the last modified time. Operations on files do not affect the last + * modified time of the share. + */ + lastModified?: Date; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * Indicates the version of the File service used to execute the request. + */ + version?: string; + /** + * A UTC date/time value generated by the service that indicates the time at which the response + * was initiated. + */ + date?: Date; + errorCode?: string; +} + /** * Defines headers for Create operation. */ @@ -2913,11 +2978,11 @@ export type DeleteSnapshotsOptionType = 'include'; /** * Defines values for ListSharesIncludeType. - * Possible values include: 'snapshots', 'metadata' + * Possible values include: 'snapshots', 'metadata', 'deleted' * @readonly * @enum {string} */ -export type ListSharesIncludeType = 'snapshots' | 'metadata'; +export type ListSharesIncludeType = 'snapshots' | 'metadata' | 'deleted'; /** * Defines values for CopyStatusType. @@ -3227,6 +3292,21 @@ export type ShareGetStatisticsResponse = ShareStats & ShareGetStatisticsHeaders }; }; +/** + * Contains response data for the restore operation. + */ +export type ShareRestoreResponse = ShareRestoreHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ShareRestoreHeaders; + }; +}; + /** * Contains response data for the create operation. */ diff --git a/sdk/storage/storage-file-share/src/generated/src/models/mappers.ts b/sdk/storage/storage-file-share/src/generated/src/models/mappers.ts index 39d449992827..a4f07c09825b 100644 --- a/sdk/storage/storage-file-share/src/generated/src/models/mappers.ts +++ b/sdk/storage/storage-file-share/src/generated/src/models/mappers.ts @@ -448,6 +448,20 @@ export const ShareProperties: coreHttp.CompositeMapper = { type: { name: "DateTimeRfc1123" } + }, + deletedTime: { + xmlName: "DeletedTime", + serializedName: "DeletedTime", + type: { + name: "DateTimeRfc1123" + } + }, + remainingRetentionDays: { + xmlName: "RemainingRetentionDays", + serializedName: "RemainingRetentionDays", + type: { + name: "Number" + } } } } @@ -475,6 +489,20 @@ export const ShareItem: coreHttp.CompositeMapper = { name: "String" } }, + deleted: { + xmlName: "Deleted", + serializedName: "Deleted", + type: { + name: "Boolean" + } + }, + version: { + xmlName: "Version", + serializedName: "Version", + type: { + name: "String" + } + }, properties: { xmlName: "Properties", required: true, @@ -1523,6 +1551,58 @@ export const ShareGetStatisticsHeaders: coreHttp.CompositeMapper = { } }; +export const ShareRestoreHeaders: coreHttp.CompositeMapper = { + serializedName: "share-restore-headers", + type: { + name: "Composite", + className: "ShareRestoreHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; + export const DirectoryCreateHeaders: coreHttp.CompositeMapper = { serializedName: "directory-create-headers", type: { diff --git a/sdk/storage/storage-file-share/src/generated/src/models/parameters.ts b/sdk/storage/storage-file-share/src/generated/src/models/parameters.ts index 3201f5b7920b..5a93cbfde140 100644 --- a/sdk/storage/storage-file-share/src/generated/src/models/parameters.ts +++ b/sdk/storage/storage-file-share/src/generated/src/models/parameters.ts @@ -88,7 +88,7 @@ export const comp10: coreHttp.OperationQueryParameter = { required: true, isConstant: true, serializedName: "comp", - defaultValue: 'range', + defaultValue: 'lease', type: { name: "String" } @@ -100,13 +100,25 @@ export const comp11: coreHttp.OperationQueryParameter = { required: true, isConstant: true, serializedName: "comp", - defaultValue: 'rangelist', + defaultValue: 'range', type: { name: "String" } } }; export const comp12: coreHttp.OperationQueryParameter = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'rangelist', + type: { + name: "String" + } + } +}; +export const comp13: coreHttp.OperationQueryParameter = { parameterPath: "comp", mapper: { required: true, @@ -184,7 +196,7 @@ export const comp7: coreHttp.OperationQueryParameter = { required: true, isConstant: true, serializedName: "comp", - defaultValue: 'listhandles', + defaultValue: 'undelete', type: { name: "String" } @@ -196,7 +208,7 @@ export const comp8: coreHttp.OperationQueryParameter = { required: true, isConstant: true, serializedName: "comp", - defaultValue: 'forceclosehandles', + defaultValue: 'listhandles', type: { name: "String" } @@ -208,7 +220,7 @@ export const comp9: coreHttp.OperationQueryParameter = { required: true, isConstant: true, serializedName: "comp", - defaultValue: 'lease', + defaultValue: 'forceclosehandles', type: { name: "String" } @@ -268,6 +280,30 @@ export const copySource: coreHttp.OperationParameter = { } } }; +export const deletedShareName: coreHttp.OperationParameter = { + parameterPath: [ + "options", + "deletedShareName" + ], + mapper: { + serializedName: "x-ms-deleted-share-name", + type: { + name: "String" + } + } +}; +export const deletedShareVersion: coreHttp.OperationParameter = { + parameterPath: [ + "options", + "deletedShareVersion" + ], + mapper: { + serializedName: "x-ms-deleted-share-version", + type: { + name: "String" + } + } +}; export const deleteSnapshots: coreHttp.OperationParameter = { parameterPath: [ "options", @@ -591,7 +627,8 @@ export const include: coreHttp.OperationQueryParameter = { name: "Enum", allowedValues: [ "snapshots", - "metadata" + "metadata", + "deleted" ] } } diff --git a/sdk/storage/storage-file-share/src/generated/src/models/shareMappers.ts b/sdk/storage/storage-file-share/src/generated/src/models/shareMappers.ts index e24e8970e089..452568ab51aa 100644 --- a/sdk/storage/storage-file-share/src/generated/src/models/shareMappers.ts +++ b/sdk/storage/storage-file-share/src/generated/src/models/shareMappers.ts @@ -17,6 +17,7 @@ export { ShareGetPropertiesHeaders, ShareGetStatisticsHeaders, SharePermission, + ShareRestoreHeaders, ShareSetAccessPolicyHeaders, ShareSetMetadataHeaders, ShareSetQuotaHeaders, diff --git a/sdk/storage/storage-file-share/src/generated/src/operations/directory.ts b/sdk/storage/storage-file-share/src/generated/src/operations/directory.ts index 79673552b122..1746b39274c7 100644 --- a/sdk/storage/storage-file-share/src/generated/src/operations/directory.ts +++ b/sdk/storage/storage-file-share/src/generated/src/operations/directory.ts @@ -450,7 +450,7 @@ const listHandlesOperationSpec: coreHttp.OperationSpec = { Parameters.maxResults, Parameters.timeoutInSeconds, Parameters.shareSnapshot, - Parameters.comp7 + Parameters.comp8 ], headerParameters: [ Parameters.recursive, @@ -480,7 +480,7 @@ const forceCloseHandlesOperationSpec: coreHttp.OperationSpec = { Parameters.timeoutInSeconds, Parameters.marker, Parameters.shareSnapshot, - Parameters.comp8 + Parameters.comp9 ], headerParameters: [ Parameters.handleId, diff --git a/sdk/storage/storage-file-share/src/generated/src/operations/file.ts b/sdk/storage/storage-file-share/src/generated/src/operations/file.ts index 3c1e25c12b27..92c1d2f88001 100644 --- a/sdk/storage/storage-file-share/src/generated/src/operations/file.ts +++ b/sdk/storage/storage-file-share/src/generated/src/operations/file.ts @@ -807,7 +807,7 @@ const acquireLeaseOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.timeoutInSeconds, - Parameters.comp9 + Parameters.comp10 ], headerParameters: [ Parameters.duration, @@ -837,7 +837,7 @@ const releaseLeaseOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.timeoutInSeconds, - Parameters.comp9 + Parameters.comp10 ], headerParameters: [ Parameters.leaseId1, @@ -866,7 +866,7 @@ const changeLeaseOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.timeoutInSeconds, - Parameters.comp9 + Parameters.comp10 ], headerParameters: [ Parameters.leaseId1, @@ -896,7 +896,7 @@ const breakLeaseOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.timeoutInSeconds, - Parameters.comp9 + Parameters.comp10 ], headerParameters: [ Parameters.version, @@ -925,7 +925,7 @@ const uploadRangeOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.timeoutInSeconds, - Parameters.comp10 + Parameters.comp11 ], headerParameters: [ Parameters.range1, @@ -969,7 +969,7 @@ const uploadRangeFromURLOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.timeoutInSeconds, - Parameters.comp10 + Parameters.comp11 ], headerParameters: [ Parameters.range1, @@ -1005,7 +1005,7 @@ const getRangeListOperationSpec: coreHttp.OperationSpec = { queryParameters: [ Parameters.shareSnapshot, Parameters.timeoutInSeconds, - Parameters.comp11 + Parameters.comp12 ], headerParameters: [ Parameters.version, @@ -1083,7 +1083,7 @@ const abortCopyOperationSpec: coreHttp.OperationSpec = { queryParameters: [ Parameters.copyId, Parameters.timeoutInSeconds, - Parameters.comp12 + Parameters.comp13 ], headerParameters: [ Parameters.copyActionAbortConstant, @@ -1114,7 +1114,7 @@ const listHandlesOperationSpec: coreHttp.OperationSpec = { Parameters.maxResults, Parameters.timeoutInSeconds, Parameters.shareSnapshot, - Parameters.comp7 + Parameters.comp8 ], headerParameters: [ Parameters.version @@ -1143,7 +1143,7 @@ const forceCloseHandlesOperationSpec: coreHttp.OperationSpec = { Parameters.timeoutInSeconds, Parameters.marker, Parameters.shareSnapshot, - Parameters.comp8 + Parameters.comp9 ], headerParameters: [ Parameters.handleId, diff --git a/sdk/storage/storage-file-share/src/generated/src/operations/share.ts b/sdk/storage/storage-file-share/src/generated/src/operations/share.ts index d8b454643168..5cc5179f048f 100644 --- a/sdk/storage/storage-file-share/src/generated/src/operations/share.ts +++ b/sdk/storage/storage-file-share/src/generated/src/operations/share.ts @@ -300,6 +300,30 @@ export class Share { getStatisticsOperationSpec, callback) as Promise; } + + /** + * Restores a previously deleted Share. + * @param [options] The optional parameters + * @returns Promise + */ + restore(options?: Models.ShareRestoreOptionalParams): Promise; + /** + * @param callback The callback + */ + restore(callback: coreHttp.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + restore(options: Models.ShareRestoreOptionalParams, callback: coreHttp.ServiceCallback): void; + restore(options?: Models.ShareRestoreOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + restoreOperationSpec, + callback) as Promise; + } } // Operation Specifications @@ -650,3 +674,33 @@ const getStatisticsOperationSpec: coreHttp.OperationSpec = { isXML: true, serializer }; + +const restoreOperationSpec: coreHttp.OperationSpec = { + httpMethod: "PUT", + path: "{shareName}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.restype1, + Parameters.comp7 + ], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.deletedShareName, + Parameters.deletedShareVersion + ], + responses: { + 201: { + headersMapper: Mappers.ShareRestoreHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ShareRestoreHeaders + } + }, + isXML: true, + serializer +}; diff --git a/sdk/storage/storage-file-share/swagger/README.md b/sdk/storage/storage-file-share/swagger/README.md index 084d3a86396f..92acff2933e5 100644 --- a/sdk/storage/storage-file-share/swagger/README.md +++ b/sdk/storage/storage-file-share/swagger/README.md @@ -12,7 +12,7 @@ enable-xml: true generate-metadata: false license-header: MICROSOFT_MIT_NO_VERSION output-folder: ../src/generated -input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/storage-dataplane-preview/specification/storage/data-plane/Microsoft.FileStorage/preview/2019-07-07/file.json +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/storage-dataplane-preview/specification/storage/data-plane/Microsoft.FileStorage/preview/2019-12-12/file.json model-date-time-as-string: true optional-response-headers: true ``` From 0da47ef9124c3de2d705776732944ec6d6fc2095 Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Wed, 10 Jun 2020 16:52:39 +0800 Subject: [PATCH 09/39] regenrate datalake and undo adding mode to storageClient and storageClientContext --- .../review/storage-file-datalake.api.md | 61 +++-- .../src/generated/src/models/index.ts | 251 +++++++++++++++++- .../src/generated/src/models/mappers.ts | 166 ++++++++++++ .../src/generated/src/models/parameters.ts | 83 +++++- .../src/models/pathOperationsMappers.ts | 4 + .../src/operations/pathOperations.ts | 169 ++++++++++-- .../storage-file-datalake/src/models.ts | 28 +- .../storage-file-datalake/swagger/README.md | 2 +- 8 files changed, 703 insertions(+), 61 deletions(-) diff --git a/sdk/storage/storage-file-datalake/review/storage-file-datalake.api.md b/sdk/storage/storage-file-datalake/review/storage-file-datalake.api.md index 063b97d97cd8..fa3d6f8f6054 100644 --- a/sdk/storage/storage-file-datalake/review/storage-file-datalake.api.md +++ b/sdk/storage/storage-file-datalake/review/storage-file-datalake.api.md @@ -141,17 +141,17 @@ export class DataLakeDirectoryClient extends DataLakePathClient { export class DataLakeFileClient extends DataLakePathClient { constructor(url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions); constructor(url: string, pipeline: Pipeline); - append(body: HttpRequestBody, offset: number, length: number, options?: FileAppendOptions): Promise; + append(body: HttpRequestBody, offset: number, length: number, options?: FileAppendOptions): Promise; create(resourceType: PathResourceType, options?: PathCreateOptions): Promise; create(options?: FileCreateOptions): Promise; - flush(position: number, options?: FileFlushOptions): Promise; + flush(position: number, options?: FileFlushOptions): Promise; read(offset?: number, count?: number, options?: FileReadOptions): Promise; readToBuffer(buffer: Buffer, offset?: number, count?: number, options?: FileReadToBufferOptions): Promise; readToBuffer(offset?: number, count?: number, options?: FileReadToBufferOptions): Promise; readToFile(filePath: string, offset?: number, count?: number, options?: FileReadOptions): Promise; - upload(data: Buffer | Blob | ArrayBuffer | ArrayBufferView, options?: FileParallelUploadOptions): Promise; - uploadFile(filePath: string, options?: FileParallelUploadOptions): Promise; - uploadStream(stream: Readable, options?: FileParallelUploadOptions): Promise; + upload(data: Buffer | Blob | ArrayBuffer | ArrayBufferView, options?: FileParallelUploadOptions): Promise; + uploadFile(filePath: string, options?: FileParallelUploadOptions): Promise; + uploadStream(stream: Readable, options?: FileParallelUploadOptions): Promise; } // Warning: (ae-forgotten-export) The symbol "StorageClient" needs to be exported by the entry point index.d.ts @@ -280,6 +280,13 @@ export interface FileAppendOptions extends CommonOptions { transactionalContentMD5?: Uint8Array; } +// @public +export type FileAppendResponse = PathAppendDataHeaders & { + _response: coreHttp.HttpResponse & { + parsedHeaders: PathAppendDataHeaders; + }; +}; + // @public (undocumented) export interface FileCreateOptions extends PathCreateOptions { } @@ -819,6 +826,14 @@ export interface PathAccessControlItem { permissions: RolePermissions; } +// @public +export interface PathAppendDataHeaders { + clientRequestId?: string; + date?: Date; + requestId?: string; + version?: string; +} + // @public export interface PathCreateHeaders { contentLength?: number; @@ -899,6 +914,28 @@ export interface PathExistsOptions extends CommonOptions { abortSignal?: AbortSignalLike; } +// @public +export interface PathFlushDataHeaders { + clientRequestId?: string; + contentLength?: number; + date?: Date; + etag?: string; + lastModified?: Date; + requestId?: string; + version?: string; +} + +// @public +type PathFlushDataResponse = PathFlushDataHeaders & { + _response: coreHttp.HttpResponse & { + parsedHeaders: PathFlushDataHeaders; + }; +}; + +export { PathFlushDataResponse as FileFlushResponse } + +export { PathFlushDataResponse as FileUploadResponse } + // @public (undocumented) export interface PathGetAccessControlHeaders { // (undocumented) @@ -1296,21 +1333,9 @@ export interface PathUpdateHeaders { properties?: string; requestId?: string; version?: string; + xMsContinuation?: string; } -// @public -type PathUpdateResponse = PathUpdateHeaders & { - _response: coreHttp.HttpResponse & { - parsedHeaders: PathUpdateHeaders; - }; -}; - -export { PathUpdateResponse as FileAppendResponse } - -export { PathUpdateResponse as FileFlushResponse } - -export { PathUpdateResponse as FileUploadResponse } - // @public export class Pipeline extends Pipeline_2 { constructor(factories: RequestPolicyFactory[], options?: PipelineOptions); diff --git a/sdk/storage/storage-file-datalake/src/generated/src/models/index.ts b/sdk/storage/storage-file-datalake/src/generated/src/models/index.ts index b3b0a22960d4..5befeea12216 100644 --- a/sdk/storage/storage-file-datalake/src/generated/src/models/index.ts +++ b/sdk/storage/storage-file-datalake/src/generated/src/models/index.ts @@ -9,6 +9,25 @@ import * as coreHttp from "@azure/core-http"; +/** + * An interface representing AclFailedEntry. + */ +export interface AclFailedEntry { + name?: string; + type?: string; + errorMessage?: string; +} + +/** + * An interface representing SetAccessControlRecursiveResponse. + */ +export interface SetAccessControlRecursiveResponse { + directoriesSuccessful?: number; + filesSuccessful?: number; + failureCount?: number; + failedEntries?: AclFailedEntry[]; +} + /** * An interface representing Path. */ @@ -441,6 +460,20 @@ export interface PathCreateOptionalParams extends coreHttp.RequestOptionsBase { * Optional Parameters. */ export interface PathUpdateOptionalParams extends coreHttp.RequestOptionsBase { + /** + * Optional. Valid for "SetAccessControlRecursive" operation. It specifies the maximum number of + * files or directories on which the acl change will be applied. If omitted or greater than + * 2,000, the request will process up to 2,000 items + */ + maxRecords?: number; + /** + * Optional. The number of paths processed with each invocation is limited. If the number of + * paths to be processed exceeds this limit, a continuation token is returned in the response + * header x-ms-continuation. When a continuation token is returned in the response, it must be + * percent-encoded and specified in a subsequent invocation of setAcessControlRecursive + * operation. + */ + continuation?: string; /** * This parameter allows the caller to upload data in parallel and control the order in which it * is appended to the file. It is required when uploading data to be appended to the file and @@ -736,6 +769,42 @@ export interface PathSetAccessControlOptionalParams extends coreHttp.RequestOpti modifiedAccessConditions?: ModifiedAccessConditions; } +/** + * Optional Parameters. + */ +export interface PathSetAccessControlRecursiveOptionalParams extends coreHttp.RequestOptionsBase { + /** + * The timeout parameter is expressed in seconds. For more information, see Setting + * Timeouts for Blob Service Operations. + */ + timeoutParameter?: number; + /** + * Optional. When deleting a directory, the number of paths that are deleted with each + * invocation is limited. If the number of paths to be deleted exceeds this limit, a + * continuation token is returned in this response header. When a continuation token is returned + * in the response, it must be specified in a subsequent invocation of the delete operation to + * continue deleting the directory. + */ + continuation?: string; + /** + * Optional. It specifies the maximum number of files or directories on which the acl change will + * be applied. If omitted or greater than 2,000, the request will process up to 2,000 items + */ + maxRecords?: number; + /** + * Sets POSIX access control rights on files and directories. The value is a comma-separated list + * of access control entries. Each access control entry (ACE) consists of a scope, a type, a user + * or group identifier, and permissions in the format "[scope:][type]:[id]:[permissions]". + */ + acl?: string; + /** + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + */ + requestId?: string; +} + /** * Optional Parameters. */ @@ -841,6 +910,27 @@ export interface PathAppendDataOptionalParams extends coreHttp.RequestOptionsBas leaseAccessConditions?: LeaseAccessConditions; } +/** + * Optional Parameters. + */ +export interface PathSetExpiryOptionalParams extends coreHttp.RequestOptionsBase { + /** + * The timeout parameter is expressed in seconds. For more information, see Setting + * Timeouts for Blob Service Operations. + */ + timeoutParameter?: number; + /** + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + */ + requestId?: string; + /** + * The time to set the blob to expiry + */ + expiresOn?: string; +} + /** * Defines headers for ListFileSystems operation. */ @@ -1146,6 +1236,15 @@ export interface PathUpdateHeaders { * character set. */ properties?: string; + /** + * When performing setAccessControlRecursive on a directory, the number of paths that are + * processed with each invocation is limited. If the number of paths to be processed exceeds + * this limit, a continuation token is returned in this response header. When a continuation + * token is returned in the response, it must be specified in a subsequent invocation of the + * setAccessControlRecursive operation to continue the setAccessControlRecursive operation on the + * directory. + */ + xMsContinuation?: string; /** * A server-generated UUID recorded in the analytics logs for troubleshooting and correlation. */ @@ -1477,6 +1576,39 @@ export interface PathSetAccessControlHeaders { version?: string; } +/** + * Defines headers for SetAccessControlRecursive operation. + */ +export interface PathSetAccessControlRecursiveHeaders { + /** + * A UTC date/time value generated by the service that indicates the time at which the response + * was initiated. + */ + date?: Date; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * When performing setAccessControlRecursive on a directory, the number of paths that are + * processed with each invocation is limited. If the number of paths to be processed exceeds + * this limit, a continuation token is returned in this response header. When a continuation + * token is returned in the response, it must be specified in a subsequent invocation of the + * setAccessControlRecursive operation to continue the setAccessControlRecursive operation on the + * directory. + */ + continuation?: string; + /** + * A server-generated UUID recorded in the analytics logs for troubleshooting and correlation. + */ + requestId?: string; + /** + * The version of the REST protocol used to process the request. + */ + version?: string; +} + /** * Defines headers for FlushData operation. */ @@ -1538,6 +1670,69 @@ export interface PathAppendDataHeaders { version?: string; } +/** + * Defines headers for SetExpiry operation. + */ +export interface PathSetExpiryHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated. + */ + date?: Date; + errorCode?: string; +} + +/** + * Defines values for PathSetAccessControlRecursiveMode. + * Possible values include: 'set', 'modify', 'remove' + * @readonly + * @enum {string} + */ +export enum PathSetAccessControlRecursiveMode { + Set = 'set', + Modify = 'modify', + Remove = 'remove', +} + +/** + * Defines values for PathExpiryOptions. + * Possible values include: 'NeverExpire', 'RelativeToCreation', 'RelativeToNow', 'Absolute' + * @readonly + * @enum {string} + */ +export enum PathExpiryOptions { + NeverExpire = 'NeverExpire', + RelativeToCreation = 'RelativeToCreation', + RelativeToNow = 'RelativeToNow', + Absolute = 'Absolute', +} + /** * Defines values for PathResourceType. * Possible values include: 'directory', 'file' @@ -1562,7 +1757,8 @@ export enum PathRenameMode { /** * Defines values for PathUpdateAction. - * Possible values include: 'append', 'flush', 'setProperties', 'setAccessControl' + * Possible values include: 'append', 'flush', 'setProperties', 'setAccessControl', + * 'setAccessControlRecursive' * @readonly * @enum {string} */ @@ -1571,6 +1767,7 @@ export enum PathUpdateAction { Flush = 'flush', SetProperties = 'setProperties', SetAccessControl = 'setAccessControl', + SetAccessControlRecursive = 'setAccessControlRecursive', } /** @@ -1726,7 +1923,7 @@ export type PathCreateResponse = PathCreateHeaders & { /** * Contains response data for the update operation. */ -export type PathUpdateResponse = PathUpdateHeaders & { +export type PathUpdateResponse = SetAccessControlRecursiveResponse & PathUpdateHeaders & { /** * The underlying HTTP response. */ @@ -1735,6 +1932,16 @@ export type PathUpdateResponse = PathUpdateHeaders & { * The parsed HTTP response headers. */ parsedHeaders: PathUpdateHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: SetAccessControlRecursiveResponse; }; }; @@ -1829,6 +2036,31 @@ export type PathSetAccessControlResponse = PathSetAccessControlHeaders & { }; }; +/** + * Contains response data for the setAccessControlRecursive operation. + */ +export type PathSetAccessControlRecursiveResponse = SetAccessControlRecursiveResponse & PathSetAccessControlRecursiveHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: PathSetAccessControlRecursiveHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: SetAccessControlRecursiveResponse; + }; +}; + /** * Contains response data for the flushData operation. */ @@ -1858,3 +2090,18 @@ export type PathAppendDataResponse = PathAppendDataHeaders & { parsedHeaders: PathAppendDataHeaders; }; }; + +/** + * Contains response data for the setExpiry operation. + */ +export type PathSetExpiryResponse = PathSetExpiryHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: PathSetExpiryHeaders; + }; +}; diff --git a/sdk/storage/storage-file-datalake/src/generated/src/models/mappers.ts b/sdk/storage/storage-file-datalake/src/generated/src/models/mappers.ts index d26248f7057f..38367cfb49ff 100644 --- a/sdk/storage/storage-file-datalake/src/generated/src/models/mappers.ts +++ b/sdk/storage/storage-file-datalake/src/generated/src/models/mappers.ts @@ -9,6 +9,74 @@ import * as coreHttp from "@azure/core-http"; +export const AclFailedEntry: coreHttp.CompositeMapper = { + serializedName: "AclFailedEntry", + type: { + name: "Composite", + className: "AclFailedEntry", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + }, + errorMessage: { + serializedName: "errorMessage", + type: { + name: "String" + } + } + } + } +}; + +export const SetAccessControlRecursiveResponse: coreHttp.CompositeMapper = { + serializedName: "SetAccessControlRecursiveResponse", + type: { + name: "Composite", + className: "SetAccessControlRecursiveResponse", + modelProperties: { + directoriesSuccessful: { + serializedName: "directoriesSuccessful", + type: { + name: "Number" + } + }, + filesSuccessful: { + serializedName: "filesSuccessful", + type: { + name: "Number" + } + }, + failureCount: { + serializedName: "failureCount", + type: { + name: "Number" + } + }, + failedEntries: { + serializedName: "failedEntries", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AclFailedEntry" + } + } + } + } + } + } +}; + export const Path: coreHttp.CompositeMapper = { serializedName: "Path", type: { @@ -725,6 +793,12 @@ export const PathUpdateHeaders: coreHttp.CompositeMapper = { name: "String" } }, + xMsContinuation: { + serializedName: "x-ms-continuation", + type: { + name: "String" + } + }, requestId: { serializedName: "x-ms-request-id", type: { @@ -1181,6 +1255,46 @@ export const PathSetAccessControlHeaders: coreHttp.CompositeMapper = { } }; +export const PathSetAccessControlRecursiveHeaders: coreHttp.CompositeMapper = { + serializedName: "path-setaccesscontrolrecursive-headers", + type: { + name: "Composite", + className: "PathSetAccessControlRecursiveHeaders", + modelProperties: { + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + continuation: { + serializedName: "x-ms-continuation", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + } + } + } +}; + export const PathFlushDataHeaders: coreHttp.CompositeMapper = { serializedName: "path-flushdata-headers", type: { @@ -1266,3 +1380,55 @@ export const PathAppendDataHeaders: coreHttp.CompositeMapper = { } } }; + +export const PathSetExpiryHeaders: coreHttp.CompositeMapper = { + serializedName: "path-setexpiry-headers", + type: { + name: "Composite", + className: "PathSetExpiryHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; diff --git a/sdk/storage/storage-file-datalake/src/generated/src/models/parameters.ts b/sdk/storage/storage-file-datalake/src/generated/src/models/parameters.ts index c28b47ddade0..48d3784db944 100644 --- a/sdk/storage/storage-file-datalake/src/generated/src/models/parameters.ts +++ b/sdk/storage/storage-file-datalake/src/generated/src/models/parameters.ts @@ -33,7 +33,8 @@ export const action0: coreHttp.OperationQueryParameter = { "append", "flush", "setProperties", - "setAccessControl" + "setAccessControl", + "setAccessControlRecursive" ] } } @@ -72,13 +73,25 @@ export const action3: coreHttp.OperationQueryParameter = { required: true, isConstant: true, serializedName: "action", - defaultValue: 'flush', + defaultValue: 'setAccessControlRecursive', type: { name: "String" } } }; export const action4: coreHttp.OperationQueryParameter = { + parameterPath: "action", + mapper: { + required: true, + isConstant: true, + serializedName: "action", + defaultValue: 'flush', + type: { + name: "String" + } + } +}; +export const action5: coreHttp.OperationQueryParameter = { parameterPath: "action", mapper: { required: true, @@ -115,6 +128,18 @@ export const close: coreHttp.OperationQueryParameter = { } } }; +export const comp: coreHttp.OperationQueryParameter = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'expiry', + type: { + name: "String" + } + } +}; export const contentDisposition: coreHttp.OperationParameter = { parameterPath: [ "options", @@ -207,6 +232,28 @@ export const continuation: coreHttp.OperationQueryParameter = { } } }; +export const expiresOn: coreHttp.OperationParameter = { + parameterPath: [ + "options", + "expiresOn" + ], + mapper: { + serializedName: "x-ms-expiry-time", + type: { + name: "String" + } + } +}; +export const expiryOptions: coreHttp.OperationParameter = { + parameterPath: "expiryOptions", + mapper: { + required: true, + serializedName: "x-ms-expiry-option", + type: { + name: "String" + } + } +}; export const group: coreHttp.OperationParameter = { parameterPath: [ "options", @@ -284,6 +331,21 @@ export const leaseId: coreHttp.OperationParameter = { } } }; +export const maxRecords: coreHttp.OperationQueryParameter = { + parameterPath: [ + "options", + "maxRecords" + ], + mapper: { + serializedName: "maxRecords", + constraints: { + InclusiveMinimum: 1 + }, + type: { + name: "Number" + } + } +}; export const maxResults: coreHttp.OperationQueryParameter = { parameterPath: [ "options", @@ -299,7 +361,7 @@ export const maxResults: coreHttp.OperationQueryParameter = { } } }; -export const mode: coreHttp.OperationQueryParameter = { +export const mode0: coreHttp.OperationQueryParameter = { parameterPath: [ "options", "mode" @@ -315,6 +377,21 @@ export const mode: coreHttp.OperationQueryParameter = { } } }; +export const mode1: coreHttp.OperationQueryParameter = { + parameterPath: "mode", + mapper: { + required: true, + serializedName: "mode", + type: { + name: "Enum", + allowedValues: [ + "set", + "modify", + "remove" + ] + } + } +}; export const owner: coreHttp.OperationParameter = { parameterPath: [ "options", diff --git a/sdk/storage/storage-file-datalake/src/generated/src/models/pathOperationsMappers.ts b/sdk/storage/storage-file-datalake/src/generated/src/models/pathOperationsMappers.ts index 16b7bc848029..c36acafb4ac2 100644 --- a/sdk/storage/storage-file-datalake/src/generated/src/models/pathOperationsMappers.ts +++ b/sdk/storage/storage-file-datalake/src/generated/src/models/pathOperationsMappers.ts @@ -7,6 +7,7 @@ */ export { + AclFailedEntry, PathAppendDataHeaders, PathCreateHeaders, PathDeleteHeaders, @@ -15,7 +16,10 @@ export { PathLeaseHeaders, PathReadHeaders, PathSetAccessControlHeaders, + PathSetAccessControlRecursiveHeaders, + PathSetExpiryHeaders, PathUpdateHeaders, + SetAccessControlRecursiveResponse, StorageError, StorageErrorError } from "../models/mappers"; diff --git a/sdk/storage/storage-file-datalake/src/generated/src/operations/pathOperations.ts b/sdk/storage/storage-file-datalake/src/generated/src/operations/pathOperations.ts index dd4db9a7e1de..98968b17ea7d 100644 --- a/sdk/storage/storage-file-datalake/src/generated/src/operations/pathOperations.ts +++ b/sdk/storage/storage-file-datalake/src/generated/src/operations/pathOperations.ts @@ -65,12 +65,13 @@ export class PathOperations { * @summary Append Data | Flush Data | Set Properties | Set Access Control * @param action The action must be "append" to upload data to be appended to a file, "flush" to * flush previously uploaded data to a file, "setProperties" to set the properties of a file or - * directory, or "setAccessControl" to set the owner, group, permissions, or access control list - * for a file or directory. Note that Hierarchical Namespace must be enabled for the account in - * order to use access control. Also note that the Access Control List (ACL) includes permissions - * for the owner, owning group, and others, so the x-ms-permissions and x-ms-acl request headers - * are mutually exclusive. Possible values include: 'append', 'flush', 'setProperties', - * 'setAccessControl' + * directory, "setAccessControl" to set the owner, group, permissions, or access control list for a + * file or directory, or "setAccessControlRecursive" to set the access control list for a + * directory recursively. Note that Hierarchical Namespace must be enabled for the account in order + * to use access control. Also note that the Access Control List (ACL) includes permissions for + * the owner, owning group, and others, so the x-ms-permissions and x-ms-acl request headers are + * mutually exclusive. Possible values include: 'append', 'flush', 'setProperties', + * 'setAccessControl', 'setAccessControlRecursive' * @param body Initial data * @param [options] The optional parameters * @returns Promise @@ -79,31 +80,33 @@ export class PathOperations { /** * @param action The action must be "append" to upload data to be appended to a file, "flush" to * flush previously uploaded data to a file, "setProperties" to set the properties of a file or - * directory, or "setAccessControl" to set the owner, group, permissions, or access control list - * for a file or directory. Note that Hierarchical Namespace must be enabled for the account in - * order to use access control. Also note that the Access Control List (ACL) includes permissions - * for the owner, owning group, and others, so the x-ms-permissions and x-ms-acl request headers - * are mutually exclusive. Possible values include: 'append', 'flush', 'setProperties', - * 'setAccessControl' + * directory, "setAccessControl" to set the owner, group, permissions, or access control list for a + * file or directory, or "setAccessControlRecursive" to set the access control list for a + * directory recursively. Note that Hierarchical Namespace must be enabled for the account in order + * to use access control. Also note that the Access Control List (ACL) includes permissions for + * the owner, owning group, and others, so the x-ms-permissions and x-ms-acl request headers are + * mutually exclusive. Possible values include: 'append', 'flush', 'setProperties', + * 'setAccessControl', 'setAccessControlRecursive' * @param body Initial data * @param callback The callback */ - update(action: Models.PathUpdateAction, body: coreHttp.HttpRequestBody, callback: coreHttp.ServiceCallback): void; + update(action: Models.PathUpdateAction, body: coreHttp.HttpRequestBody, callback: coreHttp.ServiceCallback): void; /** * @param action The action must be "append" to upload data to be appended to a file, "flush" to * flush previously uploaded data to a file, "setProperties" to set the properties of a file or - * directory, or "setAccessControl" to set the owner, group, permissions, or access control list - * for a file or directory. Note that Hierarchical Namespace must be enabled for the account in - * order to use access control. Also note that the Access Control List (ACL) includes permissions - * for the owner, owning group, and others, so the x-ms-permissions and x-ms-acl request headers - * are mutually exclusive. Possible values include: 'append', 'flush', 'setProperties', - * 'setAccessControl' + * directory, "setAccessControl" to set the owner, group, permissions, or access control list for a + * file or directory, or "setAccessControlRecursive" to set the access control list for a + * directory recursively. Note that Hierarchical Namespace must be enabled for the account in order + * to use access control. Also note that the Access Control List (ACL) includes permissions for + * the owner, owning group, and others, so the x-ms-permissions and x-ms-acl request headers are + * mutually exclusive. Possible values include: 'append', 'flush', 'setProperties', + * 'setAccessControl', 'setAccessControlRecursive' * @param body Initial data * @param options The optional parameters * @param callback The callback */ - update(action: Models.PathUpdateAction, body: coreHttp.HttpRequestBody, options: Models.PathUpdateOptionalParams, callback: coreHttp.ServiceCallback): void; - update(action: Models.PathUpdateAction, body: coreHttp.HttpRequestBody, options?: Models.PathUpdateOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + update(action: Models.PathUpdateAction, body: coreHttp.HttpRequestBody, options: Models.PathUpdateOptionalParams, callback: coreHttp.ServiceCallback): void; + update(action: Models.PathUpdateAction, body: coreHttp.HttpRequestBody, options?: Models.PathUpdateOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { action, @@ -281,6 +284,30 @@ export class PathOperations { callback) as Promise; } + /** + * Set the access control list for a path and subpaths. + * @param [options] The optional parameters + * @returns Promise + */ + setAccessControlRecursive(options?: Models.PathSetAccessControlRecursiveOptionalParams): Promise; + /** + * @param callback The callback + */ + setAccessControlRecursive(callback: coreHttp.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + setAccessControlRecursive(options: Models.PathSetAccessControlRecursiveOptionalParams, callback: coreHttp.ServiceCallback): void; + setAccessControlRecursive(options?: Models.PathSetAccessControlRecursiveOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + setAccessControlRecursiveOperationSpec, + callback) as Promise; + } + /** * Set the owner, group, permissions, or access control list for a path. * @param [options] The optional parameters @@ -332,6 +359,37 @@ export class PathOperations { appendDataOperationSpec, callback) as Promise; } + + /** + * Sets the time a blob will expire and be deleted. + * @param expiryOptions Required. Indicates mode of the expiry time. Possible values include: + * 'NeverExpire', 'RelativeToCreation', 'RelativeToNow', 'Absolute' + * @param [options] The optional parameters + * @returns Promise + */ + setExpiry(expiryOptions: Models.PathExpiryOptions, options?: Models.PathSetExpiryOptionalParams): Promise; + /** + * @param expiryOptions Required. Indicates mode of the expiry time. Possible values include: + * 'NeverExpire', 'RelativeToCreation', 'RelativeToNow', 'Absolute' + * @param callback The callback + */ + setExpiry(expiryOptions: Models.PathExpiryOptions, callback: coreHttp.ServiceCallback): void; + /** + * @param expiryOptions Required. Indicates mode of the expiry time. Possible values include: + * 'NeverExpire', 'RelativeToCreation', 'RelativeToNow', 'Absolute' + * @param options The optional parameters + * @param callback The callback + */ + setExpiry(expiryOptions: Models.PathExpiryOptions, options: Models.PathSetExpiryOptionalParams, callback: coreHttp.ServiceCallback): void; + setExpiry(expiryOptions: Models.PathExpiryOptions, options?: Models.PathSetExpiryOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + expiryOptions, + options + }, + setExpiryOperationSpec, + callback) as Promise; + } } // Operation Specifications @@ -345,7 +403,7 @@ const createOperationSpec: coreHttp.OperationSpec = { queryParameters: [ Parameters.resource2, Parameters.continuation, - Parameters.mode, + Parameters.mode0, Parameters.timeout ], headerParameters: [ @@ -391,6 +449,9 @@ const updateOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.action0, + Parameters.maxRecords, + Parameters.continuation, + Parameters.mode1, Parameters.position, Parameters.retainUncommittedData, Parameters.close, @@ -430,6 +491,7 @@ const updateOperationSpec: coreHttp.OperationSpec = { contentType: "application/octet-stream", responses: { 200: { + bodyMapper: Mappers.SetAccessControlRecursiveResponse, headersMapper: Mappers.PathUpdateHeaders }, 202: { @@ -629,6 +691,37 @@ const setAccessControlOperationSpec: coreHttp.OperationSpec = { serializer }; +const setAccessControlRecursiveOperationSpec: coreHttp.OperationSpec = { + httpMethod: "PATCH", + path: "{filesystem}/{path}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeout, + Parameters.continuation, + Parameters.mode1, + Parameters.maxRecords, + Parameters.action3 + ], + headerParameters: [ + Parameters.acl, + Parameters.requestId, + Parameters.version + ], + responses: { + 200: { + bodyMapper: Mappers.SetAccessControlRecursiveResponse, + headersMapper: Mappers.PathSetAccessControlRecursiveHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PathSetAccessControlRecursiveHeaders + } + }, + serializer +}; + const flushDataOperationSpec: coreHttp.OperationSpec = { httpMethod: "PATCH", path: "{filesystem}/{path}", @@ -640,7 +733,7 @@ const flushDataOperationSpec: coreHttp.OperationSpec = { Parameters.position, Parameters.retainUncommittedData, Parameters.close, - Parameters.action3 + Parameters.action4 ], headerParameters: [ Parameters.contentLength, @@ -679,7 +772,7 @@ const appendDataOperationSpec: coreHttp.OperationSpec = { queryParameters: [ Parameters.position, Parameters.timeout, - Parameters.action4 + Parameters.action5 ], headerParameters: [ Parameters.contentLength, @@ -709,3 +802,31 @@ const appendDataOperationSpec: coreHttp.OperationSpec = { }, serializer }; + +const setExpiryOperationSpec: coreHttp.OperationSpec = { + httpMethod: "PUT", + path: "{filesystem}/{path}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeout, + Parameters.comp + ], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.expiryOptions, + Parameters.expiresOn + ], + responses: { + 200: { + headersMapper: Mappers.PathSetExpiryHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PathSetExpiryHeaders + } + }, + serializer +}; diff --git a/sdk/storage/storage-file-datalake/src/models.ts b/sdk/storage/storage-file-datalake/src/models.ts index a00b82ccadd7..92183357423c 100644 --- a/sdk/storage/storage-file-datalake/src/models.ts +++ b/sdk/storage/storage-file-datalake/src/models.ts @@ -39,9 +39,11 @@ export { PathSetAccessControlResponse as PathSetPermissionsResponse, PathResourceType, PathUpdateHeaders, - PathUpdateResponse as FileAppendResponse, - PathUpdateResponse as FileFlushResponse, - PathUpdateResponse as FileUploadResponse, + PathAppendDataHeaders, + PathFlushDataHeaders, + PathAppendDataResponse as FileAppendResponse, + PathFlushDataResponse as FileFlushResponse, + PathFlushDataResponse as FileUploadResponse, PathGetPropertiesAction, PathRenameMode } from "./generated/src/models"; @@ -260,12 +262,12 @@ export interface SignedIdentifier { export type FileSystemGetAccessPolicyResponse = { signedIdentifiers: SignedIdentifier[]; } & FileSystemGetAccessPolicyHeaders & { - _response: HttpResponse & { - parsedHeaders: FileSystemGetAccessPolicyHeaders; - bodyAsText: string; - parsedBody: SignedIdentifier[]; - }; + _response: HttpResponse & { + parsedHeaders: FileSystemGetAccessPolicyHeaders; + bodyAsText: string; + parsedBody: SignedIdentifier[]; }; +}; export interface FileSystemSetAccessPolicyOptions extends CommonOptions { abortSignal?: AbortSignalLike; @@ -352,7 +354,7 @@ export interface Metadata { export interface DataLakeRequestConditions extends ModifiedAccessConditions, - LeaseAccessConditions {} + LeaseAccessConditions { } export interface RolePermissions { read: boolean; @@ -591,9 +593,9 @@ export interface PathExistsOptions extends CommonOptions { /** DataLakeDirectoryClient option and response related models **/ /****************************************************************/ -export interface DirectoryCreateOptions extends PathCreateOptions {} +export interface DirectoryCreateOptions extends PathCreateOptions { } -export interface DirectoryCreateResponse extends PathCreateResponse {} +export interface DirectoryCreateResponse extends PathCreateResponse { } /***********************************************************/ /** DataLakeFileClient option and response related models **/ @@ -665,9 +667,9 @@ export interface FileFlushOptions extends CommonOptions { pathHttpHeaders?: PathHttpHeaders; } -export interface FileCreateOptions extends PathCreateOptions {} +export interface FileCreateOptions extends PathCreateOptions { } -export interface FileCreateResponse extends PathCreateResponse {} +export interface FileCreateResponse extends PathCreateResponse { } /** * Option interface for Data Lake file - Upload operations diff --git a/sdk/storage/storage-file-datalake/swagger/README.md b/sdk/storage/storage-file-datalake/swagger/README.md index 40d61c3ab60d..899a9b114fe1 100644 --- a/sdk/storage/storage-file-datalake/swagger/README.md +++ b/sdk/storage/storage-file-datalake/swagger/README.md @@ -12,7 +12,7 @@ enable-xml: true generate-metadata: false license-header: MICROSOFT_MIT_NO_VERSION output-folder: ../src/generated -input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/storage-dataplane-preview/specification/storage/data-plane/Microsoft.StorageDataLake/stable/2018-11-09/DataLakeStorage.json +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/storage-dataplane-preview/specification/storage/data-plane/Microsoft.StorageDataLake/stable/2019-12-12/DataLakeStorage.json model-date-time-as-string: true optional-response-headers: true enum-types: true From ff0cf9f084df93ebffedb25569961bc56ba9e128 Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Thu, 11 Jun 2020 18:30:01 +0800 Subject: [PATCH 10/39] update datalake service version to 2019-12-12 --- sdk/storage/storage-file-datalake/package.json | 4 ++-- .../src/generated/src/models/parameters.ts | 2 +- .../src/generated/src/storageClientContext.ts | 2 +- sdk/storage/storage-file-datalake/src/utils/constants.ts | 4 ++-- sdk/storage/storage-file-datalake/swagger/README.md | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sdk/storage/storage-file-datalake/package.json b/sdk/storage/storage-file-datalake/package.json index 8b5b15ff3a8d..10834962e6ae 100644 --- a/sdk/storage/storage-file-datalake/package.json +++ b/sdk/storage/storage-file-datalake/package.json @@ -1,6 +1,6 @@ { "name": "@azure/storage-file-datalake", - "version": "12.0.1", + "version": "12.1.0-preview.1", "description": "Microsoft Azure Storage SDK for JavaScript - DataLake", "sdk-type": "client", "main": "./dist/index.js", @@ -162,4 +162,4 @@ "typescript": "~3.9.3", "util": "^0.12.1" } -} +} \ No newline at end of file diff --git a/sdk/storage/storage-file-datalake/src/generated/src/models/parameters.ts b/sdk/storage/storage-file-datalake/src/generated/src/models/parameters.ts index 48d3784db944..cb9a8ccbce69 100644 --- a/sdk/storage/storage-file-datalake/src/generated/src/models/parameters.ts +++ b/sdk/storage/storage-file-datalake/src/generated/src/models/parameters.ts @@ -720,7 +720,7 @@ export const version: coreHttp.OperationParameter = { required: true, isConstant: true, serializedName: "x-ms-version", - defaultValue: '2019-07-07', + defaultValue: '2019-12-12', type: { name: "String" } diff --git a/sdk/storage/storage-file-datalake/src/generated/src/storageClientContext.ts b/sdk/storage/storage-file-datalake/src/generated/src/storageClientContext.ts index 4b02459e8160..4f7f4afc89f4 100644 --- a/sdk/storage/storage-file-datalake/src/generated/src/storageClientContext.ts +++ b/sdk/storage/storage-file-datalake/src/generated/src/storageClientContext.ts @@ -41,7 +41,7 @@ export class StorageClientContext extends coreHttp.ServiceClient { super(undefined, options); this.resource = 'filesystem'; - this.version = '2019-07-07'; + this.version = '2019-12-12'; this.baseUri = "{url}"; this.requestContentType = "application/json; charset=utf-8"; this.url = url; diff --git a/sdk/storage/storage-file-datalake/src/utils/constants.ts b/sdk/storage/storage-file-datalake/src/utils/constants.ts index dcceca94a1b4..5a5474706b07 100644 --- a/sdk/storage/storage-file-datalake/src/utils/constants.ts +++ b/sdk/storage/storage-file-datalake/src/utils/constants.ts @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -export const SDK_VERSION: string = "12.0.1"; -export const SERVICE_VERSION: string = "2019-07-07"; +export const SDK_VERSION: string = "12.1.0-preview.1"; +export const SERVICE_VERSION: string = "2019-12-12"; export const KB: number = 1024; export const MB: number = KB * 1024; diff --git a/sdk/storage/storage-file-datalake/swagger/README.md b/sdk/storage/storage-file-datalake/swagger/README.md index 899a9b114fe1..b991f690b2b5 100644 --- a/sdk/storage/storage-file-datalake/swagger/README.md +++ b/sdk/storage/storage-file-datalake/swagger/README.md @@ -83,13 +83,13 @@ directive: $.Path.properties.lastModified.format = "date-time-rfc1123"; ``` -### Update service version to "2019-07-07" +### Update service version ```yaml directive: - from: swagger-document where: $.parameters.ApiVersionParameter - transform: $.enum = [ "2019-07-07" ]; + transform: $.enum = [ "2019-12-12" ]; ``` ### Rename eTag -> etag From 0bf0b40736d32c3116af2c636152b79619360dbd Mon Sep 17 00:00:00 2001 From: xiaonlimsft Date: Fri, 12 Jun 2020 10:53:07 +0800 Subject: [PATCH 11/39] [Storage] QuickQuery - Make BlobQueryCsvTextConfiguration properties optional (#9484) --- sdk/storage/storage-blob/review/storage-blob.api.md | 4 ++-- sdk/storage/storage-blob/src/Clients.ts | 10 +++++----- sdk/storage/storage-blob/src/utils/utils.common.ts | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sdk/storage/storage-blob/review/storage-blob.api.md b/sdk/storage/storage-blob/review/storage-blob.api.md index 1341266a65b3..d7a27e868f63 100644 --- a/sdk/storage/storage-blob/review/storage-blob.api.md +++ b/sdk/storage/storage-blob/review/storage-blob.api.md @@ -769,10 +769,10 @@ export interface BlobProperties { // @public export interface BlobQueryCsvTextConfiguration extends BlobQueryTextConfiguration { - columnSeparator: string; + columnSeparator?: string; escapeCharacter?: string; fieldQuote?: string; - hasHeaders: boolean; + hasHeaders?: boolean; kind: "csv"; } diff --git a/sdk/storage/storage-blob/src/Clients.ts b/sdk/storage/storage-blob/src/Clients.ts index 2fab942e7016..68d1d7b4faf6 100644 --- a/sdk/storage/storage-blob/src/Clients.ts +++ b/sdk/storage/storage-blob/src/Clients.ts @@ -2734,12 +2734,12 @@ export interface BlobQueryCsvTextConfiguration extends BlobQueryTextConfiguratio */ kind: "csv"; /** - * Column separator. + * Column separator. Default is ",". * * @type {string} * @memberof BlobQueryCsvTextConfiguration */ - columnSeparator: string; + columnSeparator?: string; /** * Field quote. * @@ -2755,12 +2755,12 @@ export interface BlobQueryCsvTextConfiguration extends BlobQueryTextConfiguratio */ escapeCharacter?: string; /** - * Has headers. + * Has headers. Default is false. * * @type {boolean} * @memberof BlobQueryCsvTextConfiguration */ - hasHeaders: boolean; + hasHeaders?: boolean; } /** @@ -3445,7 +3445,7 @@ export class BlockBlobClient extends BlobClient { ): Promise { ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - const { span, spanOptions } = createSpan("BlobClient-query", options.tracingOptions); + const { span, spanOptions } = createSpan("BlockBlobClient-query", options.tracingOptions); try { const response = await this._blobContext.query({ diff --git a/sdk/storage/storage-blob/src/utils/utils.common.ts b/sdk/storage/storage-blob/src/utils/utils.common.ts index 5ae893d82963..917424b68477 100644 --- a/sdk/storage/storage-blob/src/utils/utils.common.ts +++ b/sdk/storage/storage-blob/src/utils/utils.common.ts @@ -576,11 +576,11 @@ export function toQuerySerialization( format: { type: "delimited", delimitedTextConfiguration: { - columnSeparator: textConfiguration.columnSeparator, + columnSeparator: textConfiguration.columnSeparator || ",", fieldQuote: textConfiguration.fieldQuote || "", recordSeparator: textConfiguration.recordSeparator, escapeChar: textConfiguration.escapeCharacter || "", - headersPresent: textConfiguration.hasHeaders + headersPresent: textConfiguration.hasHeaders || false } } }; From b1e01e4e92555ddfc67a05f04e494fcc7f6d8ee4 Mon Sep 17 00:00:00 2001 From: Lin Jian <1215122919@qq.com> Date: Fri, 12 Jun 2020 04:03:10 +0000 Subject: [PATCH 12/39] [storage][blob] blob versioning (#7886) * blob versioning * support 'bv' SAS * add response headers to getProperties & api-extract * fix comments * add versionId to getBlob response headers * fix broken undelete test * undo 'add snapshot to options' * replace withVersionId() with getURLWithVersionId() * Revert "replace withVersionId() with getURLWithVersionId()" This reverts commit eb1d90d34783b7717ca0a6a651ba2c53a637be48. * hide the versionId option in convenience layer * add more tests * fix comments * change version to preview * fix merge error Co-authored-by: Lin Jian --- common/config/rush/pnpm-lock.yaml | 74 ++- sdk/storage/storage-blob/CHANGELOG.md | 3 +- sdk/storage/storage-blob/karma.conf.js | 3 +- sdk/storage/storage-blob/package.json | 4 +- ...ing_asynchorous_copy_return_versionid.json | 124 +++++ ...ecording_blob_create_return_versionid.json | 146 ++++++ .../recording_delete_a_snapshot.json | 196 ++++++++ .../recording_delete_a_version.json | 121 +++++ ...eteblobs_should_work_for_batch_delete.json | 81 ++++ ...napshots_needs_deletesnapshots_option.json | 202 ++++++++ ...hots_and_versionid_option_should_fail.json | 154 +++++++ ...thout_extra_parameters_should_succeed.json | 168 +++++++ ..._root_blob_with_versionid_should_fail.json | 121 +++++ .../recording_download_a_blob_version.json | 157 +++++++ .../recording_downloadtobuffer_with_cpk.json | 116 +++++ .../recording_exists_with_condition.json | 161 +++++++ ...ding_get_properties_of_a_blob_version.json | 222 +++++++++ ...recording_list_blobs_include_versions.json | 172 +++++++ ..._promote_a_version_as_the_copy_source.json | 196 ++++++++ .../recording_setmetadata.json | 123 +++++ ...ording_undelete_a_softdeleted_version.json | 142 ++++++ ...ng_upload_block_blob_return_versionid.json | 148 ++++++ .../blobclient/recording_undelete.json | 113 ++--- ...rding_asynchorous_copy_return_versionid.js | 130 ++++++ .../recording_blob_create_return_versionid.js | 153 +++++++ .../recording_delete_a_snapshot.js | 224 +++++++++ .../recording_delete_a_version.js | 196 ++++++++ ...eleteblobs_should_work_for_batch_delete.js | 85 ++++ ..._snapshots_needs_deletesnapshots_option.js | 218 +++++++++ ...pshots_and_versionid_option_should_fail.js | 175 +++++++ ...without_extra_parameters_should_succeed.js | 189 ++++++++ ...ng_root_blob_with_versionid_should_fail.js | 169 +++++++ .../recording_download_a_blob_version.js | 271 +++++++++++ .../recording_download_a_version_to_file.js | 85 ++++ .../recording_downloadtobuffer_with_cpk.js | 257 +++++++++++ .../recording_exists_with_condition.js | 201 ++++++++ ...ording_get_properties_of_a_blob_version.js | 286 ++++++++++++ .../recording_list_blobs_include_versions.js | 185 ++++++++ ...ng_promote_a_version_as_the_copy_source.js | 253 +++++++++++ .../blob_versioning/recording_setmetadata.js | 129 ++++++ ...ecording_undelete_a_softdeleted_version.js | 233 ++++++++++ ...ding_upload_block_blob_return_versionid.js | 132 ++++++ .../node/blobclient/recording_undelete.js | 116 ++--- .../recording_synccopyfromurl.js | 154 ++++--- ...ers_should_work_for_blob_version_delete.js | 123 +++++ ...ers_should_work_for_blob_version_delete.js | 147 ++++++ .../storage-blob/review/storage-blob.api.md | 16 +- .../storage-blob/src/AccountSASPermissions.ts | 14 + .../storage-blob/src/BlobDownloadResponse.ts | 13 +- .../storage-blob/src/BlobSASPermissions.ts | 14 + .../src/BlobSASSignatureValues.ts | 40 +- sdk/storage/storage-blob/src/Clients.ts | 73 ++- .../src/generated/src/storageClientContext.ts | 2 +- .../storage-blob/src/utils/constants.ts | 5 +- .../storage-blob/test/blobclient.spec.ts | 15 +- .../storage-blob/test/blobversioning.spec.ts | 430 ++++++++++++++++++ .../storage-blob/test/encrytion.spec.ts | 2 +- .../storage-blob/test/node/blobclient.spec.ts | 8 +- .../test/node/highlevel.node.spec.ts | 17 +- .../storage-blob/test/node/sas.spec.ts | 158 ++++++- .../storage-blob/test/utils/index.browser.ts | 5 + sdk/storage/storage-blob/test/utils/index.ts | 4 + 62 files changed, 7644 insertions(+), 230 deletions(-) create mode 100644 sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_asynchorous_copy_return_versionid.json create mode 100644 sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_blob_create_return_versionid.json create mode 100644 sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_delete_a_snapshot.json create mode 100644 sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_delete_a_version.json create mode 100644 sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleteblobs_should_work_for_batch_delete.json create mode 100644 sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleting_a_blob_that_has_snapshots_needs_deletesnapshots_option.json create mode 100644 sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleting_a_blob_with_both_deletesnapshots_and_versionid_option_should_fail.json create mode 100644 sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleting_a_versioned_blob_without_extra_parameters_should_succeed.json create mode 100644 sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleting_root_blob_with_versionid_should_fail.json create mode 100644 sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_download_a_blob_version.json create mode 100644 sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_downloadtobuffer_with_cpk.json create mode 100644 sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_exists_with_condition.json create mode 100644 sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_get_properties_of_a_blob_version.json create mode 100644 sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_list_blobs_include_versions.json create mode 100644 sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_promote_a_version_as_the_copy_source.json create mode 100644 sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_setmetadata.json create mode 100644 sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_undelete_a_softdeleted_version.json create mode 100644 sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_upload_block_blob_return_versionid.json create mode 100644 sdk/storage/storage-blob/recordings/node/blob_versioning/recording_asynchorous_copy_return_versionid.js create mode 100644 sdk/storage/storage-blob/recordings/node/blob_versioning/recording_blob_create_return_versionid.js create mode 100644 sdk/storage/storage-blob/recordings/node/blob_versioning/recording_delete_a_snapshot.js create mode 100644 sdk/storage/storage-blob/recordings/node/blob_versioning/recording_delete_a_version.js create mode 100644 sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleteblobs_should_work_for_batch_delete.js create mode 100644 sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleting_a_blob_that_has_snapshots_needs_deletesnapshots_option.js create mode 100644 sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleting_a_blob_with_both_deletesnapshots_and_versionid_option_should_fail.js create mode 100644 sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleting_a_versioned_blob_without_extra_parameters_should_succeed.js create mode 100644 sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleting_root_blob_with_versionid_should_fail.js create mode 100644 sdk/storage/storage-blob/recordings/node/blob_versioning/recording_download_a_blob_version.js create mode 100644 sdk/storage/storage-blob/recordings/node/blob_versioning/recording_download_a_version_to_file.js create mode 100644 sdk/storage/storage-blob/recordings/node/blob_versioning/recording_downloadtobuffer_with_cpk.js create mode 100644 sdk/storage/storage-blob/recordings/node/blob_versioning/recording_exists_with_condition.js create mode 100644 sdk/storage/storage-blob/recordings/node/blob_versioning/recording_get_properties_of_a_blob_version.js create mode 100644 sdk/storage/storage-blob/recordings/node/blob_versioning/recording_list_blobs_include_versions.js create mode 100644 sdk/storage/storage-blob/recordings/node/blob_versioning/recording_promote_a_version_as_the_copy_source.js create mode 100644 sdk/storage/storage-blob/recordings/node/blob_versioning/recording_setmetadata.js create mode 100644 sdk/storage/storage-blob/recordings/node/blob_versioning/recording_undelete_a_softdeleted_version.js create mode 100644 sdk/storage/storage-blob/recordings/node/blob_versioning/recording_upload_block_blob_return_versionid.js create mode 100644 sdk/storage/storage-blob/recordings/node/shared_access_signature_sas_generation_nodejs_only/recording_generateaccountsasqueryparameters_should_work_for_blob_version_delete.js create mode 100644 sdk/storage/storage-blob/recordings/node/shared_access_signature_sas_generation_nodejs_only/recording_generateblobsasqueryparameters_should_work_for_blob_version_delete.js create mode 100644 sdk/storage/storage-blob/test/blobversioning.spec.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 98af63ca439d..db4e875092ba 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -69,6 +69,10 @@ packages: dev: false resolution: integrity: sha512-ZRPkQuzFuT3H/XK81dHVSjCfmfgiPMpJWBZWCEkZAogysZEtO3ydwzIXn95KsRWLJzfoT9m9TYwccSB5Brs+bg== + /@azure/core-asynciterator-polyfill/1.0.0: + dev: false + resolution: + integrity: sha512-kmv8CGrPfN9SwMwrkiBK9VTQYxdFQEGe0BmQk+M8io56P9KNzpAxcWE/1fxJj7uouwN4kXF0BHW8DNlgx+wtCg== /@azure/core-auth/1.1.1: dependencies: '@azure/abort-controller': 1.0.1 @@ -78,6 +82,15 @@ packages: dev: false resolution: integrity: sha512-9Sgl5tFu9s1UKghJUx1VK72CiShSeHbubaaE1xkK/xRc6CU11nU3aEFZBJxWNqBQoR1KmOk53mOQEz4haVLo6w== + /@azure/core-auth/1.1.2: + dependencies: + '@azure/abort-controller': 1.0.1 + '@azure/core-tracing': 1.0.0-preview.8 + '@opentelemetry/api': 0.6.1 + tslib: 1.11.1 + dev: false + resolution: + integrity: sha512-IUbP/f3v96dpHgXUwsAjUwDzjlUjawyUhWhGKKB6Qxy+iqppC/pVBPyc6kdpyTe7H30HN+4H3f0lar7Wp9Hx6A== /@azure/core-http/1.1.0: dependencies: '@azure/abort-controller': 1.0.1 @@ -99,6 +112,41 @@ packages: dev: false resolution: integrity: sha512-2H9AU5PxOSpRggWvOwDOSjJ6+Vym7r8nkdm0PQVGXPiyHjhrR/pvYqi5fHKPYDQQL4hm0eQy7LsT0dRIfdeztw== + /@azure/core-http/1.1.3: + dependencies: + '@azure/abort-controller': 1.0.1 + '@azure/core-auth': 1.1.2 + '@azure/core-tracing': 1.0.0-preview.8 + '@azure/logger': 1.0.0 + '@opentelemetry/api': 0.6.1 + '@types/node-fetch': 2.5.5 + '@types/tunnel': 0.0.1 + form-data: 3.0.0 + node-fetch: 2.6.0 + process: 0.11.10 + tough-cookie: 4.0.0 + tslib: 1.11.1 + tunnel: 0.0.6 + uuid: 8.1.0 + xml2js: 0.4.23 + dev: false + resolution: + integrity: sha512-GysW3+BRVV4L9cs3GsuCbnlyibrQU6hh5mcJ7hlnk7tdUBzWybUvJ8/P/nHX49PgwRmi81pD5v1ht2jF0IzxAQ== + /@azure/core-lro/1.0.2: + dependencies: + '@azure/abort-controller': 1.0.1 + '@azure/core-http': 1.1.3 + events: 3.1.0 + tslib: 1.11.1 + dev: false + resolution: + integrity: sha512-Yr0JD7GKryOmbcb5wHCQoQ4KCcH5QJWRNorofid+UvudLaxnbCfvKh/cUfQsGUqRjO9L/Bw4X7FP824DcHdMxw== + /@azure/core-paging/1.1.1: + dependencies: + '@azure/core-asynciterator-polyfill': 1.0.0 + dev: false + resolution: + integrity: sha512-hqEJBEGKan4YdOaL9ZG/GRG6PXaFd/Wb3SSjQW4LWotZzgl6xqG00h6wmkrpd2NNkbBkD1erLHBO3lPHApv+iQ== /@azure/core-tracing/1.0.0-preview.7: dependencies: '@opencensus/web-types': 0.0.7 @@ -182,6 +230,20 @@ packages: dev: false resolution: integrity: sha512-aFHRw/IHhg3I9ZJW+Va4L+sCirFHMVIu6B7lFdL5mGLfG3xC5vDIdd957LRXFgy2OiKFRUC0QaKknd0YCsQIqA== + /@azure/storage-blob/12.1.2: + dependencies: + '@azure/abort-controller': 1.0.1 + '@azure/core-http': 1.1.3 + '@azure/core-lro': 1.0.2 + '@azure/core-paging': 1.1.1 + '@azure/core-tracing': 1.0.0-preview.8 + '@azure/logger': 1.0.0 + '@opentelemetry/api': 0.6.1 + events: 3.1.0 + tslib: 1.11.1 + dev: false + resolution: + integrity: sha512-PCHgG4r3xLt5FaFj+uiMqrRpuzD3TD17cvxCeA1JKK2bJEf8b07H3QRLQVf0DM1MmvYY8FgQagkWZTp+jr9yew== /@babel/code-frame/7.8.3: dependencies: '@babel/highlight': 7.9.0 @@ -6741,14 +6803,14 @@ packages: node: '>=0.10.0' resolution: integrity: sha1-WIeWa7WCpFA6QetST301ARgVphM= - /ts-loader/6.2.2_typescript@3.8.3: + /ts-loader/6.2.2_typescript@3.9.5: dependencies: chalk: 2.4.2 enhanced-resolve: 4.1.1 loader-utils: 1.4.0 micromatch: 4.0.2 semver: 6.3.0 - typescript: 3.8.3 + typescript: 3.9.5 dev: false engines: node: '>=8.6' @@ -7838,7 +7900,7 @@ packages: shx: 0.3.2 sinon: 9.0.2 tough-cookie: 4.0.0 - ts-loader: 6.2.2_typescript@3.8.3 + ts-loader: 6.2.2_typescript@3.9.5 ts-node: 8.8.2_typescript@3.9.5 tslib: 2.0.0 tunnel: 0.0.6 @@ -8257,6 +8319,7 @@ packages: version: 0.0.0 'file:projects/eventhubs-checkpointstore-blob.tgz': dependencies: + '@azure/storage-blob': 12.1.2 '@microsoft/api-extractor': 7.7.11 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-inject': 4.0.1_rollup@1.32.1 @@ -8316,7 +8379,7 @@ packages: dev: false name: '@rush-temp/eventhubs-checkpointstore-blob' resolution: - integrity: sha512-WeR08au7K0lgwkV/nQjy3NP/6dOrJ9YBd2C4fPnaW01kDV65CeAwtbNbDRR0gqfzGZYi62Q3gFEdfzsuJjL2Wg== + integrity: sha512-a2VkvB0VXuppKkDffruxfSgqSFzDSxaY0eIrKr6mLVXE2dhmttnQUqt/v8Rhfam0e9YQZ78STghOi9eyO3/oKg== tarball: 'file:projects/eventhubs-checkpointstore-blob.tgz' version: 0.0.0 'file:projects/identity.tgz': @@ -8838,6 +8901,7 @@ packages: 'file:projects/storage-file-datalake.tgz': dependencies: '@azure/core-tracing': 1.0.0-preview.8 + '@azure/storage-blob': 12.1.2 '@microsoft/api-extractor': 7.7.11 '@opentelemetry/api': 0.6.1 '@opentelemetry/types': 0.2.0 @@ -8902,7 +8966,7 @@ packages: dev: false name: '@rush-temp/storage-file-datalake' resolution: - integrity: sha512-+5A/p1Sz5BnPMXppQ+6CGY6vD+UtG0X93WoPzcmUjX4zlbtPZ1GGut1tEMMqoVtVO6DrbTWAfG1RqcZeQ4NnWw== + integrity: sha512-9YgvSq/ORVPAudkZMd4jODocqIlewuS9my9J33Ewh3ShqucfhS0LkQ7F4j06Fdd+G6q33n9/olBm8YiBV1i2BQ== tarball: 'file:projects/storage-file-datalake.tgz' version: 0.0.0 'file:projects/storage-file-share.tgz': diff --git a/sdk/storage/storage-blob/CHANGELOG.md b/sdk/storage/storage-blob/CHANGELOG.md index effe4cc6e3cf..23a63325cef8 100644 --- a/sdk/storage/storage-blob/CHANGELOG.md +++ b/sdk/storage/storage-blob/CHANGELOG.md @@ -1,8 +1,9 @@ # Release History -## 12.2.0 (2020.06) +## 12.2.0-preview.1 (2020.06) - Supported quick query. Added a new API `BlockBlobClient.query()`. +- Added support for blob versioning. ## 12.1.2 (2020.05) diff --git a/sdk/storage/storage-blob/karma.conf.js b/sdk/storage/storage-blob/karma.conf.js index ae9fa2681492..b79314b63811 100644 --- a/sdk/storage/storage-blob/karma.conf.js +++ b/sdk/storage/storage-blob/karma.conf.js @@ -65,7 +65,8 @@ module.exports = function(config) { "MD_ACCOUNT_NAME", "MD_ACCOUNT_SAS", "ENCRYPTION_SCOPE_1", - "ENCRYPTION_SCOPE_2" + "ENCRYPTION_SCOPE_2", + "BLOB_VERSIONING_ENABLED", ], // test results reporter to use diff --git a/sdk/storage/storage-blob/package.json b/sdk/storage/storage-blob/package.json index 0f3544aa4821..11e196882f16 100644 --- a/sdk/storage/storage-blob/package.json +++ b/sdk/storage/storage-blob/package.json @@ -1,7 +1,7 @@ { "name": "@azure/storage-blob", "sdk-type": "client", - "version": "12.1.2", + "version": "12.2.0-preview.1", "description": "Microsoft Azure Storage SDK for JavaScript - Blob", "main": "./dist/index.js", "module": "./dist-esm/storage-blob/src/index.js", @@ -30,7 +30,7 @@ }, "scripts": { "audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit", - "build:autorest": "autorest ./swagger/README.md --typescript --package-version=12.1.2 --use=@microsoft.azure/autorest.typescript@5.0.1", + "build:autorest": "autorest ./swagger/README.md --typescript --package-version=12.2.0-preview.1 --use=@microsoft.azure/autorest.typescript@5.0.1", "build:es6": "tsc -p tsconfig.json", "build:nodebrowser": "rollup -c 2>&1", "build:samples": "npm run clean && npm run build:es6 && cross-env ONLY_NODE=true rollup -c 2>&1 && npm run build:prep-samples", diff --git a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_asynchorous_copy_return_versionid.json b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_asynchorous_copy_return_versionid.json new file mode 100644 index 000000000000..dc29e80a2a4f --- /dev/null +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_asynchorous_copy_return_versionid.json @@ -0,0 +1,124 @@ +{ + "recordings": [ + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459881615108136", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Thu, 19 Mar 2020 06:20:15 GMT", + "etag": "\"0x8D7CBCD976713A6\"", + "last-modified": "Thu, 19 Mar 2020 06:20:16 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "58b39517-753d-4506-8d6e-69d01f624de1", + "x-ms-request-id": "30564bfa-d01e-0037-36b6-fd086e000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459881615108136/blob158459881663707143", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "Hello World", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "date": "Thu, 19 Mar 2020 06:20:16 GMT", + "etag": "\"0x8D7CBCD97B15B2A\"", + "last-modified": "Thu, 19 Mar 2020 06:20:16 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "deb01af6-44d6-4843-b20d-38bdcb47b783", + "x-ms-content-crc64": "YeJLfssylmU=", + "x-ms-request-id": "30564c9f-d01e-0037-51b6-fd086e000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-19T06:20:16.9931562Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459881615108136/blob158459881663707143", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "date": "Thu, 19 Mar 2020 06:20:16 GMT", + "etag": "\"0x8D7CBCD97D760AA\"", + "last-modified": "Thu, 19 Mar 2020 06:20:17 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "729b19ce-6243-4800-b95f-8138cc233cb7", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "x-ms-request-id": "30564d14-d01e-0037-39b6-fd086e000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-19T06:20:17.2433338Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459881615108136/copiedblob158459881736905963", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Thu, 19 Mar 2020 06:20:16 GMT", + "etag": "\"0x8D7CBCD9822F660\"", + "last-modified": "Thu, 19 Mar 2020 06:20:17 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "bbbdb833-5f2d-4cd7-9839-bdddd2f8e143", + "x-ms-copy-id": "ae72f090-1922-4a3d-a29d-6fabfef52e3b", + "x-ms-copy-status": "success", + "x-ms-request-id": "30564dda-d01e-0037-6eb6-fd086e000000", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-19T06:20:17.7386873Z" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459881615108136", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Thu, 19 Mar 2020 06:20:17 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "4fa4ff2d-cac3-4679-b968-c36c1c88f304", + "x-ms-request-id": "30564e93-d01e-0037-19b6-fd086e000000", + "x-ms-version": "2019-12-12" + } + } + ], + "uniqueTestInfo": { + "uniqueName": { + "container": "container158459881615108136", + "blob": "blob158459881663707143", + "copiedblob": "copiedblob158459881736905963" + }, + "newDate": {} + }, + "hash": "3e5c80ac78e807a57279f678364a502a" +} \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_blob_create_return_versionid.json b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_blob_create_return_versionid.json new file mode 100644 index 000000000000..87e0d3282310 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_blob_create_return_versionid.json @@ -0,0 +1,146 @@ +{ + "recordings": [ + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459881068704010", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Thu, 19 Mar 2020 06:20:10 GMT", + "etag": "\"0x8D7CBCD9424E847\"", + "last-modified": "Thu, 19 Mar 2020 06:20:11 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "54f6f202-7dcb-429e-b25f-814682fe39d2", + "x-ms-request-id": "3056432a-d01e-0037-1bb6-fd086e000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459881068704010/blob158459881116905984", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "Hello World", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "date": "Thu, 19 Mar 2020 06:20:10 GMT", + "etag": "\"0x8D7CBCD9470B39F\"", + "last-modified": "Thu, 19 Mar 2020 06:20:11 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "a9950ac3-2ef4-4275-b152-59e477b0bc87", + "x-ms-content-crc64": "YeJLfssylmU=", + "x-ms-request-id": "3056442f-d01e-0037-59b6-fd086e000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-19T06:20:11.5362719Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459881068704010/blob158459881116905984", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "date": "Thu, 19 Mar 2020 06:20:10 GMT", + "etag": "\"0x8D7CBCD949643CD\"", + "last-modified": "Thu, 19 Mar 2020 06:20:11 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "42940c9c-ba53-4556-aaef-7f8223ff0dc1", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "x-ms-request-id": "30564496-d01e-0037-32b6-fd086e000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-19T06:20:11.7834461Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459881068704010/appendblob158459881193700671", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Thu, 19 Mar 2020 06:20:11 GMT", + "etag": "\"0x8D7CBCD94E3D5AC\"", + "last-modified": "Thu, 19 Mar 2020 06:20:12 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "5be0b593-a370-492a-8cf8-2ac7328b56ae", + "x-ms-request-id": "30564577-d01e-0037-69b6-fd086e000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-19T06:20:12.2918081Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459881068704010/pageblob158459881242305319", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Thu, 19 Mar 2020 06:20:11 GMT", + "etag": "\"0x8D7CBCD9536E6D1\"", + "last-modified": "Thu, 19 Mar 2020 06:20:12 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "a8a69856-650d-447e-8dae-53faef56a6ed", + "x-ms-request-id": "30564662-d01e-0037-31b6-fd086e000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-19T06:20:12.8361958Z" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459881068704010", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Thu, 19 Mar 2020 06:20:12 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "9212afac-d8c2-4b86-91a9-b6e3beef2c7e", + "x-ms-request-id": "30564724-d01e-0037-54b6-fd086e000000", + "x-ms-version": "2019-12-12" + } + } + ], + "uniqueTestInfo": { + "uniqueName": { + "container": "container158459881068704010", + "blob": "blob158459881116905984", + "appendblob": "appendblob158459881193700671", + "pageblob": "pageblob158459881242305319" + }, + "newDate": {} + }, + "hash": "6ff8fe801dcbf1a372d61468348d38ff" +} \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_delete_a_snapshot.json b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_delete_a_snapshot.json new file mode 100644 index 000000000000..1d279cfc1463 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_delete_a_snapshot.json @@ -0,0 +1,196 @@ +{ + "recordings": [ + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459879661206364", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Thu, 19 Mar 2020 06:19:56 GMT", + "etag": "\"0x8D7CBCD8BC2A63D\"", + "last-modified": "Thu, 19 Mar 2020 06:19:56 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "02a8bd62-08c6-419d-ad3b-75334803b2c9", + "x-ms-request-id": "d85c813b-201e-0041-01b6-fd8226000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459879661206364/blob158459879710201125", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "Hello World", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "date": "Thu, 19 Mar 2020 06:19:57 GMT", + "etag": "\"0x8D7CBCD8C0BCDB5\"", + "last-modified": "Thu, 19 Mar 2020 06:19:57 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "e0260587-09c4-41b6-9e48-531cb77a0b90", + "x-ms-content-crc64": "YeJLfssylmU=", + "x-ms-request-id": "d85c8249-201e-0041-62b6-fd8226000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-19T06:19:57.4532533Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459879661206364/blob158459879710201125", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "date": "Thu, 19 Mar 2020 06:19:57 GMT", + "etag": "\"0x8D7CBCD8C333304\"", + "last-modified": "Thu, 19 Mar 2020 06:19:57 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "152a35ac-dda5-417d-ba02-5f032c3c0014", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "x-ms-request-id": "d85c82a9-201e-0041-39b6-fd8226000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-19T06:19:57.7124372Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459879661206364/blob158459879710201125", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "comp": "snapshot" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Thu, 19 Mar 2020 06:19:57 GMT", + "etag": "\"0x8D7CBCD8C333304\"", + "last-modified": "Thu, 19 Mar 2020 06:19:57 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "6ea0fcc2-f318-42a1-8137-19eac872e78b", + "x-ms-request-id": "d85c83d9-201e-0041-32b6-fd8226000000", + "x-ms-request-server-encrypted": "false", + "x-ms-snapshot": "2020-03-19T06:19:58.2007844Z", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-19T06:19:58.2017844Z" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459879661206364/blob158459879710201125", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "snapshot": "2020-03-19T06:19:58.2007844Z" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Thu, 19 Mar 2020 06:19:58 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "23702850-aa66-4cc8-a787-be09b5476ff1", + "x-ms-delete-type-permanent": "false", + "x-ms-request-id": "d85c84cd-201e-0041-7fb6-fd8226000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "HEAD", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459879661206364/blob158459879710201125", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "snapshot": "2020-03-19T06:19:58.2007844Z" + }, + "requestBody": null, + "status": 404, + "response": "", + "responseHeaders": { + "date": "Thu, 19 Mar 2020 06:19:58 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "transfer-encoding": "chunked", + "x-ms-client-request-id": "bd3f7388-50c4-4d48-8004-efb6d36a9436", + "x-ms-error-code": "BlobNotFound", + "x-ms-request-id": "d85c85fa-201e-0041-04b6-fd8226000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "HEAD", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459879661206364/blob158459879710201125", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": null, + "status": 200, + "response": "", + "responseHeaders": { + "accept-ranges": "bytes", + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "content-type": "application/octet-stream", + "date": "Thu, 19 Mar 2020 06:19:59 GMT", + "etag": "\"0x8D7CBCD8C333304\"", + "last-modified": "Thu, 19 Mar 2020 06:19:57 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-access-tier": "Hot", + "x-ms-access-tier-inferred": "true", + "x-ms-blob-type": "BlockBlob", + "x-ms-client-request-id": "89d79e7d-7ac6-4965-af69-1f10078a21d9", + "x-ms-creation-time": "Thu, 19 Mar 2020 06:19:57 GMT", + "x-ms-is-current-version": "true", + "x-ms-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-request-id": "d85c8711-201e-0041-77b6-fd8226000000", + "x-ms-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-19T06:19:58.2017844Z" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459879661206364", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Thu, 19 Mar 2020 06:19:59 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "66be119a-18cf-420e-be0c-2240fdb1f79f", + "x-ms-request-id": "d85c8837-201e-0041-7bb6-fd8226000000", + "x-ms-version": "2019-12-12" + } + } + ], + "uniqueTestInfo": { + "uniqueName": { + "container": "container158459879661206364", + "blob": "blob158459879710201125" + }, + "newDate": {} + }, + "hash": "fa5324b30c133d0ec62344e1923ea2b7" +} \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_delete_a_version.json b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_delete_a_version.json new file mode 100644 index 000000000000..02bc08abcff2 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_delete_a_version.json @@ -0,0 +1,121 @@ +{ + "recordings": [ + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459879093306077", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Thu, 19 Mar 2020 06:19:50 GMT", + "etag": "\"0x8D7CBCD885FA3A0\"", + "last-modified": "Thu, 19 Mar 2020 06:19:51 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "0bc7ba75-bd9a-40bb-a23f-c2b86bd43857", + "x-ms-request-id": "d85c73cc-201e-0041-03b6-fd8226000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459879093306077/blob158459879142408129", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "Hello World", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "date": "Thu, 19 Mar 2020 06:19:51 GMT", + "etag": "\"0x8D7CBCD88AA2AD5\"", + "last-modified": "Thu, 19 Mar 2020 06:19:51 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "0ce54f6c-3e8f-46e0-b45b-fc5f67544d60", + "x-ms-content-crc64": "YeJLfssylmU=", + "x-ms-request-id": "d85c7534-201e-0041-53b6-fd8226000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-19T06:19:51.7802197Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459879093306077/blob158459879142408129", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "date": "Thu, 19 Mar 2020 06:19:51 GMT", + "etag": "\"0x8D7CBCD88D168FA\"", + "last-modified": "Thu, 19 Mar 2020 06:19:52 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "4868aa99-26dc-483f-a319-2918a3a8e696", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "x-ms-request-id": "d85c75e9-201e-0041-79b6-fd8226000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-19T06:19:52.0394020Z" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459879093306077/blob158459879142408129", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "versionid": "2020-03-19T06:19:51.7802197Z" + }, + "requestBody": null, + "status": 403, + "response": "OperationNotAllowedOnAutomaticSnapshotThe specified operation is not allowed on version.\nRequestId:d85c7740-201e-0041-2db6-fd8226000000\nTime:2020-03-19T06:19:52.5676992Z", + "responseHeaders": { + "content-length": "257", + "content-type": "application/xml", + "date": "Thu, 19 Mar 2020 06:19:52 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "3e94c185-1c84-42dd-be11-a276d2996023", + "x-ms-error-code": "OperationNotAllowedOnAutomaticSnapshot", + "x-ms-request-id": "d85c7740-201e-0041-2db6-fd8226000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459879093306077", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Thu, 19 Mar 2020 06:19:52 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "bca420c1-6c2b-4e88-9de7-0d2cd2cb33d9", + "x-ms-request-id": "d85c7840-201e-0041-19b6-fd8226000000", + "x-ms-version": "2019-12-12" + } + } + ], + "uniqueTestInfo": { + "uniqueName": { + "container": "container158459879093306077", + "blob": "blob158459879142408129" + }, + "newDate": {} + }, + "hash": "d263dc6e0d99350c3775dc96bbaf37de" +} \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleteblobs_should_work_for_batch_delete.json b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleteblobs_should_work_for_batch_delete.json new file mode 100644 index 000000000000..073e8129dff7 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleteblobs_should_work_for_batch_delete.json @@ -0,0 +1,81 @@ +{ + "recordings": [ + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459879319605712", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Thu, 19 Mar 2020 06:19:53 GMT", + "etag": "\"0x8D7CBCD89B6BF7C\"", + "last-modified": "Thu, 19 Mar 2020 06:19:53 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "d5a4e550-f76d-4eaa-a4ef-cf53f1d2597f", + "x-ms-request-id": "d85c79fe-201e-0041-39b6-fd8226000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459879319605712/blob158459879366602194", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "Hello World", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "date": "Thu, 19 Mar 2020 06:19:53 GMT", + "etag": "\"0x8D7CBCD8A000DD9\"", + "last-modified": "Thu, 19 Mar 2020 06:19:54 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "5dd4d0b8-94fa-4a33-a28b-0adaab37b73b", + "x-ms-content-crc64": "YeJLfssylmU=", + "x-ms-request-id": "d85c7b50-201e-0041-78b6-fd8226000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-19T06:19:54.0218098Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459879319605712/blob158459879366602194", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "date": "Thu, 19 Mar 2020 06:19:53 GMT", + "etag": "\"0x8D7CBCD8A246559\"", + "last-modified": "Thu, 19 Mar 2020 06:19:54 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "6aca827b-5864-4f3c-a5d7-a59940c02af2", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "x-ms-request-id": "d85c7c0a-201e-0041-21b6-fd8226000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-19T06:19:54.2609794Z" + } + } + ], + "uniqueTestInfo": { + "uniqueName": { + "container": "container158459879319605712", + "blob": "blob158459879366602194" + }, + "newDate": {} + }, + "hash": "af27cae29f2417e05856465e122ed57d" +} \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleting_a_blob_that_has_snapshots_needs_deletesnapshots_option.json b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleting_a_blob_that_has_snapshots_needs_deletesnapshots_option.json new file mode 100644 index 000000000000..6a6c8531e6ad --- /dev/null +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleting_a_blob_that_has_snapshots_needs_deletesnapshots_option.json @@ -0,0 +1,202 @@ +{ + "recordings": [ + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459880030109807", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Thu, 19 Mar 2020 06:20:00 GMT", + "etag": "\"0x8D7CBCD8DF492BE\"", + "last-modified": "Thu, 19 Mar 2020 06:20:00 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "7e0341fc-e706-4274-99ee-4e327b78872a", + "x-ms-request-id": "d85c8938-201e-0041-63b6-fd8226000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459880030109807/blob158459880079005200", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "Hello World", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "date": "Thu, 19 Mar 2020 06:20:00 GMT", + "etag": "\"0x8D7CBCD8E420097\"", + "last-modified": "Thu, 19 Mar 2020 06:20:01 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "1eef727e-788f-4815-aa3f-cf19a030c379", + "x-ms-content-crc64": "YeJLfssylmU=", + "x-ms-request-id": "d85c8a27-201e-0041-34b6-fd8226000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-19T06:20:01.1638935Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459880030109807/blob158459880079005200", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "date": "Thu, 19 Mar 2020 06:20:01 GMT", + "etag": "\"0x8D7CBCD8E674293\"", + "last-modified": "Thu, 19 Mar 2020 06:20:01 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "4cc0058f-faf4-4a0b-839f-6cff5250ad47", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "x-ms-request-id": "d85c8aaf-201e-0041-2db6-fd8226000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-19T06:20:01.4090659Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459880030109807/blob158459880079005200", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "comp": "snapshot" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Thu, 19 Mar 2020 06:20:01 GMT", + "etag": "\"0x8D7CBCD8E674293\"", + "last-modified": "Thu, 19 Mar 2020 06:20:01 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "586c73ad-1235-42ca-8f0b-f42a92444392", + "x-ms-request-id": "d85c8ba8-201e-0041-12b6-fd8226000000", + "x-ms-request-server-encrypted": "false", + "x-ms-snapshot": "2020-03-19T06:20:01.9054165Z", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-19T06:20:01.9064165Z" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459880030109807/blob158459880079005200", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": null, + "status": 409, + "response": "SnapshotsPresentThis operation is not permitted because the blob has snapshots.\nRequestId:d85c8cfb-201e-0041-43b6-fd8226000000\nTime:2020-03-19T06:20:02.3976916Z", + "responseHeaders": { + "content-length": "248", + "content-type": "application/xml", + "date": "Thu, 19 Mar 2020 06:20:02 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "a0b5f09f-f906-4048-87d3-4cdbf47675dc", + "x-ms-error-code": "SnapshotsPresent", + "x-ms-request-id": "d85c8cfb-201e-0041-43b6-fd8226000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459880030109807/blob158459880079005200", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Thu, 19 Mar 2020 06:20:02 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "62b4e3e5-1736-46a4-9a9b-c1f1a2524e2f", + "x-ms-delete-type-permanent": "false", + "x-ms-request-id": "d85c8eb8-201e-0041-5bb6-fd8226000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "HEAD", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459880030109807/blob158459880079005200", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "snapshot": "2020-03-19T06:20:01.9054165Z" + }, + "requestBody": null, + "status": 404, + "response": "", + "responseHeaders": { + "date": "Thu, 19 Mar 2020 06:20:02 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "transfer-encoding": "chunked", + "x-ms-client-request-id": "4371eea4-30d6-431e-b16d-46f6a8b2326e", + "x-ms-error-code": "BlobNotFound", + "x-ms-request-id": "3056358f-d01e-0037-3ab6-fd086e000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "HEAD", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459880030109807/blob158459880079005200", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": null, + "status": 404, + "response": "", + "responseHeaders": { + "date": "Thu, 19 Mar 2020 06:20:02 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "transfer-encoding": "chunked", + "x-ms-client-request-id": "4d9beb14-b18b-43a6-8150-2aee269556ec", + "x-ms-error-code": "BlobNotFound", + "x-ms-request-id": "305636a3-d01e-0037-3ab6-fd086e000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459880030109807", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Thu, 19 Mar 2020 06:20:03 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "2832260a-256d-4976-b382-92b8c18ada8c", + "x-ms-request-id": "305637ee-d01e-0037-70b6-fd086e000000", + "x-ms-version": "2019-12-12" + } + } + ], + "uniqueTestInfo": { + "uniqueName": { + "container": "container158459880030109807", + "blob": "blob158459880079005200" + }, + "newDate": {} + }, + "hash": "741141415d860b5903327a103230e775" +} \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleting_a_blob_with_both_deletesnapshots_and_versionid_option_should_fail.json b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleting_a_blob_with_both_deletesnapshots_and_versionid_option_should_fail.json new file mode 100644 index 000000000000..6bb864940999 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleting_a_blob_with_both_deletesnapshots_and_versionid_option_should_fail.json @@ -0,0 +1,154 @@ +{ + "recordings": [ + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158511704469003843", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "etag": "\"0x8D7D084310E5545\"", + "last-modified": "Wed, 25 Mar 2020 06:17:27 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "29c1801d-fded-47f7-831c-f3abf2370d6f", + "x-ms-request-id": "47f40d11-701e-000e-326d-02ac8e000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158511704469003843/blob158511704637103330", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "Hello World", + "status": 201, + "response": "", + "responseHeaders": { + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "etag": "\"0x8D7D08431547049\"", + "last-modified": "Wed, 25 Mar 2020 06:17:27 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "425838ab-06ee-44e6-854a-9b8ad4665446", + "x-ms-content-crc64": "YeJLfssylmU=", + "x-ms-request-id": "47f40d3d-701e-000e-576d-02ac8e000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-25T06:17:27.8102366Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158511704469003843/blob158511704637103330", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "", + "status": 201, + "response": "", + "responseHeaders": { + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "etag": "\"0x8D7D08431796444\"", + "last-modified": "Wed, 25 Mar 2020 06:17:28 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "14e86c47-149a-4504-92d0-4bcf1da3e33a", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "x-ms-request-id": "47f40d51-701e-000e-666d-02ac8e000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-25T06:17:28.0524116Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158511704469003843/blob158511704637103330", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "comp": "snapshot" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "etag": "\"0x8D7D08431796444\"", + "last-modified": "Wed, 25 Mar 2020 06:17:28 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "b2a5648a-35b5-4818-a26a-efed33e9ce5a", + "x-ms-request-id": "47f40d68-701e-000e-796d-02ac8e000000", + "x-ms-request-server-encrypted": "false", + "x-ms-snapshot": "2020-03-25T06:17:28.5447662Z", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-25T06:17:28.5457662Z" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container158511704469003843/blob158511704637103330", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "versionid": "2020-03-25T06:17:27.8102366Z" + }, + "requestBody": null, + "status": 400, + "response": "InvalidQueryParameterValueValue for one of the query parameters specified in the request URI is invalid.\nRequestId:47f40d8f-701e-000e-1c6d-02ac8e000000\nTime:2020-03-25T06:17:29.0750153Zversionid2020-03-25T06:17:27.8102366ZThis operation is only allowed on the root blob. Version id should not be provided.", + "responseHeaders": { + "content-length": "494", + "content-type": "application/xml", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "e68295c6-48e0-43b5-8441-7680fbb3c2e1", + "x-ms-error-code": "InvalidQueryParameterValue", + "x-ms-request-id": "47f40d8f-701e-000e-1c6d-02ac8e000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container158511704469003843/blob158511704637103330", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "versionid": "2020-03-25T06:17:28.0524116Z" + }, + "requestBody": null, + "status": 400, + "response": "InvalidQueryParameterValueValue for one of the query parameters specified in the request URI is invalid.\nRequestId:47f40dd8-701e-000e-556d-02ac8e000000\nTime:2020-03-25T06:17:29.8595747Zversionid2020-03-25T06:17:28.0524116ZThis operation is only allowed on the root blob. Version id should not be provided.", + "responseHeaders": { + "content-length": "494", + "content-type": "application/xml", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "c12b3dba-d019-4f57-b3d1-c181c9bbb1cf", + "x-ms-error-code": "InvalidQueryParameterValue", + "x-ms-request-id": "47f40dd8-701e-000e-556d-02ac8e000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container158511704469003843", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "be790e2b-ef87-4769-a195-a4a517029c9f", + "x-ms-request-id": "47f40dfd-701e-000e-716d-02ac8e000000", + "x-ms-version": "2019-12-12" + } + } + ], + "uniqueTestInfo": { + "uniqueName": { + "container": "container158511704469003843", + "blob": "blob158511704637103330" + }, + "newDate": {} + }, + "hash": "ce17be22ef0017e51e781f06fd9b37ec" +} \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleting_a_versioned_blob_without_extra_parameters_should_succeed.json b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleting_a_versioned_blob_without_extra_parameters_should_succeed.json new file mode 100644 index 000000000000..9d8cb5e15db6 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleting_a_versioned_blob_without_extra_parameters_should_succeed.json @@ -0,0 +1,168 @@ +{ + "recordings": [ + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459880443801883", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Thu, 19 Mar 2020 06:20:03 GMT", + "etag": "\"0x8D7CBCD90717055\"", + "last-modified": "Thu, 19 Mar 2020 06:20:04 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "5835af13-3e08-4e3e-85c9-222f7456f8ca", + "x-ms-request-id": "305638fe-d01e-0037-63b6-fd086e000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459880443801883/blob158459880500206880", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "Hello World", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "date": "Thu, 19 Mar 2020 06:20:04 GMT", + "etag": "\"0x8D7CBCD90C59E39\"", + "last-modified": "Thu, 19 Mar 2020 06:20:05 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "b5d15f9d-4abc-4fc2-9ab8-7ffb93e11cbc", + "x-ms-content-crc64": "YeJLfssylmU=", + "x-ms-request-id": "30563a09-d01e-0037-5db6-fd086e000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-19T06:20:05.3818937Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459880443801883/blob158459880500206880", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "date": "Thu, 19 Mar 2020 06:20:04 GMT", + "etag": "\"0x8D7CBCD90EBCACE\"", + "last-modified": "Thu, 19 Mar 2020 06:20:05 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "0a553a3b-cb48-4199-9d20-be6c7bd3d158", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "x-ms-request-id": "30563a65-d01e-0037-31b6-fd086e000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-19T06:20:05.6340723Z" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459880443801883/blob158459880500206880", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Thu, 19 Mar 2020 06:20:05 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "282f6a70-5d56-4d80-8725-7db8f1dfdee6", + "x-ms-delete-type-permanent": "false", + "x-ms-request-id": "30563b5d-d01e-0037-19b6-fd086e000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "HEAD", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459880443801883/blob158459880500206880", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": null, + "status": 404, + "response": "", + "responseHeaders": { + "date": "Thu, 19 Mar 2020 06:20:05 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "transfer-encoding": "chunked", + "x-ms-client-request-id": "905d9652-a979-411c-9761-e85a6fdc9d23", + "x-ms-error-code": "BlobNotFound", + "x-ms-request-id": "30563c5a-d01e-0037-0ab6-fd086e000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "HEAD", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459880443801883/blob158459880500206880", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "versionid": "2020-03-19T06:20:05.3818937Z" + }, + "requestBody": null, + "status": 200, + "response": "", + "responseHeaders": { + "accept-ranges": "bytes", + "content-length": "11", + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "content-type": "application/octet-stream", + "date": "Thu, 19 Mar 2020 06:20:06 GMT", + "etag": "\"0x8D7CBCD90C59E39\"", + "last-modified": "Thu, 19 Mar 2020 06:20:05 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-access-tier": "Hot", + "x-ms-access-tier-inferred": "true", + "x-ms-blob-type": "BlockBlob", + "x-ms-client-request-id": "7eee92af-f9b9-4f84-8f06-e2c52d33fa05", + "x-ms-creation-time": "Thu, 19 Mar 2020 06:20:05 GMT", + "x-ms-request-id": "30563d79-d01e-0037-0fb6-fd086e000000", + "x-ms-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-19T06:20:05.3818937Z" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459880443801883", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Thu, 19 Mar 2020 06:20:07 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "2e06e094-8c8c-4065-ba44-545c97e98ebc", + "x-ms-request-id": "30563ef6-d01e-0037-6db6-fd086e000000", + "x-ms-version": "2019-12-12" + } + } + ], + "uniqueTestInfo": { + "uniqueName": { + "container": "container158459880443801883", + "blob": "blob158459880500206880" + }, + "newDate": {} + }, + "hash": "30c758c59a537f6a51dbe1847a8881eb" +} \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleting_root_blob_with_versionid_should_fail.json b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleting_root_blob_with_versionid_should_fail.json new file mode 100644 index 000000000000..8cfb19a084f6 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleting_root_blob_with_versionid_should_fail.json @@ -0,0 +1,121 @@ +{ + "recordings": [ + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459879439802511", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Thu, 19 Mar 2020 06:19:54 GMT", + "etag": "\"0x8D7CBCD8A6F348C\"", + "last-modified": "Thu, 19 Mar 2020 06:19:54 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "f520e22b-8d7e-4a1f-b98a-066256f19959", + "x-ms-request-id": "d85c7cd6-201e-0041-55b6-fd8226000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459879439802511/blob158459879487700392", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "Hello World", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "date": "Thu, 19 Mar 2020 06:19:54 GMT", + "etag": "\"0x8D7CBCD8AB96D84\"", + "last-modified": "Thu, 19 Mar 2020 06:19:55 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "d71385b6-4a68-4d0e-ac02-b1938685f782", + "x-ms-content-crc64": "YeJLfssylmU=", + "x-ms-request-id": "d85c7ddd-201e-0041-35b6-fd8226000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-19T06:19:55.2366750Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459879439802511/blob158459879487700392", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "date": "Thu, 19 Mar 2020 06:19:55 GMT", + "etag": "\"0x8D7CBCD8ADF24D7\"", + "last-modified": "Thu, 19 Mar 2020 06:19:55 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "b777caf1-cae0-421c-a694-f5e22b697b6e", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "x-ms-request-id": "d85c7e71-201e-0041-39b6-fd8226000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-19T06:19:55.4848508Z" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459879439802511/blob158459879487700392", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "versionid": "2020-03-19T06:19:55.2366750Z" + }, + "requestBody": null, + "status": 403, + "response": "OperationNotAllowedOnAutomaticSnapshotThe specified operation is not allowed on version.\nRequestId:d85c7f59-201e-0041-7bb6-fd8226000000\nTime:2020-03-19T06:19:55.9751208Z", + "responseHeaders": { + "content-length": "257", + "content-type": "application/xml", + "date": "Thu, 19 Mar 2020 06:19:55 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "d8ff42df-638e-4b77-ae36-59dc977355fb", + "x-ms-error-code": "OperationNotAllowedOnAutomaticSnapshot", + "x-ms-request-id": "d85c7f59-201e-0041-7bb6-fd8226000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459879439802511", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Thu, 19 Mar 2020 06:19:56 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "3c77946d-01bf-4ddc-9e86-3523ae903be9", + "x-ms-request-id": "d85c8048-201e-0041-2db6-fd8226000000", + "x-ms-version": "2019-12-12" + } + } + ], + "uniqueTestInfo": { + "uniqueName": { + "container": "container158459879439802511", + "blob": "blob158459879487700392" + }, + "newDate": {} + }, + "hash": "8c6ce79a5f98d1097bf341c30058f4ca" +} \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_download_a_blob_version.json b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_download_a_blob_version.json new file mode 100644 index 000000000000..ea8af7779ad2 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_download_a_blob_version.json @@ -0,0 +1,157 @@ +{ + "recordings": [ + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158472286918903504", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Fri, 20 Mar 2020 16:47:50 GMT", + "etag": "\"0x8D7CCEE6D6DE606\"", + "last-modified": "Fri, 20 Mar 2020 16:47:50 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "470423fe-dd5b-4284-8e55-c5a0fb2424da", + "x-ms-request-id": "0f286783-701e-0011-75d7-fe4076000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158472286918903504/blob158472287073207995", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "Hello World", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "date": "Fri, 20 Mar 2020 16:47:50 GMT", + "etag": "\"0x8D7CCEE6DB97A18\"", + "last-modified": "Fri, 20 Mar 2020 16:47:51 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "f0379dcf-d8f6-486d-a3e2-53828622319e", + "x-ms-content-crc64": "YeJLfssylmU=", + "x-ms-request-id": "0f286a17-701e-0011-72d7-fe4076000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-20T16:47:51.1369240Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158472286918903504/blob158472287073207995", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "date": "Fri, 20 Mar 2020 16:47:51 GMT", + "etag": "\"0x8D7CCEE6DE4144A\"", + "last-modified": "Fri, 20 Mar 2020 16:47:51 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "8214dd11-6eb6-432a-b053-c48687d25149", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "x-ms-request-id": "0f286b88-701e-0011-56d7-fe4076000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-20T16:47:51.4181236Z" + } + }, + { + "method": "GET", + "url": "https://fakestorageaccount.blob.core.windows.net/container158472286918903504/blob158472287073207995", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "versionid": "2020-03-20T16:47:51.1369240Z" + }, + "requestBody": null, + "status": 200, + "response": "Hello World", + "responseHeaders": { + "accept-ranges": "bytes", + "content-length": "11", + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "content-type": "application/octet-stream", + "date": "Fri, 20 Mar 2020 16:47:51 GMT", + "etag": "\"0x8D7CCEE6DB97A18\"", + "last-modified": "Fri, 20 Mar 2020 16:47:51 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-type": "BlockBlob", + "x-ms-client-request-id": "b89738ae-eff5-43d0-acf6-6e6f99bda17e", + "x-ms-creation-time": "Fri, 20 Mar 2020 16:47:51 GMT", + "x-ms-request-id": "0f286df3-701e-0011-22d7-fe4076000000", + "x-ms-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-20T16:47:51.1369240Z" + } + }, + { + "method": "GET", + "url": "https://fakestorageaccount.blob.core.windows.net/container158472286918903504/blob158472287073207995", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "versionid": "2020-03-20T16:47:51.4181236Z" + }, + "requestBody": null, + "status": 200, + "response": "", + "responseHeaders": { + "accept-ranges": "bytes", + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "content-type": "application/octet-stream", + "date": "Fri, 20 Mar 2020 16:47:52 GMT", + "etag": "\"0x8D7CCEE6DE4144A\"", + "last-modified": "Fri, 20 Mar 2020 16:47:51 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-type": "BlockBlob", + "x-ms-client-request-id": "fc9f47f1-9561-4148-9b38-dbba2ceb96d9", + "x-ms-creation-time": "Fri, 20 Mar 2020 16:47:51 GMT", + "x-ms-is-current-version": "true", + "x-ms-request-id": "0f287085-701e-0011-12d7-fe4076000000", + "x-ms-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-20T16:47:51.4181236Z" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container158472286918903504", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Fri, 20 Mar 2020 16:47:52 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "50b75a6e-bd17-4861-adc9-92f02236f773", + "x-ms-request-id": "0f287296-701e-0011-0ed7-fe4076000000", + "x-ms-version": "2019-12-12" + } + } + ], + "uniqueTestInfo": { + "uniqueName": { + "container": "container158472286918903504", + "blob": "blob158472287073207995" + }, + "newDate": {} + }, + "hash": "8c7cb69114d7e5abeea0690257bb1fe1" +} \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_downloadtobuffer_with_cpk.json b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_downloadtobuffer_with_cpk.json new file mode 100644 index 000000000000..4006f7cf75ec --- /dev/null +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_downloadtobuffer_with_cpk.json @@ -0,0 +1,116 @@ +{ + "recordings": [ + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158511872811209823", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "etag": "\"0x8D7D088247799F1\"", + "last-modified": "Wed, 25 Mar 2020 06:45:44 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "a230ec0b-5bc5-4873-9740-1d8dbd9304d2", + "x-ms-request-id": "47f60f3c-701e-000e-3471-02ac8e000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158511872811209823/blob158511874330506488", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "Hello World", + "status": 201, + "response": "", + "responseHeaders": { + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "etag": "\"0x8D7D08824D7A94E\"", + "last-modified": "Wed, 25 Mar 2020 06:45:44 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "bb8f97a8-b03f-4699-be5c-106b9b6450d5", + "x-ms-content-crc64": "YeJLfssylmU=", + "x-ms-request-id": "47f60f94-701e-000e-0571-02ac8e000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-25T06:45:44.8457550Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158511872811209823/blob158511874330506488", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "", + "status": 201, + "response": "", + "responseHeaders": { + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "etag": "\"0x8D7D088251028EC\"", + "last-modified": "Wed, 25 Mar 2020 06:45:45 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "22d5561c-ff2c-4c51-bbcc-7756f42d25e2", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "x-ms-request-id": "47f60fbe-701e-000e-2c71-02ac8e000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-25T06:45:45.2180241Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158511872811209823/blobCPK158511874487009760", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "Hello World", + "status": 201, + "response": "", + "responseHeaders": { + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "etag": "\"0x8D7D088261BD6C2\"", + "last-modified": "Wed, 25 Mar 2020 06:45:46 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "1ee340f9-586a-40ac-993b-306ef51680ac", + "x-ms-content-crc64": "YeJLfssylmU=", + "x-ms-encryption-key-sha256": "3QFFFpRA5+XANHqwwbT4yXDmrT/2JaLt/FKHjzhOdoE=", + "x-ms-request-id": "47f610a7-701e-000e-7971-02ac8e000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-25T06:45:46.9702850Z" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container158511872811209823", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "ae301404-f7a7-4e7c-81ca-27bf05c75cda", + "x-ms-request-id": "47f61146-701e-000e-0171-02ac8e000000", + "x-ms-version": "2019-12-12" + } + } + ], + "uniqueTestInfo": { + "uniqueName": { + "container": "container158511872811209823", + "blob": "blob158511874330506488", + "blobCPK": "blobCPK158511874487009760" + }, + "newDate": {} + }, + "hash": "2fb68ec85232c1b9404e9963df18ac77" +} \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_exists_with_condition.json b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_exists_with_condition.json new file mode 100644 index 000000000000..cc5f8009a06a --- /dev/null +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_exists_with_condition.json @@ -0,0 +1,161 @@ +{ + "recordings": [ + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158512301909503157", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "etag": "\"0x8D7D09219D81EA6\"", + "last-modified": "Wed, 25 Mar 2020 07:57:01 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "7174a0c7-7be3-45f2-9d3f-245388ae79b9", + "x-ms-request-id": "f8e41ec4-201e-0003-727a-02645a000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158512301909503157/blob158512302033505426", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "Hello World", + "status": 201, + "response": "", + "responseHeaders": { + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "etag": "\"0x8D7D0921A1FEEA0\"", + "last-modified": "Wed, 25 Mar 2020 07:57:01 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "fbb0996d-c2d3-4c08-81f9-2ed1d917bc35", + "x-ms-content-crc64": "YeJLfssylmU=", + "x-ms-request-id": "f8e41ef2-201e-0003-0f7a-02645a000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-25T07:57:01.8327486Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158512301909503157/blob158512302033505426", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "", + "status": 201, + "response": "", + "responseHeaders": { + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "etag": "\"0x8D7D0921A488CA6\"", + "last-modified": "Wed, 25 Mar 2020 07:57:02 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "85b19e67-41ad-4ed5-b86d-7c55cc5a08fa", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "x-ms-request-id": "f8e41f01-201e-0003-197a-02645a000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-25T07:57:02.0989366Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158512301909503157/blob158512302033505426", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "comp": "lease" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "etag": "\"0x8D7D0921A488CA6\"", + "last-modified": "Wed, 25 Mar 2020 07:57:02 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "ebe24411-7cc5-4609-ad28-2450cbffd76c", + "x-ms-lease-id": "4b230bff-45b2-4066-96c9-73b168dcd5e9", + "x-ms-request-id": "f8e41f17-201e-0003-287a-02645a000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "HEAD", + "url": "https://fakestorageaccount.blob.core.windows.net/container158512301909503157/blob158512302033505426", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": null, + "status": 200, + "response": "", + "responseHeaders": { + "accept-ranges": "bytes", + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "content-type": "application/octet-stream", + "etag": "\"0x8D7D0921A488CA6\"", + "last-modified": "Wed, 25 Mar 2020 07:57:02 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-access-tier": "Hot", + "x-ms-access-tier-inferred": "true", + "x-ms-blob-type": "BlockBlob", + "x-ms-client-request-id": "3af91d62-023f-4b6a-90bc-bbe8b489fd65", + "x-ms-creation-time": "Wed, 25 Mar 2020 07:57:02 GMT", + "x-ms-is-current-version": "true", + "x-ms-lease-duration": "fixed", + "x-ms-lease-state": "leased", + "x-ms-lease-status": "locked", + "x-ms-request-id": "f8e41f2f-201e-0003-3b7a-02645a000000", + "x-ms-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-25T07:57:02.0989366Z" + } + }, + { + "method": "HEAD", + "url": "https://fakestorageaccount.blob.core.windows.net/container158512301909503157/blob158512302033505426", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": null, + "status": 412, + "response": "", + "responseHeaders": { + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "9fc238c7-c865-492d-96cc-3980f44ff1ec", + "x-ms-error-code": "LeaseIdMismatchWithBlobOperation", + "x-ms-request-id": "f8e41f50-201e-0003-567a-02645a000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container158512301909503157", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "751deaf5-5be4-47f5-aa75-288e52c30f22", + "x-ms-request-id": "f8e41f74-201e-0003-6f7a-02645a000000", + "x-ms-version": "2019-12-12" + } + } + ], + "uniqueTestInfo": { + "uniqueName": { + "container": "container158512301909503157", + "blob": "blob158512302033505426" + }, + "newDate": {} + }, + "hash": "0df9bab16aeb65eddebd0664087c46bb" +} \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_get_properties_of_a_blob_version.json b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_get_properties_of_a_blob_version.json new file mode 100644 index 000000000000..20161de3aa84 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_get_properties_of_a_blob_version.json @@ -0,0 +1,222 @@ +{ + "recordings": [ + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158512523509207137", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "etag": "\"0x8D7D09742E9DD2A\"", + "last-modified": "Wed, 25 Mar 2020 08:33:57 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "fb1b9427-5a48-4af2-b38c-3bc0082f1499", + "x-ms-request-id": "47fde939-701e-000e-0880-02ac8e000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158512523509207137/blob158512523676806270", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "Hello World", + "status": 201, + "response": "", + "responseHeaders": { + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "etag": "\"0x8D7D097433D626E\"", + "last-modified": "Wed, 25 Mar 2020 08:33:58 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "4ac07cb5-f634-4485-8b81-fceabb939d08", + "x-ms-content-crc64": "YeJLfssylmU=", + "x-ms-request-id": "47fde96d-701e-000e-3180-02ac8e000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-25T08:33:58.2949998Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158512523509207137/blob158512523676806270", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "", + "status": 201, + "response": "", + "responseHeaders": { + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "etag": "\"0x8D7D09743669CEF\"", + "last-modified": "Wed, 25 Mar 2020 08:33:58 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "6cf367a1-4485-4944-b202-5ca140892227", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "x-ms-request-id": "47fde995-701e-000e-4f80-02ac8e000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-25T08:33:58.5661951Z" + } + }, + { + "method": "HEAD", + "url": "https://fakestorageaccount.blob.core.windows.net/container158512523509207137/blob158512523676806270", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "versionid": "2020-03-25T08:33:58.2949998Z" + }, + "requestBody": null, + "status": 200, + "response": "", + "responseHeaders": { + "accept-ranges": "bytes", + "content-length": "11", + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "content-type": "application/octet-stream", + "etag": "\"0x8D7D097433D626E\"", + "last-modified": "Wed, 25 Mar 2020 08:33:58 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-access-tier": "Hot", + "x-ms-access-tier-inferred": "true", + "x-ms-blob-type": "BlockBlob", + "x-ms-client-request-id": "67e15c74-f971-47b4-a3f9-6aecb5c39cb3", + "x-ms-creation-time": "Wed, 25 Mar 2020 08:33:58 GMT", + "x-ms-request-id": "47fdea18-701e-000e-3780-02ac8e000000", + "x-ms-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-25T08:33:58.2949998Z" + } + }, + { + "method": "HEAD", + "url": "https://fakestorageaccount.blob.core.windows.net/container158512523509207137/blob158512523676806270", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": null, + "status": 200, + "response": "", + "responseHeaders": { + "accept-ranges": "bytes", + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "content-type": "application/octet-stream", + "etag": "\"0x8D7D09743669CEF\"", + "last-modified": "Wed, 25 Mar 2020 08:33:58 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-access-tier": "Hot", + "x-ms-access-tier-inferred": "true", + "x-ms-blob-type": "BlockBlob", + "x-ms-client-request-id": "6bc67fa6-bca2-48b4-b3d1-5811aa296ff9", + "x-ms-creation-time": "Wed, 25 Mar 2020 08:33:58 GMT", + "x-ms-is-current-version": "true", + "x-ms-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-request-id": "47fdea62-701e-000e-7c80-02ac8e000000", + "x-ms-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-25T08:33:58.5661951Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158512523509207137/blob158512523676806270", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "comp": "snapshot" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "etag": "\"0x8D7D09743669CEF\"", + "last-modified": "Wed, 25 Mar 2020 08:33:58 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "3f47c5e8-8c80-423d-aeca-a65f3cfc2404", + "x-ms-request-id": "47fdeaac-701e-000e-3680-02ac8e000000", + "x-ms-request-server-encrypted": "false", + "x-ms-snapshot": "2020-03-25T08:34:01.1310480Z", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-25T08:34:01.1320480Z" + } + }, + { + "method": "HEAD", + "url": "https://fakestorageaccount.blob.core.windows.net/container158512523509207137/blob158512523676806270", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "versionid": "2020-03-25T08:33:58.2949998Z", + "snapshot": "2020-03-25T08:34:01.1310480Z" + }, + "requestBody": null, + "status": 400, + "response": "", + "responseHeaders": { + "date": "Wed, 25 Mar 2020 08:34:00 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code": "MutuallyExclusiveQueryParameters", + "x-ms-request-id": "47fdeaed-701e-000e-6b80-02ac8e000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "HEAD", + "url": "https://fakestorageaccount.blob.core.windows.net/container158512523509207137/blob158512523676806270", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "versionid": "2020-03-25T08:33:58.2949998Z" + }, + "requestBody": null, + "status": 200, + "response": "", + "responseHeaders": { + "accept-ranges": "bytes", + "content-length": "11", + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "content-type": "application/octet-stream", + "etag": "\"0x8D7D097433D626E\"", + "last-modified": "Wed, 25 Mar 2020 08:33:58 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-access-tier": "Hot", + "x-ms-access-tier-inferred": "true", + "x-ms-blob-type": "BlockBlob", + "x-ms-client-request-id": "68ae6024-c444-4aca-a8f1-16abb38e9e00", + "x-ms-creation-time": "Wed, 25 Mar 2020 08:33:58 GMT", + "x-ms-request-id": "47fdeb1e-701e-000e-1280-02ac8e000000", + "x-ms-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-25T08:33:58.2949998Z" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container158512523509207137", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "0f7832d8-f465-48f0-a87f-1cf317f48934", + "x-ms-request-id": "47fdeb38-701e-000e-2c80-02ac8e000000", + "x-ms-version": "2019-12-12" + } + } + ], + "uniqueTestInfo": { + "uniqueName": { + "container": "container158512523509207137", + "blob": "blob158512523676806270" + }, + "newDate": {} + }, + "hash": "dd2960a3038af12a4eb5df52621b2ac6" +} \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_list_blobs_include_versions.json b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_list_blobs_include_versions.json new file mode 100644 index 000000000000..3c25a4e8a06b --- /dev/null +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_list_blobs_include_versions.json @@ -0,0 +1,172 @@ +{ + "recordings": [ + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459877968401121", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Thu, 19 Mar 2020 06:19:40 GMT", + "etag": "\"0x8D7CBCD8248C2B3\"", + "last-modified": "Thu, 19 Mar 2020 06:19:41 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "c0a590f0-a3d5-4fe9-ab6d-3b0f9d1ce13f", + "x-ms-request-id": "d85c6074-201e-0041-40b6-fd8226000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459877968401121/blob158459878121002897", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "Hello World", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "date": "Thu, 19 Mar 2020 06:19:41 GMT", + "etag": "\"0x8D7CBCD82956D12\"", + "last-modified": "Thu, 19 Mar 2020 06:19:41 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "de4fe410-a87f-4093-8434-11b73d19c914", + "x-ms-content-crc64": "YeJLfssylmU=", + "x-ms-request-id": "d85c61ca-201e-0041-63b6-fd8226000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-19T06:19:41.5779602Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459877968401121/blob158459878121002897", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "date": "Thu, 19 Mar 2020 06:19:41 GMT", + "etag": "\"0x8D7CBCD82C2519B\"", + "last-modified": "Thu, 19 Mar 2020 06:19:41 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "2e305bc5-546e-45fb-b434-eba2377f5ded", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "x-ms-request-id": "d85c626c-201e-0041-73b6-fd8226000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-19T06:19:41.8731691Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459877968401121/blockblob%2F0158459878200208375", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "date": "Thu, 19 Mar 2020 06:19:42 GMT", + "etag": "\"0x8D7CBCD830DE736\"", + "last-modified": "Thu, 19 Mar 2020 06:19:42 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "1f1dd490-7efb-47c9-8a66-be04a8869cbf", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "x-ms-request-id": "d85c6378-201e-0041-4eb6-fd8226000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-19T06:19:42.3675190Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459877968401121/blockblob%2F1158459878249300647", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "date": "Thu, 19 Mar 2020 06:19:42 GMT", + "etag": "\"0x8D7CBCD8357F5EB\"", + "last-modified": "Thu, 19 Mar 2020 06:19:42 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "dde44d40-ee08-424a-ad4d-eeff2c736f22", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "x-ms-request-id": "d85c6419-201e-0041-58b6-fd8226000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-19T06:19:42.8528619Z" + } + }, + { + "method": "GET", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459877968401121", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "include": "versions", + "restype": "container", + "comp": "list" + }, + "requestBody": null, + "status": 200, + "response": "blob1584598781210028972020-03-19T06:19:41.5779602ZThu, 19 Mar 2020 06:19:41 GMTThu, 19 Mar 2020 06:19:41 GMT0x8D7CBCD82956D1211application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottruetrueblob1584598781210028972020-03-19T06:19:41.8731691ZtrueThu, 19 Mar 2020 06:19:41 GMTThu, 19 Mar 2020 06:19:41 GMT0x8D7CBCD82C2519B0application/octet-stream1B2M2Y8AsgTpgAmY7PhCfg==BlockBlobHottrueunlockedavailabletrueblockblob/01584598782002083752020-03-19T06:19:42.3675190ZtrueThu, 19 Mar 2020 06:19:42 GMTThu, 19 Mar 2020 06:19:42 GMT0x8D7CBCD830DE7360application/octet-stream1B2M2Y8AsgTpgAmY7PhCfg==BlockBlobHottrueunlockedavailabletrueblockblob/11584598782493006472020-03-19T06:19:42.8528619ZtrueThu, 19 Mar 2020 06:19:42 GMTThu, 19 Mar 2020 06:19:42 GMT0x8D7CBCD8357F5EB0application/octet-stream1B2M2Y8AsgTpgAmY7PhCfg==BlockBlobHottrueunlockedavailabletrue", + "responseHeaders": { + "content-type": "application/xml", + "date": "Thu, 19 Mar 2020 06:19:43 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "transfer-encoding": "chunked", + "x-ms-client-request-id": "9a060e01-91c7-4dca-a56a-8f15d574418c", + "x-ms-request-id": "d85c6505-201e-0041-1ab6-fd8226000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459877968401121", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Thu, 19 Mar 2020 06:19:43 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "e4926de4-d977-4721-8989-4065e215b1cf", + "x-ms-request-id": "d85c664b-201e-0041-2db6-fd8226000000", + "x-ms-version": "2019-12-12" + } + } + ], + "uniqueTestInfo": { + "uniqueName": { + "container": "container158459877968401121", + "blob": "blob158459878121002897", + "blockblob/0": "blockblob/0158459878200208375", + "blockblob/1": "blockblob/1158459878249300647" + }, + "newDate": {} + }, + "hash": "1da2f2af412dda9265ceab4931cfb577" +} \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_promote_a_version_as_the_copy_source.json b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_promote_a_version_as_the_copy_source.json new file mode 100644 index 000000000000..97740cb57a4f --- /dev/null +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_promote_a_version_as_the_copy_source.json @@ -0,0 +1,196 @@ +{ + "recordings": [ + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158512524174808034", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "etag": "\"0x8D7D09746355BD9\"", + "last-modified": "Wed, 25 Mar 2020 08:34:03 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "83e91efc-1970-4c4a-9051-8a0b32bb2ea2", + "x-ms-request-id": "47fdeb5a-701e-000e-4880-02ac8e000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158512524174808034/blob158512524270507574", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "Hello World", + "status": 201, + "response": "", + "responseHeaders": { + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "etag": "\"0x8D7D09746D22F56\"", + "last-modified": "Wed, 25 Mar 2020 08:34:04 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "35ab7485-b603-4c7b-9708-5182f162b8f5", + "x-ms-content-crc64": "YeJLfssylmU=", + "x-ms-request-id": "47fdebbd-701e-000e-1b80-02ac8e000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-25T08:34:04.3033430Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158512524174808034/blob158512524270507574", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "", + "status": 201, + "response": "", + "responseHeaders": { + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "etag": "\"0x8D7D0974701374A\"", + "last-modified": "Wed, 25 Mar 2020 08:34:04 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "8222e39c-8c11-42b8-b051-fe1e57098230", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "x-ms-request-id": "47fdebe0-701e-000e-3d80-02ac8e000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-25T08:34:04.6125658Z" + } + }, + { + "method": "HEAD", + "url": "https://fakestorageaccount.blob.core.windows.net/container158512524174808034/blob158512524270507574", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "versionid": "2020-03-25T08:34:04.3033430Z" + }, + "requestBody": null, + "status": 200, + "response": "", + "responseHeaders": { + "accept-ranges": "bytes", + "content-length": "11", + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "content-type": "application/octet-stream", + "etag": "\"0x8D7D09746D22F56\"", + "last-modified": "Wed, 25 Mar 2020 08:34:04 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-access-tier": "Hot", + "x-ms-access-tier-inferred": "true", + "x-ms-blob-type": "BlockBlob", + "x-ms-client-request-id": "28aa44a4-b20a-4309-b40d-eae457ffb625", + "x-ms-creation-time": "Wed, 25 Mar 2020 08:34:04 GMT", + "x-ms-request-id": "47fdec09-701e-000e-6080-02ac8e000000", + "x-ms-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-25T08:34:04.3033430Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158512524174808034/blob158512524270507574", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "etag": "\"0x8D7D09747A49A66\"", + "last-modified": "Wed, 25 Mar 2020 08:34:05 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "df1e0dea-7ea9-4b52-aa4e-a2c6ed33c204", + "x-ms-copy-id": "aa69ab9a-f625-44b5-86cc-8107b0357b47", + "x-ms-copy-status": "success", + "x-ms-request-id": "47fdec34-701e-000e-0680-02ac8e000000", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-25T08:34:05.6843403Z" + } + }, + { + "method": "GET", + "url": "https://fakestorageaccount.blob.core.windows.net/container158512524174808034", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "include": "versions", + "restype": "container", + "comp": "list" + }, + "requestBody": null, + "status": 200, + "response": "blob1585125242705075742020-03-25T08:34:04.3033430ZWed, 25 Mar 2020 08:34:04 GMTWed, 25 Mar 2020 08:34:04 GMT0x8D7D09746D22F5611application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottruetrueblob1585125242705075742020-03-25T08:34:04.6125658ZWed, 25 Mar 2020 08:34:04 GMTWed, 25 Mar 2020 08:34:04 GMT0x8D7D0974701374A0application/octet-stream1B2M2Y8AsgTpgAmY7PhCfg==BlockBlobHottruetrueblob1585125242705075742020-03-25T08:34:05.6843403ZtrueWed, 25 Mar 2020 08:34:04 GMTWed, 25 Mar 2020 08:34:05 GMT0x8D7D09747A49A6611application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottrueunlockedavailabletrue", + "responseHeaders": { + "content-type": "application/xml", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "4d2a6bd4-c84c-467a-8cf1-ece72d23a02d", + "x-ms-request-id": "47fdec69-701e-000e-3880-02ac8e000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "GET", + "url": "https://fakestorageaccount.blob.core.windows.net/container158512524174808034/blob158512524270507574", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": null, + "status": 200, + "response": "Hello World", + "responseHeaders": { + "accept-ranges": "bytes", + "content-length": "11", + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "content-type": "application/octet-stream", + "etag": "\"0x8D7D09747A49A66\"", + "last-modified": "Wed, 25 Mar 2020 08:34:05 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-type": "BlockBlob", + "x-ms-client-request-id": "48c4e9ed-b6f9-433e-9c73-909b1169bf6a", + "x-ms-copy-completion-time": "Wed, 25 Mar 2020 08:34:05 GMT", + "x-ms-copy-id": "aa69ab9a-f625-44b5-86cc-8107b0357b47", + "x-ms-copy-progress": "11/11", + "x-ms-copy-source": "https://fakestorageaccount.blob.core.windows.net/container158512524174808034/blob158512524270507574?sv=2019-10-10&ss=btqf&srt=sco&spr=https%2Chttp&st=2020-03-20T09%3A00%3A00Z&se=2022-12-15T09%3A05%3A00Z&sip=0.0.0.0-255.255.255.255&sp=rwdxlacup&versionid=2020-03-25T08:34:04.3033430Z", + "x-ms-copy-status": "success", + "x-ms-creation-time": "Wed, 25 Mar 2020 08:34:04 GMT", + "x-ms-is-current-version": "true", + "x-ms-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-request-id": "47fdecbf-701e-000e-0480-02ac8e000000", + "x-ms-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-25T08:34:05.6843403Z" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container158512524174808034", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "8f6735b3-27a7-4552-a5bc-818b351d7699", + "x-ms-request-id": "47fded10-701e-000e-5080-02ac8e000000", + "x-ms-version": "2019-12-12" + } + } + ], + "uniqueTestInfo": { + "uniqueName": { + "container": "container158512524174808034", + "blob": "blob158512524270507574" + }, + "newDate": {} + }, + "hash": "638077f3701ea504dd68739c992ec307" +} \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_setmetadata.json b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_setmetadata.json new file mode 100644 index 000000000000..e85455d3156f --- /dev/null +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_setmetadata.json @@ -0,0 +1,123 @@ +{ + "recordings": [ + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459881838601962", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Thu, 19 Mar 2020 06:20:17 GMT", + "etag": "\"0x8D7CBCD98BB2091\"", + "last-modified": "Thu, 19 Mar 2020 06:20:18 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "254a5406-549d-4b79-9ef6-9f6c45d5bf59", + "x-ms-request-id": "30564f34-d01e-0037-2bb6-fd086e000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459881838601962/blob158459881886105715", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "Hello World", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "date": "Thu, 19 Mar 2020 06:20:18 GMT", + "etag": "\"0x8D7CBCD9903BB5A\"", + "last-modified": "Thu, 19 Mar 2020 06:20:19 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "0c24c0c8-b77f-412c-a1de-b37f6ddcaaa0", + "x-ms-content-crc64": "YeJLfssylmU=", + "x-ms-request-id": "30564ff0-d01e-0037-55b6-fd086e000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-19T06:20:19.2107354Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459881838601962/blob158459881886105715", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "date": "Thu, 19 Mar 2020 06:20:18 GMT", + "etag": "\"0x8D7CBCD992999C2\"", + "last-modified": "Thu, 19 Mar 2020 06:20:19 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "e040398f-32a5-490c-bd3b-cb9f75faeb25", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "x-ms-request-id": "3056505b-d01e-0037-36b6-fd086e000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-19T06:20:19.4609131Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459881838601962/blob158459881886105715", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "comp": "metadata" + }, + "requestBody": null, + "status": 200, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Thu, 19 Mar 2020 06:20:19 GMT", + "etag": "\"0x8D7CBCD9972E51E\"", + "last-modified": "Thu, 19 Mar 2020 06:20:19 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "c12c9c26-0ed0-4f4e-bd91-edcbeda84636", + "x-ms-request-id": "30565129-d01e-0037-7ab6-fd086e000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-19T06:20:19.9402542Z" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459881838601962", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Thu, 19 Mar 2020 06:20:19 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "6cfb6192-5ce5-4e07-b66f-29b3a6a1c5ff", + "x-ms-request-id": "30565236-d01e-0037-6eb6-fd086e000000", + "x-ms-version": "2019-12-12" + } + } + ], + "uniqueTestInfo": { + "uniqueName": { + "container": "container158459881838601962", + "blob": "blob158459881886105715" + }, + "newDate": {} + }, + "hash": "707b5201201727b785455ac69d6a0da0" +} \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_undelete_a_softdeleted_version.json b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_undelete_a_softdeleted_version.json new file mode 100644 index 000000000000..d6a06b8ee3a8 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_undelete_a_softdeleted_version.json @@ -0,0 +1,142 @@ +{ + "recordings": [ + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459882055502672", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Thu, 19 Mar 2020 06:20:20 GMT", + "etag": "\"0x8D7CBCD9A06EEA3\"", + "last-modified": "Thu, 19 Mar 2020 06:20:20 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "2aed0192-7a23-408f-96fa-096e4609528e", + "x-ms-request-id": "305652dd-d01e-0037-09b6-fd086e000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459882055502672/blob158459882104501497", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "Hello World", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "date": "Thu, 19 Mar 2020 06:20:20 GMT", + "etag": "\"0x8D7CBCD9A513882\"", + "last-modified": "Thu, 19 Mar 2020 06:20:21 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "fb1e24bd-fc4c-48ba-a688-852f39642db9", + "x-ms-content-crc64": "YeJLfssylmU=", + "x-ms-request-id": "305653be-d01e-0037-57b6-fd086e000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-19T06:20:21.3962882Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459882055502672/blob158459882104501497", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "date": "Thu, 19 Mar 2020 06:20:20 GMT", + "etag": "\"0x8D7CBCD9A75DE22\"", + "last-modified": "Thu, 19 Mar 2020 06:20:21 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "37728b64-4f21-4c84-8c95-95218cff1ab2", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "x-ms-request-id": "30565420-d01e-0037-30b6-fd086e000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-19T06:20:21.6374578Z" + } + }, + { + "method": "GET", + "url": "https://fakestorageaccount.blob.core.windows.net/", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "service", + "comp": "properties" + }, + "requestBody": null, + "status": 200, + "response": "1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalseGET,PUT,POST,HEAD,DELETE,MERGE,OPTIONS,PATCH***86400true7false", + "responseHeaders": { + "content-type": "application/xml", + "date": "Thu, 19 Mar 2020 06:20:21 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "transfer-encoding": "chunked", + "x-ms-client-request-id": "f2281506-e6e8-4678-82c7-c274024b2085", + "x-ms-request-id": "305654ea-d01e-0037-67b6-fd086e000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459882055502672/blob158459882104501497", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "versionid": "2020-03-19T06:20:21.3962882Z" + }, + "requestBody": null, + "status": 403, + "response": "OperationNotAllowedOnAutomaticSnapshotThe specified operation is not allowed on version.\nRequestId:30565582-d01e-0037-77b6-fd086e000000\nTime:2020-03-19T06:20:22.7757319Z", + "responseHeaders": { + "content-length": "257", + "content-type": "application/xml", + "date": "Thu, 19 Mar 2020 06:20:21 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "ec8a9f82-3076-4709-9189-ad6910cb0f2f", + "x-ms-error-code": "OperationNotAllowedOnAutomaticSnapshot", + "x-ms-request-id": "30565582-d01e-0037-77b6-fd086e000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459882055502672", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Thu, 19 Mar 2020 06:20:22 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "a35dac7f-d094-428b-8ea9-350dfec73203", + "x-ms-request-id": "30565684-d01e-0037-65b6-fd086e000000", + "x-ms-version": "2019-12-12" + } + } + ], + "uniqueTestInfo": { + "uniqueName": { + "container": "container158459882055502672", + "blob": "blob158459882104501497" + }, + "newDate": {} + }, + "hash": "532f15900a07a42923319f706bbc6e06" +} \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_upload_block_blob_return_versionid.json b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_upload_block_blob_return_versionid.json new file mode 100644 index 000000000000..5c5a0b153d20 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_upload_block_blob_return_versionid.json @@ -0,0 +1,148 @@ +{ + "recordings": [ + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459881347506266", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Thu, 19 Mar 2020 06:20:13 GMT", + "etag": "\"0x8D7CBCD95D6DD62\"", + "last-modified": "Thu, 19 Mar 2020 06:20:13 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "a2cd532a-b1de-43fd-bda1-1ab722c1766a", + "x-ms-request-id": "305647e2-d01e-0037-01b6-fd086e000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459881347506266/blob158459881423702452", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "Hello World", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "date": "Thu, 19 Mar 2020 06:20:13 GMT", + "etag": "\"0x8D7CBCD964CA822\"", + "last-modified": "Thu, 19 Mar 2020 06:20:14 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "3306fa29-fd56-40ce-a669-28412165788c", + "x-ms-content-crc64": "YeJLfssylmU=", + "x-ms-request-id": "3056494b-d01e-0037-42b6-fd086e000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-19T06:20:14.6564923Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459881347506266/blob158459881423702452", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "date": "Thu, 19 Mar 2020 06:20:14 GMT", + "etag": "\"0x8D7CBCD967E2167\"", + "last-modified": "Thu, 19 Mar 2020 06:20:14 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "6dbb512a-6f3a-4541-925b-0b315983192a", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "x-ms-request-id": "305649aa-d01e-0037-1bb6-fd086e000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-19T06:20:14.9817232Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459881347506266/blob158459881423702452", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "Hello World", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "date": "Thu, 19 Mar 2020 06:20:14 GMT", + "etag": "\"0x8D7CBCD96A2C715\"", + "last-modified": "Thu, 19 Mar 2020 06:20:15 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "b7ed4cea-f7c3-46e7-a0d0-3ce8678bf744", + "x-ms-content-crc64": "YeJLfssylmU=", + "x-ms-request-id": "30564a11-d01e-0037-79b6-fd086e000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-19T06:20:15.2208943Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459881347506266/blob158459881423702452", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "Hello World", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "date": "Thu, 19 Mar 2020 06:20:14 GMT", + "etag": "\"0x8D7CBCD96CFD2BE\"", + "last-modified": "Thu, 19 Mar 2020 06:20:15 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "9eddb025-ef53-4752-8962-b480860fa7f7", + "x-ms-content-crc64": "YeJLfssylmU=", + "x-ms-request-id": "30564a75-d01e-0037-52b6-fd086e000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-03-19T06:20:15.5161038Z" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container158459881347506266", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Thu, 19 Mar 2020 06:20:15 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "58c792f0-4c42-4e8e-b3ca-5038152c3b70", + "x-ms-request-id": "30564b3d-d01e-0037-08b6-fd086e000000", + "x-ms-version": "2019-12-12" + } + } + ], + "uniqueTestInfo": { + "uniqueName": { + "container": "container158459881347506266", + "blob": "blob158459881423702452" + }, + "newDate": {} + }, + "hash": "603c7ef07e53e865d736dbd3d3ec4290" +} \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_undelete.json b/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_undelete.json index 5946ba3f6da3..3f45c6e312ca 100644 --- a/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_undelete.json +++ b/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_undelete.json @@ -2,7 +2,7 @@ "recordings": [ { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158224824523309081", + "url": "https://fakestorageaccount.blob.core.windows.net/container158501883196502913", "query": { "restype": "container" }, @@ -10,35 +10,35 @@ "status": 201, "response": "", "responseHeaders": { - "content-length": "0", - "date": "Fri, 21 Feb 2020 01:24:06 GMT", - "etag": "\"0x8D7B66CBE88E848\"", - "last-modified": "Fri, 21 Feb 2020 01:24:06 GMT", + "date": "Tue, 24 Mar 2020 03:00:32 GMT", + "etag": "\"0x8D7CF9F84D998D9\"", + "last-modified": "Tue, 24 Mar 2020 03:00:33 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "bf6ad9ca-0bd6-4a26-91a0-e045b77c94f9", - "x-ms-request-id": "04e05e2b-201e-005b-5d55-e8663e000000", - "x-ms-version": "2019-02-02" + "transfer-encoding": "chunked", + "x-ms-client-request-id": "5e37e0a1-2dec-45de-9cec-d47b4bef440f", + "x-ms-request-id": "681a670c-c01e-0016-3e88-0128a1000000", + "x-ms-version": "2019-12-12" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158224824523309081/blob158224824671508312", + "url": "https://fakestorageaccount.blob.core.windows.net/container158501883196502913/blob158501883327901608", "query": {}, "requestBody": "Hello World", "status": 201, "response": "", "responseHeaders": { - "content-length": "0", "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", - "date": "Fri, 21 Feb 2020 01:24:06 GMT", - "etag": "\"0x8D7B66CBEE395E7\"", - "last-modified": "Fri, 21 Feb 2020 01:24:07 GMT", + "date": "Tue, 24 Mar 2020 03:00:33 GMT", + "etag": "\"0x8D7CF9F85227D9F\"", + "last-modified": "Tue, 24 Mar 2020 03:00:33 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "9c2acef0-075c-400f-aeaa-148f23a8b076", + "transfer-encoding": "chunked", + "x-ms-client-request-id": "d78071ef-9904-4c65-a690-ca26faaafbc4", "x-ms-content-crc64": "YeJLfssylmU=", - "x-ms-request-id": "04e05ffb-201e-005b-0e55-e8663e000000", + "x-ms-request-id": "681a6743-c01e-0016-6488-0128a1000000", "x-ms-request-server-encrypted": "true", - "x-ms-version": "2019-02-02" + "x-ms-version": "2019-12-12" } }, { @@ -50,59 +50,59 @@ }, "requestBody": null, "status": 200, - "response": "1.0truetruetruetrue51.0truetruetrue31.0truetruetrue4DELETE,GET,HEAD,MERGE,POST,OPTIONS,PUT,PATCH***86400GETexample.com**8888GETexample.com**8888GETexample.com**8888GETexample.com**8888true7false", + "response": "1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalsePATCH,PUT,OPTIONS,POST,MERGE,HEAD,GET,DELETE***86400true7falsefalse", "responseHeaders": { "content-type": "application/xml", - "date": "Fri, 21 Feb 2020 01:24:07 GMT", + "date": "Tue, 24 Mar 2020 03:00:33 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "transfer-encoding": "chunked", - "x-ms-client-request-id": "0095d87f-969b-45e8-a5e7-2fb3cb07ce99", - "x-ms-request-id": "04e06183-201e-005b-7755-e8663e000000", - "x-ms-version": "2019-02-02" + "x-ms-client-request-id": "f27dc6c8-b785-4090-a02e-bf84f041ed44", + "x-ms-request-id": "681a6796-c01e-0016-1788-0128a1000000", + "x-ms-version": "2019-12-12" } }, { "method": "DELETE", - "url": "https://fakestorageaccount.blob.core.windows.net/container158224824523309081/blob158224824671508312", + "url": "https://fakestorageaccount.blob.core.windows.net/container158501883196502913/blob158501883327901608", "query": {}, "requestBody": null, "status": 202, "response": "", "responseHeaders": { - "content-length": "0", - "date": "Fri, 21 Feb 2020 01:24:08 GMT", + "date": "Tue, 24 Mar 2020 03:00:34 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "b19e4da3-13c8-4692-ac74-17371e07d97e", + "transfer-encoding": "chunked", + "x-ms-client-request-id": "ba7cd3cc-2a67-4484-8ac4-1461a8448f36", "x-ms-delete-type-permanent": "false", - "x-ms-request-id": "04e06321-201e-005b-7255-e8663e000000", - "x-ms-version": "2019-02-02" + "x-ms-request-id": "681a67e2-c01e-0016-4b88-0128a1000000", + "x-ms-version": "2019-12-12" } }, { "method": "GET", - "url": "https://fakestorageaccount.blob.core.windows.net/container158224824523309081", + "url": "https://fakestorageaccount.blob.core.windows.net/container158501883196502913", "query": { "maxresults": "1", - "include": "deleted", + "include": "deleted,versions", "restype": "container", "comp": "list" }, "requestBody": null, "status": 200, - "response": "1blob158224824671508312trueFri, 21 Feb 2020 01:24:07 GMTFri, 21 Feb 2020 01:24:07 GMT0x8D7B66CBEE395E711application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottruetrueFri, 21 Feb 2020 01:24:08 GMT6", + "response": "1blob158501883327901608trueTue, 24 Mar 2020 03:00:33 GMTTue, 24 Mar 2020 03:00:33 GMT0x8D7CF9F85227D9F11application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottruetrueTue, 24 Mar 2020 03:00:34 GMT6", "responseHeaders": { "content-type": "application/xml", - "date": "Fri, 21 Feb 2020 01:24:08 GMT", + "date": "Tue, 24 Mar 2020 03:00:34 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "transfer-encoding": "chunked", - "x-ms-client-request-id": "982eed10-dfb6-4497-b900-b7f4427960c7", - "x-ms-request-id": "04e064b0-201e-005b-6455-e8663e000000", - "x-ms-version": "2019-02-02" + "x-ms-client-request-id": "335575ab-7333-4bd2-bfcc-46c7127b38b7", + "x-ms-request-id": "681a6828-c01e-0016-7688-0128a1000000", + "x-ms-version": "2019-12-12" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158224824523309081/blob158224824671508312", + "url": "https://fakestorageaccount.blob.core.windows.net/container158501883196502913/blob158501883327901608", "query": { "comp": "undelete" }, @@ -110,38 +110,38 @@ "status": 200, "response": "", "responseHeaders": { - "content-length": "0", - "date": "Fri, 21 Feb 2020 01:24:09 GMT", + "date": "Tue, 24 Mar 2020 03:00:35 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "e841edde-f7b6-41df-ae08-8e997a24d0c0", - "x-ms-request-id": "04e066a7-201e-005b-3f55-e8663e000000", - "x-ms-version": "2019-02-02" + "transfer-encoding": "chunked", + "x-ms-client-request-id": "1ce86e16-572a-48f7-8c52-c7174883d339", + "x-ms-request-id": "681a6871-c01e-0016-2088-0128a1000000", + "x-ms-version": "2019-12-12" } }, { "method": "GET", - "url": "https://fakestorageaccount.blob.core.windows.net/container158224824523309081", + "url": "https://fakestorageaccount.blob.core.windows.net/container158501883196502913", "query": { - "include": "deleted", + "include": "deleted,versions", "restype": "container", "comp": "list" }, "requestBody": null, "status": 200, - "response": "blob158224824671508312Fri, 21 Feb 2020 01:24:07 GMTFri, 21 Feb 2020 01:24:07 GMT0x8D7B66CBEE395E711application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottrueunlockedavailabletrue", + "response": "blob158501883327901608Tue, 24 Mar 2020 03:00:33 GMTTue, 24 Mar 2020 03:00:33 GMT0x8D7CF9F85227D9F11application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottrueunlockedavailabletrue", "responseHeaders": { "content-type": "application/xml", - "date": "Fri, 21 Feb 2020 01:24:09 GMT", + "date": "Tue, 24 Mar 2020 03:00:35 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "transfer-encoding": "chunked", - "x-ms-client-request-id": "7bb4a9b0-be37-4508-bfc7-8f635e449a0c", - "x-ms-request-id": "04e06877-201e-005b-6755-e8663e000000", - "x-ms-version": "2019-02-02" + "x-ms-client-request-id": "e3425de5-cd19-4700-95b7-65324f83ac7e", + "x-ms-request-id": "681a68b3-c01e-0016-4d88-0128a1000000", + "x-ms-version": "2019-12-12" } }, { "method": "DELETE", - "url": "https://fakestorageaccount.blob.core.windows.net/container158224824523309081", + "url": "https://fakestorageaccount.blob.core.windows.net/container158501883196502913", "query": { "restype": "container" }, @@ -149,20 +149,21 @@ "status": 202, "response": "", "responseHeaders": { - "content-length": "0", - "date": "Fri, 21 Feb 2020 01:24:10 GMT", + "date": "Tue, 24 Mar 2020 03:00:36 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "b53b190a-1dd0-49f0-a1ad-0424eef6ae0a", - "x-ms-request-id": "04e06b0d-201e-005b-5755-e8663e000000", - "x-ms-version": "2019-02-02" + "transfer-encoding": "chunked", + "x-ms-client-request-id": "b0330c72-d807-4a84-bae3-d81d4ba6e65a", + "x-ms-request-id": "681a68f7-c01e-0016-7688-0128a1000000", + "x-ms-version": "2019-12-12" } } ], "uniqueTestInfo": { "uniqueName": { - "container": "container158224824523309081", - "blob": "blob158224824671508312" + "container": "container158501883196502913", + "blob": "blob158501883327901608" }, "newDate": {} - } + }, + "hash": "9955cdc24f7740b2a708b4ab74d2601f" } \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_asynchorous_copy_return_versionid.js b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_asynchorous_copy_return_versionid.js new file mode 100644 index 000000000000..950e654d0348 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_asynchorous_copy_return_versionid.js @@ -0,0 +1,130 @@ +let nock = require('nock'); + +module.exports.hash = "e398b7bcabf21c191b9670bc84a4fc30"; + +module.exports.testInfo = {"uniqueName":{"container":"container158459901672706413","blob":"blob158459901696704278","copiedblob":"copiedblob158459901745702616"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459901672706413') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:36 GMT', + 'ETag', + '"0x8D7CBCE0ECFF5AA"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'b42b9026-701e-005c-1eb6-fd8f9a000000', + 'x-ms-client-request-id', + 'f104b9b5-248d-4a04-ad6d-43cd54288c1d', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Thu, 19 Mar 2020 06:23:36 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459901672706413/blob158459901696704278', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:37 GMT', + 'ETag', + '"0x8D7CBCE0EF52E44"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e55d1-b01e-0088-29b6-fd3fcb000000', + 'x-ms-client-request-id', + '26737cca-f85e-439f-8570-3ec7b029cc2b', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-19T06:23:37.0865220Z', + 'Date', + 'Thu, 19 Mar 2020 06:23:36 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459901672706413/blob158459901696704278') + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:37 GMT', + 'ETag', + '"0x8D7CBCE0F1AE597"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'b42b90ea-701e-005c-46b6-fd8f9a000000', + 'x-ms-client-request-id', + 'db1cbd1e-f99e-4038-bdc8-aa6bbe4fb89b', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-19T06:23:37.3356992Z', + 'Date', + 'Thu, 19 Mar 2020 06:23:36 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459901672706413/copiedblob158459901745702616') + .reply(202, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:37 GMT', + 'ETag', + '"0x8D7CBCE0F409CE5"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e568d-b01e-0088-47b6-fd3fcb000000', + 'x-ms-client-request-id', + 'c72b3194-a8cf-4d4d-8d2b-2102e19ff48b', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-03-19T06:23:37.5818746Z', + 'x-ms-copy-id', + '6b333786-1dd4-452d-8ed5-e6a48eb7c838', + 'x-ms-copy-status', + 'success', + 'Date', + 'Thu, 19 Mar 2020 06:23:37 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container158459901672706413') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'b42b91bc-701e-005c-06b6-fd8f9a000000', + 'x-ms-client-request-id', + '8307f037-3e1e-4daa-b706-5132be449766', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Thu, 19 Mar 2020 06:23:37 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_blob_create_return_versionid.js b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_blob_create_return_versionid.js new file mode 100644 index 000000000000..e035d8fd7ef2 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_blob_create_return_versionid.js @@ -0,0 +1,153 @@ +let nock = require('nock'); + +module.exports.hash = "451c6fd62c81383c6e0cce46649063e6"; + +module.exports.testInfo = {"uniqueName":{"container":"container158459901405902088","blob":"blob158459901430407722","appendblob":"appendblob158459901478704253","pageblob":"pageblob158459901502809947"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459901405902088') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:34 GMT', + 'ETag', + '"0x8D7CBCE0D395269"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e51d6-b01e-0088-23b6-fd3fcb000000', + 'x-ms-client-request-id', + 'a860ac66-29b6-44a1-8fed-9444239e0645', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Thu, 19 Mar 2020 06:23:33 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459901405902088/blob158459901430407722', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:34 GMT', + 'ETag', + '"0x8D7CBCE0D5E8CEE"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'b42b8b95-701e-005c-79b6-fd8f9a000000', + 'x-ms-client-request-id', + '758156ed-19ca-4cbc-90ac-d3233809b027', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-19T06:23:34.4226312Z', + 'Date', + 'Thu, 19 Mar 2020 06:23:34 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459901405902088/blob158459901430407722') + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:34 GMT', + 'ETag', + '"0x8D7CBCE0D83A7E4"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e526b-b01e-0088-25b6-fd3fcb000000', + 'x-ms-client-request-id', + '983e5e09-80f1-4347-aeed-2f9aaef9eabc', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-19T06:23:34.6658036Z', + 'Date', + 'Thu, 19 Mar 2020 06:23:34 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459901405902088/appendblob158459901478704253') + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:34 GMT', + 'ETag', + '"0x8D7CBCE0DA89BC1"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'b42b8c3b-701e-005c-0eb6-fd8f9a000000', + 'x-ms-client-request-id', + 'f74f7cb5-8987-4250-a54a-a8b48ba25e63', + 'x-ms-version', + '2019-12-12', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-19T06:23:34.9069761Z', + 'Date', + 'Thu, 19 Mar 2020 06:23:34 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459901405902088/pageblob158459901502809947') + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:35 GMT', + 'ETag', + '"0x8D7CBCE0DCD6884"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e5321-b01e-0088-46b6-fd3fcb000000', + 'x-ms-client-request-id', + 'c030965b-1792-4fe5-8ac7-aa7d620bd50e', + 'x-ms-version', + '2019-12-12', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-19T06:23:35.1481476Z', + 'Date', + 'Thu, 19 Mar 2020 06:23:34 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container158459901405902088') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'b42b8d21-701e-005c-5ab6-fd8f9a000000', + 'x-ms-client-request-id', + 'c1122fe5-8e67-403e-ada5-0d683341ca80', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Thu, 19 Mar 2020 06:23:34 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_delete_a_snapshot.js b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_delete_a_snapshot.js new file mode 100644 index 000000000000..85fba3a92442 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_delete_a_snapshot.js @@ -0,0 +1,224 @@ +let nock = require('nock'); + +module.exports.hash = "58513e0c39f37daceede07e04a9062d7"; + +module.exports.testInfo = {"uniqueName":{"container":"container158459900517006636","blob":"blob158459900541003605"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459900517006636') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:25 GMT', + 'ETag', + '"0x8D7CBCE07EC9D40"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e45b1-b01e-0088-58b6-fd3fcb000000', + 'x-ms-client-request-id', + '733d2bdc-1c46-4c6b-ad25-f1bab95a4d28', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Thu, 19 Mar 2020 06:23:25 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459900517006636/blob158459900541003605', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:25 GMT', + 'ETag', + '"0x8D7CBCE08131040"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e4604-b01e-0088-1bb6-fd3fcb000000', + 'x-ms-client-request-id', + '9f2600f8-24c8-4777-add7-c4d4cd828891', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-19T06:23:25.5393109Z', + 'Date', + 'Thu, 19 Mar 2020 06:23:25 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459900517006636/blob158459900541003605') + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:25 GMT', + 'ETag', + '"0x8D7CBCE0838EEA8"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e4655-b01e-0088-57b6-fd3fcb000000', + 'x-ms-client-request-id', + '4a619f85-b558-43fe-9b50-9e19f35c80dc', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-19T06:23:25.7884877Z', + 'Date', + 'Thu, 19 Mar 2020 06:23:25 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459900517006636/blob158459900541003605') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:25 GMT', + 'ETag', + '"0x8D7CBCE0838EEA8"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e46a6-b01e-0088-1cb6-fd3fcb000000', + 'x-ms-client-request-id', + '94b6e56b-1a4e-4534-8e00-0853c2edb25e', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-03-19T06:23:26.0416662Z', + 'x-ms-snapshot', + '2020-03-19T06:23:26.0406662Z', + 'x-ms-request-server-encrypted', + 'false', + 'Date', + 'Thu, 19 Mar 2020 06:23:25 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container158459900517006636/blob158459900541003605') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e4731-b01e-0088-7ab6-fd3fcb000000', + 'x-ms-client-request-id', + '2dd68f98-6cc4-42e3-bd25-5c2aa3a24021', + 'x-ms-version', + '2019-12-12', + 'x-ms-delete-type-permanent', + 'false', + 'Date', + 'Thu, 19 Mar 2020 06:23:26 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container158459900517006636/blob158459900541003605') + .query(true) + .reply(404, "", [ + 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e4777-b01e-0088-36b6-fd3fcb000000', + 'x-ms-client-request-id', + '414f3441-c5c8-423f-9969-321199850025', + 'x-ms-version', + '2019-12-12', + 'x-ms-error-code', + 'BlobNotFound', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-error-code,Content-Length,Date,Transfer-Encoding', + 'Access-Control-Allow-Origin', + '*', + 'Date', + 'Thu, 19 Mar 2020 06:23:26 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container158459900517006636/blob158459900541003605') + .reply(200, "", [ + 'Content-Length', + '0', + 'Content-Type', + 'application/octet-stream', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:25 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D7CBCE0838EEA8"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e47cc-b01e-0088-7bb6-fd3fcb000000', + 'x-ms-client-request-id', + 'eb986bff-0e1e-488c-9dd3-022426430a14', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-03-19T06:23:26.0416662Z', + 'x-ms-is-current-version', + 'true', + 'x-ms-creation-time', + 'Thu, 19 Mar 2020 06:23:25 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', + 'Hot', + 'x-ms-access-tier-inferred', + 'true', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-version-id,x-ms-is-current-version,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, 19 Mar 2020 06:23:26 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container158459900517006636') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e4835-b01e-0088-55b6-fd3fcb000000', + 'x-ms-client-request-id', + 'c48eb5cb-477d-4c21-9e81-6eeee53c9525', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Thu, 19 Mar 2020 06:23:26 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_delete_a_version.js b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_delete_a_version.js new file mode 100644 index 000000000000..86023d3df706 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_delete_a_version.js @@ -0,0 +1,196 @@ +let nock = require('nock'); + +module.exports.hash = "bc4dd729c5dd87bf12319e80d8e8545f"; + +module.exports.testInfo = {"uniqueName":{"container":"container158459900100501054","blob":"blob158459900124500587"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459900100501054') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:21 GMT', + 'ETag', + '"0x8D7CBCE05713E93"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e4071-b01e-0088-52b6-fd3fcb000000', + 'x-ms-client-request-id', + '012c13e8-7b4d-4c9d-b8a2-da8647837ae1', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Thu, 19 Mar 2020 06:23:20 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459900100501054/blob158459900124500587', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:21 GMT', + 'ETag', + '"0x8D7CBCE0596C6CE"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e40ac-b01e-0088-05b6-fd3fcb000000', + 'x-ms-client-request-id', + '0d5ef65f-c510-4533-89ad-4118a25df3ee', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-19T06:23:21.3693415Z', + 'Date', + 'Thu, 19 Mar 2020 06:23:21 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459900100501054/blob158459900124500587') + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:21 GMT', + 'ETag', + '"0x8D7CBCE05BB9395"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e40ed-b01e-0088-3eb6-fd3fcb000000', + 'x-ms-client-request-id', + 'fadba3a7-65e3-4a84-9fc4-408e67a95bfb', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-19T06:23:21.6115130Z', + 'Date', + 'Thu, 19 Mar 2020 06:23:21 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container158459900100501054/blob158459900124500587') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e4139-b01e-0088-02b6-fd3fcb000000', + 'x-ms-client-request-id', + '24727022-163f-487e-8ea4-a0097c6b54d8', + 'x-ms-version', + '2019-12-12', + 'x-ms-delete-type-permanent', + 'false', + 'Date', + 'Thu, 19 Mar 2020 06:23:21 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container158459900100501054/blob158459900124500587') + .query(true) + .reply(404, "", [ + 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e4189-b01e-0088-4ab6-fd3fcb000000', + 'x-ms-client-request-id', + 'af9eca93-5e39-46f9-8485-14c012b27d62', + 'x-ms-version', + '2019-12-12', + 'x-ms-error-code', + 'BlobNotFound', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-error-code,Content-Length,Date,Transfer-Encoding', + 'Access-Control-Allow-Origin', + '*', + 'Date', + 'Thu, 19 Mar 2020 06:23:21 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container158459900100501054/blob158459900124500587') + .reply(200, "", [ + 'Content-Length', + '0', + 'Content-Type', + 'application/octet-stream', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:21 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D7CBCE05BB9395"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e41da-b01e-0088-08b6-fd3fcb000000', + 'x-ms-client-request-id', + '4529a963-a613-4f64-8563-55c56314ccf8', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-03-19T06:23:21.6115130Z', + 'x-ms-is-current-version', + 'true', + 'x-ms-creation-time', + 'Thu, 19 Mar 2020 06:23:21 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', + 'Hot', + 'x-ms-access-tier-inferred', + 'true', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-version-id,x-ms-is-current-version,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, 19 Mar 2020 06:23:22 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container158459900100501054') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e4227-b01e-0088-4bb6-fd3fcb000000', + 'x-ms-client-request-id', + 'edf24965-6935-4388-bd93-2a2b50cd9da6', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Thu, 19 Mar 2020 06:23:22 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleteblobs_should_work_for_batch_delete.js b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleteblobs_should_work_for_batch_delete.js new file mode 100644 index 000000000000..8f184c52f23a --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleteblobs_should_work_for_batch_delete.js @@ -0,0 +1,85 @@ +let nock = require('nock'); + +module.exports.hash = "6f6a281fc76eb2011a24cc4f8e8e5fd5"; + +module.exports.testInfo = {"uniqueName":{"container":"container158459900270600707","blob":"blob158459900294706388"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459900270600707') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:22 GMT', + 'ETag', + '"0x8D7CBCE0674D411"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e4286-b01e-0088-1ab6-fd3fcb000000', + 'x-ms-client-request-id', + '2fcf3631-70a9-4f23-a03d-6d0a46ee940d', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Thu, 19 Mar 2020 06:23:22 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459900270600707/blob158459900294706388', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:23 GMT', + 'ETag', + '"0x8D7CBCE069A354C"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e42c7-b01e-0088-55b6-fd3fcb000000', + 'x-ms-client-request-id', + '30e1ee1b-1578-4702-a037-00e61e37c0a5', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-19T06:23:23.0685516Z', + 'Date', + 'Thu, 19 Mar 2020 06:23:22 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459900270600707/blob158459900294706388') + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:23 GMT', + 'ETag', + '"0x8D7CBCE06BF503D"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e4338-b01e-0088-39b6-fd3fcb000000', + 'x-ms-client-request-id', + 'abef7945-21b5-4064-9ea3-68cc2ca62275', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-19T06:23:23.3127245Z', + 'Date', + 'Thu, 19 Mar 2020 06:23:23 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleting_a_blob_that_has_snapshots_needs_deletesnapshots_option.js b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleting_a_blob_that_has_snapshots_needs_deletesnapshots_option.js new file mode 100644 index 000000000000..bf5c7943782b --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleting_a_blob_that_has_snapshots_needs_deletesnapshots_option.js @@ -0,0 +1,218 @@ +let nock = require('nock'); + +module.exports.hash = "db1d48bb3945806dc2f8f8b03ffa17a5"; + +module.exports.testInfo = {"uniqueName":{"container":"container158459900716901393","blob":"blob158459900741801925"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459900716901393') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:27 GMT', + 'ETag', + '"0x8D7CBCE091E28E7"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e48a8-b01e-0088-33b6-fd3fcb000000', + 'x-ms-client-request-id', + '32d1dc49-1081-42ce-ba6a-d845d7bf3b07', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Thu, 19 Mar 2020 06:23:27 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459900716901393/blob158459900741801925', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:27 GMT', + 'ETag', + '"0x8D7CBCE0945110B"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e4906-b01e-0088-03b6-fd3fcb000000', + 'x-ms-client-request-id', + '11e5478c-a4eb-4fcc-9f4c-969ae0b21b8b', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-19T06:23:27.5437323Z', + 'Date', + 'Thu, 19 Mar 2020 06:23:27 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459900716901393/blob158459900741801925') + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:27 GMT', + 'ETag', + '"0x8D7CBCE096A04E8"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e494c-b01e-0088-3cb6-fd3fcb000000', + 'x-ms-client-request-id', + 'd5666cfb-1d22-4a2e-83a8-b3a12aafc77d', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-19T06:23:27.7869048Z', + 'Date', + 'Thu, 19 Mar 2020 06:23:27 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459900716901393/blob158459900741801925') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:27 GMT', + 'ETag', + '"0x8D7CBCE096A04E8"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e4995-b01e-0088-7db6-fd3fcb000000', + 'x-ms-client-request-id', + 'd33a297c-129c-4de1-8322-a932e0497a39', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-03-19T06:23:28.0310773Z', + 'x-ms-snapshot', + '2020-03-19T06:23:28.0300773Z', + 'x-ms-request-server-encrypted', + 'false', + 'Date', + 'Thu, 19 Mar 2020 06:23:27 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container158459900716901393/blob158459900741801925') + .reply(409, "SnapshotsPresentThis operation is not permitted because the blob has snapshots.\nRequestId:775e4a07-b01e-0088-53b6-fd3fcb000000\nTime:2020-03-19T06:23:28.3044745Z", [ + 'Content-Length', + '248', + 'Content-Type', + 'application/xml', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e4a07-b01e-0088-53b6-fd3fcb000000', + 'x-ms-client-request-id', + '062856c8-f552-4d70-8aa1-78291df3cc05', + 'x-ms-version', + '2019-12-12', + 'x-ms-error-code', + 'SnapshotsPresent', + 'Date', + 'Thu, 19 Mar 2020 06:23:28 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container158459900716901393/blob158459900741801925') + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e4a64-b01e-0088-23b6-fd3fcb000000', + 'x-ms-client-request-id', + '209597c0-ca18-47f0-b6c8-54ff2de516d4', + 'x-ms-version', + '2019-12-12', + 'x-ms-delete-type-permanent', + 'false', + 'Date', + 'Thu, 19 Mar 2020 06:23:28 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container158459900716901393/blob158459900741801925') + .query(true) + .reply(404, "", [ + 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'b42b83b1-701e-005c-0db6-fd8f9a000000', + 'x-ms-client-request-id', + '15fccdb4-c158-4bfa-ba60-e5e9646e5a78', + 'x-ms-version', + '2019-12-12', + 'x-ms-error-code', + 'BlobNotFound', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-error-code,Content-Length,Date,Transfer-Encoding', + 'Access-Control-Allow-Origin', + '*', + 'Date', + 'Thu, 19 Mar 2020 06:23:28 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container158459900716901393/blob158459900741801925') + .reply(404, "", [ + 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e4be3-b01e-0088-63b6-fd3fcb000000', + 'x-ms-client-request-id', + '7d3f7598-4b5a-45b6-a03e-97ee76c6c8ea', + 'x-ms-version', + '2019-12-12', + 'x-ms-error-code', + 'BlobNotFound', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-error-code,Content-Length,Date,Transfer-Encoding', + 'Access-Control-Allow-Origin', + '*', + 'Date', + 'Thu, 19 Mar 2020 06:23:29 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container158459900716901393') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'b42b8478-701e-005c-34b6-fd8f9a000000', + 'x-ms-client-request-id', + 'b37b4b1a-0c0a-4abf-904c-9fb9345b2489', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Thu, 19 Mar 2020 06:23:29 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleting_a_blob_with_both_deletesnapshots_and_versionid_option_should_fail.js b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleting_a_blob_with_both_deletesnapshots_and_versionid_option_should_fail.js new file mode 100644 index 000000000000..411cd0ef33b8 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleting_a_blob_with_both_deletesnapshots_and_versionid_option_should_fail.js @@ -0,0 +1,175 @@ +let nock = require('nock'); + +module.exports.hash = "225342bc54f257faee0103248ddc59dd"; + +module.exports.testInfo = {"uniqueName":{"container":"container158511669236805116","blob":"blob158511669646200888"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158511669236805116') + .query(true) + .reply(201, "", [ + 'Transfer-Encoding', + 'chunked', + 'Last-Modified', + 'Wed, 25 Mar 2020 06:11:36 GMT', + 'ETag', + '"0x8D7D08360141C11"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '5866e7db-301e-000f-566c-02f352000000', + 'x-ms-client-request-id', + 'b7c3b932-dcd6-4e44-8cd6-e64865a984f0', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Wed, 25 Mar 2020 06:11:36 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158511669236805116/blob158511669646200888', "Hello World") + .reply(201, "", [ + 'Transfer-Encoding', + 'chunked', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Wed, 25 Mar 2020 06:11:37 GMT', + 'ETag', + '"0x8D7D08360A37E50"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '5866e856-301e-000f-446c-02f352000000', + 'x-ms-client-request-id', + 'c042277d-609f-414b-a596-e6034624a489', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-25T06:11:37.6845161Z', + 'Date', + 'Wed, 25 Mar 2020 06:11:37 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158511669236805116/blob158511669646200888') + .reply(201, "", [ + 'Transfer-Encoding', + 'chunked', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Wed, 25 Mar 2020 06:11:40 GMT', + 'ETag', + '"0x8D7D083627119AE"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '5866e90f-301e-000f-6b6c-02f352000000', + 'x-ms-client-request-id', + '5e503553-0e09-45be-9b31-feb74f0c8777', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-25T06:11:40.7097022Z', + 'Date', + 'Wed, 25 Mar 2020 06:11:40 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158511669236805116/blob158511669646200888') + .query(true) + .reply(201, "", [ + 'Transfer-Encoding', + 'chunked', + 'Last-Modified', + 'Wed, 25 Mar 2020 06:11:40 GMT', + 'ETag', + '"0x8D7D083627119AE"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '5866e920-301e-000f-786c-02f352000000', + 'x-ms-client-request-id', + '3587b8b4-f8d1-4ec9-9d35-49570198205e', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-03-25T06:11:41.0089164Z', + 'x-ms-snapshot', + '2020-03-25T06:11:41.0079164Z', + 'x-ms-request-server-encrypted', + 'false', + 'Date', + 'Wed, 25 Mar 2020 06:11:40 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container158511669236805116/blob158511669646200888') + .query(true) + .reply(400, "InvalidQueryParameterValueValue for one of the query parameters specified in the request URI is invalid.\nRequestId:5866e932-301e-000f-066c-02f352000000\nTime:2020-03-25T06:11:41.2891209Zversionid2020-03-25T06:11:37.6845161ZThis operation is only allowed on the root blob. Version id should not be provided.", [ + 'Content-Length', + '494', + 'Content-Type', + 'application/xml', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '5866e932-301e-000f-066c-02f352000000', + 'x-ms-client-request-id', + 'c399a343-f3f5-47d0-aa1a-efa9f8374633', + 'x-ms-version', + '2019-12-12', + 'x-ms-error-code', + 'InvalidQueryParameterValue', + 'Date', + 'Wed, 25 Mar 2020 06:11:40 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container158511669236805116/blob158511669646200888') + .query(true) + .reply(400, "InvalidQueryParameterValueValue for one of the query parameters specified in the request URI is invalid.\nRequestId:5866e94f-301e-000f-186c-02f352000000\nTime:2020-03-25T06:11:41.5833335Zversionid2020-03-25T06:11:40.7097022ZThis operation is only allowed on the root blob. Version id should not be provided.", [ + 'Content-Length', + '494', + 'Content-Type', + 'application/xml', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '5866e94f-301e-000f-186c-02f352000000', + 'x-ms-client-request-id', + 'eb7f104d-7dde-4a87-816f-af32f6db306e', + 'x-ms-version', + '2019-12-12', + 'x-ms-error-code', + 'InvalidQueryParameterValue', + 'Date', + 'Wed, 25 Mar 2020 06:11:41 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container158511669236805116') + .query(true) + .reply(202, "", [ + 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '5866e963-301e-000f-286c-02f352000000', + 'x-ms-client-request-id', + 'c69694de-4765-4d24-be1e-4643fdd46a73', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Wed, 25 Mar 2020 06:11:41 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleting_a_versioned_blob_without_extra_parameters_should_succeed.js b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleting_a_versioned_blob_without_extra_parameters_should_succeed.js new file mode 100644 index 000000000000..ccf75fa7c56d --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleting_a_versioned_blob_without_extra_parameters_should_succeed.js @@ -0,0 +1,189 @@ +let nock = require('nock'); + +module.exports.hash = "20cc456e0374a6511f10ecd16ac23b06"; + +module.exports.testInfo = {"uniqueName":{"container":"container158459900995505704","blob":"blob158459901037808615"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459900995505704') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:30 GMT', + 'ETag', + '"0x8D7CBCE0AD6D774"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e4cad-b01e-0088-12b6-fd3fcb000000', + 'x-ms-client-request-id', + '47ab8233-939f-46dc-8aa2-a7c1b7baff32', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Thu, 19 Mar 2020 06:23:29 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459900995505704/blob158459901037808615', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:30 GMT', + 'ETag', + '"0x8D7CBCE0B09A8D3"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'b42b85a5-701e-005c-3ab6-fd8f9a000000', + 'x-ms-client-request-id', + 'ab1ac37f-58a5-4a0d-8c4c-ae0a311d511f', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-19T06:23:30.5098451Z', + 'Date', + 'Thu, 19 Mar 2020 06:23:30 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459900995505704/blob158459901037808615') + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:30 GMT', + 'ETag', + '"0x8D7CBCE0B35A2D3"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e4d77-b01e-0088-3bb6-fd3fcb000000', + 'x-ms-client-request-id', + 'dd9287b1-14a9-4a53-8e07-5c21d74cf7a9', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-19T06:23:30.7990499Z', + 'Date', + 'Thu, 19 Mar 2020 06:23:30 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container158459900995505704/blob158459901037808615') + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'b42b86a4-701e-005c-21b6-fd8f9a000000', + 'x-ms-client-request-id', + '7cd3e246-d1a6-41cf-9794-bbb62c114655', + 'x-ms-version', + '2019-12-12', + 'x-ms-delete-type-permanent', + 'false', + 'Date', + 'Thu, 19 Mar 2020 06:23:30 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container158459900995505704/blob158459901037808615') + .reply(404, "", [ + 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e4e35-b01e-0088-5ab6-fd3fcb000000', + 'x-ms-client-request-id', + 'dfd6e2bf-290f-4999-80d1-6a2a8abf084e', + 'x-ms-version', + '2019-12-12', + 'x-ms-error-code', + 'BlobNotFound', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-error-code,Content-Length,Date,Transfer-Encoding', + 'Access-Control-Allow-Origin', + '*', + 'Date', + 'Thu, 19 Mar 2020 06:23:31 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container158459900995505704/blob158459901037808615') + .query(true) + .reply(200, "", [ + 'Content-Length', + '11', + 'Content-Type', + 'application/octet-stream', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:30 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D7CBCE0B09A8D3"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'b42b876c-701e-005c-4bb6-fd8f9a000000', + 'x-ms-client-request-id', + '84080d34-0e6a-4c81-9345-2a2e0b25fafd', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-03-19T06:23:30.5098451Z', + 'x-ms-creation-time', + 'Thu, 19 Mar 2020 06:23:30 GMT', + 'x-ms-blob-type', + 'BlockBlob', + 'x-ms-server-encrypted', + 'true', + 'x-ms-access-tier', + 'Hot', + 'x-ms-access-tier-inferred', + 'true', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-version-id,Content-Type,Last-Modified,ETag,x-ms-creation-time,Content-MD5,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, 19 Mar 2020 06:23:31 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container158459900995505704') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e4ede-b01e-0088-75b6-fd3fcb000000', + 'x-ms-client-request-id', + 'ed1929cd-3e70-4f8d-829e-818718b4ba3d', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Thu, 19 Mar 2020 06:23:31 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleting_root_blob_with_versionid_should_fail.js b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleting_root_blob_with_versionid_should_fail.js new file mode 100644 index 000000000000..c33cbb717b3a --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleting_root_blob_with_versionid_should_fail.js @@ -0,0 +1,169 @@ +let nock = require('nock'); + +module.exports.hash = "00606a4db118fe0be9eb18e940c81596"; + +module.exports.testInfo = {"uniqueName":{"container":"container158459900344007763","blob":"blob158459900368205915"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459900344007763') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:23 GMT', + 'ETag', + '"0x8D7CBCE06E49A27"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e4376-b01e-0088-74b6-fd3fcb000000', + 'x-ms-client-request-id', + '52958440-1031-4149-b4e2-62f1dcab9218', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Thu, 19 Mar 2020 06:23:23 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459900344007763/blob158459900368205915', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:23 GMT', + 'ETag', + '"0x8D7CBCE070A499B"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e43c9-b01e-0088-3fb6-fd3fcb000000', + 'x-ms-client-request-id', + '656dd5ea-d17a-4f3b-9b11-c13340c88056', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-19T06:23:23.8030747Z', + 'Date', + 'Thu, 19 Mar 2020 06:23:23 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459900344007763/blob158459900368205915') + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:24 GMT', + 'ETag', + '"0x8D7CBCE072F8BA6"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e43fd-b01e-0088-6eb6-fd3fcb000000', + 'x-ms-client-request-id', + '8ae99738-81b7-4576-ad37-b699dd6f1ec3', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-19T06:23:24.0482486Z', + 'Date', + 'Thu, 19 Mar 2020 06:23:23 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container158459900344007763/blob158459900368205915') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e4455-b01e-0088-39b6-fd3fcb000000', + 'x-ms-client-request-id', + 'ce88d01f-e99a-46a7-b6ff-a93fd39412c9', + 'x-ms-version', + '2019-12-12', + 'x-ms-delete-type-permanent', + 'false', + 'Date', + 'Thu, 19 Mar 2020 06:23:24 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container158459900344007763/blob158459900368205915') + .query(true) + .reply(404, "", [ + 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e44a0-b01e-0088-78b6-fd3fcb000000', + 'x-ms-client-request-id', + '2759b383-a2a9-4ce9-ad54-4066fb7720b7', + 'x-ms-version', + '2019-12-12', + 'x-ms-error-code', + 'BlobNotFound', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-error-code,Content-Length,Date,Transfer-Encoding', + 'Access-Control-Allow-Origin', + '*', + 'Date', + 'Thu, 19 Mar 2020 06:23:24 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container158459900344007763/blob158459900368205915') + .query(true) + .reply(403, "OperationNotAllowedOnRootBlobThe specified operation is not allowed on root blob.\nRequestId:775e44df-b01e-0088-2bb6-fd3fcb000000\nTime:2020-03-19T06:23:24.8029861Z", [ + 'Content-Length', + '250', + 'Content-Type', + 'application/xml', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e44df-b01e-0088-2bb6-fd3fcb000000', + 'x-ms-client-request-id', + '8e07f3fd-dab5-48b7-b43a-9ba13112a491', + 'x-ms-version', + '2019-12-12', + 'x-ms-error-code', + 'OperationNotAllowedOnRootBlob', + 'Date', + 'Thu, 19 Mar 2020 06:23:24 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container158459900344007763') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e4537-b01e-0088-75b6-fd3fcb000000', + 'x-ms-client-request-id', + 'e6b488d4-b0b5-40b9-b99b-5a6924d71501', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Thu, 19 Mar 2020 06:23:24 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_download_a_blob_version.js b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_download_a_blob_version.js new file mode 100644 index 000000000000..4ec8d9c949a6 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_download_a_blob_version.js @@ -0,0 +1,271 @@ +let nock = require('nock'); + +module.exports.hash = "ee99fdab9f827965e4e47d0a2601ab44"; + +module.exports.testInfo = {"uniqueName":{"container":"container158472280465409921","blob":"blob158472280609502441"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158472280465409921') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Fri, 20 Mar 2020 16:46:45 GMT', + 'ETag', + '"0x8D7CCEE46E331F1"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1a967b8-101e-0017-01d7-fe73c9000000', + 'x-ms-client-request-id', + 'f721189a-d6ef-4df6-9fe6-2b21a1307c52', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Fri, 20 Mar 2020 16:46:45 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158472280465409921/blob158472280609502441', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Fri, 20 Mar 2020 16:46:46 GMT', + 'ETag', + '"0x8D7CCEE472896F8"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1a96a28-101e-0017-52d7-fe73c9000000', + 'x-ms-client-request-id', + '8a4c75f1-19dc-47f3-8381-f222ddb3abe0', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-20T16:46:46.4339704Z', + 'Date', + 'Fri, 20 Mar 2020 16:46:45 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158472280465409921/blob158472280609502441') + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Fri, 20 Mar 2020 16:46:47 GMT', + 'ETag', + '"0x8D7CCEE4784352E"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1a96d02-101e-0017-15d7-fe73c9000000', + 'x-ms-client-request-id', + 'd71eaff1-7630-4231-bbe0-b454c62a09e9', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-20T16:46:47.0363987Z', + 'Date', + 'Fri, 20 Mar 2020 16:46:46 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/container158472280465409921/blob158472280609502441') + .query(true) + .reply(200, "Hello World", [ + 'Content-Length', + '11', + 'Content-Type', + 'application/octet-stream', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Fri, 20 Mar 2020 16:46:46 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D7CCEE472896F8"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1a96ff6-101e-0017-6bd7-fe73c9000000', + 'x-ms-client-request-id', + 'c6eaa16f-2569-42f8-9e9d-3f5a9d988993', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-03-20T16:46:46.4339704Z', + 'x-ms-creation-time', + 'Fri, 20 Mar 2020 16:46:46 GMT', + 'x-ms-blob-type', + 'BlockBlob', + 'x-ms-server-encrypted', + 'true', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-version-id,Content-Type,Last-Modified,ETag,x-ms-creation-time,Content-MD5,x-ms-blob-type,x-ms-server-encrypted,Accept-Ranges,Content-Length,Date,Transfer-Encoding', + 'Access-Control-Allow-Origin', + '*', + 'Date', + 'Fri, 20 Mar 2020 16:46:46 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/container158472280465409921/blob158472280609502441') + .query(true) + .reply(200, "", [ + 'Content-Length', + '0', + 'Content-Type', + 'application/octet-stream', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Fri, 20 Mar 2020 16:46:47 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D7CCEE4784352E"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1a971c9-101e-0017-2cd7-fe73c9000000', + 'x-ms-client-request-id', + 'd90e48e3-ddab-434e-b534-8221de450a60', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-03-20T16:46:47.0363987Z', + 'x-ms-is-current-version', + 'true', + 'x-ms-creation-time', + 'Fri, 20 Mar 2020 16:46:47 GMT', + 'x-ms-blob-type', + 'BlockBlob', + 'x-ms-server-encrypted', + 'true', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-version-id,x-ms-is-current-version,Content-Type,Last-Modified,ETag,x-ms-creation-time,Content-MD5,x-ms-blob-type,x-ms-server-encrypted,Accept-Ranges,Content-Length,Date,Transfer-Encoding', + 'Access-Control-Allow-Origin', + '*', + 'Date', + 'Fri, 20 Mar 2020 16:46:47 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container158472280465409921/blob158472280609502441') + .query(true) + .reply(200, "", [ + 'Content-Length', + '11', + 'Content-Type', + 'application/octet-stream', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Fri, 20 Mar 2020 16:46:46 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D7CCEE472896F8"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1a9736b-101e-0017-34d7-fe73c9000000', + 'x-ms-client-request-id', + 'f071747b-cb9d-4732-80ac-c32e733cf8fc', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-03-20T16:46:46.4339704Z', + 'x-ms-creation-time', + 'Fri, 20 Mar 2020 16:46:46 GMT', + 'x-ms-blob-type', + 'BlockBlob', + 'x-ms-server-encrypted', + 'true', + 'x-ms-access-tier', + 'Hot', + 'x-ms-access-tier-inferred', + 'true', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-version-id,Content-Type,Last-Modified,ETag,x-ms-creation-time,Content-MD5,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', + 'Fri, 20 Mar 2020 16:46:47 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/container158472280465409921/blob158472280609502441') + .query(true) + .reply(206, "Hello World", [ + 'Content-Length', + '11', + 'Content-Type', + 'application/octet-stream', + 'Content-Range', + 'bytes 0-10/11', + 'Last-Modified', + 'Fri, 20 Mar 2020 16:46:46 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D7CCEE472896F8"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1a97501-101e-0017-3cd7-fe73c9000000', + 'x-ms-client-request-id', + 'a08075b3-d079-412c-98b3-7b22caedaeaf', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-03-20T16:46:46.4339704Z', + 'x-ms-creation-time', + 'Fri, 20 Mar 2020 16:46:46 GMT', + 'x-ms-blob-content-md5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'x-ms-blob-type', + 'BlockBlob', + 'x-ms-server-encrypted', + 'true', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-version-id,Content-Type,Last-Modified,ETag,x-ms-creation-time,x-ms-blob-content-md5,x-ms-blob-type,x-ms-server-encrypted,Accept-Ranges,Content-Length,Date,Transfer-Encoding', + 'Access-Control-Allow-Origin', + '*', + 'Date', + 'Fri, 20 Mar 2020 16:46:47 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container158472280465409921') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1a97758-101e-0017-7cd7-fe73c9000000', + 'x-ms-client-request-id', + '4b1fa8c1-90b0-4fc0-8035-176a2ff695c0', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Fri, 20 Mar 2020 16:46:48 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_download_a_version_to_file.js b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_download_a_version_to_file.js new file mode 100644 index 000000000000..128815791b11 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_download_a_version_to_file.js @@ -0,0 +1,85 @@ +let nock = require('nock'); + +module.exports.hash = "e9055ad5397c8ec5665db9c18d047954"; + +module.exports.testInfo = {"uniqueName":{"container":"container158459899877900136","blob":"blob158459899902709938"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459899877900136') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:18 GMT', + 'ETag', + '"0x8D7CBCE041EB7AC"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e3d66-b01e-0088-48b6-fd3fcb000000', + 'x-ms-client-request-id', + '8b492f6a-109d-48a4-be7f-de83a7176c59', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Thu, 19 Mar 2020 06:23:18 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459899877900136/blob158459899902709938', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:19 GMT', + 'ETag', + '"0x8D7CBCE0444186F"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e3dc9-b01e-0088-18b6-fd3fcb000000', + 'x-ms-client-request-id', + 'e0308c97-cc85-4d30-866d-efc534a26504', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-19T06:23:19.1487599Z', + 'Date', + 'Thu, 19 Mar 2020 06:23:18 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459899877900136/blob158459899902709938') + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:19 GMT', + 'ETag', + '"0x8D7CBCE0468BE1D"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e3e17-b01e-0088-5eb6-fd3fcb000000', + 'x-ms-client-request-id', + '06319605-3027-420a-b74f-51dd7426d856', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-19T06:23:19.3899309Z', + 'Date', + 'Thu, 19 Mar 2020 06:23:19 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_downloadtobuffer_with_cpk.js b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_downloadtobuffer_with_cpk.js new file mode 100644 index 000000000000..424a7a40a22f --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_downloadtobuffer_with_cpk.js @@ -0,0 +1,257 @@ +let nock = require('nock'); + +module.exports.hash = "084794f83c7ea813a5b667148ee3ceda"; + +module.exports.testInfo = {"uniqueName":{"container":"container158511863727805139","blob":"blob158511864171607121","blobCPK":"blobCPK158511864234403164"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158511863727805139') + .query(true) + .reply(201, "", [ + 'Transfer-Encoding', + 'chunked', + 'Last-Modified', + 'Wed, 25 Mar 2020 06:44:02 GMT', + 'ETag', + '"0x8D7D087E7EC2675"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '40e5d77b-e01e-000c-5870-021236000000', + 'x-ms-client-request-id', + '52904539-8bc9-452c-9424-7cf890acd8c7', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Wed, 25 Mar 2020 06:44:02 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158511863727805139/blob158511864171607121', "Hello World") + .reply(201, "", [ + 'Transfer-Encoding', + 'chunked', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Wed, 25 Mar 2020 06:44:02 GMT', + 'ETag', + '"0x8D7D087E81B3632"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '40e5d792-e01e-000c-6970-021236000000', + 'x-ms-client-request-id', + 'c82c4a86-3585-4953-9e56-f4976538b47b', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-25T06:44:02.9474354Z', + 'Date', + 'Wed, 25 Mar 2020 06:44:02 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158511863727805139/blob158511864171607121') + .reply(201, "", [ + 'Transfer-Encoding', + 'chunked', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Wed, 25 Mar 2020 06:44:03 GMT', + 'ETag', + '"0x8D7D087E84C3A47"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '40e5d79c-e01e-000c-7170-021236000000', + 'x-ms-client-request-id', + '47be5b35-a63e-4250-afb4-ddcd4ba846f4', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-25T06:44:03.2706668Z', + 'Date', + 'Wed, 25 Mar 2020 06:44:02 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158511863727805139/blobCPK158511864234403164', "Hello World") + .reply(201, "", [ + 'Transfer-Encoding', + 'chunked', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Wed, 25 Mar 2020 06:44:03 GMT', + 'ETag', + '"0x8D7D087E87C0590"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '40e5d7a4-e01e-000c-7870-021236000000', + 'x-ms-client-request-id', + 'aa8ea488-884a-4e53-b958-b557c9359b3b', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-encryption-key-sha256', + '3QFFFpRA5+XANHqwwbT4yXDmrT/2JaLt/FKHjzhOdoE=', + 'x-ms-version-id', + '2020-03-25T06:44:03.5818896Z', + 'Date', + 'Wed, 25 Mar 2020 06:44:03 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container158511863727805139/blobCPK158511864234403164') + .reply(200, "", [ + 'Content-Length', + '11', + 'Content-Type', + 'application/octet-stream', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Wed, 25 Mar 2020 06:44:03 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D7D087E87C0590"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '40e5d7ae-e01e-000c-8070-021236000000', + 'x-ms-client-request-id', + 'c5354194-7dfe-4845-9459-108112f4b9bf', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-03-25T06:44:03.5818896Z', + 'x-ms-is-current-version', + 'true', + 'x-ms-creation-time', + 'Wed, 25 Mar 2020 06:44:03 GMT', + 'x-ms-lease-status', + 'unlocked', + 'x-ms-lease-state', + 'available', + 'x-ms-blob-type', + 'BlockBlob', + 'x-ms-server-encrypted', + 'true', + 'x-ms-encryption-key-sha256', + '3QFFFpRA5+XANHqwwbT4yXDmrT/2JaLt/FKHjzhOdoE=', + 'x-ms-access-tier', + 'Hot', + 'x-ms-access-tier-inferred', + 'true', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-version-id,x-ms-is-current-version,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-encryption-key-sha256,x-ms-access-tier,x-ms-access-tier-inferred,Accept-Ranges', + 'Access-Control-Allow-Origin', + '*', + 'Date', + 'Wed, 25 Mar 2020 06:44:03 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/container158511863727805139/blobCPK158511864234403164') + .reply(206, "Hello World", [ + 'Content-Length', + '11', + 'Content-Type', + 'application/octet-stream', + 'Content-Range', + 'bytes 0-10/11', + 'Last-Modified', + 'Wed, 25 Mar 2020 06:44:03 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D7D087E87C0590"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '40e5d7b6-e01e-000c-0870-021236000000', + 'x-ms-client-request-id', + '90c8af3a-8188-4362-8e3d-2387357bab52', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-03-25T06:44:03.5818896Z', + 'x-ms-is-current-version', + 'true', + 'x-ms-creation-time', + 'Wed, 25 Mar 2020 06:44:03 GMT', + 'x-ms-blob-content-md5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'x-ms-lease-status', + 'unlocked', + 'x-ms-lease-state', + 'available', + 'x-ms-blob-type', + 'BlockBlob', + 'x-ms-server-encrypted', + 'true', + 'x-ms-encryption-key-sha256', + '3QFFFpRA5+XANHqwwbT4yXDmrT/2JaLt/FKHjzhOdoE=', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-version-id,x-ms-is-current-version,Content-Type,Last-Modified,ETag,x-ms-creation-time,x-ms-blob-content-md5,x-ms-lease-status,x-ms-lease-state,x-ms-blob-type,x-ms-server-encrypted,x-ms-encryption-key-sha256,Accept-Ranges', + 'Access-Control-Allow-Origin', + '*', + 'Date', + 'Wed, 25 Mar 2020 06:44:03 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container158511863727805139/blobCPK158511864234403164') + .reply(409, "", [ + 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '40e5d7d0-e01e-000c-1b70-021236000000', + 'x-ms-client-request-id', + '04e6330a-0216-4ed6-a89e-29dfd9527d07', + 'x-ms-version', + '2019-12-12', + 'x-ms-error-code', + 'BlobUsesCustomerSpecifiedEncryption', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-error-code', + 'Access-Control-Allow-Origin', + '*', + 'Date', + 'Wed, 25 Mar 2020 06:44:04 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container158511863727805139') + .query(true) + .reply(202, "", [ + 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '40e5d7de-e01e-000c-2670-021236000000', + 'x-ms-client-request-id', + '0a8f9fc5-2e6e-4c63-8547-ea8e35eef7d6', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Wed, 25 Mar 2020 06:44:04 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_exists_with_condition.js b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_exists_with_condition.js new file mode 100644 index 000000000000..18b0a8cd455e --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_exists_with_condition.js @@ -0,0 +1,201 @@ +let nock = require('nock'); + +module.exports.hash = "d5502ae98d701eb6230929f447f1bdc5"; + +module.exports.testInfo = {"uniqueName":{"container":"container158512295881100501","blob":"blob158512296170809417"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158512295881100501') + .query(true) + .reply(201, "", [ + 'Transfer-Encoding', + 'chunked', + 'Last-Modified', + 'Wed, 25 Mar 2020 07:56:02 GMT', + 'ETag', + '"0x8D7D091F6DA00D7"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '330ba4a0-201e-0013-5c7a-02a132000000', + 'x-ms-client-request-id', + '6f233a93-fa4e-4999-8bdd-db6405c8998c', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Wed, 25 Mar 2020 07:56:02 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158512295881100501/blob158512296170809417', "Hello World") + .reply(201, "", [ + 'Transfer-Encoding', + 'chunked', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Wed, 25 Mar 2020 07:56:02 GMT', + 'ETag', + '"0x8D7D091F70D2060"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '330ba4b5-201e-0013-6c7a-02a132000000', + 'x-ms-client-request-id', + '3680d8e6-2f9e-4276-849c-5dc418ea6fc2', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-25T07:56:02.9882464Z', + 'Date', + 'Wed, 25 Mar 2020 07:56:02 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158512295881100501/blob158512296170809417') + .reply(201, "", [ + 'Transfer-Encoding', + 'chunked', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Wed, 25 Mar 2020 07:56:03 GMT', + 'ETag', + '"0x8D7D091F7915CF4"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '330ba4dd-201e-0013-057a-02a132000000', + 'x-ms-client-request-id', + 'e6f5aafe-db1c-4404-9a21-d804da614024', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-25T07:56:03.8558724Z', + 'Date', + 'Wed, 25 Mar 2020 07:56:03 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158512295881100501/blob158512296170809417') + .query(true) + .reply(201, "", [ + 'Transfer-Encoding', + 'chunked', + 'Last-Modified', + 'Wed, 25 Mar 2020 07:56:03 GMT', + 'ETag', + '"0x8D7D091F7915CF4"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '330ba4f2-201e-0013-167a-02a132000000', + 'x-ms-client-request-id', + '8e835a85-93b9-4d53-aa8d-660407e9dedc', + 'x-ms-version', + '2019-12-12', + 'x-ms-lease-id', + '1443bc5a-2884-4b3a-be7f-755f1f124cd8', + 'Date', + 'Wed, 25 Mar 2020 07:56:04 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container158512295881100501/blob158512296170809417') + .reply(200, "", [ + 'Content-Length', + '0', + 'Content-Type', + 'application/octet-stream', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Wed, 25 Mar 2020 07:56:03 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D7D091F7915CF4"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '330ba52d-201e-0013-3e7a-02a132000000', + 'x-ms-client-request-id', + '95a75445-7a98-4e0d-86ba-f9989febb0b5', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-03-25T07:56:03.8558724Z', + 'x-ms-is-current-version', + 'true', + 'x-ms-creation-time', + 'Wed, 25 Mar 2020 07:56:03 GMT', + 'x-ms-lease-status', + 'locked', + 'x-ms-lease-state', + 'leased', + 'x-ms-lease-duration', + 'fixed', + 'x-ms-blob-type', + 'BlockBlob', + 'x-ms-server-encrypted', + 'true', + 'x-ms-access-tier', + 'Hot', + 'x-ms-access-tier-inferred', + 'true', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-version-id,x-ms-is-current-version,Content-Type,Last-Modified,ETag,x-ms-creation-time,Content-MD5,x-ms-lease-status,x-ms-lease-state,x-ms-lease-duration,x-ms-blob-type,x-ms-server-encrypted,x-ms-access-tier,x-ms-access-tier-inferred,Accept-Ranges', + 'Access-Control-Allow-Origin', + '*', + 'Date', + 'Wed, 25 Mar 2020 07:56:04 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container158512295881100501/blob158512296170809417') + .reply(412, "", [ + 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '330ba544-201e-0013-537a-02a132000000', + 'x-ms-client-request-id', + 'a3073ea9-526d-4f53-bc2c-4128920e2a9d', + 'x-ms-version', + '2019-12-12', + 'x-ms-error-code', + 'LeaseIdMismatchWithBlobOperation', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-error-code', + 'Access-Control-Allow-Origin', + '*', + 'Date', + 'Wed, 25 Mar 2020 07:56:05 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container158512295881100501') + .query(true) + .reply(202, "", [ + 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '330ba54d-201e-0013-5a7a-02a132000000', + 'x-ms-client-request-id', + '351a13e6-49fd-4b6e-82e1-36788bea9181', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Wed, 25 Mar 2020 07:56:05 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_get_properties_of_a_blob_version.js b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_get_properties_of_a_blob_version.js new file mode 100644 index 000000000000..fc47dbdbdc1a --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_get_properties_of_a_blob_version.js @@ -0,0 +1,286 @@ +let nock = require('nock'); + +module.exports.hash = "60bf506b341e62b4b649aa4832f73b66"; + +module.exports.testInfo = {"uniqueName":{"container":"container158512474743806447","blob":"blob158512474989600217"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158512474743806447') + .query(true) + .reply(201, "", [ + 'Transfer-Encoding', + 'chunked', + 'Last-Modified', + 'Wed, 25 Mar 2020 08:25:50 GMT', + 'ETag', + '"0x8D7D09620A60950"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '47fd4f0a-701e-000e-137e-02ac8e000000', + 'x-ms-client-request-id', + 'ed1d73c7-9b36-47b4-924f-fb64f597f951', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Wed, 25 Mar 2020 08:25:50 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158512474743806447/blob158512474989600217', "Hello World") + .reply(201, "", [ + 'Transfer-Encoding', + 'chunked', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Wed, 25 Mar 2020 08:25:51 GMT', + 'ETag', + '"0x8D7D09620E8A521"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '47fd4f1b-701e-000e-1d7e-02ac8e000000', + 'x-ms-client-request-id', + '8bbe2f00-a4cd-47d6-9cce-d11644859808', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-25T08:25:51.2003873Z', + 'Date', + 'Wed, 25 Mar 2020 08:25:50 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158512474743806447/blob158512474989600217') + .reply(201, "", [ + 'Transfer-Encoding', + 'chunked', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Wed, 25 Mar 2020 08:25:51 GMT', + 'ETag', + '"0x8D7D09621203A2F"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '47fd4f30-701e-000e-2c7e-02ac8e000000', + 'x-ms-client-request-id', + '47a2baa3-c93f-400a-9094-25b8d369d2bd', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-25T08:25:51.5656511Z', + 'Date', + 'Wed, 25 Mar 2020 08:25:51 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container158512474743806447/blob158512474989600217') + .query(true) + .reply(200, "", [ + 'Content-Length', + '11', + 'Content-Type', + 'application/octet-stream', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Wed, 25 Mar 2020 08:25:51 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D7D09620E8A521"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '47fd4f4d-701e-000e-467e-02ac8e000000', + 'x-ms-client-request-id', + 'f7c0e9e6-b916-4012-bf26-5c448ad93b6a', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-03-25T08:25:51.2003873Z', + 'x-ms-creation-time', + 'Wed, 25 Mar 2020 08:25:51 GMT', + 'x-ms-blob-type', + 'BlockBlob', + 'x-ms-server-encrypted', + 'true', + 'x-ms-access-tier', + 'Hot', + 'x-ms-access-tier-inferred', + 'true', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-version-id,Content-Type,Last-Modified,ETag,x-ms-creation-time,Content-MD5,x-ms-blob-type,x-ms-server-encrypted,x-ms-access-tier,x-ms-access-tier-inferred,Accept-Ranges', + 'Access-Control-Allow-Origin', + '*', + 'Date', + 'Wed, 25 Mar 2020 08:25:52 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container158512474743806447/blob158512474989600217') + .reply(200, "", [ + 'Content-Length', + '0', + 'Content-Type', + 'application/octet-stream', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Wed, 25 Mar 2020 08:25:51 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D7D09621203A2F"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '47fd4f5c-701e-000e-507e-02ac8e000000', + 'x-ms-client-request-id', + '3ec25096-10d0-4fc2-ba73-bc6f922120bd', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-03-25T08:25:51.5656511Z', + 'x-ms-is-current-version', + 'true', + 'x-ms-creation-time', + 'Wed, 25 Mar 2020 08:25:51 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', + 'Hot', + 'x-ms-access-tier-inferred', + 'true', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-version-id,x-ms-is-current-version,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', + 'Access-Control-Allow-Origin', + '*', + 'Date', + 'Wed, 25 Mar 2020 08:25:52 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158512474743806447/blob158512474989600217') + .query(true) + .reply(201, "", [ + 'Transfer-Encoding', + 'chunked', + 'Last-Modified', + 'Wed, 25 Mar 2020 08:25:51 GMT', + 'ETag', + '"0x8D7D09621203A2F"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '47fd4f66-701e-000e-597e-02ac8e000000', + 'x-ms-client-request-id', + '69edbe4a-ff52-4654-b134-e8c4d2e36fda', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-03-25T08:25:53.1958278Z', + 'x-ms-snapshot', + '2020-03-25T08:25:53.1948278Z', + 'x-ms-request-server-encrypted', + 'false', + 'Date', + 'Wed, 25 Mar 2020 08:25:52 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container158512474743806447/blob158512474989600217') + .query(true) + .reply(400, "", [ + 'Vary', + 'Origin', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-error-code', + 'MutuallyExclusiveQueryParameters', + 'x-ms-request-id', + '47fd4f79-701e-000e-697e-02ac8e000000', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Wed, 25 Mar 2020 08:25:53 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container158512474743806447/blob158512474989600217') + .query(true) + .reply(200, "", [ + 'Content-Length', + '11', + 'Content-Type', + 'application/octet-stream', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Wed, 25 Mar 2020 08:25:51 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D7D09620E8A521"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'ddad7bd5-501e-0009-2d7f-02c0ed000000', + 'x-ms-client-request-id', + 'da4fadde-551c-418a-9324-a6708c8ced59', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-03-25T08:25:51.2003873Z', + 'x-ms-creation-time', + 'Wed, 25 Mar 2020 08:25:51 GMT', + 'x-ms-blob-type', + 'BlockBlob', + 'x-ms-server-encrypted', + 'true', + 'x-ms-access-tier', + 'Hot', + 'x-ms-access-tier-inferred', + 'true', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-version-id,Content-Type,Last-Modified,ETag,x-ms-creation-time,Content-MD5,x-ms-blob-type,x-ms-server-encrypted,x-ms-access-tier,x-ms-access-tier-inferred,Accept-Ranges', + 'Access-Control-Allow-Origin', + '*', + 'Date', + 'Wed, 25 Mar 2020 08:26:00 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container158512474743806447') + .query(true) + .reply(202, "", [ + 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'ddad7bfb-501e-0009-417f-02c0ed000000', + 'x-ms-client-request-id', + 'db180d6f-d167-4972-992e-0a218470ce2b', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Wed, 25 Mar 2020 08:26:00 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_list_blobs_include_versions.js b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_list_blobs_include_versions.js new file mode 100644 index 000000000000..053b47a16425 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_list_blobs_include_versions.js @@ -0,0 +1,185 @@ +let nock = require('nock'); + +module.exports.hash = "7343055b916de5458c6b21755c23322a"; + +module.exports.testInfo = {"uniqueName":{"container":"container158459899364508652","blob":"blob158459899502904787","blockblob/0":"blockblob/0158459899553202352","blockblob/1":"blockblob/1158459899578203015"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459899364508652') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:14 GMT', + 'ETag', + '"0x8D7CBCE01BB2B15"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e3887-b01e-0088-1ab6-fd3fcb000000', + 'x-ms-client-request-id', + 'd1646155-1755-4762-b3b0-34cf56e413c5', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Thu, 19 Mar 2020 06:23:14 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459899364508652/blob158459899502904787', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:15 GMT', + 'ETag', + '"0x8D7CBCE01E2FD54"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e38e8-b01e-0088-69b6-fd3fcb000000', + 'x-ms-client-request-id', + 'bad7c8e8-a31b-4aeb-b14f-43fbaa1d612f', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-19T06:23:15.1569236Z', + 'Date', + 'Thu, 19 Mar 2020 06:23:14 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459899364508652/blob158459899502904787') + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:15 GMT', + 'ETag', + '"0x8D7CBCE0208DBBB"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e3934-b01e-0088-2bb6-fd3fcb000000', + 'x-ms-client-request-id', + 'ae4e39e0-5cfe-419a-9fc9-1e2c382fd708', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-19T06:23:15.4071008Z', + 'Date', + 'Thu, 19 Mar 2020 06:23:15 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459899364508652/blockblob%2F0158459899553202352') + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:15 GMT', + 'ETag', + '"0x8D7CBCE022F7D94"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e397c-b01e-0088-6ab6-fd3fcb000000', + 'x-ms-client-request-id', + 'b6ce1ec0-95b4-41fe-9ca7-1056ea961fc9', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-19T06:23:15.6582804Z', + 'Date', + 'Thu, 19 Mar 2020 06:23:15 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459899364508652/blockblob%2F1158459899578203015') + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:15 GMT', + 'ETag', + '"0x8D7CBCE02566D9F"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e39b7-b01e-0088-1eb6-fd3fcb000000', + 'x-ms-client-request-id', + '63adf972-aa1b-4e83-b143-0add9508ac57', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-19T06:23:15.9144628Z', + 'Date', + 'Thu, 19 Mar 2020 06:23:15 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/container158459899364508652') + .query(true) + .reply(200, "blob1584598995029047872020-03-19T06:23:15.1569236ZThu, 19 Mar 2020 06:23:15 GMTThu, 19 Mar 2020 06:23:15 GMT0x8D7CBCE01E2FD5411application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottruetrueblob1584598995029047872020-03-19T06:23:15.4071008ZtrueThu, 19 Mar 2020 06:23:15 GMTThu, 19 Mar 2020 06:23:15 GMT0x8D7CBCE0208DBBB0application/octet-stream1B2M2Y8AsgTpgAmY7PhCfg==BlockBlobHottrueunlockedavailabletrueblockblob/01584598995532023522020-03-19T06:23:15.6582804ZtrueThu, 19 Mar 2020 06:23:15 GMTThu, 19 Mar 2020 06:23:15 GMT0x8D7CBCE022F7D940application/octet-stream1B2M2Y8AsgTpgAmY7PhCfg==BlockBlobHottrueunlockedavailabletrueblockblob/11584598995782030152020-03-19T06:23:15.9144628ZtrueThu, 19 Mar 2020 06:23:15 GMTThu, 19 Mar 2020 06:23:15 GMT0x8D7CBCE02566D9F0application/octet-stream1B2M2Y8AsgTpgAmY7PhCfg==BlockBlobHottrueunlockedavailabletrue", [ + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/xml', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e3a22-b01e-0088-77b6-fd3fcb000000', + 'x-ms-client-request-id', + '9678c27f-7c17-4ac4-8c42-c113eac1de8e', + 'x-ms-version', + '2019-12-12', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,Content-Type,Content-Length,Date,Transfer-Encoding', + 'Access-Control-Allow-Origin', + '*', + 'Date', + 'Thu, 19 Mar 2020 06:23:15 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container158459899364508652') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e3ad2-b01e-0088-08b6-fd3fcb000000', + 'x-ms-client-request-id', + '8b9c1686-d29a-46e0-9805-b415a7a2b3f8', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Thu, 19 Mar 2020 06:23:16 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_promote_a_version_as_the_copy_source.js b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_promote_a_version_as_the_copy_source.js new file mode 100644 index 000000000000..529d3fe6d903 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_promote_a_version_as_the_copy_source.js @@ -0,0 +1,253 @@ +let nock = require('nock'); + +module.exports.hash = "6792f50664e5657867a58bb56c5c68c9"; + +module.exports.testInfo = {"uniqueName":{"container":"container158512476074705738","blob":"blob158512476253303108"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158512476074705738') + .query(true) + .reply(201, "", [ + 'Transfer-Encoding', + 'chunked', + 'Last-Modified', + 'Wed, 25 Mar 2020 08:26:02 GMT', + 'ETag', + '"0x8D7D0962760746D"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'ddad7c1e-501e-0009-5d7f-02c0ed000000', + 'x-ms-client-request-id', + 'be8fd281-b1d3-4920-847b-4516b190e157', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Wed, 25 Mar 2020 08:26:01 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158512476074705738/blob158512476253303108', "Hello World") + .reply(201, "", [ + 'Transfer-Encoding', + 'chunked', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Wed, 25 Mar 2020 08:26:03 GMT', + 'ETag', + '"0x8D7D096286E527B"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'ddad7c80-501e-0009-307f-02c0ed000000', + 'x-ms-client-request-id', + '06e1fd49-1491-4074-a7c9-6e4be98f6acf', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-25T08:26:03.8215043Z', + 'Date', + 'Wed, 25 Mar 2020 08:26:02 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158512476074705738/blob158512476253303108') + .reply(201, "", [ + 'Transfer-Encoding', + 'chunked', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Wed, 25 Mar 2020 08:26:04 GMT', + 'ETag', + '"0x8D7D0962897DB0D"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'ddad7c9a-501e-0009-437f-02c0ed000000', + 'x-ms-client-request-id', + '6d6d3c8e-fa42-4c7a-8f08-f69974a38566', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-25T08:26:04.0946994Z', + 'Date', + 'Wed, 25 Mar 2020 08:26:03 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container158512476074705738/blob158512476253303108') + .query(true) + .reply(200, "", [ + 'Content-Length', + '11', + 'Content-Type', + 'application/octet-stream', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Wed, 25 Mar 2020 08:26:03 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D7D096286E527B"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'ddad7cac-501e-0009-517f-02c0ed000000', + 'x-ms-client-request-id', + '0519cdf0-dafd-4295-b470-e969820536d3', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-03-25T08:26:03.8215043Z', + 'x-ms-creation-time', + 'Wed, 25 Mar 2020 08:26:03 GMT', + 'x-ms-blob-type', + 'BlockBlob', + 'x-ms-server-encrypted', + 'true', + 'x-ms-access-tier', + 'Hot', + 'x-ms-access-tier-inferred', + 'true', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-version-id,Content-Type,Last-Modified,ETag,x-ms-creation-time,Content-MD5,x-ms-blob-type,x-ms-server-encrypted,x-ms-access-tier,x-ms-access-tier-inferred,Accept-Ranges', + 'Access-Control-Allow-Origin', + '*', + 'Date', + 'Wed, 25 Mar 2020 08:26:03 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158512476074705738/blob158512476253303108') + .reply(202, "", [ + 'Transfer-Encoding', + 'chunked', + 'Last-Modified', + 'Wed, 25 Mar 2020 08:26:04 GMT', + 'ETag', + '"0x8D7D09628ECC160"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'ddad7cbb-501e-0009-5c7f-02c0ed000000', + 'x-ms-client-request-id', + '3dd5a71a-42d6-4ffb-b156-1008f143b666', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-03-25T08:26:04.6510986Z', + 'x-ms-copy-id', + '08dbc451-7517-44a9-8665-051330711f5e', + 'x-ms-copy-status', + 'success', + 'Date', + 'Wed, 25 Mar 2020 08:26:03 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/container158512476074705738') + .query(true) + .reply(200, "blob1585124762533031082020-03-25T08:26:03.8215043ZWed, 25 Mar 2020 08:26:03 GMTWed, 25 Mar 2020 08:26:03 GMT0x8D7D096286E527B11application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottruetrueblob1585124762533031082020-03-25T08:26:04.0946994ZWed, 25 Mar 2020 08:26:04 GMTWed, 25 Mar 2020 08:26:04 GMT0x8D7D0962897DB0D0application/octet-stream1B2M2Y8AsgTpgAmY7PhCfg==BlockBlobHottruetrueblob1585124762533031082020-03-25T08:26:04.6510986ZtrueWed, 25 Mar 2020 08:26:04 GMTWed, 25 Mar 2020 08:26:04 GMT0x8D7D09628ECC16011application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottrueunlockedavailabletrue", [ + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/xml', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'ddad7cd4-501e-0009-727f-02c0ed000000', + 'x-ms-client-request-id', + 'c7d8bfe4-c607-4008-89a6-feb23ed3c16b', + 'x-ms-version', + '2019-12-12', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,Content-Type', + 'Access-Control-Allow-Origin', + '*', + 'Date', + 'Wed, 25 Mar 2020 08:26:04 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/container158512476074705738/blob158512476253303108') + .reply(200, "Hello World", [ + 'Content-Length', + '11', + 'Content-Type', + 'application/octet-stream', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Wed, 25 Mar 2020 08:26:04 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D7D09628ECC160"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'ddad7ce6-501e-0009-027f-02c0ed000000', + 'x-ms-client-request-id', + 'd0c78850-4260-4c7a-ab05-7864ff569c73', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-03-25T08:26:04.6510986Z', + 'x-ms-is-current-version', + 'true', + 'x-ms-creation-time', + 'Wed, 25 Mar 2020 08:26:04 GMT', + 'x-ms-lease-status', + 'unlocked', + 'x-ms-lease-state', + 'available', + 'x-ms-blob-type', + 'BlockBlob', + 'x-ms-copy-id', + '08dbc451-7517-44a9-8665-051330711f5e', + 'x-ms-copy-source', + 'https://fakestorageaccount.blob.core.windows.net/container158512476074705738/blob158512476253303108?versionid=2020-03-25T08:26:03.8215043Z', + 'x-ms-copy-status', + 'success', + 'x-ms-copy-progress', + '11/11', + 'x-ms-copy-completion-time', + 'Wed, 25 Mar 2020 08:26:04 GMT', + 'x-ms-server-encrypted', + 'true', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-version-id,x-ms-is-current-version,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-copy-id,x-ms-copy-source,x-ms-copy-status,x-ms-copy-progress,x-ms-copy-completion-time,x-ms-server-encrypted,Accept-Ranges', + 'Access-Control-Allow-Origin', + '*', + 'Date', + 'Wed, 25 Mar 2020 08:26:04 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container158512476074705738') + .query(true) + .reply(202, "", [ + 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'ddad7d30-501e-0009-3b7f-02c0ed000000', + 'x-ms-client-request-id', + '96872254-6a83-4c72-8062-f3a3b5e064aa', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Wed, 25 Mar 2020 08:26:06 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_setmetadata.js b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_setmetadata.js new file mode 100644 index 000000000000..f889f6844b2a --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_setmetadata.js @@ -0,0 +1,129 @@ +let nock = require('nock'); + +module.exports.hash = "a02a4136be7d42cb6fdb315eddbb2f95"; + +module.exports.testInfo = {"uniqueName":{"container":"container158459901794700068","blob":"blob158459901818509666"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459901794700068') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:38 GMT', + 'ETag', + '"0x8D7CBCE0F8A3DB9"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e572c-b01e-0088-56b6-fd3fcb000000', + 'x-ms-client-request-id', + '953ac2d3-5d0c-4fc8-a850-3db4276e5312', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Thu, 19 Mar 2020 06:23:37 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459901794700068/blob158459901818509666', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:38 GMT', + 'ETag', + '"0x8D7CBCE0FAEDC1E"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'b42b92e1-701e-005c-1ab6-fd8f9a000000', + 'x-ms-client-request-id', + '15a4bfcf-2827-4ab2-9202-1012c2f2690e', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-19T06:23:38.3033886Z', + 'Date', + 'Thu, 19 Mar 2020 06:23:37 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459901794700068/blob158459901818509666') + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:38 GMT', + 'ETag', + '"0x8D7CBCE0FD4453E"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e57e3-b01e-0088-72b6-fd3fcb000000', + 'x-ms-client-request-id', + 'c7004baa-9f8c-4bcd-888e-431485e195b9', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-19T06:23:38.5505639Z', + 'Date', + 'Thu, 19 Mar 2020 06:23:38 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459901794700068/blob158459901818509666') + .query(true) + .reply(200, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:38 GMT', + 'ETag', + '"0x8D7CBCE0FF96034"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'b42b93ae-701e-005c-54b6-fd8f9a000000', + 'x-ms-client-request-id', + '5d243375-ca2b-4ff9-ae2c-f9d8ef438db9', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-03-19T06:23:38.7927364Z', + 'x-ms-request-server-encrypted', + 'true', + 'Date', + 'Thu, 19 Mar 2020 06:23:38 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container158459901794700068') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e588b-b01e-0088-07b6-fd3fcb000000', + 'x-ms-client-request-id', + '8d6a2723-0a7d-4e33-9465-5230221b28c2', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Thu, 19 Mar 2020 06:23:38 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_undelete_a_softdeleted_version.js b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_undelete_a_softdeleted_version.js new file mode 100644 index 000000000000..770dcee987af --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_undelete_a_softdeleted_version.js @@ -0,0 +1,233 @@ +let nock = require('nock'); + +module.exports.hash = "467dd77f82dae27b49ab3ff9f7eb4d1a"; + +module.exports.testInfo = {"uniqueName":{"container":"container158459901915803807","blob":"blob158459901939705184"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459901915803807') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:39 GMT', + 'ETag', + '"0x8D7CBCE10432A33"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'b42b94ce-701e-005c-53b6-fd8f9a000000', + 'x-ms-client-request-id', + '300e06a0-b983-42d9-b330-86596cdb2022', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Thu, 19 Mar 2020 06:23:38 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459901915803807/blob158459901939705184', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:39 GMT', + 'ETag', + '"0x8D7CBCE1067ED9C"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e5946-b01e-0088-32b6-fd3fcb000000', + 'x-ms-client-request-id', + '9e78241f-9eba-471d-8130-53b7fb76acb1', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-19T06:23:39.5162524Z', + 'Date', + 'Thu, 19 Mar 2020 06:23:39 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459901915803807/blob158459901939705184') + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:39 GMT', + 'ETag', + '"0x8D7CBCE108C6C31"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'b42b95c3-701e-005c-2fb6-fd8f9a000000', + 'x-ms-client-request-id', + '1c1821c9-3067-436f-b5e3-beab2f687a58', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-19T06:23:39.7574234Z', + 'Date', + 'Thu, 19 Mar 2020 06:23:39 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/') + .query(true) + .reply(200, "1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalseGET,PUT,POST,HEAD,DELETE,MERGE,OPTIONS,PATCH***86400true7false", [ + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/xml', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e5a0c-b01e-0088-5ab6-fd3fcb000000', + 'x-ms-client-request-id', + 'c3196b37-e0a2-40fb-974b-13e6643510f0', + 'x-ms-version', + '2019-12-12', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,Content-Length,Date,Transfer-Encoding', + 'Access-Control-Allow-Origin', + '*', + 'Date', + 'Thu, 19 Mar 2020 06:23:39 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container158459901915803807/blob158459901939705184') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'b42b9705-701e-005c-4bb6-fd8f9a000000', + 'x-ms-client-request-id', + 'bd04df20-1404-45e0-adec-a5d6a690f58f', + 'x-ms-version', + '2019-12-12', + 'x-ms-delete-type-permanent', + 'false', + 'Date', + 'Thu, 19 Mar 2020 06:23:39 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container158459901915803807/blob158459901939705184') + .query(true) + .reply(404, "", [ + 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e5b01-b01e-0088-1eb6-fd3fcb000000', + 'x-ms-client-request-id', + '97cdc424-d74f-4c65-8b6b-f87d28e12a5d', + 'x-ms-version', + '2019-12-12', + 'x-ms-error-code', + 'BlobNotFound', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-error-code,Content-Length,Date,Transfer-Encoding', + 'Access-Control-Allow-Origin', + '*', + 'Date', + 'Thu, 19 Mar 2020 06:23:40 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459901915803807/blob158459901939705184') + .query(true) + .reply(200, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'b42b97c8-701e-005c-63b6-fd8f9a000000', + 'x-ms-client-request-id', + '8d18edf6-a68f-4ecc-bfa6-2a51d2293d89', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Thu, 19 Mar 2020 06:23:40 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container158459901915803807/blob158459901939705184') + .query(true) + .reply(200, "", [ + 'Content-Length', + '11', + 'Content-Type', + 'application/octet-stream', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:39 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D7CBCE1067ED9C"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e5bb6-b01e-0088-2fb6-fd3fcb000000', + 'x-ms-client-request-id', + '622f9da6-5247-47ba-b205-5bb7b8926bb8', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-03-19T06:23:39.5162524Z', + 'x-ms-creation-time', + 'Thu, 19 Mar 2020 06:23:39 GMT', + 'x-ms-blob-type', + 'BlockBlob', + 'x-ms-server-encrypted', + 'true', + 'x-ms-access-tier', + 'Hot', + 'x-ms-access-tier-inferred', + 'true', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-version-id,Content-Type,Last-Modified,ETag,x-ms-creation-time,Content-MD5,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, 19 Mar 2020 06:23:40 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container158459901915803807') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'b42b98e1-701e-005c-33b6-fd8f9a000000', + 'x-ms-client-request-id', + 'f0ab8bd6-a524-4eb2-aee2-6f0e94349e8e', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Thu, 19 Mar 2020 06:23:40 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_upload_block_blob_return_versionid.js b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_upload_block_blob_return_versionid.js new file mode 100644 index 000000000000..c55326e14c55 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_upload_block_blob_return_versionid.js @@ -0,0 +1,132 @@ +let nock = require('nock'); + +module.exports.hash = "c3f7171fc37c565be96c4886a01aeb79"; + +module.exports.testInfo = {"uniqueName":{"container":"container158459901551208800","blob":"blob158459901575305766"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459901551208800') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:35 GMT', + 'ETag', + '"0x8D7CBCE0E16E264"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e53c7-b01e-0088-57b6-fd3fcb000000', + 'x-ms-client-request-id', + '54572add-57d1-43f1-a53d-10285dab39a3', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Thu, 19 Mar 2020 06:23:35 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459901551208800/blob158459901575305766', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:35 GMT', + 'ETag', + '"0x8D7CBCE0E3BA7BE"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'b42b8e08-701e-005c-2fb6-fd8f9a000000', + 'x-ms-client-request-id', + 'ef32afdb-4217-441f-b9a4-e3dc9e30c746', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-19T06:23:35.8706622Z', + 'Date', + 'Thu, 19 Mar 2020 06:23:35 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459901551208800/blob158459901575305766') + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:36 GMT', + 'ETag', + '"0x8D7CBCE0E6137ED"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e5477-b01e-0088-73b6-fd3fcb000000', + 'x-ms-client-request-id', + '94e6dc5e-a2af-4077-bc38-7267e1d077a3', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-19T06:23:36.1178365Z', + 'Date', + 'Thu, 19 Mar 2020 06:23:35 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158459901551208800/blob158459901575305766', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Thu, 19 Mar 2020 06:23:36 GMT', + 'ETag', + '"0x8D7CBCE0E86C816"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'b42b8f29-701e-005c-39b6-fd8f9a000000', + 'x-ms-client-request-id', + '7bc516fc-9a82-49d9-a1fb-30af2a644ec9', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-19T06:23:36.3640102Z', + 'Date', + 'Thu, 19 Mar 2020 06:23:35 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container158459901551208800') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '775e5517-b01e-0088-07b6-fd3fcb000000', + 'x-ms-client-request-id', + '56381488-cecc-4669-9ac6-fb8680910163', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Thu, 19 Mar 2020 06:23:36 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/recording_undelete.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_undelete.js index 5b29a6c9f41c..dd517efdb035 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient/recording_undelete.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_undelete.js @@ -1,60 +1,62 @@ let nock = require('nock'); -module.exports.testInfo = {"uniqueName":{"container":"container158224819242602498","blob":"blob158224819384806465"},"newDate":{}} +module.exports.hash = "4b2d62f655814eebf5c7065e3e0abe19"; + +module.exports.testInfo = {"uniqueName":{"container":"container158501877471701789","blob":"blob158501877599206974"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158224819242602498') + .put('/container158501877471701789') .query(true) .reply(201, "", [ - 'Content-Length', - '0', + 'Transfer-Encoding', + 'chunked', 'Last-Modified', - 'Fri, 21 Feb 2020 01:23:13 GMT', + 'Tue, 24 Mar 2020 02:59:35 GMT', 'ETag', - '"0x8D7B66C9F05446C"', + '"0x8D7CF9F62B3E84F"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '16a15905-f01e-0048-4755-e84232000000', + '700eb905-b01e-0020-0588-01a5c1000000', 'x-ms-client-request-id', - '0701b4e0-e23c-4571-b062-a811c675cc23', + 'b214e4df-c810-4499-9125-9747306b8258', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Fri, 21 Feb 2020 01:23:12 GMT' + 'Tue, 24 Mar 2020 02:59:35 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158224819242602498/blob158224819384806465', "Hello World") + .put('/container158501877471701789/blob158501877599206974', "Hello World") .reply(201, "", [ - 'Content-Length', - '0', + 'Transfer-Encoding', + 'chunked', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Fri, 21 Feb 2020 01:23:14 GMT', + 'Tue, 24 Mar 2020 02:59:36 GMT', 'ETag', - '"0x8D7B66C9FB99A69"', + '"0x8D7CF9F62D9DF53"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'f1569be6-a01e-0008-2155-e8450a000000', + '700eb921-b01e-0020-1188-01a5c1000000', 'x-ms-client-request-id', - '1d217bd0-430b-4927-92e8-c9e983188d6e', + '6bf10953-d471-4765-8698-2f8a72220d82', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', 'Date', - 'Fri, 21 Feb 2020 01:23:14 GMT' + 'Tue, 24 Mar 2020 02:59:36 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) .get('/') .query(true) - .reply(200, "1.0truetruetruetrue51.0truetruetrue31.0truetruetrue4DELETE,GET,HEAD,MERGE,POST,OPTIONS,PUT,PATCH***86400GETexample.com**8888GETexample.com**8888GETexample.com**8888GETexample.com**8888true7false", [ + .reply(200, "1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalsePATCH,PUT,OPTIONS,POST,MERGE,HEAD,GET,DELETE***86400true7falsefalse", [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -62,42 +64,42 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1206a6c6-601e-0017-1555-e8f60e000000', + '700eb92e-b01e-0020-1888-01a5c1000000', 'x-ms-client-request-id', - 'a54eeccd-225e-4712-8fc2-a0ecd57f1cca', + '5d24c616-5071-4003-917c-3077e1e7dbb5', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Access-Control-Expose-Headers', 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,Content-Length,Date,Transfer-Encoding', 'Access-Control-Allow-Origin', '*', 'Date', - 'Fri, 21 Feb 2020 01:23:15 GMT' + 'Tue, 24 Mar 2020 02:59:36 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container158224819242602498/blob158224819384806465') + .delete('/container158501877471701789/blob158501877599206974') .reply(202, "", [ - 'Content-Length', - '0', + 'Transfer-Encoding', + 'chunked', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '4317385a-801e-0052-2355-e823ed000000', + '700eb945-b01e-0020-2688-01a5c1000000', 'x-ms-client-request-id', - '74edeedb-f29f-4143-bc94-24d1ce31e039', + '8cb27e45-844c-475b-b607-97d315268c50', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-delete-type-permanent', 'false', 'Date', - 'Fri, 21 Feb 2020 01:23:16 GMT' + 'Tue, 24 Mar 2020 02:59:36 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .get('/container158224819242602498') + .get('/container158501877471701789') .query(true) - .reply(200, "1blob158224819384806465trueFri, 21 Feb 2020 01:23:14 GMTFri, 21 Feb 2020 01:23:14 GMT0x8D7B66C9FB99A6911application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottruetrueFri, 21 Feb 2020 01:23:17 GMT6", [ + .reply(200, "1blob158501877599206974trueTue, 24 Mar 2020 02:59:36 GMTTue, 24 Mar 2020 02:59:36 GMT0x8D7CF9F62D9DF5311application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottruetrueTue, 24 Mar 2020 02:59:36 GMT6", [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -105,41 +107,41 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '16a15f77-f01e-0048-0455-e84232000000', + '700eb95e-b01e-0020-3288-01a5c1000000', 'x-ms-client-request-id', - '9ee5fb28-702d-4320-9897-bb38ddd5bf82', + '30d3af48-4b56-47c8-9d5a-2c3229b30017', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Access-Control-Expose-Headers', 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,Content-Type,Content-Length,Date,Transfer-Encoding', 'Access-Control-Allow-Origin', '*', 'Date', - 'Fri, 21 Feb 2020 01:23:16 GMT' + 'Tue, 24 Mar 2020 02:59:36 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158224819242602498/blob158224819384806465') + .put('/container158501877471701789/blob158501877599206974') .query(true) .reply(200, "", [ - 'Content-Length', - '0', + 'Transfer-Encoding', + 'chunked', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '4317393f-801e-0052-7755-e823ed000000', + '700eb976-b01e-0020-3f88-01a5c1000000', 'x-ms-client-request-id', - '9b5fb2c2-879c-4747-88cb-05d2adbde60e', + 'bd930e1b-6345-4c14-adff-152086897948', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Fri, 21 Feb 2020 01:23:16 GMT' + 'Tue, 24 Mar 2020 02:59:37 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .get('/container158224819242602498') + .get('/container158501877471701789') .query(true) - .reply(200, "blob158224819384806465Fri, 21 Feb 2020 01:23:14 GMTFri, 21 Feb 2020 01:23:14 GMT0x8D7B66C9FB99A6911application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottrueunlockedavailabletrue", [ + .reply(200, "blob158501877599206974Tue, 24 Mar 2020 02:59:36 GMTTue, 24 Mar 2020 02:59:36 GMT0x8D7CF9F62D9DF5311application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottrueunlockedavailabletrue", [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -147,33 +149,33 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '16a16073-f01e-0048-6355-e84232000000', + '700eb98e-b01e-0020-4f88-01a5c1000000', 'x-ms-client-request-id', - '7231eea9-7bf1-40a0-a359-811726cc6404', + '56a91a00-9001-4d3d-9b8a-b27d4b76899f', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Access-Control-Expose-Headers', 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,Content-Type,Content-Length,Date,Transfer-Encoding', 'Access-Control-Allow-Origin', '*', 'Date', - 'Fri, 21 Feb 2020 01:23:17 GMT' + 'Tue, 24 Mar 2020 02:59:37 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container158224819242602498') + .delete('/container158501877471701789') .query(true) .reply(202, "", [ - 'Content-Length', - '0', + 'Transfer-Encoding', + 'chunked', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '16a16113-f01e-0048-7355-e84232000000', + '700eb99d-b01e-0020-5988-01a5c1000000', 'x-ms-client-request-id', - '500e08dc-9fa1-487c-91d0-3ca0ac351314', + 'b42f7831-4621-4161-aea7-63c7f45e0669', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Fri, 21 Feb 2020 01:23:17 GMT' + 'Tue, 24 Mar 2020 02:59:37 GMT' ]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_synccopyfromurl.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_synccopyfromurl.js index 4daf9a41384d..7928544c0ffa 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_synccopyfromurl.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_synccopyfromurl.js @@ -1,106 +1,118 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container156816863123100857","blob":"blob156816863163502976","copiedblob":"copiedblob156816863205304473","undefined":"2019-09-11T02:23:52.053Z"} +module.exports.hash = "9824a6daab12292957d73406d9ba3de9"; + +module.exports.testInfo = {"uniqueName":{"container":"container158459463331705281","blob":"blob158459463355705972","copiedblob":"copiedblob158459463380103159"},"newDate":{"undefined":"2020-03-19T05:10:33.801Z"}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816863123100857') + .put('/container158459463331705281') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:51 GMT', + 'Thu, 19 Mar 2020 05:10:33 GMT', 'ETag', - '"0x8D7365F16080F17"', + '"0x8D7CBC3DA171971"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '10740dfc-c01e-0024-1b47-68ffb2000000', + 'd838c3b2-201e-0041-40ac-fd8226000000', 'x-ms-client-request-id', - '9c8d8118-79ee-4f0d-ba28-fe383e0aaf41', + '79599e27-c9f2-4b4c-ad70-f54fd43e2353', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:23:50 GMT' ]); - + 'Thu, 19 Mar 2020 05:10:32 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816863123100857/blob156816863163502976', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container158459463331705281/blob158459463355705972', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:51 GMT', + 'Thu, 19 Mar 2020 05:10:33 GMT', 'ETag', - '"0x8D7365F1647EEB1"', + '"0x8D7CBC3DA3BF48A"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '8b513fd1-b01e-0002-3e47-686406000000', + '15fd09ff-d01e-0018-62ac-fd05a5000000', 'x-ms-client-request-id', - '352e0ac4-e031-4cae-b518-33c844de1428', + 'f1ef1af5-d5e3-4509-9466-0c900aea590f', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-03-19T05:10:33.6648095Z', 'Date', - 'Wed, 11 Sep 2019 02:23:51 GMT' ]); - + 'Thu, 19 Mar 2020 05:10:33 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816863123100857/copiedblob156816863205304473') - .reply(202, "", [ 'Content-Length', + .put('/container158459463331705281/copiedblob158459463380103159') + .reply(202, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:52 GMT', + 'Thu, 19 Mar 2020 05:10:34 GMT', 'ETag', - '"0x8D7365F16907164"', + '"0x8D7CBC3DA970F42"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'b7b617a7-901e-005a-7647-68607d000000', + 'd838c492-201e-0041-14ac-fd8226000000', 'x-ms-client-request-id', - 'b670711c-0000-44de-8c15-0e1ddf9a8b3d', + '9f78df14-8b4b-406f-8cf9-157d8140c204', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', + 'x-ms-version-id', + '2020-03-19T05:10:34.2652371Z', 'x-ms-copy-id', - '755e0632-f4e0-4777-86c0-22c01a318024', + 'cad1df54-bfae-4f8d-877c-6ac60f2e696b', 'x-ms-copy-status', 'success', 'Date', - 'Wed, 11 Sep 2019 02:23:51 GMT' ]); - + 'Thu, 19 Mar 2020 05:10:33 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container156816863123100857/blob156816863163502976') - .reply(200, "", [ 'Content-Length', + .head('/container158459463331705281/blob158459463355705972') + .reply(200, "", [ + 'Content-Length', '11', 'Content-Type', 'application/octet-stream', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:51 GMT', + 'Thu, 19 Mar 2020 05:10:33 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7365F1647EEB1"', + '"0x8D7CBC3DA3BF48A"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '63d1f70b-601e-0000-6447-6866fc000000', + '15fd0b6b-d01e-0018-19ac-fd05a5000000', 'x-ms-client-request-id', - '4b01d581-1e6c-4395-93a3-95d746c13a3b', + '85d4ae99-dce6-4bf7-911b-7847d7e80c64', 'x-ms-version', - '2019-02-02', - 'x-ms-tag-count', - '0', + '2019-12-12', + 'x-ms-version-id', + '2020-03-19T05:10:33.6648095Z', + 'x-ms-is-current-version', + 'true', 'x-ms-creation-time', - 'Wed, 11 Sep 2019 02:23:51 GMT', + 'Thu, 19 Mar 2020 05:10:33 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -110,43 +122,42 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-server-encrypted', 'true', 'x-ms-access-tier', - 'Cool', + 'Hot', 'x-ms-access-tier-inferred', 'true', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-tag-count,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', - 'Wed, 11 Sep 2019 02:23:52 GMT' ]); - + 'Thu, 19 Mar 2020 05:10:34 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container156816863123100857/copiedblob156816863205304473') - .reply(200, "", [ 'Content-Length', + .head('/container158459463331705281/copiedblob158459463380103159') + .reply(200, "", [ + 'Content-Length', '11', 'Content-Type', 'application/octet-stream', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:52 GMT', + 'Thu, 19 Mar 2020 05:10:34 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7365F16907164"', + '"0x8D7CBC3DA970F42"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'd9732ca1-501e-004c-6447-68a1e3000000', + 'd838c61d-201e-0041-7aac-fd8226000000', 'x-ms-client-request-id', - 'a02cee0a-b303-4303-b169-74da43c36364', + 'b22bc58c-f504-4546-a28e-06bcd59e998d', 'x-ms-version', - '2019-02-02', - 'x-ms-tag-count', - '0', + '2019-12-12', + 'x-ms-version-id', + '2020-03-19T05:10:34.2652371Z', + 'x-ms-is-current-version', + 'true', 'x-ms-creation-time', - 'Wed, 11 Sep 2019 02:23:52 GMT', + 'Thu, 19 Mar 2020 05:10:34 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -154,42 +165,39 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-blob-type', 'BlockBlob', 'x-ms-copy-id', - '755e0632-f4e0-4777-86c0-22c01a318024', + 'cad1df54-bfae-4f8d-877c-6ac60f2e696b', 'x-ms-copy-source', - 'https://fakestorageaccount.blob.core.windows.net/container156816863123100857/blob156816863163502976?sv=2019-02-02&se=2019-09-12T02%3A23%3A52Z&sr=b&sp=racwd&sig=ukkieCQpIhUKv1tCNQq0rxb5WhbF2bRWvqpMv8qeOPk%3D', + 'https://fakestorageaccount.blob.core.windows.net/container158459463331705281/blob158459463355705972?sv=2019-07-07&se=2020-03-20T05%3A10%3A33Z&sr=b&sp=racwd&sig=XAxbUEG26%2FCXtFlj2cVNjQ%2B%2F%2FlGjapB%2Ft7y8S6TEt6A%3D', 'x-ms-copy-status', 'success', 'x-ms-copy-progress', '11/11', 'x-ms-copy-completion-time', - 'Wed, 11 Sep 2019 02:23:52 GMT', + 'Thu, 19 Mar 2020 05:10:34 GMT', 'x-ms-server-encrypted', 'true', 'x-ms-access-tier', - 'Cool', + 'Hot', 'x-ms-access-tier-inferred', 'true', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-tag-count,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-copy-id,x-ms-copy-source,x-ms-copy-status,x-ms-copy-progress,x-ms-copy-completion-time,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', - 'Wed, 11 Sep 2019 02:23:52 GMT' ]); - + 'Thu, 19 Mar 2020 05:10:33 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156816863123100857') + .delete('/container158459463331705281') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'a4587a18-f01e-0041-7747-684eef000000', + '15fd0c0d-d01e-0018-29ac-fd05a5000000', 'x-ms-client-request-id', - '25ca3e0b-858b-4d55-a4ac-c6a0ef49d24a', + '7e0cd9e5-2b41-46df-9d71-414718729662', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:23:52 GMT' ]); - + 'Thu, 19 Mar 2020 05:10:34 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/shared_access_signature_sas_generation_nodejs_only/recording_generateaccountsasqueryparameters_should_work_for_blob_version_delete.js b/sdk/storage/storage-blob/recordings/node/shared_access_signature_sas_generation_nodejs_only/recording_generateaccountsasqueryparameters_should_work_for_blob_version_delete.js new file mode 100644 index 000000000000..1f960dcf38a1 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/shared_access_signature_sas_generation_nodejs_only/recording_generateaccountsasqueryparameters_should_work_for_blob_version_delete.js @@ -0,0 +1,123 @@ +let nock = require('nock'); + +module.exports.hash = "f704b5dcd1c546c6f4f50313162c61c3"; + +module.exports.testInfo = {"uniqueName":{"container":"container158471578931806353","blob":"blob158471579109309092"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158471578931806353') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Fri, 20 Mar 2020 14:49:50 GMT', + 'ETag', + '"0x8D7CCDDF17A45A9"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '91e6f2d5-901e-0054-20c6-fe9595000000', + 'x-ms-client-request-id', + '2f99cd47-c510-49f5-a983-1df5c8624b2d', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Fri, 20 Mar 2020 14:49:50 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158471578931806353/blob158471579109309092', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Fri, 20 Mar 2020 14:49:51 GMT', + 'ETag', + '"0x8D7CCDDF1D974B6"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '91e6f395-901e-0054-3cc6-fe9595000000', + 'x-ms-client-request-id', + 'f529905c-b10d-401f-9517-fba0b651d652', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-20T14:49:51.3613494Z', + 'Date', + 'Fri, 20 Mar 2020 14:49:51 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158471578931806353/blob158471579109309092') + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Fri, 20 Mar 2020 14:49:52 GMT', + 'ETag', + '"0x8D7CCDDF2630918"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '91e6f4e8-901e-0054-6bc6-fe9595000000', + 'x-ms-client-request-id', + 'ee33a835-5520-4e67-ad27-d3db046a380e', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-20T14:49:52.2639912Z', + 'Date', + 'Fri, 20 Mar 2020 14:49:52 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container158471578931806353/blob158471579109309092') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '91e6f5f1-901e-0054-56c6-fe9595000000', + 'x-ms-client-request-id', + '4330c16a-03e1-4fee-a6aa-e44f79d76e79', + 'x-ms-version', + '2019-12-12', + 'x-ms-delete-type-permanent', + 'false', + 'Date', + 'Fri, 20 Mar 2020 14:49:53 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container158471578931806353') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '91e6f62f-901e-0054-08c6-fe9595000000', + 'x-ms-client-request-id', + '07ff1691-d8fa-4c81-9196-9d15f0591b7b', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Fri, 20 Mar 2020 14:49:53 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/shared_access_signature_sas_generation_nodejs_only/recording_generateblobsasqueryparameters_should_work_for_blob_version_delete.js b/sdk/storage/storage-blob/recordings/node/shared_access_signature_sas_generation_nodejs_only/recording_generateblobsasqueryparameters_should_work_for_blob_version_delete.js new file mode 100644 index 000000000000..80ef9fc010f7 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/shared_access_signature_sas_generation_nodejs_only/recording_generateblobsasqueryparameters_should_work_for_blob_version_delete.js @@ -0,0 +1,147 @@ +let nock = require('nock'); + +module.exports.hash = "92b0673837b9baab3cd04f2d9b8dc183"; + +module.exports.testInfo = {"uniqueName":{"container":"container158471579366104189","blob":"blob158471579420409236"},"newDate":{"now":"2020-03-20T14:49:55.260Z","tmr":"2020-03-20T14:49:55.260Z"}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158471579366104189') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Fri, 20 Mar 2020 14:49:53 GMT', + 'ETag', + '"0x8D7CCDDF3609B95"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '91e6f6aa-901e-0054-70c6-fe9595000000', + 'x-ms-client-request-id', + '02a94cdb-5c8c-42c4-af5f-b384d8777f6a', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Fri, 20 Mar 2020 14:49:53 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158471579366104189/blob158471579420409236', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Fri, 20 Mar 2020 14:49:54 GMT', + 'ETag', + '"0x8D7CCDDF3AC3FE2"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '91e6f74e-901e-0054-80c6-fe9595000000', + 'x-ms-client-request-id', + 'e23b331a-0cb7-45b9-991a-e438b987ec95', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-20T14:49:54.4205282Z', + 'Date', + 'Fri, 20 Mar 2020 14:49:54 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container158471579366104189/blob158471579420409236') + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Fri, 20 Mar 2020 14:49:54 GMT', + 'ETag', + '"0x8D7CCDDF3F5D968"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '91e6f7d0-901e-0054-72c6-fe9595000000', + 'x-ms-client-request-id', + '1d54c74e-db0e-4464-8684-bf3f4a6754d4', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-03-20T14:49:54.9038712Z', + 'Date', + 'Fri, 20 Mar 2020 14:49:54 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container158471579366104189/blob158471579420409236') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '91e6f86f-901e-0054-6bc6-fe9595000000', + 'x-ms-client-request-id', + 'e7540387-84f6-4f09-9ac6-8e4b4a96b44b', + 'x-ms-version', + '2019-12-12', + 'x-ms-delete-type-permanent', + 'false', + 'Date', + 'Fri, 20 Mar 2020 14:49:55 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container158471579366104189/blob158471579420409236') + .query(true) + .reply(404, "", [ + 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '91e6f8fb-901e-0054-52c6-fe9595000000', + 'x-ms-client-request-id', + '32396bd5-d460-4146-a80a-55f6a68ab779', + 'x-ms-version', + '2019-12-12', + 'x-ms-error-code', + 'BlobNotFound', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-error-code,Content-Length,Date,Transfer-Encoding', + 'Access-Control-Allow-Origin', + '*', + 'Date', + 'Fri, 20 Mar 2020 14:49:55 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container158471579366104189') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '91e6f9a1-901e-0054-48c6-fe9595000000', + 'x-ms-client-request-id', + '2040ee62-ec75-47b5-b962-42287278bb1e', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Fri, 20 Mar 2020 14:49:56 GMT' +]); diff --git a/sdk/storage/storage-blob/review/storage-blob.api.md b/sdk/storage/storage-blob/review/storage-blob.api.md index d7a27e868f63..76f5117189c7 100644 --- a/sdk/storage/storage-blob/review/storage-blob.api.md +++ b/sdk/storage/storage-blob/review/storage-blob.api.md @@ -48,6 +48,7 @@ export class AccountSASPermissions { add: boolean; create: boolean; delete: boolean; + deleteVersion: boolean; list: boolean; static parse(permissions: string): AccountSASPermissions; process: boolean; @@ -379,6 +380,7 @@ export class BlobClient extends StorageClient { syncCopyFromURL(copySource: string, options?: BlobSyncCopyFromURLOptions): Promise; undelete(options?: BlobUndeleteOptions): Promise; withSnapshot(snapshot: string): BlobClient; + withVersion(versionId: string): BlobClient; } // @public @@ -552,6 +554,7 @@ export interface BlobDownloadToBufferOptions extends CommonOptions { blockSize?: number; concurrency?: number; conditions?: BlobRequestConditions; + customerProvidedKey?: CpkInfo; maxRetryRequestsPerBlock?: number; onProgress?: (progress: TransferProgressEvent) => void; } @@ -559,6 +562,7 @@ export interface BlobDownloadToBufferOptions extends CommonOptions { // @public export interface BlobExistsOptions extends CommonOptions { abortSignal?: AbortSignalLike; + conditions?: BlobRequestConditions; customerProvidedKey?: CpkInfo; } @@ -826,6 +830,7 @@ export class BlobSASPermissions { add: boolean; create: boolean; delete: boolean; + deleteVersion: boolean; static parse(permissions: string): BlobSASPermissions; read: boolean; toString(): string; @@ -844,11 +849,12 @@ export interface BlobSASSignatureValues { expiresOn?: Date; identifier?: string; ipRange?: SasIPRange; - permissions?: BlobSASPermissions; + permissions?: BlobSASPermissions | ContainerSASPermissions; protocol?: SASProtocol; snapshotTime?: string; startsOn?: Date; version?: string; + versionId?: string; } // @public @@ -1331,7 +1337,7 @@ export class ContainerClient extends StorageClient { get containerName(): string; create(options?: ContainerCreateOptions): Promise; delete(options?: ContainerDeleteMethodOptions): Promise; - deleteBlob(blobName: string, options?: BlobDeleteOptions): Promise; + deleteBlob(blobName: string, options?: ContainerDeleteBlobOptions): Promise; exists(options?: ContainerExistsOptions): Promise; getAccessPolicy(options?: ContainerGetAccessPolicyOptions): Promise; getAppendBlobClient(blobName: string): AppendBlobClient; @@ -1381,6 +1387,11 @@ export type ContainerCreateResponse = ContainerCreateHeaders & { }; }; +// @public +export interface ContainerDeleteBlobOptions extends BlobDeleteOptions { + versionId?: string; +} + // @public export interface ContainerDeleteHeaders { clientRequestId?: string; @@ -1546,6 +1557,7 @@ export interface ContainerListBlobsOptions extends CommonOptions { includeMetadata?: boolean; includeSnapshots?: boolean; includeUncommitedBlobs?: boolean; + includeVersions?: boolean; prefix?: string; } diff --git a/sdk/storage/storage-blob/src/AccountSASPermissions.ts b/sdk/storage/storage-blob/src/AccountSASPermissions.ts index f7ec597d2ac9..93f37750a782 100644 --- a/sdk/storage/storage-blob/src/AccountSASPermissions.ts +++ b/sdk/storage/storage-blob/src/AccountSASPermissions.ts @@ -36,6 +36,9 @@ export class AccountSASPermissions { case "d": accountSASPermissions.delete = true; break; + case "x": + accountSASPermissions.deleteVersion = true; + break; case "l": accountSASPermissions.list = true; break; @@ -83,6 +86,14 @@ export class AccountSASPermissions { */ public delete: boolean = false; + /** + * Permission to delete versions granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + public deleteVersion: boolean = false; + /** * Permission to list blob containers, blobs, shares, directories, and files granted. * @@ -149,6 +160,9 @@ export class AccountSASPermissions { if (this.delete) { permissions.push("d"); } + if (this.deleteVersion) { + permissions.push("x"); + } if (this.list) { permissions.push("l"); } diff --git a/sdk/storage/storage-blob/src/BlobDownloadResponse.ts b/sdk/storage/storage-blob/src/BlobDownloadResponse.ts index 05ff11a329ed..1f11f951f733 100644 --- a/sdk/storage/storage-blob/src/BlobDownloadResponse.ts +++ b/sdk/storage/storage-blob/src/BlobDownloadResponse.ts @@ -413,7 +413,7 @@ export class BlobDownloadResponse implements BlobDownloadResponseModel { } /** - * Indicates the version of the File service used + * Indicates the version of the Blob service used * to execute the request. * * @readonly @@ -424,6 +424,17 @@ export class BlobDownloadResponse implements BlobDownloadResponseModel { return this.originalResponse.version; } + /** + * Indicates the versionId of the downloaded blob version. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobDownloadResponse + */ + public get versionId(): string | undefined { + return this.originalResponse.versionId; + } + /** * The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned * when the blob was encrypted with a customer-provided key. diff --git a/sdk/storage/storage-blob/src/BlobSASPermissions.ts b/sdk/storage/storage-blob/src/BlobSASPermissions.ts index 2df60e1af0b7..792577c496e1 100644 --- a/sdk/storage/storage-blob/src/BlobSASPermissions.ts +++ b/sdk/storage/storage-blob/src/BlobSASPermissions.ts @@ -43,6 +43,9 @@ export class BlobSASPermissions { case "d": blobSASPermissions.delete = true; break; + case "x": + blobSASPermissions.deleteVersion = true; + break; default: throw new RangeError(`Invalid permission: ${char}`); } @@ -91,6 +94,14 @@ export class BlobSASPermissions { */ public delete: boolean = false; + /** + * Specifies Delete version access granted. + * + * @type {boolean} + * @memberof BlobSASPermissions + */ + public deleteVersion: boolean = false; + /** * Converts the given permissions to a string. Using this method will guarantee the permissions are in an * order accepted by the service. @@ -115,6 +126,9 @@ export class BlobSASPermissions { if (this.delete) { permissions.push("d"); } + if (this.deleteVersion) { + permissions.push("x"); + } return permissions.join(""); } } diff --git a/sdk/storage/storage-blob/src/BlobSASSignatureValues.ts b/sdk/storage/storage-blob/src/BlobSASSignatureValues.ts index 06823403a832..c9970f3be8b7 100644 --- a/sdk/storage/storage-blob/src/BlobSASSignatureValues.ts +++ b/sdk/storage/storage-blob/src/BlobSASSignatureValues.ts @@ -59,10 +59,10 @@ export interface BlobSASSignatureValues { * Please refer to either {@link ContainerSASPermissions} or {@link BlobSASPermissions} depending on the resource * being accessed for help constructing the permissions string. * - * @type {BlobSASPermissions} + * @type {BlobSASPermissions | ContainerSASPermissions} * @memberof BlobSASSignatureValues */ - permissions?: BlobSASPermissions; + permissions?: BlobSASPermissions | ContainerSASPermissions; /** * Optional. IP ranges allowed in this SAS. @@ -81,7 +81,7 @@ export interface BlobSASSignatureValues { containerName: string; /** - * Optional. The blob name of the SAS user may access. Required if snapshotTime is provided. + * Optional. The blob name of the SAS user may access. Required if snapshotTime or versionId is provided. * * @type {string} * @memberof BlobSASSignatureValues @@ -92,10 +92,18 @@ export interface BlobSASSignatureValues { * Optional. Snapshot timestamp string the SAS user may access. Only supported from API version 2018-11-09. * * @type {string} - * @memberof IBlobSASSignatureValues + * @memberof BlobSASSignatureValues */ snapshotTime?: string; + /** + * Optional. VersionId of the blob version the SAS user may access. Only supported from API version 2019-10-10. + * + * @type {string} + * @memberof BlobSASSignatureValues + */ + versionId?: string; + /** * Optional. The name of the access policy on the container this SAS references if any. * @@ -362,6 +370,10 @@ function generateBlobSASQueryParameters20150405( throw RangeError("'version' must be >= '2018-11-09' when provided 'snapshotTime'."); } + if (blobSASSignatureValues.versionId) { + throw RangeError("'version' must be >= '2019-10-10' when provided 'versionId'."); + } + if (blobSASSignatureValues.blobName) { resource = "b"; } @@ -464,10 +476,18 @@ function generateBlobSASQueryParameters20181109( throw RangeError("Must provide 'blobName' when provided 'snapshotTime'."); } + if (blobSASSignatureValues.blobName === undefined && blobSASSignatureValues.versionId) { + throw RangeError("Must provide 'blobName' when provided 'versionId'."); + } + + let timestamp = blobSASSignatureValues.snapshotTime; if (blobSASSignatureValues.blobName) { resource = "b"; if (blobSASSignatureValues.snapshotTime) { resource = "bs"; + } else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp = blobSASSignatureValues.versionId; } } @@ -503,7 +523,7 @@ function generateBlobSASQueryParameters20181109( blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", version, resource, - blobSASSignatureValues.snapshotTime, + timestamp, blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", @@ -566,10 +586,18 @@ function generateBlobSASQueryParametersUDK20181109( throw RangeError("Must provide 'blobName' when provided 'snapshotTime'."); } + if (blobSASSignatureValues.blobName === undefined && blobSASSignatureValues.versionId) { + throw RangeError("Must provide 'blobName' when provided 'versionId'."); + } + + let timestamp = blobSASSignatureValues.snapshotTime; if (blobSASSignatureValues.blobName) { resource = "b"; if (blobSASSignatureValues.snapshotTime) { resource = "bs"; + } else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp = blobSASSignatureValues.versionId; } } @@ -614,7 +642,7 @@ function generateBlobSASQueryParametersUDK20181109( blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", version, resource, - blobSASSignatureValues.snapshotTime, + timestamp, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, diff --git a/sdk/storage/storage-blob/src/Clients.ts b/sdk/storage/storage-blob/src/Clients.ts index 68d1d7b4faf6..0e3df04274d5 100644 --- a/sdk/storage/storage-blob/src/Clients.ts +++ b/sdk/storage/storage-blob/src/Clients.ts @@ -285,6 +285,13 @@ export interface BlobExistsOptions extends CommonOptions { * @memberof BlobExistsOptions */ customerProvidedKey?: CpkInfo; + /** + * Conditions to meet. + * + * @type {BlobRequestConditions} + * @memberof BlobExistsOptions + */ + conditions?: BlobRequestConditions; } /** @@ -846,6 +853,13 @@ export interface BlobDownloadToBufferOptions extends CommonOptions { * @memberof BlobDownloadToBufferOptions */ concurrency?: number; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof BlobDownloadToBufferOptions + */ + customerProvidedKey?: CpkInfo; } /** @@ -1047,6 +1061,25 @@ export class BlobClient extends StorageClient { ); } + /** + * Creates a new BlobClient object pointing to a version of this blob. + * Provide "" will remove the versionId and return a Client to the base blob. + * + * @param {string} versionId The versionId. + * @returns {BlobClient} A new BlobClient object pointing to the version of this blob. + * @memberof BlobClient + */ + public withVersion(versionId: string): BlobClient { + return new BlobClient( + setURLParameter( + this.url, + URLConstants.Parameters.VERSIONID, + versionId.length === 0 ? undefined : versionId + ), + this.pipeline + ); + } + /** * Creates a AppendBlobClient object. * @@ -1257,6 +1290,7 @@ export class BlobClient extends StorageClient { await this.getProperties({ abortSignal: options.abortSignal, customerProvidedKey: options.customerProvidedKey, + conditions: options.conditions, tracingOptions: { ...options.tracingOptions, spanOptions @@ -1859,6 +1893,7 @@ export class BlobClient extends StorageClient { abortSignal: options.abortSignal, conditions: options.conditions, maxRetryRequests: options.maxRetryRequestsPerBlock, + customerProvidedKey: options.customerProvidedKey, tracingOptions: { ...options.tracingOptions, spanOptions @@ -5839,6 +5874,23 @@ export interface ContainerChangeLeaseOptions extends CommonOptions { conditions?: ModifiedAccessConditions; } +/** + * Options to configure the {@link ContainerClient.deleteBlob} operation. + * + * @export + * @interface ContainerDeleteBlobOptions + */ +export interface ContainerDeleteBlobOptions extends BlobDeleteOptions { + /** + * An opaque DateTime value that, when present, specifies the version + * of the blob to delete. It's for service version 2019-10-10 and newer. + * + * @type {string} + * @memberof ContainerDeleteBlobOptions + */ + versionId?: string; +} + /** * Options to configure Container - List Segment operations. * @@ -5920,9 +5972,13 @@ export interface ContainerListBlobsOptions extends CommonOptions { */ includeMetadata?: boolean; /** - * Specifies whether snapshots should be included in the enumeration. Snapshots are listed from oldest to newest in the response + * Specifies whether snapshots should be included in the enumeration. Snapshots are listed from oldest to newest in the response. */ includeSnapshots?: boolean; + /** + * Specifies whether versions should be included in the enumeration. Versions are listed from oldest to newest in the response. + */ + includeVersions?: boolean; /** * Specifies whether blobs for which blocks have been uploaded, but which have not been committed using Put Block List, be included in the response. */ @@ -6578,17 +6634,20 @@ export class ContainerClient extends StorageClient { * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob * * @param {string} blobName - * @param {BlobDeleteOptions} [options] Options to Blob Delete operation. + * @param {ContainerDeleteBlobOptions} [options] Options to Blob Delete operation. * @returns {Promise} Block blob deletion response data. * @memberof ContainerClient */ public async deleteBlob( blobName: string, - options: BlobDeleteOptions = {} + options: ContainerDeleteBlobOptions = {} ): Promise { const { span, spanOptions } = createSpan("ContainerClient-deleteBlob", options.tracingOptions); try { - const blobClient = this.getBlobClient(blobName); + let blobClient = this.getBlobClient(blobName); + if (options.versionId) { + blobClient = blobClient.withVersion(options.versionId); + } return await blobClient.delete({ ...options, tracingOptions: { ...options!.tracingOptions, spanOptions } @@ -6813,6 +6872,9 @@ export class ContainerClient extends StorageClient { if (options.includeSnapshots) { include.push("snapshots"); } + if (options.includeVersions) { + include.push("versions"); + } if (options.includeUncommitedBlobs) { include.push("uncommittedblobs"); } @@ -7018,6 +7080,9 @@ export class ContainerClient extends StorageClient { if (options.includeSnapshots) { include.push("snapshots"); } + if (options.includeVersions) { + include.push("versions"); + } if (options.includeUncommitedBlobs) { include.push("uncommittedblobs"); } diff --git a/sdk/storage/storage-blob/src/generated/src/storageClientContext.ts b/sdk/storage/storage-blob/src/generated/src/storageClientContext.ts index 31b47553f19f..ab75cb1cbbf6 100644 --- a/sdk/storage/storage-blob/src/generated/src/storageClientContext.ts +++ b/sdk/storage/storage-blob/src/generated/src/storageClientContext.ts @@ -11,7 +11,7 @@ import * as coreHttp from "@azure/core-http"; const packageName = "azure-storage-blob"; -const packageVersion = "12.1.2"; +const packageVersion = "12.2.0-preview.1"; export class StorageClientContext extends coreHttp.ServiceClient { url: string; diff --git a/sdk/storage/storage-blob/src/utils/constants.ts b/sdk/storage/storage-blob/src/utils/constants.ts index 59c91c9bbcd8..0832f777fccd 100644 --- a/sdk/storage/storage-blob/src/utils/constants.ts +++ b/sdk/storage/storage-blob/src/utils/constants.ts @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -export const SDK_VERSION: string = "12.1.2"; -export const SERVICE_VERSION: string = "2019-07-07"; +export const SDK_VERSION: string = "12.2.0-preview"; +export const SERVICE_VERSION: string = "2019-12-12"; export const BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES: number = 256 * 1024 * 1024; // 256MB export const BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES: number = 100 * 1024 * 1024; // 100MB @@ -20,6 +20,7 @@ export const URLConstants = { FORCE_BROWSER_NO_CACHE: "_", SIGNATURE: "sig", SNAPSHOT: "snapshot", + VERSIONID: "versionid", TIMEOUT: "timeout" } }; diff --git a/sdk/storage/storage-blob/test/blobclient.spec.ts b/sdk/storage/storage-blob/test/blobclient.spec.ts index 0ba700f1af4c..faf6b862b9c6 100644 --- a/sdk/storage/storage-blob/test/blobclient.spec.ts +++ b/sdk/storage/storage-blob/test/blobclient.spec.ts @@ -8,7 +8,8 @@ import { bodyToString, getBSU, getSASConnectionStringFromEnvironment, - recorderEnvSetup + recorderEnvSetup, + isBlobVersioningDisabled, } from "./utils"; import { record, delay } from "@azure/test-utils-recorder"; import { @@ -252,7 +253,8 @@ describe("BlobClient", () => { const iter = containerClient .listBlobsFlat({ - includeDeleted: true + includeDeleted: true, + includeVersions: true, // Need this when blob versioning is turned on. }) .byPage({ maxPageSize: 1 }); @@ -276,7 +278,7 @@ describe("BlobClient", () => { assert.ok( result.segment.blobItems, - "Expect non empty result from list blobs({ includeDeleted: true }) with page size of 1." + "Expect non empty result from list blobs({ includeDeleted: true, includeVersions: true }) with page size of 1." ); assert.equal( @@ -290,13 +292,16 @@ describe("BlobClient", () => { "Expect a valid element in result array from list blobs({ includeDeleted: true }) with page size of 1." ); - assert.ok(result.segment.blobItems![0].deleted, "Expect that the blob is marked for deletion"); + if (isBlobVersioningDisabled()) { + assert.ok(result.segment.blobItems![0].deleted, "Expect that the blob is marked for deletion"); + } await blobClient.undelete(); const iter2 = containerClient .listBlobsFlat({ - includeDeleted: true + includeDeleted: true, + includeVersions: true, // Need this when blob versioning is turned on. }) .byPage(); diff --git a/sdk/storage/storage-blob/test/blobversioning.spec.ts b/sdk/storage/storage-blob/test/blobversioning.spec.ts new file mode 100644 index 000000000000..72236c7a6d20 --- /dev/null +++ b/sdk/storage/storage-blob/test/blobversioning.spec.ts @@ -0,0 +1,430 @@ +import * as assert from "assert"; +import * as dotenv from "dotenv"; +import * as fs from "fs"; +import { isNode, delay } from "@azure/core-http"; +import { + getBSU, + recorderEnvSetup, + bodyToString, + getGenericCredential, + isBlobVersioningDisabled, +} from "./utils"; +import { record, Recorder } from "@azure/test-utils-recorder"; +import { + ContainerClient, + BlobServiceClient, + BlobClient, + BlockBlobClient, + BlockBlobUploadResponse, + BlobBatch, +} from "../src"; +import { + setURLParameter, +} from "../src/utils/utils.common"; +import { Test_CPK_INFO } from "./utils/constants"; +dotenv.config({ path: "../.env" }); + +describe("Blob versioning", () => { + let blobServiceClient: BlobServiceClient; + let containerName: string; + let containerClient: ContainerClient; + let blobName: string; + let blobClient: BlobClient; + let blockBlobClient: BlockBlobClient; + let uploadRes: BlockBlobUploadResponse; + let uploadRes2: BlockBlobUploadResponse; + const content = "Hello World"; + + let recorder: Recorder; + + before(async function () { + if (isBlobVersioningDisabled()) { + this.skip(); + } + }); + + beforeEach(async function () { + recorder = record(this, recorderEnvSetup); + blobServiceClient = getBSU(); + containerName = recorder.getUniqueName("container"); + containerClient = blobServiceClient.getContainerClient(containerName); + await containerClient.create(); + blobName = recorder.getUniqueName("blob"); + blobClient = containerClient.getBlobClient(blobName); + blockBlobClient = blobClient.getBlockBlobClient(); + uploadRes = await blockBlobClient.upload(content, content.length); + uploadRes2 = await blockBlobClient.upload("", 0); + }); + + afterEach(async function () { + await containerClient.delete(); + recorder.stop(); + }); + + it("List Blobs include versions", async () => { + const blobClients = []; + blobClients.push(blobClient); + + const prefix = "blockblob"; + for (let i = 0; i < 2; i++) { + const tmpBlobClient = containerClient.getBlobClient(recorder.getUniqueName(`${prefix}/${i}`)); + const tmpBlockBlobClient = tmpBlobClient.getBlockBlobClient(); + await tmpBlockBlobClient.upload("", 0); + blobClients.push(tmpBlobClient); + } + + const result = ( + await containerClient + .listBlobsFlat({ + includeVersions: true, + }) + .byPage() + .next() + ).value; + + assert.equal(result.segment.blobItems!.length, 4); + assert.equal(result.segment.blobItems![0].versionId, uploadRes.versionId); + assert.equal(result.segment.blobItems![1].versionId, uploadRes2.versionId); + assert.ok(result.segment.blobItems![1].isCurrentVersion); + }); + + it("download a blob version", async () => { + const blobVersionClient = blobClient.withVersion(uploadRes.versionId!); + const downloadRes = await blobVersionClient.download(); + assert.deepStrictEqual(await bodyToString(downloadRes, content.length), content); + assert.deepStrictEqual(downloadRes.versionId, uploadRes.versionId); + + + const downloadRes2 = await blobClient.withVersion(uploadRes2.versionId!).download(); + assert.deepStrictEqual(await bodyToString(downloadRes2), ""); + assert.deepStrictEqual(downloadRes2.versionId, uploadRes2.versionId); + + if (isNode) { + const downloadToBufferRes = await blobVersionClient.downloadToBuffer(); + assert.ok(downloadToBufferRes.equals(Buffer.from(content))); + } + }); + + it("download a version to file", async function () { + if (!isNode) { this.skip(); } + recorder.skip("node", "Temp file - recorder doesn't support saving the file"); + const downloadedFilePath = recorder.getUniqueName("downloadedtofile"); + await blobClient.withVersion(uploadRes.versionId!).downloadToFile(downloadedFilePath); + const downloadedFileContent = fs.readFileSync(downloadedFilePath); + assert.ok(downloadedFileContent.equals(Buffer.from(downloadedFileContent))); + fs.unlinkSync(downloadedFilePath); + }); + + it("get properties of a blob version", async () => { + const blobVersionClient = blobClient.withVersion(uploadRes.versionId!); + const getRes = await blobVersionClient.getProperties(); + assert.equal(getRes.contentLength, content.length); + assert.equal(getRes.versionId, uploadRes.versionId); + assert.ok(!getRes.isCurrentVersion); + + const getRes2 = await blobClient.getProperties(); + assert.equal(getRes2.contentLength, 0); + assert.equal(getRes2.versionId, uploadRes2.versionId); + assert.ok(getRes2.isCurrentVersion); + + // specify both snapshot and versionId + const snapshotRes = await blobClient.createSnapshot(); + let exceptionCaught = false; + try { + await blobVersionClient.withSnapshot(snapshotRes.snapshot!).getProperties(); + } catch (err) { + assert.equal(err.details.errorCode, "MutuallyExclusiveQueryParameters"); + exceptionCaught = true; + } + assert.ok(exceptionCaught); + + const existRes = await blobVersionClient.exists(); + assert.ok(existRes); + }); + + it("delete a version", async () => { + const blobVersionClient = blobClient.withVersion(uploadRes.versionId!); + await blobVersionClient.delete(); + + const versionExists = await blobVersionClient.exists(); + assert.ok(!versionExists); + + const rootExists = await blobClient.exists(); + assert.ok(rootExists); + }); + + it("deleteBlobs should work for batch delete", async () => { + recorder.skip( + undefined, + "UUID is randomly generated within the SDK and used in the HTTP request and cannot be preserved." + ); + const blockBlobCount = 3; + let blockBlobClients: BlockBlobClient[] = new Array(blockBlobCount); + let versions: string[] = new Array(blockBlobCount); + for (let i = 0; i < blockBlobCount; i++) { + let tmpBlobName = `blob${i}`; + let tmpBlockBlobClient = containerClient.getBlockBlobClient(tmpBlobName); + blockBlobClients[i] = tmpBlockBlobClient; + } + // Upload blobs. + for (let i = 0; i < blockBlobCount; i++) { + const tmpRes = await blockBlobClients[i].upload("", 0); + versions[i] = tmpRes.versionId!; + await blockBlobClients[i].upload(content, content.length); + } + + // Assemble batch delete request. + const blobBatchClient = blobServiceClient.getBlobBatchClient(); + const credential = getGenericCredential(""); + let batchDeleteRequest = new BlobBatch(); + for (let i = 0; i < blockBlobCount; i++) { + await batchDeleteRequest.deleteBlob(blockBlobClients[i].withVersion(versions[i]!).url, credential); + } + + // Submit batch request and verify response. + const resp = await blobBatchClient.submitBatch(batchDeleteRequest, {}); + + assert.equal(resp.subResponses.length, blockBlobCount); + assert.equal(resp.subResponsesSucceededCount, blockBlobCount); + assert.equal(resp.subResponsesFailedCount, 0); + + for (let i = 0; i < blockBlobCount; i++) { + assert.equal(resp.subResponses[i].errorCode, undefined); + assert.equal(resp.subResponses[i].status, 202); + assert.ok(resp.subResponses[i].statusMessage != ""); + assert.ok(resp.subResponses[i].headers.contains("x-ms-request-id")); + assert.equal(resp.subResponses[i]._request.url, blockBlobClients[i].withVersion(versions[i]!).url); + } + + // Verify blob versions deleted. + const resp2 = ( + await containerClient + .listBlobsFlat({ + includeVersions: true, + }) + .byPage() + .next() + ).value; + assert.equal(resp2.segment.blobItems.length, 2 + blockBlobCount); + }); + + it("deleting root blob with versionId should fail", async () => { + await containerClient.deleteBlob(blobName, { + versionId: uploadRes.versionId, + }); + const versionExists = await blobClient.withVersion(uploadRes.versionId!).exists(); + assert.ok(!versionExists); + + let exceptionCaught: boolean = false; + try { + await containerClient.deleteBlob(blobName, { + versionId: uploadRes2.versionId, + }); + } catch (err) { + assert.equal(err.details.errorCode, "OperationNotAllowedOnRootBlob"); + exceptionCaught = true; + } + assert.ok(exceptionCaught); + }); + + it("delete a snapshot", async () => { + const result = await blobClient.createSnapshot(); + assert.ok(result.snapshot); + assert.ok(result.versionId); + + const snapshotClient = blobClient.withSnapshot(result.snapshot!); + await snapshotClient.delete(); + const snapshotExists = await snapshotClient.exists(); + assert.ok(!snapshotExists); + + const rootExists = await blobClient.exists(); + assert.ok(rootExists); + }); + + it("deleting a blob that has snapshots needs deleteSnapshots option", async () => { + const result = await blobClient.createSnapshot(); + assert.ok(result.snapshot); + + let exceptionCaught: boolean = false; + try { + await blobClient.delete(); + } catch (err) { + assert.equal(err.details.errorCode, "SnapshotsPresent"); + exceptionCaught = true; + } + assert.ok(exceptionCaught); + + blobClient.delete({ deleteSnapshots: "include" }); + const snapshotExists = await blobClient.withSnapshot(result.snapshot!).exists(); + assert.ok(!snapshotExists); + const rootExists = await blobClient.exists(); + assert.ok(!rootExists); + }); + + it("deleting a blob with both deleteSnapshots and versionId option should fail", async () => { + const result = await blobClient.createSnapshot(); + assert.ok(result.snapshot); + + let exceptionCaught: boolean = false; + const blobVersionClient = blobClient.withVersion(uploadRes.versionId!); + try { + await blobVersionClient.delete({ deleteSnapshots: "include" }); + } catch (err) { + assert.equal(err.details.errorCode, "InvalidQueryParameterValue"); + exceptionCaught = true; + } + assert.ok(exceptionCaught); + + let exceptionCaught2 = false; + const blobVersionClient2 = blobClient.withVersion(uploadRes2.versionId!); + try { + await blobVersionClient2.delete({ deleteSnapshots: "only" }); + } catch (err) { + assert.equal(err.details.errorCode, "InvalidQueryParameterValue"); + exceptionCaught2 = true; + } + assert.ok(exceptionCaught2); + }); + + it("deleting a versioned blob without extra parameters should succeed", async () => { + await blobClient.delete(); + + const rootExists = await blobClient.exists(); + assert.ok(!rootExists); + + const versionExists = await blobClient.withVersion(uploadRes.versionId!).exists(); + assert.ok(versionExists); + }); + + it("promote a version: as the copy source", async () => { + const blobVersionClient = blobClient.withVersion(uploadRes.versionId!); + await blobVersionClient.getProperties(); + + const versionURL = setURLParameter(blobClient.url, "versionid", uploadRes.versionId); + const copyRes = await (await blobClient.beginCopyFromURL(versionURL)).pollUntilDone(); + assert.ok(copyRes.copyId); + + const listRes = ( + await containerClient + .listBlobsFlat({ + includeVersions: true, + }) + .byPage() + .next() + ).value; + + const blobItemsLength = listRes.segment.blobItems!.length; + assert.equal(blobItemsLength, 3); + assert.equal(listRes.segment.blobItems![blobItemsLength - 1].versionId, copyRes.versionId); + assert.ok(listRes.segment.blobItems![blobItemsLength - 1].isCurrentVersion); + + const downloadRes = await blobClient.download(); + assert.deepStrictEqual(await bodyToString(downloadRes, content.length), content); + }); + + it("blob create return versionId", async () => { + const appendBlobName = recorder.getUniqueName("appendblob"); + const appendBlobClient = containerClient.getBlobClient(appendBlobName).getAppendBlobClient(); + const appendCreateRes = await appendBlobClient.create(); + assert.ok(appendCreateRes.versionId); + + const pageBlobName = recorder.getUniqueName("pageblob"); + const pageBlobClient = containerClient.getBlobClient(pageBlobName).getAppendBlobClient(); + const pageCreateRes = await pageBlobClient.create(); + assert.ok(pageCreateRes.versionId); + }); + + it("upload block blob return versionId", async () => { + const containerUploadRes = await containerClient.uploadBlockBlob(blobName, content, content.length); + assert.ok(containerUploadRes.response.versionId); + + if (!isNode) { + const uploadBrowserDataRes = await blockBlobClient.uploadBrowserData(new Blob([content])); + assert.ok(uploadBrowserDataRes.versionId); + } + }); + + it("asynchorous copy return versionId", async () => { + const newBlobClient = containerClient.getBlobClient(recorder.getUniqueName("copiedblob")); + const result = await (await newBlobClient.beginCopyFromURL(blobClient.url)).pollUntilDone(); + assert.ok(result.versionId); + }); + + it("setMetaData", async () => { + const metadata = { + keya: "a", + keyb: "c" + }; + const setMetaRes = await blobClient.setMetadata(metadata); + assert.ok(setMetaRes.versionId); + }); + + it("undelete a soft-deleted version", async () => { + let properties = await blobServiceClient.getProperties(); + if (!properties.deleteRetentionPolicy!.enabled) { + await blobServiceClient.setProperties({ + deleteRetentionPolicy: { + days: 7, + enabled: true + } + }); + await delay(30 * 1000); + properties = await blobServiceClient.getProperties(); + assert.ok(properties.deleteRetentionPolicy!.enabled, "deleteRetentionPolicy should be enabled."); + } + + const blobVersionClient = blobClient.withVersion(uploadRes.versionId!); + await blobVersionClient.delete(); + assert.ok(!(await blobVersionClient.exists())); + + await blobClient.undelete(); + assert.ok(await blobVersionClient.exists()); + }); + + it("downloadToBuffer with CPK", async () => { + const CPKblobName = recorder.getUniqueName("blobCPK"); + const CPKblobClient = containerClient.getBlobClient(CPKblobName); + const CPKblockBlobClient = CPKblobClient.getBlockBlobClient(); + await CPKblockBlobClient.upload(content, content.length, { + customerProvidedKey: Test_CPK_INFO, + }); + + if (isNode) { + const downloadToBufferRes = await CPKblockBlobClient.downloadToBuffer(undefined, undefined, { + customerProvidedKey: Test_CPK_INFO, + }); + assert.ok(downloadToBufferRes.equals(Buffer.from(content))); + + let exceptionCaught = false; + try { + await CPKblobClient.downloadToBuffer(); + } catch (err) { + assert.equal(err.details.errorCode, "BlobUsesCustomerSpecifiedEncryption"); + exceptionCaught = true; + } + assert.ok(exceptionCaught); + } + }); + + it("exists with condition", async () => { + const leaseResp = await blobClient.getBlobLeaseClient().acquireLease(30); + assert.ok(leaseResp.leaseId); + + assert.ok(await blobClient.exists({ conditions: { leaseId: leaseResp.leaseId! } })); + + let exceptionCaught = false; + try { + let guid = "ca761232ed4211cebacd00aa0057b223"; + if (guid === leaseResp.leaseId) { + guid = "ca761232ed4211cebacd00aa0057b224"; + } + + const existsRes = await blobClient.exists({ conditions: { leaseId: guid } }); + console.log(existsRes); + } catch (err) { + assert.equal(err.details.errorCode, "LeaseIdMismatchWithBlobOperation"); + exceptionCaught = true; + } + assert.ok(exceptionCaught); + }); +}); diff --git a/sdk/storage/storage-blob/test/encrytion.spec.ts b/sdk/storage/storage-blob/test/encrytion.spec.ts index bbfef4f2f3ce..7af582f2f8af 100644 --- a/sdk/storage/storage-blob/test/encrytion.spec.ts +++ b/sdk/storage/storage-blob/test/encrytion.spec.ts @@ -31,7 +31,7 @@ describe("Encryption Scope", function() { let recorder: any; - before(function() { + before(async function() { if (!encryptionScopeName1 || !encryptionScopeName2) { this.skip(); } diff --git a/sdk/storage/storage-blob/test/node/blobclient.spec.ts b/sdk/storage/storage-blob/test/node/blobclient.spec.ts index 483530b83806..929d1dd52e50 100644 --- a/sdk/storage/storage-blob/test/node/blobclient.spec.ts +++ b/sdk/storage/storage-blob/test/node/blobclient.spec.ts @@ -22,7 +22,8 @@ import { createRandomLocalFile, getBSU, getConnectionStringFromEnvironment, - recorderEnvSetup + recorderEnvSetup, + isBlobVersioningDisabled, } from "../utils"; import { assertClientUsesTokenCredential } from "../utils/assert"; import { readStreamToLocalFileWithLogs } from "../utils/testutils.node"; @@ -41,7 +42,7 @@ describe("BlobClient Node.js only", () => { let recorder: any; let blobServiceClient: BlobServiceClient; - beforeEach(async function() { + beforeEach(async function () { recorder = record(this, recorderEnvSetup); blobServiceClient = getBSU(); containerName = recorder.getUniqueName("container"); @@ -53,7 +54,7 @@ describe("BlobClient Node.js only", () => { await blockBlobClient.upload(content, content.length); }); - afterEach(async function() { + afterEach(async function () { await containerClient.delete(); recorder.stop(); }); @@ -216,6 +217,7 @@ describe("BlobClient Node.js only", () => { const copyURL = blobClient.url + "?" + sas; const result = await newBlobClient.syncCopyFromURL(copyURL); + assert.ok(isBlobVersioningDisabled() || result.versionId); const properties1 = await blobClient.getProperties(); const properties2 = await newBlobClient.getProperties(); diff --git a/sdk/storage/storage-blob/test/node/highlevel.node.spec.ts b/sdk/storage/storage-blob/test/node/highlevel.node.spec.ts index 7f938aef0e4b..1c981ce4e18a 100644 --- a/sdk/storage/storage-blob/test/node/highlevel.node.spec.ts +++ b/sdk/storage/storage-blob/test/node/highlevel.node.spec.ts @@ -4,7 +4,7 @@ import * as path from "path"; import { PassThrough } from "stream"; import { AbortController } from "@azure/abort-controller"; -import { createRandomLocalFile, getBSU, recorderEnvSetup } from "../utils"; +import { createRandomLocalFile, getBSU, recorderEnvSetup, isBlobVersioningDisabled } from "../utils"; import { RetriableReadableStreamOptions } from "../../src/utils/RetriableReadableStream"; import { record, Recorder } from "@azure/test-utils-recorder"; import { ContainerClient, BlobClient, BlockBlobClient, BlobServiceClient } from "../../src"; @@ -27,7 +27,7 @@ describe("Highlevel", () => { let recorder: Recorder; let blobServiceClient: BlobServiceClient; - beforeEach(async function() { + beforeEach(async function () { recorder = record(this, recorderEnvSetup); blobServiceClient = getBSU(); containerName = recorder.getUniqueName("container"); @@ -45,7 +45,7 @@ describe("Highlevel", () => { } }); - before(async function() { + before(async function () { recorder = record(this, recorderEnvSetup); if (!fs.existsSync(tempFolderPath)) { fs.mkdirSync(tempFolderPath); @@ -57,7 +57,7 @@ describe("Highlevel", () => { recorder.stop(); }); - after(async function() { + after(async function () { recorder = record(this, recorderEnvSetup); fs.unlinkSync(tempFileLarge); fs.unlinkSync(tempFileSmall); @@ -166,7 +166,7 @@ describe("Highlevel", () => { aborter.abort(); } }); - } catch (err) {} + } catch (err) { } assert.ok(eventTriggered); }); @@ -189,7 +189,7 @@ describe("Highlevel", () => { aborter.abort(); } }); - } catch (err) {} + } catch (err) { } assert.ok(eventTriggered); }); @@ -216,7 +216,8 @@ describe("Highlevel", () => { const bufferStream = new PassThrough(); bufferStream.end(buf); - await blockBlobClient.uploadStream(bufferStream, 4 * 1024 * 1024, 20); + const uploadStreamRes = await blockBlobClient.uploadStream(bufferStream, 4 * 1024 * 1024, 20); + assert.ok(isBlobVersioningDisabled() || uploadStreamRes.versionId); const downloadResponse = await blockBlobClient.download(0); @@ -373,7 +374,7 @@ describe("Highlevel", () => { aborter.abort(); } }); - } catch (err) {} + } catch (err) { } assert.ok(eventTriggered); }); diff --git a/sdk/storage/storage-blob/test/node/sas.spec.ts b/sdk/storage/storage-blob/test/node/sas.spec.ts index 4f7ae933590f..c9b9fb30ce46 100644 --- a/sdk/storage/storage-blob/test/node/sas.spec.ts +++ b/sdk/storage/storage-blob/test/node/sas.spec.ts @@ -13,10 +13,11 @@ import { PageBlobClient, BlobServiceClient, StorageSharedKeyCredential, - newPipeline + newPipeline, + BlobClient } from "../../src"; import { SASProtocol } from "../../src/SASQueryParameters"; -import { getBSU, getTokenBSU, recorderEnvSetup } from "../utils"; +import { getBSU, getTokenBSU, recorderEnvSetup, isBlobVersioningDisabled } from "../utils"; import { delay, record } from "@azure/test-utils-recorder"; import { SERVICE_VERSION } from "../../src/utils/constants"; @@ -800,4 +801,157 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => { await containerClient.delete(); }); + + it("generateAccountSASQueryParameters should work for blob version delete", async function () { + if (isBlobVersioningDisabled()) { this.skip(); } + + // create versions + const containerName = recorder.getUniqueName("container"); + const containerClient = blobServiceClient.getContainerClient(containerName); + await containerClient.create(); + const content = "Hello World"; + const blobName = recorder.getUniqueName("blob"); + const blobClient = containerClient.getBlobClient(blobName); + const blockBlobClient = blobClient.getBlockBlobClient(); + const uploadRes = await blockBlobClient.upload(content, content.length); + await blockBlobClient.upload("", 0); + + // generate SAS + const now = new Date(); + now.setMinutes(now.getMinutes() - 5); // Skip clock skew with server + const future = new Date(); + future.setDate(future.getDate() + 1000); + + const sas = generateAccountSASQueryParameters( + { + expiresOn: future, + ipRange: { start: "0.0.0.0", end: "255.255.255.255" }, + permissions: AccountSASPermissions.parse("rwdlacupx"), + protocol: SASProtocol.HttpsAndHttp, + resourceTypes: AccountSASResourceTypes.parse("sco").toString(), + services: AccountSASServices.parse("btqf").toString(), + startsOn: now, + version: "2019-10-10" + }, + blobServiceClient.credential as StorageSharedKeyCredential + ).toString(); + + const sasClient = `${blobServiceClient.url}?${sas}`; + const serviceClientWithSAS = new BlobServiceClient( + sasClient, + newPipeline(new AnonymousCredential()) + ); + const containerClientwithSAS = serviceClientWithSAS.getContainerClient(containerName); + await containerClientwithSAS.deleteBlob(blobName, { versionId: uploadRes.versionId }); + await containerClientwithSAS.delete(); + }); + + it("generateBlobSASQueryParameters should work for blob version delete", async function () { + if (isBlobVersioningDisabled()) { this.skip(); } + + // create versions + const containerName = recorder.getUniqueName("container"); + const containerClient = blobServiceClient.getContainerClient(containerName); + await containerClient.create(); + const content = "Hello World"; + const blobName = recorder.getUniqueName("blob"); + const blobClient = containerClient.getBlobClient(blobName); + const blockBlobClient = blobClient.getBlockBlobClient(); + const uploadRes = await blockBlobClient.upload(content, content.length); + await blockBlobClient.upload("", 0); + + // generate SAS + const now = recorder.newDate("now"); + now.setMinutes(now.getMinutes() - 5); // Skip clock skew with server + const tmr = recorder.newDate("tmr"); + tmr.setDate(tmr.getDate() + 1); + + // By default, credential is always the last element of pipeline factories + const factories = (blobServiceClient as any).pipeline.factories; + const sharedKeyCredential = factories[factories.length - 1]; + + const blobSAS = generateBlobSASQueryParameters( + { + blobName: blobClient.name, + containerName: blobClient.containerName, + startsOn: now, + expiresOn: tmr, + ipRange: { start: "0.0.0.0", end: "255.255.255.255" }, + permissions: BlobSASPermissions.parse("racwdx"), + protocol: SASProtocol.HttpsAndHttp, + versionId: uploadRes.versionId, + }, + sharedKeyCredential as StorageSharedKeyCredential + ); + + const sasURL = `${blobClient.withVersion(uploadRes.versionId!).url}&${blobSAS}`; + const blobClientWithSAS = new BlobClient(sasURL, newPipeline(new AnonymousCredential())); + await blobClientWithSAS.delete(); + assert.ok(!(await blobClientWithSAS.exists())); + + await containerClient.delete(); + }); + + // TODO: prepare ACCOUNT_TOKEN for the test account + it.skip("GenerateUserDelegationSAS should work for blob version delete", async function () { + if (isBlobVersioningDisabled()) { this.skip(); } + + // Try to get blobServiceClient object with TokenCredential + // when ACCOUNT_TOKEN environment variable is set + let blobServiceClientWithToken: BlobServiceClient | undefined; + try { + blobServiceClientWithToken = getTokenBSU(); + } catch { } + + // Requires bearer token for this case which cannot be generated in the runtime + // Make sure this case passed in sanity test + if (blobServiceClientWithToken === undefined) { + this.skip(); + } + + // create versions + const containerName = recorder.getUniqueName("container"); + const containerClient = blobServiceClient.getContainerClient(containerName); + await containerClient.create(); + const content = "Hello World"; + const blobName = recorder.getUniqueName("blob"); + const blobClient = containerClient.getBlobClient(blobName); + const blockBlobClient = blobClient.getBlockBlobClient(); + const uploadRes = await blockBlobClient.upload(content, content.length); + await blockBlobClient.upload("", 0); + + // generate SAS + const now = recorder.newDate("now"); + now.setMinutes(now.getMinutes() - 5); // Skip clock skew with server + const tmr = recorder.newDate("tmr"); + tmr.setDate(tmr.getDate() + 1); + + // By default, credential is always the last element of pipeline factories + const factories = (blobServiceClient as any).pipeline.factories; + const sharedKeyCredential = factories[factories.length - 1]; + const accountName = sharedKeyCredential.accountName; + const userDelegationKey = await blobServiceClientWithToken!.getUserDelegationKey(now, tmr); + + const blobSAS = generateBlobSASQueryParameters( + { + blobName: blobClient.name, + containerName: blobClient.containerName, + startsOn: now, + expiresOn: tmr, + ipRange: { start: "0.0.0.0", end: "255.255.255.255" }, + permissions: BlobSASPermissions.parse("racwdx"), + protocol: SASProtocol.HttpsAndHttp, + versionId: uploadRes.versionId, + }, + userDelegationKey, + accountName + ); + + const sasURL = `${blobClient.withVersion(uploadRes.versionId!).url}&${blobSAS}`; + const blobClientWithSAS = new BlobClient(sasURL, newPipeline(new AnonymousCredential())); + await blobClientWithSAS.delete(); + assert.ok(!(await blobClientWithSAS.exists())); + + await containerClient.delete(); + }); }); diff --git a/sdk/storage/storage-blob/test/utils/index.browser.ts b/sdk/storage/storage-blob/test/utils/index.browser.ts index 5c561accea42..68e95465f493 100644 --- a/sdk/storage/storage-blob/test/utils/index.browser.ts +++ b/sdk/storage/storage-blob/test/utils/index.browser.ts @@ -174,3 +174,8 @@ 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}`; } + +export function isBlobVersioningDisabled(): boolean { + const env = (window as any).__env__; + return !env["BLOB_VERSIONING_ENABLED"]; +} diff --git a/sdk/storage/storage-blob/test/utils/index.ts b/sdk/storage/storage-blob/test/utils/index.ts index 9102fee4d381..cfaba1a61001 100644 --- a/sdk/storage/storage-blob/test/utils/index.ts +++ b/sdk/storage/storage-blob/test/utils/index.ts @@ -232,3 +232,7 @@ export function getSASConnectionStringFromEnvironment(): string { ".file." )}/;TableEndpoint=${blobEndpoint.replace(".queue.", ".table.")}/;SharedAccessSignature=${sas}`; } + +export function isBlobVersioningDisabled(): boolean { + return !process.env.BLOB_VERSIONING_ENABLED; +} From 5deb5f56526e0d33507a4891cb64142125a25a98 Mon Sep 17 00:00:00 2001 From: Lin Jian <1215122919@qq.com> Date: Fri, 12 Jun 2020 04:03:33 +0000 Subject: [PATCH 13/39] [storage] added change feed (#9151) * fix * change feed with mininal live tests * mocking tests * format code & rename buildAvroReader parameter name * add README.md * change eventTime type from string to Date * Update sdk/storage/storage-blob-changefeed/README.md Co-authored-by: Jeremy Meng * Update sdk/storage/storage-blob-changefeed/README.md Co-authored-by: Jeremy Meng * Update sdk/storage/storage-blob-changefeed/README.md Co-authored-by: Jeremy Meng * PR comments * Rename eTag to etag in BlobChangeFeedEventData * remove hns only properties in change event record * fix minor bug in avro * Update sdk/storage/storage-blob-changefeed/README.md Co-authored-by: Brian Terlson * Update sdk/storage/storage-blob-changefeed/README.md Co-authored-by: Brian Terlson * rename to BlobChangeFeedGetChangesOptions and fix comments * update api Co-authored-by: Lin Jian Co-authored-by: Jeremy Meng Co-authored-by: Brian Terlson --- common/config/rush/pnpm-lock.yaml | 65 +++++ rush.json | 7 +- .../.vscode/extensions.json | 3 + .../.vscode/launch.json | 59 ++++ .../.vscode/settings.json | 27 ++ .../storage-blob-changefeed/CHANGELOG.md | 4 + sdk/storage/storage-blob-changefeed/LICENSE | 21 ++ sdk/storage/storage-blob-changefeed/README.md | 158 +++++++++++ .../api-extractor.json | 31 +++ .../storage-blob-changefeed/package.json | 163 +++++++++++ .../review/storage-blob-changefeed.api.md | 85 ++++++ .../rollup.base.config.js | 180 +++++++++++++ .../storage-blob-changefeed/rollup.config.js | 17 ++ .../rollup.test.config.js | 9 + .../samples/tsconfig.json | 9 + .../samples/typscript/basic.ts | 38 +++ .../samples/typscript/package.json | 44 +++ .../samples/typscript/resume.ts | 42 +++ .../samples/typscript/sample.env | 20 ++ .../src/AvroReaderFactory.ts | 25 ++ .../src/BlobChangeFeedClient.ts | 119 ++++++++ .../storage-blob-changefeed/src/ChangeFeed.ts | 145 ++++++++++ .../src/ChangeFeedFactory.ts | 133 +++++++++ .../storage-blob-changefeed/src/Chunk.ts | 52 ++++ .../src/ChunkFactory.ts | 43 +++ .../storage-blob-changefeed/src/Segment.ts | 78 ++++++ .../src/SegmentFactory.ts | 58 ++++ .../storage-blob-changefeed/src/Shard.ts | 60 +++++ .../src/ShardFactory.ts | 48 ++++ .../storage-blob-changefeed/src/index.ts | 2 + .../storage-blob-changefeed/src/log.ts | 9 + .../src/models/BlobChangeFeedEvent.ts | 28 ++ .../src/models/ChangeFeedCursor.ts | 18 ++ .../src/utils/constants.ts | 6 + .../src/utils/utils.browser.ts | 31 +++ .../src/utils/utils.common.ts | 105 ++++++++ .../src/utils/utils.node.ts | 38 +++ .../test/blobchangefeedclient.spec.ts | 132 +++++++++ .../test/changefeed.spec.ts | 255 ++++++++++++++++++ .../test/chunk.spec.ts | 72 +++++ .../test/resources/ChangeFeedManifest.json | 12 + .../test/resources/SegmentManifest.json | 26 ++ .../test/segment.spec.ts | 95 +++++++ .../test/shard.spec.ts | 90 +++++++ .../storage-blob-changefeed/tsconfig.json | 26 ++ .../src/generated/src/models/parameters.ts | 2 +- .../src/generated/src/storageClientContext.ts | 2 +- .../storage-internal-avro/src/AvroParser.ts | 1 + .../src/AvroReadableFromStream.ts | 11 +- 49 files changed, 2697 insertions(+), 7 deletions(-) create mode 100644 sdk/storage/storage-blob-changefeed/.vscode/extensions.json create mode 100644 sdk/storage/storage-blob-changefeed/.vscode/launch.json create mode 100644 sdk/storage/storage-blob-changefeed/.vscode/settings.json create mode 100644 sdk/storage/storage-blob-changefeed/CHANGELOG.md create mode 100644 sdk/storage/storage-blob-changefeed/LICENSE create mode 100644 sdk/storage/storage-blob-changefeed/README.md create mode 100644 sdk/storage/storage-blob-changefeed/api-extractor.json create mode 100644 sdk/storage/storage-blob-changefeed/package.json create mode 100644 sdk/storage/storage-blob-changefeed/review/storage-blob-changefeed.api.md create mode 100644 sdk/storage/storage-blob-changefeed/rollup.base.config.js create mode 100644 sdk/storage/storage-blob-changefeed/rollup.config.js create mode 100644 sdk/storage/storage-blob-changefeed/rollup.test.config.js create mode 100644 sdk/storage/storage-blob-changefeed/samples/tsconfig.json create mode 100644 sdk/storage/storage-blob-changefeed/samples/typscript/basic.ts create mode 100644 sdk/storage/storage-blob-changefeed/samples/typscript/package.json create mode 100644 sdk/storage/storage-blob-changefeed/samples/typscript/resume.ts create mode 100644 sdk/storage/storage-blob-changefeed/samples/typscript/sample.env create mode 100644 sdk/storage/storage-blob-changefeed/src/AvroReaderFactory.ts create mode 100644 sdk/storage/storage-blob-changefeed/src/BlobChangeFeedClient.ts create mode 100644 sdk/storage/storage-blob-changefeed/src/ChangeFeed.ts create mode 100644 sdk/storage/storage-blob-changefeed/src/ChangeFeedFactory.ts create mode 100644 sdk/storage/storage-blob-changefeed/src/Chunk.ts create mode 100644 sdk/storage/storage-blob-changefeed/src/ChunkFactory.ts create mode 100644 sdk/storage/storage-blob-changefeed/src/Segment.ts create mode 100644 sdk/storage/storage-blob-changefeed/src/SegmentFactory.ts create mode 100644 sdk/storage/storage-blob-changefeed/src/Shard.ts create mode 100644 sdk/storage/storage-blob-changefeed/src/ShardFactory.ts create mode 100644 sdk/storage/storage-blob-changefeed/src/index.ts create mode 100644 sdk/storage/storage-blob-changefeed/src/log.ts create mode 100644 sdk/storage/storage-blob-changefeed/src/models/BlobChangeFeedEvent.ts create mode 100644 sdk/storage/storage-blob-changefeed/src/models/ChangeFeedCursor.ts create mode 100644 sdk/storage/storage-blob-changefeed/src/utils/constants.ts create mode 100644 sdk/storage/storage-blob-changefeed/src/utils/utils.browser.ts create mode 100644 sdk/storage/storage-blob-changefeed/src/utils/utils.common.ts create mode 100644 sdk/storage/storage-blob-changefeed/src/utils/utils.node.ts create mode 100644 sdk/storage/storage-blob-changefeed/test/blobchangefeedclient.spec.ts create mode 100644 sdk/storage/storage-blob-changefeed/test/changefeed.spec.ts create mode 100644 sdk/storage/storage-blob-changefeed/test/chunk.spec.ts create mode 100644 sdk/storage/storage-blob-changefeed/test/resources/ChangeFeedManifest.json create mode 100644 sdk/storage/storage-blob-changefeed/test/resources/SegmentManifest.json create mode 100644 sdk/storage/storage-blob-changefeed/test/segment.spec.ts create mode 100644 sdk/storage/storage-blob-changefeed/test/shard.spec.ts create mode 100644 sdk/storage/storage-blob-changefeed/tsconfig.json diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index db4e875092ba..ac22e75319f5 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -25,6 +25,7 @@ dependencies: '@rush-temp/search-documents': 'file:projects/search-documents.tgz' '@rush-temp/service-bus': 'file:projects/service-bus.tgz' '@rush-temp/storage-blob': 'file:projects/storage-blob.tgz' + '@rush-temp/storage-blob-changefeed': 'file:projects/storage-blob-changefeed.tgz' '@rush-temp/storage-file-datalake': 'file:projects/storage-file-datalake.tgz' '@rush-temp/storage-file-share': 'file:projects/storage-file-share.tgz' '@rush-temp/storage-internal-avro': 'file:projects/storage-internal-avro.tgz' @@ -8836,6 +8837,69 @@ packages: integrity: sha512-wvwki9VUk1OBa5vOKDNUtNv48hISwA4O1yQGklLVg3K/WdRmz/a7r4stTezbEKbjTk0mOYSU2hX3HgUSssIisA== tarball: 'file:projects/service-bus.tgz' version: 0.0.0 + 'file:projects/storage-blob-changefeed.tgz': + dependencies: + '@azure/core-tracing': 1.0.0-preview.8 + '@microsoft/api-extractor': 7.7.11 + '@opentelemetry/api': 0.6.1 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.0_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.0.1_rollup@1.32.1 + '@rollup/plugin-replace': 2.3.1_rollup@1.32.1 + '@types/mocha': 7.0.2 + '@types/node': 8.10.59 + '@types/sinon': 9.0.4 + '@typescript-eslint/eslint-plugin': 2.27.0_2f26aa176a29afc2bd7e8bd79afb588b + '@typescript-eslint/parser': 2.27.0_eslint@6.8.0+typescript@3.9.5 + assert: 1.5.0 + cross-env: 7.0.2 + dotenv: 8.2.0 + downlevel-dts: 0.4.0 + es6-promise: 4.2.8 + eslint: 6.8.0 + eslint-config-prettier: 6.10.1_eslint@6.8.0 + eslint-plugin-no-null: 1.0.2_eslint@6.8.0 + eslint-plugin-no-only-tests: 2.4.0 + eslint-plugin-promise: 4.2.1 + esm: 3.2.25 + events: 3.1.0 + inherits: 2.0.4 + karma: 4.4.1 + karma-chrome-launcher: 3.1.0 + karma-coverage: 2.0.1 + karma-edge-launcher: 0.4.2_karma@4.4.1 + karma-env-preprocessor: 0.1.1 + karma-firefox-launcher: 1.3.0 + karma-ie-launcher: 1.0.0_karma@4.4.1 + karma-json-preprocessor: 0.3.3_karma@4.4.1 + karma-json-to-file-reporter: 1.0.1 + karma-junit-reporter: 2.0.1_karma@4.4.1 + karma-mocha: 1.3.0 + karma-mocha-reporter: 2.2.5_karma@4.4.1 + karma-remap-istanbul: 0.6.0_karma@4.4.1 + mocha: 7.1.1 + mocha-junit-reporter: 1.23.3_mocha@7.1.1 + nyc: 14.1.1 + prettier: 1.19.1 + puppeteer: 3.3.0 + rimraf: 3.0.2 + rollup: 1.32.1 + rollup-plugin-shim: 1.0.0 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 + rollup-plugin-terser: 5.3.0_rollup@1.32.1 + rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 + sinon: 9.0.2 + source-map-support: 0.5.16 + ts-node: 8.8.2_typescript@3.9.5 + tslib: 2.0.0 + typescript: 3.9.5 + util: 0.12.2 + dev: false + name: '@rush-temp/storage-blob-changefeed' + resolution: + integrity: sha512-DoG0fYwiYsjufvHaRJKJA6luLgv102q8ICSwVEyRnP2lE1eRfqLz2gPmVOABjRLIM4luom8WMNLV5OPo/FNXZQ== + tarball: 'file:projects/storage-blob-changefeed.tgz' + version: 0.0.0 'file:projects/storage-blob.tgz': dependencies: '@azure/core-tracing': 1.0.0-preview.8 @@ -9339,6 +9403,7 @@ specifiers: '@rush-temp/search-documents': 'file:./projects/search-documents.tgz' '@rush-temp/service-bus': 'file:./projects/service-bus.tgz' '@rush-temp/storage-blob': 'file:./projects/storage-blob.tgz' + '@rush-temp/storage-blob-changefeed': 'file:./projects/storage-blob-changefeed.tgz' '@rush-temp/storage-file-datalake': 'file:./projects/storage-file-datalake.tgz' '@rush-temp/storage-file-share': 'file:./projects/storage-file-share.tgz' '@rush-temp/storage-internal-avro': 'file:./projects/storage-internal-avro.tgz' diff --git a/rush.json b/rush.json index 75f4e6fe7b9d..1a88ae61de66 100644 --- a/rush.json +++ b/rush.json @@ -457,6 +457,11 @@ "projectFolder": "sdk/storage/storage-blob", "versionPolicyName": "client" }, + { + "packageName": "@azure/storage-blob-changefeed", + "projectFolder": "sdk/storage/storage-blob-changefeed", + "versionPolicyName": "client" + }, { "packageName": "@azure/storage-file-share", "projectFolder": "sdk/storage/storage-file-share", @@ -493,4 +498,4 @@ "versionPolicyName": "utility" } ] -} +} \ No newline at end of file diff --git a/sdk/storage/storage-blob-changefeed/.vscode/extensions.json b/sdk/storage/storage-blob-changefeed/.vscode/extensions.json new file mode 100644 index 000000000000..c83e26348e1f --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["esbenp.prettier-vscode"] +} diff --git a/sdk/storage/storage-blob-changefeed/.vscode/launch.json b/sdk/storage/storage-blob-changefeed/.vscode/launch.json new file mode 100644 index 000000000000..24dbfc9d74c4 --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/.vscode/launch.json @@ -0,0 +1,59 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "Debug Javascript Samples", + "program": "${workspaceFolder}/samples/javascript/basic.js", + "preLaunchTask": "npm: build:js-samples" + }, + { + "type": "node", + "request": "launch", + "name": "Debug Typescript Samples", + "program": "${workspaceFolder}/samples/typescript/basic.ts", + "preLaunchTask": "npm: build:ts-samples", + "outFiles": ["${workspaceFolder}/dist-esm/samples/typescript/*.js"] + }, + { + "type": "node", + "request": "launch", + "name": "Debug Mocha Test [Without Rollup]", + "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha", + "args": [ + "-r", + "ts-node/register", + "--timeout", + "999999", + "--colors", + "${workspaceFolder}/test/*.spec.ts", + "${workspaceFolder}/test/node/*.spec.ts" + ], + "env": { "TS_NODE_COMPILER_OPTIONS": "{\"module\": \"commonjs\"}" }, + "envFile": "${workspaceFolder}/../.env", + "console": "integratedTerminal", + "internalConsoleOptions": "neverOpen", + "protocol": "inspector" + }, + { + "type": "node", + "request": "launch", + "name": "Debug Unit Tests", + "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha", + "args": [ + "-u", + "tdd", + "--timeout", + "999999", + "--colors", + "${workspaceFolder}/dist-test/index.node.js" + ], + "internalConsoleOptions": "openOnSessionStart", + "preLaunchTask": "npm: build:test" + } + ] +} diff --git a/sdk/storage/storage-blob-changefeed/.vscode/settings.json b/sdk/storage/storage-blob-changefeed/.vscode/settings.json new file mode 100644 index 000000000000..71c65f9f433a --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/.vscode/settings.json @@ -0,0 +1,27 @@ +{ + "files.exclude": { + "**/.git": true, + "**/.svn": true, + "**/.DS_Store": true + }, + "[typescript]": { + "editor.formatOnSave": true, + "editor.tabSize": 2, + "editor.detectIndentation": false + }, + "[json]": { + "editor.formatOnSave": false, + "editor.tabSize": 2, + "editor.detectIndentation": false + }, + "[yaml]": { + "editor.formatOnSave": true, + "editor.tabSize": 2, + "editor.detectIndentation": false + }, + "editor.rulers": [ + 100 + ], + "typescript.preferences.quoteStyle": "double", + "javascript.preferences.quoteStyle": "double" + } \ No newline at end of file diff --git a/sdk/storage/storage-blob-changefeed/CHANGELOG.md b/sdk/storage/storage-blob-changefeed/CHANGELOG.md new file mode 100644 index 000000000000..4f22a19715c2 --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/CHANGELOG.md @@ -0,0 +1,4 @@ +# Release History + +## 12.0.0-preview.1 (2020.6) +- This preview is the first release supporting Azure Storage Blob Change Feed. diff --git a/sdk/storage/storage-blob-changefeed/LICENSE b/sdk/storage/storage-blob-changefeed/LICENSE new file mode 100644 index 000000000000..ea8fb1516028 --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2020 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/sdk/storage/storage-blob-changefeed/README.md b/sdk/storage/storage-blob-changefeed/README.md new file mode 100644 index 000000000000..e48eaa0a9d8e --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/README.md @@ -0,0 +1,158 @@ +# Azure Storage Blob Change Feed client library for JavaScript + +> Server Version: 2019-12-12 + +The change feed provides an ordered, guaranteed, durable, immutable, read-only transaction log of all the changes that occur to blobs and blob metadata in your storage account. Client applications can read these logs at any time. The change feed enables you to build efficient and scalable solutions that process change events that occur in your Blob Storage account at a low cost. + +This project provides a client library in JavaScript that makes it easy to consume the change feed. + +Use the client libraries in this package to: + - Reading change feed events, all or within a time range + - Resuming reading events from a saved position + +[Source code](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/storage/storage-blob-changefeed) | +[Package (npm)](https://www.npmjs.com/package/@azure/storage-blob-changefeed/) | +[API Reference Documentation](https://docs.microsoft.com/javascript/api/@azure/storage-blob-changefeed) | +[Product documentation](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-change-feed) | +[Samples](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/storage/storage-blob-changefeed/samples) | + +## Getting started + +**Prerequisites**: You must have an [Azure subscription](https://azure.microsoft.com/free/) and a [Storage Account](https://docs.microsoft.com/azure/storage/blobs/storage-quickstart-blobs-portal) to use this package. If you are using this package in a Node.js application, then Node.js version 8.0.0 or higher is required. + +### Install the package + +The preferred way to install the Azure Storage Blob Change Feed client library for JavaScript is to use the npm package manager. Type the following into a terminal window: + +```bash +npm install @azure/storage-blob-changefeed +``` + +### Authenticate the client + +This library uses an authenticated `BlobServiceClient` to initialize. Refer to [storage-blob](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/storage/storage-blob#authenticate-the-client) for how to authenticate a `BlobServiceClient`. + +### Compatibility + +For this preview, this library is only compatible with Node.js. + +## Key concepts + +The change feed is stored as blobs in a special container in your storage account at standard blob pricing cost. You can control the retention period of these files based on your requirements. Change events are appended to the change feed as records in the Apache Avro format specification: a compact, fast, binary format that provides rich data structures with inline schema. This format is widely used in the Hadoop ecosystem, Stream Analytics, and Azure Data +Factory. + +This library offers a client you can use to fetch the change events. + +## Examples + +### Initialize the change feed client + +The `BlobChangeFeedClient` requires a `BlobServiceClient` to initialize. Refer to [storage-blob](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/storage/storage-blob#create-the-blob-service-client) for how to create the blob service client. Here is an example using `StorageSharedKeyCredential`. + + ```javascript + const { BlobServiceClient, StorageSharedKeyCredential } = require("@azure/storage-blob"); + const { BlobChangeFeedClient } = require("@azure/storage-blob-changefeed"); + + // Enter your storage account name and shared key + const account = ""; + const accountKey = ""; + // Use StorageSharedKeyCredential with storage account and account key + // StorageSharedKeyCredential is only available in Node.js runtime, not in browsers + const sharedKeyCredential = new StorageSharedKeyCredential(account, accountKey); + const blobServiceClient = new BlobServiceClient( + `https://${account}.blob.core.windows.net`, + sharedKeyCredential + ); + + const changeFeedClient = new BlobChangeFeedClient(blobServiceClient); + ``` + +### Reading all events in the Change Feed + +Use `BlobChangeFeedClient.getChanges()` to get iterators to iterate through the change events. + +```javascript +const { BlobChangeFeedEvent } = require("@azure/storage-blob-changefeed"); + +let changeFeedEvents : BlobChangeFeedEvent[] = []; +for await (const event of changeFeedClient.getChanges()) { + changeFeedEvents.push(event); +} +``` + +By page. + +```javascript +const { BlobChangeFeedEvent } = require("@azure/storage-blob-changefeed"); + +let changeFeedEvents : BlobChangeFeedEvent[] = []; +for await (const eventPage of changeFeedClient.getChanges().byPage()) { + for (const event of eventPage) { + changeFeedEvents.push(event); + } +} +``` + +### Resuming reading events with a cursor + +```javascript +const { BlobChangeFeedEvent } = require("@azure/storage-blob-changefeed"); + +let changeFeedEvents : BlobChangeFeedEvent[] = []; +const firstPage = await changeFeedClient.getChanges().byPage({maxPageSize: 10}).next(); +for (const event of firstPage) { + changeFeedEvents.push(event); +} + +// Resume iterating from the previous position with the continuationToken. +for await (const eventPage of changeFeedClient.getChanges().byPage({continuationToken: firstPage.continuationToken})) { + for (const event of eventPage) { + changeFeedEvents.push(event); + } +} +``` + +### Reading events within a time range + +Pass start time and end time to `BlobChangeFeedClient.getChanges()` to fetch events within a time range. + +Note that for this preview release, the change feed client will round start time down to the nearest hour, and round end time up to the next hour. + +```javascript +const { BlobChangeFeedEvent } = require("@azure/storage-blob-changefeed"); + +const start = new Date(Date.UTC(2020, 1, 21, 22, 30, 0)); // will be rounded down to 22:00 +const end = new Date(Date.UTC(2020, 4, 8, 21, 10, 0)); // will be rounded up to 22:00 + +let changeFeedEvents : BlobChangeFeedEvent[] = []; +// You can also provide just a start or end time. +for await (const event of changeFeedClient.getChanges({ start, end })) { + changeFeedEvents.push(event); +} +``` + +## Troubleshooting + +Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`: + +```javascript +import { setLogLevel } from "@azure/logger"; + +setLogLevel("info"); +``` + +## Next steps + +More code samples: + +- [Blob Storage Change Feed Samples (JavaScript)](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/storage/storage-blob-changefeed/samples/javascript) +- [Blob Storage Change Feed Samples (TypeScript)](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/storage/storage-blob-changefeed/samples/typescript) +- [Blob Storage Change Feed Test Cases](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/storage/storage-blob-changefeed/test/) + +## Contributing + +If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/master/CONTRIBUTING.md) to learn more about how to build and test the code. + +Also refer to [Storage specific guide](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/storage/CONTRIBUTING.md) for additional information on setting up the test environment for storage libraries. + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fstorage%2Fstorage-blob-changefeed%2FREADME.png) diff --git a/sdk/storage/storage-blob-changefeed/api-extractor.json b/sdk/storage/storage-blob-changefeed/api-extractor.json new file mode 100644 index 000000000000..ae67e7ef139f --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/api-extractor.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + "mainEntryPointFilePath": "typings/latest/storage-blob-changefeed/src/index.d.ts", + "docModel": { + "enabled": false + }, + "apiReport": { + "enabled": true, + "reportFolder": "./review" + }, + "dtsRollup": { + "enabled": true, + "untrimmedFilePath": "", + "publicTrimmedFilePath": "./typings/latest/storage-blob-changefeed.d.ts" + }, + "messages": { + "tsdocMessageReporting": { + "default": { + "logLevel": "none" + } + }, + "extractorMessageReporting": { + "ae-missing-release-tag": { + "logLevel": "none" + }, + "ae-unresolved-link": { + "logLevel": "none" + } + } + } +} diff --git a/sdk/storage/storage-blob-changefeed/package.json b/sdk/storage/storage-blob-changefeed/package.json new file mode 100644 index 000000000000..ca6e0a4ed34a --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/package.json @@ -0,0 +1,163 @@ +{ + "name": "@azure/storage-blob-changefeed", + "sdk-type": "client", + "version": "12.0.0-preview.1", + "description": "Microsoft Azure Storage SDK for JavaScript - Blob Change Feed", + "main": "./dist/index.js", + "module": "./dist-esm/storage-blob-changefeed/src/index.js", + "browser": { + "./dist-esm/storage-blob-changefeed/src/utils/utils.node.js": "./dist-esm/storage-blob-changefeed/src/utils/utils.browser.js", + "./dist-esm/storage-blob-changefeed/test/utils/index.js": "./dist-esm/storage-blob-changefeed/test/utils/index.browser.js", + "fs": false, + "os": false, + "process": false + }, + "types": "./typings/latest/storage-blob-changefeed.d.ts", + "typesVersions": { + "<3.6": { + "*": [ + "./typings/3.1/storage-blob-changefeed.d.ts" + ] + } + }, + "engine": { + "node": ">=8.0.0" + }, + "scripts": { + "build:es6": "tsc -p tsconfig.json", + "build:nodebrowser": "rollup -c 2>&1", + "build:samples": "npm run clean && npm run build:es6 && cross-env ONLY_NODE=true rollup -c 2>&1 && npm run build:prep-samples", + "build:prep-samples": "node ../../../common/scripts/prep-samples.js && cd samples && tsc", + "build:test": "npm run build:es6 && rollup -c rollup.test.config.js 2>&1", + "build:types": "downlevel-dts typings/latest typings/3.1", + "build": "npm run build:es6 && npm run build:nodebrowser && api-extractor run --local && npm run build:types", + "check-format": "prettier --list-different --config ../../.prettierrc.json \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", + "clean": "rimraf dist dist-esm dist-test typings temp dist-browser/*.js* dist-browser/*.zip statistics.html coverage coverage-browser .nyc_output *.tgz *.log test*.xml TEST*.xml", + "clean:samples": "rimraf samples/javascript/node_modules samples/typescript/node_modules samples/typescript/dist samples/typescript/package-lock.json samples/javascript/package-lock.json", + "extract-api": "tsc -p . && api-extractor run --local", + "execute:js-samples": "node ../../../common/scripts/run-samples.js samples/javascript/", + "execute:ts-samples": "node ../../../common/scripts/run-samples.js samples/typescript/dist/samples/typescript/src/", + "execute:samples": "npm run build:samples && npm run execute:js-samples && npm run execute:ts-samples", + "format": "prettier --write --config ../../.prettierrc.json \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", + "integration-test:browser": "karma start --single-run", + "integration-test:node": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --full-trace -t 300000 dist-esm/storage-blob-changefeed/test/*.spec.js dist-esm/storage-blob-changefeed/test/node/*.spec.js", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "pack": "npm pack 2>&1", + "prebuild": "npm run clean", + "test:browser": "npm run clean && npm run build:test && npm run unit-test:browser", + "test:node": "npm run clean && npm run build:test && npm run unit-test:node", + "test": "npm run clean && npm run build:test && npm run unit-test", + "unit-test:browser": "karma start --single-run", + "unit-test:node": "mocha --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --full-trace -t 120000 dist-test/index.node.js", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "emulator-tests": "cross-env STORAGE_CONNECTION_STRING=UseDevelopmentStorage=true && npm run test:node" + }, + "files": [ + "BreakingChanges.md", + "types/", + "dist/", + "dist-browser/", + "dist-esm/storage-blob-changefeed/src/", + "dist-esm/storage-internal-avro/src/", + "typings/latest/storage-blob-changefeed.d.ts", + "typings/3.1/storage-blob-changefeed.d.ts", + "README.md", + "LICENSE" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/Azure/azure-sdk-for-js.git" + }, + "keywords": [ + "Azure", + "Storage", + "Blob", + "Change feed", + "Node.js", + "TypeScript", + "JavaScript", + "Browser" + ], + "author": "Microsoft Corporation", + "license": "MIT", + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js#readme", + "sideEffects": false, + "//metadata": { + "constantPaths": [ + { + "path": "src/utils/constants.ts", + "prefix": "SDK_VERSION" + } + ] + }, + "dependencies": { + "@azure/storage-blob": "^12.1.2", + "@azure/abort-controller": "^1.0.0", + "@azure/core-http": "^1.1.1", + "@azure/core-lro": "^1.0.2", + "@azure/core-paging": "^1.1.1", + "@azure/core-tracing": "1.0.0-preview.8", + "@azure/logger": "^1.0.0", + "@opentelemetry/api": "^0.6.1", + "events": "^3.0.0", + "tslib": "^2.0.0" + }, + "devDependencies": { + "@azure/identity": "^1.1.0-preview", + "@azure/test-utils-recorder": "^1.0.0", + "@microsoft/api-extractor": "7.7.11", + "@rollup/plugin-multi-entry": "^3.0.0", + "@rollup/plugin-replace": "^2.2.0", + "@types/mocha": "^7.0.2", + "@types/node": "^8.0.0", + "@types/sinon": "^9.0.4", + "@typescript-eslint/eslint-plugin": "^2.0.0", + "@typescript-eslint/parser": "^2.0.0", + "assert": "^1.4.1", + "cross-env": "^7.0.2", + "dotenv": "^8.2.0", + "downlevel-dts": "~0.4.0", + "es6-promise": "^4.2.5", + "eslint": "^6.1.0", + "eslint-config-prettier": "^6.0.0", + "eslint-plugin-no-null": "^1.0.2", + "eslint-plugin-no-only-tests": "^2.3.0", + "eslint-plugin-promise": "^4.1.1", + "esm": "^3.2.18", + "inherits": "^2.0.3", + "karma": "^4.0.1", + "karma-chrome-launcher": "^3.0.0", + "karma-coverage": "^2.0.0", + "karma-edge-launcher": "^0.4.2", + "karma-env-preprocessor": "^0.1.1", + "karma-firefox-launcher": "^1.1.0", + "karma-ie-launcher": "^1.0.0", + "karma-json-preprocessor": "^0.3.3", + "karma-json-to-file-reporter": "^1.0.1", + "karma-junit-reporter": "^2.0.1", + "karma-mocha": "^1.3.0", + "karma-mocha-reporter": "^2.2.5", + "karma-remap-istanbul": "^0.6.0", + "mocha": "^7.1.1", + "mocha-junit-reporter": "^1.18.0", + "nyc": "^14.0.0", + "prettier": "^1.16.4", + "puppeteer": "^3.3.0", + "rimraf": "^3.0.0", + "rollup": "^1.16.3", + "@rollup/plugin-commonjs": "11.0.2", + "@rollup/plugin-node-resolve": "^8.0.0", + "rollup-plugin-shim": "^1.0.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "rollup-plugin-terser": "^5.1.1", + "rollup-plugin-visualizer": "^4.0.4", + "source-map-support": "^0.5.9", + "ts-node": "^8.3.0", + "typescript": "~3.9.3", + "util": "^0.12.1", + "sinon": "^9.0.2" + } +} \ No newline at end of file diff --git a/sdk/storage/storage-blob-changefeed/review/storage-blob-changefeed.api.md b/sdk/storage/storage-blob-changefeed/review/storage-blob-changefeed.api.md new file mode 100644 index 000000000000..afd6db2f2c96 --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/review/storage-blob-changefeed.api.md @@ -0,0 +1,85 @@ +## API Report File for "@azure/storage-blob-changefeed" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { BlobServiceClient } from '@azure/storage-blob'; +import { PagedAsyncIterableIterator } from '@azure/core-paging'; + +// @public (undocumented) +export class BlobChangeFeedClient { + constructor(blobServiceClient: BlobServiceClient); + // (undocumented) + getChanges(options?: BlobChangeFeedGetChangesOptions): PagedAsyncIterableIterator; + } + +// @public (undocumented) +export interface BlobChangeFeedEvent { + // (undocumented) + data: BlobChangeFeedEventData; + // (undocumented) + dataVersion?: string; + // (undocumented) + eventTime: Date; + // (undocumented) + eventType: BlobChangeFeedEventType; + // (undocumented) + id: string; + // (undocumented) + metadataVersion: string; + // (undocumented) + subject: string; + // (undocumented) + topic: string; +} + +// @public (undocumented) +export interface BlobChangeFeedEventData { + // (undocumented) + api: string; + // (undocumented) + blobType: BlobType; + // (undocumented) + clientRequestId: string; + // (undocumented) + contentLength: number; + // (undocumented) + contentType: string; + // (undocumented) + etag: string; + // (undocumented) + requestId: string; + // (undocumented) + sequencer: string; + // (undocumented) + url: string; +} + +// @public (undocumented) +export class BlobChangeFeedEventPage { + constructor(); + // (undocumented) + continuationToken: string; + // (undocumented) + events: BlobChangeFeedEvent[]; +} + +// @public (undocumented) +export type BlobChangeFeedEventType = "UnspecifiedEventType" | "BlobCreated" | "BlobDeleted" | "BlobPropertiesUpdated" | "BlobSnapshotCreated" | "Control" | "BlobTierChanged" | "BlobAsyncOperationInitiated" | "BlobMetadataUpdated"; + +// @public (undocumented) +export interface BlobChangeFeedGetChangesOptions { + // (undocumented) + end?: Date; + // (undocumented) + start?: Date; +} + +// @public (undocumented) +export type BlobType = "BlockBlob" | "AppendBlob" | "PageBlob"; + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/storage/storage-blob-changefeed/rollup.base.config.js b/sdk/storage/storage-blob-changefeed/rollup.base.config.js new file mode 100644 index 000000000000..3627e5de4354 --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/rollup.base.config.js @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +import nodeResolve from "@rollup/plugin-node-resolve"; +import multiEntry from "@rollup/plugin-multi-entry"; +import cjs from "@rollup/plugin-commonjs"; +import replace from "@rollup/plugin-replace"; +import { terser } from "rollup-plugin-terser"; +import sourcemaps from "rollup-plugin-sourcemaps"; +import shim from "rollup-plugin-shim"; +// import visualizer from "rollup-plugin-visualizer"; + +const version = require("./package.json").version; +const banner = [ + "/*!", + ` * Azure Storage SDK for JavaScript - Blob, ${version}`, + " * Copyright (c) Microsoft and contributors. All rights reserved.", + " */" +].join("\n"); + +const pkg = require("./package.json"); +const depNames = Object.keys(pkg.dependencies); +const production = process.env.NODE_ENV === "production"; + +export function nodeConfig(test = false) { + const externalNodeBuiltins = [ + "@azure/core-http", + "crypto", + "fs", + "events", + "os", + "stream", + "util" + ]; + const baseConfig = { + input: "dist-esm/storage-blob-changefeed/src/index.js", + external: depNames.concat(externalNodeBuiltins), + output: { + file: "dist/index.js", + format: "cjs", + sourcemap: true + }, + preserveSymlinks: false, + plugins: [ + sourcemaps(), + replace({ + delimiters: ["", ""], + values: { + // replace dynamic checks with if (true) since this is for node only. + // Allows rollup's dead code elimination to be more aggressive. + "if (isNode)": "if (true)" + } + }), + nodeResolve({ preferBuiltins: true }), + cjs() + ], + onwarn(warning, warn) { + if (warning.code === "CIRCULAR_DEPENDENCY") { + throw new Error(warning.message); + } + warn(warning); + } + }; + + if (test) { + // entry point is every test file + baseConfig.input = [ + "dist-esm/storage-blob-changefeed/test/*.spec.js", + "dist-esm/storage-blob-changefeed/test/node/*.spec.js", + "dist-esm/storage-blob-changefeed/src/index.js" + ]; + baseConfig.plugins.unshift(multiEntry()); + + // different output file + baseConfig.output.file = "dist-test/index.node.js"; + + // mark assert as external + baseConfig.external.push("assert", "fs", "path", "buffer", "zlib"); + + baseConfig.context = "null"; + + // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0, rollup started respecting + // the "sideEffects" field in package.json. Since our package.json sets "sideEffects=false", this also + // applies to test code, which causes all tests to be removed by tree-shaking. + baseConfig.treeshake = false; + } else if (production) { + baseConfig.plugins.push(terser()); + } + + return baseConfig; +} + +export function browserConfig(test = false) { + const baseConfig = { + input: "dist-esm/storage-blob-changefeed/src/index.browser.js", + output: { + file: "dist-browser/azure-storage-blob-changefeed.js", + banner: banner, + format: "umd", + name: "azblob", + sourcemap: true + }, + preserveSymlinks: false, + plugins: [ + sourcemaps(), + replace({ + delimiters: ["", ""], + values: { + // replace dynamic checks with if (false) since this is for + // browser only. Rollup's dead code elimination will remove + // any code guarded by if (isNode) { ... } + "if (isNode)": "if (false)" + } + }), + // fs and os are not used by the browser bundle, so just shim it + // dotenv doesn't work in the browser, so replace it with a no-op function + shim({ + dotenv: `export function config() { }`, + fs: ` + export function stat() { } + export function createReadStream() { } + export function createWriteStream() { } + `, + os: ` + export const type = 1; + export const release = 1; + `, + util: ` + export function promisify() { } + ` + }), + nodeResolve({ + mainFields: ["module", "browser"], + preferBuiltins: false + }), + cjs({ + namedExports: { + events: ["EventEmitter"], + assert: [ + "ok", + "deepEqual", + "equal", + "fail", + "strictEqual", + "deepStrictEqual", + "notDeepEqual", + "notDeepStrictEqual" + ], + "@opentelemetry/api": ["CanonicalCode", "SpanKind", "TraceFlags"] + } + }) + ], + onwarn(warning, warn) { + if (warning.code === "CIRCULAR_DEPENDENCY") { + throw new Error(warning.message); + } + warn(warning); + } + }; + + if (test) { + baseConfig.input = [ + "dist-esm/storage-blob-changefeed/test/*.spec.js", + "dist-esm/storage-blob-changefeed/test/browser/*.spec.js" + ]; + baseConfig.plugins.unshift(multiEntry({ exports: false })); + baseConfig.output.file = "dist-test/index.browser.js"; + // mark fs-extra as external + baseConfig.external = ["fs-extra"]; + + baseConfig.context = "null"; + + // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0, rollup started respecting + // the "sideEffects" field in package.json. Since our package.json sets "sideEffects=false", this also + // applies to test code, which causes all tests to be removed by tree-shaking. + baseConfig.treeshake = false; + } + + return baseConfig; +} diff --git a/sdk/storage/storage-blob-changefeed/rollup.config.js b/sdk/storage/storage-blob-changefeed/rollup.config.js new file mode 100644 index 000000000000..a62dabd573b4 --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/rollup.config.js @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +import * as base from "./rollup.base.config"; + +const inputs = []; + +if (!process.env.ONLY_BROWSER) { + inputs.push(base.nodeConfig()); +} + +// Disable this until we are ready to run rollup for the browser. +// if (!process.env.ONLY_NODE) { +// inputs.push(base.browserConfig()); +// } + +export default inputs; diff --git a/sdk/storage/storage-blob-changefeed/rollup.test.config.js b/sdk/storage/storage-blob-changefeed/rollup.test.config.js new file mode 100644 index 000000000000..5ebf5220d5e3 --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/rollup.test.config.js @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +import * as base from "./rollup.base.config"; + +export default [ + base.nodeConfig(true) + // base.browserConfig(true) +]; diff --git a/sdk/storage/storage-blob-changefeed/samples/tsconfig.json b/sdk/storage/storage-blob-changefeed/samples/tsconfig.json new file mode 100644 index 000000000000..3a37abdb0902 --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/samples/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "module": "commonjs", + "outDir": "typescript/dist" + }, + "include": ["typescript/src/**.ts"], + "exclude": ["typescript/*.json", "**/node_modules/", "../node_modules", "../typings"] +} diff --git a/sdk/storage/storage-blob-changefeed/samples/typscript/basic.ts b/sdk/storage/storage-blob-changefeed/samples/typscript/basic.ts new file mode 100644 index 000000000000..9093a82e09a2 --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/samples/typscript/basic.ts @@ -0,0 +1,38 @@ +import { BlobServiceClient, StorageSharedKeyCredential } from "@azure/storage-blob"; +import { BlobChangeFeedClient, BlobChangeFeedEvent } from "../../src"; + +// Load the .env file if it exists +import * as dotenv from "dotenv"; +console.log(dotenv.config()); + +import { setLogLevel } from "@azure/logger"; +setLogLevel("info"); + +export async function main() { + // Enter your storage account name and shared key + const account = process.env.ACCOUNT_NAME || ""; + const accountKey = process.env.ACCOUNT_KEY || ""; + + // Use StorageSharedKeyCredential with storage account and account key + // StorageSharedKeyCredential is only available in Node.js runtime, not in browsers + const sharedKeyCredential = new StorageSharedKeyCredential(account, accountKey); + const blobServiceClient = new BlobServiceClient( + // When using AnonymousCredential, following url should include a valid SAS or support public access + `https://${account}.blob.core.windows.net`, + sharedKeyCredential + ); + + const changeFeedClient = new BlobChangeFeedClient(blobServiceClient); + + const start = new Date(Date.UTC(2020, 1, 21, 22, 30, 0)); // will be rounded down to 22:00 + const end = new Date(Date.UTC(2020, 4, 8, 21, 10, 0)); // will be rounded up to 22:00 + let changeFeedEvents: BlobChangeFeedEvent[] = []; + // You can also provide just a start or end time. + for await (const event of changeFeedClient.getChanges({ start, end })) { + changeFeedEvents.push(event); + } +} + +main().catch((err) => { + console.error("Error running sample:", err.message); +}); diff --git a/sdk/storage/storage-blob-changefeed/samples/typscript/package.json b/sdk/storage/storage-blob-changefeed/samples/typscript/package.json new file mode 100644 index 000000000000..f749fce30875 --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/samples/typscript/package.json @@ -0,0 +1,44 @@ +{ + "name": "azure-storage-blob-changefeed-samples-ts", + "private": true, + "version": "0.1.0", + "description": "Azure Storage Blob Change Feed client library samples for TypeScript", + "engine": { + "node": ">=8.0.0" + }, + "scripts": { + "build": "tsc", + "prebuild": "rimraf dist/" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/Azure/azure-sdk-for-js.git" + }, + "keywords": [ + "Azure", + "Storage", + "Blob", + "Change Feed", + "Node.js", + "TypeScript" + ], + "author": "Microsoft Corporation", + "license": "MIT", + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js#readme", + "sideEffects": false, + "dependencies": { + "@azure/abort-controller": "latest", + "@azure/identity": "latest", + "@azure/storage-blob": "latest", + "@azure/storage-blob-changefeed": "latest", + "dotenv": "^8.2.0" + }, + "devDependencies": { + "@types/node": "^8.0.0", + "rimraf": "^3.0.0", + "typescript": "~3.6.4" + } +} \ No newline at end of file diff --git a/sdk/storage/storage-blob-changefeed/samples/typscript/resume.ts b/sdk/storage/storage-blob-changefeed/samples/typscript/resume.ts new file mode 100644 index 000000000000..37e1884e3699 --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/samples/typscript/resume.ts @@ -0,0 +1,42 @@ +import { BlobServiceClient, StorageSharedKeyCredential } from "@azure/storage-blob"; +import { BlobChangeFeedClient, BlobChangeFeedEvent } from "../../src"; + +// Load the .env file if it exists +import * as dotenv from "dotenv"; +console.log(dotenv.config()); + +import { setLogLevel } from "@azure/logger"; +setLogLevel("info"); + +export async function main() { + // Enter your storage account name and shared key + const account = process.env.ACCOUNT_NAME || ""; + const accountKey = process.env.ACCOUNT_KEY || ""; + + // Use StorageSharedKeyCredential with storage account and account key + // StorageSharedKeyCredential is only available in Node.js runtime, not in browsers + const sharedKeyCredential = new StorageSharedKeyCredential(account, accountKey); + const blobServiceClient = new BlobServiceClient( + // When using AnonymousCredential, following url should include a valid SAS or support public access + `https://${account}.blob.core.windows.net`, + sharedKeyCredential + ); + + const changeFeedClient = new BlobChangeFeedClient(blobServiceClient); + let changeFeedEvents: BlobChangeFeedEvent[] = []; + const firstPage = await changeFeedClient.getChanges().byPage({ maxPageSize: 10 }).next(); + for (const event of firstPage) { + changeFeedEvents.push(event); + } + + // Resume iterating from the pervious position with the continuationToken. + for await (const eventPage of changeFeedClient.getChanges().byPage({ continuationToken: firstPage.continuationToken })) { + for (const event of eventPage) { + changeFeedEvents.push(event); + } + } +} + +main().catch((err) => { + console.error("Error running sample:", err.message); +}); diff --git a/sdk/storage/storage-blob-changefeed/samples/typscript/sample.env b/sdk/storage/storage-blob-changefeed/samples/typscript/sample.env new file mode 100644 index 000000000000..92a81cac6547 --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/samples/typscript/sample.env @@ -0,0 +1,20 @@ +# Used in most samples. Retrieve these values from a storage account in the Azure Portal. +ACCOUNT_NAME= +ACCOUNT_KEY= + +# Used for withConnString +STORAGE_CONNECTION_STRING= + +# Used for the advanced and anonymousCred tests. Create a SAS token for a storage account in the Azure Portal. +ACCOUNT_SAS= + +# Used to authenticate using Azure AD as a service principal for role-based authentication. +# +# See the documentation for `EnvironmentCredential` at the following link: +# https://docs.microsoft.com/javascript/api/@azure/identity/environmentcredential +AZURE_TENANT_ID= +AZURE_CLIENT_ID= +AZURE_CLIENT_SECRET= + +# To run the proxyAuth sample, set up an HTTP proxy and enter your information: +# HTTP_PROXY=http://localhost:3128 diff --git a/sdk/storage/storage-blob-changefeed/src/AvroReaderFactory.ts b/sdk/storage/storage-blob-changefeed/src/AvroReaderFactory.ts new file mode 100644 index 000000000000..59b59bd07233 --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/src/AvroReaderFactory.ts @@ -0,0 +1,25 @@ +import { AvroReadable, AvroReader } from "../../storage-internal-avro/src"; + +export class AvroReaderFactory { + public create(headerAndDataStream: AvroReadable): AvroReader; + + public create( + dataStream: AvroReadable, + headerStream: AvroReadable, + blockOffset: number, + eventIndex: number + ): AvroReader; + + public create( + dataStream: AvroReadable, + headerStream?: AvroReadable, + blockOffset?: number, + eventIndex?: number + ): AvroReader { + if (headerStream) { + return new AvroReader(dataStream, headerStream, blockOffset!, eventIndex!); + } else { + return new AvroReader(dataStream); + } + } +} diff --git a/sdk/storage/storage-blob-changefeed/src/BlobChangeFeedClient.ts b/sdk/storage/storage-blob-changefeed/src/BlobChangeFeedClient.ts new file mode 100644 index 000000000000..8664d1f235bc --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/src/BlobChangeFeedClient.ts @@ -0,0 +1,119 @@ +import { BlobServiceClient } from "@azure/storage-blob"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { BlobChangeFeedEvent } from "./models/BlobChangeFeedEvent"; +import { ChangeFeedFactory } from "./ChangeFeedFactory"; +import { ChangeFeed } from "./ChangeFeed"; +import { CHANGE_FEED_MAX_PAGE_SIZE } from "./utils/constants"; + +export interface BlobChangeFeedGetChangesOptions { + start?: Date; + end?: Date; +} + +export class BlobChangeFeedEventPage { + public events: BlobChangeFeedEvent[]; + public continuationToken: string; + + constructor() { + this.events = []; + this.continuationToken = ""; + } +} + +export class BlobChangeFeedClient { + /** + * blobServiceClient provided by @azure/storage-blob package. + * + * @private + * @type {BlobServiceClient} + * @memberof BlobChangeFeedClient + */ + private _blobServiceClient: BlobServiceClient; + private _changeFeedFactory: ChangeFeedFactory; + + public constructor(blobServiceClient: BlobServiceClient) { + this._blobServiceClient = blobServiceClient; + this._changeFeedFactory = new ChangeFeedFactory(); + } + + public getChanges( + options: BlobChangeFeedGetChangesOptions = {} + ): PagedAsyncIterableIterator { + const iter = this.getChange(options); + return { + /** + * @member {Promise} [next] The next method, part of the iteration protocol + */ + async next() { + return iter.next(); + }, + /** + * @member {Symbol} [asyncIterator] The connection to the async iterator, part of the iteration protocol + */ + [Symbol.asyncIterator]() { + return this; + }, + /** + * @member {Function} [byPage] Return an AsyncIterableIterator that works a page at a time + */ + byPage: (settings: PageSettings = {}) => { + return this.getPage(settings.continuationToken, settings.maxPageSize, options); + } + }; + } + + private async *getChange( + options: BlobChangeFeedGetChangesOptions = {} + ): AsyncIterableIterator { + const changeFeed: ChangeFeed = await this._changeFeedFactory.create( + this._blobServiceClient, + undefined, + options.start, + options.end + ); + + while (changeFeed.hasNext()) { + const event = await changeFeed.getChange(); + if (event) { + yield event; + } else { + return; + } + } + } + + // start in ChangeFeedGetChangesOptions will be ignored when continuationToken is specified. + private async *getPage( + continuationToken?: string, + maxPageSize?: number, + options: BlobChangeFeedGetChangesOptions = {} + ): AsyncIterableIterator { + const changeFeed: ChangeFeed = await this._changeFeedFactory.create( + this._blobServiceClient, + continuationToken, + options.start, + options.end + ); + + if (!maxPageSize || maxPageSize > CHANGE_FEED_MAX_PAGE_SIZE) { + maxPageSize = CHANGE_FEED_MAX_PAGE_SIZE; + } + while (changeFeed.hasNext()) { + let eventPage = new BlobChangeFeedEventPage(); + while (changeFeed.hasNext() && eventPage.events.length < maxPageSize) { + const event = await changeFeed.getChange(); + if (event) { + eventPage.events.push(event); + } + } + if (changeFeed.hasNext()) { + eventPage.continuationToken = JSON.stringify(changeFeed.getCursor()); + } + if (eventPage.events.length > 0) { + yield eventPage; + } else { + return; + } + } + } +} diff --git a/sdk/storage/storage-blob-changefeed/src/ChangeFeed.ts b/sdk/storage/storage-blob-changefeed/src/ChangeFeed.ts new file mode 100644 index 000000000000..e68643e46693 --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/src/ChangeFeed.ts @@ -0,0 +1,145 @@ +import { ContainerClient } from "@azure/storage-blob"; +import { Segment } from "./Segment"; +import { SegmentFactory } from "./SegmentFactory"; +import { BlobChangeFeedEvent } from "./models/BlobChangeFeedEvent"; +import { ChangeFeedCursor } from "./models/ChangeFeedCursor"; +import { getURI, hashString, getSegmentsInYear, minDate } from "./utils/utils.common"; + +export class ChangeFeed { + /** + * BlobContainerClient for making List Blob requests and creating Segments. + * + * @private + * @type {ContainerClient} + * @memberof ChangeFeed + */ + private readonly _containerClient?: ContainerClient; + + private readonly _segmentFactory?: SegmentFactory; + + private readonly _years: number[]; + + private _segments: string[]; + + private _currentSegment?: Segment; + + private _lastConsumable?: Date; + + private _startTime?: Date; + + private _endTime?: Date; + + private _end?: Date; + + constructor(); + constructor( + containerClient: ContainerClient, + segmentFactory: SegmentFactory, + years: number[], + segments: string[], + currentSegment: Segment, + lastConsumable: Date, + startTime?: Date, + endTime?: Date + ); + + constructor( + containerClient?: ContainerClient, + segmentFactory?: SegmentFactory, + years?: number[], + segments?: string[], + currentSegment?: Segment, + lastConsumable?: Date, + startTime?: Date, + endTime?: Date + ) { + this._containerClient = containerClient; + this._segmentFactory = segmentFactory; + this._years = years || []; + this._segments = segments || []; + this._currentSegment = currentSegment; + this._lastConsumable = lastConsumable; + this._startTime = startTime; + this._endTime = endTime; + if (this._lastConsumable) { + this._end = minDate(this._lastConsumable, this._endTime); + } + } + + public hasNext(): boolean { + // Empty ChangeFeed, using _currentSegment as the indicator. + if (!this._currentSegment) { + return false; + } + + if ( + this._segments.length === 0 && + this._years.length === 0 && + !this._currentSegment.hasNext() + ) { + return false; + } + + return this._currentSegment.finalized && this._currentSegment.dateTime < this._end!; + } + + public async getChange(): Promise { + let event: BlobChangeFeedEvent | undefined = undefined; + while (event === undefined && this.hasNext()) { + event = await this._currentSegment!.getChange(); + await this.advanceSegmentIfNecessary(); + } + return event; + } + + public getCursor(): ChangeFeedCursor { + if (!this._currentSegment) { + throw new Error("Empty Change Feed shouldn't call this function."); + } + + return { + cursorVersion: 1, + urlHash: hashString(getURI(this._containerClient!.url)), + endTime: this._endTime?.toJSON(), + currentSegmentCursor: this._currentSegment!.getCursor() + }; + } + + private async advanceSegmentIfNecessary(): Promise { + if (!this._currentSegment) { + throw new Error("Empty Change Feed shouldn't call this function."); + } + + // If the current segment has more Events, we don't need to do anything. + if (this._currentSegment.hasNext()) { + return; + } + + // If the current segment is completed, remove it + if (this._segments.length > 0) { + this._currentSegment = await this._segmentFactory!.create( + this._containerClient!, + this._segments.shift()! + ); + } + // If _segments is empty, refill it + else if (this._segments.length === 0 && this._years.length > 0) { + const year = this._years.shift(); + this._segments = await getSegmentsInYear( + this._containerClient!, + year!, + this._startTime, + this._end + ); + + if (this._segments.length > 0) { + this._currentSegment = await this._segmentFactory!.create( + this._containerClient!, + this._segments.shift()! + ); + } else { + this._currentSegment = undefined; + } + } + } +} diff --git a/sdk/storage/storage-blob-changefeed/src/ChangeFeedFactory.ts b/sdk/storage/storage-blob-changefeed/src/ChangeFeedFactory.ts new file mode 100644 index 000000000000..9c28ccc55b1c --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/src/ChangeFeedFactory.ts @@ -0,0 +1,133 @@ +import { BlobServiceClient, ContainerClient } from "@azure/storage-blob"; +import { ChangeFeed } from "./ChangeFeed"; +import { ChangeFeedCursor } from "./models/ChangeFeedCursor"; +import { CHANGE_FEED_CONTAINER_NAME, CHANGE_FEED_META_SEGMENT_PATH } from "./utils/constants"; +import { + ceilToNearestHour, + floorToNearestHour, + getURI, + hashString, + getYearsPaths, + getSegmentsInYear, + minDate +} from "./utils/utils.common"; +import { bodyToString } from "./utils/utils.node"; +import { SegmentFactory } from "./SegmentFactory"; +import { ShardFactory } from "./ShardFactory"; +import { ChunkFactory } from "./ChunkFactory"; +import { AvroReaderFactory } from "./AvroReaderFactory"; +import { Segment } from "./Segment"; + +interface MetaSegments { + version?: number; + lastConsumable: string; +} + +export class ChangeFeedFactory { + private readonly _segmentFactory: SegmentFactory; + + constructor(); + constructor(segmentFactory: SegmentFactory); + constructor(segmentFactory?: SegmentFactory) { + if (segmentFactory) { + this._segmentFactory = segmentFactory; + } else { + this._segmentFactory = new SegmentFactory( + new ShardFactory(new ChunkFactory(new AvroReaderFactory())) + ); + } + } + + public async create( + blobServiceClient: BlobServiceClient, + continuationToken?: string, + startTime?: Date, + endTime?: Date + ): Promise { + const containerClient = blobServiceClient.getContainerClient(CHANGE_FEED_CONTAINER_NAME); + let cursor: ChangeFeedCursor | undefined = undefined; + // Create cursor. + if (continuationToken) { + cursor = JSON.parse(continuationToken); + ChangeFeedFactory.validateCursor(containerClient, cursor!); + // startTime passed in is ignored + startTime = new Date(cursor!.currentSegmentCursor.segmentTime); + if (cursor!.endTime) { + endTime = new Date(cursor!.endTime!); + } + } + // Round start and end time if we are not using the cursor. + else { + startTime = floorToNearestHour(startTime); + endTime = ceilToNearestHour(endTime); + } + + // Check if Change Feed has been enabled for this account. + let changeFeedContainerExists = await containerClient.exists(); + if (!changeFeedContainerExists) { + throw new Error( + "Change Feed hasn't been enabled on this account, or is currently being enabled." + ); + } + + if (startTime && endTime && startTime >= endTime) { + return new ChangeFeed(); + } + + // Get last consumable. + const blobClient = containerClient.getBlobClient(CHANGE_FEED_META_SEGMENT_PATH); + const blobDownloadRes = await blobClient.download(); + const lastConsumable = new Date( + (JSON.parse(await bodyToString(blobDownloadRes)) as MetaSegments).lastConsumable + ); + + // Get year paths + const years: number[] = await getYearsPaths(containerClient); + + // Dequeue any years that occur before start time. + if (startTime) { + let startYear = startTime.getUTCFullYear(); + while (years.length > 0 && years[0] < startYear) { + years.shift(); + } + } + if (years.length === 0) { + return new ChangeFeed(); + } + + let segments: string[] = []; + while (segments.length === 0 && years.length !== 0) { + segments = await getSegmentsInYear( + containerClient, + years.shift()!, + startTime, + minDate(lastConsumable, endTime) + ); + } + if (segments.length === 0) { + return new ChangeFeed(); + } + const currentSegment: Segment = await this._segmentFactory.create( + containerClient, + segments.shift()!, + cursor?.currentSegmentCursor + ); + + return new ChangeFeed( + containerClient, + this._segmentFactory, + years, + segments, + currentSegment, + lastConsumable, + startTime, + endTime + ); + } + + private static validateCursor(containerClient: ContainerClient, cursor: ChangeFeedCursor): void { + if (hashString(getURI(containerClient.url)) !== cursor.urlHash) { + throw new Error("Cursor URL does not match container URL."); + } + } +} diff --git a/sdk/storage/storage-blob-changefeed/src/Chunk.ts b/sdk/storage/storage-blob-changefeed/src/Chunk.ts new file mode 100644 index 000000000000..d23f79574111 --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/src/Chunk.ts @@ -0,0 +1,52 @@ +import { AvroReader } from "../../storage-internal-avro/src"; +import { BlobChangeFeedEvent } from "./models/BlobChangeFeedEvent"; + +export class Chunk { + private readonly _avroReader: AvroReader; + private readonly _iter: AsyncIterableIterator; + + private _blockOffset: number; + public get blockOffset(): number { + return this._blockOffset; + } + + private _eventIndex: number; + public get eventIndex(): number { + return this._eventIndex; + } + + constructor(avroReader: AvroReader, blockOffset: number, eventIndex: number) { + this._avroReader = avroReader; + this._blockOffset = blockOffset; + this._eventIndex = eventIndex; + + this._iter = this._avroReader.parseObjects(); + } + + public hasNext(): boolean { + return this._avroReader.hasNext(); + } + + public async getChange(): Promise { + if (!this.hasNext()) { + return undefined; + } + + const next = await this._iter.next(); + this._eventIndex = this._avroReader.objectIndex; + this._blockOffset = this._avroReader.blockOffset; + if (next.done) { + return undefined; + } else { + let eventRaw = next.value as any; + if (eventRaw.eventTime) { + eventRaw.eventTime = new Date(eventRaw.eventTime); + } + if (eventRaw.eTag) { + eventRaw.etag = eventRaw.eTag; + delete eventRaw.eTag; + } + return eventRaw; + } + } +} diff --git a/sdk/storage/storage-blob-changefeed/src/ChunkFactory.ts b/sdk/storage/storage-blob-changefeed/src/ChunkFactory.ts new file mode 100644 index 000000000000..9f98201ebcf3 --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/src/ChunkFactory.ts @@ -0,0 +1,43 @@ +import { AvroReaderFactory } from "./AvroReaderFactory"; +import { ContainerClient } from "@azure/storage-blob"; +import { Chunk } from "./Chunk"; +import { AvroReader } from "../../storage-internal-avro/src"; +import { bodyToAvroReadable } from "./utils/utils.node"; + +export class ChunkFactory { + private readonly _avroReaderFactory: AvroReaderFactory; + + constructor(avroReaderFactory: AvroReaderFactory) { + this._avroReaderFactory = avroReaderFactory; + } + + public async create( + containerClient: ContainerClient, + chunkPath: string, + blockOffset?: number, + eventIndex?: number + ): Promise { + const blobClient = containerClient.getBlobClient(chunkPath); + blockOffset = blockOffset || 0; + eventIndex = eventIndex || 0; + + const downloadRes = await blobClient.download(blockOffset); + + const dataStream = bodyToAvroReadable(downloadRes); + let avroReader: AvroReader; + if (blockOffset !== 0) { + const headerDownloadRes = await blobClient.download(0); + const headerStream = bodyToAvroReadable(headerDownloadRes); + avroReader = this._avroReaderFactory.create( + dataStream, + headerStream, + blockOffset, + eventIndex + ); + } else { + avroReader = this._avroReaderFactory.create(dataStream); + } + + return new Chunk(avroReader, blockOffset, eventIndex); + } +} diff --git a/sdk/storage/storage-blob-changefeed/src/Segment.ts b/sdk/storage/storage-blob-changefeed/src/Segment.ts new file mode 100644 index 000000000000..527887630c22 --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/src/Segment.ts @@ -0,0 +1,78 @@ +import { BlobChangeFeedEvent } from "./models/BlobChangeFeedEvent"; +import { Shard } from "./Shard"; +import { SegmentCursor, ShardCursor } from "./models/ChangeFeedCursor"; + +export class Segment { + private readonly _shards: Shard[]; + + // Track shards that we have finished reading from. + private _shardDone: boolean[]; + private _shardDoneCount: number; + + private _shardIndex: number; + + private _finalized: boolean; + public get finalized(): boolean { + return this._finalized; + } + + // Assuming the dateTime of segments is rounded to hour. If not, our logic for fetching + // change events between a time range would be incorrect. + private _dateTime: Date; + public get dateTime(): Date { + return this._dateTime; + } + + constructor(shards: Shard[], shardIndex: number, dateTime: Date, finalized: boolean) { + this._shards = shards; + this._shardIndex = shardIndex; + this._dateTime = dateTime; + this._finalized = finalized; + + // TODO: add polyfill for Array.prototype.fill for IE11 + this._shardDone = Array(shards.length).fill(false); + this._shardDoneCount = 0; + } + + public hasNext(): boolean { + return this._shards.length > this._shardDoneCount; + } + + public async getChange(): Promise { + if (this._shardIndex >= this._shards.length || this._shardIndex < 0) { + throw new Error("shardIndex invalid."); + } + + let event: BlobChangeFeedEvent | undefined = undefined; + while (event === undefined && this.hasNext()) { + if (this._shardDone[this._shardIndex]) { + this._shardIndex = (this._shardIndex + 1) % this._shards.length; // find next available shard + continue; + } + + const currentShard = this._shards[this._shardIndex]; + event = await currentShard.getChange(); + + if (!currentShard.hasNext()) { + this._shardDone[this._shardIndex] = true; + this._shardDoneCount++; + } + // Round robin with shards + this._shardIndex = (this._shardIndex + 1) % this._shards.length; + } + return event; + } + + public getCursor(): SegmentCursor { + let shardCursors: ShardCursor[] = []; + for (const shard of this._shards) { + shardCursors.push(shard.getCursor()); + } + + return { + shardCursors, + shardIndex: this._shardIndex, + segmentTime: this._dateTime.toJSON() + }; + } +} diff --git a/sdk/storage/storage-blob-changefeed/src/SegmentFactory.ts b/sdk/storage/storage-blob-changefeed/src/SegmentFactory.ts new file mode 100644 index 000000000000..58a77fe52045 --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/src/SegmentFactory.ts @@ -0,0 +1,58 @@ +import { ShardFactory } from "./ShardFactory"; +import { ContainerClient } from "@azure/storage-blob"; +import { CHANGE_FEED_STATUS_FINALIZED, CHANGE_FEED_CONTAINER_NAME } from "./utils/constants"; +import { Shard } from "./Shard"; +import { Segment } from "./Segment"; +import { SegmentCursor } from "./models/ChangeFeedCursor"; +import { bodyToString } from "./utils/utils.node"; +import { parseDateFromSegmentPath } from "./utils/utils.common"; + +export interface SegmentManifest { + version?: number; + begin?: Date; + intervalSecs?: number; + status: string; + config?: any; + chunkFilePaths: string[]; +} + +export class SegmentFactory { + private readonly _shardFactory: ShardFactory; + + constructor(shardFactory: ShardFactory) { + this._shardFactory = shardFactory; + } + + public async create( + containerClient: ContainerClient, + manifestPath: string, + cursor?: SegmentCursor + ): Promise { + let shards: Shard[] = []; + const dateTime: Date = parseDateFromSegmentPath(manifestPath); + const shardIndex = cursor?.shardIndex || 0; + + const blobClient = containerClient.getBlobClient(manifestPath); + const blobDownloadRes = await blobClient.download(); + const blobContent: string = await bodyToString(blobDownloadRes); + + const segmentManifest = JSON.parse(blobContent) as SegmentManifest; + const finalized = segmentManifest.status === CHANGE_FEED_STATUS_FINALIZED; + + if (finalized) { + let i = 0; + + const containerPrefixLength = CHANGE_FEED_CONTAINER_NAME.length + 1; // "$blobchangefeed/" + for (const shardPath of segmentManifest.chunkFilePaths) { + const shard: Shard = await this._shardFactory.create( + containerClient, + shardPath.substring(containerPrefixLength), + cursor?.shardCursors[i++] + ); + shards.push(shard); + } + } + + return new Segment(shards, shardIndex, dateTime, finalized); + } +} diff --git a/sdk/storage/storage-blob-changefeed/src/Shard.ts b/sdk/storage/storage-blob-changefeed/src/Shard.ts new file mode 100644 index 000000000000..aee0a6be31e1 --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/src/Shard.ts @@ -0,0 +1,60 @@ +import { ContainerClient } from "@azure/storage-blob"; +import { ChunkFactory } from "./ChunkFactory"; +import { Chunk } from "./Chunk"; +import { BlobChangeFeedEvent } from "./models/BlobChangeFeedEvent"; +import { ShardCursor } from "./models/ChangeFeedCursor"; + +export class Shard { + private readonly _containerClient: ContainerClient; + + private readonly _chunkFactory: ChunkFactory; + + private readonly _chunks: string[]; + + private _currentChunk: Chunk; + + private _chunkIndex: number; + + constructor( + containerClient: ContainerClient, + chunkFactory: ChunkFactory, + chunks: string[], + currentChunk: Chunk, + chunkIndex: number + ) { + this._containerClient = containerClient; + this._chunkFactory = chunkFactory; + this._chunks = chunks; + this._currentChunk = currentChunk; + this._chunkIndex = chunkIndex; + } + + public hasNext(): boolean { + return this._chunks.length > 0 || this._currentChunk.hasNext(); + } + + public async getChange(): Promise { + let event: BlobChangeFeedEvent | undefined = undefined; + while (event === undefined && this.hasNext()) { + event = await this._currentChunk.getChange(); + + // Remove currentChunk if it doesn't have more events. + if (!this._currentChunk.hasNext() && this._chunks.length > 0) { + this._currentChunk = await this._chunkFactory.create( + this._containerClient, + this._chunks.shift()! + ); + this._chunkIndex++; + } + } + return event; + } + + public getCursor(): ShardCursor { + return { + chunkIndex: this._chunkIndex, + blockOffset: this._currentChunk.blockOffset, + eventIndex: this._currentChunk.eventIndex + }; + } +} diff --git a/sdk/storage/storage-blob-changefeed/src/ShardFactory.ts b/sdk/storage/storage-blob-changefeed/src/ShardFactory.ts new file mode 100644 index 000000000000..069dd94b3c59 --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/src/ShardFactory.ts @@ -0,0 +1,48 @@ +import { ChunkFactory } from "./ChunkFactory"; +import { ShardCursor } from "./models/ChangeFeedCursor"; +import { Shard } from "./Shard"; +import { ContainerClient } from "@azure/storage-blob"; + +export class ShardFactory { + private readonly _chunkFactory: ChunkFactory; + + constructor(chunkFactory: ChunkFactory) { + this._chunkFactory = chunkFactory; + } + + public async create( + containerClient: ContainerClient, + shardPath: string, + shardCursor?: ShardCursor + ) { + let chunks: string[] = []; + const chunkIndex: number = shardCursor?.chunkIndex || 0; + const blockOffset: number = shardCursor?.blockOffset || 0; + const eventIndex: number = shardCursor?.eventIndex || 0; + + for await (const blobItem of containerClient.listBlobsFlat({ prefix: shardPath })) { + chunks.push(blobItem.name); + } + + if (chunks.length === 0) { + throw new Error(`No chunk under directory ${shardPath}.`); + } + + if (chunkIndex < 0 || chunkIndex >= chunks.length) { + throw new Error(`Invalid chunkIndex for ${shardPath}.`); + } + + // Fast forward to current Chunk. + if (chunkIndex > 0) { + chunks.splice(0, chunkIndex); + } + + const currentChunk = await this._chunkFactory.create( + containerClient, + chunks.shift()!, + blockOffset, + eventIndex + ); + return new Shard(containerClient, this._chunkFactory, chunks, currentChunk, chunkIndex); + } +} diff --git a/sdk/storage/storage-blob-changefeed/src/index.ts b/sdk/storage/storage-blob-changefeed/src/index.ts new file mode 100644 index 000000000000..45b2282e86be --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/src/index.ts @@ -0,0 +1,2 @@ +export * from "./BlobChangeFeedClient"; +export * from "./models/BlobChangeFeedEvent"; diff --git a/sdk/storage/storage-blob-changefeed/src/log.ts b/sdk/storage/storage-blob-changefeed/src/log.ts new file mode 100644 index 000000000000..11eb733d3095 --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/src/log.ts @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { createClientLogger } from "@azure/logger"; + +/** + * The @azure/logger configuration for this package. + */ +export const logger = createClientLogger("storage-blob-changefeed"); diff --git a/sdk/storage/storage-blob-changefeed/src/models/BlobChangeFeedEvent.ts b/sdk/storage/storage-blob-changefeed/src/models/BlobChangeFeedEvent.ts new file mode 100644 index 000000000000..2b475a956210 --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/src/models/BlobChangeFeedEvent.ts @@ -0,0 +1,28 @@ +// https://msazure.visualstudio.com/One/_git/Storage-XStore?path=%2Fsrc%2FXTable%2FNotifications%2Flib%2FBlobChangeEventv4.json&version=GBmaster + +export type BlobChangeFeedEventType = "UnspecifiedEventType" | "BlobCreated" | "BlobDeleted" | "BlobPropertiesUpdated" | "BlobSnapshotCreated" | "Control" | "BlobTierChanged" | "BlobAsyncOperationInitiated" | "BlobMetadataUpdated"; + +export interface BlobChangeFeedEvent { + topic: string; + subject: string; + eventType: BlobChangeFeedEventType; + eventTime: Date; + id: string; // GUID + data: BlobChangeFeedEventData; + dataVersion?: string; + metadataVersion: string; +} + +export type BlobType = "BlockBlob" | "AppendBlob" | "PageBlob"; + +export interface BlobChangeFeedEventData { + api: string; + clientRequestId: string; // GUID + requestId: string; // GUID + etag: string; + contentType: string; + contentLength: number; + blobType: BlobType; + url: string; + sequencer: string; +} diff --git a/sdk/storage/storage-blob-changefeed/src/models/ChangeFeedCursor.ts b/sdk/storage/storage-blob-changefeed/src/models/ChangeFeedCursor.ts new file mode 100644 index 000000000000..f4796dafac0f --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/src/models/ChangeFeedCursor.ts @@ -0,0 +1,18 @@ +export interface ChangeFeedCursor { + cursorVersion: number; + urlHash: number; + endTime?: string; + currentSegmentCursor: SegmentCursor; +} + +export interface SegmentCursor { + shardCursors: ShardCursor[]; + shardIndex: number; + segmentTime: string; +} + +export interface ShardCursor { + chunkIndex: number; + blockOffset: number; + eventIndex: number; +} diff --git a/sdk/storage/storage-blob-changefeed/src/utils/constants.ts b/sdk/storage/storage-blob-changefeed/src/utils/constants.ts new file mode 100644 index 000000000000..5b4a0fae3965 --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/src/utils/constants.ts @@ -0,0 +1,6 @@ +export const CHANGE_FEED_CONTAINER_NAME: string = "$blobchangefeed"; +export const CHANGE_FEED_META_SEGMENT_PATH: string = "meta/segments.json"; +export const CHANGE_FEED_MAX_PAGE_SIZE: number = 5000; // align with rest API list operations +export const CHANGE_FEED_STATUS_FINALIZED: string = "Finalized"; +export const CHANGE_FEED_SEGMENT_PREFIX: string = "idx/segments/"; +export const CHANGE_FEED_INITIALIZATION_SEGMENT: string = "1601"; diff --git a/sdk/storage/storage-blob-changefeed/src/utils/utils.browser.ts b/sdk/storage/storage-blob-changefeed/src/utils/utils.browser.ts new file mode 100644 index 000000000000..f12b8ea0cc7b --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/src/utils/utils.browser.ts @@ -0,0 +1,31 @@ +/** + * Read body from downloading operation methods to string. + * Work on both Node.js and browser environment. + * + * @param response Convenience layer methods response with downloaded body + * @param length Length of Readable stream, needed for Node.js environment + */ +export async function bodyToString( + response: { + readableStreamBody?: NodeJS.ReadableStream; + blobBody?: Promise; + }, + // tslint:disable-next-line:variable-name + _length?: number +): Promise { + const blob = await response.blobBody!; + return blobToString(blob); +} + +export async function blobToString(blob: Blob): Promise { + const fileReader = new FileReader(); + return new Promise((resolve, reject) => { + fileReader.onloadend = (ev: any) => { + resolve(ev.target!.result); + }; + fileReader.onerror = reject; + fileReader.readAsText(blob); + }); +} + +export function bodyToAvroReadable() {} diff --git a/sdk/storage/storage-blob-changefeed/src/utils/utils.common.ts b/sdk/storage/storage-blob-changefeed/src/utils/utils.common.ts new file mode 100644 index 000000000000..33908d6c3b7b --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/src/utils/utils.common.ts @@ -0,0 +1,105 @@ +import { URLBuilder } from "@azure/core-http"; +import { ContainerClient } from "@azure/storage-blob"; +import { CHANGE_FEED_SEGMENT_PREFIX, CHANGE_FEED_INITIALIZATION_SEGMENT } from "./constants"; + +const millisecondsInAnHour = 60 * 60 * 1000; +export function ceilToNearestHour(date: Date | undefined): Date | undefined { + if (date === undefined) { + return undefined; + } + return new Date(Math.ceil(date.getTime() / millisecondsInAnHour) * millisecondsInAnHour); +} + +export function floorToNearestHour(date: Date | undefined): Date | undefined { + if (date === undefined) { + return undefined; + } + return new Date(Math.floor(date.getTime() / millisecondsInAnHour) * millisecondsInAnHour); +} + +/** + * Get URI from an URL string. + * + * @export + * @param {string} url Source URL string + * @returns {(string | undefined)} + */ +export function getURI(url: string): string { + const urlParsed = URLBuilder.parse(url); + return `${urlParsed.getHost()}${urlParsed.getPort()}${urlParsed.getPath()}`; +} + +// s[0]*31^(n - 1) + s[1]*31^(n - 2) + ... + s[n - 1] +export function hashString(str: string): number { + let hash = 0; + for (let i = 0; i < str.length; i++) { + hash = (hash << 5) - hash + str.charCodeAt(i); + hash |= 0; // Bit operation converts operands to 32-bit integers + } + return hash; +} + +export async function getYearsPaths(containerClient: ContainerClient): Promise { + let years: number[] = []; + for await (const item of containerClient.listBlobsByHierarchy("/", { + prefix: CHANGE_FEED_SEGMENT_PREFIX + })) { + // TODO: add String.prototype.includes polyfill for IE11 + if (item.kind === "prefix" && !item.name.includes(CHANGE_FEED_INITIALIZATION_SEGMENT)) { + let yearStr = item.name.slice(CHANGE_FEED_SEGMENT_PREFIX.length, -1); + years.push(parseInt(yearStr)); + } + } + return years.sort((a, b) => a - b); +} + +export async function getSegmentsInYear( + containerClient: ContainerClient, + year: number, + startTime?: Date, + endTime?: Date +): Promise { + let segments: string[] = []; + const yearBeginTime = new Date(Date.UTC(year, 0)); + if (endTime && yearBeginTime >= endTime) { + return segments; + } + + const prefix = `${CHANGE_FEED_SEGMENT_PREFIX}${year}/`; + for await (const item of containerClient.listBlobsFlat({ prefix })) { + const segmentTime = parseDateFromSegmentPath(item.name); + if ((startTime && segmentTime < startTime) || (endTime && segmentTime >= endTime)) { + continue; + } + segments.push(item.name); + } + return segments; +} + +export function parseDateFromSegmentPath(segmentPath: string): Date { + const splitPath = segmentPath.split("/"); + if (splitPath.length < 3) { + throw new Error(`${segmentPath} is not a valid segment path.`); + } + + let segmentTime = new Date(0); + segmentTime.setUTCFullYear(parseInt(splitPath[2])); + + if (splitPath.length >= 4) { + segmentTime.setUTCMonth(parseInt(splitPath[3]) - 1); + } + if (splitPath.length >= 5) { + segmentTime.setUTCDate(parseInt(splitPath[4])); + } + if (splitPath.length >= 6) { + segmentTime.setUTCHours(parseInt(splitPath[5]) / 100); + } + return segmentTime; +} + +export function minDate(dateA: Date, dateB?: Date): Date { + if (dateB && dateB < dateA) { + return dateB; + } + return dateA; +} diff --git a/sdk/storage/storage-blob-changefeed/src/utils/utils.node.ts b/sdk/storage/storage-blob-changefeed/src/utils/utils.node.ts new file mode 100644 index 000000000000..4668d88857ac --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/src/utils/utils.node.ts @@ -0,0 +1,38 @@ +import { AvroReadable, AvroReadableFromStream } from "../../../storage-internal-avro/src"; + +/** + * Read body from downloading operation methods to string. + * Work on both Node.js and browser environment. + * + * @param response Convenience layer methods response with downloaded body + * @param length Length of Readable stream, needed for Node.js environment + */ +export async function bodyToString( + response: { + readableStreamBody?: NodeJS.ReadableStream; + blobBody?: Promise; + }, + length?: number +): Promise { + return new Promise((resolve, reject) => { + response.readableStreamBody!.on("readable", () => { + let chunk; + chunk = response.readableStreamBody!.read(length); + if (chunk) { + resolve(chunk.toString()); + } + }); + + response.readableStreamBody!.on("error", reject); + response.readableStreamBody!.on("end", () => { + resolve(""); + }); + }); +} + +export function bodyToAvroReadable(response: { + readableStreamBody?: NodeJS.ReadableStream; + blobBody?: Promise; +}): AvroReadable { + return new AvroReadableFromStream(response.readableStreamBody!); +} diff --git a/sdk/storage/storage-blob-changefeed/test/blobchangefeedclient.spec.ts b/sdk/storage/storage-blob-changefeed/test/blobchangefeedclient.spec.ts new file mode 100644 index 000000000000..e100620634e0 --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/test/blobchangefeedclient.spec.ts @@ -0,0 +1,132 @@ +import * as assert from "assert"; +import { BlobServiceClient, StorageSharedKeyCredential } from "@azure/storage-blob"; +import { BlobChangeFeedClient, BlobChangeFeedEvent, BlobChangeFeedEventPage } from "../src"; + +import * as dotenv from "dotenv"; +dotenv.config(); + +describe("BlobChangeFeedClient", async () => { + const account = process.env.ACCOUNT_NAME || ""; + const accountKey = process.env.ACCOUNT_KEY || ""; + const sharedKeyCredential = new StorageSharedKeyCredential(account, accountKey); + const blobServiceClient = new BlobServiceClient( + `https://${account}.blob.core.windows.net`, + sharedKeyCredential + ); + const changeFeedClient = new BlobChangeFeedClient(blobServiceClient); + + before(async function () { + if (process.env.CHANGE_FEED_ENABLED !== "1") { + this.skip(); + } + }); + + it("next(): fetch all events", async () => { + let i = 0; + for await (const event of changeFeedClient.getChanges()) { + if (i++ === 0) { + assert.ok(event.eventType); + assert.ok(event.data.blobType); + } + } + }); + + it("next(): with start and end time", async () => { + let i = 0; + let lastEvent: BlobChangeFeedEvent | undefined; + const start = new Date(Date.UTC(2020, 1, 21, 22, 30, 0)); // will be rounded down to 22:00 + const startRounded = new Date(Date.UTC(2020, 1, 21, 22, 0, 0)); + const end = new Date(Date.UTC(2020, 4, 8, 21, 10, 0)); // will be rounded up to 22:00 + const endRounded = new Date(Date.UTC(2020, 4, 8, 22, 0, 0)); + for await (const event of changeFeedClient.getChanges({ start, end })) { + if (i++ === 0) { + assert.ok(event.eventType); + assert.ok(event.data.blobType); + assert.ok(event.eventTime >= startRounded); + } + lastEvent = event; + } + + if (lastEvent) { + assert.ok(lastEvent.eventTime < endRounded); + } + }); + + it("byPage()", async () => { + const maxPageSize = 2; + const iter = changeFeedClient.getChanges().byPage({ maxPageSize }); + const nextPage = await iter.next(); + if (nextPage.done) { + return; + } + assert.equal(nextPage.value.events.length, maxPageSize); + const event = nextPage.value.events[0]; + assert.ok(event.eventType); + assert.ok(event.data.blobType); + + // continuationToken + const iter1 = changeFeedClient + .getChanges() + .byPage({ continuationToken: nextPage.value.continuationToken, maxPageSize }); + const nextPage1 = await iter1.next(); + if (nextPage1.done) { + return; + } + assert.equal(nextPage1.value.events.length, maxPageSize); + const event1 = nextPage1.value.events[0]; + assert.ok(event1.eventType); + assert.ok(event1.data.blobType); + assert.notEqual(event1.id, event.id); + + // fetch between time range + const start = new Date(Date.UTC(2020, 1, 21, 22, 30, 0)); // will be ignored + const end = new Date(Date.UTC(2020, 4, 8, 21, 10, 0)); // will be rounded to 22:00 + const endRounded = new Date(Date.UTC(2020, 4, 8, 22, 0, 0)); + const iter2 = changeFeedClient + .getChanges({ start, end }) + .byPage({ continuationToken: nextPage1.value.continuationToken }); + let i = 0; + let lastEventPage: BlobChangeFeedEventPage | undefined; + for await (const eventPage of iter2) { + if (i++ === 0) { + const firstEvent = eventPage.events[0]; + assert.ok(firstEvent.eventType); + assert.ok(firstEvent.data.blobType); + assert.notEqual(firstEvent.id, event.id); + } + lastEventPage = eventPage; + } + + if (lastEventPage) { + const lastEvent = lastEventPage.events[lastEventPage.events.length - 1]; + assert.ok(lastEvent.eventTime < endRounded); + } + }); +}); + +describe("BlobChangeFeedClient: Change Feed not configured", async () => { + const account = process.env.ACCOUNT_NAME || ""; + const accountKey = process.env.ACCOUNT_KEY || ""; + const sharedKeyCredential = new StorageSharedKeyCredential(account, accountKey); + const blobServiceClient = new BlobServiceClient( + `https://${account}.blob.core.windows.net`, + sharedKeyCredential + ); + const changeFeedClient = new BlobChangeFeedClient(blobServiceClient); + + before(async function () { + if (process.env.CHANGE_FEED_ENABLED === "1") { + this.skip(); + } + }); + + it("should throw when fetching changes", async () => { + let exceptionCaught = false; + try { + await changeFeedClient.getChanges().next(); + } catch (err) { + exceptionCaught = true; + } + assert.ok(exceptionCaught); + }); +}); diff --git a/sdk/storage/storage-blob-changefeed/test/changefeed.spec.ts b/sdk/storage/storage-blob-changefeed/test/changefeed.spec.ts new file mode 100644 index 000000000000..e6cfcd321587 --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/test/changefeed.spec.ts @@ -0,0 +1,255 @@ +import * as assert from "assert"; +import * as fs from "fs"; +import * as path from "path"; +import * as sinon from "sinon"; +import { BlobServiceClient, ContainerClient, BlobClient } from "@azure/storage-blob"; +import { SegmentFactory } from "../src/SegmentFactory"; +import { Segment } from "../src/Segment"; +import { ChangeFeedFactory } from "../src/ChangeFeedFactory"; +import { hashString, getURI } from "../src/utils/utils.common"; + +describe("Change Feed", async () => { + const manifestFilePath = path.join("test", "resources", "ChangeFeedManifest.json"); + const lastConsumable = new Date("2020-05-04T19:10:00.000Z"); + const segmentCount = 5; + const yearPaths = [ + { kind: "prefix", name: "idx/segments/1601/" }, + { kind: "prefix", name: "idx/segments/2019/" }, + { kind: "prefix", name: "idx/segments/2020/" } + ]; + const segmentsIn2019 = [ + { name: "idx/segments/2019/03/02/2000/meta.json" }, + { name: "idx/segments/2019/04/03/2200/meta.json" }, + { name: "idx/segments/2019/05/03/2200/meta.json" } + ]; + const segmentsIn2020 = [ + { name: "idx/segments/2020/03/02/2000/meta.json" }, + { name: "idx/segments/2020/05/04/1900/meta.json" } + ]; + const segmentTimes = [ + new Date(Date.UTC(2019, 2, 2, 20)), + new Date(Date.UTC(2019, 3, 3, 22)), + new Date(Date.UTC(2019, 4, 3, 22)), + new Date(Date.UTC(2020, 2, 2, 20)), + new Date(Date.UTC(2020, 4, 4, 19)) + ]; + let serviceClientStub: sinon.SinonStubbedInstance; + let segmentFactoryStub: sinon.SinonStubbedInstance; + let containerClientStub: sinon.SinonStubbedInstance; + let segmentStubs: sinon.SinonStubbedInstance[]; + let changeFeedFactory: ChangeFeedFactory; + + async function* fakeList(items: any[]) { + for (const item of items) { + yield item; + } + } + + async function* listTwoArray(itemsA: any[], itemsB: any[]) { + for (const item of itemsA) { + yield item; + } + for (const item of itemsB) { + yield item; + } + } + + beforeEach(async () => { + serviceClientStub = sinon.createStubInstance(BlobServiceClient); + containerClientStub = sinon.createStubInstance(ContainerClient); + const blobClientStub = sinon.createStubInstance(BlobClient); + segmentFactoryStub = sinon.createStubInstance(SegmentFactory); + changeFeedFactory = new ChangeFeedFactory(segmentFactoryStub as any); + + serviceClientStub.getContainerClient.returns(containerClientStub as any); + containerClientStub.exists.resolves(true); + containerClientStub.getBlobClient.returns(blobClientStub as any); + containerClientStub.listBlobsByHierarchy + .withArgs("/") + .callsFake(() => fakeList(yearPaths) as any); + containerClientStub.listBlobsFlat + .withArgs({ prefix: "idx/segments/2019/" }) + .callsFake(() => fakeList(segmentsIn2019) as any); + containerClientStub.listBlobsFlat + .withArgs({ prefix: "idx/segments/2020/" }) + .callsFake(() => fakeList(segmentsIn2020) as any); + // TODO: rewrite for browser + blobClientStub.download.callsFake(() => { + return new Promise((resolve) => { + resolve({ readableStreamBody: fs.createReadStream(manifestFilePath) } as any); + }); + }); + + segmentStubs = []; + const segmentIter = listTwoArray(segmentsIn2019, segmentsIn2020); + for (let i = 0; i < segmentCount; i++) { + segmentStubs.push(sinon.createStubInstance(Segment)); + segmentFactoryStub.create + .withArgs(sinon.match.any, (await segmentIter.next()).value.name) + .resolves(segmentStubs[i] as any); + } + for (let i = 0; i < segmentCount; i++) { + sinon.stub(segmentStubs[i], "dateTime").value(segmentTimes[i]); + sinon.stub(segmentStubs[i], "finalized").value(i < segmentCount - 1); + segmentStubs[i].hasNext.returns(true); + segmentStubs[i].getChange.resolves(i as any); + } + }); + + afterEach(() => { + sinon.restore(); + }); + + it("no valid years in change feed container", async () => { + const yearPaths = [{ kind: "prefix", name: "idx/segments/1601/" }]; + containerClientStub.listBlobsByHierarchy.withArgs("/").returns(fakeList(yearPaths) as any); + const changeFeed = await changeFeedFactory.create(serviceClientStub as any); + assert.ok(!changeFeed.hasNext()); + }); + + it("no years after start time", async () => { + const yearPaths = [ + { kind: "prefix", name: "idx/segments/1601/" }, + { kind: "prefix", name: "idx/segments/2019/" } + ]; + containerClientStub.listBlobsByHierarchy.withArgs("/").returns(fakeList(yearPaths) as any); + const changeFeed = await changeFeedFactory.create( + serviceClientStub as any, + undefined, + new Date(Date.UTC(2020, 0)) + ); + assert.ok(!changeFeed.hasNext()); + }); + + it("no segments remaining in start year", async () => { + const yearPaths = [ + { kind: "prefix", name: "idx/segments/1601/" }, + { kind: "prefix", name: "idx/segments/2019/" } + ]; + containerClientStub.listBlobsByHierarchy.withArgs("/").returns(fakeList(yearPaths) as any); + + const segments = [ + { name: "idx/segments/2019/03/02/2000/meta.json" }, + { name: "idx/segments/2019/04/03/2200/meta.json" } + ]; + containerClientStub.listBlobsFlat.returns(fakeList(segments) as any); + + const changeFeed = await changeFeedFactory.create( + serviceClientStub as any, + undefined, + new Date(Date.UTC(2019, 5)) + ); + assert.ok(!changeFeed.hasNext()); + }); + + it("getChange", async () => { + const changeFeed = await changeFeedFactory.create( + serviceClientStub as any, + undefined, + new Date(Date.UTC(2019, 0)) + ); + assert.ok(changeFeed.hasNext()); + + const event = await changeFeed.getChange(); + assert.equal(event, 0); + + // advance to next non-empty segment + for (let i = 0; i < 2; i++) { + segmentStubs[i].hasNext.returns(false); + segmentStubs[i].getChange.resolves(undefined); + } + assert.ok(changeFeed.hasNext()); + const event2 = await changeFeed.getChange(); + assert.equal(event2, 2); + + // advanced to next year + segmentStubs[2].hasNext.returns(false); + segmentStubs[2].getChange.resolves(undefined); + assert.ok(changeFeed.hasNext()); + const event3 = await changeFeed.getChange(); + assert.equal(event3, 3); + + // stop when segment not finalized + segmentStubs[3].hasNext.returns(false); + segmentStubs[3].getChange.resolves(undefined); + const event4 = await changeFeed.getChange(); + assert.equal(event4, undefined); + assert.ok(!changeFeed.hasNext()); + }); + + it("with start and end time", async () => { + // no valid segment between start and end + const changeFeed = await changeFeedFactory.create( + serviceClientStub as any, + undefined, + new Date(Date.UTC(2019, 2, 2, 21)), + new Date(Date.UTC(2019, 3, 3, 22)) + ); + assert.ok(!changeFeed.hasNext()); + + // end earlier than lastConsumable + const changeFeed2 = await changeFeedFactory.create( + serviceClientStub as any, + undefined, + new Date(Date.UTC(2019, 3, 3, 22)), + new Date(Date.UTC(2019, 4, 3, 22)) + ); + assert.ok(changeFeed2.hasNext()); + const event = await changeFeed2.getChange(); + assert.equal(event, 1); + + segmentStubs[1].hasNext.returns(false); + segmentStubs[1].getChange.resolves(undefined); + const event2 = await changeFeed2.getChange(); + assert.equal(event2, undefined); + + //end later than lastConsumable + const changeFeed3 = await changeFeedFactory.create( + serviceClientStub as any, + undefined, + lastConsumable, + new Date(lastConsumable.getTime() + 1) + ); + assert.ok(!changeFeed3.hasNext()); + }); + + it("with continuation token", async () => { + const changeFeed = await changeFeedFactory.create( + serviceClientStub as any, + undefined, + new Date(Date.UTC(2020, 2, 2, 20)) + ); + assert.ok(changeFeed.hasNext()); + + const containerUri = "https://account.blob.core.windows.net/$blobchangefeed"; + (containerClientStub as any).url = containerUri; + const cursor = changeFeed.getCursor(); + assert.deepStrictEqual(cursor.urlHash, hashString(getURI(containerUri))); + + segmentStubs[3].getCursor.returns({ + shardCursors: [], + shardIndex: 0, + segmentTime: new Date(Date.UTC(2020, 2, 2, 20)).toJSON() + }); + const continuation = JSON.stringify(changeFeed.getCursor()); + const changeFeed2 = await changeFeedFactory.create( + serviceClientStub as any, + continuation + ); + assert.ok(changeFeed2.hasNext()); + const event = await changeFeed.getChange(); + assert.equal(event, 3); + + // finalized changed + sinon.stub(segmentStubs[4], "finalized").value(true); + segmentStubs[3].hasNext.returns(false); + segmentStubs[3].getChange.resolves(undefined); + const changeFeed3 = await changeFeedFactory.create( + serviceClientStub as any, + continuation + ); + assert.ok(changeFeed3.hasNext()); + const event2 = await changeFeed.getChange(); + assert.equal(event2, 4); + }); +}); diff --git a/sdk/storage/storage-blob-changefeed/test/chunk.spec.ts b/sdk/storage/storage-blob-changefeed/test/chunk.spec.ts new file mode 100644 index 000000000000..94463095bcf7 --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/test/chunk.spec.ts @@ -0,0 +1,72 @@ +import * as assert from "assert"; +import { Chunk } from "../src/Chunk"; +import * as sinon from "sinon"; +import { AvroReader } from "../../storage-internal-avro/src"; + +class FakeAvroReader { + constructor( + public blockOffset: number, + public objectIndex: number, + public hasNext: boolean, + private _record: any, + public blockSize?: number + ) {} + + public async *parseObjects(): AsyncIterableIterator { + while (this.hasNext) { + this.blockOffset += this.blockSize || 1000; + this.objectIndex++; + yield this._record; + } + } +} + +describe("Chunk", async () => { + afterEach(() => { + sinon.restore(); + }); + + it("hasNext()", async () => { + const avroReaderStub = sinon.createStubInstance(AvroReader); + avroReaderStub.hasNext.returns(true); + + const chunk = new Chunk(avroReaderStub as any, 0, 0); + assert.equal(chunk.hasNext(), true); + + avroReaderStub.hasNext.returns(false); + assert.equal(chunk.hasNext(), false); + }); + + it("getChange", async () => { + // set up + const record = { a: 1 }; + const fakeAvroReader = new FakeAvroReader(0, 0, true, record); + const avroReaderStub = sinon.createStubInstance(AvroReader); + avroReaderStub.hasNext.callsFake(() => fakeAvroReader.hasNext); + avroReaderStub.parseObjects.returns(fakeAvroReader.parseObjects()); + sinon.stub(avroReaderStub, "blockOffset").get(() => { + return fakeAvroReader.blockOffset; + }); + sinon.stub(avroReaderStub, "objectIndex").get(() => { + return fakeAvroReader.objectIndex; + }); + + const chunk = new Chunk( + avroReaderStub as any, + avroReaderStub.blockOffset, + avroReaderStub.objectIndex + ); + + // act and verify + const change = await chunk.getChange(); + assert.deepStrictEqual(change, record); + assert.equal(chunk.blockOffset, avroReaderStub.blockOffset); + assert.equal(chunk.eventIndex, avroReaderStub.objectIndex); + + fakeAvroReader.hasNext = false; + const change2 = await chunk.getChange(); + assert.deepStrictEqual(change2, undefined); + assert.equal(chunk.blockOffset, avroReaderStub.blockOffset); + assert.equal(chunk.eventIndex, avroReaderStub.objectIndex); + }); +}); diff --git a/sdk/storage/storage-blob-changefeed/test/resources/ChangeFeedManifest.json b/sdk/storage/storage-blob-changefeed/test/resources/ChangeFeedManifest.json new file mode 100644 index 000000000000..fcca218d3f25 --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/test/resources/ChangeFeedManifest.json @@ -0,0 +1,12 @@ +{ + "version": 0, + "lastConsumable": "2020-05-04T19:10:00.000Z", + "storageDiagnostics": { + "version": 0, + "lastModifiedTime": "2020-05-04T19:25:09.594Z", + "data": { + "aid": "a6b895a0-7006-0041-0049-22cadf06029a", + "lfz": "2020-04-29T06:00:00.000Z" + } + } +} \ No newline at end of file diff --git a/sdk/storage/storage-blob-changefeed/test/resources/SegmentManifest.json b/sdk/storage/storage-blob-changefeed/test/resources/SegmentManifest.json new file mode 100644 index 000000000000..21b93ea966a3 --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/test/resources/SegmentManifest.json @@ -0,0 +1,26 @@ +{ + "version": 0, + "begin": "2020-03-25T02:00:00.000Z", + "intervalSecs": 3600, + "status": "Finalized", + "config": { + "version": 0, + "configVersionEtag": "0x8d7d063fb40542c", + "numShards": 1, + "recordsFormat": "avro", + "formatSchemaVersion": 3, + "shardDistFnVersion": 1 + }, + "chunkFilePaths": [ + "$blobchangefeed/log/00/2020/03/25/0200/", + "$blobchangefeed/log/01/2020/03/25/0200/", + "$blobchangefeed/log/02/2020/03/25/0200/" + ], + "storageDiagnostics": { + "version": 0, + "lastModifiedTime": "2020-03-25T02:26:53.186Z", + "data": { + "aid": "61410c64-2006-0001-004c-02cde706e9dc" + } + } +} \ No newline at end of file diff --git a/sdk/storage/storage-blob-changefeed/test/segment.spec.ts b/sdk/storage/storage-blob-changefeed/test/segment.spec.ts new file mode 100644 index 000000000000..657a527ec7f7 --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/test/segment.spec.ts @@ -0,0 +1,95 @@ +import * as assert from "assert"; +import * as fs from "fs"; +import * as path from "path"; +import * as sinon from "sinon"; +import { ContainerClient, BlobClient } from "@azure/storage-blob"; +import { Shard } from "../src/Shard"; +import { SegmentFactory } from "../src/SegmentFactory"; +import { ShardFactory } from "../src/ShardFactory"; + +describe("Shard", async () => { + const manifestPath = "idx/segments/2020/03/25/0200/meta.json"; + const dateTime = new Date(Date.UTC(2020, 2, 25, 2)); + const shardCount = 3; + const segmentManifestFilePath = path.join("test", "resources", "SegmentManifest.json"); + let containerClientStub: any; + let shardFactoryStub: any; + let shardStubs: any[]; + + beforeEach(() => { + containerClientStub = sinon.createStubInstance(ContainerClient); + const blobClientStub = sinon.createStubInstance(BlobClient); + containerClientStub.getBlobClient.returns(blobClientStub); + // TODO: rewrite for browser + blobClientStub.download.resolves({ + readableStreamBody: fs.createReadStream(segmentManifestFilePath) + } as any); + + shardFactoryStub = sinon.createStubInstance(ShardFactory); + shardStubs = []; + for (let i = 0; i < shardCount; i++) { + shardStubs.push(sinon.createStubInstance(Shard)); + shardFactoryStub.create.onCall(i).returns(shardStubs[i]); + + shardStubs[i].hasNext.returns(true); + shardStubs[i].getChange.returns(i); + } + }); + + afterEach(() => { + sinon.restore(); + }); + + it("getChange round robin in shards", async () => { + const segmentFactory = new SegmentFactory(shardFactoryStub); + const segment = await segmentFactory.create(containerClientStub, manifestPath); + assert.ok(segment.hasNext()); + assert.equal(segment.dateTime.getTime(), dateTime.getTime()); + assert.ok(segment.finalized); + + // round robin + for (let i = 0; i < shardCount * 2 + 1; i++) { + const event = await segment.getChange(); + assert.equal(shardStubs[i % shardCount].getChange.callCount, Math.floor(i / shardCount) + 1); + assert.equal(event, i % shardCount); + } + + // skip finished shard + shardStubs[1].hasNext.returns(false); + shardStubs[1].getChange(undefined); + const event = await segment.getChange(); + assert.equal(event, 1); + + const shardRemainingCount = shardCount - 1; + for (let i = 0; i < shardRemainingCount; i++) { + const event = await segment.getChange(); + assert.equal(event, (i + 2) % shardCount); + } + const event2 = await segment.getChange(); + assert.equal(event2, 2); + + // all shards done, return undefined + for (let i = 0; i < shardCount; i++) { + shardStubs[i].hasNext.returns(false); + shardStubs[i].getChange.returns(undefined); + } + const lastEvent = await segment.getChange(); + assert.deepStrictEqual(lastEvent, undefined); + }); + + it("init with non-zero shardIndex", async () => { + const shardIndex = 1; + const segmentFactory = new SegmentFactory(shardFactoryStub); + const segment = await segmentFactory.create(containerClientStub, manifestPath, { + shardIndex, + shardCursors: [] + } as any); + assert.ok(segment.hasNext()); + assert.equal(segment.dateTime.getTime(), dateTime.getTime()); + assert.ok(segment.finalized); + assert.equal(segment.getCursor().shardIndex, shardIndex); + + const event = await segment.getChange(); + assert.equal(event, shardIndex); + }); +}); diff --git a/sdk/storage/storage-blob-changefeed/test/shard.spec.ts b/sdk/storage/storage-blob-changefeed/test/shard.spec.ts new file mode 100644 index 000000000000..f001b69fe2d8 --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/test/shard.spec.ts @@ -0,0 +1,90 @@ +import * as assert from "assert"; +import * as sinon from "sinon"; +import { ShardFactory } from "../src/ShardFactory"; +import { ContainerClient } from "@azure/storage-blob"; +import { ChunkFactory } from "../src/ChunkFactory"; +import { ShardCursor } from "../src/models/ChangeFeedCursor"; +import { Chunk } from "../src/Chunk"; + +describe("Shard", async () => { + let chunkFactoryStub: any; + let containerClientSub: any; + let chunkStub: any; + + async function* fakeListBlobsFlat(option: { prefix: string }) { + for (let i = 0; i < 5; i++) { + yield { name: `${option.prefix}000${i}.avro` }; + } + } + + beforeEach(() => { + chunkStub = sinon.createStubInstance(Chunk); + containerClientSub = sinon.createStubInstance(ContainerClient); + containerClientSub.listBlobsFlat.callsFake(fakeListBlobsFlat); + chunkFactoryStub = sinon.createStubInstance(ChunkFactory); + chunkFactoryStub.create.returns(chunkStub); + }); + + afterEach(() => { + sinon.restore(); + }); + + it("build shard with none-zero chunkIndex", async () => { + const shardPath = "$blobchangefeed/log/00/2019/02/22/1810/"; + const chunkIndex = 2; + const shardCursor: ShardCursor = { + chunkIndex, + blockOffset: 0, + eventIndex: 0 + }; + + // build shard correctly + const shardFactory = new ShardFactory(chunkFactoryStub as any); + const shard = await shardFactory.create(containerClientSub as any, shardPath, shardCursor); + assert.ok( + chunkFactoryStub.create.calledWith( + containerClientSub, + `${shardPath}000${chunkIndex}.avro` + ) + ); + const cursor = shard.getCursor(); + assert.deepStrictEqual(cursor.chunkIndex, shardCursor.chunkIndex); + + // shift to next chunk when currentChunk is done + chunkStub.hasNext.returns(false); + const nextChunkStub = sinon.createStubInstance(Chunk); + nextChunkStub.hasNext.returns(true); + const event = { id: "a" }; + nextChunkStub.getChange.resolves(event as any); + chunkFactoryStub.create.returns(nextChunkStub); + + const change = await shard.getChange(); + assert.ok( + chunkFactoryStub.create.calledWith( + containerClientSub, + `${shardPath}000${chunkIndex + 1}.avro` + ) + ); + assert.deepStrictEqual(change, event); + const cursor2 = shard.getCursor(); + assert.deepStrictEqual(cursor2.chunkIndex, shardCursor.chunkIndex + 1); + + // chunks used up + nextChunkStub.hasNext.returns(false); + nextChunkStub.getChange.resolves(undefined); + const lastChunkStub = sinon.createStubInstance(Chunk); + lastChunkStub.hasNext.returns(false); + chunkFactoryStub.create.returns(lastChunkStub); + + const change2 = await shard.getChange(); + assert.ok( + chunkFactoryStub.create.calledWith( + containerClientSub, + `${shardPath}000${chunkIndex + 2}.avro` + ) + ); + assert.equal(change2, undefined); + const cursor3 = shard.getCursor(); + assert.deepStrictEqual(cursor3.chunkIndex, shardCursor.chunkIndex + 2); + }); +}); diff --git a/sdk/storage/storage-blob-changefeed/tsconfig.json b/sdk/storage/storage-blob-changefeed/tsconfig.json new file mode 100644 index 000000000000..f89af540f58e --- /dev/null +++ b/sdk/storage/storage-blob-changefeed/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "alwaysStrict": true, + "noImplicitAny": true, + "preserveConstEnums": true, + "sourceMap": true, + "inlineSources": true, + "newLine": "LF", + "target": "es5", + "moduleResolution": "node", + "noUnusedLocals": true, + "noUnusedParameters": true, + "strict": true, + "module": "esNext", + "outDir": "./dist-esm", + "declaration": true, + "declarationMap": true, + "importHelpers": true, + "declarationDir": "./typings/latest", + "lib": ["dom", "es5", "es6", "es7", "esnext"], + "esModuleInterop": true + }, + "compileOnSave": true, + "exclude": ["node_modules", "../storage-internal-avro/node_modules", "./samples/**"], + "include": ["./src/**/*.ts", "./test/**/*.ts", "../storage-internal-avro/**/*.ts"] +} diff --git a/sdk/storage/storage-blob/src/generated/src/models/parameters.ts b/sdk/storage/storage-blob/src/generated/src/models/parameters.ts index c985e05682ff..9445287c3509 100644 --- a/sdk/storage/storage-blob/src/generated/src/models/parameters.ts +++ b/sdk/storage/storage-blob/src/generated/src/models/parameters.ts @@ -1680,7 +1680,7 @@ export const version: coreHttp.OperationParameter = { required: true, isConstant: true, serializedName: "x-ms-version", - defaultValue: '2019-12-12', + defaultValue: '2019-10-10', type: { name: "String" } diff --git a/sdk/storage/storage-blob/src/generated/src/storageClientContext.ts b/sdk/storage/storage-blob/src/generated/src/storageClientContext.ts index ab75cb1cbbf6..3a72ee70951a 100644 --- a/sdk/storage/storage-blob/src/generated/src/storageClientContext.ts +++ b/sdk/storage/storage-blob/src/generated/src/storageClientContext.ts @@ -39,7 +39,7 @@ export class StorageClientContext extends coreHttp.ServiceClient { super(undefined, options); - this.version = '2019-12-12'; + this.version = '2019-10-10'; this.baseUri = "{url}"; this.requestContentType = "application/json; charset=utf-8"; this.url = url; diff --git a/sdk/storage/storage-internal-avro/src/AvroParser.ts b/sdk/storage/storage-internal-avro/src/AvroParser.ts index 4bb310068953..4a418593e1b4 100644 --- a/sdk/storage/storage-internal-avro/src/AvroParser.ts +++ b/sdk/storage/storage-internal-avro/src/AvroParser.ts @@ -46,6 +46,7 @@ export class AvroParser { if (haveMoreByte) { // Switch to float arithmetic // FIXME: this only works when zigZagEncoded is no more than Number.MAX_SAFE_INTEGER (2**53 - 1) + zigZagEncoded = zigZagEncoded; significanceInFloat = 268435456; // 2 ** 28. do { byte = await AvroParser.readByte(stream); diff --git a/sdk/storage/storage-internal-avro/src/AvroReadableFromStream.ts b/sdk/storage/storage-internal-avro/src/AvroReadableFromStream.ts index ab8dfea45a49..0dd8e75b5a1d 100644 --- a/sdk/storage/storage-internal-avro/src/AvroReadableFromStream.ts +++ b/sdk/storage/storage-internal-avro/src/AvroReadableFromStream.ts @@ -29,6 +29,7 @@ export class AvroReadableFromStream extends AvroReadable { return this._position; } public async read(size: number): Promise { + // console.log(`reading stream for size ${size} at position ${this._position}`); if (size < 0) { throw new Error(`size parameter should be positive: ${size}`); } @@ -55,12 +56,14 @@ export class AvroReadableFromStream extends AvroReadable { let chunk = this._readable.read(size); if (chunk) { this._position += chunk.length; + + this._readable.removeListener("readable", readableCallback); + this._readable.removeListener("error", rejectCallback); + this._readable.removeListener("end", rejectCallback); + this._readable.removeListener("close", rejectCallback); + // chunk.length maybe less than desired size if the stream ends. resolve(this.toUint8Array(chunk)); - this._readable.removeListener("readable", readableCallback); - this._readable.removeListener("error", reject); - this._readable.removeListener("end", reject); - this._readable.removeListener("close", reject); } }; From e563ca429af53751b1fd66d7c0f719783a8a9584 Mon Sep 17 00:00:00 2001 From: Lin Jian <1215122919@qq.com> Date: Fri, 12 Jun 2020 04:04:39 +0000 Subject: [PATCH 14/39] [storage][blob & datalake] Jumbo blob (#9480) * Jumbo putBlock, putBlob, datalake file append * undo upload ArrayBuffer * minor edit Co-authored-by: Lin Jian --- sdk/storage/storage-blob/CHANGELOG.md | 1 + .../storage-blob/src/utils/constants.ts | 2 +- .../test/node/highlevel.node.spec.ts | 34 ++++++++++++++- .../storage-file-datalake/CHANGELOG.md | 5 +++ .../storage-file-datalake/src/clients.ts | 2 +- .../src/utils/constants.ts | 22 ++++++++-- .../test/node/highlevel.node.spec.ts | 41 ++++++++++++++++--- 7 files changed, 96 insertions(+), 11 deletions(-) diff --git a/sdk/storage/storage-blob/CHANGELOG.md b/sdk/storage/storage-blob/CHANGELOG.md index 23a63325cef8..e41d10721778 100644 --- a/sdk/storage/storage-blob/CHANGELOG.md +++ b/sdk/storage/storage-blob/CHANGELOG.md @@ -3,6 +3,7 @@ ## 12.2.0-preview.1 (2020.06) - Supported quick query. Added a new API `BlockBlobClient.query()`. +- Increased the maximum block size for Block Blob from 100MiB to 4000MiB(~4GB). And thereby supporting ~200TB maximum size for Block Blob. - Added support for blob versioning. ## 12.1.2 (2020.05) diff --git a/sdk/storage/storage-blob/src/utils/constants.ts b/sdk/storage/storage-blob/src/utils/constants.ts index 0832f777fccd..ed75bdab4bc1 100644 --- a/sdk/storage/storage-blob/src/utils/constants.ts +++ b/sdk/storage/storage-blob/src/utils/constants.ts @@ -5,7 +5,7 @@ export const SDK_VERSION: string = "12.2.0-preview"; export const SERVICE_VERSION: string = "2019-12-12"; export const BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES: number = 256 * 1024 * 1024; // 256MB -export const BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES: number = 100 * 1024 * 1024; // 100MB +export const BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES: number = 4000 * 1024 * 1024; // 4000MB export const BLOCK_BLOB_MAX_BLOCKS: number = 50000; export const DEFAULT_BLOCK_BUFFER_SIZE_BYTES: number = 8 * 1024 * 1024; // 8MB export const DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES: number = 4 * 1024 * 1024; // 4MB diff --git a/sdk/storage/storage-blob/test/node/highlevel.node.spec.ts b/sdk/storage/storage-blob/test/node/highlevel.node.spec.ts index 1c981ce4e18a..e38b26a11c18 100644 --- a/sdk/storage/storage-blob/test/node/highlevel.node.spec.ts +++ b/sdk/storage/storage-blob/test/node/highlevel.node.spec.ts @@ -9,6 +9,7 @@ import { RetriableReadableStreamOptions } from "../../src/utils/RetriableReadabl import { record, Recorder } from "@azure/test-utils-recorder"; import { ContainerClient, BlobClient, BlockBlobClient, BlobServiceClient } from "../../src"; import { readStreamToLocalFileWithLogs } from "../utils/testutils.node"; +import { BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES } from "../../src/utils/constants"; // tslint:disable:no-empty describe("Highlevel", () => { @@ -38,7 +39,7 @@ describe("Highlevel", () => { blockBlobClient = blobClient.getBlockBlobClient(); }); - afterEach(async function() { + afterEach(async function () { if (!this.currentTest?.isPending()) { await containerClient.delete(); recorder.stop(); @@ -64,6 +65,22 @@ describe("Highlevel", () => { recorder.stop(); }); + it("put blob with maximum size", async () => { + recorder.skip("node", "Temp file - recorder doesn't support saving the file"); + const MB = 1024 * 1024 + const maxPutBlobSizeLimitInMB = 5000; + const tempFile = await createRandomLocalFile(tempFolderPath, maxPutBlobSizeLimitInMB, MB); + const inputStream = fs.createReadStream(tempFile); + + try { + await blockBlobClient.upload(() => inputStream, maxPutBlobSizeLimitInMB * MB, { + abortSignal: AbortController.timeout(20 * 1000) // takes too long to upload the file + }); + } catch (err) { + assert.equal(err.name, 'AbortError'); + } + }).timeout(timeoutForLargeFileUploadingTest); + it("uploadFile should success when blob >= BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES", async () => { recorder.skip("node", "Temp file - recorder doesn't support saving the file"); await blockBlobClient.uploadFile(tempFileLarge, { @@ -193,6 +210,21 @@ describe("Highlevel", () => { assert.ok(eventTriggered); }); + it("uploadFile should succeed with blockSize = BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES", async () => { + recorder.skip("node", "Temp file - recorder doesn't support saving the file"); + const tempFile = await createRandomLocalFile(tempFolderPath, BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES / (1024 * 1024) + 1, 1024 * 1024); + try { + await blockBlobClient.uploadFile(tempFile, { + blockSize: BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES, + abortSignal: AbortController.timeout(20 * 1000) // takes too long to upload the file + }); + } catch (err) { + assert.equal(err.name, 'AbortError'); + } + + fs.unlinkSync(tempFile); + }).timeout(timeoutForLargeFileUploadingTest); + it("uploadStream should success", async () => { recorder.skip("node", "Temp file - recorder doesn't support saving the file"); const rs = fs.createReadStream(tempFileLarge); diff --git a/sdk/storage/storage-file-datalake/CHANGELOG.md b/sdk/storage/storage-file-datalake/CHANGELOG.md index 6e753ac3f0e1..ec07f63897cf 100644 --- a/sdk/storage/storage-file-datalake/CHANGELOG.md +++ b/sdk/storage/storage-file-datalake/CHANGELOG.md @@ -1,5 +1,10 @@ # Release History +## 12.1.0-preview.1 (2020.06) + +- Increased the maximum block size for file from 100MiB to 4000MiB(~4GB). And thereby supporting ~200TB maximum size for file. +- Added more mappings for Blob and DFS endpoints. [issue #8744](https://github.com/Azure/azure-sdk-for-js/issues/8744). + ## 12.0.1 (2020.05) - Fix data corruption failure error [issue #6411](https://github.com/Azure/azure-sdk-for-js/issues/6411) when downloading compressed files. [PR #7993](https://github.com/Azure/azure-sdk-for-js/pull/7993) diff --git a/sdk/storage/storage-file-datalake/src/clients.ts b/sdk/storage/storage-file-datalake/src/clients.ts index 3d15bb942803..5adbaaa0b7e4 100644 --- a/sdk/storage/storage-file-datalake/src/clients.ts +++ b/sdk/storage/storage-file-datalake/src/clients.ts @@ -1228,7 +1228,7 @@ export class DataLakeFileClient extends DataLakePathClient { if (numBlocks > BLOCK_BLOB_MAX_BLOCKS) { throw new RangeError( `The data's size is too big or the chunkSize is too small;` + - `the number of chunks must be <= ${BLOCK_BLOB_MAX_BLOCKS}` + `the number of chunks must be <= ${BLOCK_BLOB_MAX_BLOCKS}` ); } diff --git a/sdk/storage/storage-file-datalake/src/utils/constants.ts b/sdk/storage/storage-file-datalake/src/utils/constants.ts index 5a5474706b07..b33825674b73 100644 --- a/sdk/storage/storage-file-datalake/src/utils/constants.ts +++ b/sdk/storage/storage-file-datalake/src/utils/constants.ts @@ -11,7 +11,7 @@ export const TB: number = GB * 1024; export const DEFAULT_HIGH_LEVEL_CONCURRENCY: number = 5; export const FILE_MAX_SINGLE_UPLOAD_THRESHOLD: number = 100 * MB; -export const FILE_UPLOAD_MAX_CHUNK_SIZE: number = 100 * MB; +export const FILE_UPLOAD_MAX_CHUNK_SIZE: number = 4000 * MB; export const FILE_UPLOAD_DEFAULT_CHUNK_SIZE: number = 8 * MB; export const BLOCK_BLOB_MAX_BLOCKS: number = 50000; export const FILE_MAX_SIZE_BYTES: number = BLOCK_BLOB_MAX_BLOCKS * FILE_UPLOAD_MAX_CHUNK_SIZE; @@ -196,8 +196,24 @@ export const DevelopmentConnectionString = `DefaultEndpointsProtocol=http;Accoun // Mapping pairs to transform url from dfs endpoint to blob endpoint // Customize this value to add more mapping patterns -export const ToBlobEndpointHostMappings = [["dfs.core.windows.net", "blob.core.windows.net"]]; +export const ToBlobEndpointHostMappings = [ + ["dfs.preprod.core.windows.net", "blob.preprod.core.windows.net"], + ["dfs.core.windows.net", "blob.core.windows.net"], + ["dfs.core.chinacloudapi.cn", "blob.core.chinacloudapi.cn"], + ["dfs.core.usgovcloudapi.net", "blob.core.usgovcloudapi.net"], + ["dfs.core.cloudapi.de", "blob.core.cloudapi.de"], + ["dfs.core.microsoft.scloud", "blob.core.microsoft.scloud"], + ["dfs.core.eaglex.ic.gov", "blob.core.eaglex.ic.gov"] +]; // Mapping pairs to transform url from blob endpoint to dfs endpoint // Customize this value to add more mapping patterns -export const ToDfsEndpointHostMappings = [["blob.core.windows.net", "dfs.core.windows.net"]]; +export const ToDfsEndpointHostMappings = [ + ["blob.preprod.core.windows.net", "dfs.preprod.core.windows.net"], + ["blob.core.windows.net", "dfs.core.windows.net"], + ["blob.core.chinacloudapi.cn", "dfs.core.chinacloudapi.cn"], + ["blob.core.usgovcloudapi.net", "dfs.core.usgovcloudapi.net"], + ["blob.core.cloudapi.de", "dfs.core.cloudapi.de"], + ["blob.core.microsoft.scloud", "dfs.core.microsoft.scloud"], + ["blob.core.eaglex.ic.gov", "dfs.core.eaglex.ic.gov"] +]; diff --git a/sdk/storage/storage-file-datalake/test/node/highlevel.node.spec.ts b/sdk/storage/storage-file-datalake/test/node/highlevel.node.spec.ts index 0cc496e60584..6e6d67c58bb0 100644 --- a/sdk/storage/storage-file-datalake/test/node/highlevel.node.spec.ts +++ b/sdk/storage/storage-file-datalake/test/node/highlevel.node.spec.ts @@ -14,7 +14,8 @@ import { MB, GB, FILE_MAX_SINGLE_UPLOAD_THRESHOLD, - BLOCK_BLOB_MAX_BLOCKS + BLOCK_BLOB_MAX_BLOCKS, + FILE_UPLOAD_MAX_CHUNK_SIZE } from "../../src/utils/constants"; import { readStreamToLocalFileWithLogs } from "../../test/utils/testutils.node"; const { Readable } = require("stream"); @@ -35,7 +36,7 @@ describe("Highlevel Node.js only", () => { let recorder: any; - beforeEach(async function() { + beforeEach(async function () { recorder = record(this, recorderEnvSetup); const serviceClient = getDataLakeServiceClient(); fileSystemName = recorder.getUniqueName("filesystem"); @@ -45,14 +46,14 @@ describe("Highlevel Node.js only", () => { fileClient = fileSystemClient.getFileClient(fileName); }); - afterEach(async function() { + afterEach(async function () { if (!this.currentTest?.isPending()) { await fileSystemClient.delete(); recorder.stop(); } }); - before(async function() { + before(async function () { recorder = record(this, recorderEnvSetup); if (!fs.existsSync(tempFolderPath)) { fs.mkdirSync(tempFolderPath); @@ -65,7 +66,7 @@ describe("Highlevel Node.js only", () => { recorder.stop(); }); - after(async function() { + after(async function () { recorder = record(this, recorderEnvSetup); fs.unlinkSync(tempFileLarge); fs.unlinkSync(tempFileSmall); @@ -484,6 +485,36 @@ describe("Highlevel Node.js only", () => { fs.unlinkSync(tempFileEmpty); }); + it("uploadFile with chunkSize = FILE_UPLOAD_MAX_CHUNK_SIZE should succeed", async () => { + recorder.skip("node", "Temp file - recorder doesn't support saving the file"); + const fileSize = FILE_UPLOAD_MAX_CHUNK_SIZE * 2 + MB; + const tempFile = await createRandomLocalFile(tempFolderPath, fileSize / MB, MB); + try { + await fileClient.uploadFile(tempFile, { + chunkSize: FILE_UPLOAD_MAX_CHUNK_SIZE, + abortSignal: AbortController.timeout(20 * 1000) // takes too long to upload the file + }); + } catch (err) { + assert.equal(err.name, 'AbortError'); + } + + fs.unlinkSync(tempFile); + }).timeout(timeoutForLargeFileUploadingTest); + + // Skipped because it throw "invalid typed array length" error. Probably due to bugs underlying. + it.skip("upload with chunkSize = FILE_UPLOAD_MAX_CHUNK_SIZE should succeed", async () => { + const fileSize = FILE_UPLOAD_MAX_CHUNK_SIZE * 2 + MB; + const arrayBuf = new ArrayBuffer(fileSize); + try { + await fileClient.upload(arrayBuf, { + chunkSize: FILE_UPLOAD_MAX_CHUNK_SIZE, + abortSignal: AbortController.timeout(20 * 1000) // takes too long to upload the file + }); + } catch (err) { + assert.equal(err.name, 'AbortError'); + } + }).timeout(timeoutForLargeFileUploadingTest); + it("readToBuffer should work", async () => { recorder.skip("node", "Temp file - recorder doesn't support saving the file"); From fdff395af2ffb1bf0820275ac2d27064aa0f8f22 Mon Sep 17 00:00:00 2001 From: xiaonlimsft Date: Fri, 12 Jun 2020 17:11:47 +0800 Subject: [PATCH 15/39] [Storage] Support blob tags (recording will be added later) (#9440) * [Storage] Support blob tags (recording will be added later) * [Storage] Unify blob tags type Tags everywhere in options and responses * [Storage] Blob tags - resolve comments --- sdk/storage/storage-blob/CHANGELOG.md | 1 + .../storage-blob/review/storage-blob.api.md | 181 +++++- .../storage-blob/src/BlobDownloadResponse.ts | 11 + .../storage-blob/src/BlobSASPermissions.ts | 14 + .../src/BlobSASSignatureValues.ts | 27 +- .../storage-blob/src/BlobServiceClient.ts | 277 ++++++++- sdk/storage/storage-blob/src/Clients.ts | 552 ++++++++++++++---- .../src/ContainerSASPermissions.ts | 14 + .../storage-blob/src/generatedModels.ts | 20 +- sdk/storage/storage-blob/src/index.browser.ts | 2 +- sdk/storage/storage-blob/src/index.ts | 2 +- sdk/storage/storage-blob/src/models.ts | 5 + .../storage-blob/src/utils/utils.common.ts | 73 ++- .../storage-blob/test/blobclient.spec.ts | 93 ++- .../test/blobserviceclient.spec.ts | 71 ++- .../test/browser/highlevel.browser.spec.ts | 18 + .../test/node/highlevel.node.spec.ts | 69 ++- .../storage-blob/test/node/sas.spec.ts | 84 ++- .../test/utils/testutils.common.ts | 13 + 19 files changed, 1371 insertions(+), 156 deletions(-) diff --git a/sdk/storage/storage-blob/CHANGELOG.md b/sdk/storage/storage-blob/CHANGELOG.md index e41d10721778..1a946b8a0595 100644 --- a/sdk/storage/storage-blob/CHANGELOG.md +++ b/sdk/storage/storage-blob/CHANGELOG.md @@ -5,6 +5,7 @@ - Supported quick query. Added a new API `BlockBlobClient.query()`. - Increased the maximum block size for Block Blob from 100MiB to 4000MiB(~4GB). And thereby supporting ~200TB maximum size for Block Blob. - Added support for blob versioning. +- Supported blob tags. ## 12.1.2 (2020.05) diff --git a/sdk/storage/storage-blob/review/storage-blob.api.md b/sdk/storage/storage-blob/review/storage-blob.api.md index 76f5117189c7..fe0da7c71172 100644 --- a/sdk/storage/storage-blob/review/storage-blob.api.md +++ b/sdk/storage/storage-blob/review/storage-blob.api.md @@ -208,6 +208,7 @@ export interface AppendBlobCreateOptions extends CommonOptions { customerProvidedKey?: CpkInfo; encryptionScope?: string; metadata?: Metadata; + tags?: Tags; } // @public @@ -373,10 +374,12 @@ export class BlobClient extends StorageClient { getBlockBlobClient(): BlockBlobClient; getPageBlobClient(): PageBlobClient; getProperties(options?: BlobGetPropertiesOptions): Promise; + getTags(options?: BlobGetTagsOptions): Promise; get name(): string; setAccessTier(tier: BlockBlobTier | PremiumPageBlobTier | string, options?: BlobSetTierOptions): Promise; setHTTPHeaders(blobHTTPHeaders?: BlobHTTPHeaders, options?: BlobSetHTTPHeadersOptions): Promise; setMetadata(metadata?: Metadata, options?: BlobSetMetadataOptions): Promise; + setTags(tags: Tags, options?: BlobSetTagsOptions): Promise; syncCopyFromURL(copySource: string, options?: BlobSyncCopyFromURLOptions): Promise; undelete(options?: BlobUndeleteOptions): Promise; withSnapshot(snapshot: string): BlobClient; @@ -642,6 +645,32 @@ export type BlobGetPropertiesResponse = BlobGetPropertiesHeaders & { }; }; +// @public +export interface BlobGetTagsHeaders { + clientRequestId?: string; + date?: Date; + // (undocumented) + errorCode?: string; + requestId?: string; + version?: string; +} + +// @public +export interface BlobGetTagsOptions extends CommonOptions { + abortSignal?: AbortSignalLike; +} + +// @public +export type BlobGetTagsResponse = { + tags: Tags; +} & BlobGetTagsHeaders & { + _response: HttpResponse & { + parsedHeaders: BlobGetTagsHeaders; + bodyAsText: string; + parsedBody: BlobTags; + }; +}; + // @public export interface BlobHierarchyListSegment { // (undocumented) @@ -662,10 +691,6 @@ export interface BlobHTTPHeaders { // @public export interface BlobItem { - // Warning: (ae-forgotten-export) The symbol "BlobTags" needs to be exported by the entry point index.d.ts - // - // (undocumented) - blobTags?: BlobTags; // (undocumented) deleted: boolean; // (undocumented) @@ -685,6 +710,8 @@ export interface BlobItem { // (undocumented) snapshot: string; // (undocumented) + tags?: Tags; + // (undocumented) versionId?: string; } @@ -833,6 +860,7 @@ export class BlobSASPermissions { deleteVersion: boolean; static parse(permissions: string): BlobSASPermissions; read: boolean; + tag: boolean; toString(): string; write: boolean; } @@ -866,6 +894,7 @@ export class BlobServiceClient extends StorageClient { containerCreateResponse: ContainerCreateResponse; }>; deleteContainer(containerName: string, options?: ContainerDeleteMethodOptions): Promise; + findBlobsByTags(tagFilterSqlExpression: string, options?: ServiceFindBlobByTagsOptions): PagedAsyncIterableIterator; static fromConnectionString(connectionString: string, options?: StoragePipelineOptions): BlobServiceClient; getAccountInfo(options?: ServiceGetAccountInfoOptions): Promise; getBlobBatchClient(): BlobBatchClient; @@ -957,6 +986,28 @@ export type BlobSetMetadataResponse = BlobSetMetadataHeaders & { }; }; +// @public +export interface BlobSetTagsHeaders { + clientRequestId?: string; + date?: Date; + // (undocumented) + errorCode?: string; + requestId?: string; + version?: string; +} + +// @public +export interface BlobSetTagsOptions extends CommonOptions { + abortSignal?: AbortSignalLike; +} + +// @public +export type BlobSetTagsResponse = BlobSetTagsHeaders & { + _response: coreHttp.HttpResponse & { + parsedHeaders: BlobSetTagsHeaders; + }; +}; + // @public export interface BlobSetTierHeaders { clientRequestId?: string; @@ -1002,6 +1053,7 @@ export interface BlobStartCopyFromURLOptions extends CommonOptions { metadata?: Metadata; rehydratePriority?: RehydratePriority; sourceConditions?: ModifiedAccessConditions; + tags?: Tags; tier?: BlockBlobTier | PremiumPageBlobTier | string; } @@ -1019,6 +1071,21 @@ export interface BlobSyncCopyFromURLOptions extends CommonOptions { metadata?: Metadata; sourceConditions?: ModifiedAccessConditions; sourceContentMD5?: Uint8Array; + tags?: Tags; +} + +// @public +export interface BlobTag { + // (undocumented) + key: string; + // (undocumented) + value: string; +} + +// @public +export interface BlobTags { + // (undocumented) + blobTagSet: BlobTag[]; } // @public @@ -1101,6 +1168,7 @@ export interface BlockBlobCommitBlockListOptions extends CommonOptions { customerProvidedKey?: CpkInfo; encryptionScope?: string; metadata?: Metadata; + tags?: Tags; tier?: BlockBlobTier | string; } @@ -1153,6 +1221,7 @@ export interface BlockBlobParallelUploadOptions extends CommonOptions { [propertyName: string]: string; }; onProgress?: (progress: TransferProgressEvent) => void; + tags?: Tags; } // @public @@ -1265,6 +1334,7 @@ export interface BlockBlobUploadOptions extends CommonOptions { encryptionScope?: string; metadata?: Metadata; onProgress?: (progress: TransferProgressEvent) => void; + tags?: Tags; tier?: BlockBlobTier | string; } @@ -1285,6 +1355,7 @@ export interface BlockBlobUploadStreamOptions extends CommonOptions { [propertyName: string]: string; }; onProgress?: (progress: TransferProgressEvent) => void; + tags?: Tags; } // @public @@ -1522,10 +1593,10 @@ export interface ContainerListBlobFlatSegmentHeaders { // @public export type ContainerListBlobFlatSegmentResponse = ListBlobsFlatSegmentResponse & ContainerListBlobFlatSegmentHeaders & { - _response: coreHttp.HttpResponse & { + _response: HttpResponse & { parsedHeaders: ContainerListBlobFlatSegmentHeaders; bodyAsText: string; - parsedBody: ListBlobsFlatSegmentResponse; + parsedBody: ListBlobsFlatSegmentResponseModel; }; }; @@ -1542,10 +1613,10 @@ export interface ContainerListBlobHierarchySegmentHeaders { // @public export type ContainerListBlobHierarchySegmentResponse = ListBlobsHierarchySegmentResponse & ContainerListBlobHierarchySegmentHeaders & { - _response: coreHttp.HttpResponse & { + _response: HttpResponse & { parsedHeaders: ContainerListBlobHierarchySegmentHeaders; bodyAsText: string; - parsedBody: ListBlobsHierarchySegmentResponse; + parsedBody: ListBlobsHierarchySegmentResponseModel; }; }; @@ -1556,6 +1627,7 @@ export interface ContainerListBlobsOptions extends CommonOptions { includeDeleted?: boolean; includeMetadata?: boolean; includeSnapshots?: boolean; + includeTags?: boolean; includeUncommitedBlobs?: boolean; includeVersions?: boolean; prefix?: string; @@ -1605,6 +1677,7 @@ export class ContainerSASPermissions { list: boolean; static parse(permissions: string): ContainerSASPermissions; read: boolean; + tag: boolean; toString(): string; write: boolean; } @@ -1705,6 +1778,28 @@ export { deserializationPolicy } // @public export type EncryptionAlgorithmType = 'AES256'; +// @public +export interface FilterBlobItem { + // (undocumented) + containerName: string; + // (undocumented) + name: string; + // (undocumented) + tagValue: string; +} + +// @public +export interface FilterBlobSegment { + // (undocumented) + blobs: FilterBlobItem[]; + // (undocumented) + continuationToken?: string; + // (undocumented) + serviceEndpoint: string; + // (undocumented) + where: string; +} + // @public export function generateAccountSASQueryParameters(accountSASSignatureValues: AccountSASSignatureValues, sharedKeyCredential: StorageSharedKeyCredential): SASQueryParameters; @@ -1788,6 +1883,26 @@ export interface ListBlobsFlatSegmentResponse { serviceEndpoint: string; } +// @public +export interface ListBlobsFlatSegmentResponseModel { + // (undocumented) + containerName: string; + // (undocumented) + continuationToken?: string; + // (undocumented) + marker?: string; + // (undocumented) + maxPageSize?: number; + // (undocumented) + prefix?: string; + // Warning: (ae-forgotten-export) The symbol "BlobFlatListSegment" needs to be exported by the entry point index.d.ts + // + // (undocumented) + segment: BlobFlatListSegment_2; + // (undocumented) + serviceEndpoint: string; +} + // @public export interface ListBlobsHierarchySegmentResponse { // (undocumented) @@ -1808,6 +1923,28 @@ export interface ListBlobsHierarchySegmentResponse { serviceEndpoint: string; } +// @public +export interface ListBlobsHierarchySegmentResponseModel { + // (undocumented) + containerName: string; + // (undocumented) + continuationToken?: string; + // (undocumented) + delimiter?: string; + // (undocumented) + marker?: string; + // (undocumented) + maxPageSize?: number; + // (undocumented) + prefix?: string; + // Warning: (ae-forgotten-export) The symbol "BlobHierarchyListSegment" needs to be exported by the entry point index.d.ts + // + // (undocumented) + segment: BlobHierarchyListSegment_2; + // (undocumented) + serviceEndpoint: string; +} + // @public export type ListBlobsIncludeItem = 'copy' | 'deleted' | 'metadata' | 'snapshots' | 'uncommittedblobs' | 'versions' | 'tags'; @@ -1964,6 +2101,7 @@ export interface PageBlobCreateOptions extends CommonOptions { customerProvidedKey?: CpkInfo; encryptionScope?: string; metadata?: Metadata; + tags?: Tags; tier?: PremiumPageBlobTier | string; } @@ -2280,6 +2418,30 @@ export interface SequenceNumberAccessConditions { // @public export type SequenceNumberActionType = 'max' | 'update' | 'increment'; +// @public +export interface ServiceFilterBlobsHeaders { + clientRequestId?: string; + date?: Date; + // (undocumented) + errorCode?: string; + requestId?: string; + version?: string; +} + +// @public +export interface ServiceFindBlobByTagsOptions extends CommonOptions { + abortSignal?: AbortSignalLike; +} + +// @public +export type ServiceFindBlobsByTagsSegmentResponse = FilterBlobSegment & ServiceFilterBlobsHeaders & { + _response: coreHttp.HttpResponse & { + parsedHeaders: ServiceFilterBlobsHeaders; + bodyAsText: string; + parsedBody: FilterBlobSegment; + }; +}; + // @public export interface ServiceGetAccountInfoHeaders { accountKind?: AccountKind; @@ -2543,6 +2705,9 @@ export class StorageSharedKeyCredentialPolicy extends CredentialPolicy { // @public export type SyncCopyStatusType = 'success'; +// @public +export type Tags = Record; + // @public export interface UserDelegationKey { signedExpiresOn: Date; diff --git a/sdk/storage/storage-blob/src/BlobDownloadResponse.ts b/sdk/storage/storage-blob/src/BlobDownloadResponse.ts index 1f11f951f733..4bb14770c1aa 100644 --- a/sdk/storage/storage-blob/src/BlobDownloadResponse.ts +++ b/sdk/storage/storage-blob/src/BlobDownloadResponse.ts @@ -322,6 +322,17 @@ export class BlobDownloadResponse implements BlobDownloadResponseModel { return this.originalResponse.etag; } + /** + * The number of tags associated with the blob + * + * @readonly + * @type {(number | undefined)} + * @memberof BlobDownloadResponse + */ + public get tagCount(): number | undefined { + return this.originalResponse.tagCount; + } + /** * The error code. * diff --git a/sdk/storage/storage-blob/src/BlobSASPermissions.ts b/sdk/storage/storage-blob/src/BlobSASPermissions.ts index 792577c496e1..6c12d7cd7639 100644 --- a/sdk/storage/storage-blob/src/BlobSASPermissions.ts +++ b/sdk/storage/storage-blob/src/BlobSASPermissions.ts @@ -46,6 +46,9 @@ export class BlobSASPermissions { case "x": blobSASPermissions.deleteVersion = true; break; + case "t": + blobSASPermissions.tag = true; + break; default: throw new RangeError(`Invalid permission: ${char}`); } @@ -102,6 +105,14 @@ export class BlobSASPermissions { */ public deleteVersion: boolean = false; + /** + * Specfies Tag access granted. + * + * @type {boolean} + * @memberof BlobSASPermissions + */ + public tag: boolean = false; + /** * Converts the given permissions to a string. Using this method will guarantee the permissions are in an * order accepted by the service. @@ -129,6 +140,9 @@ export class BlobSASPermissions { if (this.deleteVersion) { permissions.push("x"); } + if (this.tag) { + permissions.push("t"); + } return permissions.join(""); } } diff --git a/sdk/storage/storage-blob/src/BlobSASSignatureValues.ts b/sdk/storage/storage-blob/src/BlobSASSignatureValues.ts index c9970f3be8b7..b3eff14da424 100644 --- a/sdk/storage/storage-blob/src/BlobSASSignatureValues.ts +++ b/sdk/storage/storage-blob/src/BlobSASSignatureValues.ts @@ -306,6 +306,7 @@ export function generateBlobSASQueryParameters( throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName."); } + // Version 2019-12-12 adds support for the blob tags permission. // Version 2018-11-09 adds support for the signed resource and signed blob snapshot time fields. // https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas#constructing-the-signature-string if (version >= "2018-11-09") { @@ -355,7 +356,8 @@ function generateBlobSASQueryParameters20150405( ): SASQueryParameters { if ( !blobSASSignatureValues.identifier && - !blobSASSignatureValues.permissions && !blobSASSignatureValues.expiresOn + !blobSASSignatureValues.permissions && + !blobSASSignatureValues.expiresOn ) { throw new RangeError( "Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided." @@ -374,6 +376,10 @@ function generateBlobSASQueryParameters20150405( throw RangeError("'version' must be >= '2019-10-10' when provided 'versionId'."); } + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.tag) { + throw RangeError("'version' must be >= '2019-12-12' when provided 't' permission."); + } + if (blobSASSignatureValues.blobName) { resource = "b"; } @@ -461,7 +467,8 @@ function generateBlobSASQueryParameters20181109( ): SASQueryParameters { if ( !blobSASSignatureValues.identifier && - !blobSASSignatureValues.permissions && !blobSASSignatureValues.expiresOn + !blobSASSignatureValues.permissions && + !blobSASSignatureValues.expiresOn ) { throw new RangeError( "Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided." @@ -472,6 +479,18 @@ function generateBlobSASQueryParameters20181109( let resource: string = "c"; let verifiedPermissions: string | undefined; + if (blobSASSignatureValues.versionId && version < "2019-10-10") { + throw RangeError("'version' must be >= '2019-10-10' when provided 'versionId'."); + } + + if ( + blobSASSignatureValues.permissions && + blobSASSignatureValues.permissions.tag && + version < "2019-12-12" + ) { + throw RangeError("'version' must be >= '2019-12-12' when provided 't' permission."); + } + if (blobSASSignatureValues.blobName === undefined && blobSASSignatureValues.snapshotTime) { throw RangeError("Must provide 'blobName' when provided 'snapshotTime'."); } @@ -578,6 +597,10 @@ function generateBlobSASQueryParametersUDK20181109( ); } + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.tag) { + throw RangeError("'version' must be >= '2019-12-12' when provided 't' permission."); + } + const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; let resource: string = "c"; let verifiedPermissions: string | undefined; diff --git a/sdk/storage/storage-blob/src/BlobServiceClient.ts b/sdk/storage/storage-blob/src/BlobServiceClient.ts index 4ad33f0eb288..fff24db33399 100644 --- a/sdk/storage/storage-blob/src/BlobServiceClient.ts +++ b/sdk/storage/storage-blob/src/BlobServiceClient.ts @@ -21,7 +21,9 @@ import { ServiceListContainersSegmentResponse, ContainerItem, ListContainersIncludeType, - UserDelegationKeyModel + UserDelegationKeyModel, + ServiceFindBlobsByTagsSegmentResponse, + FilterBlobItem } from "./generatedModels"; import { Service } from "./generated/src/operations"; import { newPipeline, StoragePipelineOptions, Pipeline } from "./Pipeline"; @@ -158,6 +160,34 @@ interface ServiceListContainersSegmentOptions extends CommonOptions { include?: ListContainersIncludeType | ListContainersIncludeType[]; } +/** + * Options to configure the {@link BlobServiceClient.findBlobsByTagsSegment} operation. + * + * @interface ServiceFindBlobsByTagsSegmentOptions + */ +interface ServiceFindBlobsByTagsSegmentOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ServiceFindBlobsByTagsSegmentOptions + */ + abortSignal?: AbortSignalLike; + /** + * Specifies the maximum number of blobs + * to return. If the request does not specify maxPageSize, or specifies a + * value greater than 5000, the server will return up to 5000 items. Note + * that if the listing operation crosses a partition boundary, then the + * service will return a continuation token for retrieving the remainder of + * the results. For this reason, it is possible that the service will return + * fewer results than specified by maxPageSize, or than the default of 5000. + * @type {number} + * @memberof ServiceFindBlobsByTagsSegmentOptions + */ + maxPageSize?: number; +} + /** * Options to configure the {@link BlobServiceClient.listContainers} operation. * @@ -185,6 +215,23 @@ export interface ServiceListContainersOptions extends CommonOptions { includeMetadata?: boolean; } +/** + * Options to configure the {@link BlobServiceClient.findBlobsByTags} operation. + * + * @export + * @interface ServiceFindBlobByTagsOptions + */ +export interface ServiceFindBlobByTagsOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ServiceListContainersOptions + */ + abortSignal?: AbortSignalLike; +} + /** * A user delegation key. */ @@ -669,6 +716,234 @@ export class BlobServiceClient extends StorageClient { } } + /** + * The Filter Blobs operation enables callers to list blobs across all containers whose tags + * match a given search expression. Filter blobs searches across all containers within a + * storage account but can be scoped within the expression to a single container. + * + * @private + * @param {string} tagFilterSqlExpression The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param {string} [marker] A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the NextMarker value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The NextMarker value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param {ServiceFindBlobsByTagsSegmentOptions} [options={}] Options to find blobs by tags. + * @returns {Promise} + * @memberof BlobServiceClient + */ + private async findBlobsByTagsSegment( + tagFilterSqlExpression: string, + marker?: string, + options: ServiceFindBlobsByTagsSegmentOptions = {} + ): Promise { + // TODO: Rename response.blobs to response.blobItems? + const { span, spanOptions } = createSpan( + "BlobServiceClient-findBlobsByTagsSegment", + options.tracingOptions + ); + + try { + return await this.serviceContext.filterBlobs({ + abortSignal: options.abortSignal, + where: tagFilterSqlExpression, + marker, + maxPageSize: options.maxPageSize, + spanOptions + }); + } catch (e) { + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e.message + }); + throw e; + } finally { + span.end(); + } + } + + /** + * Returns an AsyncIterableIterator for ServiceFindBlobsByTagsSegmentResponse. + * + * @private + * @param {string} tagFilterSqlExpression The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param {string} [marker] A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the NextMarker value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The NextMarker value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param {ServiceFindBlobsByTagsSegmentOptions} [options={}] Options to find blobs by tags. + * @returns {AsyncIterableIterator} + * @memberof BlobServiceClient + */ + private async *findBlobsByTagsSegments( + tagFilterSqlExpression: string, + marker?: string, + options: ServiceFindBlobsByTagsSegmentOptions = {} + ): AsyncIterableIterator { + let response; + if (!!marker || marker === undefined) { + do { + response = await this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options); + response.blobs = response.blobs || []; + marker = response.continuationToken; + yield response; + } while (marker); + } + } + + /** + * Returns an AsyncIterableIterator for blobs. + * + * @private + * @param {string} tagFilterSqlExpression The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param {ServiceFindBlobsByTagsSegmentOptions} [options={}] Options to findBlobsByTagsItems. + * @returns {AsyncIterableIterator} + * @memberof BlobServiceClient + */ + private async *findBlobsByTagsItems( + tagFilterSqlExpression: string, + options: ServiceFindBlobsByTagsSegmentOptions = {} + ): AsyncIterableIterator { + let marker: string | undefined; + for await (const segment of this.findBlobsByTagsSegments( + tagFilterSqlExpression, + marker, + options + )) { + yield* segment.blobs; + } + } + + /** + * Returns an async iterable iterator to find all blobs with specified tag + * under the specified account. + * + * .byPage() returns an async iterable iterator to list the blobs in pages. + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties + * + * Example using `for await` syntax: + * + * ```js + * let i = 1; + * for await (const blob of blobServiceClient.findBlobsByTags("tagkey='tagvalue'")) { + * console.log(`Blob ${i++}: ${container.name}`); + * } + * ``` + * + * Example using `iter.next()`: + * + * ```js + * let i = 1; + * const iter = blobServiceClient.findBlobsByTags("tagkey='tagvalue'"); + * let blobItem = await iter.next(); + * while (!blobItem.done) { + * console.log(`Blob ${i++}: ${blobItem.value.name}`); + * blobItem = await iter.next(); + * } + * ``` + * + * Example using `byPage()`: + * + * ```js + * // passing optional maxPageSize in the page settings + * let i = 1; + * for await (const response of blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) { + * if (response.blobs) { + * for (const blob of response.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * } + * ``` + * + * Example using paging with a marker: + * + * ```js + * let i = 1; + * let iterator = blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * + * // Prints 2 blob names + * if (response.blobs) { + * for (const blob of response.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = blobServiceClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * + * // Prints blob names + * if (response.blobs) { + * for (const blob of response.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * ``` + * + * @param {string} tagFilterSqlExpression The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param {ServiceFindBlobByTagsOptions} [options={}] Options to find blobs by tags. + * @returns {PagedAsyncIterableIterator} + * @memberof BlobServiceClient + */ + public findBlobsByTags( + tagFilterSqlExpression: string, + options: ServiceFindBlobByTagsOptions = {} + ): PagedAsyncIterableIterator { + // AsyncIterableIterator to iterate over blobs + const listSegmentOptions: ServiceFindBlobsByTagsSegmentOptions = { + ...options + }; + + const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); + return { + /** + * @member {Promise} [next] The next method, part of the iteration protocol + */ + next() { + return iter.next(); + }, + /** + * @member {Symbol} [asyncIterator] The connection to the async iterator, part of the iteration protocol + */ + [Symbol.asyncIterator]() { + return this; + }, + /** + * @member {Function} [byPage] Return an AsyncIterableIterator that works a page at a time + */ + byPage: (settings: PageSettings = {}) => { + return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions + }); + } + }; + } + /** * Returns an AsyncIterableIterator for ServiceListContainersSegmentResponses * diff --git a/sdk/storage/storage-blob/src/Clients.ts b/sdk/storage/storage-blob/src/Clients.ts index 0e3df04274d5..4fcc9565e5b6 100644 --- a/sdk/storage/storage-blob/src/Clients.ts +++ b/sdk/storage/storage-blob/src/Clients.ts @@ -1,142 +1,146 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +import "@azure/core-paging"; + +import * as fs from "fs"; +import { Readable } from "stream"; + +import { AbortSignalLike } from "@azure/abort-controller"; import { + generateUuid, + getDefaultProxySettings, + HttpRequestBody, + HttpResponse, isNode, - TransferProgressEvent, - TokenCredential, isTokenCredential, - getDefaultProxySettings, + TokenCredential, + TransferProgressEvent, URLBuilder } from "@azure/core-http"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; import { CanonicalCode } from "@opentelemetry/api"; + +import { BlobDownloadResponse } from "./BlobDownloadResponse"; +import { BlobQueryResponse } from "./BlobQueryResponse"; +import { AnonymousCredential } from "./credentials/AnonymousCredential"; +import { StorageSharedKeyCredential } from "./credentials/StorageSharedKeyCredential"; import { - BlobDownloadResponseModel, - CpkInfo, - DeleteSnapshotsOptionType, - ModifiedAccessConditions, - RehydratePriority, - LeaseAccessConditions, + AppendBlob, + Blob as StorageBlob, + BlockBlob, + Container, + PageBlob +} from "./generated/src/operations"; +import { StorageClientContext } from "./generated/src/storageClient"; +import { + AppendBlobAppendBlockFromUrlResponse, + AppendBlobAppendBlockResponse, + AppendBlobCreateResponse, + BlobAbortCopyFromURLResponse, + BlobCopyFromURLResponse, + BlobCreateSnapshotResponse, + BlobDeleteResponse, BlobDownloadOptionalParams, + BlobDownloadResponseModel, BlobGetPropertiesResponse, - BlobDeleteResponse, - BlobUndeleteResponse, BlobHTTPHeaders, + BlobPrefix, BlobSetHTTPHeadersResponse, BlobSetMetadataResponse, - BlobCreateSnapshotResponse, - BlobStartCopyFromURLResponse, - BlobAbortCopyFromURLResponse, - BlobCopyFromURLResponse, + BlobSetTagsResponse, BlobSetTierResponse, - ContainerEncryptionScope + BlobStartCopyFromURLResponse, + BlobUndeleteResponse, + BlockBlobCommitBlockListResponse, + BlockBlobGetBlockListResponse, + BlockBlobStageBlockFromURLResponse, + BlockBlobStageBlockResponse, + BlockBlobUploadHeaders, + BlockBlobUploadResponse, + BlockListType, + ContainerBreakLeaseOptionalParams, + ContainerCreateResponse, + ContainerDeleteResponse, + ContainerEncryptionScope, + ContainerGetAccessPolicyHeaders, + ContainerGetPropertiesResponse, + ContainerSetAccessPolicyResponse, + ContainerSetMetadataResponse, + CpkInfo, + DeleteSnapshotsOptionType, + LeaseAccessConditions, + ListBlobsIncludeItem, + ModifiedAccessConditions, + PageBlobClearPagesResponse, + PageBlobCopyIncrementalResponse, + PageBlobCreateResponse, + PageBlobResizeResponse, + PageBlobUpdateSequenceNumberResponse, + PageBlobUploadPagesFromURLResponse, + PageBlobUploadPagesResponse, + PublicAccessType, + RehydratePriority, + SequenceNumberActionType, + SignedIdentifierModel, + BlobGetTagsHeaders, + BlobTags, + ListBlobsFlatSegmentResponseModel, + ContainerListBlobFlatSegmentHeaders, + BlobProperties, + ContainerListBlobHierarchySegmentHeaders, + ListBlobsHierarchySegmentResponseModel } from "./generatedModels"; -import { AbortSignalLike } from "@azure/abort-controller"; -import { BlobDownloadResponse } from "./BlobDownloadResponse"; -import { Blob as StorageBlob } from "./generated/src/operations"; -import { rangeToString } from "./Range"; import { + AppendBlobRequestConditions, BlobRequestConditions, - Metadata, - ensureCpkIfSpecified, BlockBlobTier, + ensureCpkIfSpecified, + Metadata, + Tags, + PageBlobRequestConditions, PremiumPageBlobTier, toAccessTier } from "./models"; -import { newPipeline, StoragePipelineOptions, Pipeline } from "./Pipeline"; -import { - DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS, - URLConstants, - DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES, - DEFAULT_BLOCK_BUFFER_SIZE_BYTES -} from "./utils/constants"; -import { - setURLParameter, - extractConnectionStringParts, - appendToURLPath, - toQuerySerialization -} from "./utils/utils.common"; -import { fsStat, readStreamToLocalFile, streamToBuffer } from "./utils/utils.node"; -import { StorageSharedKeyCredential } from "./credentials/StorageSharedKeyCredential"; -import { AnonymousCredential } from "./credentials/AnonymousCredential"; -import { Batch } from "./utils/Batch"; -import { createSpan } from "./utils/tracing"; -import { HttpRequestBody } from "@azure/core-http"; -import { - AppendBlobCreateResponse, - AppendBlobAppendBlockFromUrlResponse, - AppendBlobAppendBlockResponse -} from "./generatedModels"; -import { AppendBlob } from "./generated/src/operations"; -import { AppendBlobRequestConditions } from "./models"; -import { CommonOptions, StorageClient } from "./StorageClient"; -import * as fs from "fs"; -import { generateUuid, HttpResponse } from "@azure/core-http"; -import { - BlockBlobUploadHeaders, - BlockBlobUploadResponse, - BlockBlobStageBlockResponse, - BlockBlobStageBlockFromURLResponse, - BlockBlobCommitBlockListResponse, - BlockBlobGetBlockListResponse, - BlockListType -} from "./generatedModels"; -import { BlockBlob } from "./generated/src/operations"; -import { Range } from "./Range"; -import { generateBlockID } from "./utils/utils.common"; -import { - BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES, - BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES, - BLOCK_BLOB_MAX_BLOCKS -} from "./utils/constants"; -import { BufferScheduler } from "./utils/BufferScheduler"; -import { Readable } from "stream"; -import { - PageBlobCreateResponse, - PageBlobUploadPagesResponse, - PageBlobUploadPagesFromURLResponse, - PageBlobClearPagesResponse, - PageBlobResizeResponse, - SequenceNumberActionType, - PageBlobUpdateSequenceNumberResponse, - PageBlobCopyIncrementalResponse -} from "./generatedModels"; -import { PageBlob } from "./generated/src/operations"; -import { PageBlobRequestConditions } from "./models"; import { PageBlobGetPageRangesDiffResponse, PageBlobGetPageRangesResponse, rangeResponseFromModel } from "./PageBlobRangeResponse"; +import { newPipeline, Pipeline, StoragePipelineOptions } from "./Pipeline"; import { BlobBeginCopyFromUrlPoller, BlobBeginCopyFromUrlPollState, CopyPollerBlobClient } from "./pollers/BlobStartCopyFromUrlPoller"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; -import { ContainerBreakLeaseOptionalParams } from "./generatedModels"; -import { StorageClientContext } from "./generated/src/storageClient"; +import { Range, rangeToString } from "./Range"; +import { CommonOptions, StorageClient } from "./StorageClient"; +import { Batch } from "./utils/Batch"; +import { BufferScheduler } from "./utils/BufferScheduler"; import { - ContainerGetAccessPolicyHeaders, - SignedIdentifierModel, - PublicAccessType, - ListBlobsIncludeItem, - ContainerCreateResponse, - ContainerGetPropertiesResponse, - ContainerDeleteResponse, - ContainerSetMetadataResponse, - ContainerSetAccessPolicyResponse, - ContainerListBlobFlatSegmentResponse, - ContainerListBlobHierarchySegmentResponse, - BlobItem, - BlobPrefix -} from "./generatedModels"; -import { Container } from "./generated/src/operations"; -import { ETagNone } from "./utils/constants"; -import { truncatedISO8061Date } from "./utils/utils.common"; -import "@azure/core-paging"; -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { BlobQueryResponse } from "./BlobQueryResponse"; + BLOCK_BLOB_MAX_BLOCKS, + BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES, + BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES, + DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES, + DEFAULT_BLOCK_BUFFER_SIZE_BYTES, + DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS, + ETagNone, + URLConstants +} from "./utils/constants"; +import { createSpan } from "./utils/tracing"; +import { + appendToURLPath, + extractConnectionStringParts, + generateBlockID, + setURLParameter, + toBlobTagsString, + toQuerySerialization, + truncatedISO8061Date, + toBlobTags, + toTags +} from "./utils/utils.common"; +import { fsStat, readStreamToLocalFile, streamToBuffer } from "./utils/utils.node"; +import { PageSettings, PagedAsyncIterableIterator } from "@azure/core-paging"; /** * Options to configure the {@link BlobClient.beginCopyFromURL} operation. @@ -461,6 +465,65 @@ export interface BlobSetMetadataOptions extends CommonOptions { encryptionScope?: string; } +/** + * Options to configure the {@link BlobClient.setTags} operation. + * + * @export + * @interface BlobSetTagsOptions + */ +export interface BlobSetTagsOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobSetTagsOptions + */ + abortSignal?: AbortSignalLike; +} + +/** + * Options to configure the {@link BlobClient.getTags} operation. + * + * @export + * @interface BlobGetTagsOptions + */ +export interface BlobGetTagsOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobGetTagsOptions + */ + abortSignal?: AbortSignalLike; +} + +/** + * Contains response data for the {@link ContainerClient.getTags} operation. + */ +export type BlobGetTagsResponse = { tags: Tags } & BlobGetTagsHeaders & { + /** + * The underlying HTTP response. + */ + _response: HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlobGetTagsHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BlobTags; + }; + }; + /** * Options to configure Blob - Acquire Lease operation. * @@ -681,6 +744,13 @@ export interface BlobStartCopyFromURLOptions extends CommonOptions { * @memberof BlobStartCopyFromURLOptions */ rehydratePriority?: RehydratePriority; + /** + * Blob tags. + * + * @type {Tags} + * @memberof BlobStartCopyFromURLOptions + */ + tags?: Tags; } /** @@ -751,6 +821,13 @@ export interface BlobSyncCopyFromURLOptions extends CommonOptions { * @memberof BlobSyncCopyFromURLOptions */ sourceContentMD5?: Uint8Array; + /** + * Blob tags. + * + * @type {Tags} + * @memberof BlobSyncCopyFromURLOptions + */ + tags?: Tags; } /** @@ -1497,6 +1574,66 @@ export class BlobClient extends StorageClient { } } + /** + * Sets tags on the underlying blob. + * A blob can have up to 10 tags. Tag keys must be between 1 and 128 characters. Tag values must be between 0 and 256 characters. + * Valid tag key and value characters include lower and upper case letters, digits (0-9), + * space (' '), plus ('+'), minus ('-'), period ('.'), foward slash ('/'), colon (':'), equals ('='), and underscore ('_'). + * + * @param {Tags} tags + * @param {BlobSetTagsOptions} [options={}] + * @returns {Promise} + * @memberof BlobClient + */ + public async setTags(tags: Tags, options: BlobSetTagsOptions = {}): Promise { + const { span, spanOptions } = createSpan("BlobClient-setTags", options.tracingOptions); + try { + return await this.blobContext.setTags({ + abortSignal: options.abortSignal, + spanOptions, + tags: toBlobTags(tags) + }); + } catch (e) { + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e.message + }); + throw e; + } finally { + span.end(); + } + } + + /** + * Gets the tags associated with the underlying blob. + * + * @param {BlobGetTagsOptions} [options={}] + * @returns {Promise} + * @memberof BlobClient + */ + public async getTags(options: BlobGetTagsOptions = {}): Promise { + const { span, spanOptions } = createSpan("BlobClient-getTags", options.tracingOptions); + try { + const response = await this.blobContext.getTags({ + abortSignal: options.abortSignal, + spanOptions + }); + const wrappedResponse: BlobGetTagsResponse = { + ...response, + tags: toTags({ blobTagSet: response.blobTagSet }) || {} + }; + return wrappedResponse; + } catch (e) { + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e.message + }); + throw e; + } finally { + span.end(); + } + } + /** * Get a {@link BlobLeaseClient} that manages leases on the blob. * @@ -1705,6 +1842,7 @@ export class BlobClient extends StorageClient { sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince }, sourceContentMD5: options.sourceContentMD5, + blobTagsString: toBlobTagsString(options.tags), spanOptions }); } catch (e) { @@ -2059,6 +2197,7 @@ export class BlobClient extends StorageClient { }, rehydratePriority: options.rehydratePriority, tier: toAccessTier(options.tier), + blobTagsString: toBlobTagsString(options.tags), spanOptions }); } catch (e) { @@ -2127,6 +2266,13 @@ export interface AppendBlobCreateOptions extends CommonOptions { * @memberof AppendBlobCreateOptions */ encryptionScope?: string; + /** + * Blob tags. + * + * @type {Tags} + * @memberof AppendBlobCreateOptions + */ + tags?: Tags; } /** @@ -2480,6 +2626,7 @@ export class AppendBlobClient extends BlobClient { modifiedAccessConditions: options.conditions, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, + blobTagsString: toBlobTagsString(options.tags), spanOptions }); } catch (e) { @@ -2683,6 +2830,13 @@ export interface BlockBlobUploadOptions extends CommonOptions { * @memberof BlockBlobUploadOptions */ tier?: BlockBlobTier | string; + /** + * Blob tags. + * + * @type {Tags} + * @memberof BlockBlobUploadOptions + */ + tags?: Tags; } /** @@ -3058,6 +3212,14 @@ export interface BlockBlobCommitBlockListOptions extends CommonOptions { * @memberof BlockBlobCommitBlockListOptions */ tier?: BlockBlobTier | string; + + /** + * Blob tags. + * + * @type {Tags} + * @memberof BlockBlobCommitBlockListOptions + */ + tags?: Tags; } /** @@ -3143,6 +3305,14 @@ export interface BlockBlobUploadStreamOptions extends CommonOptions { * @memberof BlockBlobUploadStreamOptions */ encryptionScope?: string; + + /** + * Blob tags. + * + * @type {Tags} + * @memberof BlockBlobUploadStreamOptions + */ + tags?: Tags; } /** * Option interface for {@link BlockBlobClient.uploadFile} and {@link BlockBlobClient.uploadSeekableStream}. @@ -3229,6 +3399,14 @@ export interface BlockBlobParallelUploadOptions extends CommonOptions { * @memberof BlockBlobParallelUploadOptions */ encryptionScope?: string; + + /** + * Blob tags. + * + * @type {Tags} + * @memberof BlockBlobParallelUploadOptions + */ + tags?: Tags; } /** @@ -3557,6 +3735,7 @@ export class BlockBlobClient extends BlobClient { cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, tier: toAccessTier(options.tier), + blobTagsString: toBlobTagsString(options.tags), spanOptions }); } catch (e) { @@ -3703,6 +3882,7 @@ export class BlockBlobClient extends BlobClient { cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, tier: toAccessTier(options.tier), + blobTagsString: toBlobTagsString(options.tags), spanOptions } ); @@ -4266,6 +4446,13 @@ export interface PageBlobCreateOptions extends CommonOptions { * @memberof PageBlobCreateOptions */ tier?: PremiumPageBlobTier | string; + /** + * Blob tags. + * + * @type {Tags} + * @memberof PageBlobCreateOptions + */ + tags?: Tags; } /** @@ -4788,6 +4975,7 @@ export class PageBlobClient extends BlobClient { cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, tier: toAccessTier(options.tier), + blobTagsString: toBlobTagsString(options.tags), spanOptions }); } catch (e) { @@ -5934,6 +6122,115 @@ interface ContainerListBlobsSegmentOptions extends CommonOptions { include?: ListBlobsIncludeItem[]; } +/** + * An interface representing BlobHierarchyListSegment. + */ +export interface BlobHierarchyListSegment { + blobPrefixes?: BlobPrefix[]; + blobItems: BlobItem[]; +} + +/** + * An enumeration of blobs + */ +export interface ListBlobsHierarchySegmentResponse { + serviceEndpoint: string; + containerName: string; + prefix?: string; + marker?: string; + maxPageSize?: number; + delimiter?: string; + segment: BlobHierarchyListSegment; + continuationToken?: string; +} + +/** + * Contains response data for the listBlobHierarchySegment operation. + */ +export type ContainerListBlobHierarchySegmentResponse = ListBlobsHierarchySegmentResponse & + ContainerListBlobHierarchySegmentHeaders & { + /** + * The underlying HTTP response. + */ + _response: HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ContainerListBlobHierarchySegmentHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ListBlobsHierarchySegmentResponseModel; + }; + }; + +/** + * An Azure Storage blob + */ +export interface BlobItem { + name: string; + deleted: boolean; + snapshot: string; + versionId?: string; + isCurrentVersion?: boolean; + properties: BlobProperties; + metadata?: { [propertyName: string]: string }; + tags?: Tags; + objectReplicationMetadata?: { [propertyName: string]: string }; +} + +/** + * An interface representing BlobFlatListSegment. + */ +export interface BlobFlatListSegment { + blobItems: BlobItem[]; +} + +/** + * An enumeration of blobs + */ +export interface ListBlobsFlatSegmentResponse { + serviceEndpoint: string; + containerName: string; + prefix?: string; + marker?: string; + maxPageSize?: number; + segment: BlobFlatListSegment; + continuationToken?: string; +} + +/** + * Contains response data for the listBlobFlatSegment operation. + */ +export type ContainerListBlobFlatSegmentResponse = ListBlobsFlatSegmentResponse & + ContainerListBlobFlatSegmentHeaders & { + /** + * The underlying HTTP response. + */ + _response: HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ContainerListBlobFlatSegmentHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ListBlobsFlatSegmentResponseModel; + }; + }; + /** * Options to configure Container - List Blobs operations. * @@ -5983,6 +6280,10 @@ export interface ContainerListBlobsOptions extends CommonOptions { * Specifies whether blobs for which blocks have been uploaded, but which have not been committed using Put Block List, be included in the response. */ includeUncommitedBlobs?: boolean; + /** + * Specifies whether blob tags be returned in the response. + */ + includeTags?: boolean; } /** @@ -6684,11 +6985,25 @@ export class ContainerClient extends StorageClient { options.tracingOptions ); try { - return await this.containerContext.listBlobFlatSegment({ + const resposne = await this.containerContext.listBlobFlatSegment({ marker, ...options, spanOptions }); + const wrappedResponse: ContainerListBlobFlatSegmentResponse = { + ...resposne, + segment: { + ...resposne.segment, + blobItems: resposne.segment.blobItems.map((blobItemInteral) => { + const blobItem: BlobItem = { + ...blobItemInteral, + tags: toTags(blobItemInteral.blobTags) + }; + return blobItem; + }) + } + }; + return wrappedResponse; } catch (e) { span.setStatus({ code: CanonicalCode.UNKNOWN, @@ -6723,11 +7038,25 @@ export class ContainerClient extends StorageClient { options.tracingOptions ); try { - return await this.containerContext.listBlobHierarchySegment(delimiter, { + const resposne = await this.containerContext.listBlobHierarchySegment(delimiter, { marker, ...options, spanOptions }); + const wrappedResponse: ContainerListBlobHierarchySegmentResponse = { + ...resposne, + segment: { + ...resposne.segment, + blobItems: resposne.segment.blobItems.map((blobItemInteral) => { + const blobItem: BlobItem = { + ...blobItemInteral, + tags: toTags(blobItemInteral.blobTags) + }; + return blobItem; + }) + } + }; + return wrappedResponse; } catch (e) { span.setStatus({ code: CanonicalCode.UNKNOWN, @@ -6878,6 +7207,9 @@ export class ContainerClient extends StorageClient { if (options.includeUncommitedBlobs) { include.push("uncommittedblobs"); } + if (options.includeTags) { + include.push("tags"); + } if (options.prefix === "") { options.prefix = undefined; } @@ -6929,7 +7261,8 @@ export class ContainerClient extends StorageClient { * @param {ContainerListBlobsSegmentOptions} [options] Options to list blobs operation. * @returns {AsyncIterableIterator} * @memberof ContainerClient - */ private async *listHierarchySegments( + */ + private async *listHierarchySegments( delimiter: string, marker?: string, options: ContainerListBlobsSegmentOptions = {} @@ -7086,6 +7419,9 @@ export class ContainerClient extends StorageClient { if (options.includeUncommitedBlobs) { include.push("uncommittedblobs"); } + if (options.includeTags) { + include.push("tags"); + } if (options.prefix === "") { options.prefix = undefined; } diff --git a/sdk/storage/storage-blob/src/ContainerSASPermissions.ts b/sdk/storage/storage-blob/src/ContainerSASPermissions.ts index c4ea3fc04731..299ba0df129c 100644 --- a/sdk/storage/storage-blob/src/ContainerSASPermissions.ts +++ b/sdk/storage/storage-blob/src/ContainerSASPermissions.ts @@ -44,6 +44,9 @@ export class ContainerSASPermissions { case "l": containerSASPermissions.list = true; break; + case "t": + containerSASPermissions.tag = true; + break; default: throw new RangeError(`Invalid permission ${char}`); } @@ -100,6 +103,14 @@ export class ContainerSASPermissions { */ public list: boolean = false; + /** + * Specfies Tag access granted. + * + * @type {boolean} + * @memberof BlobSASPermissions + */ + public tag: boolean = false; + /** * Converts the given permissions to a string. Using this method will guarantee the permissions are in an * order accepted by the service. @@ -130,6 +141,9 @@ export class ContainerSASPermissions { if (this.list) { permissions.push("l"); } + if (this.tag) { + permissions.push("t"); + } return permissions.join(""); } } diff --git a/sdk/storage/storage-blob/src/generatedModels.ts b/sdk/storage/storage-blob/src/generatedModels.ts index ebd570f16948..309d24270976 100644 --- a/sdk/storage/storage-blob/src/generatedModels.ts +++ b/sdk/storage/storage-blob/src/generatedModels.ts @@ -12,7 +12,7 @@ export { AppendBlobAppendBlockHeaders, AppendBlobCreateHeaders, ArchiveStatus, - ListBlobsFlatSegmentResponse, + ListBlobsFlatSegmentResponse as ListBlobsFlatSegmentResponseModel, BlobAbortCopyFromURLHeaders, BlobCopyFromURLHeaders, BlobCreateSnapshotHeaders, @@ -26,8 +26,8 @@ export { BlobHTTPHeaders, BlobSetHTTPHeadersResponse, BlobSetMetadataResponse, + BlobSetTagsResponse, BlobCreateSnapshotResponse, - BlobFlatListSegment, BlobStartCopyFromURLHeaders, BlobStartCopyFromURLResponse, BlobAbortCopyFromURLResponse, @@ -36,13 +36,13 @@ export { BlobSetMetadataHeaders, BlobSetTierHeaders, BlobSetTierResponse, - BlobHierarchyListSegment, - BlobItemInternal as BlobItem, + BlobSetTagsHeaders, BlobPrefix, BlobDownloadHeaders, BlobQueryResponse as BlobQueryResponseModel, BlobDownloadResponse as BlobDownloadResponseModel, BlobType, + BlobTags, BlobUndeleteHeaders, Block, BlockBlobCommitBlockListHeaders, @@ -59,6 +59,8 @@ export { BlockBlobGetBlockListResponse, BlobServiceProperties, BlobServiceStatistics, + BlobGetTagsHeaders, + BlobTag, ContainerCreateHeaders, ContainerCreateResponse, ContainerDeleteHeaders, @@ -67,9 +69,7 @@ export { ContainerGetPropertiesHeaders, ContainerBreakLeaseOptionalParams, ContainerListBlobFlatSegmentHeaders, - ContainerListBlobFlatSegmentResponse, ContainerListBlobHierarchySegmentHeaders, - ContainerListBlobHierarchySegmentResponse, ContainerGetPropertiesResponse, ContainerProperties, ContainerSetMetadataResponse, @@ -87,10 +87,12 @@ export { LeaseDurationType, LeaseStateType, LeaseStatusType, - ListBlobsHierarchySegmentResponse, + ListBlobsHierarchySegmentResponse as ListBlobsHierarchySegmentResponseModel, ListBlobsIncludeItem, ListContainersIncludeType, ListContainersSegmentResponse, + FilterBlobSegment, + ServiceFilterBlobsHeaders, Logging, Metrics, ModifiedAccessConditions, @@ -138,5 +140,7 @@ export { ServiceSubmitBatchOptionalParams as ServiceSubmitBatchOptionalParamsModel, SignedIdentifier as SignedIdentifierModel, UserDelegationKey as UserDelegationKeyModel, - ContainerEncryptionScope + ContainerEncryptionScope, + ServiceFilterBlobsResponse as ServiceFindBlobsByTagsSegmentResponse, + FilterBlobItem } from "./generated/src/models"; diff --git a/sdk/storage/storage-blob/src/index.browser.ts b/sdk/storage/storage-blob/src/index.browser.ts index 57214f7b5115..ecb4ede68f38 100644 --- a/sdk/storage/storage-blob/src/index.browser.ts +++ b/sdk/storage/storage-blob/src/index.browser.ts @@ -13,7 +13,7 @@ export * from "./credentials/AnonymousCredential"; export * from "./credentials/Credential"; export { SasIPRange } from "./SasIPRange"; export { Range } from "./Range"; -export { BlockBlobTier, PremiumPageBlobTier } from "./models"; +export { BlockBlobTier, PremiumPageBlobTier, Tags } from "./models"; export * from "./Pipeline"; export * from "./policies/AnonymousCredentialPolicy"; export * from "./policies/CredentialPolicy"; diff --git a/sdk/storage/storage-blob/src/index.ts b/sdk/storage/storage-blob/src/index.ts index 6cb9eee5aa44..36220069c67d 100644 --- a/sdk/storage/storage-blob/src/index.ts +++ b/sdk/storage/storage-blob/src/index.ts @@ -22,7 +22,7 @@ export * from "./credentials/Credential"; export * from "./credentials/StorageSharedKeyCredential"; export { SasIPRange } from "./SasIPRange"; export { Range } from "./Range"; -export { BlockBlobTier, PremiumPageBlobTier } from "./models"; +export { BlockBlobTier, PremiumPageBlobTier, Tags } from "./models"; export * from "./Pipeline"; export * from "./policies/AnonymousCredentialPolicy"; export * from "./policies/CredentialPolicy"; diff --git a/sdk/storage/storage-blob/src/models.ts b/sdk/storage/storage-blob/src/models.ts index c253686c2dd7..dec8da7e987b 100644 --- a/sdk/storage/storage-blob/src/models.ts +++ b/sdk/storage/storage-blob/src/models.ts @@ -11,6 +11,11 @@ import { } from "./generatedModels"; import { EncryptionAlgorithmAES25 } from "./utils/constants"; +/** + * Blob tags. + */ +export type Tags = Record; + /** * A map of name-value pairs to associate with the resource. */ diff --git a/sdk/storage/storage-blob/src/utils/utils.common.ts b/sdk/storage/storage-blob/src/utils/utils.common.ts index 917424b68477..3889ffa0d62d 100644 --- a/sdk/storage/storage-blob/src/utils/utils.common.ts +++ b/sdk/storage/storage-blob/src/utils/utils.common.ts @@ -5,8 +5,9 @@ import { AbortSignalLike } from "@azure/abort-controller"; import { HttpHeaders, isNode, URLBuilder } from "@azure/core-http"; import { BlobQueryCsvTextConfiguration, BlobQueryJsonTextConfiguration } from "../Clients"; -import { QuerySerialization } from "../generated/src/models"; +import { QuerySerialization, BlobTags } from "../generated/src/models"; import { DevelopmentConnectionString, HeaderConstants, URLConstants } from "./constants"; +import { Tags } from "../models"; /** * Reserved URL characters must be properly escaped for Storage services like Blob or File. @@ -556,6 +557,76 @@ export function getAccountNameFromUrl(url: string): string { } } +/** + * Convert Tags to encoded string. + * + * @export + * @param {Tags} tags + * @returns {string | undefined} + */ +export function toBlobTagsString(tags?: Tags): string | undefined { + if (tags === undefined) { + return undefined; + } + + const tagPairs = []; + for (const key in tags) { + if (tags.hasOwnProperty(key)) { + const value = tags[key]; + tagPairs.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`); + } + } + + return tagPairs.join("&"); +} + +/** + * Convert Tags type to BlobTags. + * + * @export + * @param {Tags} [tags] + * @returns {(BlobTags | undefined)} + */ +export function toBlobTags(tags?: Tags): BlobTags | undefined { + if (tags === undefined) { + return undefined; + } + + const res: BlobTags = { + blobTagSet: [] + }; + + for (const key in tags) { + if (tags.hasOwnProperty(key)) { + const value = tags[key]; + res.blobTagSet.push({ + key, + value + }); + } + } + return res; +} + +/** + * Covert BlobTags to Tags type. + * + * @export + * @param {BlobTags} [tags] + * @returns {(Tags | undefined)} + */ +export function toTags(tags?: BlobTags): Tags | undefined { + if (tags === undefined) { + return undefined; + } + + const res: Tags = {}; + for (const blobTag of tags.blobTagSet) { + res[blobTag.key] = blobTag.value; + } + return res; +} + /** * Convert BlobQueryTextConfiguration to QuerySerialization type. * diff --git a/sdk/storage/storage-blob/test/blobclient.spec.ts b/sdk/storage/storage-blob/test/blobclient.spec.ts index faf6b862b9c6..f0ebdf745a7a 100644 --- a/sdk/storage/storage-blob/test/blobclient.spec.ts +++ b/sdk/storage/storage-blob/test/blobclient.spec.ts @@ -9,7 +9,7 @@ import { getBSU, getSASConnectionStringFromEnvironment, recorderEnvSetup, - isBlobVersioningDisabled, + isBlobVersioningDisabled } from "./utils"; import { record, delay } from "@azure/test-utils-recorder"; import { @@ -52,6 +52,88 @@ describe("BlobClient", () => { } }); + it("Set blob tags should work", async () => { + const tags = { + tag1: "val1", + tag2: "val2" + }; + await blockBlobClient.setTags(tags); + + const response = await blockBlobClient.getTags(); + assert.deepStrictEqual(response.tags, tags); + + const properties = await blockBlobClient.getProperties(); + assert.deepStrictEqual(properties.tagCount, 2); + + const download = await blockBlobClient.download(); + assert.deepStrictEqual(download.tagCount, 2); + + const listblob = containerClient.listBlobsFlat({ includeTags: true }); + + const iter = listblob.byPage(); + const segment = await iter.next(); + + // TODO: Make blob tag type consistency cross all request or response + assert.deepStrictEqual(segment.value.segment.blobItems[0].tags, tags); + }); + + it("Get blob tags should work with a snapshot", async () => { + const tags = { + tag1: "val1", + tag2: "val2" + }; + await blockBlobClient.setTags(tags); + + const snapshotResponse = await blockBlobClient.createSnapshot(); + const blockBlobClientSnapshot = blockBlobClient.withSnapshot(snapshotResponse.snapshot!); + + const response = await blockBlobClientSnapshot.getTags(); + assert.deepStrictEqual(response.tags, tags); + }); + + it("Create block blob blob should work with tags", async () => { + await blockBlobClient.delete(); + + const tags = { + tag1: "val1", + tag2: "val2" + }; + await blockBlobClient.upload("hello", 5, { tags }); + + const response = await blockBlobClient.getTags(); + assert.deepStrictEqual(response.tags, tags); + }); + + it("Create append blob should work with tags", async () => { + await blockBlobClient.delete(); + + const tags = { + tag1: "val1", + tag2: "val2" + }; + + const appendBlobClient = blobClient.getAppendBlobClient(); + await appendBlobClient.create({ tags }); + + const response = await appendBlobClient.getTags(); + assert.deepStrictEqual(response.tags, tags); + }); + + it("Create page blob should work with tags", async () => { + await blockBlobClient.delete(); + + const tags = { + tag1: "val1", + tag2: "val2" + }; + + const pageBlobClient = blobClient.getPageBlobClient(); + await pageBlobClient.create(512, { tags }); + + const response = await pageBlobClient.getTags(); + assert.deepStrictEqual(response.tags, tags); + }); + it("download with with default parameters", async () => { const result = await blobClient.download(); assert.deepStrictEqual(await bodyToString(result, content.length), content); @@ -254,7 +336,7 @@ describe("BlobClient", () => { const iter = containerClient .listBlobsFlat({ includeDeleted: true, - includeVersions: true, // Need this when blob versioning is turned on. + includeVersions: true // Need this when blob versioning is turned on. }) .byPage({ maxPageSize: 1 }); @@ -293,7 +375,10 @@ describe("BlobClient", () => { ); if (isBlobVersioningDisabled()) { - assert.ok(result.segment.blobItems![0].deleted, "Expect that the blob is marked for deletion"); + assert.ok( + result.segment.blobItems![0].deleted, + "Expect that the blob is marked for deletion" + ); } await blobClient.undelete(); @@ -301,7 +386,7 @@ describe("BlobClient", () => { const iter2 = containerClient .listBlobsFlat({ includeDeleted: true, - includeVersions: true, // Need this when blob versioning is turned on. + includeVersions: true // Need this when blob versioning is turned on. }) .byPage(); diff --git a/sdk/storage/storage-blob/test/blobserviceclient.spec.ts b/sdk/storage/storage-blob/test/blobserviceclient.spec.ts index 06fd1574700e..d0a541f2b1a3 100644 --- a/sdk/storage/storage-blob/test/blobserviceclient.spec.ts +++ b/sdk/storage/storage-blob/test/blobserviceclient.spec.ts @@ -7,9 +7,11 @@ import { getBSU, getSASConnectionStringFromEnvironment, getTokenBSU, - recorderEnvSetup + recorderEnvSetup, + sleep } from "./utils"; import { record, delay, Recorder } from "@azure/test-utils-recorder"; +import { Tags } from "../src/models"; dotenv.config(); describe("BlobServiceClient", () => { @@ -466,4 +468,71 @@ describe("BlobServiceClient", () => { assert.notDeepStrictEqual(response.signedObjectId, undefined); assert.notDeepStrictEqual(response.signedExpiresOn, undefined); }); + + it("Find blob by tags should work", async () => { + const blobServiceClient = getBSU(); + + const containerName = recorder.getUniqueName("container1"); + const containerClient = blobServiceClient.getContainerClient(containerName); + await containerClient.create(); + + const key1 = recorder.getUniqueName("key"); + const key2 = recorder.getUniqueName("key2"); + + const blobName1 = recorder.getUniqueName("blobname1"); + const appendBlobClient1 = containerClient.getAppendBlobClient(blobName1); + const tags1: Tags = {}; + tags1[key1] = recorder.getUniqueName("val1"); + tags1[key2] = "default"; + await appendBlobClient1.create({ tags: tags1 }); + + const blobName2 = recorder.getUniqueName("blobname2"); + const appendBlobClient2 = containerClient.getAppendBlobClient(blobName2); + const tags2: Tags = {}; + tags2[key1] = recorder.getUniqueName("val2"); + tags2[key2] = "default"; + await appendBlobClient2.create({ tags: tags2 }); + + const blobName3 = recorder.getUniqueName("blobname3"); + const appendBlobClient3 = containerClient.getAppendBlobClient(blobName3); + const tags3: Tags = {}; + tags3[key1] = recorder.getUniqueName("val3"); + tags3[key2] = "default"; + await appendBlobClient3.create({ tags: tags3 }); + + // Wait for indexing tags + await sleep(2); + + for await (const blob of blobServiceClient.findBlobsByTags(`${key1}='${tags1[key1]}'`)) { + assert.deepStrictEqual(blob.containerName, containerName); + assert.deepStrictEqual(blob.name, blobName1); + assert.deepStrictEqual(blob.tagValue, tags1[key1]); + } + + const blobs = []; + for await (const segment of blobServiceClient + .findBlobsByTags(`${key1}='${tags2[key1]}'`) + .byPage()) { + for (const blob of segment.blobs) { + blobs.push(blob); + } + } + assert.deepStrictEqual(blobs.length, 1); + assert.deepStrictEqual(blobs[0].containerName, containerName); + assert.deepStrictEqual(blobs[0].name, blobName2); + assert.deepStrictEqual(blobs[0].tagValue, tags2[key1]); + + const blobsWithTag2 = []; + for await (const segment of blobServiceClient.findBlobsByTags(`${key2}='default'`).byPage({ + maxPageSize: 1 + })) { + assert.ok(segment.blobs.length <= 1); + for (const blob of segment.blobs) { + blobsWithTag2.push(blob); + } + } + assert.deepStrictEqual(blobsWithTag2.length, 3); + + await containerClient.delete(); + }); }); diff --git a/sdk/storage/storage-blob/test/browser/highlevel.browser.spec.ts b/sdk/storage/storage-blob/test/browser/highlevel.browser.spec.ts index 73615d5d21fc..9c14a4736fa9 100644 --- a/sdk/storage/storage-blob/test/browser/highlevel.browser.spec.ts +++ b/sdk/storage/storage-blob/test/browser/highlevel.browser.spec.ts @@ -154,6 +154,24 @@ describe("Highlevel", () => { assert.equal(uploadedString, downloadedString); }); + it("uploadBrowserDataToBlockBlob should work with tags", async () => { + recorder.skip("browser", "Temp file - recorder doesn't support saving the file"); + + const tags = { + tag1: "val1", + tag2: "val2" + }; + + await blockBlobClient.uploadBrowserData(tempFile2, { + blockSize: 512 * 1024, + maxSingleShotSize: 0, + tags + }); + + const response = await blockBlobClient.getTags(); + assert.deepStrictEqual(response.tags, tags); + }); + it("uploadBrowserDataToBlockBlob should success when blob >= BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES", async function() { recorder.skip("browser", "Temp file - recorder doesn't support saving the file"); if (isIE()) { diff --git a/sdk/storage/storage-blob/test/node/highlevel.node.spec.ts b/sdk/storage/storage-blob/test/node/highlevel.node.spec.ts index e38b26a11c18..4dcec8d15235 100644 --- a/sdk/storage/storage-blob/test/node/highlevel.node.spec.ts +++ b/sdk/storage/storage-blob/test/node/highlevel.node.spec.ts @@ -4,7 +4,12 @@ import * as path from "path"; import { PassThrough } from "stream"; import { AbortController } from "@azure/abort-controller"; -import { createRandomLocalFile, getBSU, recorderEnvSetup, isBlobVersioningDisabled } from "../utils"; +import { + createRandomLocalFile, + getBSU, + recorderEnvSetup, + isBlobVersioningDisabled +} from "../utils"; import { RetriableReadableStreamOptions } from "../../src/utils/RetriableReadableStream"; import { record, Recorder } from "@azure/test-utils-recorder"; import { ContainerClient, BlobClient, BlockBlobClient, BlobServiceClient } from "../../src"; @@ -28,7 +33,7 @@ describe("Highlevel", () => { let recorder: Recorder; let blobServiceClient: BlobServiceClient; - beforeEach(async function () { + beforeEach(async function() { recorder = record(this, recorderEnvSetup); blobServiceClient = getBSU(); containerName = recorder.getUniqueName("container"); @@ -39,14 +44,14 @@ describe("Highlevel", () => { blockBlobClient = blobClient.getBlockBlobClient(); }); - afterEach(async function () { + afterEach(async function() { if (!this.currentTest?.isPending()) { await containerClient.delete(); recorder.stop(); } }); - before(async function () { + before(async function() { recorder = record(this, recorderEnvSetup); if (!fs.existsSync(tempFolderPath)) { fs.mkdirSync(tempFolderPath); @@ -58,7 +63,7 @@ describe("Highlevel", () => { recorder.stop(); }); - after(async function () { + after(async function() { recorder = record(this, recorderEnvSetup); fs.unlinkSync(tempFileLarge); fs.unlinkSync(tempFileSmall); @@ -67,7 +72,7 @@ describe("Highlevel", () => { it("put blob with maximum size", async () => { recorder.skip("node", "Temp file - recorder doesn't support saving the file"); - const MB = 1024 * 1024 + const MB = 1024 * 1024; const maxPutBlobSizeLimitInMB = 5000; const tempFile = await createRandomLocalFile(tempFolderPath, maxPutBlobSizeLimitInMB, MB); const inputStream = fs.createReadStream(tempFile); @@ -77,7 +82,7 @@ describe("Highlevel", () => { abortSignal: AbortController.timeout(20 * 1000) // takes too long to upload the file }); } catch (err) { - assert.equal(err.name, 'AbortError'); + assert.equal(err.name, "AbortError"); } }).timeout(timeoutForLargeFileUploadingTest); @@ -99,6 +104,24 @@ describe("Highlevel", () => { assert.ok(downloadedData.equals(uploadedData)); }).timeout(timeoutForLargeFileUploadingTest); + it("uploadFile should work with tags", async () => { + recorder.skip("node", "Temp file - recorder doesn't support saving the file"); + + const tags = { + tag1: "val1", + tag2: "val2" + }; + + await blockBlobClient.uploadFile(tempFileSmall, { + blockSize: 4 * 1024 * 1024, + concurrency: 20, + tags + }); + + const response = await blockBlobClient.getTags(); + assert.deepStrictEqual(response.tags, tags); + }); + it("uploadFile should success when blob < BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES", async () => { recorder.skip("node", "Temp file - recorder doesn't support saving the file"); await blockBlobClient.uploadFile(tempFileSmall, { @@ -183,7 +206,7 @@ describe("Highlevel", () => { aborter.abort(); } }); - } catch (err) { } + } catch (err) {} assert.ok(eventTriggered); }); @@ -206,20 +229,24 @@ describe("Highlevel", () => { aborter.abort(); } }); - } catch (err) { } + } catch (err) {} assert.ok(eventTriggered); }); it("uploadFile should succeed with blockSize = BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES", async () => { recorder.skip("node", "Temp file - recorder doesn't support saving the file"); - const tempFile = await createRandomLocalFile(tempFolderPath, BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES / (1024 * 1024) + 1, 1024 * 1024); + const tempFile = await createRandomLocalFile( + tempFolderPath, + BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES / (1024 * 1024) + 1, + 1024 * 1024 + ); try { await blockBlobClient.uploadFile(tempFile, { blockSize: BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES, abortSignal: AbortController.timeout(20 * 1000) // takes too long to upload the file }); } catch (err) { - assert.equal(err.name, 'AbortError'); + assert.equal(err.name, "AbortError"); } fs.unlinkSync(tempFile); @@ -262,6 +289,24 @@ describe("Highlevel", () => { fs.unlinkSync(downloadFilePath); }); + it("uploadStream should work with tags", async () => { + recorder.skip("node", "Temp file - recorder doesn't support saving the file"); + + const buf = Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]); + const bufferStream = new PassThrough(); + bufferStream.end(buf); + + const tags = { + tag1: "val1", + tag2: "val2" + }; + + await blockBlobClient.uploadStream(bufferStream, 4 * 1024 * 1024, 20, { tags }); + + const response = await blockBlobClient.getTags(); + assert.deepStrictEqual(response.tags, tags); + }); + it("uploadStream should abort", async () => { recorder.skip("node", "Temp file - recorder doesn't support saving the file"); const rs = fs.createReadStream(tempFileLarge); @@ -406,7 +451,7 @@ describe("Highlevel", () => { aborter.abort(); } }); - } catch (err) { } + } catch (err) {} assert.ok(eventTriggered); }); diff --git a/sdk/storage/storage-blob/test/node/sas.spec.ts b/sdk/storage/storage-blob/test/node/sas.spec.ts index c9b9fb30ce46..d8c435f26cf2 100644 --- a/sdk/storage/storage-blob/test/node/sas.spec.ts +++ b/sdk/storage/storage-blob/test/node/sas.spec.ts @@ -324,6 +324,66 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => { await containerClient.delete(); }); + it("generateBlobSASQueryParameters should work for blob tags", async () => { + const now = recorder.newDate("now"); + now.setMinutes(now.getMinutes() - 5); // Skip clock skew with server + + const tmr = recorder.newDate("tmr"); + tmr.setDate(tmr.getDate() + 1); + + // By default, credential is always the last element of pipeline factories + const factories = (blobServiceClient as any).pipeline.factories; + const sharedKeyCredential = factories[factories.length - 1]; + + const containerName = recorder.getUniqueName("container"); + const containerClient = blobServiceClient.getContainerClient(containerName); + await containerClient.create(); + + const blobName = recorder.getUniqueName("blob"); + const blobClient = containerClient.getPageBlobClient(blobName); + await blobClient.create(1024, { + blobHTTPHeaders: { + blobContentType: "content-type-original" + } + }); + + const blobSAS = generateBlobSASQueryParameters( + { + blobName: blobClient.name, + cacheControl: "cache-control-override", + containerName: blobClient.containerName, + contentDisposition: "content-disposition-override", + contentEncoding: "content-encoding-override", + contentLanguage: "content-language-override", + contentType: "content-type-override", + expiresOn: tmr, + ipRange: { start: "0.0.0.0", end: "255.255.255.255" }, + permissions: BlobSASPermissions.parse("racwdt"), + protocol: SASProtocol.HttpsAndHttp, + startsOn: now + }, + sharedKeyCredential as StorageSharedKeyCredential + ); + + const sasURL = `${blobClient.url}?${blobSAS}`; + const blobClientWithSAS = new PageBlobClient(sasURL, newPipeline(new AnonymousCredential())); + + const tags = { + tag1: "val1", + tag2: "val2" + }; + await blobClientWithSAS.setTags(tags); + + const properties = await blobClientWithSAS.getProperties(); + assert.equal(properties.cacheControl, "cache-control-override"); + assert.equal(properties.contentDisposition, "content-disposition-override"); + assert.equal(properties.contentEncoding, "content-encoding-override"); + assert.equal(properties.contentLanguage, "content-language-override"); + assert.equal(properties.contentType, "content-type-override"); + + await containerClient.delete(); + }); + it("generateBlobSASQueryParameters should work for blob snapshot", async () => { const now = recorder.newDate("now"); now.setMinutes(now.getMinutes() - 5); // Skip clock skew with server @@ -802,8 +862,10 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => { await containerClient.delete(); }); - it("generateAccountSASQueryParameters should work for blob version delete", async function () { - if (isBlobVersioningDisabled()) { this.skip(); } + it("generateAccountSASQueryParameters should work for blob version delete", async function() { + if (isBlobVersioningDisabled()) { + this.skip(); + } // create versions const containerName = recorder.getUniqueName("container"); @@ -846,8 +908,10 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => { await containerClientwithSAS.delete(); }); - it("generateBlobSASQueryParameters should work for blob version delete", async function () { - if (isBlobVersioningDisabled()) { this.skip(); } + it("generateBlobSASQueryParameters should work for blob version delete", async function() { + if (isBlobVersioningDisabled()) { + this.skip(); + } // create versions const containerName = recorder.getUniqueName("container"); @@ -879,7 +943,7 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => { ipRange: { start: "0.0.0.0", end: "255.255.255.255" }, permissions: BlobSASPermissions.parse("racwdx"), protocol: SASProtocol.HttpsAndHttp, - versionId: uploadRes.versionId, + versionId: uploadRes.versionId }, sharedKeyCredential as StorageSharedKeyCredential ); @@ -893,15 +957,17 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => { }); // TODO: prepare ACCOUNT_TOKEN for the test account - it.skip("GenerateUserDelegationSAS should work for blob version delete", async function () { - if (isBlobVersioningDisabled()) { this.skip(); } + it.skip("GenerateUserDelegationSAS should work for blob version delete", async function() { + if (isBlobVersioningDisabled()) { + this.skip(); + } // Try to get blobServiceClient object with TokenCredential // when ACCOUNT_TOKEN environment variable is set let blobServiceClientWithToken: BlobServiceClient | undefined; try { blobServiceClientWithToken = getTokenBSU(); - } catch { } + } catch {} // Requires bearer token for this case which cannot be generated in the runtime // Make sure this case passed in sanity test @@ -941,7 +1007,7 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => { ipRange: { start: "0.0.0.0", end: "255.255.255.255" }, permissions: BlobSASPermissions.parse("racwdx"), protocol: SASProtocol.HttpsAndHttp, - versionId: uploadRes.versionId, + versionId: uploadRes.versionId }, userDelegationKey, accountName diff --git a/sdk/storage/storage-blob/test/utils/testutils.common.ts b/sdk/storage/storage-blob/test/utils/testutils.common.ts index 00c3739088e8..434695078fba 100644 --- a/sdk/storage/storage-blob/test/utils/testutils.common.ts +++ b/sdk/storage/storage-blob/test/utils/testutils.common.ts @@ -134,3 +134,16 @@ export function isSuperSet(m1?: BlobMetadata, m2?: BlobMetadata): boolean { return true; } + +/** + * Sleep for seconds. + * + * @export + * @param {number} seconds + * @returns {Promise} + */ +export function sleep(seconds: number): Promise { + return new Promise((resolve) => { + setTimeout(resolve, seconds * 1000); + }); +} From 1e65d739469ed8452ec2f8bafc5180e18768df7e Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Fri, 12 Jun 2020 17:43:25 +0800 Subject: [PATCH 16/39] update service version to 2019-12-12 --- sdk/storage/storage-blob/src/generated/src/models/parameters.ts | 2 +- .../storage-blob/src/generated/src/storageClientContext.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/storage/storage-blob/src/generated/src/models/parameters.ts b/sdk/storage/storage-blob/src/generated/src/models/parameters.ts index 9445287c3509..c985e05682ff 100644 --- a/sdk/storage/storage-blob/src/generated/src/models/parameters.ts +++ b/sdk/storage/storage-blob/src/generated/src/models/parameters.ts @@ -1680,7 +1680,7 @@ export const version: coreHttp.OperationParameter = { required: true, isConstant: true, serializedName: "x-ms-version", - defaultValue: '2019-10-10', + defaultValue: '2019-12-12', type: { name: "String" } diff --git a/sdk/storage/storage-blob/src/generated/src/storageClientContext.ts b/sdk/storage/storage-blob/src/generated/src/storageClientContext.ts index 3a72ee70951a..ab75cb1cbbf6 100644 --- a/sdk/storage/storage-blob/src/generated/src/storageClientContext.ts +++ b/sdk/storage/storage-blob/src/generated/src/storageClientContext.ts @@ -39,7 +39,7 @@ export class StorageClientContext extends coreHttp.ServiceClient { super(undefined, options); - this.version = '2019-10-10'; + this.version = '2019-12-12'; this.baseUri = "{url}"; this.requestContentType = "application/json; charset=utf-8"; this.url = url; From 46595068d1db195ed4c7b0afe8ea8d7672aa874d Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Fri, 12 Jun 2020 19:48:02 +0800 Subject: [PATCH 17/39] blob tags test record --- ...reate_append_blob_should_work_with_tags.js | 138 +++++++++++ ...e_block_blob_blob_should_work_with_tags.js | 142 +++++++++++ ..._create_page_blob_should_work_with_tags.js | 138 +++++++++++ ...t_blob_tags_should_work_with_a_snapshot.js | 138 +++++++++++ .../recording_set_blob_tags_should_work.js | 220 ++++++++++++++++++ ...recording_find_blob_by_tags_should_work.js | 220 ++++++++++++++++++ .../recording_put_blob_with_maximum_size.js | 45 ++++ ...eryparameters_should_work_for_blob_tags.js | 138 +++++++++++ 8 files changed, 1179 insertions(+) create mode 100644 sdk/storage/storage-blob/recordings/node/blobclient/recording_create_append_blob_should_work_with_tags.js create mode 100644 sdk/storage/storage-blob/recordings/node/blobclient/recording_create_block_blob_blob_should_work_with_tags.js create mode 100644 sdk/storage/storage-blob/recordings/node/blobclient/recording_create_page_blob_should_work_with_tags.js create mode 100644 sdk/storage/storage-blob/recordings/node/blobclient/recording_get_blob_tags_should_work_with_a_snapshot.js create mode 100644 sdk/storage/storage-blob/recordings/node/blobclient/recording_set_blob_tags_should_work.js create mode 100644 sdk/storage/storage-blob/recordings/node/blobserviceclient/recording_find_blob_by_tags_should_work.js create mode 100644 sdk/storage/storage-blob/recordings/node/highlevel/recording_put_blob_with_maximum_size.js create mode 100644 sdk/storage/storage-blob/recordings/node/shared_access_signature_sas_generation_nodejs_only/recording_generateblobsasqueryparameters_should_work_for_blob_tags.js diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/recording_create_append_blob_should_work_with_tags.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_create_append_blob_should_work_with_tags.js new file mode 100644 index 000000000000..d444938f6d0e --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_create_append_blob_should_work_with_tags.js @@ -0,0 +1,138 @@ +let nock = require('nock'); + +module.exports.hash = "faaf2ba76e4808ebdd525ec9ee62d785"; + +module.exports.testInfo = {"uniqueName":{"container":"container159195940982907573","blob":"blob159195941011805137"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159195940982907573') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Fri, 12 Jun 2020 10:56:49 GMT', + 'ETag', + '"0x8D80EBF4E747534"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'f0c54bc9-501e-0046-5da8-407927000000', + 'x-ms-client-request-id', + 'b13cf00f-2ae7-4b58-b456-f19812ebedef', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Fri, 12 Jun 2020 10:56:48 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159195940982907573/blob159195941011805137', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Fri, 12 Jun 2020 10:56:49 GMT', + 'ETag', + '"0x8D80EBF4EA0DDAF"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'f0c54c32-501e-0046-39a8-407927000000', + 'x-ms-client-request-id', + '4d63846b-4353-4e0b-a7d9-f7fde7b70763', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-12T10:56:49.3632943Z', + 'Date', + 'Fri, 12 Jun 2020 10:56:48 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159195940982907573/blob159195941011805137') + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'f0c54c75-501e-0046-76a8-407927000000', + 'x-ms-client-request-id', + 'af7b192d-6f8d-4c96-b083-a1bd9905d990', + 'x-ms-version', + '2019-12-12', + 'x-ms-delete-type-permanent', + 'false', + 'Date', + 'Fri, 12 Jun 2020 10:56:49 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159195940982907573/blob159195941011805137') + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Fri, 12 Jun 2020 10:56:49 GMT', + 'ETag', + '"0x8D80EBF4EF9471D"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'f0c54cc4-501e-0046-40a8-407927000000', + 'x-ms-client-request-id', + 'a5d96424-fe39-4f0c-a51a-3102ef0ebcd6', + 'x-ms-version', + '2019-12-12', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-12T10:56:49.9427101Z', + 'Date', + 'Fri, 12 Jun 2020 10:56:49 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/container159195940982907573/blob159195941011805137') + .query(true) + .reply(200, "\ntag1val1tag2val2", [ + 'Content-Length', + '162', + 'Content-Type', + 'application/xml', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'f0c54d4b-501e-0046-3da8-407927000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + 'b62ace90-44d1-4ee3-b5c0-b84bd5d1b637', + 'Date', + 'Fri, 12 Jun 2020 10:56:49 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159195940982907573') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'f0c54dbc-501e-0046-28a8-407927000000', + 'x-ms-client-request-id', + 'c7fbe39a-cb40-4feb-85a5-639dbff054e0', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Fri, 12 Jun 2020 10:56:50 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/recording_create_block_blob_blob_should_work_with_tags.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_create_block_blob_blob_should_work_with_tags.js new file mode 100644 index 000000000000..8ba443641247 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_create_block_blob_blob_should_work_with_tags.js @@ -0,0 +1,142 @@ +let nock = require('nock'); + +module.exports.hash = "5578c886339e560f45c10d6e1e32edcd"; + +module.exports.testInfo = {"uniqueName":{"container":"container159195940804908307","blob":"blob159195940834006720"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159195940804908307') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Fri, 12 Jun 2020 10:56:47 GMT', + 'ETag', + '"0x8D80EBF4D64F645"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'f0c548d0-501e-0046-2ca8-407927000000', + 'x-ms-client-request-id', + 'b4be1805-15cd-42fd-b5c0-9792835c8cc8', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Fri, 12 Jun 2020 10:56:46 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159195940804908307/blob159195940834006720', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Fri, 12 Jun 2020 10:56:47 GMT', + 'ETag', + '"0x8D80EBF4D9185C3"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'f0c5497d-501e-0046-52a8-407927000000', + 'x-ms-client-request-id', + 'a2972b0b-eacd-49bd-9fbd-e0c6e62a058e', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-12T10:56:47.5850179Z', + 'Date', + 'Fri, 12 Jun 2020 10:56:47 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159195940804908307/blob159195940834006720') + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'f0c54a09-501e-0046-4ea8-407927000000', + 'x-ms-client-request-id', + '17b6f43c-edad-4463-ba82-cf72f9a95dfb', + 'x-ms-version', + '2019-12-12', + 'x-ms-delete-type-permanent', + 'false', + 'Date', + 'Fri, 12 Jun 2020 10:56:47 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159195940804908307/blob159195940834006720', "hello") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'XUFAKrxLKna5cZ2REBfFkg==', + 'Last-Modified', + 'Fri, 12 Jun 2020 10:56:48 GMT', + 'ETag', + '"0x8D80EBF4DEEF932"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'f0c54a8c-501e-0046-3fa8-407927000000', + 'x-ms-client-request-id', + '49dc4ef9-1d8f-4c82-a439-39d61281b17c', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'V0JSBnCFdzM=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-12T10:56:48.1974578Z', + 'Date', + 'Fri, 12 Jun 2020 10:56:47 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/container159195940804908307/blob159195940834006720') + .query(true) + .reply(200, "\ntag1val1tag2val2", [ + 'Content-Length', + '162', + 'Content-Type', + 'application/xml', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'f0c54b08-501e-0046-30a8-407927000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + 'cd8e0e9e-f643-43b8-91cb-d3984904c810', + 'Date', + 'Fri, 12 Jun 2020 10:56:48 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159195940804908307') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'f0c54b62-501e-0046-80a8-407927000000', + 'x-ms-client-request-id', + '2925bf07-5b84-4a69-9e4d-61542f29874a', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Fri, 12 Jun 2020 10:56:48 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/recording_create_page_blob_should_work_with_tags.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_create_page_blob_should_work_with_tags.js new file mode 100644 index 000000000000..c10e2cabdf51 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_create_page_blob_should_work_with_tags.js @@ -0,0 +1,138 @@ +let nock = require('nock'); + +module.exports.hash = "c9290c2dbcd30291b6d860835d9de726"; + +module.exports.testInfo = {"uniqueName":{"container":"container159195941157308486","blob":"blob159195941186205501"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159195941157308486') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Fri, 12 Jun 2020 10:56:50 GMT', + 'ETag', + '"0x8D80EBF4F7E9BFD"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'f0c54e43-501e-0046-2aa8-407927000000', + 'x-ms-client-request-id', + '78b8abe0-ff51-4505-893a-1eda2ebcdd57', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Fri, 12 Jun 2020 10:56:50 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159195941157308486/blob159195941186205501', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Fri, 12 Jun 2020 10:56:51 GMT', + 'ETag', + '"0x8D80EBF4FAADD67"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'f0c54ebc-501e-0046-1ea8-407927000000', + 'x-ms-client-request-id', + '3ea687f7-c138-4704-885f-11e54aa85abc', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-12T10:56:51.1065447Z', + 'Date', + 'Fri, 12 Jun 2020 10:56:50 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159195941157308486/blob159195941186205501') + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'f0c54f3f-501e-0046-18a8-407927000000', + 'x-ms-client-request-id', + '0559d78f-b8f2-4b6d-aeba-2b24a253a403', + 'x-ms-version', + '2019-12-12', + 'x-ms-delete-type-permanent', + 'false', + 'Date', + 'Fri, 12 Jun 2020 10:56:50 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159195941157308486/blob159195941186205501') + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Fri, 12 Jun 2020 10:56:51 GMT', + 'ETag', + '"0x8D80EBF50031FBD"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'f0c54fbe-501e-0046-0ba8-407927000000', + 'x-ms-client-request-id', + 'f00159d6-6dbb-42be-9e85-3e94e9049dbd', + 'x-ms-version', + '2019-12-12', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-12T10:56:51.6849597Z', + 'Date', + 'Fri, 12 Jun 2020 10:56:51 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/container159195941157308486/blob159195941186205501') + .query(true) + .reply(200, "\ntag1val1tag2val2", [ + 'Content-Length', + '162', + 'Content-Type', + 'application/xml', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'f0c55019-501e-0046-64a8-407927000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + 'b77ca529-92e9-4d71-910d-08dfbeb964f3', + 'Date', + 'Fri, 12 Jun 2020 10:56:51 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159195941157308486') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'f0c5507b-501e-0046-3fa8-407927000000', + 'x-ms-client-request-id', + 'fac49e4e-0f13-4683-86ad-0453037f7122', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Fri, 12 Jun 2020 10:56:51 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/recording_get_blob_tags_should_work_with_a_snapshot.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_get_blob_tags_should_work_with_a_snapshot.js new file mode 100644 index 000000000000..89f37957d351 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_get_blob_tags_should_work_with_a_snapshot.js @@ -0,0 +1,138 @@ +let nock = require('nock'); + +module.exports.hash = "ea33b6634f85bfb8e09cc8331175b0da"; + +module.exports.testInfo = {"uniqueName":{"container":"container159195940625401543","blob":"blob159195940654404885"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159195940625401543') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Fri, 12 Jun 2020 10:56:45 GMT', + 'ETag', + '"0x8D80EBF4C5305DE"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'f0c545ed-501e-0046-7da8-407927000000', + 'x-ms-client-request-id', + 'bbf9f248-32e9-4cb0-8354-4bbaf3f91d89', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Fri, 12 Jun 2020 10:56:45 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159195940625401543/blob159195940654404885', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Fri, 12 Jun 2020 10:56:45 GMT', + 'ETag', + '"0x8D80EBF4C8031B3"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'f0c5464c-501e-0046-54a8-407927000000', + 'x-ms-client-request-id', + '5a82a6ad-1e20-46d9-8cc2-40adae60e234', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-12T10:56:45.7937331Z', + 'Date', + 'Fri, 12 Jun 2020 10:56:45 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159195940625401543/blob159195940654404885', "tag1val1tag2val2") + .query(true) + .reply(204, "", [ + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'f0c546fa-501e-0046-7aa8-407927000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + '7f0365a9-5f29-4bfe-8e5b-807809c239df', + 'Date', + 'Fri, 12 Jun 2020 10:56:45 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159195940625401543/blob159195940654404885') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Fri, 12 Jun 2020 10:56:45 GMT', + 'ETag', + '"0x8D80EBF4C8031B3"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'f0c5477c-501e-0046-75a8-407927000000', + 'x-ms-client-request-id', + '26600c91-25e3-4a33-be31-c334cefe304e', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-06-12T10:56:46.3991668Z', + 'x-ms-snapshot', + '2020-06-12T10:56:46.3981668Z', + 'x-ms-request-server-encrypted', + 'false', + 'Date', + 'Fri, 12 Jun 2020 10:56:46 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/container159195940625401543/blob159195940654404885') + .query(true) + .reply(200, "\ntag1val1tag2val2", [ + 'Content-Length', + '162', + 'Content-Type', + 'application/xml', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'f0c547e7-501e-0046-59a8-407927000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + 'ed75f162-6b43-44e4-8c47-43af4a7b3dd8', + 'Date', + 'Fri, 12 Jun 2020 10:56:46 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159195940625401543') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'f0c5484f-501e-0046-3da8-407927000000', + 'x-ms-client-request-id', + '60696aae-cab7-433e-a1c1-ff5432c0f597', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Fri, 12 Jun 2020 10:56:46 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/recording_set_blob_tags_should_work.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_set_blob_tags_should_work.js new file mode 100644 index 000000000000..4ebcc8615417 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_set_blob_tags_should_work.js @@ -0,0 +1,220 @@ +let nock = require('nock'); + +module.exports.hash = "df3bcfef7788177a7953760e520e309f"; + +module.exports.testInfo = {"uniqueName":{"container":"container159195940246107854","blob":"blob159195940379508746"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159195940246107854') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Fri, 12 Jun 2020 10:56:42 GMT', + 'ETag', + '"0x8D80EBF4AAC82AE"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'f0c540d3-501e-0046-78a8-407927000000', + 'x-ms-client-request-id', + '66b75bba-4807-498c-98b3-43463f85c30a', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Fri, 12 Jun 2020 10:56:42 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159195940246107854/blob159195940379508746', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Fri, 12 Jun 2020 10:56:43 GMT', + 'ETag', + '"0x8D80EBF4ADCBBF6"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'f0c54165-501e-0046-80a8-407927000000', + 'x-ms-client-request-id', + 'cbfd6584-abea-4046-bac7-369e136aa5d9', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-12T10:56:43.0447606Z', + 'Date', + 'Fri, 12 Jun 2020 10:56:42 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159195940246107854/blob159195940379508746', "tag1val1tag2val2") + .query(true) + .reply(204, "", [ + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'f0c541ec-501e-0046-70a8-407927000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + 'ebefe377-31da-417a-9585-bbad27bdacf8', + 'Date', + 'Fri, 12 Jun 2020 10:56:43 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/container159195940246107854/blob159195940379508746') + .query(true) + .reply(200, "\ntag1val1tag2val2", [ + 'Content-Length', + '162', + 'Content-Type', + 'application/xml', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'f0c54302-501e-0046-70a8-407927000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + 'f5157c6c-effc-4770-9ebf-0bd00405318a', + 'Date', + 'Fri, 12 Jun 2020 10:56:43 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container159195940246107854/blob159195940379508746') + .reply(200, "", [ + 'Content-Length', + '11', + 'Content-Type', + 'application/octet-stream', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Fri, 12 Jun 2020 10:56:43 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D80EBF4ADCBBF6"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'f0c543ae-501e-0046-0aa8-407927000000', + 'x-ms-client-request-id', + 'd7962cc5-3797-40ce-a683-3280841ba8df', + 'x-ms-version', + '2019-12-12', + 'x-ms-tag-count', + '2', + 'x-ms-version-id', + '2020-06-12T10:56:43.0447606Z', + 'x-ms-is-current-version', + 'true', + 'x-ms-creation-time', + 'Fri, 12 Jun 2020 10:56:43 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', + 'Hot', + 'x-ms-access-tier-inferred', + 'true', + 'Date', + 'Fri, 12 Jun 2020 10:56:43 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/container159195940246107854/blob159195940379508746') + .reply(200, "Hello World", [ + 'Content-Length', + '11', + 'Content-Type', + 'application/octet-stream', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Fri, 12 Jun 2020 10:56:43 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D80EBF4ADCBBF6"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'f0c54435-501e-0046-80a8-407927000000', + 'x-ms-client-request-id', + 'be65c5ec-b8f6-4444-9f59-3ed1b652ee4d', + 'x-ms-version', + '2019-12-12', + 'x-ms-tag-count', + '2', + 'x-ms-version-id', + '2020-06-12T10:56:43.0447606Z', + 'x-ms-is-current-version', + 'true', + 'x-ms-creation-time', + 'Fri, 12 Jun 2020 10:56:43 GMT', + 'x-ms-lease-status', + 'unlocked', + 'x-ms-lease-state', + 'available', + 'x-ms-blob-type', + 'BlockBlob', + 'x-ms-server-encrypted', + 'true', + 'Date', + 'Fri, 12 Jun 2020 10:56:44 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/container159195940246107854') + .query(true) + .reply(200, "blob1591959403795087462020-06-12T10:56:43.0447606ZtrueFri, 12 Jun 2020 10:56:43 GMTFri, 12 Jun 2020 10:56:43 GMT0x8D80EBF4ADCBBF611application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottrueunlockedavailabletrue2tag1val1tag2val2", [ + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/xml', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'f0c54506-501e-0046-33a8-407927000000', + 'x-ms-client-request-id', + 'f59807bc-1776-46a9-85e3-c3e90e1969aa', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Fri, 12 Jun 2020 10:56:44 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159195940246107854') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'f0c545a6-501e-0046-41a8-407927000000', + 'x-ms-client-request-id', + '1508dff0-5de9-4718-bfea-0f8085dcb919', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Fri, 12 Jun 2020 10:56:44 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobserviceclient/recording_find_blob_by_tags_should_work.js b/sdk/storage/storage-blob/recordings/node/blobserviceclient/recording_find_blob_by_tags_should_work.js new file mode 100644 index 000000000000..87f3cf915395 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blobserviceclient/recording_find_blob_by_tags_should_work.js @@ -0,0 +1,220 @@ +let nock = require('nock'); + +module.exports.hash = "0ec74020251a40add7f4ac37fe842c42"; + +module.exports.testInfo = {"uniqueName":{"container1":"container1159196218851703967","key":"key159196218890702959","key2":"key2159196218890709285","blobname1":"blobname1159196218890707438","val1":"val1159196218890903986","blobname2":"blobname2159196218970407993","val2":"val2159196218970608898","blobname3":"blobname3159196219072701843","val3":"val3159196219072908927"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container1159196218851703967') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Fri, 12 Jun 2020 11:43:07 GMT', + 'ETag', + '"0x8D80EC5C6B01CE1"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '8acb137b-301e-0050-80ae-408ff0000000', + 'x-ms-client-request-id', + '36ea54a2-c790-43f1-8062-311cbd3fef25', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Fri, 12 Jun 2020 11:43:07 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container1159196218851703967/blobname1159196218890707438') + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Fri, 12 Jun 2020 11:43:08 GMT', + 'ETag', + '"0x8D80EC5C702974D"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '8acb14de-301e-0050-54ae-408ff0000000', + 'x-ms-client-request-id', + '3d83a93d-6274-45ec-8379-fa3a54fd2bbf', + 'x-ms-version', + '2019-12-12', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-12T11:43:08.3117160Z', + 'Date', + 'Fri, 12 Jun 2020 11:43:07 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container1159196218851703967/blobname2159196218970407993') + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Fri, 12 Jun 2020 11:43:09 GMT', + 'ETag', + '"0x8D80EC5C7B42D9B"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '8acb1763-301e-0050-4cae-408ff0000000', + 'x-ms-client-request-id', + '176e8038-72b5-4837-b0f5-23379168a3cd', + 'x-ms-version', + '2019-12-12', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-12T11:43:09.4745499Z', + 'Date', + 'Fri, 12 Jun 2020 11:43:09 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container1159196218851703967/blobname3159196219072701843') + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Fri, 12 Jun 2020 11:43:10 GMT', + 'ETag', + '"0x8D80EC5C80A9ADB"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '8acb1922-301e-0050-02ae-408ff0000000', + 'x-ms-client-request-id', + '9d182d50-972b-4065-90f0-ef545e8386d8', + 'x-ms-version', + '2019-12-12', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-12T11:43:10.0409563Z', + 'Date', + 'Fri, 12 Jun 2020 11:43:09 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/') + .query(true) + .reply(200, "\nkey159196218890702959='val1159196218890903986'blobname1159196218890707438container1159196218851703967val1159196218890903986", [ + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/xml', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '8acb2163-301e-0050-0bae-408ff0000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + 'ebd077ed-cf26-457f-8db7-b2074c72ae69', + 'Date', + 'Fri, 12 Jun 2020 11:43:12 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/') + .query(true) + .reply(200, "\nkey159196218890702959='val2159196218970608898'blobname2159196218970407993container1159196218851703967val2159196218970608898", [ + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/xml', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '8acb2474-301e-0050-68ae-408ff0000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + '21a1936a-a9ee-4945-a151-0130f2156dc9', + 'Date', + 'Fri, 12 Jun 2020 11:43:13 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/') + .query(true) + .reply(200, "\nkey2159196218890709285='default'1blobname1159196218890707438container1159196218851703967default2!308!MDAwMDQ1IWNvbnRhaW5lcjExNTkxOTYyMTg4NTE3MDM5NjcBMDFENjQwQUVBNDM5NjAzNyEwMDAwMjchYmxvYm5hbWUyMTU5MTk2MjE4OTcwNDA3OTkzITAwMDAxNSEIAAAABwAAAGRlZmF1bHQhMDAwMDAxITAhMDAwMDI4ITk5OTktMTItMzFUMjM6NTk6NTkuOTk5OTk5OVohMDAwMDM2IWExNjE5MTEzLTc5Y2UtNDFlYi1iZjhkLTQzN2YyOWMyMTdjOSEwMDAwMjIha2V5MjE1OTE5NjIxODg5MDcwOTI4NSE-", [ + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/xml', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '8acb26fd-301e-0050-56ae-408ff0000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + '29798daf-27ad-4ef9-ab66-1082c6c0539a', + 'Date', + 'Fri, 12 Jun 2020 11:43:14 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/') + .query(true) + .reply(200, "\n2!308!MDAwMDQ1IWNvbnRhaW5lcjExNTkxOTYyMTg4NTE3MDM5NjcBMDFENjQwQUVBNDM5NjAzNyEwMDAwMjchYmxvYm5hbWUyMTU5MTk2MjE4OTcwNDA3OTkzITAwMDAxNSEIAAAABwAAAGRlZmF1bHQhMDAwMDAxITAhMDAwMDI4ITk5OTktMTItMzFUMjM6NTk6NTkuOTk5OTk5OVohMDAwMDM2IWExNjE5MTEzLTc5Y2UtNDFlYi1iZjhkLTQzN2YyOWMyMTdjOSEwMDAwMjIha2V5MjE1OTE5NjIxODg5MDcwOTI4NSE-key2159196218890709285='default'1blobname2159196218970407993container1159196218851703967default2!308!MDAwMDQ1IWNvbnRhaW5lcjExNTkxOTYyMTg4NTE3MDM5NjcBMDFENjQwQUVBNDM5NjAzNyEwMDAwMjchYmxvYm5hbWUzMTU5MTk2MjE5MDcyNzAxODQzITAwMDAxNSEIAAAABwAAAGRlZmF1bHQhMDAwMDAxITAhMDAwMDI4ITk5OTktMTItMzFUMjM6NTk6NTkuOTk5OTk5OVohMDAwMDM2ITk1NzAwMjlmLWVhZjctNDkxZC04YzVjLWZiMzIxZDVlNTE1OCEwMDAwMjIha2V5MjE1OTE5NjIxODg5MDcwOTI4NSE-", [ + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/xml', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '8acb295f-301e-0050-16ae-408ff0000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + '360135bc-1f54-4324-8666-d176dd242d68', + 'Date', + 'Fri, 12 Jun 2020 11:43:16 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/') + .query(true) + .reply(200, "\n2!308!MDAwMDQ1IWNvbnRhaW5lcjExNTkxOTYyMTg4NTE3MDM5NjcBMDFENjQwQUVBNDM5NjAzNyEwMDAwMjchYmxvYm5hbWUzMTU5MTk2MjE5MDcyNzAxODQzITAwMDAxNSEIAAAABwAAAGRlZmF1bHQhMDAwMDAxITAhMDAwMDI4ITk5OTktMTItMzFUMjM6NTk6NTkuOTk5OTk5OVohMDAwMDM2ITk1NzAwMjlmLWVhZjctNDkxZC04YzVjLWZiMzIxZDVlNTE1OCEwMDAwMjIha2V5MjE1OTE5NjIxODg5MDcwOTI4NSE-key2159196218890709285='default'1blobname3159196219072701843container1159196218851703967default", [ + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/xml', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '8acb2b21-301e-0050-49ae-408ff0000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + '21c74bd5-fdb8-485e-a291-cbd5d5d17b6a', + 'Date', + 'Fri, 12 Jun 2020 11:43:16 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container1159196218851703967') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '8acb2e11-301e-0050-12ae-408ff0000000', + 'x-ms-client-request-id', + '23393f7e-d61c-4fc1-86cb-7c315faede6a', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Fri, 12 Jun 2020 11:43:17 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/highlevel/recording_put_blob_with_maximum_size.js b/sdk/storage/storage-blob/recordings/node/highlevel/recording_put_blob_with_maximum_size.js new file mode 100644 index 000000000000..606f2d7fcedb --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/highlevel/recording_put_blob_with_maximum_size.js @@ -0,0 +1,45 @@ +let nock = require('nock'); + +module.exports.hash = "82a9338d67ceb4b736c6cb55f3326590"; + +module.exports.testInfo = {"uniqueName":{"container":"container159195610801707420","blob":"blob159195610832605651"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159195610801707420') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Fri, 12 Jun 2020 10:01:47 GMT', + 'ETag', + '"0x8D80EB79E6C315B"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '5523c08a-901e-0051-1da0-40b825000000', + 'x-ms-client-request-id', + '1724ff35-2998-4ee5-a689-c5463727adaa', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Fri, 12 Jun 2020 10:01:46 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159195610801707420') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '54356e5c-801e-0072-69a0-4022e6000000', + 'x-ms-client-request-id', + '4bc734fd-621e-499d-9616-97f3070a3dbe', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Fri, 12 Jun 2020 10:01:47 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/shared_access_signature_sas_generation_nodejs_only/recording_generateblobsasqueryparameters_should_work_for_blob_tags.js b/sdk/storage/storage-blob/recordings/node/shared_access_signature_sas_generation_nodejs_only/recording_generateblobsasqueryparameters_should_work_for_blob_tags.js new file mode 100644 index 000000000000..4bb039460186 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/shared_access_signature_sas_generation_nodejs_only/recording_generateblobsasqueryparameters_should_work_for_blob_tags.js @@ -0,0 +1,138 @@ +let nock = require('nock'); + +module.exports.hash = "a198f8f80adb2ea3371ca8aa91911b96"; + +module.exports.testInfo = {"uniqueName":{"container":"container159196232864304483","blob":"blob159196233040509276"},"newDate":{"now":"2020-06-12T11:45:28.642Z","tmr":"2020-06-12T11:45:28.643Z"}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159196232864304483') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Fri, 12 Jun 2020 11:45:29 GMT', + 'ETag', + '"0x8D80EC61AE9AB90"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '245c1d65-601e-0010-71ae-4088c8000000', + 'x-ms-client-request-id', + 'd2cc23c7-3103-4469-bb9a-69d84ed388af', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Fri, 12 Jun 2020 11:45:28 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159196232864304483/blob159196233040509276') + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Fri, 12 Jun 2020 11:45:29 GMT', + 'ETag', + '"0x8D80EC61B4A8D28"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '245c1df2-601e-0010-67ae-4088c8000000', + 'x-ms-client-request-id', + '30db7470-ae44-4c7d-b923-a6bdc8413ed0', + 'x-ms-version', + '2019-12-12', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-12T11:45:29.7109288Z', + 'Date', + 'Fri, 12 Jun 2020 11:45:29 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159196232864304483/blob159196233040509276', "tag1val1tag2val2") + .query(true) + .reply(204, "", [ + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '245c1e3b-601e-0010-22ae-4088c8000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + '07cce673-d889-4ec9-8a69-c138f79158e2', + 'Date', + 'Fri, 12 Jun 2020 11:45:30 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container159196232864304483/blob159196233040509276') + .query(true) + .reply(200, [], [ + 'Cache-Control', + 'cache-control-override', + 'Content-Length', + '1024', + 'Content-Type', + 'content-type-override', + 'Content-Encoding', + 'content-encoding-override', + 'Content-Language', + 'content-language-override', + 'Last-Modified', + 'Fri, 12 Jun 2020 11:45:29 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D80EC61B4A8D28"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '245c1e7d-601e-0010-57ae-4088c8000000', + 'x-ms-client-request-id', + 'd1326ca3-0a11-43a7-acb2-28ad3c84f676', + 'x-ms-version', + '2019-12-12', + 'x-ms-tag-count', + '2', + 'x-ms-version-id', + '2020-06-12T11:45:29.7109288Z', + 'x-ms-is-current-version', + 'true', + 'x-ms-creation-time', + 'Fri, 12 Jun 2020 11:45:29 GMT', + 'x-ms-lease-status', + 'unlocked', + 'x-ms-lease-state', + 'available', + 'x-ms-blob-type', + 'PageBlob', + 'x-ms-blob-sequence-number', + '0', + 'Content-Disposition', + 'content-disposition-override', + 'x-ms-server-encrypted', + 'true', + 'Date', + 'Fri, 12 Jun 2020 11:45:30 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159196232864304483') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '245c1ecf-601e-0010-20ae-4088c8000000', + 'x-ms-client-request-id', + '98f1bc47-30bc-4f19-a464-8472ec8555c0', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Fri, 12 Jun 2020 11:45:30 GMT' +]); From 826d1bdb41ebbf20606a037d34479641cd60ce7d Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Sat, 13 Jun 2020 13:09:39 +0800 Subject: [PATCH 18/39] fix listContainer options --- sdk/storage/storage-blob/src/BlobServiceClient.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sdk/storage/storage-blob/src/BlobServiceClient.ts b/sdk/storage/storage-blob/src/BlobServiceClient.ts index fff24db33399..e48d9cb0d73c 100644 --- a/sdk/storage/storage-blob/src/BlobServiceClient.ts +++ b/sdk/storage/storage-blob/src/BlobServiceClient.ts @@ -699,10 +699,8 @@ export class BlobServiceClient extends StorageClient { return await this.serviceContext.listContainersSegment({ abortSignal: options.abortSignal, marker, - options: { - ...options, - include: typeof options.include === "string" ? [options.include] : options.include - }, + ...options, + include: typeof options.include === "string" ? [options.include] : options.include, spanOptions }); } catch (e) { From c4b7dfb12192344ad7da8b289bee44c8e68e4c6e Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Sat, 13 Jun 2020 17:41:00 +0800 Subject: [PATCH 19/39] wip --- sdk/storage/storage-blob/.vscode/settings.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sdk/storage/storage-blob/.vscode/settings.json b/sdk/storage/storage-blob/.vscode/settings.json index 7ceb5ace3e9d..0fddab0e0071 100644 --- a/sdk/storage/storage-blob/.vscode/settings.json +++ b/sdk/storage/storage-blob/.vscode/settings.json @@ -7,7 +7,8 @@ "[typescript]": { "editor.formatOnSave": true, "editor.tabSize": 2, - "editor.detectIndentation": false + "editor.detectIndentation": false, + "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[json]": { "editor.formatOnSave": true, @@ -24,4 +25,5 @@ ], "typescript.preferences.quoteStyle": "double", "javascript.preferences.quoteStyle": "double" + } \ No newline at end of file From aa1f9627033f1dd73a7ef7d2ba85486e077a8ab7 Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Sat, 13 Jun 2020 19:54:45 +0800 Subject: [PATCH 20/39] record skipped test for Jumbo --- sdk/storage/storage-blob/.vscode/launch.json | 2 +- sdk/storage/storage-blob/karma.conf.js | 2 +- sdk/storage/storage-file-datalake/.vscode/launch.json | 2 +- sdk/storage/storage-file-datalake/karma.conf.js | 2 +- .../node/highlevel_nodejs_only/recording_after_all_hook.js | 2 +- .../node/highlevel_nodejs_only/recording_before_all_hook.js | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sdk/storage/storage-blob/.vscode/launch.json b/sdk/storage/storage-blob/.vscode/launch.json index 24dbfc9d74c4..3eb92e74ef9e 100644 --- a/sdk/storage/storage-blob/.vscode/launch.json +++ b/sdk/storage/storage-blob/.vscode/launch.json @@ -34,7 +34,7 @@ "${workspaceFolder}/test/node/*.spec.ts" ], "env": { "TS_NODE_COMPILER_OPTIONS": "{\"module\": \"commonjs\"}" }, - "envFile": "${workspaceFolder}/../.env", + "envFile": "${workspaceFolder}/.env", "console": "integratedTerminal", "internalConsoleOptions": "neverOpen", "protocol": "inspector" diff --git a/sdk/storage/storage-blob/karma.conf.js b/sdk/storage/storage-blob/karma.conf.js index b79314b63811..a0dd923ee7f7 100644 --- a/sdk/storage/storage-blob/karma.conf.js +++ b/sdk/storage/storage-blob/karma.conf.js @@ -1,6 +1,6 @@ // https://github.com/karma-runner/karma-chrome-launcher process.env.CHROME_BIN = require("puppeteer").executablePath(); -require("dotenv").config({ path: "../.env" }); +require("dotenv").config({ path: "./.env" }); const { jsonRecordingFilterFunction, isPlaybackMode, diff --git a/sdk/storage/storage-file-datalake/.vscode/launch.json b/sdk/storage/storage-file-datalake/.vscode/launch.json index d6a21c1ade34..7c79872c27cc 100644 --- a/sdk/storage/storage-file-datalake/.vscode/launch.json +++ b/sdk/storage/storage-file-datalake/.vscode/launch.json @@ -34,7 +34,7 @@ "${workspaceFolder}/test/node/*.spec.ts" ], "env": { "TS_NODE_COMPILER_OPTIONS": "{\"module\": \"commonjs\"}" }, - "envFile": "${workspaceFolder}/../.env", + "envFile": "${workspaceFolder}/.env", "console": "integratedTerminal", "internalConsoleOptions": "neverOpen", "protocol": "inspector" diff --git a/sdk/storage/storage-file-datalake/karma.conf.js b/sdk/storage/storage-file-datalake/karma.conf.js index 361eec60b90d..3acad9d4f585 100644 --- a/sdk/storage/storage-file-datalake/karma.conf.js +++ b/sdk/storage/storage-file-datalake/karma.conf.js @@ -1,6 +1,6 @@ // https://github.com/karma-runner/karma-chrome-launcher process.env.CHROME_BIN = require("puppeteer").executablePath(); -require("dotenv").config({ path: "../.env" }); +require("dotenv").config({ path: ".env" }); const { jsonRecordingFilterFunction, isPlaybackMode, diff --git a/sdk/storage/storage-file-datalake/recordings/node/highlevel_nodejs_only/recording_after_all_hook.js b/sdk/storage/storage-file-datalake/recordings/node/highlevel_nodejs_only/recording_after_all_hook.js index cf2ec3ff84da..580ce0c38135 100644 --- a/sdk/storage/storage-file-datalake/recordings/node/highlevel_nodejs_only/recording_after_all_hook.js +++ b/sdk/storage/storage-file-datalake/recordings/node/highlevel_nodejs_only/recording_after_all_hook.js @@ -1,5 +1,5 @@ let nock = require('nock'); -module.exports.hash = "eb7536c54793ecdfc978a993963c0ba7"; +module.exports.hash = "0697e332fa9a18057fbe5715cdae2b0c"; module.exports.testInfo = {"uniqueName":{},"newDate":{}} diff --git a/sdk/storage/storage-file-datalake/recordings/node/highlevel_nodejs_only/recording_before_all_hook.js b/sdk/storage/storage-file-datalake/recordings/node/highlevel_nodejs_only/recording_before_all_hook.js index cf2ec3ff84da..592cccc23512 100644 --- a/sdk/storage/storage-file-datalake/recordings/node/highlevel_nodejs_only/recording_before_all_hook.js +++ b/sdk/storage/storage-file-datalake/recordings/node/highlevel_nodejs_only/recording_before_all_hook.js @@ -1,5 +1,5 @@ let nock = require('nock'); -module.exports.hash = "eb7536c54793ecdfc978a993963c0ba7"; +module.exports.hash = "806e9a38359ed552a548cc5564d21b5b"; module.exports.testInfo = {"uniqueName":{},"newDate":{}} From ec6710a83acfc9017bc972a61d30445ec7f15c54 Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Sat, 13 Jun 2020 20:04:35 +0800 Subject: [PATCH 21/39] set default formatter --- sdk/storage/storage-blob/.vscode/settings.json | 4 ++-- sdk/storage/storage-file-datalake/.vscode/settings.json | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sdk/storage/storage-blob/.vscode/settings.json b/sdk/storage/storage-blob/.vscode/settings.json index 0fddab0e0071..8272fa845213 100644 --- a/sdk/storage/storage-blob/.vscode/settings.json +++ b/sdk/storage/storage-blob/.vscode/settings.json @@ -13,7 +13,8 @@ "[json]": { "editor.formatOnSave": true, "editor.tabSize": 2, - "editor.detectIndentation": false + "editor.detectIndentation": false, + "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[yaml]": { "editor.formatOnSave": true, @@ -25,5 +26,4 @@ ], "typescript.preferences.quoteStyle": "double", "javascript.preferences.quoteStyle": "double" - } \ No newline at end of file diff --git a/sdk/storage/storage-file-datalake/.vscode/settings.json b/sdk/storage/storage-file-datalake/.vscode/settings.json index 7ceb5ace3e9d..8272fa845213 100644 --- a/sdk/storage/storage-file-datalake/.vscode/settings.json +++ b/sdk/storage/storage-file-datalake/.vscode/settings.json @@ -7,12 +7,14 @@ "[typescript]": { "editor.formatOnSave": true, "editor.tabSize": 2, - "editor.detectIndentation": false + "editor.detectIndentation": false, + "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[json]": { "editor.formatOnSave": true, "editor.tabSize": 2, - "editor.detectIndentation": false + "editor.detectIndentation": false, + "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[yaml]": { "editor.formatOnSave": true, From 0300ebad81e901bfb86d543e98793c6020e294de Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Sun, 14 Jun 2020 03:59:53 +0000 Subject: [PATCH 22/39] me --- sdk/storage/storage-blob-changefeed/.vscode/launch.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/storage/storage-blob-changefeed/.vscode/launch.json b/sdk/storage/storage-blob-changefeed/.vscode/launch.json index 24dbfc9d74c4..3eb92e74ef9e 100644 --- a/sdk/storage/storage-blob-changefeed/.vscode/launch.json +++ b/sdk/storage/storage-blob-changefeed/.vscode/launch.json @@ -34,7 +34,7 @@ "${workspaceFolder}/test/node/*.spec.ts" ], "env": { "TS_NODE_COMPILER_OPTIONS": "{\"module\": \"commonjs\"}" }, - "envFile": "${workspaceFolder}/../.env", + "envFile": "${workspaceFolder}/.env", "console": "integratedTerminal", "internalConsoleOptions": "neverOpen", "protocol": "inspector" From 1571e5052d92a6feeccc0e364ce7683d256db157 Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Sun, 14 Jun 2020 12:08:30 +0800 Subject: [PATCH 23/39] wip --- ...k_for_blob_version_delete_and_blob_tags.js | 159 ++++++++++++++++++ .../storage-blob/test/node/sas.spec.ts | 55 ++++++ 2 files changed, 214 insertions(+) create mode 100644 sdk/storage/storage-blob/recordings/node/shared_access_signature_sas_generation_nodejs_only/recording_generateblobsasqueryparameters_should_work_for_blob_version_delete_and_blob_tags.js diff --git a/sdk/storage/storage-blob/recordings/node/shared_access_signature_sas_generation_nodejs_only/recording_generateblobsasqueryparameters_should_work_for_blob_version_delete_and_blob_tags.js b/sdk/storage/storage-blob/recordings/node/shared_access_signature_sas_generation_nodejs_only/recording_generateblobsasqueryparameters_should_work_for_blob_version_delete_and_blob_tags.js new file mode 100644 index 000000000000..69c113477081 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/shared_access_signature_sas_generation_nodejs_only/recording_generateblobsasqueryparameters_should_work_for_blob_version_delete_and_blob_tags.js @@ -0,0 +1,159 @@ +let nock = require('nock'); + +module.exports.hash = "e5b376560681e35a445fcdd8f47cbcc2"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210705459109851","blob":"blob159210705602705459"},"newDate":{"now":"2020-06-14T03:57:36.635Z","tmr":"2020-06-14T03:57:36.637Z"}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210705459109851') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Sun, 14 Jun 2020 03:57:35 GMT', + 'ETag', + '"0x8D8101712C9AA6D"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '953797a0-301e-006f-3aff-414753000000', + 'x-ms-client-request-id', + '67c1db94-d434-4033-829b-107689909849', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 03:57:35 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210705459109851/blob159210705602705459', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Sun, 14 Jun 2020 03:57:36 GMT', + 'ETag', + '"0x8D81017130021C9"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '953798d9-301e-006f-63ff-414753000000', + 'x-ms-client-request-id', + '39221734-24b0-49aa-96ce-94a2ca355d76', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-14T03:57:36.1993161Z', + 'Date', + 'Sun, 14 Jun 2020 03:57:35 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210705459109851/blob159210705602705459') + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Sun, 14 Jun 2020 03:57:36 GMT', + 'ETag', + '"0x8D81017132D0644"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '953799e2-301e-006f-67ff-414753000000', + 'x-ms-client-request-id', + 'fd4f5910-6c55-4f59-b161-0d44ae0f5450', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-14T03:57:36.4945236Z', + 'Date', + 'Sun, 14 Jun 2020 03:57:35 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210705459109851/blob159210705602705459', "tag1val1tag2val2") + .query(true) + .reply(204, "", [ + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '95379b4f-301e-006f-45ff-414753000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + '15440dca-2a15-42e9-8ae0-75af905031ab', + 'Date', + 'Sun, 14 Jun 2020 03:57:36 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159210705459109851/blob159210705602705459') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '95379d35-301e-006f-17ff-414753000000', + 'x-ms-client-request-id', + 'a9a604d2-58bb-40b2-938d-4f7081f3a738', + 'x-ms-version', + '2019-12-12', + 'x-ms-delete-type-permanent', + 'true', + 'Date', + 'Sun, 14 Jun 2020 03:57:36 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container159210705459109851/blob159210705602705459') + .query(true) + .reply(404, "", [ + 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '95379e8f-301e-006f-68ff-414753000000', + 'x-ms-client-request-id', + 'a01373bf-d2d5-4f57-976e-8be92e88be63', + 'x-ms-version', + '2019-12-12', + 'x-ms-error-code', + 'BlobNotFound', + 'Date', + 'Sun, 14 Jun 2020 03:57:36 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159210705459109851') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '95379fb9-301e-006f-0dff-414753000000', + 'x-ms-client-request-id', + '5af846bc-081d-4fa3-af59-005fa7768f31', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 03:57:37 GMT' +]); diff --git a/sdk/storage/storage-blob/test/node/sas.spec.ts b/sdk/storage/storage-blob/test/node/sas.spec.ts index d8c435f26cf2..90a5a09b3ae4 100644 --- a/sdk/storage/storage-blob/test/node/sas.spec.ts +++ b/sdk/storage/storage-blob/test/node/sas.spec.ts @@ -1020,4 +1020,59 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => { await containerClient.delete(); }); + + it("generateBlobSASQueryParameters should work for blob version delete and blob tags", async function() { + if (isBlobVersioningDisabled()) { + this.skip(); + } + + // create versions + const containerName = recorder.getUniqueName("container"); + const containerClient = blobServiceClient.getContainerClient(containerName); + await containerClient.create(); + const content = "Hello World"; + const blobName = recorder.getUniqueName("blob"); + const blobClient = containerClient.getBlobClient(blobName); + const blockBlobClient = blobClient.getBlockBlobClient(); + const uploadRes = await blockBlobClient.upload(content, content.length); + await blockBlobClient.upload("", 0); + + // generate SAS + const now = recorder.newDate("now"); + now.setMinutes(now.getMinutes() - 5); // Skip clock skew with server + const tmr = recorder.newDate("tmr"); + tmr.setDate(tmr.getDate() + 1); + + // By default, credential is always the last element of pipeline factories + const factories = (blobServiceClient as any).pipeline.factories; + const sharedKeyCredential = factories[factories.length - 1]; + + const blobSAS = generateBlobSASQueryParameters( + { + blobName: blobClient.name, + containerName: blobClient.containerName, + startsOn: now, + expiresOn: tmr, + ipRange: { start: "0.0.0.0", end: "255.255.255.255" }, + permissions: BlobSASPermissions.parse("racwdxt"), + protocol: SASProtocol.HttpsAndHttp, + versionId: uploadRes.versionId + }, + sharedKeyCredential as StorageSharedKeyCredential + ); + + const sasURL = `${blobClient.withVersion(uploadRes.versionId!).url}&${blobSAS}`; + const blobClientWithSAS = new BlobClient(sasURL, newPipeline(new AnonymousCredential())); + + const tags = { + tag1: "val1", + tag2: "val2" + }; + await blobClientWithSAS.setTags(tags); + + await blobClientWithSAS.delete(); + assert.ok(!(await blobClientWithSAS.exists())); + + await containerClient.delete(); + }); }); From e3adcf8f5b61e0337af5a9bf9e122824b8c0fea0 Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Sun, 14 Jun 2020 12:00:38 +0000 Subject: [PATCH 24/39] blob record node --- ...eleteblobs_should_work_for_batch_delete.js | 62 +++-- .../recording_download_a_version_to_file.js | 62 +++-- ...d_failed_for_a_completed_copy_operation.js | 89 +++---- ...egincopyfromurl_with_rehydrate_priority.js | 186 ++++++------- ...be_created_with_a_sas_connection_string.js | 113 ++++---- ...reate_append_blob_should_work_with_tags.js | 138 ++++++++++ ...e_block_blob_blob_should_work_with_tags.js | 142 ++++++++++ ..._create_page_blob_should_work_with_tags.js | 138 ++++++++++ .../blobclient/recording_createsnapshot.js | 132 +++++----- .../node/blobclient/recording_delete.js | 74 +++--- .../blobclient/recording_delete_snapshot.js | 164 ++++++------ .../recording_download_all_parameters_set.js | 140 +++++----- ...e_aborted_error_after_download_finishes.js | 90 ++++--- ...oad_with_default_parameters_and_tracing.js | 90 ++++--- ...recording_download_with_progress_report.js | 84 +++--- ...g_download_with_with_default_parameters.js | 90 ++++--- ...xists_rethrows_error_from_getproperties.js | 120 +++++---- ...xists_returns_false_on_nonexisting_blob.js | 78 +++--- ...exists_returns_true_on_an_existing_blob.js | 92 ++++--- ...exists_works_with_customer_provided_key.js | 134 +++++----- ...t_blob_tags_should_work_with_a_snapshot.js | 138 ++++++++++ .../recording_set_blob_tags_should_work.js | 220 ++++++++++++++++ ...ording_setaccesstier_set_archive_to_hot.js | 151 ++++++----- ...rding_setaccesstier_set_default_to_cool.js | 105 ++++---- ...g_setaccesstier_with_rehydrate_priority.js | 120 +++++---- ..._sethttpheaders_with_all_parameters_set.js | 111 ++++---- ..._sethttpheaders_with_default_parameters.js | 111 ++++---- ...tproperties_and_createsnapshot_with_cpk.js | 245 +++++++++--------- ...g_setmetadata_with_cleaning_up_metadata.js | 167 ++++++------ ...a_blob_uploaded_without_cpk_should_fail.js | 74 +++--- ...rding_setmetadata_with_new_metadata_set.js | 113 ++++---- ...constructor_blobname_parameter_is_empty.js | 59 +++-- ...ructor_containername_parameter_is_empty.js | 59 +++-- .../node/blobclient/recording_undelete.js | 148 ++++++----- ...d_failed_for_a_completed_copy_operation.js | 89 +++---- ...can_be_created_with_a_connection_string.js | 113 ++++---- ...h_a_connection_string_and_an_option_bag.js | 121 ++++----- ..._be_created_with_a_url_and_a_credential.js | 113 ++++---- ..._url_and_a_credential_and_an_option_bag.js | 113 ++++---- ...an_be_created_with_a_url_and_a_pipeline.js | 113 ++++---- ...reated_with_a_url_and_a_tokencredential.js | 59 +++-- .../recording_createsnapshot.js | 132 +++++----- .../recording_delete.js | 74 +++--- .../recording_delete_snapshot.js | 162 ++++++------ .../recording_download_all_parameters_set.js | 90 ++++--- ...g_download_with_with_default_parameters.js | 90 ++++--- ..._with_access_conditions_ifmodifiedsince.js | 56 ++-- ...not_work_with_access_conditions_leaseid.js | 56 ++-- .../recording_query_should_work.js | 56 ++-- ...ecording_query_should_work_with_aborter.js | 56 ++-- ...uery_should_work_with_access_conditions.js | 56 ++-- ..._query_should_work_with_blob_properties.js | 56 ++-- ...ith_csv_input_and_output_configurations.js | 56 ++-- ...ng_query_should_work_with_empty_results.js | 56 ++-- ...uery_should_work_with_fatal_error_event.js | 56 ++-- ...th_json_input_and_output_configurations.js | 56 ++-- ...rding_query_should_work_with_large_file.js | 56 ++-- ..._should_work_with_non_fatal_error_event.js | 56 ++-- ...g_query_should_work_with_progress_event.js | 56 ++-- ...cording_query_should_work_with_snapshot.js | 56 ++-- ...ery_should_work_with_where_conditionals.js | 56 ++-- ...ording_setaccesstier_set_archive_to_hot.js | 149 ++++++----- ...rding_setaccesstier_set_default_to_cool.js | 103 ++++---- ..._sethttpheaders_with_all_parameters_set.js | 111 ++++---- ..._sethttpheaders_with_default_parameters.js | 111 ++++---- ...g_setmetadata_with_cleaning_up_metadata.js | 167 ++++++------ ...rding_setmetadata_with_new_metadata_set.js | 113 ++++---- .../recording_synccopyfromurl.js | 92 +++---- ...recording_find_blob_by_tags_should_work.js | 220 ++++++++++++++++ .../highlevel/recording_after_all_hook.js | 4 +- .../highlevel/recording_before_all_hook.js | 4 +- .../recording_put_blob_with_maximum_size.js | 45 ++++ ...ording_uploadfile_should_work_with_tags.js | 45 ++++ ...eryparameters_should_work_for_blob_tags.js | 138 ++++++++++ .../storage-blob/test/blobversioning.spec.ts | 56 ++-- 75 files changed, 4602 insertions(+), 2904 deletions(-) create mode 100644 sdk/storage/storage-blob/recordings/node/blobclient/recording_create_append_blob_should_work_with_tags.js create mode 100644 sdk/storage/storage-blob/recordings/node/blobclient/recording_create_block_blob_blob_should_work_with_tags.js create mode 100644 sdk/storage/storage-blob/recordings/node/blobclient/recording_create_page_blob_should_work_with_tags.js create mode 100644 sdk/storage/storage-blob/recordings/node/blobclient/recording_get_blob_tags_should_work_with_a_snapshot.js create mode 100644 sdk/storage/storage-blob/recordings/node/blobclient/recording_set_blob_tags_should_work.js create mode 100644 sdk/storage/storage-blob/recordings/node/blobserviceclient/recording_find_blob_by_tags_should_work.js create mode 100644 sdk/storage/storage-blob/recordings/node/highlevel/recording_put_blob_with_maximum_size.js create mode 100644 sdk/storage/storage-blob/recordings/node/highlevel/recording_uploadfile_should_work_with_tags.js create mode 100644 sdk/storage/storage-blob/recordings/node/shared_access_signature_sas_generation_nodejs_only/recording_generateblobsasqueryparameters_should_work_for_blob_tags.js diff --git a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleteblobs_should_work_for_batch_delete.js b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleteblobs_should_work_for_batch_delete.js index 8f184c52f23a..c41d73bad94b 100644 --- a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleteblobs_should_work_for_batch_delete.js +++ b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleteblobs_should_work_for_batch_delete.js @@ -1,48 +1,48 @@ let nock = require('nock'); -module.exports.hash = "6f6a281fc76eb2011a24cc4f8e8e5fd5"; +module.exports.hash = "f3924ffbb542416858b2a5df9d0271fe"; -module.exports.testInfo = {"uniqueName":{"container":"container158459900270600707","blob":"blob158459900294706388"},"newDate":{}} +module.exports.testInfo = {"uniqueName":{"container":"container159213484138100238","blob":"blob159213484151806013"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459900270600707') + .put('/container159213484138100238') .query(true) .reply(201, "", [ 'Content-Length', '0', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:22 GMT', + 'Sun, 14 Jun 2020 11:40:41 GMT', 'ETag', - '"0x8D7CBCE0674D411"', + '"0x8D81057C45530AA"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e4286-b01e-0088-1ab6-fd3fcb000000', + 'f9238049-101e-0035-4940-4221b4000000', 'x-ms-client-request-id', - '2fcf3631-70a9-4f23-a03d-6d0a46ee940d', + 'b3ef4b4f-91af-441c-b988-d4bf78557d3c', 'x-ms-version', '2019-12-12', 'Date', - 'Thu, 19 Mar 2020 06:23:22 GMT' + 'Sun, 14 Jun 2020 11:40:40 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459900270600707/blob158459900294706388', "Hello World") + .put('/container159213484138100238/blob159213484151806013', "Hello World") .reply(201, "", [ 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:23 GMT', + 'Sun, 14 Jun 2020 11:40:41 GMT', 'ETag', - '"0x8D7CBCE069A354C"', + '"0x8D81057C45A85DD"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e42c7-b01e-0088-55b6-fd3fcb000000', + 'f923806b-101e-0035-6940-4221b4000000', 'x-ms-client-request-id', - '30e1ee1b-1578-4702-a037-00e61e37c0a5', + '987cdf1d-40cf-45b2-84f5-171498aba9b8', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -50,28 +50,28 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-03-19T06:23:23.0685516Z', + '2020-06-14T11:40:41.5391197Z', 'Date', - 'Thu, 19 Mar 2020 06:23:22 GMT' + 'Sun, 14 Jun 2020 11:40:41 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459900270600707/blob158459900294706388') + .put('/container159213484138100238/blob159213484151806013') .reply(201, "", [ 'Content-Length', '0', 'Content-MD5', '1B2M2Y8AsgTpgAmY7PhCfg==', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:23 GMT', + 'Sun, 14 Jun 2020 11:40:41 GMT', 'ETag', - '"0x8D7CBCE06BF503D"', + '"0x8D81057C45D1E66"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e4338-b01e-0088-39b6-fd3fcb000000', + 'f9238078-101e-0035-7640-4221b4000000', 'x-ms-client-request-id', - 'abef7945-21b5-4064-9ea3-68cc2ca62275', + '1913e0ce-7397-4b06-9f05-3d51e44d4614', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -79,7 +79,25 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-03-19T06:23:23.3127245Z', + '2020-06-14T11:40:41.5571318Z', 'Date', - 'Thu, 19 Mar 2020 06:23:23 GMT' + 'Sun, 14 Jun 2020 11:40:41 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159213484138100238') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'f9238084-101e-0035-0240-4221b4000000', + 'x-ms-client-request-id', + '36f90171-99e9-4689-93c6-76b66fd5c18d', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 11:40:41 GMT' ]); diff --git a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_download_a_version_to_file.js b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_download_a_version_to_file.js index 128815791b11..e5efe6beb255 100644 --- a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_download_a_version_to_file.js +++ b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_download_a_version_to_file.js @@ -1,48 +1,48 @@ let nock = require('nock'); -module.exports.hash = "e9055ad5397c8ec5665db9c18d047954"; +module.exports.hash = "61459601926d3ae8244cf9c706f3ee1c"; -module.exports.testInfo = {"uniqueName":{"container":"container158459899877900136","blob":"blob158459899902709938"},"newDate":{}} +module.exports.testInfo = {"uniqueName":{"container":"container159212881463608430","blob":"blob159212881477103032"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459899877900136') + .put('/container159212881463608430') .query(true) .reply(201, "", [ 'Content-Length', '0', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:18 GMT', + 'Sun, 14 Jun 2020 10:00:14 GMT', 'ETag', - '"0x8D7CBCE041EB7AC"', + '"0x8D81049BC1DC653"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e3d66-b01e-0088-48b6-fd3fcb000000', + '5c69d39a-301e-0050-2932-428ff0000000', 'x-ms-client-request-id', - '8b492f6a-109d-48a4-be7f-de83a7176c59', + '3279ce28-dac4-4a6c-b8f2-ba1f078916ff', 'x-ms-version', '2019-12-12', 'Date', - 'Thu, 19 Mar 2020 06:23:18 GMT' + 'Sun, 14 Jun 2020 10:00:14 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459899877900136/blob158459899902709938', "Hello World") + .put('/container159212881463608430/blob159212881477103032', "Hello World") .reply(201, "", [ 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:19 GMT', + 'Sun, 14 Jun 2020 10:00:14 GMT', 'ETag', - '"0x8D7CBCE0444186F"', + '"0x8D81049BC23709F"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e3dc9-b01e-0088-18b6-fd3fcb000000', + '5c69d3d1-301e-0050-4e32-428ff0000000', 'x-ms-client-request-id', - 'e0308c97-cc85-4d30-866d-efc534a26504', + 'dd33e5df-ba3b-4523-b0a4-764238c95a81', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -50,28 +50,28 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-03-19T06:23:19.1487599Z', + '2020-06-14T10:00:14.8021407Z', 'Date', - 'Thu, 19 Mar 2020 06:23:18 GMT' + 'Sun, 14 Jun 2020 10:00:14 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459899877900136/blob158459899902709938') + .put('/container159212881463608430/blob159212881477103032') .reply(201, "", [ 'Content-Length', '0', 'Content-MD5', '1B2M2Y8AsgTpgAmY7PhCfg==', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:19 GMT', + 'Sun, 14 Jun 2020 10:00:14 GMT', 'ETag', - '"0x8D7CBCE0468BE1D"', + '"0x8D81049BC26CCA0"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e3e17-b01e-0088-5eb6-fd3fcb000000', + '5c69d3e5-301e-0050-5b32-428ff0000000', 'x-ms-client-request-id', - '06319605-3027-420a-b74f-51dd7426d856', + 'df4ffe0c-51d9-4837-ab2d-094df9e7c2bd', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -79,7 +79,25 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-03-19T06:23:19.3899309Z', + '2020-06-14T10:00:14.8261571Z', 'Date', - 'Thu, 19 Mar 2020 06:23:19 GMT' + 'Sun, 14 Jun 2020 10:00:14 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159212881463608430') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '5c69d3fe-301e-0050-6c32-428ff0000000', + 'x-ms-client-request-id', + '04722bae-f7c1-4c41-9373-e2d6e8719b88', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 10:00:14 GMT' ]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/recording_abortcopyfromclient_should_failed_for_a_completed_copy_operation.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_abortcopyfromclient_should_failed_for_a_completed_copy_operation.js index e33e4c077bec..eadfcaa595f4 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient/recording_abortcopyfromclient_should_failed_for_a_completed_copy_operation.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_abortcopyfromclient_should_failed_for_a_completed_copy_operation.js @@ -1,93 +1,90 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container157169617795500769","blob":"blob157169617822206514","copiedblob":"copiedblob157169617828204310"} +module.exports.hash = "301fac9f0fb38a11fba59c294afd8c72"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827300909926","blob":"blob159210827303002737","copiedblob":"copiedblob159210827304509153"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container157169617795500769') + .put('/container159210827300909926') .query(true) .reply(201, "", [ 'Content-Length', '0', 'Last-Modified', - 'Mon, 21 Oct 2019 22:16:18 GMT', + 'Sun, 14 Jun 2020 04:17:53 GMT', 'ETag', - '"0x8D756744BA1F45E"', + '"0x8D81019E84891C0"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'e2505f83-b01e-00a4-105d-885a52000000', + 'c1308f6b-201e-003e-2e02-42dadf000000', 'x-ms-client-request-id', - '2d0d535e-7489-45e2-9340-ea311b87503e', + 'd58a6f84-a2aa-414c-9997-1779119a6d4f', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Mon, 21 Oct 2019 22:16:17 GMT', - 'Connection', - 'close' + 'Sun, 14 Jun 2020 04:17:52 GMT' ]); - nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container157169617795500769/blob157169617822206514', "Hello World") + .put('/container159210827300909926/blob159210827303002737', "Hello World") .reply(201, "", [ 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Mon, 21 Oct 2019 22:16:18 GMT', + 'Sun, 14 Jun 2020 04:17:53 GMT', 'ETag', - '"0x8D756744BAF8219"', + '"0x8D81019E84B205D"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'a59e6eeb-f01e-00d7-5b5d-8802c1000000', + 'c1308f6f-201e-003e-3102-42dadf000000', 'x-ms-client-request-id', - 'be260520-a623-4534-803a-2cbddff79006', + '43abc28a-a3e9-4f5f-9a42-9671307033a2', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:53.0389597Z', 'Date', - 'Mon, 21 Oct 2019 22:16:17 GMT', - 'Connection', - 'close' + 'Sun, 14 Jun 2020 04:17:52 GMT' ]); - nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container157169617795500769/copiedblob157169617828204310') + .put('/container159210827300909926/copiedblob159210827304509153') .reply(202, "", [ 'Content-Length', '0', 'Last-Modified', - 'Mon, 21 Oct 2019 22:16:18 GMT', + 'Sun, 14 Jun 2020 04:17:53 GMT', 'ETag', - '"0x8D756744BB85D5A"', + '"0x8D81019E855A999"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'b1b8da7a-f01e-00e8-4b5d-88ca62000000', + 'c1308f73-201e-003e-3502-42dadf000000', 'x-ms-client-request-id', - 'c57be1a9-f37e-4a10-92d0-ca97bfbfa918', + 'e32ef411-78c2-4444-a520-15cb3673461d', 'x-ms-version', - '2019-02-02', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:53.1080089Z', 'x-ms-copy-id', - '0b77499f-1bf5-4f71-ad39-3d85b8356e27', + 'd4c876a5-0730-41f2-87c6-a5174c5df521', 'x-ms-copy-status', 'success', 'Date', - 'Mon, 21 Oct 2019 22:16:18 GMT', - 'Connection', - 'close' + 'Sun, 14 Jun 2020 04:17:52 GMT' ]); - nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container157169617795500769/copiedblob157169617828204310') - .reply(400, "InvalidHeaderValueThe value for one of the HTTP headers is not in the correct format.\nRequestId:55c1a43b-c01e-0028-285d-88325c000000\nTime:2019-10-21T22:16:18.3358559Zx-ms-copy-source0b77499f-1bf5-4f71-ad39-3d85b8356e27", [ + .put('/container159210827300909926/copiedblob159210827304509153') + .reply(400, "InvalidHeaderValueThe value for one of the HTTP headers is not in the correct format.\nRequestId:c1308f93-201e-003e-5002-42dadf000000\nTime:2020-06-14T04:17:53.1693057Zx-ms-copy-sourced4c876a5-0730-41f2-87c6-a5174c5df521", [ 'Content-Length', '358', 'Content-Type', @@ -95,22 +92,19 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '55c1a43b-c01e-0028-285d-88325c000000', + 'c1308f93-201e-003e-5002-42dadf000000', 'x-ms-client-request-id', - 'e12b9811-7646-40d6-963d-7e17da680d1d', + 'd8873308-ce96-4b3a-80be-4a0090e43681', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-error-code', 'InvalidHeaderValue', 'Date', - 'Mon, 21 Oct 2019 22:16:18 GMT', - 'Connection', - 'close' + 'Sun, 14 Jun 2020 04:17:52 GMT' ]); - nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container157169617795500769') + .delete('/container159210827300909926') .query(true) .reply(202, "", [ 'Content-Length', @@ -118,14 +112,11 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '8e52528a-801e-00e2-375d-886ed5000000', + 'c1308f95-201e-003e-5202-42dadf000000', 'x-ms-client-request-id', - '98a8b6cb-24fb-4dec-83d7-ab70943f4c46', + 'd2e2a9aa-da04-4c37-85cf-40a9b3aebb98', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Mon, 21 Oct 2019 22:16:18 GMT', - 'Connection', - 'close' + 'Sun, 14 Jun 2020 04:17:52 GMT' ]); - diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/recording_begincopyfromurl_with_rehydrate_priority.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_begincopyfromurl_with_rehydrate_priority.js index a05a92efbd50..1126081dd995 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient/recording_begincopyfromurl_with_rehydrate_priority.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_begincopyfromurl_with_rehydrate_priority.js @@ -1,92 +1,89 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container157169617848406103","blob":"blob157169617853507178","copiedblobrehydrate":"copiedblobrehydrate157169617860605526"} +module.exports.hash = "7c1156ec1ea33497df5e4fcace763744"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827417807072","blob":"blob159210827419405420","copiedblobrehydrate":"copiedblobrehydrate159210827420909670"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container157169617848406103') + .put('/container159210827417807072') .query(true) .reply(201, "", [ 'Content-Length', '0', 'Last-Modified', - 'Mon, 21 Oct 2019 22:16:18 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'ETag', - '"0x8D756744BD625AA"', + '"0x8D81019E8FBD5BD"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '3151a8c2-b01e-00b4-175d-889f3a000000', + 'c1309125-201e-003e-4402-42dadf000000', 'x-ms-client-request-id', - 'f7ebd112-9a1d-49e3-af13-46a3a13cc461', + '244e7138-aa40-4e48-88f2-fd06f275fec5', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Mon, 21 Oct 2019 22:16:17 GMT', - 'Connection', - 'close' + 'Sun, 14 Jun 2020 04:17:53 GMT' ]); - nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container157169617848406103/blob157169617853507178', "Hello World") + .put('/container159210827417807072/blob159210827419405420', "Hello World") .reply(201, "", [ 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Mon, 21 Oct 2019 22:16:18 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'ETag', - '"0x8D756744BE0FB8A"', + '"0x8D81019E8FE8B35"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '4f70332a-501e-00e1-335d-888fb1000000', + 'c130912b-201e-003e-4902-42dadf000000', 'x-ms-client-request-id', - '7b5b93c1-15a8-43a2-8721-d0d32a2367fd', + 'cb85e919-6f3f-4f17-a4c2-fd142d081a11', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:54.2147893Z', 'Date', - 'Mon, 21 Oct 2019 22:16:17 GMT', - 'Connection', - 'close' + 'Sun, 14 Jun 2020 04:17:53 GMT' ]); - nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container157169617848406103/copiedblobrehydrate157169617860605526') + .put('/container159210827417807072/copiedblobrehydrate159210827420909670') .reply(202, "", [ 'Content-Length', '0', 'Last-Modified', - 'Mon, 21 Oct 2019 22:16:18 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'ETag', - '"0x8D756744BEB5DB4"', + '"0x8D81019E901E730"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'd8089df3-701e-00bb-115d-88e956000000', + 'c130912f-201e-003e-4d02-42dadf000000', 'x-ms-client-request-id', - 'e632b839-a86a-4abf-a160-334429e6b89a', + 'e9868276-67fa-439e-b528-5eeec2a11d64', 'x-ms-version', - '2019-02-02', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:54.2368048Z', 'x-ms-copy-id', - '0e9c54d9-e953-4393-a149-80a623a1a290', + '5820e9c2-8a3a-470a-971a-b7ee45b1775f', 'x-ms-copy-status', 'success', 'Date', - 'Mon, 21 Oct 2019 22:16:17 GMT', - 'Connection', - 'close' + 'Sun, 14 Jun 2020 04:17:53 GMT' ]); - nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container157169617848406103/blob157169617853507178') + .head('/container159210827417807072/blob159210827419405420') .reply(200, "", [ 'Content-Length', '11', @@ -95,21 +92,25 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Mon, 21 Oct 2019 22:16:18 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D756744BE0FB8A"', + '"0x8D81019E8FE8B35"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'e96d7c63-501e-0005-095d-88812f000000', + 'c130913b-201e-003e-5802-42dadf000000', 'x-ms-client-request-id', - '307a43f4-d012-42e2-a096-b6d1405c8ced', + '9b4835ef-97c8-4104-b0bd-c2d793320d5d', 'x-ms-version', - '2019-02-02', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:54.2147893Z', + 'x-ms-is-current-version', + 'true', 'x-ms-creation-time', - 'Mon, 21 Oct 2019 22:16:18 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -122,19 +123,12 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Hot', 'x-ms-access-tier-inferred', 'true', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,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', - 'Mon, 21 Oct 2019 22:16:18 GMT', - 'Connection', - 'close' + 'Sun, 14 Jun 2020 04:17:53 GMT' ]); - nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container157169617848406103/copiedblobrehydrate157169617860605526') + .head('/container159210827417807072/copiedblobrehydrate159210827420909670') .reply(200, "", [ 'Content-Length', '11', @@ -143,21 +137,25 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Mon, 21 Oct 2019 22:16:18 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D756744BEB5DB4"', + '"0x8D81019E901E730"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '49e679b4-101e-0014-1c5d-881b9b000000', + 'c130913f-201e-003e-5c02-42dadf000000', 'x-ms-client-request-id', - '381c1da3-0986-48f9-8182-ac289f464851', + 'd21a881e-42e0-4615-b4b2-6394c93cce81', 'x-ms-version', - '2019-02-02', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:54.2368048Z', + 'x-ms-is-current-version', + 'true', 'x-ms-creation-time', - 'Mon, 21 Oct 2019 22:16:18 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -165,34 +163,27 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-blob-type', 'BlockBlob', 'x-ms-copy-id', - '0e9c54d9-e953-4393-a149-80a623a1a290', + '5820e9c2-8a3a-470a-971a-b7ee45b1775f', 'x-ms-copy-source', - 'https://fakestorageaccount.blob.core.windows.net/container157169617848406103/blob157169617853507178', + 'https://fakestorageaccount.blob.core.windows.net/container159210827417807072/blob159210827419405420', 'x-ms-copy-status', 'success', 'x-ms-copy-progress', '11/11', 'x-ms-copy-completion-time', - 'Mon, 21 Oct 2019 22:16:18 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'x-ms-server-encrypted', 'true', 'x-ms-access-tier', 'Archive', 'x-ms-access-tier-change-time', - 'Mon, 21 Oct 2019 22:16:18 GMT', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,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-copy-id,x-ms-copy-source,x-ms-copy-status,x-ms-copy-progress,x-ms-copy-completion-time,x-ms-server-encrypted,x-ms-access-tier,x-ms-access-tier-change-time,Accept-Ranges,Content-Length,Date,Transfer-Encoding', - 'Access-Control-Allow-Origin', - '*', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'Date', - 'Mon, 21 Oct 2019 22:16:18 GMT', - 'Connection', - 'close' + 'Sun, 14 Jun 2020 04:17:53 GMT' ]); - nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container157169617848406103/copiedblobrehydrate157169617860605526') + .put('/container159210827417807072/copiedblobrehydrate159210827420909670') .query(true) .reply(202, "", [ 'Content-Length', @@ -200,20 +191,17 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1d09da17-b01e-00d6-585d-885d1d000000', + 'c1309141-201e-003e-5e02-42dadf000000', 'x-ms-client-request-id', - '80f9f38a-2c10-4f1c-972f-a6168327d714', + '59fb1e9a-63a1-498e-8bdf-f2ae3502e69b', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Mon, 21 Oct 2019 22:16:17 GMT', - 'Connection', - 'close' + 'Sun, 14 Jun 2020 04:17:53 GMT' ]); - nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container157169617848406103/copiedblobrehydrate157169617860605526') + .head('/container159210827417807072/copiedblobrehydrate159210827420909670') .reply(200, "", [ 'Content-Length', '11', @@ -222,21 +210,25 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Mon, 21 Oct 2019 22:16:18 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D756744BEB5DB4"', + '"0x8D81019E901E730"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'ccdc561f-401e-007b-045d-881168000000', + 'c1309144-201e-003e-6102-42dadf000000', 'x-ms-client-request-id', - '7cb5b517-d65e-4d31-8c11-badd038637e6', + '6f79ed1f-6867-4ca4-acea-e2d40d63473e', 'x-ms-version', - '2019-02-02', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:54.2368048Z', + 'x-ms-is-current-version', + 'true', 'x-ms-creation-time', - 'Mon, 21 Oct 2019 22:16:18 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -244,36 +236,31 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-blob-type', 'BlockBlob', 'x-ms-copy-id', - '0e9c54d9-e953-4393-a149-80a623a1a290', + '5820e9c2-8a3a-470a-971a-b7ee45b1775f', 'x-ms-copy-source', - 'https://fakestorageaccount.blob.core.windows.net/container157169617848406103/blob157169617853507178', + 'https://fakestorageaccount.blob.core.windows.net/container159210827417807072/blob159210827419405420', 'x-ms-copy-status', 'success', 'x-ms-copy-progress', '11/11', 'x-ms-copy-completion-time', - 'Mon, 21 Oct 2019 22:16:18 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'x-ms-server-encrypted', 'true', 'x-ms-access-tier', 'Archive', 'x-ms-access-tier-change-time', - 'Mon, 21 Oct 2019 22:16:18 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'x-ms-archive-status', 'rehydrate-pending-to-hot', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,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-copy-id,x-ms-copy-source,x-ms-copy-status,x-ms-copy-progress,x-ms-copy-completion-time,x-ms-server-encrypted,x-ms-access-tier,x-ms-access-tier-change-time,x-ms-archive-status,Accept-Ranges,Content-Length,Date,Transfer-Encoding', - 'Access-Control-Allow-Origin', - '*', + 'x-ms-rehydrate-priority', + 'Standard', 'Date', - 'Mon, 21 Oct 2019 22:16:18 GMT', - 'Connection', - 'close' + 'Sun, 14 Jun 2020 04:17:53 GMT' ]); - nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container157169617848406103') + .delete('/container159210827417807072') .query(true) .reply(202, "", [ 'Content-Length', @@ -281,14 +268,11 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'eddcd12a-101e-0004-805d-88def3000000', + 'c130914a-201e-003e-6702-42dadf000000', 'x-ms-client-request-id', - '606f9cee-d0d5-456c-9a18-19634e841916', + '516d8e62-0864-4693-bf20-00299e4ba6af', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Mon, 21 Oct 2019 22:16:18 GMT', - 'Connection', - 'close' + 'Sun, 14 Jun 2020 04:17:53 GMT' ]); - 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 index fc1f499ef98f..8d05accd1c76 100644 --- 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 @@ -1,108 +1,120 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container156816832592608783","blob":"blob156816832634705977"} +module.exports.hash = "4443cc2766c15a99c076e39eb8bcf64a"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827379107805","blob":"blob159210827380705726"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816832592608783') + .put('/container159210827379107805') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:46 GMT', + 'Sun, 14 Jun 2020 04:17:53 GMT', 'ETag', - '"0x8D7365E601103D0"', + '"0x8D81019E8BF36E2"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '741549e2-001e-0054-5147-688c76000000', + 'c130906a-201e-003e-1902-42dadf000000', 'x-ms-client-request-id', - '162b76b6-d381-41e3-9aaf-4d649ad54310', + '8e330ca1-bdd8-434c-bb59-da23c960edc5', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:18:45 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:52 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816832592608783/blob156816832634705977', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827379107805/blob159210827380705726', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:46 GMT', + 'Sun, 14 Jun 2020 04:17:53 GMT', 'ETag', - '"0x8D7365E60505825"', + '"0x8D81019E8C1EC6F"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '52e79a91-801e-0028-4247-681143000000', + 'c1309072-201e-003e-1f02-42dadf000000', 'x-ms-client-request-id', - '4c1e124c-ece3-40d7-a36f-51222a462287', + 'd491b0c1-e546-4967-bd72-2d534355db5f', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:53.8175087Z', 'Date', - 'Wed, 11 Sep 2019 02:18:46 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:52 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816832592608783/blob156816832634705977') + .put('/container159210827379107805/blob159210827380705726') .query(true) - .reply(200, "", [ 'Content-Length', + .reply(200, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:47 GMT', + 'Sun, 14 Jun 2020 04:17:53 GMT', 'ETag', - '"0x8D7365E609052DF"', + '"0x8D81019E8C4D325"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'a04381e3-701e-0050-6f47-6879f4000000', + 'c130907a-201e-003e-2702-42dadf000000', 'x-ms-client-request-id', - '1fdc8e3c-b2f9-46d2-aa0a-73f2fe035a8d', + '1787fef7-dae2-4f46-ba27-20cd426b6dfb', 'x-ms-version', - '2019-02-02', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:53.8385233Z', 'x-ms-request-server-encrypted', 'true', 'Date', - 'Wed, 11 Sep 2019 02:18:46 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:52 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container156816832592608783/blob156816832634705977') + .head('/container159210827379107805/blob159210827380705726') .query(true) - .reply(200, "", [ 'Content-Length', + .reply(200, "", [ + 'Content-Length', '11', 'Content-Type', 'application/octet-stream', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:47 GMT', + 'Sun, 14 Jun 2020 04:17:53 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7365E609052DF"', + '"0x8D81019E8C4D325"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'eb9ff1b3-d01e-003b-7c47-6824a2000000', + 'c1309083-201e-003e-3002-42dadf000000', 'x-ms-client-request-id', - 'ad796ba3-843b-4f4a-b2eb-89aa4175e32e', + '46f29682-8ae8-4448-b3e2-5dd703af8f6b', 'x-ms-version', - '2019-02-02', - 'x-ms-tag-count', - '0', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:53.8385233Z', + 'x-ms-is-current-version', + 'true', 'x-ms-meta-a', 'a', 'x-ms-meta-b', 'b', 'x-ms-creation-time', - 'Wed, 11 Sep 2019 02:18:46 GMT', + 'Sun, 14 Jun 2020 04:17:53 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -112,30 +124,27 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-server-encrypted', 'true', 'x-ms-access-tier', - 'Cool', + 'Hot', 'x-ms-access-tier-inferred', 'true', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-tag-count,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', - 'Wed, 11 Sep 2019 02:18:47 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:52 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156816832592608783') + .delete('/container159210827379107805') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '20524009-901e-001e-6247-68bc11000000', + 'c1309085-201e-003e-3202-42dadf000000', 'x-ms-client-request-id', - '4ac89173-50c7-42f0-8d41-f1dfb26dde91', + 'ff70c094-0e61-4ccb-8492-f5956a74ad61', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:18:47 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:52 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/recording_create_append_blob_should_work_with_tags.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_create_append_blob_should_work_with_tags.js new file mode 100644 index 000000000000..e1e54fb32849 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_create_append_blob_should_work_with_tags.js @@ -0,0 +1,138 @@ +let nock = require('nock'); + +module.exports.hash = "7bd40161eaf58188daf1c9e43aa2cdb2"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827134700180","blob":"blob159210827158107503"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210827134700180') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:17:51 GMT', + 'ETag', + '"0x8D81019E74B8D23"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308d3c-201e-003e-3702-42dadf000000', + 'x-ms-client-request-id', + '5134a815-6186-4e17-864b-e1b8f234856f', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 04:17:50 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210827134700180/blob159210827158107503', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:17:51 GMT', + 'ETag', + '"0x8D81019E7707765"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308d99-201e-003e-0a02-42dadf000000', + 'x-ms-client-request-id', + '1e7fc791-7952-4e5e-a9aa-2dc56f1f4bda', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-14T04:17:51.6059493Z', + 'Date', + 'Sun, 14 Jun 2020 04:17:50 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159210827134700180/blob159210827158107503') + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308d9c-201e-003e-0d02-42dadf000000', + 'x-ms-client-request-id', + 'a39cc029-cafb-4f75-95e5-86343e5058f0', + 'x-ms-version', + '2019-12-12', + 'x-ms-delete-type-permanent', + 'false', + 'Date', + 'Sun, 14 Jun 2020 04:17:50 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210827134700180/blob159210827158107503') + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:17:51 GMT', + 'ETag', + '"0x8D81019E775815E"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308d9f-201e-003e-1002-42dadf000000', + 'x-ms-client-request-id', + 'ef63489c-b1a8-448a-9c03-9b7d673c4629', + 'x-ms-version', + '2019-12-12', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-14T04:17:51.6389726Z', + 'Date', + 'Sun, 14 Jun 2020 04:17:50 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/container159210827134700180/blob159210827158107503') + .query(true) + .reply(200, "\ntag1val1tag2val2", [ + 'Content-Length', + '162', + 'Content-Type', + 'application/xml', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308da1-201e-003e-1202-42dadf000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + '95b9e2b6-1904-46b9-a05c-4fcf0ffe3846', + 'Date', + 'Sun, 14 Jun 2020 04:17:50 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159210827134700180') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308da4-201e-003e-1502-42dadf000000', + 'x-ms-client-request-id', + '33496ffa-236b-47fb-82c0-0c70456abac2', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 04:17:50 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/recording_create_block_blob_blob_should_work_with_tags.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_create_block_blob_blob_should_work_with_tags.js new file mode 100644 index 000000000000..961734e5d63a --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_create_block_blob_blob_should_work_with_tags.js @@ -0,0 +1,142 @@ +let nock = require('nock'); + +module.exports.hash = "825f08fa77af8909631a204a03afccab"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827100608603","blob":"blob159210827103103981"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210827100608603') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:17:51 GMT', + 'ETag', + '"0x8D81019E7177B5A"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308cd0-201e-003e-5502-42dadf000000', + 'x-ms-client-request-id', + 'c093c743-0cc4-407d-aa1d-03a1b321f38d', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 04:17:50 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210827100608603/blob159210827103103981', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:17:51 GMT', + 'ETag', + '"0x8D81019E71A3186"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308cd8-201e-003e-5c02-42dadf000000', + 'x-ms-client-request-id', + '4f0c0647-76d8-4f64-ad03-089461427fa7', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-14T04:17:51.0405510Z', + 'Date', + 'Sun, 14 Jun 2020 04:17:50 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159210827100608603/blob159210827103103981') + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308cdf-201e-003e-6302-42dadf000000', + 'x-ms-client-request-id', + 'b7399fb1-0adb-454f-bdb0-78c1a8594db0', + 'x-ms-version', + '2019-12-12', + 'x-ms-delete-type-permanent', + 'false', + 'Date', + 'Sun, 14 Jun 2020 04:17:50 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210827100608603/blob159210827103103981', "hello") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'XUFAKrxLKna5cZ2REBfFkg==', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:17:51 GMT', + 'ETag', + '"0x8D81019E7420C04"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308d29-201e-003e-2702-42dadf000000', + 'x-ms-client-request-id', + 'f3eb1c51-cc37-443f-9f89-8689f0363c76', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'V0JSBnCFdzM=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-14T04:17:51.3027355Z', + 'Date', + 'Sun, 14 Jun 2020 04:17:50 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/container159210827100608603/blob159210827103103981') + .query(true) + .reply(200, "\ntag1val1tag2val2", [ + 'Content-Length', + '162', + 'Content-Type', + 'application/xml', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308d30-201e-003e-2c02-42dadf000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + '7cf11f6c-f39b-4efc-b6df-00a927002565', + 'Date', + 'Sun, 14 Jun 2020 04:17:50 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159210827100608603') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308d36-201e-003e-3102-42dadf000000', + 'x-ms-client-request-id', + '3e02b1cf-907c-41cd-936b-f6e659830a78', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 04:17:50 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/recording_create_page_blob_should_work_with_tags.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_create_page_blob_should_work_with_tags.js new file mode 100644 index 000000000000..5c203d977c2b --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_create_page_blob_should_work_with_tags.js @@ -0,0 +1,138 @@ +let nock = require('nock'); + +module.exports.hash = "184b097fcb4977a8460852c49c3f8c09"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827181806334","blob":"blob159210827183307824"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210827181806334') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:17:51 GMT', + 'ETag', + '"0x8D81019E791CAA6"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308dcc-201e-003e-3a02-42dadf000000', + 'x-ms-client-request-id', + '614f5d0b-017e-40db-8de4-a80c9cbdbf41', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 04:17:50 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210827181806334/blob159210827183307824', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:17:51 GMT', + 'ETag', + '"0x8D81019E794A7BD"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308dd1-201e-003e-3e02-42dadf000000', + 'x-ms-client-request-id', + 'd6a90b3c-c7a1-4a9a-9432-dfb3f05b35e1', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-14T04:17:51.8431165Z', + 'Date', + 'Sun, 14 Jun 2020 04:17:50 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159210827181806334/blob159210827183307824') + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308dd9-201e-003e-4502-42dadf000000', + 'x-ms-client-request-id', + '9e9341b1-24c2-425f-8bda-c179db620409', + 'x-ms-version', + '2019-12-12', + 'x-ms-delete-type-permanent', + 'false', + 'Date', + 'Sun, 14 Jun 2020 04:17:50 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210827181806334/blob159210827183307824') + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:17:51 GMT', + 'ETag', + '"0x8D81019E7993C75"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308de0-201e-003e-4c02-42dadf000000', + 'x-ms-client-request-id', + '129379be-57e4-472e-be4b-afc5e9aa5db3', + 'x-ms-version', + '2019-12-12', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-14T04:17:51.8731381Z', + 'Date', + 'Sun, 14 Jun 2020 04:17:50 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/container159210827181806334/blob159210827183307824') + .query(true) + .reply(200, "\ntag1val1tag2val2", [ + 'Content-Length', + '162', + 'Content-Type', + 'application/xml', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308de8-201e-003e-5202-42dadf000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + 'ad802a37-d03d-44a0-a30b-2d6308ffa149', + 'Date', + 'Sun, 14 Jun 2020 04:17:50 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159210827181806334') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308def-201e-003e-5802-42dadf000000', + 'x-ms-client-request-id', + '7d650c87-5a08-41d3-bbe1-c935a405c1b7', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 04:17:50 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/recording_createsnapshot.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_createsnapshot.js index 97a1c9870c7c..79efea5b7eee 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient/recording_createsnapshot.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_createsnapshot.js @@ -1,160 +1,160 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container156816831034005941","blob":"blob156816831076402702"} +module.exports.hash = "b0abf68009e71f2b39e8e49256067f0f"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827272505240","blob":"blob159210827274103375"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816831034005941') + .put('/container159210827272505240') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:30 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'ETag', - '"0x8D7365E56C72903"', + '"0x8D81019E81E6CCC"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1835edaf-b01e-004d-3047-68a01e000000', + 'c1308f2a-201e-003e-7802-42dadf000000', 'x-ms-client-request-id', - '793c4302-d2f3-4210-a5c8-4463dddd5501', + '04a98e4b-2477-414f-9440-0fdc2c290fa4', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:18:29 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816831034005941/blob156816831076402702', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827272505240/blob159210827274103375', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:31 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'ETag', - '"0x8D7365E5706DFE3"', + '"0x8D81019E820FB82"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'ab889c69-c01e-0060-0747-6823de000000', + 'c1308f30-201e-003e-7d02-42dadf000000', 'x-ms-client-request-id', - '3294543a-38bb-495e-b650-848061f442ff', + '3ba301cc-6cc4-4d27-8c22-ff11e4d92e31', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:52.7627650Z', 'Date', - 'Wed, 11 Sep 2019 02:18:30 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816831034005941/blob156816831076402702') + .put('/container159210827272505240/blob159210827274103375') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:31 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'ETag', - '"0x8D7365E5706DFE3"', + '"0x8D81019E820FB82"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'b36baa95-801e-0023-6147-680937000000', + 'c1308f33-201e-003e-8002-42dadf000000', 'x-ms-client-request-id', - 'f23c7523-5bcb-4974-aa45-3e443f244510', + 'eeffe6cb-c710-4f2e-a708-4bab7b5feaec', 'x-ms-version', - '2019-02-02', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:52.7827774Z', 'x-ms-snapshot', - '2019-09-11T02:18:31.5341566Z', + '2020-06-14T04:17:52.7817774Z', 'x-ms-request-server-encrypted', 'false', 'Date', - 'Wed, 11 Sep 2019 02:18:30 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container156816831034005941/blob156816831076402702') + .head('/container159210827272505240/blob159210827274103375') .query(true) - .reply(200, "", [ 'Content-Length', + .reply(200, "", [ + 'Content-Length', '11', 'Content-Type', 'application/octet-stream', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:31 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7365E5706DFE3"', + '"0x8D81019E820FB82"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'b7b49b6b-901e-005a-1f47-68607d000000', + 'c1308f36-201e-003e-0302-42dadf000000', 'x-ms-client-request-id', - '094f6cb3-2ccd-45ca-ba4a-6b3a203f4d8b', + '2aeb2db1-6b6b-496d-bccd-25232c838d78', 'x-ms-version', - '2019-02-02', - 'x-ms-snapshot', - '2019-09-11T02:18:31.5341566Z', - 'x-ms-tag-count', - '0', + '2019-12-12', 'x-ms-creation-time', - 'Wed, 11 Sep 2019 02:18:31 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'x-ms-blob-type', 'BlockBlob', 'x-ms-server-encrypted', 'true', 'x-ms-access-tier', - 'Cool', + 'Hot', 'x-ms-access-tier-inferred', 'true', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-snapshot,x-ms-tag-count,Content-Type,Last-Modified,ETag,x-ms-creation-time,Content-MD5,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', - 'Wed, 11 Sep 2019 02:18:31 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .get('/container156816831034005941') + .get('/container159210827272505240') .query(true) - .reply(200, "blob1568168310764027022019-09-11T02:18:31.5341566ZWed, 11 Sep 2019 02:18:31 GMTWed, 11 Sep 2019 02:18:31 GMT0x8D7365E5706DFE311application/octet-streamYeJLfssylmU=sQqNsWTgdUEFt6mb5y4/5Q==BlockBlobCooltruetrue0blob156816831076402702Wed, 11 Sep 2019 02:18:31 GMTWed, 11 Sep 2019 02:18:31 GMT0x8D7365E5706DFE311application/octet-streamYeJLfssylmU=sQqNsWTgdUEFt6mb5y4/5Q==BlockBlobCooltrueunlockedavailabletrue0", [ 'Transfer-Encoding', + .reply(200, "blob1592108272741033752020-06-14T04:17:52.7817774ZSun, 14 Jun 2020 04:17:52 GMTSun, 14 Jun 2020 04:17:52 GMT0x8D81019E820FB8211application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottruetrueblob1592108272741033752020-06-14T04:17:52.7827774ZtrueSun, 14 Jun 2020 04:17:52 GMTSun, 14 Jun 2020 04:17:52 GMT0x8D81019E820FB8211application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottrueunlockedavailabletrue", [ + 'Transfer-Encoding', 'chunked', 'Content-Type', 'application/xml', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '816ccc8d-c01e-006b-5d47-683baa000000', + 'c1308f38-201e-003e-0502-42dadf000000', 'x-ms-client-request-id', - 'bebac739-b237-4395-aebf-2f87d1413cad', + 'ff5ecd01-844d-42b4-b802-9c7de4f2a71c', 'x-ms-version', - '2019-02-02', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,Content-Type,Content-Length,Date,Transfer-Encoding', - 'Access-Control-Allow-Origin', - '*', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:18:31 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156816831034005941') + .delete('/container159210827272505240') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'b7b49c8d-901e-005a-2147-68607d000000', + 'c1308f3d-201e-003e-0a02-42dadf000000', 'x-ms-client-request-id', - '8d474a03-3e88-4fda-92ac-12620bedb0f6', + 'f6b790c6-dd28-4d6f-bfc3-2d52e838a7c2', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:18:32 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/recording_delete.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_delete.js index e8cbcebd4f90..3e24f77d5419 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient/recording_delete.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_delete.js @@ -1,85 +1,93 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container156816830532709343","blob":"blob156816830574501528"} +module.exports.hash = "91f74a3e5a338297caa088642160fcd3"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827255302576","blob":"blob159210827256908057"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816830532709343') + .put('/container159210827255302576') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:25 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'ETag', - '"0x8D7365E53C94AAE"', + '"0x8D81019E802F091"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '9bf7f440-501e-0047-3e47-68b997000000', + 'c1308ef3-201e-003e-4602-42dadf000000', 'x-ms-client-request-id', - '7d8a8c97-f44a-4abc-97dc-c7f6b4ec1d7c', + 'edd742fc-c2fe-4b7c-9bd1-8feb0545704e', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:18:25 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816830532709343/blob156816830574501528', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827255302576/blob159210827256908057', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:26 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'ETag', - '"0x8D7365E5408F434"', + '"0x8D81019E805CD7A"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '331c7a8b-c01e-000d-1d47-6889f0000000', + 'c1308efc-201e-003e-4e02-42dadf000000', 'x-ms-client-request-id', - '6d8de235-f71c-4daa-a45b-6c0b140aa22b', + '11147d23-819e-474e-9d1c-8e1738743cde', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:52.5846394Z', 'Date', - 'Wed, 11 Sep 2019 02:18:25 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156816830532709343/blob156816830574501528') - .reply(202, "", [ 'Content-Length', + .delete('/container159210827255302576/blob159210827256908057') + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '7cc93f54-d01e-0012-3d47-6852e0000000', + 'c1308f00-201e-003e-5202-42dadf000000', 'x-ms-client-request-id', - '8f47a610-4409-4c99-84c0-6267a6931161', + '2a14d377-38d5-4761-85ce-9df2354d3112', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-delete-type-permanent', 'false', 'Date', - 'Wed, 11 Sep 2019 02:18:25 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156816830532709343') + .delete('/container159210827255302576') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '7415226d-001e-0054-7a47-688c76000000', + 'c1308f04-201e-003e-5602-42dadf000000', 'x-ms-client-request-id', - 'e1423636-d507-40dc-90bf-8fc546aea677', + 'eb1c480e-d9fb-4c56-848a-e339e86fed8b', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:18:26 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/recording_delete_snapshot.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_delete_snapshot.js index c0db836b9a53..0109c4d93f9f 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient/recording_delete_snapshot.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_delete_snapshot.js @@ -1,197 +1,199 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container156816830699007626","blob":"blob156816830740709825"} +module.exports.hash = "2b301541372f4fb5ca5e004a2f14a0d3"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827261600382","blob":"blob159210827263107667"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816830699007626') + .put('/container159210827261600382') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:27 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'ETag', - '"0x8D7365E54C73878"', + '"0x8D81019E80CB658"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1ab468b1-a01e-003f-7147-68d120000000', + 'c1308f08-201e-003e-5a02-42dadf000000', 'x-ms-client-request-id', - 'd37ce78a-f261-435a-8fc9-eacecd99eb19', + '8788f914-5e65-4185-98ff-b32eafb5320a', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:18:26 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816830699007626/blob156816830740709825', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827261600382/blob159210827263107667', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:27 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'ETag', - '"0x8D7365E550842C4"', + '"0x8D81019E80F6C26"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '5b62e85c-801e-0001-6747-686701000000', + 'c1308f10-201e-003e-5f02-42dadf000000', 'x-ms-client-request-id', - '3b57baa3-ac09-4781-a04b-2f7f04ae4fe4', + 'f09daa72-47ec-409b-afc9-c1427f5b51aa', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:52.6476838Z', 'Date', - 'Wed, 11 Sep 2019 02:18:26 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816830699007626/blob156816830740709825') + .put('/container159210827261600382/blob159210827263107667') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:27 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'ETag', - '"0x8D7365E550842C4"', + '"0x8D81019E80F6C26"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '49227429-901e-0015-7a47-68a465000000', + 'c1308f15-201e-003e-6402-42dadf000000', 'x-ms-client-request-id', - 'a158121c-1f31-4c3c-8419-a0ca4c3ab217', + '5e8e9658-b411-41d1-9eca-5fe0a42f1b8a', 'x-ms-version', - '2019-02-02', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:52.6676963Z', 'x-ms-snapshot', - '2019-09-11T02:18:28.1807935Z', + '2020-06-14T04:17:52.6666963Z', 'x-ms-request-server-encrypted', 'false', 'Date', - 'Wed, 11 Sep 2019 02:18:27 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container156816830699007626/blob156816830740709825') + .head('/container159210827261600382/blob159210827263107667') .query(true) - .reply(200, "", [ 'Content-Length', + .reply(200, "", [ + 'Content-Length', '11', 'Content-Type', 'application/octet-stream', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:27 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7365E550842C4"', + '"0x8D81019E80F6C26"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'f194ba7e-301e-0057-0847-688f71000000', + 'c1308f1c-201e-003e-6a02-42dadf000000', 'x-ms-client-request-id', - 'dc46702b-ea94-4517-b9a4-c2a02983fa74', + '675d86b6-45ee-4c7f-ae57-c97270513d70', 'x-ms-version', - '2019-02-02', - 'x-ms-snapshot', - '2019-09-11T02:18:28.1807935Z', - 'x-ms-tag-count', - '0', + '2019-12-12', 'x-ms-creation-time', - 'Wed, 11 Sep 2019 02:18:27 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'x-ms-blob-type', 'BlockBlob', 'x-ms-server-encrypted', 'true', 'x-ms-access-tier', - 'Cool', + 'Hot', 'x-ms-access-tier-inferred', 'true', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-snapshot,x-ms-tag-count,Content-Type,Last-Modified,ETag,x-ms-creation-time,Content-MD5,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', - 'Wed, 11 Sep 2019 02:18:27 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156816830699007626/blob156816830740709825') + .delete('/container159210827261600382/blob159210827263107667') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '0188a6d2-d01e-0019-6d47-684a94000000', + 'c1308f1d-201e-003e-6b02-42dadf000000', 'x-ms-client-request-id', - '52744197-7462-47bc-84d9-f2d1599c5545', + '5d5b115a-9a0e-4bc9-a9f9-5f009c2b76f4', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-delete-type-permanent', - 'false', + 'true', 'Date', - 'Wed, 11 Sep 2019 02:18:28 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156816830699007626/blob156816830740709825') - .reply(202, "", [ 'Content-Length', + .delete('/container159210827261600382/blob159210827263107667') + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '66b0912f-f01e-004a-7847-68569b000000', + 'c1308f21-201e-003e-6f02-42dadf000000', 'x-ms-client-request-id', - 'fd836213-9ac3-463b-9257-c0d0099ac627', + 'c9f86be3-0bdb-476a-9387-3598cf040aa1', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-delete-type-permanent', 'false', 'Date', - 'Wed, 11 Sep 2019 02:18:28 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .get('/container156816830699007626') + .get('/container159210827261600382') .query(true) - .reply(200, "", [ 'Transfer-Encoding', + .reply(200, "", [ + 'Transfer-Encoding', 'chunked', 'Content-Type', 'application/xml', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'be43ac1d-201e-0007-3c47-689079000000', + 'c1308f23-201e-003e-7102-42dadf000000', 'x-ms-client-request-id', - '9da5858c-1cf8-4898-8310-622d0eef5358', + 'c392433c-1185-4711-b7ef-e6c307bb2002', 'x-ms-version', - '2019-02-02', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,Content-Type,Content-Length,Date,Transfer-Encoding', - 'Access-Control-Allow-Origin', - '*', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:18:29 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156816830699007626') + .delete('/container159210827261600382') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '9bf7f967-501e-0047-0847-68b997000000', + 'c1308f28-201e-003e-7602-42dadf000000', 'x-ms-client-request-id', - '06627d00-2545-4771-bb56-55500fea4663', + '4ebfd373-142f-4d56-8485-49ce3614d534', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:18:30 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/recording_download_all_parameters_set.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_download_all_parameters_set.js index 66915651b83b..ecfd4bdf2039 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient/recording_download_all_parameters_set.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_download_all_parameters_set.js @@ -1,80 +1,89 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container156816829358500106","blob":"blob156816829401605267"} +module.exports.hash = "87820c4f8c0becd0eb20a5c62a64900f"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827211503712","blob":"blob159210827213109079"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816829358500106') + .put('/container159210827211503712') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:13 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'ETag', - '"0x8D7365E4CCB989A"', + '"0x8D81019E7BF99C0"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1071b366-c01e-0024-0c47-68ffb2000000', + 'c1308e48-201e-003e-2502-42dadf000000', 'x-ms-client-request-id', - '37fcd7c7-be56-45df-993c-4b298c3a5bc5', + 'fbb06cca-0be0-4eea-9d36-ce396f6d57a7', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:18:13 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816829358500106/blob156816829401605267', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827211503712/blob159210827213109079', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:14 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'ETag', - '"0x8D7365E4D0BF948"', + '"0x8D81019E7C29DDD"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'fbebed5c-701e-001f-0f47-68bdec000000', + 'c1308e50-201e-003e-2c02-42dadf000000', 'x-ms-client-request-id', - '9671b46b-82ac-4fc1-803e-3929c50e60f2', + '6d661c92-f0d5-40ab-bebf-c873a9bf5431', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:52.1453296Z', 'Date', - 'Wed, 11 Sep 2019 02:18:13 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .get('/container156816829358500106/blob156816829401605267') - .reply(206, "H", [ 'Content-Length', + .get('/container159210827211503712/blob159210827213109079') + .reply(206, "H", [ + 'Content-Length', '1', 'Content-Type', 'application/octet-stream', 'Content-Range', 'bytes 0-0/11', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:14 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7365E4D0BF948"', + '"0x8D81019E7C29DDD"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '4090de90-f01e-0027-2a47-68fcb5000000', + 'c1308e54-201e-003e-3002-42dadf000000', 'x-ms-client-request-id', - '7abee656-faa8-4d06-9bb4-1518818ca8c6', + '55ee662c-e32d-46bf-9a6d-78ca9612c1d9', 'x-ms-version', - '2019-02-02', - 'x-ms-tag-count', - '0', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:52.1453296Z', + 'x-ms-is-current-version', + 'true', 'x-ms-creation-time', - 'Wed, 11 Sep 2019 02:18:14 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'x-ms-blob-content-md5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'x-ms-lease-status', @@ -85,19 +94,16 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'BlockBlob', 'x-ms-server-encrypted', 'true', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-tag-count,Content-Type,Last-Modified,ETag,x-ms-creation-time,x-ms-blob-content-md5,x-ms-lease-status,x-ms-lease-state,x-ms-blob-type,x-ms-server-encrypted,Accept-Ranges,Content-Length,Date,Transfer-Encoding', - 'Access-Control-Allow-Origin', - '*', 'x-ms-content-crc64', 'MlSW/U5mnKQ=', 'Date', - 'Wed, 11 Sep 2019 02:18:14 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .get('/container156816829358500106/blob156816829401605267') - .reply(206, "e", [ 'Content-Length', + .get('/container159210827211503712/blob159210827213109079') + .reply(206, "e", [ + 'Content-Length', '1', 'Content-Type', 'application/octet-stream', @@ -106,23 +112,25 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Content-Range', 'bytes 1-1/11', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:14 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7365E4D0BF948"', + '"0x8D81019E7C29DDD"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'b7b4885d-901e-005a-2e47-68607d000000', + 'c1308e5f-201e-003e-3902-42dadf000000', 'x-ms-client-request-id', - '2d930231-24a1-4615-ba54-c70132e4ce51', + '0870a220-b737-4830-9a8b-8a6e1634e419', 'x-ms-version', - '2019-02-02', - 'x-ms-tag-count', - '0', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:52.1453296Z', + 'x-ms-is-current-version', + 'true', 'x-ms-creation-time', - 'Wed, 11 Sep 2019 02:18:14 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'x-ms-blob-content-md5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'x-ms-lease-status', @@ -133,51 +141,45 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'BlockBlob', 'x-ms-server-encrypted', 'true', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-tag-count,Content-Type,Last-Modified,ETag,x-ms-creation-time,x-ms-blob-content-md5,x-ms-lease-status,x-ms-lease-state,x-ms-blob-type,x-ms-server-encrypted,Accept-Ranges,Content-Length,Date,Transfer-Encoding', - 'Access-Control-Allow-Origin', - '*', 'Date', - 'Wed, 11 Sep 2019 02:18:14 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .get('/container156816829358500106/blob156816829401605267') - .reply(400, "BothCrc64AndMd5RangeHeaderPresentBoth x-ms-range-get-content-crc64 header and x-ms-range-get-content-md5 header are present.\nRequestId:8a959415-f01e-0068-3647-6838ad000000\nTime:2019-09-11T02:18:15.6154811Z", [ 'Content-Length', + .get('/container159210827211503712/blob159210827213109079') + .reply(400, "BothCrc64AndMd5RangeHeaderPresentBoth x-ms-range-get-content-crc64 header and x-ms-range-get-content-md5 header are present.\nRequestId:c1308e65-201e-003e-3f02-42dadf000000\nTime:2020-06-14T04:17:52.1806035Z", [ + 'Content-Length', '293', 'Content-Type', 'application/xml', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '8a959415-f01e-0068-3647-6838ad000000', + 'c1308e65-201e-003e-3f02-42dadf000000', 'x-ms-client-request-id', - '7560b1fc-98c4-4f52-93d7-0465458dfa7c', + 'dc51d8d5-b203-4ffd-8a76-51022caa2805', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-error-code', 'BothCrc64AndMd5RangeHeaderPresent', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-error-code,Content-Length,Date,Transfer-Encoding', - 'Access-Control-Allow-Origin', - '*', 'Date', - 'Wed, 11 Sep 2019 02:18:15 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156816829358500106') + .delete('/container159210827211503712') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '2b542b1b-b01e-002b-2d47-681244000000', + 'c1308e6a-201e-003e-4402-42dadf000000', 'x-ms-client-request-id', - 'ba157f5d-a30f-4ec3-8866-c80d688c6369', + '4f540f6d-c811-4731-80ab-d66c1a142949', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:18:15 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/recording_download_should_not_have_aborted_error_after_download_finishes.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_download_should_not_have_aborted_error_after_download_finishes.js index e9d7dcf77361..2e52cffcad77 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient/recording_download_should_not_have_aborted_error_after_download_finishes.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_download_should_not_have_aborted_error_after_download_finishes.js @@ -1,80 +1,89 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container156816829188700052","blob":"blob156816829230702057"} +module.exports.hash = "2509bb39d84a16e3dd2e6d6fea15c3d0"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827205505642","blob":"blob159210827207108865"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816829188700052') + .put('/container159210827205505642') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:12 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'ETag', - '"0x8D7365E4BC6D415"', + '"0x8D81019E7B5FB0C"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '67280e7c-101e-0040-0647-684f12000000', + 'c1308e25-201e-003e-0a02-42dadf000000', 'x-ms-client-request-id', - 'cd1937cc-be80-4649-84e7-7b78ee7bed10', + 'ddeeab90-c194-4faa-a189-0e853f10ebf5', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:18:11 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816829188700052/blob156816829230702057', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827205505642/blob159210827207108865', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:12 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'ETag', - '"0x8D7365E4C070461"', + '"0x8D81019E7B8B103"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '8a9591ee-f01e-0068-3947-6838ad000000', + 'c1308e2d-201e-003e-1002-42dadf000000', 'x-ms-client-request-id', - 'cda590a8-1969-4787-97d7-aaa6939179d9', + '033a1250-6608-48af-8f94-b39f366452ea', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:52.0792835Z', 'Date', - 'Wed, 11 Sep 2019 02:18:12 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .get('/container156816829188700052/blob156816829230702057') - .reply(200, "Hello World", [ 'Content-Length', + .get('/container159210827205505642/blob159210827207108865') + .reply(200, "Hello World", [ + 'Content-Length', '11', 'Content-Type', 'application/octet-stream', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:12 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7365E4C070461"', + '"0x8D81019E7B8B103"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '86b60e15-c01e-0049-2b47-68559c000000', + 'c1308e3f-201e-003e-1c02-42dadf000000', 'x-ms-client-request-id', - '2d382654-ae2e-4172-ae48-8e44d29febde', + '070f325e-75d1-4177-9e65-61c1653362a5', 'x-ms-version', - '2019-02-02', - 'x-ms-tag-count', - '0', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:52.0792835Z', + 'x-ms-is-current-version', + 'true', 'x-ms-creation-time', - 'Wed, 11 Sep 2019 02:18:12 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -83,27 +92,24 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'BlockBlob', 'x-ms-server-encrypted', 'true', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-tag-count,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,Accept-Ranges,Content-Length,Date,Transfer-Encoding', - 'Access-Control-Allow-Origin', - '*', 'Date', - 'Wed, 11 Sep 2019 02:18:12 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156816829188700052') + .delete('/container159210827205505642') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'bc0a0d74-901e-003c-0c47-68d227000000', + 'c1308e42-201e-003e-1f02-42dadf000000', 'x-ms-client-request-id', - '79cf08d3-3224-4b4e-ab1e-b2d6ff0ad4dc', + 'c14a081e-07e7-419b-9674-e1c0c2a65cc9', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:18:12 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/recording_download_with_default_parameters_and_tracing.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_download_with_default_parameters_and_tracing.js index 78cddf78b4c6..45663029bee2 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient/recording_download_with_default_parameters_and_tracing.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_download_with_default_parameters_and_tracing.js @@ -1,80 +1,89 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container157005382619501684","blob":"blob157005382646700892"} +module.exports.hash = "446a528ba0c84ed2f09e3a33967575ae"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827442007648","blob":"blob159210827443609503"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container157005382619501684') + .put('/container159210827442007648') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 02 Oct 2019 22:03:46 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'ETag', - '"0x8D7478465BAEA1A"', + '"0x8D81019E91FB7F0"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '94a18aaa-901e-0066-686d-79b72d000000', + 'c1309171-201e-003e-0a02-42dadf000000', 'x-ms-client-request-id', - '38853bcf-628a-4af9-b67d-cc1514b7497c', + '27a3b94d-5c90-4858-b8b5-d6893a61243a', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 02 Oct 2019 22:03:46 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container157005382619501684/blob157005382646700892', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827442007648/blob159210827443609503', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 02 Oct 2019 22:03:46 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'ETag', - '"0x8D7478465CBCBD3"', + '"0x8D81019E9224644"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '9e141919-a01e-0030-526d-7946c2000000', + 'c1309176-201e-003e-0e02-42dadf000000', 'x-ms-client-request-id', - 'eca1b5df-7544-476f-9d6d-aeb5ef3fe886', + '539721a5-3351-4c09-b052-19336d8c2b57', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:54.4489540Z', 'Date', - 'Wed, 02 Oct 2019 22:03:46 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .get('/container157005382619501684/blob157005382646700892') - .reply(200, "Hello World", [ 'Content-Length', + .get('/container159210827442007648/blob159210827443609503') + .reply(200, "Hello World", [ + 'Content-Length', '11', 'Content-Type', 'application/octet-stream', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 02 Oct 2019 22:03:46 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7478465CBCBD3"', + '"0x8D81019E9224644"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '3dd87b03-701e-0041-486d-79a0e9000000', + 'c130917f-201e-003e-1702-42dadf000000', 'x-ms-client-request-id', - '926b30e3-1451-40aa-b7e5-7b88827b055f', + '560bc801-2494-4d27-b593-bbe81e99dfc4', 'x-ms-version', - '2019-02-02', - 'x-ms-tag-count', - '0', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:54.4489540Z', + 'x-ms-is-current-version', + 'true', 'x-ms-creation-time', - 'Wed, 02 Oct 2019 22:03:46 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -83,27 +92,24 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'BlockBlob', 'x-ms-server-encrypted', 'true', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-tag-count,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,Accept-Ranges,Content-Length,Date,Transfer-Encoding', - 'Access-Control-Allow-Origin', - '*', 'Date', - 'Wed, 02 Oct 2019 22:03:46 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container157005382619501684') + .delete('/container159210827442007648') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'dee0666e-101e-0047-1f6d-799356000000', + 'c1309186-201e-003e-1e02-42dadf000000', 'x-ms-client-request-id', - '64f15433-c53a-4741-bd02-3ac9e5d167e5', + 'bf66407d-5356-4cc3-9bcb-6ef3ab135e0b', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 02 Oct 2019 22:03:46 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/recording_download_with_progress_report.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_download_with_progress_report.js index fec7dd9e535d..2438dd1a9f7f 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient/recording_download_with_progress_report.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_download_with_progress_report.js @@ -1,76 +1,89 @@ let nock = require('nock'); -module.exports.testInfo = {"uniqueName":{"container":"container157592663733503219","blob":"blob157592663745900301"},"newDate":{}} +module.exports.hash = "6850f4debc7dfaa81f52847725caf6c1"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827195802422","blob":"blob159210827197406269"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container157592663733503219') + .put('/container159210827195802422') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Mon, 09 Dec 2019 21:23:57 GMT', + 'Sun, 14 Jun 2020 04:17:51 GMT', 'ETag', - '"0x8D77CEE19E0442E"', + '"0x8D81019E7A90064"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '222f574c-e01e-00d9-7fd6-ae965a000000', + 'c1308e0a-201e-003e-7002-42dadf000000', 'x-ms-client-request-id', - '872bfd6a-4408-4627-b34a-7320d10be145', + '417e7006-f52d-4c5f-b4bb-0dcbd8cea9d7', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Mon, 09 Dec 2019 21:23:57 GMT' ]); + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container157592663733503219/blob157592663745900301', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827195802422/blob159210827197406269', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Mon, 09 Dec 2019 21:23:57 GMT', + 'Sun, 14 Jun 2020 04:17:51 GMT', 'ETag', - '"0x8D77CEE19F13A63"', + '"0x8D81019E7ABDD6E"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'ae24f44a-501e-0121-5dd6-ae1b12000000', + 'c1308e0f-201e-003e-7402-42dadf000000', 'x-ms-client-request-id', - '79ecfc61-68e1-4ccd-ad84-beef1a9447dd', + '3b61b1a3-6d20-4a53-84c9-3e4c7f24ac7d', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:51.9952238Z', 'Date', - 'Mon, 09 Dec 2019 21:23:56 GMT' ]); + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .get('/container157592663733503219/blob157592663745900301') - .reply(200, "Hello World", [ 'Content-Length', + .get('/container159210827195802422/blob159210827197406269') + .reply(200, "Hello World", [ + 'Content-Length', '11', 'Content-Type', 'application/octet-stream', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Mon, 09 Dec 2019 21:23:57 GMT', + 'Sun, 14 Jun 2020 04:17:51 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D77CEE19F13A63"', + '"0x8D81019E7ABDD6E"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'c2a784d3-401e-00b9-10d6-aed378000000', + 'c1308e15-201e-003e-7a02-42dadf000000', 'x-ms-client-request-id', - 'ca418d5a-af53-4bf1-8d5d-579ce09008a5', + '8606edad-7c79-46e9-a151-c6e420f4ffd7', 'x-ms-version', - '2019-02-02', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:51.9952238Z', + 'x-ms-is-current-version', + 'true', 'x-ms-creation-time', - 'Mon, 09 Dec 2019 21:23:57 GMT', + 'Sun, 14 Jun 2020 04:17:51 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -79,25 +92,24 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'BlockBlob', 'x-ms-server-encrypted', 'true', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,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,Accept-Ranges,Content-Length,Date,Transfer-Encoding', - 'Access-Control-Allow-Origin', - '*', 'Date', - 'Mon, 09 Dec 2019 21:23:56 GMT' ]); + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container157592663733503219') + .delete('/container159210827195802422') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '222f578c-e01e-00d9-31d6-ae965a000000', + 'c1308e1f-201e-003e-0402-42dadf000000', 'x-ms-client-request-id', - '968abbf9-ef5a-45f0-9f0e-9e5f84fc23d0', + '87cff240-233f-4701-9349-7fdcf7ab840c', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Mon, 09 Dec 2019 21:23:57 GMT' ]); + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/recording_download_with_with_default_parameters.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_download_with_with_default_parameters.js index b9970bdb1067..aa5ff845973e 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient/recording_download_with_with_default_parameters.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_download_with_with_default_parameters.js @@ -1,80 +1,89 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container156816829020701968","blob":"blob156816829062303664"} +module.exports.hash = "11a3908521116429253a64da4d5e6b7d"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827189608180","blob":"blob159210827191104303"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816829020701968') + .put('/container159210827189608180') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:10 GMT', + 'Sun, 14 Jun 2020 04:17:51 GMT', 'ETag', - '"0x8D7365E4AC5D831"', + '"0x8D81019E79F88CB"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '74150473-001e-0054-4647-688c76000000', + 'c1308df2-201e-003e-5a02-42dadf000000', 'x-ms-client-request-id', - '258a2d71-1f30-474c-b7b1-bddfd84c0e96', + 'b6948e00-fb63-4efa-bd4e-243ca04fbd4e', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:18:10 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:50 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816829020701968/blob156816829062303664', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827189608180/blob159210827191104303', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:10 GMT', + 'Sun, 14 Jun 2020 04:17:51 GMT', 'ETag', - '"0x8D7365E4B056B75"', + '"0x8D81019E7A23EC5"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'f7bc825a-301e-005c-6647-689705000000', + 'c1308df9-201e-003e-6002-42dadf000000', 'x-ms-client-request-id', - 'aa7e0495-f8dd-4933-91a9-2d0d43d7f80e', + 'b3311138-9a93-4341-9c11-621c70d900d4', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:51.9321797Z', 'Date', - 'Wed, 11 Sep 2019 02:18:10 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:50 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .get('/container156816829020701968/blob156816829062303664') - .reply(200, "Hello World", [ 'Content-Length', + .get('/container159210827189608180/blob159210827191104303') + .reply(200, "Hello World", [ + 'Content-Length', '11', 'Content-Type', 'application/octet-stream', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:10 GMT', + 'Sun, 14 Jun 2020 04:17:51 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7365E4B056B75"', + '"0x8D81019E7A23EC5"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '82b649bc-d01e-005d-6d47-6896f8000000', + 'c1308dfc-201e-003e-6202-42dadf000000', 'x-ms-client-request-id', - 'c8f45702-6766-4920-b433-f2ab8ec26214', + 'c4fba889-aeec-46f6-994a-4934fdaeeaa2', 'x-ms-version', - '2019-02-02', - 'x-ms-tag-count', - '0', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:51.9321797Z', + 'x-ms-is-current-version', + 'true', 'x-ms-creation-time', - 'Wed, 11 Sep 2019 02:18:10 GMT', + 'Sun, 14 Jun 2020 04:17:51 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -83,27 +92,24 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'BlockBlob', 'x-ms-server-encrypted', 'true', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-tag-count,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,Accept-Ranges,Content-Length,Date,Transfer-Encoding', - 'Access-Control-Allow-Origin', - '*', 'Date', - 'Wed, 11 Sep 2019 02:18:10 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156816829020701968') + .delete('/container159210827189608180') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'd6ec4d43-601e-0029-7047-6810be000000', + 'c1308e03-201e-003e-6902-42dadf000000', 'x-ms-client-request-id', - 'caaff2c5-a9a9-4be9-9ed2-094b79a3a070', + 'e3e1d381-950f-4816-8766-8b76150d4433', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:18:11 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/recording_exists_rethrows_error_from_getproperties.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_exists_rethrows_error_from_getproperties.js index 806d74f61878..cf23f0424dac 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient/recording_exists_rethrows_error_from_getproperties.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_exists_rethrows_error_from_getproperties.js @@ -1,142 +1,152 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container156996518953608932","blob":"blob156996518964506118","blobCPK":"blobCPK156996518975103891"} +module.exports.hash = "835d31cda6bfe41de09ef1049424b6d4"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827468503310","blob":"blob159210827470105842","blobCPK":"blobCPK159210827471709619"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156996518953608932') + .put('/container159210827468503310') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Tue, 01 Oct 2019 21:26:29 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'ETag', - '"0x8D746B605E6D4DF"', + '"0x8D81019E949407F"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'b1efcaf6-601e-0087-3b9e-786559000000', + 'c1309217-201e-003e-2802-42dadf000000', 'x-ms-client-request-id', - 'f40765df-e146-4bf0-a012-9238ade8fe93', + '5c20b3a2-b483-407d-8df8-d1bb5955bf35', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Tue, 01 Oct 2019 21:26:29 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156996518953608932/blob156996518964506118', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827468503310/blob159210827470105842', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Tue, 01 Oct 2019 21:26:29 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'ETag', - '"0x8D746B605F76851"', + '"0x8D81019E94BCEC3"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '31e7ed49-701e-0114-559e-78b547000000', + 'c130921f-201e-003e-2f02-42dadf000000', 'x-ms-client-request-id', - 'bacf323b-25d6-4780-a93a-cc6cabb084e4', + '03357150-c3f5-4b1d-b685-460db07269f0', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:54.7211459Z', 'Date', - 'Tue, 01 Oct 2019 21:26:29 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156996518953608932/blobCPK156996518975103891', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827468503310/blobCPK159210827471709619', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Tue, 01 Oct 2019 21:26:29 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'ETag', - '"0x8D746B606088388"', + '"0x8D81019E94E191D"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'a1ba7fc9-b01e-00ca-039e-78a3bb000000', + 'c1309226-201e-003e-3602-42dadf000000', 'x-ms-client-request-id', - '993c1e20-8b90-4e3f-90c9-3442b2f891a3', + '2baaf38b-a972-44df-8873-9cb724754d14', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', 'x-ms-encryption-key-sha256', '3QFFFpRA5+XANHqwwbT4yXDmrT/2JaLt/FKHjzhOdoE=', + 'x-ms-version-id', + '2020-06-14T04:17:54.7361565Z', 'Date', - 'Tue, 01 Oct 2019 21:26:28 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156996518953608932/blobCPK156996518975103891') + .put('/container159210827468503310/blobCPK159210827471709619') .query(true) - .reply(200, "", [ 'Content-Length', + .reply(200, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Tue, 01 Oct 2019 21:26:29 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'ETag', - '"0x8D746B6061CACCD"', + '"0x8D81019E9506377"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '3af77dd7-f01e-00a0-769e-78ff10000000', + 'c130922c-201e-003e-3c02-42dadf000000', 'x-ms-client-request-id', - '5eb492dd-03e3-4d07-9344-bd5e89e399e3', + '4c8d8ae3-51eb-43a0-bc5e-d29aa9b2bec3', 'x-ms-version', - '2019-02-02', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:54.7521671Z', 'x-ms-request-server-encrypted', 'true', 'x-ms-encryption-key-sha256', '3QFFFpRA5+XANHqwwbT4yXDmrT/2JaLt/FKHjzhOdoE=', 'Date', - 'Tue, 01 Oct 2019 21:26:29 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container156996518953608932/blobCPK156996518975103891') - .reply(409, "", [ 'Transfer-Encoding', + .head('/container159210827468503310/blobCPK159210827471709619') + .reply(409, "", [ + 'Transfer-Encoding', 'chunked', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'f8b4e26c-f01e-0045-3c9e-78ede7000000', + 'c1309232-201e-003e-4202-42dadf000000', 'x-ms-client-request-id', - '38073b5a-b4d9-4ef8-b71f-e826abbcdc3b', + 'f47476cb-2a13-421c-a666-4730439e68e1', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-error-code', 'BlobUsesCustomerSpecifiedEncryption', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-error-code,Content-Length,Date,Transfer-Encoding', - 'Access-Control-Allow-Origin', - '*', 'Date', - 'Tue, 01 Oct 2019 21:26:29 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156996518953608932') + .delete('/container159210827468503310') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'b1efcc7f-601e-0087-089e-786559000000', + 'c1309236-201e-003e-4602-42dadf000000', 'x-ms-client-request-id', - 'f312732a-282c-4b0a-a580-81c836522994', + '455f9bb1-9866-406d-a54e-b2f8d56cc27a', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Tue, 01 Oct 2019 21:26:29 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/recording_exists_returns_false_on_nonexisting_blob.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_exists_returns_false_on_nonexisting_blob.js index 270bad778b0a..0bae31db0ade 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient/recording_exists_returns_false_on_nonexisting_blob.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_exists_returns_false_on_nonexisting_blob.js @@ -1,89 +1,93 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container156996518819302613","blob":"blob156996518831607346","newblob":"newblob156996518842704926"} +module.exports.hash = "b6ffef6fd36884a673d91d53eb793b98"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827452908738","blob":"blob159210827454504483","newblob":"newblob159210827456009618"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156996518819302613') + .put('/container159210827452908738') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Tue, 01 Oct 2019 21:26:27 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'ETag', - '"0x8D746B6051C39C3"', + '"0x8D81019E9316E65"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '6094db23-401e-007e-569e-78afb9000000', + 'c13091b8-201e-003e-4d02-42dadf000000', 'x-ms-client-request-id', - '811cb5a4-6d74-47ef-b531-7afa7da9ae43', + 'e5b7f512-964b-47ae-b9ac-343aa7ea02d1', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Tue, 01 Oct 2019 21:26:27 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156996518819302613/blob156996518831607346', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827452908738/blob159210827454504483', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Tue, 01 Oct 2019 21:26:28 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'ETag', - '"0x8D746B6052D2F48"', + '"0x8D81019E93423CD"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'd1fbeb88-501e-00c0-239e-78ba32000000', + 'c13091c3-201e-003e-5702-42dadf000000', 'x-ms-client-request-id', - '4734fd0b-7097-4b67-8b79-df291957afed', + '9b951d21-64dd-4a77-8971-14ba1f8ac6c1', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:54.5660365Z', 'Date', - 'Tue, 01 Oct 2019 21:26:27 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container156996518819302613/newblob156996518842704926') - .reply(404, "", [ 'Transfer-Encoding', + .head('/container159210827452908738/newblob159210827456009618') + .reply(404, "", [ + 'Transfer-Encoding', 'chunked', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'b5b8b31c-501e-0121-6f9e-781b12000000', + 'c13091cf-201e-003e-6302-42dadf000000', 'x-ms-client-request-id', - 'd7859f5c-2fee-422f-a0c9-f08ed0f0b325', + '287d79c3-182d-48fa-a20a-7c1c8a4b205e', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-error-code', 'BlobNotFound', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-error-code,Content-Length,Date,Transfer-Encoding', - 'Access-Control-Allow-Origin', - '*', 'Date', - 'Tue, 01 Oct 2019 21:26:27 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156996518819302613') + .delete('/container159210827452908738') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'b1efc903-601e-0087-1b9e-786559000000', + 'c13091d5-201e-003e-6902-42dadf000000', 'x-ms-client-request-id', - 'c5562c67-fa1b-4a03-9d01-692525828f37', + 'b65f946c-f9ba-4ba8-a854-be70044ff77f', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Tue, 01 Oct 2019 21:26:28 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/recording_exists_returns_true_on_an_existing_blob.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_exists_returns_true_on_an_existing_blob.js index 568985d1ce9c..ea1e8cb488cf 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient/recording_exists_returns_true_on_an_existing_blob.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_exists_returns_true_on_an_existing_blob.js @@ -1,80 +1,89 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container156996518724600077","blob":"blob156996518770804054"} +module.exports.hash = "7f6ff243a3e143fca06e0cdf9db9b0a9"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827448209021","blob":"blob159210827449806725"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156996518724600077') + .put('/container159210827448209021') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Tue, 01 Oct 2019 21:26:27 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'ETag', - '"0x8D746B604AE3CE9"', + '"0x8D81019E928BA44"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '773cb599-401e-00b2-779e-78cb0c000000', + 'c1309190-201e-003e-2702-42dadf000000', 'x-ms-client-request-id', - 'fe4c26d6-9a5c-4082-aec3-7642e1260387', + '098825af-e0d0-451a-b041-794b51d64e74', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Tue, 01 Oct 2019 21:26:26 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156996518724600077/blob156996518770804054', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827448209021/blob159210827449806725', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Tue, 01 Oct 2019 21:26:27 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'ETag', - '"0x8D746B604D66E48"', + '"0x8D81019E92B217D"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'cb77c743-101e-006d-5a9e-789a58000000', + 'c130919a-201e-003e-2f02-42dadf000000', 'x-ms-client-request-id', - '8e0c98b0-1832-4347-8f44-26310a4e4c4c', + '9af3a906-1829-4a66-a378-6a9937d31264', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:54.5069949Z', 'Date', - 'Tue, 01 Oct 2019 21:26:26 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container156996518724600077/blob156996518770804054') - .reply(200, "", [ 'Content-Length', + .head('/container159210827448209021/blob159210827449806725') + .reply(200, "", [ + 'Content-Length', '11', 'Content-Type', 'application/octet-stream', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Tue, 01 Oct 2019 21:26:27 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D746B604D66E48"', + '"0x8D81019E92B217D"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'e24046fe-b01e-012b-699e-78029b000000', + 'c13091a0-201e-003e-3502-42dadf000000', 'x-ms-client-request-id', - '24b4b664-ab2b-4485-bd11-220177e4bc10', + 'a46efdb5-e5f4-4c8d-9745-e2ef899a4ae5', 'x-ms-version', - '2019-02-02', - 'x-ms-tag-count', - '0', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:54.5069949Z', + 'x-ms-is-current-version', + 'true', 'x-ms-creation-time', - 'Tue, 01 Oct 2019 21:26:27 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -84,30 +93,27 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-server-encrypted', 'true', 'x-ms-access-tier', - 'Cool', + 'Hot', 'x-ms-access-tier-inferred', 'true', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-tag-count,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', - 'Tue, 01 Oct 2019 21:26:27 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156996518724600077') + .delete('/container159210827448209021') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'a03a6a97-c01e-00ec-6d9e-78380f000000', + 'c13091aa-201e-003e-3f02-42dadf000000', 'x-ms-client-request-id', - '530065c5-0984-452f-a4be-4461248a7ab1', + '2ad89b95-f99a-4f8d-9be4-9ebaf7e181d8', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Tue, 01 Oct 2019 21:26:27 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/recording_exists_works_with_customer_provided_key.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_exists_works_with_customer_provided_key.js index bc0f777214d2..ed9663fcd800 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient/recording_exists_works_with_customer_provided_key.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_exists_works_with_customer_provided_key.js @@ -1,135 +1,150 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container156996518874607869","blob":"blob156996518886404889","blobCPK":"blobCPK156996518899905906"} +module.exports.hash = "12ba9d231a681930786a8e3d766ecab3"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827460701346","blob":"blob159210827462306127","blobCPK":"blobCPK159210827463909829"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156996518874607869') + .put('/container159210827460701346') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Tue, 01 Oct 2019 21:26:28 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'ETag', - '"0x8D746B6056F2B8B"', + '"0x8D81019E93B825F"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1dce39c9-701e-00d7-489e-787a51000000', + 'c13091e3-201e-003e-7602-42dadf000000', 'x-ms-client-request-id', - '396b7cc4-265f-4eab-bd36-55c84e7c394f', + '1dac4dac-d4b0-453d-bd9e-cf635e6458de', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Tue, 01 Oct 2019 21:26:27 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156996518874607869/blob156996518886404889', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827460701346/blob159210827462306127', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Tue, 01 Oct 2019 21:26:28 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'ETag', - '"0x8D746B605843E8C"', + '"0x8D81019E93E5ED6"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '42c85ba1-f01e-00ef-469e-783b08000000', + 'c13091ed-201e-003e-7f02-42dadf000000', 'x-ms-client-request-id', - '5139d965-21ba-400a-8984-8a71c80362c7', + '384c18c6-f3e4-42fd-80ca-0a4055a81eb5', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:54.6340849Z', 'Date', - 'Tue, 01 Oct 2019 21:26:28 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156996518874607869/blobCPK156996518899905906', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827460701346/blobCPK159210827463909829', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Tue, 01 Oct 2019 21:26:28 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'ETag', - '"0x8D746B605977D30"', + '"0x8D81019E940D047"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '22e4cb65-a01e-0056-379e-78d806000000', + 'c13091f1-201e-003e-0302-42dadf000000', 'x-ms-client-request-id', - '0ffabc73-28a9-4e2c-a27c-f2e399e6ad7a', + '1b21b4cd-051e-406e-bc28-c5f8d1363360', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', 'x-ms-encryption-key-sha256', '3QFFFpRA5+XANHqwwbT4yXDmrT/2JaLt/FKHjzhOdoE=', + 'x-ms-version-id', + '2020-06-14T04:17:54.6490951Z', 'Date', - 'Tue, 01 Oct 2019 21:26:28 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156996518874607869/blobCPK156996518899905906') + .put('/container159210827460701346/blobCPK159210827463909829') .query(true) - .reply(200, "", [ 'Content-Length', + .reply(200, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Tue, 01 Oct 2019 21:26:28 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'ETag', - '"0x8D746B605ADF0F7"', + '"0x8D81019E9431AA1"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '62138eb6-e01e-0096-749e-785242000000', + 'c13091fc-201e-003e-0e02-42dadf000000', 'x-ms-client-request-id', - '37f4ea46-6374-4c61-b242-2bcefb65cc37', + '1a2a739b-e845-4421-8f5d-537f6e9fcecb', 'x-ms-version', - '2019-02-02', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:54.6661068Z', 'x-ms-request-server-encrypted', 'true', 'x-ms-encryption-key-sha256', '3QFFFpRA5+XANHqwwbT4yXDmrT/2JaLt/FKHjzhOdoE=', 'Date', - 'Tue, 01 Oct 2019 21:26:28 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container156996518874607869/blobCPK156996518899905906') - .reply(200, "", [ 'Content-Length', + .head('/container159210827460701346/blobCPK159210827463909829') + .reply(200, "", [ + 'Content-Length', '11', 'Content-Type', 'application/octet-stream', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Tue, 01 Oct 2019 21:26:28 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D746B605ADF0F7"', + '"0x8D81019E9431AA1"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'dcb4c6df-301e-009f-7c9e-7848cc000000', + 'c1309207-201e-003e-1802-42dadf000000', 'x-ms-client-request-id', - '0fbd097c-b52e-4bc9-bf83-03c7e0daae7e', + 'a2cbfaa9-956b-4a48-8c32-83af4ccca8f5', 'x-ms-version', - '2019-02-02', - 'x-ms-tag-count', - '0', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:54.6661068Z', + 'x-ms-is-current-version', + 'true', 'x-ms-meta-a', 'a', 'x-ms-creation-time', - 'Tue, 01 Oct 2019 21:26:28 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -141,30 +156,27 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-encryption-key-sha256', '3QFFFpRA5+XANHqwwbT4yXDmrT/2JaLt/FKHjzhOdoE=', 'x-ms-access-tier', - 'Cool', + 'Hot', 'x-ms-access-tier-inferred', 'true', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-tag-count,x-ms-meta-a,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-encryption-key-sha256,x-ms-access-tier,x-ms-access-tier-inferred,Accept-Ranges,Content-Length,Date,Transfer-Encoding', - 'Access-Control-Allow-Origin', - '*', 'Date', - 'Tue, 01 Oct 2019 21:26:28 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156996518874607869') + .delete('/container159210827460701346') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '0e450e3e-a01e-009a-549e-78bcb3000000', + 'c1309212-201e-003e-2302-42dadf000000', 'x-ms-client-request-id', - '48c57066-f6e7-4d55-bd3a-932824d14879', + 'ac0f7bb2-43ae-45c3-9784-fb57d88c1a4b', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Tue, 01 Oct 2019 21:26:29 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/recording_get_blob_tags_should_work_with_a_snapshot.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_get_blob_tags_should_work_with_a_snapshot.js new file mode 100644 index 000000000000..8d830548a3fd --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_get_blob_tags_should_work_with_a_snapshot.js @@ -0,0 +1,138 @@ +let nock = require('nock'); + +module.exports.hash = "df61c524e66abc05a67959db60063e2b"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827077205523","blob":"blob159210827078706620"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210827077205523') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:17:50 GMT', + 'ETag', + '"0x8D81019E6F34AF5"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308c74-201e-003e-7f02-42dadf000000', + 'x-ms-client-request-id', + '2163304c-fa1f-49ac-b3d0-8ca442aacbad', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 04:17:49 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210827077205523/blob159210827078706620', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:17:50 GMT', + 'ETag', + '"0x8D81019E6F62841"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308c7c-201e-003e-0502-42dadf000000', + 'x-ms-client-request-id', + 'e6dd7a9d-b125-4c96-a69c-b2a015305e3b', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-14T04:17:50.8043841Z', + 'Date', + 'Sun, 14 Jun 2020 04:17:49 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210827077205523/blob159210827078706620', "tag1val1tag2val2") + .query(true) + .reply(204, "", [ + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308c7f-201e-003e-0802-42dadf000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + '7e1d7ad7-7b40-4393-b44e-03fad20aeed0', + 'Date', + 'Sun, 14 Jun 2020 04:17:49 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210827077205523/blob159210827078706620') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:17:50 GMT', + 'ETag', + '"0x8D81019E6F62841"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308c81-201e-003e-0a02-42dadf000000', + 'x-ms-client-request-id', + '048a27fb-154a-445c-ab50-4b4e6f8aa82e', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:50.9715012Z', + 'x-ms-snapshot', + '2020-06-14T04:17:50.9705012Z', + 'x-ms-request-server-encrypted', + 'false', + 'Date', + 'Sun, 14 Jun 2020 04:17:50 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/container159210827077205523/blob159210827078706620') + .query(true) + .reply(200, "\ntag1val1tag2val2", [ + 'Content-Length', + '162', + 'Content-Type', + 'application/xml', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308cc6-201e-003e-4c02-42dadf000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + '22f68861-189f-4da0-899b-77c37b5ccc92', + 'Date', + 'Sun, 14 Jun 2020 04:17:50 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159210827077205523') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308ccb-201e-003e-5102-42dadf000000', + 'x-ms-client-request-id', + 'c75e171f-321e-4510-9990-d366af8f7893', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 04:17:50 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/recording_set_blob_tags_should_work.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_set_blob_tags_should_work.js new file mode 100644 index 000000000000..9b46d8816adf --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_set_blob_tags_should_work.js @@ -0,0 +1,220 @@ +let nock = require('nock'); + +module.exports.hash = "a4d11b65b72089c745751a1d6ece724e"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827037906396","blob":"blob159210827051603960"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210827037906396') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:17:50 GMT', + 'ETag', + '"0x8D81019E6C750F1"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308bec-201e-003e-0302-42dadf000000', + 'x-ms-client-request-id', + 'f2bd6bdd-b4ec-4c2a-8e1e-d64268f03b27', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 04:17:49 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210827037906396/blob159210827051603960', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:17:50 GMT', + 'ETag', + '"0x8D81019E6CC9FC6"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308c07-201e-003e-1a02-42dadf000000', + 'x-ms-client-request-id', + 'c5e1cc6a-a621-4cbb-bdd5-8b5b3f16caa6', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-14T04:17:50.5321926Z', + 'Date', + 'Sun, 14 Jun 2020 04:17:49 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210827037906396/blob159210827051603960', "tag1val1tag2val2") + .query(true) + .reply(204, "", [ + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308c0d-201e-003e-1f02-42dadf000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + 'b85fa6bc-191d-4f1d-b739-6face51b9a7f', + 'Date', + 'Sun, 14 Jun 2020 04:17:49 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/container159210827037906396/blob159210827051603960') + .query(true) + .reply(200, "\ntag1val1tag2val2", [ + 'Content-Length', + '162', + 'Content-Type', + 'application/xml', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308c33-201e-003e-4302-42dadf000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + '64371c2c-a076-4f16-8ad2-3484e7cfce76', + 'Date', + 'Sun, 14 Jun 2020 04:17:49 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container159210827037906396/blob159210827051603960') + .reply(200, "", [ + 'Content-Length', + '11', + 'Content-Type', + 'application/octet-stream', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:17:50 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D81019E6CC9FC6"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308c47-201e-003e-5402-42dadf000000', + 'x-ms-client-request-id', + '862d8686-8c86-4d29-81f8-fe8b1c8f70a0', + 'x-ms-version', + '2019-12-12', + 'x-ms-tag-count', + '2', + 'x-ms-version-id', + '2020-06-14T04:17:50.5321926Z', + 'x-ms-is-current-version', + 'true', + 'x-ms-creation-time', + 'Sun, 14 Jun 2020 04:17:50 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', + 'Hot', + 'x-ms-access-tier-inferred', + 'true', + 'Date', + 'Sun, 14 Jun 2020 04:17:49 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/container159210827037906396/blob159210827051603960') + .reply(200, "Hello World", [ + 'Content-Length', + '11', + 'Content-Type', + 'application/octet-stream', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:17:50 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D81019E6CC9FC6"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308c54-201e-003e-6002-42dadf000000', + 'x-ms-client-request-id', + '2a107c64-abf4-448e-b974-be1b58bb94ba', + 'x-ms-version', + '2019-12-12', + 'x-ms-tag-count', + '2', + 'x-ms-version-id', + '2020-06-14T04:17:50.5321926Z', + 'x-ms-is-current-version', + 'true', + 'x-ms-creation-time', + 'Sun, 14 Jun 2020 04:17:50 GMT', + 'x-ms-lease-status', + 'unlocked', + 'x-ms-lease-state', + 'available', + 'x-ms-blob-type', + 'BlockBlob', + 'x-ms-server-encrypted', + 'true', + 'Date', + 'Sun, 14 Jun 2020 04:17:49 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/container159210827037906396') + .query(true) + .reply(200, "blob1592108270516039602020-06-14T04:17:50.5321926ZtrueSun, 14 Jun 2020 04:17:50 GMTSun, 14 Jun 2020 04:17:50 GMT0x8D81019E6CC9FC611application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottrueunlockedavailabletrue2tag1val1tag2val2", [ + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/xml', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308c5c-201e-003e-6802-42dadf000000', + 'x-ms-client-request-id', + 'b7ff4b1b-73bf-40d4-969c-7238dc948305', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 04:17:49 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159210827037906396') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308c68-201e-003e-7402-42dadf000000', + 'x-ms-client-request-id', + '5aacca3e-13b9-428a-8d55-bb20ddb8607f', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 04:17:49 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/recording_setaccesstier_set_archive_to_hot.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_setaccesstier_set_archive_to_hot.js index b11072d73d8a..594969b837b2 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient/recording_setaccesstier_set_archive_to_hot.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_setaccesstier_set_archive_to_hot.js @@ -1,99 +1,107 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container156988644357109465","blob":"blob156988644378109182"} +module.exports.hash = "15fc01e92b66d0fad95cdec90863c146"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827355702452","blob":"blob159210827357206198"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156988644357109465') + .put('/container159210827355702452') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Mon, 30 Sep 2019 23:34:03 GMT', + 'Sun, 14 Jun 2020 04:17:53 GMT', 'ETag', - '"0x8D745FEADE076B0"', + '"0x8D81019E89BA2D9"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'ff64cbd2-c01e-00de-06e7-772332000000', + 'c130900c-201e-003e-4002-42dadf000000', 'x-ms-client-request-id', - '033e6aac-3660-4e06-9ec8-2a4c7667fa10', + '83234f10-c839-4825-82f8-241659f49cd9', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Mon, 30 Sep 2019 23:34:03 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:52 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156988644357109465/blob156988644378109182', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827355702452/blob159210827357206198', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Mon, 30 Sep 2019 23:34:03 GMT', + 'Sun, 14 Jun 2020 04:17:53 GMT', 'ETag', - '"0x8D745FEAE014BC7"', + '"0x8D81019E89E315C"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1f11971c-201e-0013-71e7-77467a000000', + 'c1309011-201e-003e-4202-42dadf000000', 'x-ms-client-request-id', - 'a8c009cf-1a35-4c43-b706-73c69ab1671c', + 'f3039aab-4380-44d4-82cc-86761411f4c9', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:53.5833436Z', 'Date', - 'Mon, 30 Sep 2019 23:34:03 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:52 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156988644357109465/blob156988644378109182') + .put('/container159210827355702452/blob159210827357206198') .query(true) - .reply(200, "", [ 'Content-Length', + .reply(200, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '78b1172f-001e-00c3-0fe7-77fad8000000', + 'c130901a-201e-003e-4b02-42dadf000000', 'x-ms-client-request-id', - 'aff68166-5794-4eb8-9398-4635eaa60f41', + '6b06b4f5-c023-465c-96c6-5d94c67ab0bb', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Mon, 30 Sep 2019 23:34:04 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:52 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container156988644357109465/blob156988644378109182') - .reply(200, "", [ 'Content-Length', + .head('/container159210827355702452/blob159210827357206198') + .reply(200, "", [ + 'Content-Length', '11', 'Content-Type', 'application/octet-stream', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Mon, 30 Sep 2019 23:34:03 GMT', + 'Sun, 14 Jun 2020 04:17:53 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D745FEAE014BC7"', - 'Vary', - 'Origin', + '"0x8D81019E89E315C"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '88c1ec45-801e-00d9-3be7-77d5b7000000', + 'c1309053-201e-003e-0202-42dadf000000', 'x-ms-client-request-id', - 'aa3585b0-8ade-491a-9c2e-364e09a05316', + '4887641e-46c2-4896-b6d7-725a673ded4d', 'x-ms-version', - '2019-02-02', - 'x-ms-tag-count', - '0', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:53.5833436Z', + 'x-ms-is-current-version', + 'true', 'x-ms-creation-time', - 'Mon, 30 Sep 2019 23:34:03 GMT', + 'Sun, 14 Jun 2020 04:17:53 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -105,54 +113,58 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-access-tier', 'Archive', 'x-ms-access-tier-change-time', - 'Mon, 30 Sep 2019 23:34:04 GMT', + 'Sun, 14 Jun 2020 04:17:53 GMT', 'Date', - 'Mon, 30 Sep 2019 23:34:03 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:52 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156988644357109465/blob156988644378109182') + .put('/container159210827355702452/blob159210827357206198') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '59e5f7ac-a01e-006f-3ee7-77db4f000000', + 'c1309058-201e-003e-0702-42dadf000000', 'x-ms-client-request-id', - 'b22fc2c2-d5af-40b5-b6d9-3a26d7c10fee', + '12199b34-da8b-4b81-b6d6-f5fde153113b', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Mon, 30 Sep 2019 23:34:03 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:52 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container156988644357109465/blob156988644378109182') - .reply(200, "", [ 'Content-Length', + .head('/container159210827355702452/blob159210827357206198') + .reply(200, "", [ + 'Content-Length', '11', 'Content-Type', 'application/octet-stream', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Mon, 30 Sep 2019 23:34:03 GMT', + 'Sun, 14 Jun 2020 04:17:53 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D745FEAE014BC7"', - 'Vary', - 'Origin', + '"0x8D81019E89E315C"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '19107411-d01e-002f-4fe7-77f2a1000000', + 'c1309062-201e-003e-1102-42dadf000000', 'x-ms-client-request-id', - 'f35ebfd6-4b81-482d-9f64-3cbc5b5b4267', + 'da4b3bbf-a05d-47b1-9353-36793120b6c9', 'x-ms-version', - '2019-02-02', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:53.5833436Z', + 'x-ms-is-current-version', + 'true', 'x-ms-creation-time', - 'Mon, 30 Sep 2019 23:34:03 GMT', + 'Sun, 14 Jun 2020 04:17:53 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -164,26 +176,29 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-access-tier', 'Archive', 'x-ms-access-tier-change-time', - 'Mon, 30 Sep 2019 23:34:04 GMT', + 'Sun, 14 Jun 2020 04:17:53 GMT', 'x-ms-archive-status', 'rehydrate-pending-to-hot', + 'x-ms-rehydrate-priority', + 'Standard', 'Date', - 'Mon, 30 Sep 2019 23:34:04 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:52 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156988644357109465') + .delete('/container159210827355702452') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '0c311eb6-d01e-0109-71e7-772f40000000', + 'c1309064-201e-003e-1302-42dadf000000', 'x-ms-client-request-id', - '27b7617e-b736-40b2-b3d3-d6d4d79b6d20', + '40fcd1f7-9ae8-4778-8312-14ac3b57f44a', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Mon, 30 Sep 2019 23:34:04 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:52 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/recording_setaccesstier_set_default_to_cool.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_setaccesstier_set_default_to_cool.js index d851c606891d..d45c0678328f 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient/recording_setaccesstier_set_default_to_cool.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_setaccesstier_set_default_to_cool.js @@ -1,99 +1,107 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container156988644246202534","blob":"blob156988644268700646"} +module.exports.hash = "5c4a67be36e56d2e3cb4a259494f8673"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827319002581","blob":"blob159210827320608908"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156988644246202534') + .put('/container159210827319002581') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Mon, 30 Sep 2019 23:34:02 GMT', + 'Sun, 14 Jun 2020 04:17:53 GMT', 'ETag', - '"0x8D745FEAD37A487"', + '"0x8D81019E86398B6"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'b0fe1428-c01e-009a-68e7-77ff5e000000', + 'c1308f9b-201e-003e-5802-42dadf000000', 'x-ms-client-request-id', - 'a548b91e-5897-4109-b8d6-e50d1fcc44c2', + '0a41d011-7362-42c2-9141-7972b462aa53', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Mon, 30 Sep 2019 23:34:01 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:52 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156988644246202534/blob156988644268700646', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827319002581/blob159210827320608908', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Mon, 30 Sep 2019 23:34:02 GMT', + 'Sun, 14 Jun 2020 04:17:53 GMT', 'ETag', - '"0x8D745FEAD5A5C0F"', + '"0x8D81019E866274E"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'deeaee00-101e-00dc-68e7-7721c8000000', + 'c1308fa1-201e-003e-5d02-42dadf000000', 'x-ms-client-request-id', - '557aef57-fbee-40c4-af28-9621f0c525af', + 'e3f14504-1df4-4cd3-b19b-a812ebf5402f', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:53.2160846Z', 'Date', - 'Mon, 30 Sep 2019 23:34:01 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:52 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156988644246202534/blob156988644268700646') + .put('/container159210827319002581/blob159210827320608908') .query(true) - .reply(200, "", [ 'Content-Length', + .reply(200, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '08a7b332-701e-0083-04e7-77d336000000', + 'c1308fa4-201e-003e-6002-42dadf000000', 'x-ms-client-request-id', - 'd6563af5-8d31-4cbc-8ca1-faa603c8e337', + 'd2f822df-467c-48ca-9e1f-3a271b518594', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Mon, 30 Sep 2019 23:34:02 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:52 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container156988644246202534/blob156988644268700646') - .reply(200, "", [ 'Content-Length', + .head('/container159210827319002581/blob159210827320608908') + .reply(200, "", [ + 'Content-Length', '11', 'Content-Type', 'application/octet-stream', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Mon, 30 Sep 2019 23:34:02 GMT', + 'Sun, 14 Jun 2020 04:17:53 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D745FEAD5A5C0F"', - 'Vary', - 'Origin', + '"0x8D81019E866274E"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '9185a4e8-401e-008b-14e7-77c845000000', + 'c1308fff-201e-003e-3302-42dadf000000', 'x-ms-client-request-id', - '73d48b01-91be-43b3-b3c7-fd0aa428c9d8', + '23f5ff40-bfcd-4a34-b5dc-6cf5694e434f', 'x-ms-version', - '2019-02-02', - 'x-ms-tag-count', - '0', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:53.2160846Z', + 'x-ms-is-current-version', + 'true', 'x-ms-creation-time', - 'Mon, 30 Sep 2019 23:34:02 GMT', + 'Sun, 14 Jun 2020 04:17:53 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -105,24 +113,25 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-access-tier', 'Cool', 'x-ms-access-tier-change-time', - 'Mon, 30 Sep 2019 23:34:03 GMT', + 'Sun, 14 Jun 2020 04:17:53 GMT', 'Date', - 'Mon, 30 Sep 2019 23:34:02 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:52 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156988644246202534') + .delete('/container159210827319002581') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '2124efcf-401e-0047-77e7-77acf0000000', + 'c1309006-201e-003e-3a02-42dadf000000', 'x-ms-client-request-id', - '10c77259-6760-4c25-982d-0fdbb802415b', + '10d70f40-e2d1-4eea-9eb9-1d20f2996c85', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Mon, 30 Sep 2019 23:34:03 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:52 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/recording_setaccesstier_with_rehydrate_priority.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_setaccesstier_with_rehydrate_priority.js index 1b1583eb455c..2fadf62f2333 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient/recording_setaccesstier_with_rehydrate_priority.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_setaccesstier_with_rehydrate_priority.js @@ -1,114 +1,125 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container156988645232600103","blob":"blob156988645252909478"} +module.exports.hash = "00c53be66945e8c4fb4f39aa1a85fbb4"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827433400775","blob":"blob159210827435008522"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156988645232600103') + .put('/container159210827433400775') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Mon, 30 Sep 2019 23:34:12 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'ETag', - '"0x8D745FEB317887B"', + '"0x8D81019E9129628"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '0520a29a-201e-0018-2ce7-775e0e000000', + 'c130914f-201e-003e-6c02-42dadf000000', 'x-ms-client-request-id', - '4a308b79-7902-447b-90bd-e9dd021b2221', + 'd68677ec-c0a9-49c2-bbe5-de41d6bfaddc', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Mon, 30 Sep 2019 23:34:12 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156988645232600103/blob156988645252909478', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827433400775/blob159210827435008522', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Mon, 30 Sep 2019 23:34:12 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'ETag', - '"0x8D745FEB336574E"', + '"0x8D81019E9152485"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'de8eadc1-601e-0050-63e7-776c93000000', + 'c1309157-201e-003e-7302-42dadf000000', 'x-ms-client-request-id', - 'f5352ce3-4011-4c57-98f3-463c3e1ee7db', + '3a798257-8b95-4024-90b6-bf3f66c2e160', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:54.3628933Z', 'Date', - 'Mon, 30 Sep 2019 23:34:12 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156988645232600103/blob156988645252909478') + .put('/container159210827433400775/blob159210827435008522') .query(true) - .reply(200, "", [ 'Content-Length', + .reply(200, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'ff651c8d-c01e-00de-80e7-772332000000', + 'c1309160-201e-003e-7a02-42dadf000000', 'x-ms-client-request-id', - 'cbfd3493-e792-4195-9ce5-8b8a11a645e1', + '34bec2a3-a144-44b7-88f5-600c9a5d368d', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Mon, 30 Sep 2019 23:34:12 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156988645232600103/blob156988645252909478') + .put('/container159210827433400775/blob159210827435008522') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '01c655ac-301e-006a-0be7-772f30000000', + 'c1309164-201e-003e-7d02-42dadf000000', 'x-ms-client-request-id', - 'e02763c9-6c0b-41f7-abf1-da1e8bc5efdf', + '495a69d2-69fb-4462-bae1-b9b537667af7', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Mon, 30 Sep 2019 23:34:12 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container156988645232600103/blob156988645252909478') - .reply(200, "", [ 'Content-Length', + .head('/container159210827433400775/blob159210827435008522') + .reply(200, "", [ + 'Content-Length', '11', 'Content-Type', 'application/octet-stream', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Mon, 30 Sep 2019 23:34:12 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D745FEB336574E"', - 'Vary', - 'Origin', + '"0x8D81019E9152485"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '58d23566-001e-002d-7de7-77f05b000000', + 'c1309168-201e-003e-0102-42dadf000000', 'x-ms-client-request-id', - 'c671f7dd-67ee-4487-a1df-9e45279338d5', + 'e8fec8d1-0eda-4ba9-b3dc-c0ffb9560fee', 'x-ms-version', - '2019-02-02', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:54.3628933Z', + 'x-ms-is-current-version', + 'true', 'x-ms-creation-time', - 'Mon, 30 Sep 2019 23:34:12 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -120,26 +131,29 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-access-tier', 'Archive', 'x-ms-access-tier-change-time', - 'Mon, 30 Sep 2019 23:34:13 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'x-ms-archive-status', 'rehydrate-pending-to-cool', + 'x-ms-rehydrate-priority', + 'Standard', 'Date', - 'Mon, 30 Sep 2019 23:34:13 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156988645232600103') + .delete('/container159210827433400775') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '69873fd5-101e-001b-50e7-775d09000000', + 'c130916e-201e-003e-0702-42dadf000000', 'x-ms-client-request-id', - '5672f746-cce2-4d43-8349-8b3488ca09ba', + 'dd28153d-9052-4d66-a72b-49adb7ee8bbb', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Mon, 30 Sep 2019 23:34:13 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/recording_sethttpheaders_with_all_parameters_set.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_sethttpheaders_with_all_parameters_set.js index 76fdcb1b961f..8adf6a89ba69 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient/recording_sethttpheaders_with_all_parameters_set.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_sethttpheaders_with_all_parameters_set.js @@ -1,78 +1,86 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container156816830323106732","blob":"blob156816830365205740"} +module.exports.hash = "6e9aff9d8b2a110f39c9310185ef114d"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827247503720","blob":"blob159210827249102824"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816830323106732') + .put('/container159210827247503720') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:23 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'ETag', - '"0x8D7365E5289F8E1"', + '"0x8D81019E7F72EA1"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '87ae08e3-201e-006a-6a47-683a57000000', + 'c1308edc-201e-003e-3202-42dadf000000', 'x-ms-client-request-id', - '639df9d7-1863-445b-8ef1-ce4fa79cb02e', + '66b895a7-1c85-4156-8cc1-c17c87613cdf', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:18:23 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816830323106732/blob156816830365205740', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827247503720/blob159210827249102824', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:24 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'ETag', - '"0x8D7365E52C9F94A"', + '"0x8D81019E7F9E473"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '0555e413-a01e-0059-3447-68637a000000', + 'c1308ee2-201e-003e-3602-42dadf000000', 'x-ms-client-request-id', - 'ac7fa077-e235-42d8-8296-40d96f31af13', + '4f987761-6670-4188-a954-31ea46d4f62d', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:52.5065843Z', 'Date', - 'Wed, 11 Sep 2019 02:18:23 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816830323106732/blob156816830365205740') + .put('/container159210827247503720/blob159210827249102824') .query(true) - .reply(200, "", [ 'Content-Length', + .reply(200, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:24 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'ETag', - '"0x8D7365E530A4232"', + '"0x8D81019E7FC2ECD"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'ea8d64e5-701e-003d-1247-68d3da000000', + 'c1308ee8-201e-003e-3b02-42dadf000000', 'x-ms-client-request-id', - 'a97c5326-d49e-4a80-8439-cd0869f9338b', + '030ec103-d6e2-49e2-8c13-cfa7bc058149', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:18:24 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container156816830323106732/blob156816830365205740') - .reply(200, [], [ 'Cache-Control', + .head('/container159210827247503720/blob159210827249102824') + .reply(200, [], [ + 'Cache-Control', 'blobCacheControl', 'Content-Length', '11', @@ -85,23 +93,25 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Content-MD5', 'AQIDBA==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:24 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7365E530A4232"', + '"0x8D81019E7FC2ECD"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'a27323ce-b01e-0046-7647-68b86a000000', + 'c1308eec-201e-003e-3f02-42dadf000000', 'x-ms-client-request-id', - 'da8014ca-7577-457a-ad3b-a54278fd034c', + '24ba8fbf-0c9f-4492-b4fd-c2521e847ca2', 'x-ms-version', - '2019-02-02', - 'x-ms-tag-count', - '0', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:52.5065843Z', + 'x-ms-is-current-version', + 'true', 'x-ms-creation-time', - 'Wed, 11 Sep 2019 02:18:24 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -113,30 +123,27 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-server-encrypted', 'true', 'x-ms-access-tier', - 'Cool', + 'Hot', 'x-ms-access-tier-inferred', 'true', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-tag-count,Content-Type,Content-Encoding,Content-Language,Cache-Control,Last-Modified,ETag,x-ms-creation-time,Content-MD5,x-ms-lease-status,x-ms-lease-state,x-ms-blob-type,Content-Disposition,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', - 'Wed, 11 Sep 2019 02:18:24 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156816830323106732') + .delete('/container159210827247503720') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '96e1e936-201e-0061-5647-682223000000', + 'c1308ef0-201e-003e-4302-42dadf000000', 'x-ms-client-request-id', - 'b1694309-7ce2-4df1-8112-9fa530d09732', + '0cb7288e-732e-46cc-95ce-8705a4c8df39', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:18:25 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/recording_sethttpheaders_with_default_parameters.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_sethttpheaders_with_default_parameters.js index 629a98216647..9b375d060371 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient/recording_sethttpheaders_with_default_parameters.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_sethttpheaders_with_default_parameters.js @@ -1,97 +1,107 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container156816830113504557","blob":"blob156816830155303216"} +module.exports.hash = "2a72af782365f9ee677dc96b13236ba0"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827239704118","blob":"blob159210827241308179"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816830113504557') + .put('/container159210827239704118') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:21 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'ETag', - '"0x8D7365E5149D5A4"', + '"0x8D81019E7EBBAD8"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'f7aae5a5-101e-0069-0c47-683950000000', + 'c1308ebc-201e-003e-1302-42dadf000000', 'x-ms-client-request-id', - '957f74c5-e4b5-4f91-a548-b817de7b0e80', + 'a48bd314-f6f3-4283-b59b-74a51b8ac7c6', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:18:20 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816830113504557/blob156816830155303216', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827239704118/blob159210827241308179', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:21 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'ETag', - '"0x8D7365E5189C57A"', + '"0x8D81019E7EE499B"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'f194b230-301e-0057-2447-688f71000000', + 'c1308ec5-201e-003e-1b02-42dadf000000', 'x-ms-client-request-id', - '522b47a2-453f-48d8-90f9-97410e406805', + '038c808e-1f50-4a25-8483-c3ae70ae39e3', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:52.4305307Z', 'Date', - 'Wed, 11 Sep 2019 02:18:20 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816830113504557/blob156816830155303216') + .put('/container159210827239704118/blob159210827241308179') .query(true) - .reply(200, "", [ 'Content-Length', + .reply(200, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:22 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'ETag', - '"0x8D7365E51C99912"', + '"0x8D81019E7F093F5"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'f7aae72f-101e-0069-6347-683950000000', + 'c1308ecd-201e-003e-2302-42dadf000000', 'x-ms-client-request-id', - 'dbe74de4-28aa-4104-9815-b80bb75ab24e', + '20385257-0090-458f-bbdf-53ea1d7b7c41', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:18:21 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container156816830113504557/blob156816830155303216') - .reply(200, "", [ 'Content-Length', + .head('/container159210827239704118/blob159210827241308179') + .reply(200, "", [ + 'Content-Length', '11', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:22 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7365E51C99912"', + '"0x8D81019E7F093F5"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'c7dfba3d-501e-002a-1847-6813b9000000', + 'c1308ed1-201e-003e-2702-42dadf000000', 'x-ms-client-request-id', - '910f5a93-042f-4155-943b-e06c5566aa01', + '7244c16b-8420-46d9-b36d-9f8ae008f831', 'x-ms-version', - '2019-02-02', - 'x-ms-tag-count', - '0', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:52.4305307Z', + 'x-ms-is-current-version', + 'true', 'x-ms-creation-time', - 'Wed, 11 Sep 2019 02:18:21 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -101,30 +111,27 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-server-encrypted', 'true', 'x-ms-access-tier', - 'Cool', + 'Hot', 'x-ms-access-tier-inferred', 'true', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-tag-count,Last-Modified,ETag,x-ms-creation-time,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', - 'Wed, 11 Sep 2019 02:18:22 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156816830113504557') + .delete('/container159210827239704118') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '4e63b83e-901e-0051-2147-687809000000', + 'c1308ed4-201e-003e-2a02-42dadf000000', 'x-ms-client-request-id', - '301e8b27-9255-4051-8a75-6afc6fa9a1af', + '735f376f-3fda-4f28-a38f-5e2e66f221c4', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:18:22 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/recording_setmetadata_sethttpheaders_getproperties_and_createsnapshot_with_cpk.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_setmetadata_sethttpheaders_getproperties_and_createsnapshot_with_cpk.js index 43a6107bb2b4..14afd42122da 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient/recording_setmetadata_sethttpheaders_getproperties_and_createsnapshot_with_cpk.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_setmetadata_sethttpheaders_getproperties_and_createsnapshot_with_cpk.js @@ -1,153 +1,164 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container156816833222605633","blob":"blob156816833264307086","blobCPK":"blobCPK156816833305807492"} +module.exports.hash = "75402fe6f1951c602e0c3a78d3a4a8dc"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827403703315","blob":"blob159210827405304335","blobCPK":"blobCPK159210827405309896"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816833222605633') + .put('/container159210827403703315') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:52 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'ETag', - '"0x8D7365E63D1EC70"', + '"0x8D81019E8E478ED"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '66b0b5a4-f01e-004a-3e47-68569b000000', + 'c13090df-201e-003e-0502-42dadf000000', 'x-ms-client-request-id', - 'aa45fbd6-5e0b-48bf-9ba6-b6b4892cb4e0', + 'fbdbd75f-56c1-4e6a-9fc3-13aaf50fee62', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:18:51 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816833222605633/blob156816833264307086', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827403703315/blob159210827405304335', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:52 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'ETag', - '"0x8D7365E64111AC7"', + '"0x8D81019E8E72E6D"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'd539cfe2-001e-0032-5747-683e2c000000', + 'c13090e6-201e-003e-0b02-42dadf000000', 'x-ms-client-request-id', - '9f7b2040-707f-42b5-b15f-f350034ceb7d', + '1580214e-43dd-4225-b39e-ef815dbc67cb', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:54.0616813Z', 'Date', - 'Wed, 11 Sep 2019 02:18:52 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816833222605633/blobCPK156816833305807492', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827403703315/blobCPK159210827405309896', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:53 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'ETag', - '"0x8D7365E6450C758"', + '"0x8D81019E8E978C3"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '6796d100-b01e-0064-3547-68d65c000000', + 'c13090ef-201e-003e-1402-42dadf000000', 'x-ms-client-request-id', - '44c1cdf4-d1b2-4cda-9d0c-6876d2aa951b', + 'c851fda9-94e3-4b8c-aba1-31ec8205dc88', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', 'x-ms-encryption-key-sha256', '3QFFFpRA5+XANHqwwbT4yXDmrT/2JaLt/FKHjzhOdoE=', + 'x-ms-version-id', + '2020-06-14T04:17:54.0766915Z', 'Date', - 'Wed, 11 Sep 2019 02:18:52 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816833222605633/blobCPK156816833305807492') + .put('/container159210827403703315/blobCPK159210827405309896') .query(true) - .reply(200, "", [ 'Content-Length', + .reply(200, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:53 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'ETag', - '"0x8D7365E64915E72"', + '"0x8D81019E8EC114B"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '84b7e254-401e-0017-1347-68a69f000000', + 'c13090f5-201e-003e-1a02-42dadf000000', 'x-ms-client-request-id', - 'dfe90ab6-579f-4bad-a536-48659238ed46', + 'df9b7675-aec3-4a07-9557-e921e1bf9e7d', 'x-ms-version', - '2019-02-02', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:54.0947035Z', 'x-ms-request-server-encrypted', 'true', 'x-ms-encryption-key-sha256', '3QFFFpRA5+XANHqwwbT4yXDmrT/2JaLt/FKHjzhOdoE=', 'Date', - 'Wed, 11 Sep 2019 02:18:53 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container156816833222605633/blobCPK156816833305807492') - .reply(409, "", [ 'Transfer-Encoding', + .head('/container159210827403703315/blobCPK159210827405309896') + .reply(409, "", [ + 'Transfer-Encoding', 'chunked', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '66b0b853-f01e-004a-1d47-68569b000000', + 'c13090ff-201e-003e-2402-42dadf000000', 'x-ms-client-request-id', - 'c74ec97b-b538-4d31-a7e6-7178430080db', + '80dd7e2c-ad72-4f2b-a2b2-b6847fc65836', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-error-code', 'BlobUsesCustomerSpecifiedEncryption', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-error-code,Content-Length,Date,Transfer-Encoding', - 'Access-Control-Allow-Origin', - '*', 'Date', - 'Wed, 11 Sep 2019 02:18:53 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816833222605633/blobCPK156816833305807492') + .put('/container159210827403703315/blobCPK159210827405309896') .query(true) - .reply(200, "", [ 'Content-Length', + .reply(200, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:54 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'ETag', - '"0x8D7365E65109075"', + '"0x8D81019E8EFBB78"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '2b544c68-b01e-002b-1047-681244000000', + 'c1309104-201e-003e-2802-42dadf000000', 'x-ms-client-request-id', - '3a72fd19-115e-4c7a-b0a2-a36f87456007', + '06bc2688-f1fd-46bc-b865-49f70f298142', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:18:53 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container156816833222605633/blobCPK156816833305807492') - .reply(200, [], [ 'Cache-Control', + .head('/container159210827403703315/blobCPK159210827405309896') + .reply(200, [], [ + 'Cache-Control', 'blobCacheControl', 'Content-Length', '11', @@ -160,27 +171,29 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Content-MD5', 'AQIDBA==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:54 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7365E65109075"', + '"0x8D81019E8EFBB78"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '5b8f932d-e01e-001a-5047-684993000000', + 'c1309107-201e-003e-2b02-42dadf000000', 'x-ms-client-request-id', - '58e3247d-cc5a-421e-ac24-8bfdd4ebda4e', + 'c9aaa01f-97d2-42e4-892d-d4b08d3236c5', 'x-ms-version', - '2019-02-02', - 'x-ms-tag-count', - '0', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:54.0947035Z', + 'x-ms-is-current-version', + 'true', 'x-ms-meta-a', 'a', 'x-ms-meta-b', 'b', 'x-ms-creation-time', - 'Wed, 11 Sep 2019 02:18:53 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -194,46 +207,46 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-encryption-key-sha256', '3QFFFpRA5+XANHqwwbT4yXDmrT/2JaLt/FKHjzhOdoE=', 'x-ms-access-tier', - 'Cool', + 'Hot', 'x-ms-access-tier-inferred', 'true', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-tag-count,x-ms-meta-a,x-ms-meta-b,Content-Type,Content-Encoding,Content-Language,Cache-Control,Last-Modified,ETag,x-ms-creation-time,Content-MD5,x-ms-lease-status,x-ms-lease-state,x-ms-blob-type,Content-Disposition,x-ms-server-encrypted,x-ms-encryption-key-sha256,x-ms-access-tier,x-ms-access-tier-inferred,Accept-Ranges,Content-Length,Date,Transfer-Encoding', - 'Access-Control-Allow-Origin', - '*', 'Date', - 'Wed, 11 Sep 2019 02:18:54 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816833222605633/blobCPK156816833305807492') + .put('/container159210827403703315/blobCPK159210827405309896') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:54 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'ETag', - '"0x8D7365E65109075"', + '"0x8D81019E8EFBB78"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '4070c220-d01e-0056-6047-688e8c000000', + 'c1309108-201e-003e-2c02-42dadf000000', 'x-ms-client-request-id', - 'cd7877ea-1264-48d1-b0f4-ca9a96123112', + '32a4725e-da17-4110-8ed7-d05c10e14a08', 'x-ms-version', - '2019-02-02', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:54.1477395Z', 'x-ms-snapshot', - '2019-09-11T02:18:55.5060587Z', + '2020-06-14T04:17:54.1467395Z', 'x-ms-request-server-encrypted', 'false', 'Date', - 'Wed, 11 Sep 2019 02:18:55 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container156816833222605633/blobCPK156816833305807492') + .head('/container159210827403703315/blobCPK159210827405309896') .query(true) - .reply(200, [], [ 'Cache-Control', + .reply(200, [], [ + 'Cache-Control', 'blobCacheControl', 'Content-Length', '11', @@ -246,29 +259,25 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Content-MD5', 'AQIDBA==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:54 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7365E65109075"', + '"0x8D81019E8EFBB78"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '4744463b-301e-0013-2747-68531d000000', + 'c1309115-201e-003e-3602-42dadf000000', 'x-ms-client-request-id', - '76732577-1b27-448a-b68c-3dd6f331594d', + '7e99b3dd-2100-43cb-8043-a0d2b541e68a', 'x-ms-version', - '2019-02-02', - 'x-ms-snapshot', - '2019-09-11T02:18:55.5060587Z', - 'x-ms-tag-count', - '0', + '2019-12-12', 'x-ms-meta-a', 'a', 'x-ms-meta-b', 'b', 'x-ms-creation-time', - 'Wed, 11 Sep 2019 02:18:53 GMT', + 'Sun, 14 Jun 2020 04:17:54 GMT', 'x-ms-blob-type', 'BlockBlob', 'Content-Disposition', @@ -278,53 +287,47 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-encryption-key-sha256', '3QFFFpRA5+XANHqwwbT4yXDmrT/2JaLt/FKHjzhOdoE=', 'x-ms-access-tier', - 'Cool', + 'Hot', 'x-ms-access-tier-inferred', 'true', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-snapshot,x-ms-tag-count,x-ms-meta-a,x-ms-meta-b,Content-Type,Content-Encoding,Content-Language,Cache-Control,Last-Modified,ETag,x-ms-creation-time,Content-MD5,x-ms-blob-type,Content-Disposition,x-ms-server-encrypted,x-ms-encryption-key-sha256,x-ms-access-tier,x-ms-access-tier-inferred,Accept-Ranges,Content-Length,Date,Transfer-Encoding', - 'Access-Control-Allow-Origin', - '*', 'Date', - 'Wed, 11 Sep 2019 02:18:55 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container156816833222605633/blobCPK156816833305807492') + .head('/container159210827403703315/blobCPK159210827405309896') .query(true) - .reply(409, "", [ 'Transfer-Encoding', + .reply(409, "", [ + 'Transfer-Encoding', 'chunked', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '86b63354-c01e-0049-7147-68559c000000', + 'c1309119-201e-003e-3a02-42dadf000000', 'x-ms-client-request-id', - 'e2d27682-6424-448b-aa64-8643994ef5b7', + '856135a2-74ea-4c78-8682-8ac1b793b461', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-error-code', 'BlobUsesCustomerSpecifiedEncryption', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-error-code,Content-Length,Date,Transfer-Encoding', - 'Access-Control-Allow-Origin', - '*', 'Date', - 'Wed, 11 Sep 2019 02:18:55 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156816833222605633') + .delete('/container159210827403703315') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '5b8f98b0-e01e-001a-1a47-684993000000', + 'c1309121-201e-003e-4002-42dadf000000', 'x-ms-client-request-id', - '5f47dd4c-4413-4c35-8167-33e2ec5f0f76', + 'a886bf23-0f89-4c70-af89-b17f05e65f51', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:18:56 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/recording_setmetadata_with_cleaning_up_metadata.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_setmetadata_with_cleaning_up_metadata.js index fd8d400111f2..0ff83f14b08c 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient/recording_setmetadata_with_cleaning_up_metadata.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_setmetadata_with_cleaning_up_metadata.js @@ -1,107 +1,119 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container156816829820008348","blob":"blob156816829862807902"} +module.exports.hash = "5fcb62eeaa74c436ad1c241b97d08805"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827230007854","blob":"blob159210827230309859"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816829820008348') + .put('/container159210827230007854') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:18 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'ETag', - '"0x8D7365E4F8A6A52"', + '"0x8D81019E7DB3D18"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'a2731bdf-b01e-0046-7447-68b86a000000', + 'c1308e8d-201e-003e-6602-42dadf000000', 'x-ms-client-request-id', - '12a74c24-2cae-437a-8cfb-cd6101e3ddbb', + '365ec41a-3682-47c0-b74b-8d2a22837d5c', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:18:17 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816829820008348/blob156816829862807902', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827230007854/blob159210827230309859', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:18 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'ETag', - '"0x8D7365E4FCC5BB7"', + '"0x8D81019E7DDF2FC"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'ed162a38-f01e-0005-0c47-689283000000', + 'c1308e97-201e-003e-6e02-42dadf000000', 'x-ms-client-request-id', - '2d008332-a7b2-43ba-9478-c1cf5b1b614a', + '19a5936d-2f65-4114-aa26-bcdd0bf10a78', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:52.3234556Z', 'Date', - 'Wed, 11 Sep 2019 02:18:18 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816829820008348/blob156816829862807902') + .put('/container159210827230007854/blob159210827230309859') .query(true) - .reply(200, "", [ 'Content-Length', + .reply(200, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:19 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'ETag', - '"0x8D7365E500CCBB8"', + '"0x8D81019E7E0163B"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'a043628e-701e-0050-1947-6879f4000000', + 'c1308e9b-201e-003e-7202-42dadf000000', 'x-ms-client-request-id', - '3cc550ce-416c-40da-952d-b4a0ef88b898', + '26645c2e-9823-42be-8584-5459b8617e4d', 'x-ms-version', - '2019-02-02', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:52.3394658Z', 'x-ms-request-server-encrypted', 'true', 'Date', - 'Wed, 11 Sep 2019 02:18:18 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container156816829820008348/blob156816829862807902') - .reply(200, "", [ 'Content-Length', + .head('/container159210827230007854/blob159210827230309859') + .reply(200, "", [ + 'Content-Length', '11', 'Content-Type', 'application/octet-stream', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:19 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7365E500CCBB8"', + '"0x8D81019E7E0163B"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'f7bc8ced-301e-005c-5f47-689705000000', + 'c1308ea4-201e-003e-7b02-42dadf000000', 'x-ms-client-request-id', - '8ecbe229-eb22-4aba-9e58-5192fb3a9586', + '454de6e5-4b72-471e-bec1-839d1654aefc', 'x-ms-version', - '2019-02-02', - 'x-ms-tag-count', - '0', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:52.3394658Z', + 'x-ms-is-current-version', + 'true', 'x-ms-meta-a', 'a', 'x-ms-meta-b', 'b', 'x-ms-creation-time', - 'Wed, 11 Sep 2019 02:18:18 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -111,66 +123,68 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-server-encrypted', 'true', 'x-ms-access-tier', - 'Cool', + 'Hot', 'x-ms-access-tier-inferred', 'true', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-tag-count,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', - 'Wed, 11 Sep 2019 02:18:19 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816829820008348/blob156816829862807902') + .put('/container159210827230007854/blob159210827230309859') .query(true) - .reply(200, "", [ 'Content-Length', + .reply(200, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:20 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'ETag', - '"0x8D7365E508A9DF6"', + '"0x8D81019E7E4F921"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '82b650a4-d01e-005d-5547-6896f8000000', + 'c1308eaa-201e-003e-0102-42dadf000000', 'x-ms-client-request-id', - 'e42839ff-b2ac-4758-80d9-9800e22511b8', + '065af565-129e-43e5-9580-521f66993fdf', 'x-ms-version', - '2019-02-02', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:52.3704881Z', 'x-ms-request-server-encrypted', 'true', 'Date', - 'Wed, 11 Sep 2019 02:18:19 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container156816829820008348/blob156816829862807902') - .reply(200, "", [ 'Content-Length', + .head('/container159210827230007854/blob159210827230309859') + .reply(200, "", [ + 'Content-Length', '11', 'Content-Type', 'application/octet-stream', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:20 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7365E508A9DF6"', + '"0x8D81019E7E4F921"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'b7b48f79-901e-005a-1b47-68607d000000', + 'c1308eb0-201e-003e-0702-42dadf000000', 'x-ms-client-request-id', - '0a24aeff-81c6-4ca7-a5c4-44ab6fa3eac7', + '8a6353c9-c894-4f2f-bb8c-446e64375a0c', 'x-ms-version', - '2019-02-02', - 'x-ms-tag-count', - '0', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:52.3704881Z', + 'x-ms-is-current-version', + 'true', 'x-ms-creation-time', - 'Wed, 11 Sep 2019 02:18:18 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -180,30 +194,27 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-server-encrypted', 'true', 'x-ms-access-tier', - 'Cool', + 'Hot', 'x-ms-access-tier-inferred', 'true', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-tag-count,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', - 'Wed, 11 Sep 2019 02:18:19 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156816829820008348') + .delete('/container159210827230007854') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '67282163-101e-0040-1f47-684f12000000', + 'c1308eb7-201e-003e-0e02-42dadf000000', 'x-ms-client-request-id', - 'be8ec266-7109-4675-b778-6c2c789cc617', + 'bff5bad3-b910-45de-a568-709d2997671d', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:18:20 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/recording_setmetadata_with_cpk_on_a_blob_uploaded_without_cpk_should_fail.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_setmetadata_with_cpk_on_a_blob_uploaded_without_cpk_should_fail.js index 36ca1e7f399c..6f23196469f8 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient/recording_setmetadata_with_cpk_on_a_blob_uploaded_without_cpk_should_fail.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_setmetadata_with_cpk_on_a_blob_uploaded_without_cpk_should_fail.js @@ -1,88 +1,96 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container156816833054605943","blob":"blob156816833096209984"} +module.exports.hash = "f4221b714c6b62601c8d8ba436f857f5"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827396600974","blob":"blob159210827398305231"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816833054605943') + .put('/container159210827396600974') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:50 GMT', + 'Sun, 14 Jun 2020 04:17:53 GMT', 'ETag', - '"0x8D7365E62D0ED26"', + '"0x8D81019E8DA16C5"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'dd4a5428-901e-0037-7a47-68ca53000000', + 'c13090bf-201e-003e-6802-42dadf000000', 'x-ms-client-request-id', - '04b5a177-b46a-4595-a112-e1f4691b0661', + '5281a8c5-7cc0-4e8d-997d-372e9defbe25', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:18:50 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816833054605943/blob156816833096209984', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827396600974/blob159210827398305231', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:51 GMT', + 'Sun, 14 Jun 2020 04:17:53 GMT', 'ETag', - '"0x8D7365E63117E09"', + '"0x8D81019E8DCA536"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1071f798-c01e-0024-5b47-68ffb2000000', + 'c13090c9-201e-003e-6f02-42dadf000000', 'x-ms-client-request-id', - '9e73ba08-2959-4ef9-a698-b75436339d7a', + '335356a7-9fb8-4316-a9e7-558073855e32', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:53.9926326Z', 'Date', - 'Wed, 11 Sep 2019 02:18:50 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816833054605943/blob156816833096209984') + .put('/container159210827396600974/blob159210827398305231') .query(true) - .reply(409, "BlobDoesNotUseCustomerSpecifiedEncryptionThe blob is not encrypted with customer specified encryption, but one was provided in the request.\nRequestId:026f8b95-201e-0043-1747-684c15000000\nTime:2019-09-11T02:18:51.7343487Z", [ 'Content-Length', + .reply(409, "BlobDoesNotUseCustomerSpecifiedEncryptionThe blob is not encrypted with customer specified encryption, but one was provided in the request.\nRequestId:c13090cc-201e-003e-7202-42dadf000000\nTime:2020-06-14T04:17:54.0149071Z", [ + 'Content-Length', '308', 'Content-Type', 'application/xml', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '026f8b95-201e-0043-1747-684c15000000', + 'c13090cc-201e-003e-7202-42dadf000000', 'x-ms-client-request-id', - '6d62f3e3-a94a-4450-81e4-dcf71d5893e0', + 'ee1869cf-22af-477d-bd82-6c333c48da3f', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-error-code', 'BlobDoesNotUseCustomerSpecifiedEncryption', 'Date', - 'Wed, 11 Sep 2019 02:18:51 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156816833054605943') + .delete('/container159210827396600974') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'ad49cdec-801e-006c-2d47-68cd2f000000', + 'c13090d9-201e-003e-7f02-42dadf000000', 'x-ms-client-request-id', - '4e91daf5-78bc-49de-9c7e-26b3ad53c1d5', + '1b5d873c-a01f-4f29-acf3-dbb3fb10d0ed', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:18:51 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/recording_setmetadata_with_new_metadata_set.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_setmetadata_with_new_metadata_set.js index d6b2f6861717..51c56d704b37 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient/recording_setmetadata_with_new_metadata_set.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_setmetadata_with_new_metadata_set.js @@ -1,107 +1,119 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container156816829609908705","blob":"blob156816829651606372"} +module.exports.hash = "04d43cdff6474fb113bc340d22a8b474"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827219305138","blob":"blob159210827220900386"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816829609908705') + .put('/container159210827219305138') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:16 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'ETag', - '"0x8D7365E4E4929C4"', + '"0x8D81019E7CC946D"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '585e067a-101e-0026-3747-68fd48000000', + 'c1308e73-201e-003e-4d02-42dadf000000', 'x-ms-client-request-id', - '1f750c0c-d679-4852-a7aa-0b9d95bd80a8', + 'e4e5da98-a911-4fa5-82ac-26b3c5a39997', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:18:15 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816829609908705/blob156816829651606372', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827219305138/blob159210827220900386', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:16 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'ETag', - '"0x8D7365E4E887DB5"', + '"0x8D81019E7CF4A53"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'b7b48a9d-901e-005a-3b47-68607d000000', + 'c1308e79-201e-003e-5202-42dadf000000', 'x-ms-client-request-id', - '1005a1f9-2318-4581-b2b3-a1c0aebe37bf', + '1e94ebb8-3364-44c0-be60-5f952f245919', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:52.2273875Z', 'Date', - 'Wed, 11 Sep 2019 02:18:15 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816829609908705/blob156816829651606372') + .put('/container159210827219305138/blob159210827220900386') .query(true) - .reply(200, "", [ 'Content-Length', + .reply(200, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:17 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'ETag', - '"0x8D7365E4EC914D0"', + '"0x8D81019E7D194B1"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '4f33cbfb-601e-0044-4347-68ba90000000', + 'c1308e7f-201e-003e-5802-42dadf000000', 'x-ms-client-request-id', - '53eefa43-e015-4522-ac64-2ec626888c36', + '5e3cc9b5-b5ed-463c-8d4d-1dd16b352aca', 'x-ms-version', - '2019-02-02', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:52.2433985Z', 'x-ms-request-server-encrypted', 'true', 'Date', - 'Wed, 11 Sep 2019 02:18:17 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container156816829609908705/blob156816829651606372') - .reply(200, "", [ 'Content-Length', + .head('/container159210827219305138/blob159210827220900386') + .reply(200, "", [ + 'Content-Length', '11', 'Content-Type', 'application/octet-stream', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:17 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7365E4EC914D0"', + '"0x8D81019E7D194B1"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'cb5f6644-401e-001c-3d47-68beeb000000', + 'c1308e87-201e-003e-6002-42dadf000000', 'x-ms-client-request-id', - 'da208d2d-2f50-4918-b1a8-46d77818bd87', + '4bacd54b-9d6f-4805-b327-9f7c3c20dcb9', 'x-ms-version', - '2019-02-02', - 'x-ms-tag-count', - '0', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:52.2433985Z', + 'x-ms-is-current-version', + 'true', 'x-ms-meta-a', 'a', 'x-ms-meta-b', 'b', 'x-ms-creation-time', - 'Wed, 11 Sep 2019 02:18:16 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -111,30 +123,27 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-server-encrypted', 'true', 'x-ms-access-tier', - 'Cool', + 'Hot', 'x-ms-access-tier-inferred', 'true', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-tag-count,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', - 'Wed, 11 Sep 2019 02:18:16 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156816829609908705') + .delete('/container159210827219305138') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'c3c7bc71-c01e-0042-0947-684de8000000', + 'c1308e89-201e-003e-6202-42dadf000000', 'x-ms-client-request-id', - 'b50d9a25-6a13-489a-adac-6a4f10f23d91', + '2d958419-7fa7-481a-a1a2-41978dab1fff', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:18:17 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/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 index d293017c6c6d..057d4daadec6 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient/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,67 +1,74 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container156816832928309354","blob":"blob156816832970700736"} +module.exports.hash = "5d0bad7d72943fb11c2280279a48f2a1"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827391907624","blob":"blob159210827393406968"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816832928309354') + .put('/container159210827391907624') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:49 GMT', + 'Sun, 14 Jun 2020 04:17:53 GMT', 'ETag', - '"0x8D7365E621139EF"', + '"0x8D81019E8D2E98B"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'e437ea25-401e-003e-5d47-68d0dd000000', + 'c13090af-201e-003e-5902-42dadf000000', 'x-ms-client-request-id', - 'd5e49a75-a331-45fa-8cdc-36555cd80773', + '03f3bbff-1664-4e40-a8b9-fea82e0e1472', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:18:49 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:52 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816832928309354/blob156816832970700736', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827391907624/blob159210827393406968', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:50 GMT', + 'Sun, 14 Jun 2020 04:17:53 GMT', 'ETag', - '"0x8D7365E6251DBFD"', + '"0x8D81019E8D59F12"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'e437eaaf-401e-003e-6247-68d0dd000000', + 'c13090b7-201e-003e-6002-42dadf000000', 'x-ms-client-request-id', - 'd79a4b37-01a3-427a-87b4-c18379241f35', + 'cce95323-86e9-42cc-8246-e213327fe05e', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:53.9466002Z', 'Date', - 'Wed, 11 Sep 2019 02:18:49 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:52 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156816832928309354') + .delete('/container159210827391907624') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'b94347ca-001e-0039-7947-682658000000', + 'c13090bc-201e-003e-6502-42dadf000000', 'x-ms-client-request-id', - '6f9f40e7-2b9a-49a9-8d6c-1823ab4eb7a0', + 'c42aef75-bbe9-4364-90e6-e436f58f0c67', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:18:50 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/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 index 7521963d6601..274ae8e60763 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient/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,67 +1,74 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container156816832802407388","blob":"blob156816832843900912"} +module.exports.hash = "5e177bd97b8fc3df77d804be9b218010"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827387809654","blob":"blob159210827389201581"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816832802407388') + .put('/container159210827387809654') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:48 GMT', + 'Sun, 14 Jun 2020 04:17:53 GMT', 'ETag', - '"0x8D7365E615008E1"', + '"0x8D81019E8CC0A73"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'd6ec7481-601e-0029-0e47-6810be000000', + 'c130908d-201e-003e-3a02-42dadf000000', 'x-ms-client-request-id', - 'ed44283b-37d9-4e48-86fc-b20d7f14b8aa', + 'cc65c7e7-6426-434d-99e0-5d4245d24f15', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:18:47 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:52 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816832802407388/blob156816832843900912', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827387809654/blob159210827389201581', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:18:48 GMT', + 'Sun, 14 Jun 2020 04:17:53 GMT', 'ETag', - '"0x8D7365E619064E4"', + '"0x8D81019E8CE98E9"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '96e20e8b-201e-0061-6647-682223000000', + 'c1309097-201e-003e-4302-42dadf000000', 'x-ms-client-request-id', - '5ac7d80d-2cb0-4c47-b00a-0234a5660cd1', + '0adb0319-45f6-4e4d-8f6b-5da437940392', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:53.9005673Z', 'Date', - 'Wed, 11 Sep 2019 02:18:48 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:52 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156816832802407388') + .delete('/container159210827387809654') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '9bf81066-501e-0047-2547-68b997000000', + 'c13090a4-201e-003e-5002-42dadf000000', 'x-ms-client-request-id', - '8ba7bc5a-5c3f-49f6-8286-e78be6bbb274', + '55309e3d-6328-4a5e-a4ef-9059eb7d7071', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:18:48 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:52 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/recording_undelete.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_undelete.js index dd517efdb035..1dd7ab05e010 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient/recording_undelete.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_undelete.js @@ -1,62 +1,64 @@ let nock = require('nock'); -module.exports.hash = "4b2d62f655814eebf5c7065e3e0abe19"; +module.exports.hash = "22aa270c807fed270cf40da4204adab6"; -module.exports.testInfo = {"uniqueName":{"container":"container158501877471701789","blob":"blob158501877599206974"},"newDate":{}} +module.exports.testInfo = {"uniqueName":{"container":"container159210827283501141","blob":"blob159210827283703139"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158501877471701789') + .put('/container159210827283501141') .query(true) .reply(201, "", [ - 'Transfer-Encoding', - 'chunked', + 'Content-Length', + '0', 'Last-Modified', - 'Tue, 24 Mar 2020 02:59:35 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'ETag', - '"0x8D7CF9F62B3E84F"', + '"0x8D81019E82D157B"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '700eb905-b01e-0020-0588-01a5c1000000', + 'c1308f41-201e-003e-0e02-42dadf000000', 'x-ms-client-request-id', - 'b214e4df-c810-4499-9125-9747306b8258', + 'b6dcca5d-e71f-4082-97ea-62600d64fc29', 'x-ms-version', '2019-12-12', 'Date', - 'Tue, 24 Mar 2020 02:59:35 GMT' + 'Sun, 14 Jun 2020 04:17:51 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158501877471701789/blob158501877599206974', "Hello World") + .put('/container159210827283501141/blob159210827283703139', "Hello World") .reply(201, "", [ - 'Transfer-Encoding', - 'chunked', + 'Content-Length', + '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Tue, 24 Mar 2020 02:59:36 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'ETag', - '"0x8D7CF9F62D9DF53"', + '"0x8D81019E82FCB3E"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '700eb921-b01e-0020-1188-01a5c1000000', + 'c1308f46-201e-003e-1102-42dadf000000', 'x-ms-client-request-id', - '6bf10953-d471-4765-8698-2f8a72220d82', + '186f7e20-9a3f-4721-a629-cccc7c250950', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:52.8598334Z', 'Date', - 'Tue, 24 Mar 2020 02:59:36 GMT' + 'Sun, 14 Jun 2020 04:17:51 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) .get('/') .query(true) - .reply(200, "1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalsePATCH,PUT,OPTIONS,POST,MERGE,HEAD,GET,DELETE***86400true7falsefalse", [ + .reply(200, "1.0falsefalsefalsefalse1.0falsefalse1.0falsefalsefalsefalse2018-03-28", [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -64,42 +66,76 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '700eb92e-b01e-0020-1888-01a5c1000000', + 'c1308f4a-201e-003e-1402-42dadf000000', 'x-ms-client-request-id', - '5d24c616-5071-4003-917c-3077e1e7dbb5', + '79817cbd-e026-4820-946a-dd875da1b907', 'x-ms-version', '2019-12-12', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,Content-Length,Date,Transfer-Encoding', - 'Access-Control-Allow-Origin', - '*', 'Date', - 'Tue, 24 Mar 2020 02:59:36 GMT' + 'Sun, 14 Jun 2020 04:17:51 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container158501877471701789/blob158501877599206974') + .put('/', "true7") + .query(true) .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308f4d-201e-003e-1702-42dadf000000', + 'x-ms-client-request-id', + 'dcbf3ff8-3d93-4a34-9af7-c72878c505ec', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/') + .query(true) + .reply(200, "1.0falsefalsefalsefalse1.0falsefalse1.0falsefalsetrue7false2018-03-28", [ 'Transfer-Encoding', 'chunked', + 'Content-Type', + 'application/xml', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '700eb945-b01e-0020-2688-01a5c1000000', + 'c1308f56-201e-003e-1a02-42dadf000000', 'x-ms-client-request-id', - '8cb27e45-844c-475b-b607-97d315268c50', + '94987602-4d4e-4943-b9e8-e2960fdef3e5', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 04:17:51 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159210827283501141/blob159210827283703139') + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308f58-201e-003e-1c02-42dadf000000', + 'x-ms-client-request-id', + '49b9603d-e038-4ea1-bada-58105c2da8e3', 'x-ms-version', '2019-12-12', 'x-ms-delete-type-permanent', 'false', 'Date', - 'Tue, 24 Mar 2020 02:59:36 GMT' + 'Sun, 14 Jun 2020 04:17:51 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .get('/container158501877471701789') + .get('/container159210827283501141') .query(true) - .reply(200, "1blob158501877599206974trueTue, 24 Mar 2020 02:59:36 GMTTue, 24 Mar 2020 02:59:36 GMT0x8D7CF9F62D9DF5311application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottruetrueTue, 24 Mar 2020 02:59:36 GMT6", [ + .reply(200, "1blob1592108272837031392020-06-14T04:17:52.8598334ZSun, 14 Jun 2020 04:17:52 GMTSun, 14 Jun 2020 04:17:52 GMT0x8D81019E82FCB3E11application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottruetrue2!88!MDAwMDIyIWJsb2IxNTkyMTA4MjcyODM3MDMxMzkhMDAwMDI4ITk5OTktMTItMzFUMjM6NTk6NTkuOTk5OTk5OVoh", [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -107,41 +143,37 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '700eb95e-b01e-0020-3288-01a5c1000000', + 'c1308f5d-201e-003e-2002-42dadf000000', 'x-ms-client-request-id', - '30d3af48-4b56-47c8-9d5a-2c3229b30017', + '60e46583-bd02-47fd-9961-6dc7ed633206', 'x-ms-version', '2019-12-12', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,Content-Type,Content-Length,Date,Transfer-Encoding', - 'Access-Control-Allow-Origin', - '*', 'Date', - 'Tue, 24 Mar 2020 02:59:36 GMT' + 'Sun, 14 Jun 2020 04:17:51 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158501877471701789/blob158501877599206974') + .put('/container159210827283501141/blob159210827283703139') .query(true) .reply(200, "", [ - 'Transfer-Encoding', - 'chunked', + 'Content-Length', + '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '700eb976-b01e-0020-3f88-01a5c1000000', + 'c1308f5f-201e-003e-2202-42dadf000000', 'x-ms-client-request-id', - 'bd930e1b-6345-4c14-adff-152086897948', + '92fe5607-2425-4feb-8a70-7304b807db24', 'x-ms-version', '2019-12-12', 'Date', - 'Tue, 24 Mar 2020 02:59:37 GMT' + 'Sun, 14 Jun 2020 04:17:52 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .get('/container158501877471701789') + .get('/container159210827283501141') .query(true) - .reply(200, "blob158501877599206974Tue, 24 Mar 2020 02:59:36 GMTTue, 24 Mar 2020 02:59:36 GMT0x8D7CF9F62D9DF5311application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottrueunlockedavailabletrue", [ + .reply(200, "blob1592108272837031392020-06-14T04:17:52.8598334ZSun, 14 Jun 2020 04:17:52 GMTSun, 14 Jun 2020 04:17:52 GMT0x8D81019E82FCB3E11application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottruetrue", [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -149,33 +181,29 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '700eb98e-b01e-0020-4f88-01a5c1000000', + 'c1308f65-201e-003e-2802-42dadf000000', 'x-ms-client-request-id', - '56a91a00-9001-4d3d-9b8a-b27d4b76899f', + '2457fc1b-f748-47ed-9ce5-d7547667f23f', 'x-ms-version', '2019-12-12', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,Content-Type,Content-Length,Date,Transfer-Encoding', - 'Access-Control-Allow-Origin', - '*', 'Date', - 'Tue, 24 Mar 2020 02:59:37 GMT' + 'Sun, 14 Jun 2020 04:17:52 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container158501877471701789') + .delete('/container159210827283501141') .query(true) .reply(202, "", [ - 'Transfer-Encoding', - 'chunked', + 'Content-Length', + '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '700eb99d-b01e-0020-5988-01a5c1000000', + 'c1308f68-201e-003e-2b02-42dadf000000', 'x-ms-client-request-id', - 'b42f7831-4621-4161-aea7-63c7f45e0669', + '0150839c-6062-4178-98ca-ff2fa1bca745', 'x-ms-version', '2019-12-12', 'Date', - 'Tue, 24 Mar 2020 02:59:37 GMT' + 'Sun, 14 Jun 2020 04:17:52 GMT' ]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_abortcopyfromclient_should_failed_for_a_completed_copy_operation.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_abortcopyfromclient_should_failed_for_a_completed_copy_operation.js index f43a7ff39ed9..ce2e3fe82ad1 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_abortcopyfromclient_should_failed_for_a_completed_copy_operation.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_abortcopyfromclient_should_failed_for_a_completed_copy_operation.js @@ -1,93 +1,90 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container157169617904101186","blob":"blob157169617910108417","copiedblob":"copiedblob157169617919901519"} +module.exports.hash = "02708dbd052d57cfac5b777ed6401bfd"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827905305357","blob":"blob159210827906909042","copiedblob":"copiedblob159210827908404961"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container157169617904101186') + .put('/container159210827905305357') .query(true) .reply(201, "", [ 'Content-Length', '0', 'Last-Modified', - 'Mon, 21 Oct 2019 22:16:19 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'ETag', - '"0x8D756744C2C616F"', + '"0x8D81019EBE23EAB"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '5fa2ff85-901e-0078-1d5d-88f00c000000', + 'c13098f9-201e-003e-2c02-42dadf000000', 'x-ms-client-request-id', - 'adf6ef2c-09c5-48df-8a11-bfccd317450a', + '6b259cf2-7411-4c0f-84f2-772f2d198bf6', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Mon, 21 Oct 2019 22:16:18 GMT', - 'Connection', - 'close' + 'Sun, 14 Jun 2020 04:17:58 GMT' ]); - nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container157169617904101186/blob157169617910108417', "Hello World") + .put('/container159210827905305357/blob159210827906909042', "Hello World") .reply(201, "", [ 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Mon, 21 Oct 2019 22:16:19 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'ETag', - '"0x8D756744C35BAF4"', + '"0x8D81019EBE51A2B"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '9d5859ac-a01e-00ca-6e5d-880f7d000000', + 'c13098fe-201e-003e-3002-42dadf000000', 'x-ms-client-request-id', - '1fd2750a-cb8e-408a-a087-e355409f98c2', + 'c4010adb-a714-4e20-99ad-97c3019d8e0d', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:59.0812203Z', 'Date', - 'Mon, 21 Oct 2019 22:16:19 GMT', - 'Connection', - 'close' + 'Sun, 14 Jun 2020 04:17:58 GMT' ]); - nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container157169617904101186/copiedblob157169617919901519') + .put('/container159210827905305357/copiedblob159210827908404961') .reply(202, "", [ 'Content-Length', '0', 'Last-Modified', - 'Mon, 21 Oct 2019 22:16:19 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'ETag', - '"0x8D756744C457550"', + '"0x8D81019EBE87626"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '5961f6ae-901e-009c-3f5d-88fe92000000', + 'c130990a-201e-003e-3a02-42dadf000000', 'x-ms-client-request-id', - '06f6efb9-3088-48bd-b14c-a28f1ab92435', + '087b14eb-6a74-41b1-9507-81372d780e56', 'x-ms-version', - '2019-02-02', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:59.1032358Z', 'x-ms-copy-id', - '50eac9ee-257c-411f-87b4-b92cd4db1108', + 'e18debef-2925-4662-bc90-92b593156c29', 'x-ms-copy-status', 'success', 'Date', - 'Mon, 21 Oct 2019 22:16:18 GMT', - 'Connection', - 'close' + 'Sun, 14 Jun 2020 04:17:58 GMT' ]); - nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container157169617904101186/copiedblob157169617919901519') - .reply(400, "InvalidHeaderValueThe value for one of the HTTP headers is not in the correct format.\nRequestId:6a1e725f-401e-0009-675d-881627000000\nTime:2019-10-21T22:16:19.2552507Zx-ms-copy-source50eac9ee-257c-411f-87b4-b92cd4db1108", [ + .put('/container159210827905305357/copiedblob159210827908404961') + .reply(400, "InvalidHeaderValueThe value for one of the HTTP headers is not in the correct format.\nRequestId:c1309911-201e-003e-4102-42dadf000000\nTime:2020-06-14T04:17:59.1145309Zx-ms-copy-sourcee18debef-2925-4662-bc90-92b593156c29", [ 'Content-Length', '358', 'Content-Type', @@ -95,22 +92,19 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '6a1e725f-401e-0009-675d-881627000000', + 'c1309911-201e-003e-4102-42dadf000000', 'x-ms-client-request-id', - '36e3db35-50d4-4a5f-ad33-2f9f14dfa2c5', + '43ba3878-3869-4638-abf6-db48b8734187', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-error-code', 'InvalidHeaderValue', 'Date', - 'Mon, 21 Oct 2019 22:16:18 GMT', - 'Connection', - 'close' + 'Sun, 14 Jun 2020 04:17:58 GMT' ]); - nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container157169617904101186') + .delete('/container159210827905305357') .query(true) .reply(202, "", [ 'Content-Length', @@ -118,14 +112,11 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'd13b8301-d01e-00b2-1f5d-88ac85000000', + 'c1309915-201e-003e-4502-42dadf000000', 'x-ms-client-request-id', - '3bd68aad-6ad8-4ca9-839c-8070ac488b54', + '01bfa587-49e7-4438-8dfd-2668c9adc863', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Mon, 21 Oct 2019 22:16:19 GMT', - 'Connection', - 'close' + 'Sun, 14 Jun 2020 04:17:58 GMT' ]); - diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_can_be_created_with_a_connection_string.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_can_be_created_with_a_connection_string.js index 5c30fdd1cd04..b8e687132d78 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_can_be_created_with_a_connection_string.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_can_be_created_with_a_connection_string.js @@ -1,107 +1,119 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container156816864840109075","blob":"blob156816864882508701"} +module.exports.hash = "020dba36ceb1f9f86a6f9c36487580ad"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827964706686","blob":"blob159210827964700661"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816864840109075') + .put('/container159210827964706686') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:24:08 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'ETag', - '"0x8D7365F2046F31E"', + '"0x8D81019EC3C7D06"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'c7e12fc5-501e-002a-0347-6813b9000000', + 'c13099c6-201e-003e-6402-42dadf000000', 'x-ms-client-request-id', - 'd99b226e-b2e4-454b-a92d-2f44f9b94d2c', + 'b3a56ba5-cce0-405c-a018-9434c99df38d', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:24:07 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816864840109075/blob156816864882508701', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827964706686/blob159210827964700661', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:24:09 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'ETag', - '"0x8D7365F20876506"', + '"0x8D81019EC3F0A3B"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'dd4c8d6a-901e-0037-4047-68ca53000000', + 'c13099cd-201e-003e-6a02-42dadf000000', 'x-ms-client-request-id', - '40afd211-ad03-44c7-a86d-3f0f54d3cb5f', + '926eb463-b203-4ab8-9e37-127e4a400a2c', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:59.6716371Z', 'Date', - 'Wed, 11 Sep 2019 02:24:08 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816864840109075/blob156816864882508701') + .put('/container159210827964706686/blob159210827964700661') .query(true) - .reply(200, "", [ 'Content-Length', + .reply(200, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:24:09 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'ETag', - '"0x8D7365F20C8233A"', + '"0x8D81019EC415495"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'dd4c8e23-901e-0037-6347-68ca53000000', + 'c13099d3-201e-003e-7002-42dadf000000', 'x-ms-client-request-id', - 'cd4d501b-fa6a-452e-a32b-0ddbad8d2a86', + '98b67ab3-07aa-4494-a7af-5d0de89e4a58', 'x-ms-version', - '2019-02-02', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:59.6876472Z', 'x-ms-request-server-encrypted', 'true', 'Date', - 'Wed, 11 Sep 2019 02:24:09 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container156816864840109075/blob156816864882508701') - .reply(200, "", [ 'Content-Length', + .head('/container159210827964706686/blob159210827964700661') + .reply(200, "", [ + 'Content-Length', '11', 'Content-Type', 'application/octet-stream', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:24:09 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7365F20C8233A"', + '"0x8D81019EC415495"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '2053e2aa-901e-001e-0f47-68bc11000000', + 'c13099d8-201e-003e-7502-42dadf000000', 'x-ms-client-request-id', - '0dbd575c-404c-4bb1-9bca-cf713cf01b38', + '861ddf30-c730-485f-8740-8f0294886972', 'x-ms-version', - '2019-02-02', - 'x-ms-tag-count', - '0', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:59.6876472Z', + 'x-ms-is-current-version', + 'true', 'x-ms-meta-a', 'a', 'x-ms-meta-b', 'b', 'x-ms-creation-time', - 'Wed, 11 Sep 2019 02:24:09 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -111,30 +123,27 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-server-encrypted', 'true', 'x-ms-access-tier', - 'Cool', + 'Hot', 'x-ms-access-tier-inferred', 'true', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-tag-count,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', - 'Wed, 11 Sep 2019 02:24:09 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156816864840109075') + .delete('/container159210827964706686') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1da2ec9f-c01e-002f-0547-68e7c6000000', + 'c13099da-201e-003e-7702-42dadf000000', 'x-ms-client-request-id', - '02e3ed83-2b3d-46e0-8a6e-7fa15c873868', + '30b0884a-04f0-4eb8-b59d-b8bd16b18a12', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:24:09 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_can_be_created_with_a_connection_string_and_an_option_bag.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_can_be_created_with_a_connection_string_and_an_option_bag.js index 5eabae467a87..5005bac6934c 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_can_be_created_with_a_connection_string_and_an_option_bag.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_can_be_created_with_a_connection_string_and_an_option_bag.js @@ -1,111 +1,119 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container157050172168909411","blob":"blob157050172186908642"} +module.exports.hash = "aae555af3b0b0dfe97bcac3e5c176441"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827971800850","blob":"blob159210827971905099"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container157050172168909411') + .put('/container159210827971800850') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Tue, 08 Oct 2019 02:28:41 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'ETag', - '"0x8D74B973C07D50E"', + '"0x8D81019EC47546F"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '2f929591-101e-0104-2e80-7d83a1000000', + 'c13099dc-201e-003e-7902-42dadf000000', 'x-ms-client-request-id', - 'c95976a2-0a2a-4cd6-b279-48bc2500059b', + 'f490da8e-ee4c-4b7e-907f-1589ff28e65a', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Tue, 08 Oct 2019 02:28:41 GMT', - 'Connection', - 'close' ]); - + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container157050172168909411/blob157050172186908642', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827971800850/blob159210827971905099', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Tue, 08 Oct 2019 02:28:41 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'ETag', - '"0x8D74B973C22B007"', + '"0x8D81019EC49E19C"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '10cf2fe5-701e-0010-5c80-7d0690000000', + 'c13099df-201e-003e-7b02-42dadf000000', 'x-ms-client-request-id', - 'a179a9a1-3e31-40ac-b09b-3eacd41fafd2', + 'fba7b959-e998-4b1a-adb8-db3c6f35adab', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:59.7416860Z', 'Date', - 'Tue, 08 Oct 2019 02:28:41 GMT', - 'Connection', - 'close' ]); - + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container157050172168909411/blob157050172186908642') + .put('/container159210827971800850/blob159210827971905099') .query(true) - .reply(200, "", [ 'Content-Length', + .reply(200, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Tue, 08 Oct 2019 02:28:41 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'ETag', - '"0x8D74B973C3CCDF6"', + '"0x8D81019EC4C530D"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '197838a6-301e-0071-1a80-7d424f000000', + 'c13099e3-201e-003e-7f02-42dadf000000', 'x-ms-client-request-id', - '8809eb2b-ace0-47c2-800f-7e9871a261e0', + '7166ae58-6e78-4dc7-8687-bd6cd8a071ef', 'x-ms-version', - '2019-02-02', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:59.7586973Z', 'x-ms-request-server-encrypted', 'true', 'Date', - 'Tue, 08 Oct 2019 02:28:41 GMT', - 'Connection', - 'close' ]); - + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container157050172168909411/blob157050172186908642') - .reply(200, "", [ 'Content-Length', + .head('/container159210827971800850/blob159210827971905099') + .reply(200, "", [ + 'Content-Length', '11', 'Content-Type', 'application/octet-stream', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Tue, 08 Oct 2019 02:28:41 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D74B973C3CCDF6"', + '"0x8D81019EC4C530D"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'a94a47e6-d01e-0095-6480-7d5145000000', + 'c13099e6-201e-003e-0202-42dadf000000', 'x-ms-client-request-id', - '16dd05e8-629a-4e81-ade6-c343bbfa7b08', + '2538924b-d520-4cb1-9ff2-ece212f46511', 'x-ms-version', - '2019-02-02', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:59.7586973Z', + 'x-ms-is-current-version', + 'true', 'x-ms-meta-a', 'a', 'x-ms-meta-b', 'b', 'x-ms-creation-time', - 'Tue, 08 Oct 2019 02:28:41 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -115,34 +123,27 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-server-encrypted', 'true', 'x-ms-access-tier', - 'Cool', + 'Hot', 'x-ms-access-tier-inferred', 'true', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-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', - 'Tue, 08 Oct 2019 02:28:41 GMT', - 'Connection', - 'close' ]); - + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container157050172168909411') + .delete('/container159210827971800850') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'd12110cf-501e-00e2-6580-7dd404000000', + 'c13099eb-201e-003e-0702-42dadf000000', 'x-ms-client-request-id', - 'fee6a0e9-38f8-4064-b320-5bdae1a72656', + '366a6b6a-60a7-434c-949d-24aa12a17371', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Tue, 08 Oct 2019 02:28:41 GMT', - 'Connection', - 'close' ]); - + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_can_be_created_with_a_url_and_a_credential.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_can_be_created_with_a_url_and_a_credential.js index db50a3ec9626..08def3842219 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_can_be_created_with_a_url_and_a_credential.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_can_be_created_with_a_url_and_a_credential.js @@ -1,107 +1,119 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container156816864082401923","blob":"blob156816864123702961"} +module.exports.hash = "a5a807963ff19ab2348b1735ae952d7e"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827931906739","blob":"blob159210827933505102"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816864082401923') + .put('/container159210827931906739') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:24:01 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'ETag', - '"0x8D7365F1BC10F4C"', + '"0x8D81019EC0B03C6"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'ea8ef8bd-701e-003d-7947-68d3da000000', + 'c1309962-201e-003e-0c02-42dadf000000', 'x-ms-client-request-id', - '5dd13fcd-9eb3-4618-9028-49febefd5551', + '78eae58e-1b0d-46d7-aa9d-91e0ae7cc7f0', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:24:00 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816864082401923/blob156816864123702961', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827931906739/blob159210827933505102', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:24:01 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'ETag', - '"0x8D7365F1C018118"', + '"0x8D81019EC0DB820"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '8feb9170-b01e-0009-7347-687c72000000', + 'c1309969-201e-003e-1102-42dadf000000', 'x-ms-client-request-id', - '4cff07ad-a6a8-4264-8aee-301189884d0d', + '836c4082-a439-4741-b9c0-f53aa8179b37', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:59.3474080Z', 'Date', - 'Wed, 11 Sep 2019 02:24:00 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816864082401923/blob156816864123702961') + .put('/container159210827931906739/blob159210827933505102') .query(true) - .reply(200, "", [ 'Content-Length', + .reply(200, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:24:02 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'ETag', - '"0x8D7365F1C417BD2"', + '"0x8D81019EC10027E"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '02714e05-201e-0043-2e47-684c15000000', + 'c130996b-201e-003e-1302-42dadf000000', 'x-ms-client-request-id', - 'a779d7c6-c2f7-401c-8790-b30f380b1088', + 'd4b9da45-69c4-4d89-860d-0f285cc12e0b', 'x-ms-version', - '2019-02-02', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:59.3634190Z', 'x-ms-request-server-encrypted', 'true', 'Date', - 'Wed, 11 Sep 2019 02:24:01 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container156816864082401923/blob156816864123702961') - .reply(200, "", [ 'Content-Length', + .head('/container159210827931906739/blob159210827933505102') + .reply(200, "", [ + 'Content-Length', '11', 'Content-Type', 'application/octet-stream', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:24:02 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7365F1C417BD2"', + '"0x8D81019EC10027E"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '478eeea1-701e-0014-1247-68a598000000', + 'c1309970-201e-003e-1802-42dadf000000', 'x-ms-client-request-id', - 'b5541725-b022-48a0-a1ee-c1e16b95b81d', + '81fa7039-78f5-42dd-ad7e-ed74c5abe977', 'x-ms-version', - '2019-02-02', - 'x-ms-tag-count', - '0', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:59.3634190Z', + 'x-ms-is-current-version', + 'true', 'x-ms-meta-a', 'a', 'x-ms-meta-b', 'b', 'x-ms-creation-time', - 'Wed, 11 Sep 2019 02:24:01 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -111,30 +123,27 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-server-encrypted', 'true', 'x-ms-access-tier', - 'Cool', + 'Hot', 'x-ms-access-tier-inferred', 'true', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-tag-count,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', - 'Wed, 11 Sep 2019 02:24:02 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156816864082401923') + .delete('/container159210827931906739') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '8bb97dd4-601e-000b-3947-687e88000000', + 'c1309978-201e-003e-1e02-42dadf000000', 'x-ms-client-request-id', - 'd3b1b924-7932-4cd3-9f15-5ec1e5233f4e', + 'e631cdcf-cce3-43ea-8789-1d2790e01b02', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:24:02 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_can_be_created_with_a_url_and_a_credential_and_an_option_bag.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_can_be_created_with_a_url_and_a_credential_and_an_option_bag.js index 171f0d81ddc8..a5f297a50c38 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_can_be_created_with_a_url_and_a_credential_and_an_option_bag.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_can_be_created_with_a_url_and_a_credential_and_an_option_bag.js @@ -1,107 +1,119 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container156816864290504697","blob":"blob156816864332400557"} +module.exports.hash = "94df3de03faa3810d56de909053c9c48"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827938208474","blob":"blob159210827942900696"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816864290504697') + .put('/container159210827938208474') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:24:03 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'ETag', - '"0x8D7365F1CFF7B66"', + '"0x8D81019EC160246"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'b945330c-001e-0039-5a47-682658000000', + 'c130997e-201e-003e-2102-42dadf000000', 'x-ms-client-request-id', - 'd3c5656c-d7f4-4575-a796-1459a43baf0e', + 'e4990d52-f0f1-4848-b9c8-316b7783866e', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:24:02 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816864290504697/blob156816864332400557', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827938208474/blob159210827942900696', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:24:03 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'ETag', - '"0x8D7365F1D402E0A"', + '"0x8D81019EC1E0EC3"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'd2543d5d-501e-0003-6447-6865fb000000', + 'c130998b-201e-003e-2d02-42dadf000000', 'x-ms-client-request-id', - '54253557-3899-4ea3-a6f2-0398bc998a71', + 'bf223dd1-7fe0-40c7-abb5-c8ac1d7b50d2', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:59.4544835Z', 'Date', - 'Wed, 11 Sep 2019 02:24:03 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816864290504697/blob156816864332400557') + .put('/container159210827938208474/blob159210827942900696') .query(true) - .reply(200, "", [ 'Content-Length', + .reply(200, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:24:04 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'ETag', - '"0x8D7365F1D809E0C"', + '"0x8D81019EC208034"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'fd1fa62c-101e-000f-6c47-688b0a000000', + 'c130998d-201e-003e-2f02-42dadf000000', 'x-ms-client-request-id', - '6bb91c02-5b3d-4afb-b8e7-0bf43a97b912', + '137f0677-0e7c-452f-aed8-5f740b786ba7', 'x-ms-version', - '2019-02-02', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:59.4714948Z', 'x-ms-request-server-encrypted', 'true', 'Date', - 'Wed, 11 Sep 2019 02:24:03 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container156816864290504697/blob156816864332400557') - .reply(200, "", [ 'Content-Length', + .head('/container159210827938208474/blob159210827942900696') + .reply(200, "", [ + 'Content-Length', '11', 'Content-Type', 'application/octet-stream', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:24:04 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7365F1D809E0C"', + '"0x8D81019EC208034"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'd18159f4-801e-000a-2d47-687f75000000', + 'c1309994-201e-003e-3602-42dadf000000', 'x-ms-client-request-id', - '71df5f5d-c12c-4cff-afa6-d380d0e548dc', + 'a68596cd-6cec-4753-869e-977b79e3ac89', 'x-ms-version', - '2019-02-02', - 'x-ms-tag-count', - '0', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:59.4714948Z', + 'x-ms-is-current-version', + 'true', 'x-ms-meta-a', 'a', 'x-ms-meta-b', 'b', 'x-ms-creation-time', - 'Wed, 11 Sep 2019 02:24:03 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -111,30 +123,27 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-server-encrypted', 'true', 'x-ms-access-tier', - 'Cool', + 'Hot', 'x-ms-access-tier-inferred', 'true', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-tag-count,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', - 'Wed, 11 Sep 2019 02:24:03 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156816864290504697') + .delete('/container159210827938208474') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '47463782-301e-0013-2447-68531d000000', + 'c1309997-201e-003e-3902-42dadf000000', 'x-ms-client-request-id', - '8a6c2a7c-3dda-41f8-9d47-44e5dd47b809', + 'c468485a-ec13-4415-92c8-bd84e2c6e8fb', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:24:03 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_can_be_created_with_a_url_and_a_pipeline.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_can_be_created_with_a_url_and_a_pipeline.js index ed2786e8681f..394a5e123cab 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_can_be_created_with_a_url_and_a_pipeline.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_can_be_created_with_a_url_and_a_pipeline.js @@ -1,107 +1,119 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container156816864629300111","blob":"blob156816864671303246"} +module.exports.hash = "a680a6075cca47f70f385d98a84140ac"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827956900147","blob":"blob159210827958501842"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816864629300111') + .put('/container159210827956900147') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:24:06 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'ETag', - '"0x8D7365F1F04BE06"', + '"0x8D81019EC31576F"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'be45b714-201e-0007-0547-689079000000', + 'c13099b1-201e-003e-5202-42dadf000000', 'x-ms-client-request-id', - 'c06bdad8-115d-4adf-aad2-8ce99c04cff0', + 'd0c14317-594e-48fd-951d-a7fd770fcd6c', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:24:05 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816864629300111/blob156816864671303246', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827956900147/blob159210827958501842', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:24:07 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'ETag', - '"0x8D7365F1F450DE2"', + '"0x8D81019EC33E4A4"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '48498c14-201e-0048-0e47-685461000000', + 'c13099b5-201e-003e-5502-42dadf000000', 'x-ms-client-request-id', - '9f500d04-04a0-4026-9f14-d75370cb54fc', + '1bfef500-78fe-4816-a229-38a1663b2eff', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:59.5985851Z', 'Date', - 'Wed, 11 Sep 2019 02:24:06 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816864629300111/blob156816864671303246') + .put('/container159210827956900147/blob159210827958501842') .query(true) - .reply(200, "", [ 'Content-Length', + .reply(200, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:24:07 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'ETag', - '"0x8D7365F1F852FB5"', + '"0x8D81019EC365615"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '82b79cf6-d01e-005d-1b47-6896f8000000', + 'c13099ba-201e-003e-5a02-42dadf000000', 'x-ms-client-request-id', - 'd93bcb76-e231-4dcb-9928-13995a479d32', + '83513f89-2ab8-484b-b716-3d2e92dcf28e', 'x-ms-version', - '2019-02-02', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:59.6145957Z', 'x-ms-request-server-encrypted', 'true', 'Date', - 'Wed, 11 Sep 2019 02:24:07 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container156816864629300111/blob156816864671303246') - .reply(200, "", [ 'Content-Length', + .head('/container159210827956900147/blob159210827958501842') + .reply(200, "", [ + 'Content-Length', '11', 'Content-Type', 'application/octet-stream', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:24:07 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7365F1F852FB5"', + '"0x8D81019EC365615"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '7ae64053-801e-0067-2547-68d55b000000', + 'c13099bd-201e-003e-5d02-42dadf000000', 'x-ms-client-request-id', - '82398e61-6dd7-4896-b59a-ebefe6d3e7a2', + '491e01be-7762-4b97-85c7-24f441427c27', 'x-ms-version', - '2019-02-02', - 'x-ms-tag-count', - '0', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:59.6145957Z', + 'x-ms-is-current-version', + 'true', 'x-ms-meta-a', 'a', 'x-ms-meta-b', 'b', 'x-ms-creation-time', - 'Wed, 11 Sep 2019 02:24:07 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -111,30 +123,27 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-server-encrypted', 'true', 'x-ms-access-tier', - 'Cool', + 'Hot', 'x-ms-access-tier-inferred', 'true', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-tag-count,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', - 'Wed, 11 Sep 2019 02:24:07 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156816864629300111') + .delete('/container159210827956900147') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '52e926bc-801e-0028-0947-681143000000', + 'c13099be-201e-003e-5e02-42dadf000000', 'x-ms-client-request-id', - '59f4300a-4ced-431d-ab76-1ffa055f00f0', + 'ac0a1208-22e3-4fe1-b8a5-47318c457430', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:24:07 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_can_be_created_with_a_url_and_a_tokencredential.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_can_be_created_with_a_url_and_a_tokencredential.js index 3c409a8f69ad..a5b1b02735fe 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_can_be_created_with_a_url_and_a_tokencredential.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_can_be_created_with_a_url_and_a_tokencredential.js @@ -1,67 +1,74 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container156816864500506778","blob":"blob156816864542001630"} +module.exports.hash = "752a2bc36df331367a6d1a94f6217b03"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827949108022","blob":"blob159210827953801557"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816864500506778') + .put('/container159210827949108022') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:24:05 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'ETag', - '"0x8D7365F1E3FAFA1"', + '"0x8D81019EC26A71D"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'f40c030e-a01e-001d-1947-68bf16000000', + 'c130999d-201e-003e-3f02-42dadf000000', 'x-ms-client-request-id', - 'ae15e83d-96b6-4c8c-8200-d6b040ffdb79', + 'cb37a1af-ed0d-47c2-853e-60290c6ff526', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:24:04 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816864500506778/blob156816864542001630', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827949108022/blob159210827953801557', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:24:05 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'ETag', - '"0x8D7365F1E7F5048"', + '"0x8D81019EC2CDE7F"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '155c0402-c01e-0006-5447-689184000000', + 'c13099a8-201e-003e-4902-42dadf000000', 'x-ms-client-request-id', - '27c524ce-5d01-44fb-9756-a6792b50c957', + '4411b121-edd5-4f39-8f3c-a434ccf962e7', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:59.5525527Z', 'Date', - 'Wed, 11 Sep 2019 02:24:04 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156816864500506778') + .delete('/container159210827949108022') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'd9734122-501e-004c-6747-68a1e3000000', + 'c13099ab-201e-003e-4c02-42dadf000000', 'x-ms-client-request-id', - '736aadd6-9414-4ea4-a74c-6d0282acbc63', + '9c9d8672-6393-4871-bfb2-38928255d648', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:24:05 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_createsnapshot.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_createsnapshot.js index 4c547f4de501..5fa87291eda0 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_createsnapshot.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_createsnapshot.js @@ -1,160 +1,160 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container156816862310306704","blob":"blob156816862350701943"} +module.exports.hash = "b0abf68009e71f2b39e8e49256067f0f"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827844904617","blob":"blob159210827846502596"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816862310306704') + .put('/container159210827844904617') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:43 GMT', + 'Sun, 14 Jun 2020 04:17:58 GMT', 'ETag', - '"0x8D7365F112FD7F3"', + '"0x8D81019EB86A080"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '2053bf28-901e-001e-5b47-68bc11000000', + 'c1309857-201e-003e-1102-42dadf000000', 'x-ms-client-request-id', - 'a53e88b7-9d34-4d4b-a292-baebe36df16e', + '017235dc-6fa5-4911-9766-cdc061886a86', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:23:42 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:57 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816862310306704/blob156816862350701943', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827844904617/blob159210827846502596', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:43 GMT', + 'Sun, 14 Jun 2020 04:17:58 GMT', 'ETag', - '"0x8D7365F116DC111"', + '"0x8D81019EB897C21"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '2b55400c-b01e-002b-0f47-681244000000', + 'c130985b-201e-003e-1402-42dadf000000', 'x-ms-client-request-id', - '4a249f63-561b-4fb1-b09d-c657e3602c0e', + '6ac20f90-657e-4fff-a05e-fe8d207af407', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:58.4807969Z', 'Date', - 'Wed, 11 Sep 2019 02:23:43 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:57 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816862310306704/blob156816862350701943') + .put('/container159210827844904617/blob159210827846502596') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:43 GMT', + 'Sun, 14 Jun 2020 04:17:58 GMT', 'ETag', - '"0x8D7365F116DC111"', + '"0x8D81019EB897C21"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '87b06c8e-201e-006a-0347-683a57000000', + 'c130985e-201e-003e-1702-42dadf000000', 'x-ms-client-request-id', - '5b5379ff-f787-4c61-b2d6-aaeb75011c75', + 'c02645c6-8648-4021-861f-bca257cf1691', 'x-ms-version', - '2019-02-02', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:58.4988075Z', 'x-ms-snapshot', - '2019-09-11T02:23:44.2465933Z', + '2020-06-14T04:17:58.4978075Z', 'x-ms-request-server-encrypted', 'false', 'Date', - 'Wed, 11 Sep 2019 02:23:43 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:57 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container156816862310306704/blob156816862350701943') + .head('/container159210827844904617/blob159210827846502596') .query(true) - .reply(200, "", [ 'Content-Length', + .reply(200, "", [ + 'Content-Length', '11', 'Content-Type', 'application/octet-stream', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:43 GMT', + 'Sun, 14 Jun 2020 04:17:58 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7365F116DC111"', + '"0x8D81019EB897C21"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '478ed827-701e-0014-1447-68a598000000', + 'c1309867-201e-003e-1f02-42dadf000000', 'x-ms-client-request-id', - '21d6fa63-9312-49e2-bc7f-31ccacdcbef1', + 'fe6b960d-f13f-4a5c-a2a2-c2b363dbb9e7', 'x-ms-version', - '2019-02-02', - 'x-ms-snapshot', - '2019-09-11T02:23:44.2465933Z', - 'x-ms-tag-count', - '0', + '2019-12-12', 'x-ms-creation-time', - 'Wed, 11 Sep 2019 02:23:43 GMT', + 'Sun, 14 Jun 2020 04:17:58 GMT', 'x-ms-blob-type', 'BlockBlob', 'x-ms-server-encrypted', 'true', 'x-ms-access-tier', - 'Cool', + 'Hot', 'x-ms-access-tier-inferred', 'true', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-snapshot,x-ms-tag-count,Content-Type,Last-Modified,ETag,x-ms-creation-time,Content-MD5,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', - 'Wed, 11 Sep 2019 02:23:44 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:57 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .get('/container156816862310306704') + .get('/container159210827844904617') .query(true) - .reply(200, "blob1568168623507019432019-09-11T02:23:44.2465933ZWed, 11 Sep 2019 02:23:43 GMTWed, 11 Sep 2019 02:23:43 GMT0x8D7365F116DC11111application/octet-streamYeJLfssylmU=sQqNsWTgdUEFt6mb5y4/5Q==BlockBlobCooltruetrue0blob156816862350701943Wed, 11 Sep 2019 02:23:43 GMTWed, 11 Sep 2019 02:23:43 GMT0x8D7365F116DC11111application/octet-streamYeJLfssylmU=sQqNsWTgdUEFt6mb5y4/5Q==BlockBlobCooltrueunlockedavailabletrue0", [ 'Transfer-Encoding', + .reply(200, "blob1592108278465025962020-06-14T04:17:58.4978075ZSun, 14 Jun 2020 04:17:58 GMTSun, 14 Jun 2020 04:17:58 GMT0x8D81019EB897C2111application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottruetrueblob1592108278465025962020-06-14T04:17:58.4988075ZtrueSun, 14 Jun 2020 04:17:58 GMTSun, 14 Jun 2020 04:17:58 GMT0x8D81019EB897C2111application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottrueunlockedavailabletrue", [ + 'Transfer-Encoding', 'chunked', 'Content-Type', 'application/xml', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'be459711-201e-0007-5a47-689079000000', + 'c130986b-201e-003e-2302-42dadf000000', 'x-ms-client-request-id', - '3f87f37c-0e72-4291-a566-18a6e5be30cb', + 'ed1a2048-b810-4f16-90d2-cda128076609', 'x-ms-version', - '2019-02-02', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,Content-Type,Content-Length,Date,Transfer-Encoding', - 'Access-Control-Allow-Origin', - '*', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:23:44 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:57 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156816862310306704') + .delete('/container159210827844904617') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '7a3687b3-301e-003a-5247-68255f000000', + 'c1309871-201e-003e-2902-42dadf000000', 'x-ms-client-request-id', - '5173746d-5604-4e05-86d7-6df495092090', + '9ee859ad-c708-4504-b75a-8f259c725eb3', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:23:45 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:57 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_delete.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_delete.js index 26108af6a688..02fdb4af1aae 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_delete.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_delete.js @@ -1,85 +1,93 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container156816861813201107","blob":"blob156816861853901574"} +module.exports.hash = "91f74a3e5a338297caa088642160fcd3"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827824503824","blob":"blob159210827826209493"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816861813201107') + .put('/container159210827824503824') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:38 GMT', + 'Sun, 14 Jun 2020 04:17:58 GMT', 'ETag', - '"0x8D7365F0E39CD26"', + '"0x8D81019EB67C848"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'a22ca825-401e-0035-4847-68c8a9000000', + 'c130981d-201e-003e-5a02-42dadf000000', 'x-ms-client-request-id', - '0d57bf06-88c8-442d-9caa-9425279848c3', + '7503e609-a601-47c4-aa2c-f1c95470fa29', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:23:38 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:57 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816861813201107/blob156816861853901574', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827824503824/blob159210827826209493', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:38 GMT', + 'Sun, 14 Jun 2020 04:17:58 GMT', 'ETag', - '"0x8D7365F0E77C605"', + '"0x8D81019EB6A55C6"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '8eacb615-201e-002e-7847-68e63b000000', + 'c1309824-201e-003e-6002-42dadf000000', 'x-ms-client-request-id', - 'c76bf83a-a447-4be8-98e1-a92d8ee843e3', + '1b282706-12e9-46cb-9e12-80d32dffe275', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:58.2766534Z', 'Date', - 'Wed, 11 Sep 2019 02:23:38 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:57 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156816861813201107/blob156816861853901574') - .reply(202, "", [ 'Content-Length', + .delete('/container159210827824503824/blob159210827826209493') + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'd05ab458-801e-004e-1547-68a319000000', + 'c130982b-201e-003e-6702-42dadf000000', 'x-ms-client-request-id', - '09b054ad-3804-42fc-b5a2-7fa29a639cc0', + 'eb1b1d66-eafa-4cf8-b8d7-3d96a8f5b720', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-delete-type-permanent', 'false', 'Date', - 'Wed, 11 Sep 2019 02:23:38 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:57 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156816861813201107') + .delete('/container159210827824503824') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'fbed66e8-701e-001f-4c47-68bdec000000', + 'c130982f-201e-003e-6b02-42dadf000000', 'x-ms-client-request-id', - '2c89a431-a876-46da-9fbf-10da7c7c2de6', + 'e052c346-7174-4a74-a7d7-736f353b41e4', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:23:39 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:57 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_delete_snapshot.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_delete_snapshot.js index 60702c3db496..cecbc1d5792c 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_delete_snapshot.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_delete_snapshot.js @@ -1,197 +1,199 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container156816861983205594","blob":"blob156816862023904544"} +module.exports.hash = "2b301541372f4fb5ca5e004a2f14a0d3"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827830903637","blob":"blob159210827832402334"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816861983205594') + .put('/container159210827830903637') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:40 GMT', + 'Sun, 14 Jun 2020 04:17:58 GMT', 'ETag', - '"0x8D7365F0F3D3F1D"', + '"0x8D81019EB720350"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '4923ebb2-901e-0015-3047-68a465000000', + 'c1309834-201e-003e-7002-42dadf000000', 'x-ms-client-request-id', - '5e3d0d2a-dcba-4577-95f6-d5c6fee65205', + 'b3fa6368-479b-4636-b36b-3a673e1524da', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:23:39 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:57 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816861983205594/blob156816862023904544', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827830903637/blob159210827832402334', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:40 GMT', + 'Sun, 14 Jun 2020 04:17:58 GMT', 'ETag', - '"0x8D7365F0F7BD06E"', + '"0x8D81019EB74DEFD"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'eba18792-d01e-003b-0f47-6824a2000000', + 'c1309837-201e-003e-7202-42dadf000000', 'x-ms-client-request-id', - 'e8e020bb-c11e-4dcb-bd2f-f0f022d1b9bf', + '15e5f354-6c2a-4c29-8e7e-57ab8abf0337', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:58.3467024Z', 'Date', - 'Wed, 11 Sep 2019 02:23:40 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:57 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816861983205594/blob156816862023904544') + .put('/container159210827830903637/blob159210827832402334') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:40 GMT', + 'Sun, 14 Jun 2020 04:17:58 GMT', 'ETag', - '"0x8D7365F0F7BD06E"', + '"0x8D81019EB74DEFD"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '25d7cc85-101e-002d-2b47-68e53c000000', + 'c130983d-201e-003e-7802-42dadf000000', 'x-ms-client-request-id', - '94d0cfb0-cf60-4007-8f3c-561e23fb3758', + '052b68d7-5bae-4e8f-8045-7456eaaa4121', 'x-ms-version', - '2019-02-02', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:58.3657137Z', 'x-ms-snapshot', - '2019-09-11T02:23:40.9842929Z', + '2020-06-14T04:17:58.3647137Z', 'x-ms-request-server-encrypted', 'false', 'Date', - 'Wed, 11 Sep 2019 02:23:40 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:57 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container156816861983205594/blob156816862023904544') + .head('/container159210827830903637/blob159210827832402334') .query(true) - .reply(200, "", [ 'Content-Length', + .reply(200, "", [ + 'Content-Length', '11', 'Content-Type', 'application/octet-stream', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:40 GMT', + 'Sun, 14 Jun 2020 04:17:58 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7365F0F7BD06E"', + '"0x8D81019EB74DEFD"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '679895a0-b01e-0064-5247-68d65c000000', + 'c130983f-201e-003e-7a02-42dadf000000', 'x-ms-client-request-id', - '2d1d850f-5f14-4c39-ab0b-c17799f1449f', + '12d5c3e8-ae61-474b-b8d2-f18baaa160ef', 'x-ms-version', - '2019-02-02', - 'x-ms-snapshot', - '2019-09-11T02:23:40.9842929Z', - 'x-ms-tag-count', - '0', + '2019-12-12', 'x-ms-creation-time', - 'Wed, 11 Sep 2019 02:23:40 GMT', + 'Sun, 14 Jun 2020 04:17:58 GMT', 'x-ms-blob-type', 'BlockBlob', 'x-ms-server-encrypted', 'true', 'x-ms-access-tier', - 'Cool', + 'Hot', 'x-ms-access-tier-inferred', 'true', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-snapshot,x-ms-tag-count,Content-Type,Last-Modified,ETag,x-ms-creation-time,Content-MD5,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', - 'Wed, 11 Sep 2019 02:23:40 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:57 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156816861983205594/blob156816862023904544') + .delete('/container159210827830903637/blob159210827832402334') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '474613c6-301e-0013-4447-68531d000000', + 'c1309840-201e-003e-7b02-42dadf000000', 'x-ms-client-request-id', - '574e397e-50fa-4374-b7be-6a99061eb338', + 'b86d98db-3f5c-4245-a65f-0cb23b9b10c2', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-delete-type-permanent', 'false', 'Date', - 'Wed, 11 Sep 2019 02:23:40 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:57 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156816861983205594/blob156816862023904544') - .reply(202, "", [ 'Content-Length', + .delete('/container159210827830903637/blob159210827832402334') + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '86b74444-c01e-0049-4447-68559c000000', + 'c1309844-201e-003e-7e02-42dadf000000', 'x-ms-client-request-id', - 'ca650bb0-e2ff-4c14-94a3-c67de902bcb9', + 'd6d315b0-ddcb-44f3-911a-15eb84660e5c', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-delete-type-permanent', 'false', 'Date', - 'Wed, 11 Sep 2019 02:23:41 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:57 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .get('/container156816861983205594') + .get('/container159210827830903637') .query(true) - .reply(200, "", [ 'Transfer-Encoding', + .reply(200, "", [ + 'Transfer-Encoding', 'chunked', 'Content-Type', 'application/xml', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'ad4b9747-801e-006c-2747-68cd2f000000', + 'c130984b-201e-003e-0502-42dadf000000', 'x-ms-client-request-id', - '56380bbb-92c2-40ba-9787-6f9eddb4dba9', + '6d22e777-3d63-4f4a-9b7f-93c944fc56cf', 'x-ms-version', - '2019-02-02', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,Content-Type,Content-Length,Date,Transfer-Encoding', - 'Access-Control-Allow-Origin', - '*', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:23:41 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:57 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156816861983205594') + .delete('/container159210827830903637') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'c62a2e25-001e-005f-1047-689402000000', + 'c130984e-201e-003e-0802-42dadf000000', 'x-ms-client-request-id', - 'bf44029e-94a6-4e1a-a61b-eac6cb5834ba', + 'a0d90f3c-7ce3-4bbc-b3dd-20959c409ad2', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:23:42 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:57 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_download_all_parameters_set.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_download_all_parameters_set.js index ce0d55fa181f..b481702b019a 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_download_all_parameters_set.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_download_all_parameters_set.js @@ -1,57 +1,64 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container156816860754908051","blob":"blob156816860795706437"} +module.exports.hash = "651b32d87b36e03ada801c00994f9de9"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827774406457","blob":"blob159210827775905754"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816860754908051') + .put('/container159210827774406457') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:27 GMT', + 'Sun, 14 Jun 2020 04:17:57 GMT', 'ETag', - '"0x8D7365F07EB4681"', + '"0x8D81019EB1C3293"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '478ec3fa-701e-0014-4547-68a598000000', + 'c1309743-201e-003e-0e02-42dadf000000', 'x-ms-client-request-id', - '522aed36-154a-4b57-84d6-803bf4336067', + '6ffbdbc1-bed7-4571-a428-067613f5341d', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:23:27 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:56 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816860754908051/blob156816860795706437', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827774406457/blob159210827775905754', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:28 GMT', + 'Sun, 14 Jun 2020 04:17:57 GMT', 'ETag', - '"0x8D7365F08292BF9"', + '"0x8D81019EB1F3572"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'b36dcf2d-801e-0023-3747-680937000000', + 'c130974b-201e-003e-1502-42dadf000000', 'x-ms-client-request-id', - '8cefc034-d378-44d5-aba0-af3ce4059aca', + 'ef1ae411-cc95-4388-b79a-dc596350e285', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:57.7843058Z', 'Date', - 'Wed, 11 Sep 2019 02:23:27 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:56 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .get('/container156816860754908051/blob156816860795706437') - .reply(206, "H", [ 'Content-Length', + .get('/container159210827774406457/blob159210827775905754') + .reply(206, "H", [ + 'Content-Length', '1', 'Content-Type', 'application/octet-stream', @@ -60,23 +67,25 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Content-Range', 'bytes 0-0/11', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:28 GMT', + 'Sun, 14 Jun 2020 04:17:57 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7365F08292BF9"', + '"0x8D81019EB1F3572"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'a22c9e82-401e-0035-3147-68c8a9000000', + 'c1309759-201e-003e-2302-42dadf000000', 'x-ms-client-request-id', - '3340bf75-2d37-4844-9e6a-55a43f7b069e', + '1a889a7b-f482-413f-9b01-eace07ee831b', 'x-ms-version', - '2019-02-02', - 'x-ms-tag-count', - '0', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:57.7843058Z', + 'x-ms-is-current-version', + 'true', 'x-ms-creation-time', - 'Wed, 11 Sep 2019 02:23:28 GMT', + 'Sun, 14 Jun 2020 04:17:57 GMT', 'x-ms-blob-content-md5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'x-ms-lease-status', @@ -87,27 +96,24 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'BlockBlob', 'x-ms-server-encrypted', 'true', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-tag-count,Content-Type,Last-Modified,ETag,x-ms-creation-time,x-ms-blob-content-md5,x-ms-lease-status,x-ms-lease-state,x-ms-blob-type,x-ms-server-encrypted,Accept-Ranges,Content-Length,Date,Transfer-Encoding', - 'Access-Control-Allow-Origin', - '*', 'Date', - 'Wed, 11 Sep 2019 02:23:28 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:56 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156816860754908051') + .delete('/container159210827774406457') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'a22c9ee0-401e-0035-7e47-68c8a9000000', + 'c130975e-201e-003e-2802-42dadf000000', 'x-ms-client-request-id', - 'aee7f478-78bc-4c32-a708-555116f7ec01', + '8449edfd-cdae-45ca-ad9a-77bce4abb05b', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:23:29 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:56 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_download_with_with_default_parameters.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_download_with_with_default_parameters.js index 7544a62a32c1..1f367bb34f2c 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_download_with_with_default_parameters.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_download_with_with_default_parameters.js @@ -1,80 +1,89 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container156816860589908987","blob":"blob156816860630803840"} +module.exports.hash = "11a3908521116429253a64da4d5e6b7d"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827735706655","blob":"blob159210827761908793"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816860589908987') + .put('/container159210827735706655') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:26 GMT', + 'Sun, 14 Jun 2020 04:17:57 GMT', 'ETag', - '"0x8D7365F06EF1D62"', + '"0x8D81019EADF93BB"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'd53b1c00-001e-0032-6c47-683e2c000000', + 'c130969c-201e-003e-6b02-42dadf000000', 'x-ms-client-request-id', - '243064dc-7806-41cf-affc-14438810f3ea', + '7fe3d3a6-7ef2-47ca-86f7-bf12080cb228', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:23:25 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:56 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816860589908987/blob156816860630803840', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827735706655/blob159210827761908793', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:26 GMT', + 'Sun, 14 Jun 2020 04:17:57 GMT', 'ETag', - '"0x8D7365F072DFCD1"', + '"0x8D81019EB087507"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '0ec3f3a6-601e-004f-3147-68a2e4000000', + 'c130970d-201e-003e-5902-42dadf000000', 'x-ms-client-request-id', - '4337534f-68d8-4d60-a4bd-692a0347c7df', + 'dca0292a-099e-42b9-8e92-66fc1d831a05', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:57.6352007Z', 'Date', - 'Wed, 11 Sep 2019 02:23:26 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:56 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .get('/container156816860589908987/blob156816860630803840') - .reply(200, "Hello World", [ 'Content-Length', + .get('/container159210827735706655/blob159210827761908793') + .reply(200, "Hello World", [ + 'Content-Length', '11', 'Content-Type', 'application/octet-stream', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:26 GMT', + 'Sun, 14 Jun 2020 04:17:57 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7365F072DFCD1"', + '"0x8D81019EB087507"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'fd55bfac-801e-0045-3c47-68bb6d000000', + 'c1309713-201e-003e-5f02-42dadf000000', 'x-ms-client-request-id', - '6f78329b-c1ca-4a34-baba-4a2764733ea8', + '8b956a92-aaf6-4039-b2e1-48ed178d05a2', 'x-ms-version', - '2019-02-02', - 'x-ms-tag-count', - '0', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:57.6352007Z', + 'x-ms-is-current-version', + 'true', 'x-ms-creation-time', - 'Wed, 11 Sep 2019 02:23:26 GMT', + 'Sun, 14 Jun 2020 04:17:57 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -83,27 +92,24 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'BlockBlob', 'x-ms-server-encrypted', 'true', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-tag-count,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,Accept-Ranges,Content-Length,Date,Transfer-Encoding', - 'Access-Control-Allow-Origin', - '*', 'Date', - 'Wed, 11 Sep 2019 02:23:26 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:56 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156816860589908987') + .delete('/container159210827735706655') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '40729d4a-d01e-0056-4747-688e8c000000', + 'c1309717-201e-003e-6302-42dadf000000', 'x-ms-client-request-id', - '256bf9f8-5e40-4517-a59c-577c9ed4a97b', + '19e4dcac-79c5-4659-b6ed-7f98a505c148', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:23:26 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:56 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_not_work_with_access_conditions_ifmodifiedsince.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_not_work_with_access_conditions_ifmodifiedsince.js index 9d20893531fa..f3b0b1015f0d 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_not_work_with_access_conditions_ifmodifiedsince.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_not_work_with_access_conditions_ifmodifiedsince.js @@ -1,66 +1,74 @@ let nock = require('nock'); -module.exports.hash = "d3a5406b3267717674c01d19eb9a0cd6"; +module.exports.hash = "c29ab049f3c90f17b01e8111d565d6f6"; -module.exports.testInfo = {"uniqueName":{"container":"container159049020600707788","blob":"blob159049020631105138"},"newDate":{}} +module.exports.testInfo = {"uniqueName":{"container":"container159210827987503646","blob":"blob159210827989101802"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container159049020600707788') + .put('/container159210827987503646') .query(true) - .reply(201, "", [ 'Transfer-Encoding', - 'chunked', + .reply(201, "", [ + 'Content-Length', + '0', 'Last-Modified', - 'Tue, 26 May 2020 10:50:06 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'ETag', - '"0x8D801628D44D052"', + '"0x8D81019EC6149CC"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc43fc-101e-000c-484b-3321fe000000', + 'c1309a2a-201e-003e-4202-42dadf000000', 'x-ms-client-request-id', - 'd44ec425-3d70-4b48-bbfd-500af3079a59', + '0abc2f58-a8c6-4b7b-8b06-be5f657444d1', 'x-ms-version', '2019-12-12', 'Date', - 'Tue, 26 May 2020 10:50:05 GMT' ]); + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container159049020600707788/blob159049020631105138', "Hello World") - .reply(201, "", [ 'Transfer-Encoding', - 'chunked', + .put('/container159210827987503646/blob159210827989101802', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Tue, 26 May 2020 10:50:06 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'ETag', - '"0x8D801628D735F65"', + '"0x8D81019EC64251A"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc43fe-101e-000c-494b-3321fe000000', + 'c1309a33-201e-003e-4a02-42dadf000000', 'x-ms-client-request-id', - 'c0445632-63ee-4873-85d8-3ec4ffd1c1af', + '8afa6eeb-a3d0-48b2-b68a-8016d6e7d09a', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:59.9138074Z', 'Date', - 'Tue, 26 May 2020 10:50:06 GMT' ]); + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container159049020600707788') + .delete('/container159210827987503646') .query(true) - .reply(202, "", [ 'Transfer-Encoding', - 'chunked', + .reply(202, "", [ + 'Content-Length', + '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc43ff-101e-000c-4a4b-3321fe000000', + 'c1309a36-201e-003e-4d02-42dadf000000', 'x-ms-client-request-id', - 'c5e790f4-af27-4916-b2cd-73923c270e28', + 'eb4f77b9-4d3d-4719-b4b1-9d662c6e6a30', 'x-ms-version', '2019-12-12', 'Date', - 'Tue, 26 May 2020 10:50:06 GMT' ]); + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_not_work_with_access_conditions_leaseid.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_not_work_with_access_conditions_leaseid.js index 0b06ff09f2ff..af831fb5f20e 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_not_work_with_access_conditions_leaseid.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_not_work_with_access_conditions_leaseid.js @@ -1,66 +1,74 @@ let nock = require('nock'); -module.exports.hash = "fdc46dc8a237d6cac45f8cfb615e46d8"; +module.exports.hash = "ff7d50dc3de36b014e9d2582c95ddf56"; -module.exports.testInfo = {"uniqueName":{"container":"container159049020712800511","blob":"blob159049020739900152"},"newDate":{}} +module.exports.testInfo = {"uniqueName":{"container":"container159210827992203656","blob":"blob159210827995306126"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container159049020712800511') + .put('/container159210827992203656') .query(true) - .reply(201, "", [ 'Transfer-Encoding', - 'chunked', + .reply(201, "", [ + 'Content-Length', + '0', 'Last-Modified', - 'Tue, 26 May 2020 10:50:07 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'ETag', - '"0x8D801628DEFAE67"', + '"0x8D81019EC687706"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc4400-101e-000c-4b4b-3321fe000000', + 'c1309a39-201e-003e-5002-42dadf000000', 'x-ms-client-request-id', - '1d191125-143c-44e9-88d9-f32d56e36f07', + 'a11fac75-e9e4-4496-b867-b394d96a2080', 'x-ms-version', '2019-12-12', 'Date', - 'Tue, 26 May 2020 10:50:06 GMT' ]); + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container159049020712800511/blob159049020739900152', "Hello World") - .reply(201, "", [ 'Transfer-Encoding', - 'chunked', + .put('/container159210827992203656/blob159210827995306126', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Tue, 26 May 2020 10:50:07 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'ETag', - '"0x8D801628E193334"', + '"0x8D81019EC6BEEAD"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc4403-101e-000c-4c4b-3321fe000000', + 'c1309a42-201e-003e-5802-42dadf000000', 'x-ms-client-request-id', - '80421d4f-2379-421e-93de-296fa2093306', + '2bda479f-1d7c-407e-89b7-970c6118582c', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:59.9648429Z', 'Date', - 'Tue, 26 May 2020 10:50:07 GMT' ]); + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container159049020712800511') + .delete('/container159210827992203656') .query(true) - .reply(202, "", [ 'Transfer-Encoding', - 'chunked', + .reply(202, "", [ + 'Content-Length', + '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc4404-101e-000c-4d4b-3321fe000000', + 'c1309a46-201e-003e-5c02-42dadf000000', 'x-ms-client-request-id', - '1a7d9c26-1258-45d6-b9dc-6a93fe8a06db', + '613d5629-51e5-432b-922e-532ca8f35398', 'x-ms-version', '2019-12-12', 'Date', - 'Tue, 26 May 2020 10:50:07 GMT' ]); + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work.js index a95c400c9aea..47027ceec267 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work.js @@ -1,66 +1,74 @@ let nock = require('nock'); -module.exports.hash = "b15cda823b3c55e24298837de650620e"; +module.exports.hash = "6aeaea3dc0f60f3ffbb5251da70cf248"; -module.exports.testInfo = {"uniqueName":{"container":"container159049020245804719","blob":"blob159049020444905391"},"newDate":{}} +module.exports.testInfo = {"uniqueName":{"container":"container159210827978205363","blob":"blob159210827979706474"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container159049020245804719') + .put('/container159210827978205363') .query(true) - .reply(201, "", [ 'Transfer-Encoding', - 'chunked', + .reply(201, "", [ + 'Content-Length', + '0', 'Last-Modified', - 'Tue, 26 May 2020 10:50:04 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'ETag', - '"0x8D801628C2B64CF"', + '"0x8D81019EC531663"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc43f1-101e-000c-424b-3321fe000000', + 'c13099f1-201e-003e-0d02-42dadf000000', 'x-ms-client-request-id', - '3e11d2ab-1a6f-4b8f-8c69-e072dcdf0dc8', + 'd82f93b7-ae98-4ea7-b4dc-96ab8f6cc1e4', 'x-ms-version', '2019-12-12', 'Date', - 'Tue, 26 May 2020 10:50:03 GMT' ]); + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container159049020245804719/blob159049020444905391', "Hello World") - .reply(201, "", [ 'Transfer-Encoding', - 'chunked', + .put('/container159210827978205363/blob159210827979706474', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Tue, 26 May 2020 10:50:04 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'ETag', - '"0x8D801628C58465E"', + '"0x8D81019EC55CAA7"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc43f4-101e-000c-434b-3321fe000000', + 'c13099f9-201e-003e-1402-42dadf000000', 'x-ms-client-request-id', - '463390ef-7745-4351-a496-80ee2e8534b9', + 'e5a0df36-6ef2-497d-bd91-5cfabf8f9f66', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:59.8197415Z', 'Date', - 'Tue, 26 May 2020 10:50:04 GMT' ]); + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container159049020245804719') + .delete('/container159210827978205363') .query(true) - .reply(202, "", [ 'Transfer-Encoding', - 'chunked', + .reply(202, "", [ + 'Content-Length', + '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc43f6-101e-000c-444b-3321fe000000', + 'c1309a02-201e-003e-1c02-42dadf000000', 'x-ms-client-request-id', - '6a16e255-713e-4358-a91b-514c044c7a56', + 'fa138a3a-fcf0-4708-ac9f-caba15f8e5fb', 'x-ms-version', '2019-12-12', 'Date', - 'Tue, 26 May 2020 10:50:04 GMT' ]); + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_aborter.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_aborter.js index 109a26357882..587c2f9c91de 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_aborter.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_aborter.js @@ -1,66 +1,74 @@ let nock = require('nock'); -module.exports.hash = "ae6e959f9b0a752f4a32b51177efba69"; +module.exports.hash = "a15c209ef562a2fc8fc02c560a49e705"; -module.exports.testInfo = {"uniqueName":{"container":"container159049021276301570","blob":"blob159049021303507117"},"newDate":{}} +module.exports.testInfo = {"uniqueName":{"container":"container159210828025306285","blob":"blob159210828025400574"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container159049021276301570') + .put('/container159210828025306285') .query(true) - .reply(201, "", [ 'Transfer-Encoding', - 'chunked', + .reply(201, "", [ + 'Content-Length', + '0', 'Last-Modified', - 'Tue, 26 May 2020 10:50:12 GMT', + 'Sun, 14 Jun 2020 04:18:00 GMT', 'ETag', - '"0x8D80162914B8427"', + '"0x8D81019EC98DEA9"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc4420-101e-000c-614b-3321fe000000', + 'c1309ac1-201e-003e-4c02-42dadf000000', 'x-ms-client-request-id', - 'b39c7bca-7bfd-4c76-b6ed-aec46794d5f1', + '7ed2799e-5c6b-4304-8d3c-f6a666f7db52', 'x-ms-version', '2019-12-12', 'Date', - 'Tue, 26 May 2020 10:50:11 GMT' ]); + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container159049021276301570/blob159049021303507117', "Hello World") - .reply(201, "", [ 'Transfer-Encoding', - 'chunked', + .put('/container159210828025306285/blob159210828025400574', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Tue, 26 May 2020 10:50:13 GMT', + 'Sun, 14 Jun 2020 04:18:00 GMT', 'ETag', - '"0x8D80162917555A9"', + '"0x8D81019EC9B6BB8"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc4422-101e-000c-624b-3321fe000000', + 'c1309ac9-201e-003e-5302-42dadf000000', 'x-ms-client-request-id', - '79def682-2bcd-4b40-abf8-9158cfecf0ae', + 'd14f7781-c1d2-4da9-b636-9216340e3b82', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:18:00.2770640Z', 'Date', - 'Tue, 26 May 2020 10:50:13 GMT' ]); + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container159049021276301570') + .delete('/container159210828025306285') .query(true) - .reply(202, "", [ 'Transfer-Encoding', - 'chunked', + .reply(202, "", [ + 'Content-Length', + '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc4423-101e-000c-634b-3321fe000000', + 'c1309ad0-201e-003e-5a02-42dadf000000', 'x-ms-client-request-id', - 'd97b06c9-2230-4cf6-a478-d719585cd306', + '517160fb-6b3d-48c2-9d7f-01a804ac1c72', 'x-ms-version', '2019-12-12', 'Date', - 'Tue, 26 May 2020 10:50:13 GMT' ]); + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_access_conditions.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_access_conditions.js index 10aa5cecce0c..f2cd40697438 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_access_conditions.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_access_conditions.js @@ -1,66 +1,74 @@ let nock = require('nock'); -module.exports.hash = "96fefb99c10994e85cd42d9cabfa032c"; +module.exports.hash = "088f9619785dd5dbabc153cfe3e50d2f"; -module.exports.testInfo = {"uniqueName":{"container":"container159049020501200734","blob":"blob159049020528500202"},"newDate":{}} +module.exports.testInfo = {"uniqueName":{"container":"container159210827982901028","blob":"blob159210827984404337"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container159049020501200734') + .put('/container159210827982901028') .query(true) - .reply(201, "", [ 'Transfer-Encoding', - 'chunked', + .reply(201, "", [ + 'Content-Length', + '0', 'Last-Modified', - 'Tue, 26 May 2020 10:50:05 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'ETag', - '"0x8D801628CACE171"', + '"0x8D81019EC5A43A1"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc43f7-101e-000c-454b-3321fe000000', + 'c1309a0b-201e-003e-2502-42dadf000000', 'x-ms-client-request-id', - '19fa1705-8ee5-4a18-8d95-7607f1c830f0', + '018b3eb0-89d3-4330-8750-e4e98bf92abc', 'x-ms-version', '2019-12-12', 'Date', - 'Tue, 26 May 2020 10:50:04 GMT' ]); + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container159049020501200734/blob159049020528500202', "Hello World") - .reply(201, "", [ 'Transfer-Encoding', - 'chunked', + .put('/container159210827982901028/blob159210827984404337', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Tue, 26 May 2020 10:50:05 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'ETag', - '"0x8D801628CD6B4F4"', + '"0x8D81019EC5CD0C3"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc43f9-101e-000c-464b-3321fe000000', + 'c1309a13-201e-003e-2c02-42dadf000000', 'x-ms-client-request-id', - '454eb1f6-660a-4559-838b-49dead83fff0', + '2cc70735-2541-42da-9c4c-7a01231c8471', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:59.8667742Z', 'Date', - 'Tue, 26 May 2020 10:50:05 GMT' ]); + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container159049020501200734') + .delete('/container159210827982901028') .query(true) - .reply(202, "", [ 'Transfer-Encoding', - 'chunked', + .reply(202, "", [ + 'Content-Length', + '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc43fa-101e-000c-474b-3321fe000000', + 'c1309a1f-201e-003e-3702-42dadf000000', 'x-ms-client-request-id', - '959877c7-f652-4648-a15b-a6430ce10b18', + 'e0f2bf8f-e57f-469e-bd79-f725d456a9fd', 'x-ms-version', '2019-12-12', 'Date', - 'Tue, 26 May 2020 10:50:05 GMT' ]); + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_blob_properties.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_blob_properties.js index 077822eab309..62c622e2050c 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_blob_properties.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_blob_properties.js @@ -1,66 +1,74 @@ let nock = require('nock'); -module.exports.hash = "8a0c2d5fbf6f1d5b0f8147a26e784795"; +module.exports.hash = "8ac5123044481e868581f044adfe15f5"; -module.exports.testInfo = {"uniqueName":{"container":"container159049021092104171","blob":"blob159049021119406322"},"newDate":{}} +module.exports.testInfo = {"uniqueName":{"container":"container159210828014702637","blob":"blob159210828016304914"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container159049021092104171') + .put('/container159210828014702637') .query(true) - .reply(201, "", [ 'Transfer-Encoding', - 'chunked', + .reply(201, "", [ + 'Content-Length', + '0', 'Last-Modified', - 'Tue, 26 May 2020 10:50:11 GMT', + 'Sun, 14 Jun 2020 04:18:00 GMT', 'ETag', - '"0x8D8016290328DE9"', + '"0x8D81019EC8A0EE7"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc4412-101e-000c-574b-3321fe000000', + 'c1309a90-201e-003e-2002-42dadf000000', 'x-ms-client-request-id', - '2db43313-3255-490a-a1dd-d9e32d7b23d6', + 'ed9970f1-43e7-44e3-bd7a-bf71df45a7f1', 'x-ms-version', '2019-12-12', 'Date', - 'Tue, 26 May 2020 10:50:10 GMT' ]); + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container159049021092104171/blob159049021119406322', "Hello World") - .reply(201, "", [ 'Transfer-Encoding', - 'chunked', + .put('/container159210828014702637/blob159210828016304914', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Tue, 26 May 2020 10:50:11 GMT', + 'Sun, 14 Jun 2020 04:18:00 GMT', 'ETag', - '"0x8D80162905C5FDD"', + '"0x8D81019EC8D3854"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc4415-101e-000c-584b-3321fe000000', + 'c1309a96-201e-003e-2402-42dadf000000', 'x-ms-client-request-id', - '7ef7505d-cd8e-4e86-a350-4775105f82b3', + 'e8d5650b-c013-4403-bc37-35c82d6db369', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:18:00.1829972Z', 'Date', - 'Tue, 26 May 2020 10:50:10 GMT' ]); + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container159049021092104171') + .delete('/container159210828014702637') .query(true) - .reply(202, "", [ 'Transfer-Encoding', - 'chunked', + .reply(202, "", [ + 'Content-Length', + '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc441a-101e-000c-5d4b-3321fe000000', + 'c1309aa0-201e-003e-2d02-42dadf000000', 'x-ms-client-request-id', - '2b9441d3-d5c6-4776-8aa6-d8fd8f52b1d4', + '479323a8-a899-4bfa-b2ef-11409abe2ae9', 'x-ms-version', '2019-12-12', 'Date', - 'Tue, 26 May 2020 10:50:10 GMT' ]); + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_csv_input_and_output_configurations.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_csv_input_and_output_configurations.js index 8b7c7de87605..4c4c0329aed6 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_csv_input_and_output_configurations.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_csv_input_and_output_configurations.js @@ -1,66 +1,74 @@ let nock = require('nock'); -module.exports.hash = "e040650f63a5e8c56babaa30c78ad498"; +module.exports.hash = "c1e5526d5c8ce2953153cbe1fac65891"; -module.exports.testInfo = {"uniqueName":{"container":"container159049021675907732","blob":"blob159049021703108035"},"newDate":{}} +module.exports.testInfo = {"uniqueName":{"container":"container159210828051903765","blob":"blob159210828053501523"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container159049021675907732') + .put('/container159210828051903765') .query(true) - .reply(201, "", [ 'Transfer-Encoding', - 'chunked', + .reply(201, "", [ + 'Content-Length', + '0', 'Last-Modified', - 'Tue, 26 May 2020 10:50:16 GMT', + 'Sun, 14 Jun 2020 04:18:00 GMT', 'ETag', - '"0x8D8016293AD3BE9"', + '"0x8D81019ECC30390"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc4432-101e-000c-6d4b-3321fe000000', + 'c1309b40-201e-003e-4102-42dadf000000', 'x-ms-client-request-id', - 'd4c5bfcf-fe11-4814-979b-a7935de0bf46', + 'cbc43c6b-724d-4ec0-840e-f29e08fca85d', 'x-ms-version', '2019-12-12', 'Date', - 'Tue, 26 May 2020 10:50:16 GMT' ]); + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container159049021675907732/blob159049021703108035', "Hello World") - .reply(201, "", [ 'Transfer-Encoding', - 'chunked', + .put('/container159210828051903765/blob159210828053501523', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Tue, 26 May 2020 10:50:17 GMT', + 'Sun, 14 Jun 2020 04:18:00 GMT', 'ETag', - '"0x8D8016293D70C51"', + '"0x8D81019ECC5B7A7"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc4434-101e-000c-6e4b-3321fe000000', + 'c1309b4a-201e-003e-4902-42dadf000000', 'x-ms-client-request-id', - 'dd58bf1e-8f3e-4ea4-a435-25ce1f415d63', + '285887f8-66ea-4d4f-9780-a822a5e0b2e5', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:18:00.5532583Z', 'Date', - 'Tue, 26 May 2020 10:50:16 GMT' ]); + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container159049021675907732') + .delete('/container159210828051903765') .query(true) - .reply(202, "", [ 'Transfer-Encoding', - 'chunked', + .reply(202, "", [ + 'Content-Length', + '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc4436-101e-000c-6f4b-3321fe000000', + 'c1309b5b-201e-003e-5802-42dadf000000', 'x-ms-client-request-id', - '5aa69791-9d06-47ed-b819-e866995b91af', + '61c60639-3814-491a-abd7-696578b66381', 'x-ms-version', '2019-12-12', 'Date', - 'Tue, 26 May 2020 10:50:17 GMT' ]); + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_empty_results.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_empty_results.js index 99a3d11e1e31..ecc3663bf7c1 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_empty_results.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_empty_results.js @@ -1,66 +1,74 @@ let nock = require('nock'); -module.exports.hash = "70b8f4226da6556dbebcefbdb4064498"; +module.exports.hash = "9b06cd9ef0b1905c71e56501996c1bb3"; -module.exports.testInfo = {"uniqueName":{"container":"container159049021000203886","blob":"blob159049021030405476"},"newDate":{}} +module.exports.testInfo = {"uniqueName":{"container":"container159210828010108761","blob":"blob159210828011600788"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container159049021000203886') + .put('/container159210828010108761') .query(true) - .reply(201, "", [ 'Transfer-Encoding', - 'chunked', + .reply(201, "", [ + 'Content-Length', + '0', 'Last-Modified', - 'Tue, 26 May 2020 10:50:10 GMT', + 'Sun, 14 Jun 2020 04:18:00 GMT', 'ETag', - '"0x8D801628FA660F9"', + '"0x8D81019EC82BA8E"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc440e-101e-000c-544b-3321fe000000', + 'c1309a7c-201e-003e-0e02-42dadf000000', 'x-ms-client-request-id', - 'b4fd15a8-a9d4-4c39-b4c9-470ff29d060d', + 'c3d24b89-9e96-44ef-abf1-4ca1e1e80818', 'x-ms-version', '2019-12-12', 'Date', - 'Tue, 26 May 2020 10:50:09 GMT' ]); + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container159049021000203886/blob159049021030405476', "Hello World") - .reply(201, "", [ 'Transfer-Encoding', - 'chunked', + .put('/container159210828010108761/blob159210828011600788', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Tue, 26 May 2020 10:50:10 GMT', + 'Sun, 14 Jun 2020 04:18:00 GMT', 'ETag', - '"0x8D801628FD4C7DF"', + '"0x8D81019EC8547A9"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc4410-101e-000c-554b-3321fe000000', + 'c1309a87-201e-003e-1702-42dadf000000', 'x-ms-client-request-id', - '32720e51-f5e8-4dbf-974f-7c7032388c1e', + '7f085823-070c-46dd-a74e-cd0d71ec7fd3', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:18:00.1309609Z', 'Date', - 'Tue, 26 May 2020 10:50:09 GMT' ]); + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container159049021000203886') + .delete('/container159210828010108761') .query(true) - .reply(202, "", [ 'Transfer-Encoding', - 'chunked', + .reply(202, "", [ + 'Content-Length', + '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc4411-101e-000c-564b-3321fe000000', + 'c1309a8d-201e-003e-1d02-42dadf000000', 'x-ms-client-request-id', - 'fb170e2c-ef6a-49ab-a830-a4a26aebbcc3', + '1970a7b2-ce89-488f-a989-f7607b64408e', 'x-ms-version', '2019-12-12', 'Date', - 'Tue, 26 May 2020 10:50:10 GMT' ]); + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_fatal_error_event.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_fatal_error_event.js index 58954bf45f69..a65add7b2ed5 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_fatal_error_event.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_fatal_error_event.js @@ -1,66 +1,74 @@ let nock = require('nock'); -module.exports.hash = "47d65e9ec5bdaa1fcb744c9fe2908c22"; +module.exports.hash = "ff936e30e31a1959674da1a4b9202f5e"; -module.exports.testInfo = {"uniqueName":{"container":"container159049021461101822","blob":"blob159049021491407229"},"newDate":{}} +module.exports.testInfo = {"uniqueName":{"container":"container159210828041005422","blob":"blob159210828042603825"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container159049021461101822') + .put('/container159210828041005422') .query(true) - .reply(201, "", [ 'Transfer-Encoding', - 'chunked', + .reply(201, "", [ + 'Content-Length', + '0', 'Last-Modified', - 'Tue, 26 May 2020 10:50:14 GMT', + 'Sun, 14 Jun 2020 04:18:00 GMT', 'ETag', - '"0x8D8016292658C0A"', + '"0x8D81019ECB2ACE7"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc4428-101e-000c-674b-3321fe000000', + 'c1309b04-201e-003e-0802-42dadf000000', 'x-ms-client-request-id', - '43c8cc19-c939-46c7-b515-bbe586e28c57', + '5749288e-7d29-4a52-b50e-da73d346436d', 'x-ms-version', '2019-12-12', 'Date', - 'Tue, 26 May 2020 10:50:14 GMT' ]); + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container159049021461101822/blob159049021491407229', "Hello World") - .reply(201, "", [ 'Transfer-Encoding', - 'chunked', + .put('/container159210828041005422/blob159210828042603825', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Tue, 26 May 2020 10:50:15 GMT', + 'Sun, 14 Jun 2020 04:18:00 GMT', 'ETag', - '"0x8D801629293F1B9"', + '"0x8D81019ECB56104"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc442b-101e-000c-684b-3321fe000000', + 'c1309b0f-201e-003e-1202-42dadf000000', 'x-ms-client-request-id', - 'ce2eec59-39e9-40dc-a801-f5c4b04c251f', + 'f73fa04f-4db5-4f24-8763-3197563276a8', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:18:00.4461828Z', 'Date', - 'Tue, 26 May 2020 10:50:14 GMT' ]); + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container159049021461101822') + .delete('/container159210828041005422') .query(true) - .reply(202, "", [ 'Transfer-Encoding', - 'chunked', + .reply(202, "", [ + 'Content-Length', + '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc442c-101e-000c-694b-3321fe000000', + 'c1309b15-201e-003e-1802-42dadf000000', 'x-ms-client-request-id', - 'c1aee181-8417-46dc-9d91-c1bd009ef136', + '5e530ac9-4ec8-49ba-aaa5-5845a57a7470', 'x-ms-version', '2019-12-12', 'Date', - 'Tue, 26 May 2020 10:50:15 GMT' ]); + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_json_input_and_output_configurations.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_json_input_and_output_configurations.js index 6afecc7316b2..d7c5215cd5b5 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_json_input_and_output_configurations.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_json_input_and_output_configurations.js @@ -1,66 +1,74 @@ let nock = require('nock'); -module.exports.hash = "da303cb0dbbe576967bf0bcc9e842496"; +module.exports.hash = "202bab48bbe0ff350d44978250512663"; -module.exports.testInfo = {"uniqueName":{"container":"container159049021779702431","blob":"blob159049021829309285"},"newDate":{}} +module.exports.testInfo = {"uniqueName":{"container":"container159210828056608669","blob":"blob159210828058208020"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container159049021779702431') + .put('/container159210828056608669') .query(true) - .reply(201, "", [ 'Transfer-Encoding', - 'chunked', + .reply(201, "", [ + 'Content-Length', + '0', 'Last-Modified', - 'Tue, 26 May 2020 10:50:17 GMT', + 'Sun, 14 Jun 2020 04:18:00 GMT', 'ETag', - '"0x8D80162944B94A2"', + '"0x8D81019ECCAA613"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc443e-101e-000c-704b-3321fe000000', + 'c1309b69-201e-003e-6602-42dadf000000', 'x-ms-client-request-id', - '88178f2d-8867-4fac-beeb-ebb683a757fb', + '52488d5a-e8dd-4e0d-bbec-b514d5137f87', 'x-ms-version', '2019-12-12', 'Date', - 'Tue, 26 May 2020 10:50:17 GMT' ]); + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container159049021779702431/blob159049021829309285', "Hello World") - .reply(201, "", [ 'Transfer-Encoding', - 'chunked', + .put('/container159210828056608669/blob159210828058208020', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Tue, 26 May 2020 10:50:18 GMT', + 'Sun, 14 Jun 2020 04:18:00 GMT', 'ETag', - '"0x8D8016294980E2D"', + '"0x8D81019ECCD0BFA"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc4440-101e-000c-714b-3321fe000000', + 'c1309b71-201e-003e-6d02-42dadf000000', 'x-ms-client-request-id', - 'f71ba7cb-4550-40e9-818f-46c284b43b5f', + '31c42e94-d2d2-44f7-b822-7620a9958ded', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:18:00.6012922Z', 'Date', - 'Tue, 26 May 2020 10:50:17 GMT' ]); + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container159049021779702431') + .delete('/container159210828056608669') .query(true) - .reply(202, "", [ 'Transfer-Encoding', - 'chunked', + .reply(202, "", [ + 'Content-Length', + '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc4441-101e-000c-724b-3321fe000000', + 'c1309b78-201e-003e-7402-42dadf000000', 'x-ms-client-request-id', - 'a350bf6e-9386-453c-b604-305901974f51', + '81b488d3-efa5-4058-b3b9-c644d6877baf', 'x-ms-version', '2019-12-12', 'Date', - 'Tue, 26 May 2020 10:50:18 GMT' ]); + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_large_file.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_large_file.js index f0371a810809..5bf7cc3219f6 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_large_file.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_large_file.js @@ -1,66 +1,74 @@ let nock = require('nock'); -module.exports.hash = "287ce57afa2ca683639ffe149024b36f"; +module.exports.hash = "d3f0ebebf3dcd28ed374f37ebe29b4a8"; -module.exports.testInfo = {"uniqueName":{"container":"container159049021180905322","blob":"blob159049021214800367"},"newDate":{}} +module.exports.testInfo = {"uniqueName":{"container":"container159210828019402829","blob":"blob159210828022206926"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container159049021180905322') + .put('/container159210828019402829') .query(true) - .reply(201, "", [ 'Transfer-Encoding', - 'chunked', + .reply(201, "", [ + 'Content-Length', + '0', 'Last-Modified', - 'Tue, 26 May 2020 10:50:11 GMT', + 'Sun, 14 Jun 2020 04:18:00 GMT', 'ETag', - '"0x8D8016290B9FF0D"', + '"0x8D81019EC91FF95"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc441b-101e-000c-5e4b-3321fe000000', + 'c1309aa9-201e-003e-3502-42dadf000000', 'x-ms-client-request-id', - '6b414e74-84d3-4442-9307-12df0cd21261', + '544d0ca6-802d-4389-9243-58eafcb33f3c', 'x-ms-version', '2019-12-12', 'Date', - 'Tue, 26 May 2020 10:50:11 GMT' ]); + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container159049021180905322/blob159049021214800367', "Hello World") - .reply(201, "", [ 'Transfer-Encoding', - 'chunked', + .put('/container159210828019402829/blob159210828022206926', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Tue, 26 May 2020 10:50:12 GMT', + 'Sun, 14 Jun 2020 04:18:00 GMT', 'ETag', - '"0x8D8016290EE0BCC"', + '"0x8D81019EC948CAB"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc441d-101e-000c-5f4b-3321fe000000', + 'c1309ab6-201e-003e-4102-42dadf000000', 'x-ms-client-request-id', - '0885e6eb-9a93-40c5-ae01-66b9cddbc98c', + 'fd989b6b-5e28-4af2-bde7-aba51177b587', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:18:00.2310315Z', 'Date', - 'Tue, 26 May 2020 10:50:11 GMT' ]); + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container159049021180905322') + .delete('/container159210828019402829') .query(true) - .reply(202, "", [ 'Transfer-Encoding', - 'chunked', + .reply(202, "", [ + 'Content-Length', + '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc441f-101e-000c-604b-3321fe000000', + 'c1309abc-201e-003e-4702-42dadf000000', 'x-ms-client-request-id', - 'a829abf7-d4fd-458b-8550-b2048199004e', + '7d199c47-6cda-41fc-a28d-6fd02624abeb', 'x-ms-version', '2019-12-12', 'Date', - 'Tue, 26 May 2020 10:50:11 GMT' ]); + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_non_fatal_error_event.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_non_fatal_error_event.js index a63fc13948e6..53986a983016 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_non_fatal_error_event.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_non_fatal_error_event.js @@ -1,66 +1,74 @@ let nock = require('nock'); -module.exports.hash = "f0edc0e711ff5ae5f1607685a9fb6a14"; +module.exports.hash = "298e5b23721ef7c469e86bc6ca431710"; -module.exports.testInfo = {"uniqueName":{"container":"container159049021552904014","blob":"blob159049021613506786"},"newDate":{}} +module.exports.testInfo = {"uniqueName":{"container":"container159210828045701568","blob":"blob159210828047201329"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container159049021552904014') + .put('/container159210828045701568') .query(true) - .reply(201, "", [ 'Transfer-Encoding', - 'chunked', + .reply(201, "", [ + 'Content-Length', + '0', 'Last-Modified', - 'Tue, 26 May 2020 10:50:15 GMT', + 'Sun, 14 Jun 2020 04:18:00 GMT', 'ETag', - '"0x8D8016292F191DF"', + '"0x8D81019ECB9DA29"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc442d-101e-000c-6a4b-3321fe000000', + 'c1309b1c-201e-003e-1f02-42dadf000000', 'x-ms-client-request-id', - 'a3249b89-a823-4be2-b04d-e384942336d3', + '5af06ad9-f572-4d9a-8905-6d7e48549d06', 'x-ms-version', '2019-12-12', 'Date', - 'Tue, 26 May 2020 10:50:15 GMT' ]); + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container159049021552904014/blob159049021613506786', "Hello World") - .reply(201, "", [ 'Transfer-Encoding', - 'chunked', + .put('/container159210828045701568/blob159210828047201329', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Tue, 26 May 2020 10:50:16 GMT', + 'Sun, 14 Jun 2020 04:18:00 GMT', 'ETag', - '"0x8D80162934E62B2"', + '"0x8D81019ECBC6728"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc4430-101e-000c-6b4b-3321fe000000', + 'c1309b26-201e-003e-2802-42dadf000000', 'x-ms-client-request-id', - '375c202b-6210-4766-a0dc-62b6fa9cfc33', + '6c178c79-ae0d-41e8-b6d7-7b2ed3a68fa5', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:18:00.4922152Z', 'Date', - 'Tue, 26 May 2020 10:50:15 GMT' ]); + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container159049021552904014') + .delete('/container159210828045701568') .query(true) - .reply(202, "", [ 'Transfer-Encoding', - 'chunked', + .reply(202, "", [ + 'Content-Length', + '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc4431-101e-000c-6c4b-3321fe000000', + 'c1309b31-201e-003e-3302-42dadf000000', 'x-ms-client-request-id', - '437212b5-c10f-4bc0-9dc5-cfe38a80f109', + 'cf966833-590c-4729-8fe8-c405e12c0faa', 'x-ms-version', '2019-12-12', 'Date', - 'Tue, 26 May 2020 10:50:16 GMT' ]); + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_progress_event.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_progress_event.js index 211a559c0fae..248cbb2d5791 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_progress_event.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_progress_event.js @@ -1,66 +1,74 @@ let nock = require('nock'); -module.exports.hash = "b9b98d2d88adaa863394f90d3f62a4a2"; +module.exports.hash = "358f6725ae41663b24921a49f2d724ba"; -module.exports.testInfo = {"uniqueName":{"container":"container159049021368504809","blob":"blob159049021399100385"},"newDate":{}} +module.exports.testInfo = {"uniqueName":{"container":"container159210828028502479","blob":"blob159210828036306881"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container159049021368504809') + .put('/container159210828028502479') .query(true) - .reply(201, "", [ 'Transfer-Encoding', - 'chunked', + .reply(201, "", [ + 'Content-Length', + '0', 'Last-Modified', - 'Tue, 26 May 2020 10:50:13 GMT', + 'Sun, 14 Jun 2020 04:18:00 GMT', 'ETag', - '"0x8D8016291D84D74"', + '"0x8D81019EC9FE4CC"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc4424-101e-000c-644b-3321fe000000', + 'c1309ad8-201e-003e-6202-42dadf000000', 'x-ms-client-request-id', - 'ed28d154-752e-4375-9dce-59adfbb20cea', + 'c0c5e45e-20d5-4f31-b8e0-9a6edf4219d0', 'x-ms-version', '2019-12-12', 'Date', - 'Tue, 26 May 2020 10:50:13 GMT' ]); + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container159049021368504809/blob159049021399100385', "Hello World") - .reply(201, "", [ 'Transfer-Encoding', - 'chunked', + .put('/container159210828028502479/blob159210828036306881', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Tue, 26 May 2020 10:50:14 GMT', + 'Sun, 14 Jun 2020 04:18:00 GMT', 'ETag', - '"0x8D80162920728A7"', + '"0x8D81019ECABE973"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc4426-101e-000c-654b-3321fe000000', + 'c1309af7-201e-003e-7d02-42dadf000000', 'x-ms-client-request-id', - 'd97c5bdb-2072-453d-8ef8-f535c541da65', + '1fe0ec6b-c9fa-475c-81b3-911aa74446a6', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:18:00.3841395Z', 'Date', - 'Tue, 26 May 2020 10:50:14 GMT' ]); + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container159049021368504809') + .delete('/container159210828028502479') .query(true) - .reply(202, "", [ 'Transfer-Encoding', - 'chunked', + .reply(202, "", [ + 'Content-Length', + '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc4427-101e-000c-664b-3321fe000000', + 'c1309afe-201e-003e-0302-42dadf000000', 'x-ms-client-request-id', - '123a03fa-22cd-4b9a-82b6-da84c0279b74', + '79a97e74-e572-43fe-8ca7-807f79989278', 'x-ms-version', '2019-12-12', 'Date', - 'Tue, 26 May 2020 10:50:14 GMT' ]); + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_snapshot.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_snapshot.js index 07ef970d2191..61b139338203 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_snapshot.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_snapshot.js @@ -1,66 +1,74 @@ let nock = require('nock'); -module.exports.hash = "9fa6b4b0cffd24ba43af3867c4547ad6"; +module.exports.hash = "76c1583bf5b97b7bf3b2740d780c0843"; -module.exports.testInfo = {"uniqueName":{"container":"container159049020812502198","blob":"blob159049020846207708"},"newDate":{}} +module.exports.testInfo = {"uniqueName":{"container":"container159210827998608035","blob":"blob159210828000007795"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container159049020812502198') + .put('/container159210827998608035') .query(true) - .reply(201, "", [ 'Transfer-Encoding', - 'chunked', + .reply(201, "", [ + 'Content-Length', + '0', 'Last-Modified', - 'Tue, 26 May 2020 10:50:08 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'ETag', - '"0x8D801628E881292"', + '"0x8D81019EC7040A1"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc4405-101e-000c-4e4b-3321fe000000', + 'c1309a4b-201e-003e-6102-42dadf000000', 'x-ms-client-request-id', - '87e35f42-6c44-44e1-9dce-a7880229747a', + '98f18915-3a53-4636-b25c-b002f3579e4f', 'x-ms-version', '2019-12-12', 'Date', - 'Tue, 26 May 2020 10:50:07 GMT' ]); + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container159049020812502198/blob159049020846207708', "Hello World") - .reply(201, "", [ 'Transfer-Encoding', - 'chunked', + .put('/container159210827998608035/blob159210828000007795', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Tue, 26 May 2020 10:50:08 GMT', + 'Sun, 14 Jun 2020 04:18:00 GMT', 'ETag', - '"0x8D801628EBB5CDE"', + '"0x8D81019EC72CDBF"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc4407-101e-000c-4f4b-3321fe000000', + 'c1309a53-201e-003e-6802-42dadf000000', 'x-ms-client-request-id', - 'fdea3e39-5f7b-4d3a-8224-db0c21c046c6', + '1cf6f07b-e4e1-4428-ae2c-837a450d3195', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:18:00.0098751Z', 'Date', - 'Tue, 26 May 2020 10:50:08 GMT' ]); + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container159049020812502198') + .delete('/container159210827998608035') .query(true) - .reply(202, "", [ 'Transfer-Encoding', - 'chunked', + .reply(202, "", [ + 'Content-Length', + '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc4408-101e-000c-504b-3321fe000000', + 'c1309a5b-201e-003e-7002-42dadf000000', 'x-ms-client-request-id', - '8907ba07-dd16-4215-b804-df32904dc08b', + 'a120cb1f-68fe-4b7a-9ed7-dd00e3d6b8cb', 'x-ms-version', '2019-12-12', 'Date', - 'Tue, 26 May 2020 10:50:08 GMT' ]); + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_where_conditionals.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_where_conditionals.js index acdfcce09666..dbab316997a5 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_where_conditionals.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_where_conditionals.js @@ -1,66 +1,74 @@ let nock = require('nock'); -module.exports.hash = "e1455a2b0a5b90c635259b595020e8ad"; +module.exports.hash = "c4f766d931daa5bdfbb3450e86ec701f"; -module.exports.testInfo = {"uniqueName":{"container":"container159049020904409655","blob":"blob159049020931607154"},"newDate":{}} +module.exports.testInfo = {"uniqueName":{"container":"container159210828002206364","blob":"blob159210828003804395"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container159049020904409655') + .put('/container159210828002206364') .query(true) - .reply(201, "", [ 'Transfer-Encoding', - 'chunked', + .reply(201, "", [ + 'Content-Length', + '0', 'Last-Modified', - 'Tue, 26 May 2020 10:50:09 GMT', + 'Sun, 14 Jun 2020 04:18:00 GMT', 'ETag', - '"0x8D801628F143F82"', + '"0x8D81019EC77E329"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc4409-101e-000c-514b-3321fe000000', + 'c1309a5e-201e-003e-7302-42dadf000000', 'x-ms-client-request-id', - 'd0949da6-1973-4501-9474-fa90a511b293', + 'd94e2deb-6c65-491a-870a-b86a3fbd61a0', 'x-ms-version', '2019-12-12', 'Date', - 'Tue, 26 May 2020 10:50:08 GMT' ]); + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container159049020904409655/blob159049020931607154', "Hello World") - .reply(201, "", [ 'Transfer-Encoding', - 'chunked', + .put('/container159210828002206364/blob159210828003804395', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Tue, 26 May 2020 10:50:09 GMT', + 'Sun, 14 Jun 2020 04:18:00 GMT', 'ETag', - '"0x8D801628F3E11F6"', + '"0x8D81019EC7A9757"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc440b-101e-000c-524b-3321fe000000', + 'c1309a66-201e-003e-7902-42dadf000000', 'x-ms-client-request-id', - '6ee721f2-34e6-41bb-89e7-c47d9647ccba', + '9f0fd53f-507c-472c-948a-dac81a143501', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:18:00.0619122Z', 'Date', - 'Tue, 26 May 2020 10:50:08 GMT' ]); + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container159049020904409655') + .delete('/container159210828002206364') .query(true) - .reply(202, "", [ 'Transfer-Encoding', - 'chunked', + .reply(202, "", [ + 'Content-Length', + '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1abc440c-101e-000c-534b-3321fe000000', + 'c1309a74-201e-003e-0602-42dadf000000', 'x-ms-client-request-id', - '826fbcca-21d7-41f1-8cd8-6229c2d4be2f', + 'e6e10c07-0003-4020-b99b-f705033a5327', 'x-ms-version', '2019-12-12', 'Date', - 'Tue, 26 May 2020 10:50:09 GMT' ]); + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_setaccesstier_set_archive_to_hot.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_setaccesstier_set_archive_to_hot.js index 3043c6220c66..4cb31287529c 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_setaccesstier_set_archive_to_hot.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_setaccesstier_set_archive_to_hot.js @@ -1,97 +1,107 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container156988647032205960","blob":"blob156988647052503315"} +module.exports.hash = "15fc01e92b66d0fad95cdec90863c146"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827920706797","blob":"blob159210827921002564"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156988647032205960') + .put('/container159210827920706797') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Mon, 30 Sep 2019 23:34:30 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'ETag', - '"0x8D745FEBDD1A08C"', + '"0x8D81019EBF94D51"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '804b9784-401e-00cf-41e7-771429000000', + 'c130993d-201e-003e-6a02-42dadf000000', 'x-ms-client-request-id', - 'e3db28d8-3f80-4f19-b444-8c07861fede1', + '0a6b4d82-fff1-48ef-8652-881f6b8a07b1', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Mon, 30 Sep 2019 23:34:30 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156988647032205960/blob156988647052503315', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827920706797/blob159210827921002564', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Mon, 30 Sep 2019 23:34:30 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'ETag', - '"0x8D745FEBDF1AF47"', + '"0x8D81019EBFBB37F"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '94127e78-d01e-000d-1ae7-779c97000000', + 'c1309946-201e-003e-7102-42dadf000000', 'x-ms-client-request-id', - '1781c584-052d-4407-85d1-633e2710e4ba', + '067d251a-4ece-4028-b7ac-83029c0ddf3b', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:59.2293247Z', 'Date', - 'Mon, 30 Sep 2019 23:34:29 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156988647032205960/blob156988647052503315') + .put('/container159210827920706797/blob159210827921002564') .query(true) - .reply(200, "", [ 'Content-Length', + .reply(200, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'e0419c82-e01e-010a-37e7-772c47000000', + 'c130994c-201e-003e-7702-42dadf000000', 'x-ms-client-request-id', - '7e27fd11-0937-49eb-b78a-d66e6ebfd6fe', + 'f8502f59-7182-4a2e-9435-9ce0e4b1190b', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Mon, 30 Sep 2019 23:34:30 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container156988647032205960/blob156988647052503315') - .reply(200, "", [ 'Content-Length', + .head('/container159210827920706797/blob159210827921002564') + .reply(200, "", [ + 'Content-Length', '11', 'Content-Type', 'application/octet-stream', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Mon, 30 Sep 2019 23:34:30 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D745FEBDF1AF47"', - 'Vary', - 'Origin', + '"0x8D81019EBFBB37F"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '3d941c4c-901e-00cd-48e7-7716d3000000', + 'c1309950-201e-003e-7b02-42dadf000000', 'x-ms-client-request-id', - '8e5fa1b1-9284-44df-986c-bf1d6edb129b', + '23173ba4-eac7-400e-8323-61247fb6d795', 'x-ms-version', - '2019-02-02', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:59.2293247Z', + 'x-ms-is-current-version', + 'true', 'x-ms-creation-time', - 'Mon, 30 Sep 2019 23:34:30 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -103,54 +113,58 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-access-tier', 'Archive', 'x-ms-access-tier-change-time', - 'Mon, 30 Sep 2019 23:34:30 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'Date', - 'Mon, 30 Sep 2019 23:34:30 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156988647032205960/blob156988647052503315') + .put('/container159210827920706797/blob159210827921002564') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '11919f49-401e-00a2-38e7-77be07000000', + 'c1309955-201e-003e-8002-42dadf000000', 'x-ms-client-request-id', - '912b746d-eef1-4471-a3c2-8b50c6fb76e0', + '7f44bc51-d347-47fe-b904-bab1b5e918ab', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Mon, 30 Sep 2019 23:34:31 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container156988647032205960/blob156988647052503315') - .reply(200, "", [ 'Content-Length', + .head('/container159210827920706797/blob159210827921002564') + .reply(200, "", [ + 'Content-Length', '11', 'Content-Type', 'application/octet-stream', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Mon, 30 Sep 2019 23:34:30 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D745FEBDF1AF47"', - 'Vary', - 'Origin', + '"0x8D81019EBFBB37F"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'd5135805-d01e-00e3-11e7-779614000000', + 'c1309957-201e-003e-0202-42dadf000000', 'x-ms-client-request-id', - 'bb16f6df-ff4d-4ded-b92b-8c372659930b', + '07667e98-ae4f-47c9-828e-df9afbca70cd', 'x-ms-version', - '2019-02-02', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:59.2293247Z', + 'x-ms-is-current-version', + 'true', 'x-ms-creation-time', - 'Mon, 30 Sep 2019 23:34:30 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -162,26 +176,29 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-access-tier', 'Archive', 'x-ms-access-tier-change-time', - 'Mon, 30 Sep 2019 23:34:31 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'x-ms-archive-status', 'rehydrate-pending-to-hot', + 'x-ms-rehydrate-priority', + 'Standard', 'Date', - 'Mon, 30 Sep 2019 23:34:30 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156988647032205960') + .delete('/container159210827920706797') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '0c0794a5-601e-00f1-7de7-77a208000000', + 'c1309960-201e-003e-0a02-42dadf000000', 'x-ms-client-request-id', - 'ea186d3c-5b2e-4c77-8583-5aecbe412fe5', + '28614c17-c901-41f6-9098-5dcbb13fd35f', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Mon, 30 Sep 2019 23:34:31 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_setaccesstier_set_default_to_cool.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_setaccesstier_set_default_to_cool.js index 0cfd5feef8d7..49ca319a7d12 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_setaccesstier_set_default_to_cool.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_setaccesstier_set_default_to_cool.js @@ -1,97 +1,107 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container156988646924605907","blob":"blob156988646945001807"} +module.exports.hash = "5c4a67be36e56d2e3cb4a259494f8673"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827913107230","blob":"blob159210827915204221"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156988646924605907') + .put('/container159210827913107230') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Mon, 30 Sep 2019 23:34:29 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'ETag', - '"0x8D745FEBD2D6665"', + '"0x8D81019EBEEC412"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '40622e52-f01e-001a-23e7-775cf4000000', + 'c130991e-201e-003e-4d02-42dadf000000', 'x-ms-client-request-id', - 'c07630bf-83bb-43d1-ba08-490cad2e46ca', + '3f153acf-e0f9-400b-a6e6-46e1657584ca', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Mon, 30 Sep 2019 23:34:28 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156988646924605907/blob156988646945001807', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827913107230/blob159210827915204221', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Mon, 30 Sep 2019 23:34:29 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'ETag', - '"0x8D745FEBD4D0A17"', + '"0x8D81019EBF15164"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'a73e7dcf-101e-0010-0ae7-77457d000000', + 'c1309923-201e-003e-5102-42dadf000000', 'x-ms-client-request-id', - '88259ba1-d505-49fc-b2de-7f81b33c5674', + '9a915363-ca06-47f0-8ade-0fa705679812', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:59.1612772Z', 'Date', - 'Mon, 30 Sep 2019 23:34:28 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156988646924605907/blob156988646945001807') + .put('/container159210827913107230/blob159210827915204221') .query(true) - .reply(200, "", [ 'Content-Length', + .reply(200, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'a6447ff3-401e-010c-14e7-77db3f000000', + 'c130992b-201e-003e-5902-42dadf000000', 'x-ms-client-request-id', - '2396740d-5abe-4cd3-8587-84623bcfb054', + '3cbaee92-e011-41cb-a920-50b12717f8ea', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Mon, 30 Sep 2019 23:34:29 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container156988646924605907/blob156988646945001807') - .reply(200, "", [ 'Content-Length', + .head('/container159210827913107230/blob159210827915204221') + .reply(200, "", [ + 'Content-Length', '11', 'Content-Type', 'application/octet-stream', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Mon, 30 Sep 2019 23:34:29 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D745FEBD4D0A17"', - 'Vary', - 'Origin', + '"0x8D81019EBF15164"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'c428ff4c-e01e-00a4-5de7-77497f000000', + 'c1309930-201e-003e-5e02-42dadf000000', 'x-ms-client-request-id', - '4f003ef7-7ac7-44f3-a7fc-209daa89d513', + 'b5ee81d1-18d4-4e7a-810c-c02c40d240f2', 'x-ms-version', - '2019-02-02', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:59.1612772Z', + 'x-ms-is-current-version', + 'true', 'x-ms-creation-time', - 'Mon, 30 Sep 2019 23:34:29 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -103,24 +113,25 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-access-tier', 'Cool', 'x-ms-access-tier-change-time', - 'Mon, 30 Sep 2019 23:34:29 GMT', + 'Sun, 14 Jun 2020 04:17:59 GMT', 'Date', - 'Mon, 30 Sep 2019 23:34:29 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156988646924605907') + .delete('/container159210827913107230') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '129b1ca5-e01e-000e-43e7-779f90000000', + 'c1309932-201e-003e-6002-42dadf000000', 'x-ms-client-request-id', - 'a6368b3f-d69f-4c7c-95b7-ed843a2377be', + 'dbabf090-7b49-401f-9566-960cdcf78880', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Mon, 30 Sep 2019 23:34:30 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_sethttpheaders_with_all_parameters_set.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_sethttpheaders_with_all_parameters_set.js index 4655c0c49091..67acaa13f3c2 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_sethttpheaders_with_all_parameters_set.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_sethttpheaders_with_all_parameters_set.js @@ -1,78 +1,86 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container156816861608504522","blob":"blob156816861649607807"} +module.exports.hash = "6e9aff9d8b2a110f39c9310185ef114d"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827815100500","blob":"blob159210827816709968"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816861608504522') + .put('/container159210827815100500') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:36 GMT', + 'Sun, 14 Jun 2020 04:17:58 GMT', 'ETag', - '"0x8D7365F0D018DB4"', + '"0x8D81019EB588340"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '63d1e334-601e-0000-8047-6866fc000000', + 'c13097f0-201e-003e-2f02-42dadf000000', 'x-ms-client-request-id', - '9505d2c2-d2a4-4696-ad27-1ca21829d7a8', + 'da2797a4-0387-402b-96da-521136ffe642', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:23:35 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:57 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816861608504522/blob156816861649607807', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827815100500/blob159210827816709968', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:36 GMT', + 'Sun, 14 Jun 2020 04:17:58 GMT', 'ETag', - '"0x8D7365F0D406D9F"', + '"0x8D81019EB5B5EEE"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'd254224a-501e-0003-3847-6865fb000000', + 'c13097fc-201e-003e-3a02-42dadf000000', 'x-ms-client-request-id', - 'c8ff5480-8745-4142-b1e5-7b640f92936e', + '1c1870b7-0df3-4b4d-8d01-ddb67ddc52a1', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:58.1785838Z', 'Date', - 'Wed, 11 Sep 2019 02:23:36 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:57 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816861608504522/blob156816861649607807') + .put('/container159210827815100500/blob159210827816709968') .query(true) - .reply(200, "", [ 'Content-Length', + .reply(200, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:37 GMT', + 'Sun, 14 Jun 2020 04:17:58 GMT', 'ETag', - '"0x8D7365F0D7FA4E7"', + '"0x8D81019EB5DD063"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '4072ad3e-d01e-0056-3747-688e8c000000', + 'c1309803-201e-003e-4102-42dadf000000', 'x-ms-client-request-id', - '0e49fb1a-3f9e-476f-bb8a-515fb061d1c3', + '531f6976-bfa1-4f6d-835d-9eadba60ebfb', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:23:36 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:57 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container156816861608504522/blob156816861649607807') - .reply(200, [], [ 'Cache-Control', + .head('/container159210827815100500/blob159210827816709968') + .reply(200, [], [ + 'Cache-Control', 'blobCacheControl', 'Content-Length', '11', @@ -85,23 +93,25 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Content-MD5', 'AQIDBA==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:37 GMT', + 'Sun, 14 Jun 2020 04:17:58 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7365F0D7FA4E7"', + '"0x8D81019EB5DD063"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'ab8a7937-c01e-0060-1647-6823de000000', + 'c1309809-201e-003e-4702-42dadf000000', 'x-ms-client-request-id', - 'eae7ec81-e580-4d6f-8482-d26caf816c57', + '1546fea1-01d0-4363-a035-6efb9f35a199', 'x-ms-version', - '2019-02-02', - 'x-ms-tag-count', - '0', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:58.1785838Z', + 'x-ms-is-current-version', + 'true', 'x-ms-creation-time', - 'Wed, 11 Sep 2019 02:23:36 GMT', + 'Sun, 14 Jun 2020 04:17:58 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -113,30 +123,27 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-server-encrypted', 'true', 'x-ms-access-tier', - 'Cool', + 'Hot', 'x-ms-access-tier-inferred', 'true', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-tag-count,Content-Type,Content-Encoding,Content-Language,Cache-Control,Last-Modified,ETag,x-ms-creation-time,Content-MD5,x-ms-lease-status,x-ms-lease-state,x-ms-blob-type,Content-Disposition,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', - 'Wed, 11 Sep 2019 02:23:36 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:57 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156816861608504522') + .delete('/container159210827815100500') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'b9450a29-001e-0039-2d47-682658000000', + 'c130980c-201e-003e-4a02-42dadf000000', 'x-ms-client-request-id', - 'c2101364-f31b-4f4c-892c-6fa770390c20', + '691835a6-8289-45b7-b02e-bfbf26b166e3', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:23:37 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:57 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_sethttpheaders_with_default_parameters.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_sethttpheaders_with_default_parameters.js index cf9bb71fed86..5f5550fcd86c 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_sethttpheaders_with_default_parameters.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_sethttpheaders_with_default_parameters.js @@ -1,97 +1,107 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container156816861406804572","blob":"blob156816861446805800"} +module.exports.hash = "2a72af782365f9ee677dc96b13236ba0"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827799401548","blob":"blob159210827805109492"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816861406804572') + .put('/container159210827799401548') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:34 GMT', + 'Sun, 14 Jun 2020 04:17:58 GMT', 'ETag', - '"0x8D7365F0BCCFF3F"', + '"0x8D81019EB41C2C8"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '67988c10-b01e-0064-5547-68d65c000000', + 'c13097b5-201e-003e-7902-42dadf000000', 'x-ms-client-request-id', - 'a4057634-b4cb-4562-81a6-4251a1416f2a', + '3c262f6b-5cfd-4a15-9e2a-730d8e10fc37', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:23:33 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:57 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816861406804572/blob156816861446805800', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827799401548/blob159210827805109492', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:34 GMT', + 'Sun, 14 Jun 2020 04:17:58 GMT', 'ETag', - '"0x8D7365F0C0A74CD"', + '"0x8D81019EB498169"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'd653360c-a01e-0034-5447-68c954000000', + 'c13097bf-201e-003e-0202-42dadf000000', 'x-ms-client-request-id', - '7b1ae749-6112-47ef-ab56-883237c759fb', + '86af19fb-29be-4383-8110-305b268c7b45', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:58.0615017Z', 'Date', - 'Wed, 11 Sep 2019 02:23:34 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:57 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816861406804572/blob156816861446805800') + .put('/container159210827799401548/blob159210827805109492') .query(true) - .reply(200, "", [ 'Content-Length', + .reply(200, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:35 GMT', + 'Sun, 14 Jun 2020 04:17:58 GMT', 'ETag', - '"0x8D7365F0C4788D3"', + '"0x8D81019EB4BCBBF"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'd653366a-a01e-0034-2647-68c954000000', + 'c13097c6-201e-003e-0902-42dadf000000', 'x-ms-client-request-id', - '2a394410-be03-4441-be3d-66e629371eb4', + '27725b8c-101a-45ef-83ac-55ec148282be', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:23:34 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:57 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container156816861406804572/blob156816861446805800') - .reply(200, "", [ 'Content-Length', + .head('/container159210827799401548/blob159210827805109492') + .reply(200, "", [ + 'Content-Length', '11', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:35 GMT', + 'Sun, 14 Jun 2020 04:17:58 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7365F0C4788D3"', + '"0x8D81019EB4BCBBF"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'a4585a40-f01e-0041-7e47-684eef000000', + 'c13097cd-201e-003e-1002-42dadf000000', 'x-ms-client-request-id', - '0ba7e52b-3f01-47a5-a805-ecada11c11c2', + '48bf8e75-8627-401a-bcad-b57e52206c04', 'x-ms-version', - '2019-02-02', - 'x-ms-tag-count', - '0', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:58.0615017Z', + 'x-ms-is-current-version', + 'true', 'x-ms-creation-time', - 'Wed, 11 Sep 2019 02:23:34 GMT', + 'Sun, 14 Jun 2020 04:17:58 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -101,30 +111,27 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-server-encrypted', 'true', 'x-ms-access-tier', - 'Cool', + 'Hot', 'x-ms-access-tier-inferred', 'true', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-tag-count,Last-Modified,ETag,x-ms-creation-time,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', - 'Wed, 11 Sep 2019 02:23:34 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:57 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156816861406804572') + .delete('/container159210827799401548') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '67988e3c-b01e-0064-3047-68d65c000000', + 'c13097d5-201e-003e-1802-42dadf000000', 'x-ms-client-request-id', - 'fe813106-0c6d-41ff-9b31-7891a502c369', + 'ac99586d-0df9-49f6-ad3d-92a1e81ac44a', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:23:35 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:57 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_setmetadata_with_cleaning_up_metadata.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_setmetadata_with_cleaning_up_metadata.js index 3b9eaab425c6..2470e2cb582a 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_setmetadata_with_cleaning_up_metadata.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_setmetadata_with_cleaning_up_metadata.js @@ -1,107 +1,119 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container156816861121402747","blob":"blob156816861162106037"} +module.exports.hash = "5fcb62eeaa74c436ad1c241b97d08805"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827790005161","blob":"blob159210827791505055"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816861121402747') + .put('/container159210827790005161') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:31 GMT', + 'Sun, 14 Jun 2020 04:17:57 GMT', 'ETag', - '"0x8D7365F0A19FE5F"', + '"0x8D81019EB322F93"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1837c8b1-b01e-004d-0747-68a01e000000', + 'c1309795-201e-003e-5a02-42dadf000000', 'x-ms-client-request-id', - '137b33d5-c06f-47ca-b9b4-dbf97b82573b', + '17b4f5a7-fdf0-4713-9aea-850063ca4871', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:23:31 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:56 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816861121402747/blob156816861162106037', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827790005161/blob159210827791505055', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:31 GMT', + 'Sun, 14 Jun 2020 04:17:57 GMT', 'ETag', - '"0x8D7365F0A59DEAC"', + '"0x8D81019EB34BD25"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'e18b4285-d01e-0030-6347-683cd6000000', + 'c130979b-201e-003e-5f02-42dadf000000', 'x-ms-client-request-id', - '374350d4-f868-40aa-b2a6-ee1ad5af7cef', + '44c3b451-e7a7-435b-8313-02c308e0f2ef', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:57.9264060Z', 'Date', - 'Wed, 11 Sep 2019 02:23:31 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:56 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816861121402747/blob156816861162106037') + .put('/container159210827790005161/blob159210827791505055') .query(true) - .reply(200, "", [ 'Content-Length', + .reply(200, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:32 GMT', + 'Sun, 14 Jun 2020 04:17:57 GMT', 'ETag', - '"0x8D7365F0A98EEE0"', + '"0x8D81019EB372E96"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '84b8f259-401e-0017-5e47-68a69f000000', + 'c13097a1-201e-003e-6502-42dadf000000', 'x-ms-client-request-id', - '77edba80-3fcc-4838-9959-17fc00b164ab', + '3d17bcbd-bc7a-43e6-99ba-dab4b8ef3084', 'x-ms-version', - '2019-02-02', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:57.9424166Z', 'x-ms-request-server-encrypted', 'true', 'Date', - 'Wed, 11 Sep 2019 02:23:31 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:56 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container156816861121402747/blob156816861162106037') - .reply(200, "", [ 'Content-Length', + .head('/container159210827790005161/blob159210827791505055') + .reply(200, "", [ + 'Content-Length', '11', 'Content-Type', 'application/octet-stream', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:32 GMT', + 'Sun, 14 Jun 2020 04:17:57 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7365F0A98EEE0"', + '"0x8D81019EB372E96"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'f7be116f-301e-005c-1147-689705000000', + 'c13097a7-201e-003e-6b02-42dadf000000', 'x-ms-client-request-id', - '07489006-5458-43e2-8e2e-868af5c4a752', + 'a175e48e-7fc8-4326-ba5d-238d82e88902', 'x-ms-version', - '2019-02-02', - 'x-ms-tag-count', - '0', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:57.9424166Z', + 'x-ms-is-current-version', + 'true', 'x-ms-meta-a', 'a', 'x-ms-meta-b', 'b', 'x-ms-creation-time', - 'Wed, 11 Sep 2019 02:23:31 GMT', + 'Sun, 14 Jun 2020 04:17:57 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -111,66 +123,68 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-server-encrypted', 'true', 'x-ms-access-tier', - 'Cool', + 'Hot', 'x-ms-access-tier-inferred', 'true', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-tag-count,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', - 'Wed, 11 Sep 2019 02:23:31 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:56 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816861121402747/blob156816861162106037') + .put('/container159210827790005161/blob159210827791505055') .query(true) - .reply(200, "", [ 'Content-Length', + .reply(200, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:33 GMT', + 'Sun, 14 Jun 2020 04:17:57 GMT', 'ETag', - '"0x8D7365F0B133E01"', + '"0x8D81019EB3AFFD6"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1ab5b2fb-a01e-003f-6c47-68d120000000', + 'c13097a9-201e-003e-6d02-42dadf000000', 'x-ms-client-request-id', - '29aa42af-79f1-4189-9aa7-81f0e3cff61d', + '7e888835-f900-417d-8bd5-0da0a7059cb5', 'x-ms-version', - '2019-02-02', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:57.9674342Z', 'x-ms-request-server-encrypted', 'true', 'Date', - 'Wed, 11 Sep 2019 02:23:32 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:57 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container156816861121402747/blob156816861162106037') - .reply(200, "", [ 'Content-Length', + .head('/container159210827790005161/blob159210827791505055') + .reply(200, "", [ + 'Content-Length', '11', 'Content-Type', 'application/octet-stream', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:33 GMT', + 'Sun, 14 Jun 2020 04:17:57 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7365F0B133E01"', + '"0x8D81019EB3AFFD6"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '478ecaa6-701e-0014-7b47-68a598000000', + 'c13097ac-201e-003e-7002-42dadf000000', 'x-ms-client-request-id', - '3f1f2bca-3050-43f6-98a0-d74f24dddce0', + 'efaf3045-55ac-432c-9b84-d0445fcf9d8c', 'x-ms-version', - '2019-02-02', - 'x-ms-tag-count', - '0', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:57.9674342Z', + 'x-ms-is-current-version', + 'true', 'x-ms-creation-time', - 'Wed, 11 Sep 2019 02:23:31 GMT', + 'Sun, 14 Jun 2020 04:17:57 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -180,30 +194,27 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-server-encrypted', 'true', 'x-ms-access-tier', - 'Cool', + 'Hot', 'x-ms-access-tier-inferred', 'true', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-tag-count,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', - 'Wed, 11 Sep 2019 02:23:33 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:57 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156816861121402747') + .delete('/container159210827790005161') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '42fb9f5c-101e-0062-2947-682124000000', + 'c13097ad-201e-003e-7102-42dadf000000', 'x-ms-client-request-id', - '70a67100-c6af-4e88-b3df-5db52d15f5a4', + '872c81c1-f9f6-496b-889d-e2326b9f6071', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:23:33 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:57 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_setmetadata_with_new_metadata_set.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_setmetadata_with_new_metadata_set.js index 91337aa5459a..78be680b1a29 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_setmetadata_with_new_metadata_set.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_setmetadata_with_new_metadata_set.js @@ -1,107 +1,119 @@ let nock = require('nock'); -module.exports.testInfo = {"container":"container156816860918300250","blob":"blob156816860959006070"} +module.exports.hash = "04d43cdff6474fb113bc340d22a8b474"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827780604720","blob":"blob159210827782200683"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816860918300250') + .put('/container159210827780604720') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:29 GMT', + 'Sun, 14 Jun 2020 04:17:57 GMT', 'ETag', - '"0x8D7365F08E43949"', + '"0x8D81019EB25AA2C"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'b36dd11f-801e-0023-7047-680937000000', + 'c1309767-201e-003e-3102-42dadf000000', 'x-ms-client-request-id', - 'eaf4513e-dc51-4d95-9566-e1479dcc7d05', + '3f8316a3-1808-47bc-bb96-b24b7752820d', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:23:29 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:56 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816860918300250/blob156816860959006070', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827780604720/blob159210827782200683', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:29 GMT', + 'Sun, 14 Jun 2020 04:17:57 GMT', 'ETag', - '"0x8D7365F0922860C"', + '"0x8D81019EB2837C2"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '9bf96cb6-501e-0047-1947-68b997000000', + 'c1309774-201e-003e-3d02-42dadf000000', 'x-ms-client-request-id', - '99aa6d84-248e-4935-a569-d046d4a78076', + '43a432ab-b426-410b-84ff-d2cb2c968cfc', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', + 'x-ms-version-id', + '2020-06-14T04:17:57.8433474Z', 'Date', - 'Wed, 11 Sep 2019 02:23:29 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:56 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816860918300250/blob156816860959006070') + .put('/container159210827780604720/blob159210827782200683') .query(true) - .reply(200, "", [ 'Content-Length', + .reply(200, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:30 GMT', + 'Sun, 14 Jun 2020 04:17:57 GMT', 'ETag', - '"0x8D7365F09619637"', + '"0x8D81019EB2AA933"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '8feb5fd2-b01e-0009-7947-687c72000000', + 'c130977d-201e-003e-4602-42dadf000000', 'x-ms-client-request-id', - '0c1aae3d-7b61-4b47-9662-118b958eee4a', + 'f0c634df-4f21-4876-b4f5-841ee8731373', 'x-ms-version', - '2019-02-02', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:57.8603587Z', 'x-ms-request-server-encrypted', 'true', 'Date', - 'Wed, 11 Sep 2019 02:23:29 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:56 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container156816860918300250/blob156816860959006070') - .reply(200, "", [ 'Content-Length', + .head('/container159210827780604720/blob159210827782200683') + .reply(200, "", [ + 'Content-Length', '11', 'Content-Type', 'application/octet-stream', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:30 GMT', + 'Sun, 14 Jun 2020 04:17:57 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7365F09619637"', + '"0x8D81019EB2AA933"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '0ec3f9a8-601e-004f-2647-68a2e4000000', + 'c1309789-201e-003e-5002-42dadf000000', 'x-ms-client-request-id', - 'c56af06b-8ca4-40e0-beb2-90f52758e160', + '5f1ac714-6c09-45e9-a238-1837b50c737a', 'x-ms-version', - '2019-02-02', - 'x-ms-tag-count', - '0', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:57.8603587Z', + 'x-ms-is-current-version', + 'true', 'x-ms-meta-a', 'a', 'x-ms-meta-b', 'b', 'x-ms-creation-time', - 'Wed, 11 Sep 2019 02:23:29 GMT', + 'Sun, 14 Jun 2020 04:17:57 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -111,30 +123,27 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-server-encrypted', 'true', 'x-ms-access-tier', - 'Cool', + 'Hot', 'x-ms-access-tier-inferred', 'true', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-tag-count,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', - 'Wed, 11 Sep 2019 02:23:30 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:56 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156816860918300250') + .delete('/container159210827780604720') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '8b5129e8-b01e-0002-0d47-686406000000', + 'c130978c-201e-003e-5202-42dadf000000', 'x-ms-client-request-id', - 'b7f970bd-67c5-477e-8c1a-06de50dabb8a', + '51bb49ed-36ea-48f3-b92c-fd06ef58b796', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:23:30 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:56 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_synccopyfromurl.js b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_synccopyfromurl.js index 7928544c0ffa..ed2affa742b1 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_synccopyfromurl.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_synccopyfromurl.js @@ -1,48 +1,48 @@ let nock = require('nock'); -module.exports.hash = "9824a6daab12292957d73406d9ba3de9"; +module.exports.hash = "aff5e790ac70fb8a3626de9f7734e800"; -module.exports.testInfo = {"uniqueName":{"container":"container158459463331705281","blob":"blob158459463355705972","copiedblob":"copiedblob158459463380103159"},"newDate":{"undefined":"2020-03-19T05:10:33.801Z"}} +module.exports.testInfo = {"uniqueName":{"container":"container159210827854300126","blob":"blob159210827855903755","copiedblob":"copiedblob159210827857404795"},"newDate":{"undefined":"2020-06-14T04:17:58.574Z"}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459463331705281') + .put('/container159210827854300126') .query(true) .reply(201, "", [ 'Content-Length', '0', 'Last-Modified', - 'Thu, 19 Mar 2020 05:10:33 GMT', + 'Sun, 14 Jun 2020 04:17:58 GMT', 'ETag', - '"0x8D7CBC3DA171971"', + '"0x8D81019EB94ACCE"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'd838c3b2-201e-0041-40ac-fd8226000000', + 'c1309874-201e-003e-2c02-42dadf000000', 'x-ms-client-request-id', - '79599e27-c9f2-4b4c-ad70-f54fd43e2353', + '90c960d0-518e-46a2-8389-7b001068f611', 'x-ms-version', '2019-12-12', 'Date', - 'Thu, 19 Mar 2020 05:10:32 GMT' + 'Sun, 14 Jun 2020 04:17:57 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459463331705281/blob158459463355705972', "Hello World") + .put('/container159210827854300126/blob159210827855903755', "Hello World") .reply(201, "", [ 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Thu, 19 Mar 2020 05:10:33 GMT', + 'Sun, 14 Jun 2020 04:17:58 GMT', 'ETag', - '"0x8D7CBC3DA3BF48A"', + '"0x8D81019EB973A41"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '15fd09ff-d01e-0018-62ac-fd05a5000000', + 'c130987c-201e-003e-3202-42dadf000000', 'x-ms-client-request-id', - 'f1ef1af5-d5e3-4509-9466-0c900aea590f', + '015cab40-a1c6-40b3-81ec-d69ee8d749b4', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -50,42 +50,42 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-03-19T05:10:33.6648095Z', + '2020-06-14T04:17:58.5708609Z', 'Date', - 'Thu, 19 Mar 2020 05:10:33 GMT' + 'Sun, 14 Jun 2020 04:17:57 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459463331705281/copiedblob158459463380103159') + .put('/container159210827854300126/copiedblob159210827857404795') .reply(202, "", [ 'Content-Length', '0', 'Last-Modified', - 'Thu, 19 Mar 2020 05:10:34 GMT', + 'Sun, 14 Jun 2020 04:17:58 GMT', 'ETag', - '"0x8D7CBC3DA970F42"', + '"0x8D81019EBAEF055"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'd838c492-201e-0041-14ac-fd8226000000', + 'c1309881-201e-003e-3702-42dadf000000', 'x-ms-client-request-id', - '9f78df14-8b4b-406f-8cf9-157d8140c204', + 'b2d25a81-3c3f-4bce-b375-cb4f41876461', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-version-id', - '2020-03-19T05:10:34.2652371Z', + '2020-06-14T04:17:58.7309733Z', 'x-ms-copy-id', - 'cad1df54-bfae-4f8d-877c-6ac60f2e696b', + '3a9897d2-6f20-4c6c-9cb3-45f851205a22', 'x-ms-copy-status', 'success', 'Date', - 'Thu, 19 Mar 2020 05:10:33 GMT' + 'Sun, 14 Jun 2020 04:17:57 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container158459463331705281/blob158459463355705972') + .head('/container159210827854300126/blob159210827855903755') .reply(200, "", [ 'Content-Length', '11', @@ -94,25 +94,25 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Thu, 19 Mar 2020 05:10:33 GMT', + 'Sun, 14 Jun 2020 04:17:58 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7CBC3DA3BF48A"', + '"0x8D81019EB973A41"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '15fd0b6b-d01e-0018-19ac-fd05a5000000', + 'c130989f-201e-003e-5402-42dadf000000', 'x-ms-client-request-id', - '85d4ae99-dce6-4bf7-911b-7847d7e80c64', + 'ea34de71-99d7-479f-9544-fa414c7ee85f', 'x-ms-version', '2019-12-12', 'x-ms-version-id', - '2020-03-19T05:10:33.6648095Z', + '2020-06-14T04:17:58.5708609Z', 'x-ms-is-current-version', 'true', 'x-ms-creation-time', - 'Thu, 19 Mar 2020 05:10:33 GMT', + 'Sun, 14 Jun 2020 04:17:58 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -126,11 +126,11 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-access-tier-inferred', 'true', 'Date', - 'Thu, 19 Mar 2020 05:10:34 GMT' + 'Sun, 14 Jun 2020 04:17:57 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container158459463331705281/copiedblob158459463380103159') + .head('/container159210827854300126/copiedblob159210827857404795') .reply(200, "", [ 'Content-Length', '11', @@ -139,25 +139,25 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Thu, 19 Mar 2020 05:10:34 GMT', + 'Sun, 14 Jun 2020 04:17:58 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7CBC3DA970F42"', + '"0x8D81019EBAEF055"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'd838c61d-201e-0041-7aac-fd8226000000', + 'c13098a3-201e-003e-5802-42dadf000000', 'x-ms-client-request-id', - 'b22bc58c-f504-4546-a28e-06bcd59e998d', + '8ea3e8cc-757d-4cbe-868f-1d270064bbba', 'x-ms-version', '2019-12-12', 'x-ms-version-id', - '2020-03-19T05:10:34.2652371Z', + '2020-06-14T04:17:58.7309733Z', 'x-ms-is-current-version', 'true', 'x-ms-creation-time', - 'Thu, 19 Mar 2020 05:10:34 GMT', + 'Sun, 14 Jun 2020 04:17:58 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -165,15 +165,15 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-blob-type', 'BlockBlob', 'x-ms-copy-id', - 'cad1df54-bfae-4f8d-877c-6ac60f2e696b', + '3a9897d2-6f20-4c6c-9cb3-45f851205a22', 'x-ms-copy-source', - 'https://fakestorageaccount.blob.core.windows.net/container158459463331705281/blob158459463355705972?sv=2019-07-07&se=2020-03-20T05%3A10%3A33Z&sr=b&sp=racwd&sig=XAxbUEG26%2FCXtFlj2cVNjQ%2B%2F%2FlGjapB%2Ft7y8S6TEt6A%3D', + 'https://fakestorageaccount.blob.core.windows.net/container159210827854300126/blob159210827855903755?sv=2019-12-12&se=2020-06-15T04%3A17%3A58Z&sr=b&sp=racwd', 'x-ms-copy-status', 'success', 'x-ms-copy-progress', '11/11', 'x-ms-copy-completion-time', - 'Thu, 19 Mar 2020 05:10:34 GMT', + 'Sun, 14 Jun 2020 04:17:58 GMT', 'x-ms-server-encrypted', 'true', 'x-ms-access-tier', @@ -181,11 +181,11 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-access-tier-inferred', 'true', 'Date', - 'Thu, 19 Mar 2020 05:10:33 GMT' + 'Sun, 14 Jun 2020 04:17:57 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container158459463331705281') + .delete('/container159210827854300126') .query(true) .reply(202, "", [ 'Content-Length', @@ -193,11 +193,11 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '15fd0c0d-d01e-0018-29ac-fd05a5000000', + 'c13098a7-201e-003e-5c02-42dadf000000', 'x-ms-client-request-id', - '7e0cd9e5-2b41-46df-9d71-414718729662', + '7363a034-0afa-43cd-8094-74adc3c0e648', 'x-ms-version', '2019-12-12', 'Date', - 'Thu, 19 Mar 2020 05:10:34 GMT' + 'Sun, 14 Jun 2020 04:17:58 GMT' ]); diff --git a/sdk/storage/storage-blob/recordings/node/blobserviceclient/recording_find_blob_by_tags_should_work.js b/sdk/storage/storage-blob/recordings/node/blobserviceclient/recording_find_blob_by_tags_should_work.js new file mode 100644 index 000000000000..c48e36a430a4 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blobserviceclient/recording_find_blob_by_tags_should_work.js @@ -0,0 +1,220 @@ +let nock = require('nock'); + +module.exports.hash = "dd7a91564a0c33d834140fadb85525f2"; + +module.exports.testInfo = {"uniqueName":{"container1":"container1159210827477909112","key":"key159210827479503303","key2":"key2159210827479506597","blobname1":"blobname1159210827479506992","val1":"val1159210827479501088","blobname2":"blobname2159210827481107997","val2":"val2159210827481104876","blobname3":"blobname3159210827482604531","val3":"val3159210827482605322"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container1159210827477909112') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:17:54 GMT', + 'ETag', + '"0x8D81019E95725BA"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c130923e-201e-003e-4e02-42dadf000000', + 'x-ms-client-request-id', + 'e5ff72d2-1d79-4c6c-b6c0-87cb28ce5bea', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container1159210827477909112/blobname1159210827479506992') + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:17:54 GMT', + 'ETag', + '"0x8D81019E959B3F5"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309247-201e-003e-5602-42dadf000000', + 'x-ms-client-request-id', + '3ca4c5db-94d8-4fb0-9ed1-53fa8ea167f6', + 'x-ms-version', + '2019-12-12', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-14T04:17:54.8122101Z', + 'Date', + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container1159210827477909112/blobname2159210827481107997') + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:17:54 GMT', + 'ETag', + '"0x8D81019E95BFE4F"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c130924e-201e-003e-5d02-42dadf000000', + 'x-ms-client-request-id', + '0b93a9e0-44cd-4b84-9625-a7f85e88504c', + 'x-ms-version', + '2019-12-12', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-14T04:17:54.8272207Z', + 'Date', + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container1159210827477909112/blobname3159210827482604531') + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:17:54 GMT', + 'ETag', + '"0x8D81019E95E48A9"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309254-201e-003e-6302-42dadf000000', + 'x-ms-client-request-id', + 'f58022f0-a5a7-41d8-95dd-f525fce46c79', + 'x-ms-version', + '2019-12-12', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-14T04:17:54.8422313Z', + 'Date', + 'Sun, 14 Jun 2020 04:17:53 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/') + .query(true) + .reply(200, "\nkey159210827479503303='val1159210827479501088'blobname1159210827479506992container1159210827477909112val1159210827479501088", [ + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/xml', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c13095a5-201e-003e-8002-42dadf000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + 'cfb79d17-3c47-407a-afa2-2c1065b46706', + 'Date', + 'Sun, 14 Jun 2020 04:17:56 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/') + .query(true) + .reply(200, "\nkey159210827479503303='val2159210827481104876'blobname2159210827481107997container1159210827477909112val2159210827481104876", [ + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/xml', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309642-201e-003e-1502-42dadf000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + '2e53d7e7-1cab-4b9d-95e6-b9d5975a880f', + 'Date', + 'Sun, 14 Jun 2020 04:17:56 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/') + .query(true) + .reply(200, "\nkey2159210827479506597='default'1blobname1159210827479506992container1159210827477909112default2!308!MDAwMDQ1IWNvbnRhaW5lcjExNTkyMTA4Mjc0Nzc5MDkxMTIBMDFENjQyMDJDNkUwNzhFMyEwMDAwMjchYmxvYm5hbWUyMTU5MjEwODI3NDgxMTA3OTk3ITAwMDAxNSEIAAAABwAAAGRlZmF1bHQhMDAwMDAxITAhMDAwMDI4ITk5OTktMTItMzFUMjM6NTk6NTkuOTk5OTk5OVohMDAwMDM2ITFmOTIxN2IwLWY4MjctNGIzZi1hOTU3LTlhZjUxMjA5ZjYzNiEwMDAwMjIha2V5MjE1OTIxMDgyNzQ3OTUwNjU5NyE-", [ + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/xml', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309648-201e-003e-1902-42dadf000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + '520a00a3-87aa-4517-a940-711c25751526', + 'Date', + 'Sun, 14 Jun 2020 04:17:56 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/') + .query(true) + .reply(200, "\n2!308!MDAwMDQ1IWNvbnRhaW5lcjExNTkyMTA4Mjc0Nzc5MDkxMTIBMDFENjQyMDJDNkUwNzhFMyEwMDAwMjchYmxvYm5hbWUyMTU5MjEwODI3NDgxMTA3OTk3ITAwMDAxNSEIAAAABwAAAGRlZmF1bHQhMDAwMDAxITAhMDAwMDI4ITk5OTktMTItMzFUMjM6NTk6NTkuOTk5OTk5OVohMDAwMDM2ITFmOTIxN2IwLWY4MjctNGIzZi1hOTU3LTlhZjUxMjA5ZjYzNiEwMDAwMjIha2V5MjE1OTIxMDgyNzQ3OTUwNjU5NyE-key2159210827479506597='default'1blobname2159210827481107997container1159210827477909112default2!308!MDAwMDQ1IWNvbnRhaW5lcjExNTkyMTA4Mjc0Nzc5MDkxMTIBMDFENjQyMDJDNkUwNzhFMyEwMDAwMjchYmxvYm5hbWUzMTU5MjEwODI3NDgyNjA0NTMxITAwMDAxNSEIAAAABwAAAGRlZmF1bHQhMDAwMDAxITAhMDAwMDI4ITk5OTktMTItMzFUMjM6NTk6NTkuOTk5OTk5OVohMDAwMDM2ITBlMWFhNDQ2LTIxYTQtNGYzNC1hMDk1LTkwMjVjY2U1ZTU2YyEwMDAwMjIha2V5MjE1OTIxMDgyNzQ3OTUwNjU5NyE-", [ + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/xml', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309653-201e-003e-2402-42dadf000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + '13fdb176-af07-412b-8a4e-37709dec32a7', + 'Date', + 'Sun, 14 Jun 2020 04:17:56 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/') + .query(true) + .reply(200, "\n2!308!MDAwMDQ1IWNvbnRhaW5lcjExNTkyMTA4Mjc0Nzc5MDkxMTIBMDFENjQyMDJDNkUwNzhFMyEwMDAwMjchYmxvYm5hbWUzMTU5MjEwODI3NDgyNjA0NTMxITAwMDAxNSEIAAAABwAAAGRlZmF1bHQhMDAwMDAxITAhMDAwMDI4ITk5OTktMTItMzFUMjM6NTk6NTkuOTk5OTk5OVohMDAwMDM2ITBlMWFhNDQ2LTIxYTQtNGYzNC1hMDk1LTkwMjVjY2U1ZTU2YyEwMDAwMjIha2V5MjE1OTIxMDgyNzQ3OTUwNjU5NyE-key2159210827479506597='default'1blobname3159210827482604531container1159210827477909112default", [ + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/xml', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c130965a-201e-003e-2b02-42dadf000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + '06eafac4-6d82-4fd4-a1e0-7443acc87c06', + 'Date', + 'Sun, 14 Jun 2020 04:17:56 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container1159210827477909112') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309662-201e-003e-3302-42dadf000000', + 'x-ms-client-request-id', + 'b140e5cd-9f2b-464b-af2d-d8cb1f8a299f', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 04:17:56 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/highlevel/recording_after_all_hook.js b/sdk/storage/storage-blob/recordings/node/highlevel/recording_after_all_hook.js index 438dbf32ba0f..66482dfe75e9 100644 --- a/sdk/storage/storage-blob/recordings/node/highlevel/recording_after_all_hook.js +++ b/sdk/storage/storage-blob/recordings/node/highlevel/recording_after_all_hook.js @@ -1,3 +1,5 @@ let nock = require('nock'); -module.exports.testInfo = {} +module.exports.hash = "b137424a7c843890b2fcbc3ce52013fc"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} diff --git a/sdk/storage/storage-blob/recordings/node/highlevel/recording_before_all_hook.js b/sdk/storage/storage-blob/recordings/node/highlevel/recording_before_all_hook.js index 438dbf32ba0f..6fa31975aaca 100644 --- a/sdk/storage/storage-blob/recordings/node/highlevel/recording_before_all_hook.js +++ b/sdk/storage/storage-blob/recordings/node/highlevel/recording_before_all_hook.js @@ -1,3 +1,5 @@ let nock = require('nock'); -module.exports.testInfo = {} +module.exports.hash = "82a9338d67ceb4b736c6cb55f3326590"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} diff --git a/sdk/storage/storage-blob/recordings/node/highlevel/recording_put_blob_with_maximum_size.js b/sdk/storage/storage-blob/recordings/node/highlevel/recording_put_blob_with_maximum_size.js new file mode 100644 index 000000000000..1c17830343f7 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/highlevel/recording_put_blob_with_maximum_size.js @@ -0,0 +1,45 @@ +let nock = require('nock'); + +module.exports.hash = "a18dce0586d7a166f92e5c66f5646f3b"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210828196209785","blob":"blob159210828199308862"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210828196209785') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:18:01 GMT', + 'ETag', + '"0x8D81019EDA0BAA6"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309cfa-201e-003e-5402-42dadf000000', + 'x-ms-client-request-id', + '90b800fc-19c1-4bae-908d-c2f10fefe97a', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 04:18:01 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159210828196209785') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309e47-201e-003e-0a02-42dadf000000', + 'x-ms-client-request-id', + '63ff77c4-163e-4e9d-b4b6-39b7f855644e', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 04:18:01 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/highlevel/recording_uploadfile_should_work_with_tags.js b/sdk/storage/storage-blob/recordings/node/highlevel/recording_uploadfile_should_work_with_tags.js new file mode 100644 index 000000000000..1c17830343f7 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/highlevel/recording_uploadfile_should_work_with_tags.js @@ -0,0 +1,45 @@ +let nock = require('nock'); + +module.exports.hash = "a18dce0586d7a166f92e5c66f5646f3b"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210828196209785","blob":"blob159210828199308862"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210828196209785') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:18:01 GMT', + 'ETag', + '"0x8D81019EDA0BAA6"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309cfa-201e-003e-5402-42dadf000000', + 'x-ms-client-request-id', + '90b800fc-19c1-4bae-908d-c2f10fefe97a', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 04:18:01 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159210828196209785') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309e47-201e-003e-0a02-42dadf000000', + 'x-ms-client-request-id', + '63ff77c4-163e-4e9d-b4b6-39b7f855644e', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 04:18:01 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/shared_access_signature_sas_generation_nodejs_only/recording_generateblobsasqueryparameters_should_work_for_blob_tags.js b/sdk/storage/storage-blob/recordings/node/shared_access_signature_sas_generation_nodejs_only/recording_generateblobsasqueryparameters_should_work_for_blob_tags.js new file mode 100644 index 000000000000..9371e6a8c4e7 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/shared_access_signature_sas_generation_nodejs_only/recording_generateblobsasqueryparameters_should_work_for_blob_tags.js @@ -0,0 +1,138 @@ +let nock = require('nock'); + +module.exports.hash = "73a2c4fc997ae1e0a0357e5464a79f55"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210828276003907","blob":"blob159210828277501390"},"newDate":{"now":"2020-06-14T04:18:02.760Z","tmr":"2020-06-14T04:18:02.760Z"}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210828276003907') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:18:02 GMT', + 'ETag', + '"0x8D81019EE19831E"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309e63-201e-003e-2602-42dadf000000', + 'x-ms-client-request-id', + 'd8d17bc9-6db3-4457-9a44-76789fbb59e6', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 04:18:01 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210828276003907/blob159210828277501390') + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:18:02 GMT', + 'ETag', + '"0x8D81019EE1C36AA"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309e70-201e-003e-3102-42dadf000000', + 'x-ms-client-request-id', + '73cda227-0857-497c-a9ea-33caf4d5a3ed', + 'x-ms-version', + '2019-12-12', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-14T04:18:02.7988417Z', + 'Date', + 'Sun, 14 Jun 2020 04:18:01 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210828276003907/blob159210828277501390', "tag1val1tag2val2") + .query(true) + .reply(204, "", [ + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309e77-201e-003e-3802-42dadf000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + 'fd59e5da-e888-409b-8225-a6e7ef9520f1', + 'Date', + 'Sun, 14 Jun 2020 04:18:01 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container159210828276003907/blob159210828277501390') + .query(true) + .reply(200, [], [ + 'Cache-Control', + 'cache-control-override', + 'Content-Length', + '1024', + 'Content-Type', + 'content-type-override', + 'Content-Encoding', + 'content-encoding-override', + 'Content-Language', + 'content-language-override', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:18:02 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D81019EE1C36AA"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309e79-201e-003e-3a02-42dadf000000', + 'x-ms-client-request-id', + '51729296-84c3-42e9-85b9-3f617edc8526', + 'x-ms-version', + '2019-12-12', + 'x-ms-tag-count', + '2', + 'x-ms-version-id', + '2020-06-14T04:18:02.7988417Z', + 'x-ms-is-current-version', + 'true', + 'x-ms-creation-time', + 'Sun, 14 Jun 2020 04:18:02 GMT', + 'x-ms-lease-status', + 'unlocked', + 'x-ms-lease-state', + 'available', + 'x-ms-blob-type', + 'PageBlob', + 'x-ms-blob-sequence-number', + '0', + 'Content-Disposition', + 'content-disposition-override', + 'x-ms-server-encrypted', + 'true', + 'Date', + 'Sun, 14 Jun 2020 04:18:01 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159210828276003907') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309e7d-201e-003e-3e02-42dadf000000', + 'x-ms-client-request-id', + '73e3d781-a8e4-4f55-8cf6-7a80f2c52cc5', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 04:18:01 GMT' +]); diff --git a/sdk/storage/storage-blob/test/blobversioning.spec.ts b/sdk/storage/storage-blob/test/blobversioning.spec.ts index 72236c7a6d20..36c9319bb235 100644 --- a/sdk/storage/storage-blob/test/blobversioning.spec.ts +++ b/sdk/storage/storage-blob/test/blobversioning.spec.ts @@ -7,7 +7,7 @@ import { recorderEnvSetup, bodyToString, getGenericCredential, - isBlobVersioningDisabled, + isBlobVersioningDisabled } from "./utils"; import { record, Recorder } from "@azure/test-utils-recorder"; import { @@ -16,11 +16,9 @@ import { BlobClient, BlockBlobClient, BlockBlobUploadResponse, - BlobBatch, + BlobBatch } from "../src"; -import { - setURLParameter, -} from "../src/utils/utils.common"; +import { setURLParameter } from "../src/utils/utils.common"; import { Test_CPK_INFO } from "./utils/constants"; dotenv.config({ path: "../.env" }); @@ -37,13 +35,13 @@ describe("Blob versioning", () => { let recorder: Recorder; - before(async function () { + before(async function() { if (isBlobVersioningDisabled()) { this.skip(); } }); - beforeEach(async function () { + beforeEach(async function() { recorder = record(this, recorderEnvSetup); blobServiceClient = getBSU(); containerName = recorder.getUniqueName("container"); @@ -56,7 +54,7 @@ describe("Blob versioning", () => { uploadRes2 = await blockBlobClient.upload("", 0); }); - afterEach(async function () { + afterEach(async function() { await containerClient.delete(); recorder.stop(); }); @@ -76,7 +74,7 @@ describe("Blob versioning", () => { const result = ( await containerClient .listBlobsFlat({ - includeVersions: true, + includeVersions: true }) .byPage() .next() @@ -94,7 +92,6 @@ describe("Blob versioning", () => { assert.deepStrictEqual(await bodyToString(downloadRes, content.length), content); assert.deepStrictEqual(downloadRes.versionId, uploadRes.versionId); - const downloadRes2 = await blobClient.withVersion(uploadRes2.versionId!).download(); assert.deepStrictEqual(await bodyToString(downloadRes2), ""); assert.deepStrictEqual(downloadRes2.versionId, uploadRes2.versionId); @@ -105,8 +102,10 @@ describe("Blob versioning", () => { } }); - it("download a version to file", async function () { - if (!isNode) { this.skip(); } + it("download a version to file", async function() { + if (!isNode) { + this.skip(); + } recorder.skip("node", "Temp file - recorder doesn't support saving the file"); const downloadedFilePath = recorder.getUniqueName("downloadedtofile"); await blobClient.withVersion(uploadRes.versionId!).downloadToFile(downloadedFilePath); @@ -178,7 +177,10 @@ describe("Blob versioning", () => { const credential = getGenericCredential(""); let batchDeleteRequest = new BlobBatch(); for (let i = 0; i < blockBlobCount; i++) { - await batchDeleteRequest.deleteBlob(blockBlobClients[i].withVersion(versions[i]!).url, credential); + await batchDeleteRequest.deleteBlob( + blockBlobClients[i].withVersion(versions[i]!).url, + credential + ); } // Submit batch request and verify response. @@ -193,14 +195,17 @@ describe("Blob versioning", () => { assert.equal(resp.subResponses[i].status, 202); assert.ok(resp.subResponses[i].statusMessage != ""); assert.ok(resp.subResponses[i].headers.contains("x-ms-request-id")); - assert.equal(resp.subResponses[i]._request.url, blockBlobClients[i].withVersion(versions[i]!).url); + assert.equal( + resp.subResponses[i]._request.url, + blockBlobClients[i].withVersion(versions[i]!).url + ); } // Verify blob versions deleted. const resp2 = ( await containerClient .listBlobsFlat({ - includeVersions: true, + includeVersions: true }) .byPage() .next() @@ -210,7 +215,7 @@ describe("Blob versioning", () => { it("deleting root blob with versionId should fail", async () => { await containerClient.deleteBlob(blobName, { - versionId: uploadRes.versionId, + versionId: uploadRes.versionId }); const versionExists = await blobClient.withVersion(uploadRes.versionId!).exists(); assert.ok(!versionExists); @@ -218,7 +223,7 @@ describe("Blob versioning", () => { let exceptionCaught: boolean = false; try { await containerClient.deleteBlob(blobName, { - versionId: uploadRes2.versionId, + versionId: uploadRes2.versionId }); } catch (err) { assert.equal(err.details.errorCode, "OperationNotAllowedOnRootBlob"); @@ -307,7 +312,7 @@ describe("Blob versioning", () => { const listRes = ( await containerClient .listBlobsFlat({ - includeVersions: true, + includeVersions: true }) .byPage() .next() @@ -335,7 +340,11 @@ describe("Blob versioning", () => { }); it("upload block blob return versionId", async () => { - const containerUploadRes = await containerClient.uploadBlockBlob(blobName, content, content.length); + const containerUploadRes = await containerClient.uploadBlockBlob( + blobName, + content, + content.length + ); assert.ok(containerUploadRes.response.versionId); if (!isNode) { @@ -370,7 +379,10 @@ describe("Blob versioning", () => { }); await delay(30 * 1000); properties = await blobServiceClient.getProperties(); - assert.ok(properties.deleteRetentionPolicy!.enabled, "deleteRetentionPolicy should be enabled."); + assert.ok( + properties.deleteRetentionPolicy!.enabled, + "deleteRetentionPolicy should be enabled." + ); } const blobVersionClient = blobClient.withVersion(uploadRes.versionId!); @@ -386,12 +398,12 @@ describe("Blob versioning", () => { const CPKblobClient = containerClient.getBlobClient(CPKblobName); const CPKblockBlobClient = CPKblobClient.getBlockBlobClient(); await CPKblockBlobClient.upload(content, content.length, { - customerProvidedKey: Test_CPK_INFO, + customerProvidedKey: Test_CPK_INFO }); if (isNode) { const downloadToBufferRes = await CPKblockBlobClient.downloadToBuffer(undefined, undefined, { - customerProvidedKey: Test_CPK_INFO, + customerProvidedKey: Test_CPK_INFO }); assert.ok(downloadToBufferRes.equals(Buffer.from(content))); From 2a8ff8aae4d21825f24e71bf344cdbc994c787ed Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Sun, 14 Jun 2020 20:43:26 +0800 Subject: [PATCH 25/39] record --- ...ize_eq_block_blob_max_stage_block_bytes.js | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 sdk/storage/storage-blob/recordings/node/highlevel/recording_uploadfile_should_succeed_with_blocksize_eq_block_blob_max_stage_block_bytes.js diff --git a/sdk/storage/storage-blob/recordings/node/highlevel/recording_uploadfile_should_succeed_with_blocksize_eq_block_blob_max_stage_block_bytes.js b/sdk/storage/storage-blob/recordings/node/highlevel/recording_uploadfile_should_succeed_with_blocksize_eq_block_blob_max_stage_block_bytes.js new file mode 100644 index 000000000000..1c17830343f7 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/highlevel/recording_uploadfile_should_succeed_with_blocksize_eq_block_blob_max_stage_block_bytes.js @@ -0,0 +1,45 @@ +let nock = require('nock'); + +module.exports.hash = "a18dce0586d7a166f92e5c66f5646f3b"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210828196209785","blob":"blob159210828199308862"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210828196209785') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:18:01 GMT', + 'ETag', + '"0x8D81019EDA0BAA6"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309cfa-201e-003e-5402-42dadf000000', + 'x-ms-client-request-id', + '90b800fc-19c1-4bae-908d-c2f10fefe97a', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 04:18:01 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159210828196209785') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309e47-201e-003e-0a02-42dadf000000', + 'x-ms-client-request-id', + '63ff77c4-163e-4e9d-b4b6-39b7f855644e', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 04:18:01 GMT' +]); From d16d3dfbb959337ef3359daf04c4f62e704ec15b Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Sun, 14 Jun 2020 23:31:16 +0800 Subject: [PATCH 26/39] add version check for x permission --- .../src/AccountSASSignatureValues.ts | 8 +++++ .../src/BlobSASSignatureValues.ts | 34 +++++++++++++++++-- 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/sdk/storage/storage-blob/src/AccountSASSignatureValues.ts b/sdk/storage/storage-blob/src/AccountSASSignatureValues.ts index d9f798f90d66..5c85d0e649b3 100644 --- a/sdk/storage/storage-blob/src/AccountSASSignatureValues.ts +++ b/sdk/storage/storage-blob/src/AccountSASSignatureValues.ts @@ -118,6 +118,14 @@ export function generateAccountSASQueryParameters( ? accountSASSignatureValues.version : SERVICE_VERSION; + if ( + accountSASSignatureValues.permissions && + accountSASSignatureValues.permissions.deleteVersion && + version < "2019-10-10" + ) { + throw RangeError("'version' must be >= '2019-12-12' when provided 'x' permission."); + } + const parsedPermissions = AccountSASPermissions.parse( accountSASSignatureValues.permissions.toString() ); diff --git a/sdk/storage/storage-blob/src/BlobSASSignatureValues.ts b/sdk/storage/storage-blob/src/BlobSASSignatureValues.ts index b3eff14da424..2f2fe6c354dc 100644 --- a/sdk/storage/storage-blob/src/BlobSASSignatureValues.ts +++ b/sdk/storage/storage-blob/src/BlobSASSignatureValues.ts @@ -375,6 +375,13 @@ function generateBlobSASQueryParameters20150405( if (blobSASSignatureValues.versionId) { throw RangeError("'version' must be >= '2019-10-10' when provided 'versionId'."); } + if ( + blobSASSignatureValues.permissions && + (blobSASSignatureValues.permissions as BlobSASPermissions).deleteVersion && + version < "2019-10-10" + ) { + throw RangeError("'version' must be >= '2019-12-12' when provided 'x' permission."); + } if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.tag) { throw RangeError("'version' must be >= '2019-12-12' when provided 't' permission."); @@ -482,6 +489,13 @@ function generateBlobSASQueryParameters20181109( if (blobSASSignatureValues.versionId && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when provided 'versionId'."); } + if ( + blobSASSignatureValues.permissions && + (blobSASSignatureValues.permissions as BlobSASPermissions).deleteVersion && + version < "2019-10-10" + ) { + throw RangeError("'version' must be >= '2019-12-12' when provided 'x' permission."); + } if ( blobSASSignatureValues.permissions && @@ -597,11 +611,27 @@ function generateBlobSASQueryParametersUDK20181109( ); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.tag) { + const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; + + if (blobSASSignatureValues.versionId && version < "2019-10-10") { + throw RangeError("'version' must be >= '2019-10-10' when provided 'versionId'."); + } + if ( + blobSASSignatureValues.permissions && + (blobSASSignatureValues.permissions as BlobSASPermissions).deleteVersion && + version < "2019-10-10" + ) { + throw RangeError("'version' must be >= '2019-12-12' when provided 'x' permission."); + } + + if ( + blobSASSignatureValues.permissions && + blobSASSignatureValues.permissions.tag && + version < "2019-12-12" + ) { throw RangeError("'version' must be >= '2019-12-12' when provided 't' permission."); } - const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; let resource: string = "c"; let verifiedPermissions: string | undefined; From bd253fc032831f8b3eb0d722e02a33aef25f2fac Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Sun, 14 Jun 2020 16:43:55 +0000 Subject: [PATCH 27/39] record for browser --- .../recording_download_a_version_to_file.json | 100 +++++++++ ...ate_append_blob_should_work_with_tags.json | 137 ++++++++++++ ...block_blob_blob_should_work_with_tags.json | 139 ++++++++++++ ...reate_page_blob_should_work_with_tags.json | 137 ++++++++++++ ...blob_tags_should_work_with_a_snapshot.json | 139 ++++++++++++ .../recording_set_blob_tags_should_work.json | 200 ++++++++++++++++++ 6 files changed, 852 insertions(+) create mode 100644 sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_download_a_version_to_file.json create mode 100644 sdk/storage/storage-blob/recordings/browsers/blobclient/recording_create_append_blob_should_work_with_tags.json create mode 100644 sdk/storage/storage-blob/recordings/browsers/blobclient/recording_create_block_blob_blob_should_work_with_tags.json create mode 100644 sdk/storage/storage-blob/recordings/browsers/blobclient/recording_create_page_blob_should_work_with_tags.json create mode 100644 sdk/storage/storage-blob/recordings/browsers/blobclient/recording_get_blob_tags_should_work_with_a_snapshot.json create mode 100644 sdk/storage/storage-blob/recordings/browsers/blobclient/recording_set_blob_tags_should_work.json diff --git a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_download_a_version_to_file.json b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_download_a_version_to_file.json new file mode 100644 index 000000000000..47064d01ad99 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_download_a_version_to_file.json @@ -0,0 +1,100 @@ +{ + "recordings": [ + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215215896309782", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Sun, 14 Jun 2020 16:29:18 GMT", + "etag": "\"0x8D81080165BAEA8\"", + "last-modified": "Sun, 14 Jun 2020 16:29:18 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "7d42c949-2126-43f1-81a5-6e71562144be", + "x-ms-request-id": "1ae6bd44-c01e-0009-7e68-420873000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215215896309782/blob159215215898803746", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "Hello World", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "date": "Sun, 14 Jun 2020 16:29:18 GMT", + "etag": "\"0x8D81080165F843C\"", + "last-modified": "Sun, 14 Jun 2020 16:29:19 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "b3d4d1f8-2e4c-46b1-a5fd-5bca768d99ed", + "x-ms-content-crc64": "YeJLfssylmU=", + "x-ms-request-id": "1ae6bd54-c01e-0009-0d68-420873000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-06-14T16:29:19.0142012Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215215896309782/blob159215215898803746", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "date": "Sun, 14 Jun 2020 16:29:18 GMT", + "etag": "\"0x8D810801661F5A9\"", + "last-modified": "Sun, 14 Jun 2020 16:29:19 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "68cd0399-52fe-46a7-bf75-70e244576035", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "x-ms-request-id": "1ae6bd60-c01e-0009-1968-420873000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-06-14T16:29:19.0312121Z" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215215896309782", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Sun, 14 Jun 2020 16:29:18 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "de63ec73-138b-40a8-a1f0-005715bf0dd2", + "x-ms-request-id": "1ae6bd6a-c01e-0009-2368-420873000000", + "x-ms-version": "2019-12-12" + } + } + ], + "uniqueTestInfo": { + "uniqueName": { + "container": "container159215215896309782", + "blob": "blob159215215898803746" + }, + "newDate": {} + }, + "hash": "2c6decd6d2e8df811c5baba00d0309bb" +} \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_create_append_blob_should_work_with_tags.json b/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_create_append_blob_should_work_with_tags.json new file mode 100644 index 000000000000..5bcbe868883f --- /dev/null +++ b/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_create_append_blob_should_work_with_tags.json @@ -0,0 +1,137 @@ +{ + "recordings": [ + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215214551806596", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Sun, 14 Jun 2020 16:29:04 GMT", + "etag": "\"0x8D810800E57E396\"", + "last-modified": "Sun, 14 Jun 2020 16:29:05 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "3638240f-b7a3-429a-a9b2-ba7a04315ac8", + "x-ms-request-id": "1ae6a46c-c01e-0009-6968-420873000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215214551806596/blob159215214554005971", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "Hello World", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "date": "Sun, 14 Jun 2020 16:29:04 GMT", + "etag": "\"0x8D810800E5B493D\"", + "last-modified": "Sun, 14 Jun 2020 16:29:05 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "9c008653-9ead-4ae0-a85a-173d2d614658", + "x-ms-content-crc64": "YeJLfssylmU=", + "x-ms-request-id": "1ae6a47e-c01e-0009-7868-420873000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-06-14T16:29:05.5647037Z" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215214551806596/blob159215214554005971", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Sun, 14 Jun 2020 16:29:04 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "b3354f08-1ca7-4cd5-a635-9d4ecc330644", + "x-ms-delete-type-permanent": "false", + "x-ms-request-id": "1ae6a491-c01e-0009-0b68-420873000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215214551806596/blob159215214554005971", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Sun, 14 Jun 2020 16:29:04 GMT", + "etag": "\"0x8D810800E624F61\"", + "last-modified": "Sun, 14 Jun 2020 16:29:05 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "d1a4bb14-c88d-453d-aedc-11c3cdb3bd13", + "x-ms-request-id": "1ae6a499-c01e-0009-1368-420873000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-06-14T16:29:05.6107361Z" + } + }, + { + "method": "GET", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215214551806596/blob159215214554005971", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "comp": "tags" + }, + "requestBody": null, + "status": 200, + "response": "\ntag1val1tag2val2", + "responseHeaders": { + "content-length": "162", + "content-type": "application/xml", + "date": "Sun, 14 Jun 2020 16:29:04 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "aec7fefc-7641-4f71-98f8-6b1dd5c5b38a", + "x-ms-request-id": "1ae6a4a8-c01e-0009-2268-420873000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215214551806596", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Sun, 14 Jun 2020 16:29:04 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "4fef5df9-5b85-4eea-a5ab-2b008fafe9bd", + "x-ms-request-id": "1ae6a4b1-c01e-0009-2b68-420873000000", + "x-ms-version": "2019-12-12" + } + } + ], + "uniqueTestInfo": { + "uniqueName": { + "container": "container159215214551806596", + "blob": "blob159215214554005971" + }, + "newDate": {} + }, + "hash": "3448881c36f419bc94b581ee37224655" +} \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_create_block_blob_blob_should_work_with_tags.json b/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_create_block_blob_blob_should_work_with_tags.json new file mode 100644 index 000000000000..8a9bd6e5c666 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_create_block_blob_blob_should_work_with_tags.json @@ -0,0 +1,139 @@ +{ + "recordings": [ + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215214532602071", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Sun, 14 Jun 2020 16:29:04 GMT", + "etag": "\"0x8D810800E3A9241\"", + "last-modified": "Sun, 14 Jun 2020 16:29:05 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "6bc32346-b174-41cd-91ae-e1a122a927d7", + "x-ms-request-id": "1ae6a406-c01e-0009-0868-420873000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215214532602071/blob159215214534908371", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "Hello World", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "date": "Sun, 14 Jun 2020 16:29:04 GMT", + "etag": "\"0x8D810800E3E1F06\"", + "last-modified": "Sun, 14 Jun 2020 16:29:05 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "60793102-2f4b-48b8-bdb3-8db941da8561", + "x-ms-content-crc64": "YeJLfssylmU=", + "x-ms-request-id": "1ae6a416-c01e-0009-1768-420873000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-06-14T16:29:05.3735686Z" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215214532602071/blob159215214534908371", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Sun, 14 Jun 2020 16:29:04 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "98a4d0cb-9bd4-4e8c-b75c-0b1dc17f2ff6", + "x-ms-delete-type-permanent": "false", + "x-ms-request-id": "1ae6a424-c01e-0009-2468-420873000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215214532602071/blob159215214534908371", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "hello", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "XUFAKrxLKna5cZ2REBfFkg==", + "date": "Sun, 14 Jun 2020 16:29:04 GMT", + "etag": "\"0x8D810800E4C797D\"", + "last-modified": "Sun, 14 Jun 2020 16:29:05 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "73132f4a-78c6-4f67-b880-1d21c4d4d46a", + "x-ms-content-crc64": "V0JSBnCFdzM=", + "x-ms-request-id": "1ae6a441-c01e-0009-4068-420873000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-06-14T16:29:05.4686356Z" + } + }, + { + "method": "GET", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215214532602071/blob159215214534908371", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "comp": "tags" + }, + "requestBody": null, + "status": 200, + "response": "\ntag1val1tag2val2", + "responseHeaders": { + "content-length": "162", + "content-type": "application/xml", + "date": "Sun, 14 Jun 2020 16:29:04 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "1b9eaf22-a2b1-4bee-8f58-dc05b0ebb274", + "x-ms-request-id": "1ae6a452-c01e-0009-5168-420873000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215214532602071", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Sun, 14 Jun 2020 16:29:04 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "49d37774-9788-4d09-bdf5-2338a2d1301d", + "x-ms-request-id": "1ae6a462-c01e-0009-5f68-420873000000", + "x-ms-version": "2019-12-12" + } + } + ], + "uniqueTestInfo": { + "uniqueName": { + "container": "container159215214532602071", + "blob": "blob159215214534908371" + }, + "newDate": {} + }, + "hash": "9ae7d47fe8b3282fa0b8ddcfb760c932" +} \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_create_page_blob_should_work_with_tags.json b/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_create_page_blob_should_work_with_tags.json new file mode 100644 index 000000000000..0d8c75fa3d80 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_create_page_blob_should_work_with_tags.json @@ -0,0 +1,137 @@ +{ + "recordings": [ + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215214566001138", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Sun, 14 Jun 2020 16:29:04 GMT", + "etag": "\"0x8D810800E6D6B53\"", + "last-modified": "Sun, 14 Jun 2020 16:29:05 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "376f6566-9821-4b9b-880b-55159adec41a", + "x-ms-request-id": "1ae6a4be-c01e-0009-3868-420873000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215214566001138/blob159215214568105710", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "Hello World", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "date": "Sun, 14 Jun 2020 16:29:04 GMT", + "etag": "\"0x8D810800E70F802\"", + "last-modified": "Sun, 14 Jun 2020 16:29:05 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "1193106c-73e5-46de-8fa8-e947aa7f4e9d", + "x-ms-content-crc64": "YeJLfssylmU=", + "x-ms-request-id": "1ae6a4ce-c01e-0009-4768-420873000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-06-14T16:29:05.7068034Z" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215214566001138/blob159215214568105710", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Sun, 14 Jun 2020 16:29:04 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "225c4216-fc1a-4b3a-8911-ee55cea68005", + "x-ms-delete-type-permanent": "false", + "x-ms-request-id": "1ae6a4d9-c01e-0009-5268-420873000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215214566001138/blob159215214568105710", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Sun, 14 Jun 2020 16:29:05 GMT", + "etag": "\"0x8D810800E7936E3\"", + "last-modified": "Sun, 14 Jun 2020 16:29:05 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "f8bf5fce-9e5a-4950-9305-627f6369d7b0", + "x-ms-request-id": "1ae6a4ed-c01e-0009-6368-420873000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-06-14T16:29:05.7608419Z" + } + }, + { + "method": "GET", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215214566001138/blob159215214568105710", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "comp": "tags" + }, + "requestBody": null, + "status": 200, + "response": "\ntag1val1tag2val2", + "responseHeaders": { + "content-length": "162", + "content-type": "application/xml", + "date": "Sun, 14 Jun 2020 16:29:05 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "1fbcc47c-c8d1-4619-80f1-13c25010ffd3", + "x-ms-request-id": "1ae6a4f7-c01e-0009-6c68-420873000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215214566001138", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Sun, 14 Jun 2020 16:29:05 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "692c3493-a4dc-466c-ba91-50536d81b564", + "x-ms-request-id": "1ae6a4fe-c01e-0009-7268-420873000000", + "x-ms-version": "2019-12-12" + } + } + ], + "uniqueTestInfo": { + "uniqueName": { + "container": "container159215214566001138", + "blob": "blob159215214568105710" + }, + "newDate": {} + }, + "hash": "c34d2c75258fc3dc2706eefcc0df3305" +} \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_get_blob_tags_should_work_with_a_snapshot.json b/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_get_blob_tags_should_work_with_a_snapshot.json new file mode 100644 index 000000000000..f000633a8925 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_get_blob_tags_should_work_with_a_snapshot.json @@ -0,0 +1,139 @@ +{ + "recordings": [ + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215214518107374", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Sun, 14 Jun 2020 16:29:04 GMT", + "etag": "\"0x8D810800E24E36D\"", + "last-modified": "Sun, 14 Jun 2020 16:29:05 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "35d94d56-3672-42df-ae17-0a870dd56351", + "x-ms-request-id": "1ae6a39b-c01e-0009-2568-420873000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215214518107374/blob159215214520808190", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "Hello World", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "date": "Sun, 14 Jun 2020 16:29:04 GMT", + "etag": "\"0x8D810800E289758\"", + "last-modified": "Sun, 14 Jun 2020 16:29:05 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "ed76789c-b9a2-4f9b-b2d6-e0e9cde7057d", + "x-ms-content-crc64": "YeJLfssylmU=", + "x-ms-request-id": "1ae6a3b5-c01e-0009-3c68-420873000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-06-14T16:29:05.2324696Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215214518107374/blob159215214520808190", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "comp": "tags" + }, + "requestBody": "tag1val1tag2val2", + "status": 204, + "response": "", + "responseHeaders": { + "date": "Sun, 14 Jun 2020 16:29:04 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "a61da786-3ed5-43d5-aa94-32dba7f9936c", + "x-ms-request-id": "1ae6a3c7-c01e-0009-4e68-420873000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215214518107374/blob159215214520808190", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "comp": "snapshot" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Sun, 14 Jun 2020 16:29:04 GMT", + "etag": "\"0x8D810800E289758\"", + "last-modified": "Sun, 14 Jun 2020 16:29:05 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "87c08057-92a1-4e03-a781-8f0ab15b9138", + "x-ms-request-id": "1ae6a3d8-c01e-0009-5e68-420873000000", + "x-ms-request-server-encrypted": "false", + "x-ms-snapshot": "2020-06-14T16:29:05.2795013Z", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-06-14T16:29:05.2805013Z" + } + }, + { + "method": "GET", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215214518107374/blob159215214520808190", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "snapshot": "2020-06-14T16:29:05.2795013Z", + "comp": "tags" + }, + "requestBody": null, + "status": 200, + "response": "\ntag1val1tag2val2", + "responseHeaders": { + "content-length": "162", + "content-type": "application/xml", + "date": "Sun, 14 Jun 2020 16:29:04 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "e2a4f847-31ab-440d-96ee-e4f7d35ada77", + "x-ms-request-id": "1ae6a3e6-c01e-0009-6968-420873000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215214518107374", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Sun, 14 Jun 2020 16:29:04 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "cd54acb7-45af-44dc-a0b5-747d7715fa40", + "x-ms-request-id": "1ae6a3f3-c01e-0009-7568-420873000000", + "x-ms-version": "2019-12-12" + } + } + ], + "uniqueTestInfo": { + "uniqueName": { + "container": "container159215214518107374", + "blob": "blob159215214520808190" + }, + "newDate": {} + }, + "hash": "d7615e1ba6e1e78a4980c2999e4e412a" +} \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_set_blob_tags_should_work.json b/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_set_blob_tags_should_work.json new file mode 100644 index 000000000000..f6c34ba523ee --- /dev/null +++ b/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_set_blob_tags_should_work.json @@ -0,0 +1,200 @@ +{ + "recordings": [ + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215214472008805", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Sun, 14 Jun 2020 16:29:04 GMT", + "etag": "\"0x8D810800DDE097D\"", + "last-modified": "Sun, 14 Jun 2020 16:29:04 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "c0ebbb1d-a72c-4580-972e-14f38e690cad", + "x-ms-request-id": "1ae6a2b8-c01e-0009-4868-420873000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215214472008805/blob159215214475304126", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "Hello World", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "date": "Sun, 14 Jun 2020 16:29:04 GMT", + "etag": "\"0x8D810800DE36B89\"", + "last-modified": "Sun, 14 Jun 2020 16:29:04 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "b62ad5d7-c2e6-4c8a-89ab-b5359e546420", + "x-ms-content-crc64": "YeJLfssylmU=", + "x-ms-request-id": "1ae6a2c1-c01e-0009-5068-420873000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-06-14T16:29:04.7801504Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215214472008805/blob159215214475304126", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "comp": "tags" + }, + "requestBody": "tag1val1tag2val2", + "status": 204, + "response": "", + "responseHeaders": { + "date": "Sun, 14 Jun 2020 16:29:04 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "10bfa9a6-7e0e-41e2-8a09-3dd095d862af", + "x-ms-request-id": "1ae6a2cd-c01e-0009-5b68-420873000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "GET", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215214472008805/blob159215214475304126", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "comp": "tags" + }, + "requestBody": null, + "status": 200, + "response": "\ntag1val1tag2val2", + "responseHeaders": { + "content-length": "162", + "content-type": "application/xml", + "date": "Sun, 14 Jun 2020 16:29:04 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "9e86bf49-cbb0-4770-aaf2-d3f9b9ec74ca", + "x-ms-request-id": "1ae6a327-c01e-0009-3568-420873000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "HEAD", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215214472008805/blob159215214475304126", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": null, + "status": 200, + "response": "", + "responseHeaders": { + "accept-ranges": "bytes", + "content-length": "11", + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "content-type": "application/octet-stream", + "date": "Sun, 14 Jun 2020 16:29:04 GMT", + "etag": "\"0x8D810800DE36B89\"", + "last-modified": "Sun, 14 Jun 2020 16:29:04 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-access-tier": "Hot", + "x-ms-access-tier-inferred": "true", + "x-ms-blob-type": "BlockBlob", + "x-ms-client-request-id": "8b863948-5fda-4c80-b296-709bb357ed96", + "x-ms-creation-time": "Sun, 14 Jun 2020 16:29:04 GMT", + "x-ms-is-current-version": "true", + "x-ms-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-request-id": "1ae6a352-c01e-0009-5d68-420873000000", + "x-ms-server-encrypted": "true", + "x-ms-tag-count": "2", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-06-14T16:29:04.7801504Z" + } + }, + { + "method": "GET", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215214472008805/blob159215214475304126", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": null, + "status": 200, + "response": "Hello World", + "responseHeaders": { + "accept-ranges": "bytes", + "content-length": "11", + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "content-type": "application/octet-stream", + "date": "Sun, 14 Jun 2020 16:29:04 GMT", + "etag": "\"0x8D810800DE36B89\"", + "last-modified": "Sun, 14 Jun 2020 16:29:04 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-type": "BlockBlob", + "x-ms-client-request-id": "cd478104-d939-4457-8038-b0ea43b0951a", + "x-ms-creation-time": "Sun, 14 Jun 2020 16:29:04 GMT", + "x-ms-is-current-version": "true", + "x-ms-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-request-id": "1ae6a367-c01e-0009-7268-420873000000", + "x-ms-server-encrypted": "true", + "x-ms-tag-count": "2", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-06-14T16:29:04.7801504Z" + } + }, + { + "method": "GET", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215214472008805", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "include": "tags", + "restype": "container", + "comp": "list" + }, + "requestBody": null, + "status": 200, + "response": "blob1592152144753041262020-06-14T16:29:04.7801504ZtrueSun, 14 Jun 2020 16:29:04 GMTSun, 14 Jun 2020 16:29:04 GMT0x8D810800DE36B8911application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottrueunlockedavailabletrue2tag1val1tag2val2", + "responseHeaders": { + "content-type": "application/xml", + "date": "Sun, 14 Jun 2020 16:29:04 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "transfer-encoding": "chunked", + "x-ms-client-request-id": "7d357061-3f1c-47c0-b3c8-277312b8bfe6", + "x-ms-request-id": "1ae6a372-c01e-0009-7d68-420873000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215214472008805", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Sun, 14 Jun 2020 16:29:04 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "633e63a8-081b-4683-9ec4-10c6fbb4f32a", + "x-ms-request-id": "1ae6a386-c01e-0009-1168-420873000000", + "x-ms-version": "2019-12-12" + } + } + ], + "uniqueTestInfo": { + "uniqueName": { + "container": "container159215214472008805", + "blob": "blob159215214475304126" + }, + "newDate": {} + }, + "hash": "702368b97c315adc6b87f0de16612c14" +} \ No newline at end of file From 7e6554d40aa9ed0710fcdabdf51f1c099a6c8feb Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Mon, 15 Jun 2020 10:09:44 +0800 Subject: [PATCH 28/39] wip --- .../storage-blob/test/blobclient.spec.ts | 22 ++++ .../storage-blob/test/blobversioning.spec.ts | 108 ++++++------------ .../test/node/highlevel.node.spec.ts | 25 ++++ 3 files changed, 85 insertions(+), 70 deletions(-) diff --git a/sdk/storage/storage-blob/test/blobclient.spec.ts b/sdk/storage/storage-blob/test/blobclient.spec.ts index f0ebdf745a7a..45f6b7304d15 100644 --- a/sdk/storage/storage-blob/test/blobclient.spec.ts +++ b/sdk/storage/storage-blob/test/blobclient.spec.ts @@ -719,6 +719,28 @@ describe("BlobClient", () => { } assert.ok(exceptionCaught); }); + + it.only("exists with condition", async () => { + const leaseResp = await blobClient.getBlobLeaseClient().acquireLease(30); + assert.ok(leaseResp.leaseId); + + assert.ok(await blobClient.exists({ conditions: { leaseId: leaseResp.leaseId! } })); + + let exceptionCaught = false; + try { + let guid = "ca761232ed4211cebacd00aa0057b223"; + if (guid === leaseResp.leaseId) { + guid = "ca761232ed4211cebacd00aa0057b224"; + } + + const existsRes = await blobClient.exists({ conditions: { leaseId: guid } }); + console.log(existsRes); + } catch (err) { + assert.equal(err.details.errorCode, "LeaseIdMismatchWithBlobOperation"); + exceptionCaught = true; + } + assert.ok(exceptionCaught); + }); }); describe("BlobClient - Verify Name Properties", () => { diff --git a/sdk/storage/storage-blob/test/blobversioning.spec.ts b/sdk/storage/storage-blob/test/blobversioning.spec.ts index 72236c7a6d20..545b3f130fcc 100644 --- a/sdk/storage/storage-blob/test/blobversioning.spec.ts +++ b/sdk/storage/storage-blob/test/blobversioning.spec.ts @@ -7,7 +7,7 @@ import { recorderEnvSetup, bodyToString, getGenericCredential, - isBlobVersioningDisabled, + isBlobVersioningDisabled } from "./utils"; import { record, Recorder } from "@azure/test-utils-recorder"; import { @@ -16,15 +16,12 @@ import { BlobClient, BlockBlobClient, BlockBlobUploadResponse, - BlobBatch, + BlobBatch } from "../src"; -import { - setURLParameter, -} from "../src/utils/utils.common"; -import { Test_CPK_INFO } from "./utils/constants"; +import { setURLParameter } from "../src/utils/utils.common"; dotenv.config({ path: "../.env" }); -describe("Blob versioning", () => { +describe.only("Blob versioning", () => { let blobServiceClient: BlobServiceClient; let containerName: string; let containerClient: ContainerClient; @@ -37,13 +34,13 @@ describe("Blob versioning", () => { let recorder: Recorder; - before(async function () { + before(async function() { if (isBlobVersioningDisabled()) { this.skip(); } }); - beforeEach(async function () { + beforeEach(async function() { recorder = record(this, recorderEnvSetup); blobServiceClient = getBSU(); containerName = recorder.getUniqueName("container"); @@ -56,7 +53,7 @@ describe("Blob versioning", () => { uploadRes2 = await blockBlobClient.upload("", 0); }); - afterEach(async function () { + afterEach(async function() { await containerClient.delete(); recorder.stop(); }); @@ -76,7 +73,7 @@ describe("Blob versioning", () => { const result = ( await containerClient .listBlobsFlat({ - includeVersions: true, + includeVersions: true }) .byPage() .next() @@ -94,7 +91,6 @@ describe("Blob versioning", () => { assert.deepStrictEqual(await bodyToString(downloadRes, content.length), content); assert.deepStrictEqual(downloadRes.versionId, uploadRes.versionId); - const downloadRes2 = await blobClient.withVersion(uploadRes2.versionId!).download(); assert.deepStrictEqual(await bodyToString(downloadRes2), ""); assert.deepStrictEqual(downloadRes2.versionId, uploadRes2.versionId); @@ -105,13 +101,15 @@ describe("Blob versioning", () => { } }); - it("download a version to file", async function () { - if (!isNode) { this.skip(); } + it("download a version to file", async function() { + if (!isNode) { + this.skip(); + } recorder.skip("node", "Temp file - recorder doesn't support saving the file"); const downloadedFilePath = recorder.getUniqueName("downloadedtofile"); await blobClient.withVersion(uploadRes.versionId!).downloadToFile(downloadedFilePath); const downloadedFileContent = fs.readFileSync(downloadedFilePath); - assert.ok(downloadedFileContent.equals(Buffer.from(downloadedFileContent))); + assert.ok(downloadedFileContent.equals(Buffer.from(content))); fs.unlinkSync(downloadedFilePath); }); @@ -178,7 +176,10 @@ describe("Blob versioning", () => { const credential = getGenericCredential(""); let batchDeleteRequest = new BlobBatch(); for (let i = 0; i < blockBlobCount; i++) { - await batchDeleteRequest.deleteBlob(blockBlobClients[i].withVersion(versions[i]!).url, credential); + await batchDeleteRequest.deleteBlob( + blockBlobClients[i].withVersion(versions[i]!).url, + credential + ); } // Submit batch request and verify response. @@ -193,14 +194,17 @@ describe("Blob versioning", () => { assert.equal(resp.subResponses[i].status, 202); assert.ok(resp.subResponses[i].statusMessage != ""); assert.ok(resp.subResponses[i].headers.contains("x-ms-request-id")); - assert.equal(resp.subResponses[i]._request.url, blockBlobClients[i].withVersion(versions[i]!).url); + assert.equal( + resp.subResponses[i]._request.url, + blockBlobClients[i].withVersion(versions[i]!).url + ); } // Verify blob versions deleted. const resp2 = ( await containerClient .listBlobsFlat({ - includeVersions: true, + includeVersions: true }) .byPage() .next() @@ -210,7 +214,7 @@ describe("Blob versioning", () => { it("deleting root blob with versionId should fail", async () => { await containerClient.deleteBlob(blobName, { - versionId: uploadRes.versionId, + versionId: uploadRes.versionId }); const versionExists = await blobClient.withVersion(uploadRes.versionId!).exists(); assert.ok(!versionExists); @@ -218,7 +222,7 @@ describe("Blob versioning", () => { let exceptionCaught: boolean = false; try { await containerClient.deleteBlob(blobName, { - versionId: uploadRes2.versionId, + versionId: uploadRes2.versionId }); } catch (err) { assert.equal(err.details.errorCode, "OperationNotAllowedOnRootBlob"); @@ -297,6 +301,10 @@ describe("Blob versioning", () => { }); it("promote a version: as the copy source", async () => { + recorder.skip( + "browser", + "Failed with One of the query parameters specified in the request URI is not supported." + ); const blobVersionClient = blobClient.withVersion(uploadRes.versionId!); await blobVersionClient.getProperties(); @@ -307,7 +315,7 @@ describe("Blob versioning", () => { const listRes = ( await containerClient .listBlobsFlat({ - includeVersions: true, + includeVersions: true }) .byPage() .next() @@ -335,7 +343,11 @@ describe("Blob versioning", () => { }); it("upload block blob return versionId", async () => { - const containerUploadRes = await containerClient.uploadBlockBlob(blobName, content, content.length); + const containerUploadRes = await containerClient.uploadBlockBlob( + blobName, + content, + content.length + ); assert.ok(containerUploadRes.response.versionId); if (!isNode) { @@ -370,7 +382,10 @@ describe("Blob versioning", () => { }); await delay(30 * 1000); properties = await blobServiceClient.getProperties(); - assert.ok(properties.deleteRetentionPolicy!.enabled, "deleteRetentionPolicy should be enabled."); + assert.ok( + properties.deleteRetentionPolicy!.enabled, + "deleteRetentionPolicy should be enabled." + ); } const blobVersionClient = blobClient.withVersion(uploadRes.versionId!); @@ -380,51 +395,4 @@ describe("Blob versioning", () => { await blobClient.undelete(); assert.ok(await blobVersionClient.exists()); }); - - it("downloadToBuffer with CPK", async () => { - const CPKblobName = recorder.getUniqueName("blobCPK"); - const CPKblobClient = containerClient.getBlobClient(CPKblobName); - const CPKblockBlobClient = CPKblobClient.getBlockBlobClient(); - await CPKblockBlobClient.upload(content, content.length, { - customerProvidedKey: Test_CPK_INFO, - }); - - if (isNode) { - const downloadToBufferRes = await CPKblockBlobClient.downloadToBuffer(undefined, undefined, { - customerProvidedKey: Test_CPK_INFO, - }); - assert.ok(downloadToBufferRes.equals(Buffer.from(content))); - - let exceptionCaught = false; - try { - await CPKblobClient.downloadToBuffer(); - } catch (err) { - assert.equal(err.details.errorCode, "BlobUsesCustomerSpecifiedEncryption"); - exceptionCaught = true; - } - assert.ok(exceptionCaught); - } - }); - - it("exists with condition", async () => { - const leaseResp = await blobClient.getBlobLeaseClient().acquireLease(30); - assert.ok(leaseResp.leaseId); - - assert.ok(await blobClient.exists({ conditions: { leaseId: leaseResp.leaseId! } })); - - let exceptionCaught = false; - try { - let guid = "ca761232ed4211cebacd00aa0057b223"; - if (guid === leaseResp.leaseId) { - guid = "ca761232ed4211cebacd00aa0057b224"; - } - - const existsRes = await blobClient.exists({ conditions: { leaseId: guid } }); - console.log(existsRes); - } catch (err) { - assert.equal(err.details.errorCode, "LeaseIdMismatchWithBlobOperation"); - exceptionCaught = true; - } - assert.ok(exceptionCaught); - }); }); diff --git a/sdk/storage/storage-blob/test/node/highlevel.node.spec.ts b/sdk/storage/storage-blob/test/node/highlevel.node.spec.ts index 4dcec8d15235..3ed8db812687 100644 --- a/sdk/storage/storage-blob/test/node/highlevel.node.spec.ts +++ b/sdk/storage/storage-blob/test/node/highlevel.node.spec.ts @@ -15,6 +15,7 @@ import { record, Recorder } from "@azure/test-utils-recorder"; import { ContainerClient, BlobClient, BlockBlobClient, BlobServiceClient } from "../../src"; import { readStreamToLocalFileWithLogs } from "../utils/testutils.node"; import { BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES } from "../../src/utils/constants"; +import { Test_CPK_INFO } from "../utils/constants"; // tslint:disable:no-empty describe("Highlevel", () => { @@ -455,6 +456,30 @@ describe("Highlevel", () => { assert.ok(eventTriggered); }); + it.only("downloadToBuffer with CPK", async () => { + const content = "Hello World"; + const CPKblobName = recorder.getUniqueName("blobCPK"); + const CPKblobClient = containerClient.getBlobClient(CPKblobName); + const CPKblockBlobClient = CPKblobClient.getBlockBlobClient(); + await CPKblockBlobClient.upload(content, content.length, { + customerProvidedKey: Test_CPK_INFO + }); + + const downloadToBufferRes = await CPKblockBlobClient.downloadToBuffer(undefined, undefined, { + customerProvidedKey: Test_CPK_INFO + }); + assert.ok(downloadToBufferRes.equals(Buffer.from(content))); + + let exceptionCaught = false; + try { + await CPKblobClient.downloadToBuffer(); + } catch (err) { + assert.equal(err.details.errorCode, "BlobUsesCustomerSpecifiedEncryption"); + exceptionCaught = true; + } + assert.ok(exceptionCaught); + }); + it("blobclient.download should success when internal stream unexpected ends at the stream end", async () => { recorder.skip("node", "Temp file - recorder doesn't support saving the file"); const uploadResponse = await blockBlobClient.uploadFile(tempFileSmall, { From e9b66d547d978aa016db2241ace3679ee1853381 Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Mon, 15 Jun 2020 10:21:18 +0800 Subject: [PATCH 29/39] wip --- ...ing_asynchorous_copy_return_versionid.json | 72 ++++---- ...ecording_blob_create_return_versionid.json | 86 +++++----- .../recording_delete_a_snapshot.json | 106 ++++++------ .../recording_delete_a_version.json | 125 ++++++++++---- ...eteblobs_should_work_for_batch_delete.json | 65 ++++--- ...napshots_needs_deletesnapshots_option.json | 106 ++++++------ ...hots_and_versionid_option_should_fail.json | 92 +++++----- ...thout_extra_parameters_should_succeed.json | 88 +++++----- ..._root_blob_with_versionid_should_fail.json | 110 ++++++++---- .../recording_download_a_blob_version.json | 90 +++++----- .../recording_download_a_version_to_file.json | 54 +++--- ...ding_get_properties_of_a_blob_version.json | 129 +++++++------- ...recording_list_blobs_include_versions.json | 96 +++++------ ..._promote_a_version_as_the_copy_source.json | 158 ++++-------------- .../recording_setmetadata.json | 68 ++++---- ...ording_undelete_a_softdeleted_version.json | 150 ++++++++++++----- ...ng_upload_block_blob_return_versionid.json | 82 ++++----- ...rding_asynchorous_copy_return_versionid.js | 66 ++++---- .../recording_blob_create_return_versionid.js | 78 ++++----- .../recording_delete_a_snapshot.js | 100 +++++------ .../recording_delete_a_version.js | 84 +++++----- ...eleteblobs_should_work_for_batch_delete.js | 50 +++--- ..._snapshots_needs_deletesnapshots_option.js | 102 +++++------ ...pshots_and_versionid_option_should_fail.js | 106 ++++++------ ...without_extra_parameters_should_succeed.js | 84 +++++----- ...ng_root_blob_with_versionid_should_fail.js | 78 ++++----- .../recording_download_a_blob_version.js | 116 ++++++------- .../recording_download_a_version_to_file.js | 52 +++--- ...ording_get_properties_of_a_blob_version.js | 146 ++++++++-------- .../recording_list_blobs_include_versions.js | 90 +++++----- ...ng_promote_a_version_as_the_copy_source.js | 142 ++++++++-------- .../blob_versioning/recording_setmetadata.js | 64 +++---- ...ecording_undelete_a_softdeleted_version.js | 100 +++++------ ...ding_upload_block_blob_return_versionid.js | 64 +++---- .../highlevel/recording_after_all_hook.js | 2 +- .../highlevel/recording_before_all_hook.js | 2 +- .../storage-blob/test/blobversioning.spec.ts | 2 +- 37 files changed, 1656 insertions(+), 1549 deletions(-) diff --git a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_asynchorous_copy_return_versionid.json b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_asynchorous_copy_return_versionid.json index dc29e80a2a4f..6f863d125f5e 100644 --- a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_asynchorous_copy_return_versionid.json +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_asynchorous_copy_return_versionid.json @@ -2,7 +2,7 @@ "recordings": [ { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459881615108136", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218754109002144", "query": { "sip": "0.0.0.0-255.255.255.255", "restype": "container" @@ -12,18 +12,18 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Thu, 19 Mar 2020 06:20:15 GMT", - "etag": "\"0x8D7CBCD976713A6\"", - "last-modified": "Thu, 19 Mar 2020 06:20:16 GMT", + "date": "Mon, 15 Jun 2020 02:19:00 GMT", + "etag": "\"0x8D810D277F4125B\"", + "last-modified": "Mon, 15 Jun 2020 02:19:01 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "58b39517-753d-4506-8d6e-69d01f624de1", - "x-ms-request-id": "30564bfa-d01e-0037-36b6-fd086e000000", + "x-ms-client-request-id": "b124bda7-567e-4724-b89e-388dae5b0500", + "x-ms-request-id": "2ab9942e-d01e-0067-47bb-425d5c000000", "x-ms-version": "2019-12-12" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459881615108136/blob158459881663707143", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218754109002144/blob159218754166909217", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -33,21 +33,21 @@ "responseHeaders": { "content-length": "0", "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", - "date": "Thu, 19 Mar 2020 06:20:16 GMT", - "etag": "\"0x8D7CBCD97B15B2A\"", - "last-modified": "Thu, 19 Mar 2020 06:20:16 GMT", + "date": "Mon, 15 Jun 2020 02:19:01 GMT", + "etag": "\"0x8D810D2784DAE29\"", + "last-modified": "Mon, 15 Jun 2020 02:19:02 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "deb01af6-44d6-4843-b20d-38bdcb47b783", + "x-ms-client-request-id": "429c7949-bff0-4b59-8658-e089b2fbc8ad", "x-ms-content-crc64": "YeJLfssylmU=", - "x-ms-request-id": "30564c9f-d01e-0037-51b6-fd086e000000", + "x-ms-request-id": "2ab9950d-d01e-0067-1fbb-425d5c000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-19T06:20:16.9931562Z" + "x-ms-version-id": "2020-06-15T02:19:02.0458537Z" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459881615108136/blob158459881663707143", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218754109002144/blob159218754166909217", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -57,21 +57,21 @@ "responseHeaders": { "content-length": "0", "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", - "date": "Thu, 19 Mar 2020 06:20:16 GMT", - "etag": "\"0x8D7CBCD97D760AA\"", - "last-modified": "Thu, 19 Mar 2020 06:20:17 GMT", + "date": "Mon, 15 Jun 2020 02:19:01 GMT", + "etag": "\"0x8D810D27879A829\"", + "last-modified": "Mon, 15 Jun 2020 02:19:02 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "729b19ce-6243-4800-b95f-8138cc233cb7", + "x-ms-client-request-id": "74375d5b-6d4b-4bef-94f9-9fe1c847a010", "x-ms-content-crc64": "AAAAAAAAAAA=", - "x-ms-request-id": "30564d14-d01e-0037-39b6-fd086e000000", + "x-ms-request-id": "2ab99570-d01e-0067-7abb-425d5c000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-19T06:20:17.2433338Z" + "x-ms-version-id": "2020-06-15T02:19:02.3360592Z" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459881615108136/copiedblob158459881736905963", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218754109002144/copiedblob159218754253406625", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -80,21 +80,21 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Thu, 19 Mar 2020 06:20:16 GMT", - "etag": "\"0x8D7CBCD9822F660\"", - "last-modified": "Thu, 19 Mar 2020 06:20:17 GMT", + "date": "Mon, 15 Jun 2020 02:19:02 GMT", + "etag": "\"0x8D810D278D7DEDD\"", + "last-modified": "Mon, 15 Jun 2020 02:19:02 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "bbbdb833-5f2d-4cd7-9839-bdddd2f8e143", - "x-ms-copy-id": "ae72f090-1922-4a3d-a29d-6fabfef52e3b", + "x-ms-client-request-id": "c3f8094b-7772-42d3-b477-05ddaa72b01b", + "x-ms-copy-id": "16992712-101c-499d-b310-69177d56f107", "x-ms-copy-status": "success", - "x-ms-request-id": "30564dda-d01e-0037-6eb6-fd086e000000", + "x-ms-request-id": "2ab99608-d01e-0067-10bb-425d5c000000", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-19T06:20:17.7386873Z" + "x-ms-version-id": "2020-06-15T02:19:02.9514973Z" } }, { "method": "DELETE", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459881615108136", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218754109002144", "query": { "sip": "0.0.0.0-255.255.255.255", "restype": "container" @@ -104,21 +104,21 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Thu, 19 Mar 2020 06:20:17 GMT", + "date": "Mon, 15 Jun 2020 02:19:03 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "4fa4ff2d-cac3-4679-b968-c36c1c88f304", - "x-ms-request-id": "30564e93-d01e-0037-19b6-fd086e000000", + "x-ms-client-request-id": "357a46e8-82eb-4f99-a223-3e9e9e2d6f3c", + "x-ms-request-id": "2ab996ba-d01e-0067-3abb-425d5c000000", "x-ms-version": "2019-12-12" } } ], "uniqueTestInfo": { "uniqueName": { - "container": "container158459881615108136", - "blob": "blob158459881663707143", - "copiedblob": "copiedblob158459881736905963" + "container": "container159218754109002144", + "blob": "blob159218754166909217", + "copiedblob": "copiedblob159218754253406625" }, "newDate": {} }, - "hash": "3e5c80ac78e807a57279f678364a502a" + "hash": "00b312a0c3693e94c39b8bd5f81af25e" } \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_blob_create_return_versionid.json b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_blob_create_return_versionid.json index 87e0d3282310..8074aaedf0c7 100644 --- a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_blob_create_return_versionid.json +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_blob_create_return_versionid.json @@ -2,7 +2,7 @@ "recordings": [ { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459881068704010", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218753534504901", "query": { "sip": "0.0.0.0-255.255.255.255", "restype": "container" @@ -12,18 +12,18 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Thu, 19 Mar 2020 06:20:10 GMT", - "etag": "\"0x8D7CBCD9424E847\"", - "last-modified": "Thu, 19 Mar 2020 06:20:11 GMT", + "date": "Mon, 15 Jun 2020 02:18:55 GMT", + "etag": "\"0x8D810D2748749DE\"", + "last-modified": "Mon, 15 Jun 2020 02:18:55 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "54f6f202-7dcb-429e-b25f-814682fe39d2", - "x-ms-request-id": "3056432a-d01e-0037-1bb6-fd086e000000", + "x-ms-client-request-id": "f94a08a7-6087-40e2-bff9-29f0a8e4f4d8", + "x-ms-request-id": "2ab98a0d-d01e-0067-18bb-425d5c000000", "x-ms-version": "2019-12-12" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459881068704010/blob158459881116905984", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218753534504901/blob159218753591105322", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -33,21 +33,21 @@ "responseHeaders": { "content-length": "0", "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", - "date": "Thu, 19 Mar 2020 06:20:10 GMT", - "etag": "\"0x8D7CBCD9470B39F\"", - "last-modified": "Thu, 19 Mar 2020 06:20:11 GMT", + "date": "Mon, 15 Jun 2020 02:18:55 GMT", + "etag": "\"0x8D810D274DDD86E\"", + "last-modified": "Mon, 15 Jun 2020 02:18:56 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "a9950ac3-2ef4-4275-b152-59e477b0bc87", + "x-ms-client-request-id": "53b96db5-4dd4-48ac-b926-b9d7ac6b54c6", "x-ms-content-crc64": "YeJLfssylmU=", - "x-ms-request-id": "3056442f-d01e-0037-59b6-fd086e000000", + "x-ms-request-id": "2ab98b49-d01e-0067-4abb-425d5c000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-19T06:20:11.5362719Z" + "x-ms-version-id": "2020-06-15T02:18:56.2797678Z" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459881068704010/blob158459881116905984", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218753534504901/blob159218753591105322", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -57,21 +57,21 @@ "responseHeaders": { "content-length": "0", "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", - "date": "Thu, 19 Mar 2020 06:20:10 GMT", - "etag": "\"0x8D7CBCD949643CD\"", - "last-modified": "Thu, 19 Mar 2020 06:20:11 GMT", + "date": "Mon, 15 Jun 2020 02:18:56 GMT", + "etag": "\"0x8D810D27509D26E\"", + "last-modified": "Mon, 15 Jun 2020 02:18:56 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "42940c9c-ba53-4556-aaef-7f8223ff0dc1", + "x-ms-client-request-id": "13e02c53-1648-4b3c-9144-7fd8080f2e9d", "x-ms-content-crc64": "AAAAAAAAAAA=", - "x-ms-request-id": "30564496-d01e-0037-32b6-fd086e000000", + "x-ms-request-id": "2ab98bd0-d01e-0067-4dbb-425d5c000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-19T06:20:11.7834461Z" + "x-ms-version-id": "2020-06-15T02:18:56.5699733Z" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459881068704010/appendblob158459881193700671", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218753534504901/appendblob159218753676801884", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -80,20 +80,20 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Thu, 19 Mar 2020 06:20:11 GMT", - "etag": "\"0x8D7CBCD94E3D5AC\"", - "last-modified": "Thu, 19 Mar 2020 06:20:12 GMT", + "date": "Mon, 15 Jun 2020 02:18:56 GMT", + "etag": "\"0x8D810D27560DBE4\"", + "last-modified": "Mon, 15 Jun 2020 02:18:57 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "5be0b593-a370-492a-8cf8-2ac7328b56ae", - "x-ms-request-id": "30564577-d01e-0037-69b6-fd086e000000", + "x-ms-client-request-id": "a90040e8-f27a-43c1-8bab-63b23fdfe8b4", + "x-ms-request-id": "2ab98cb0-d01e-0067-1ebb-425d5c000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-19T06:20:12.2918081Z" + "x-ms-version-id": "2020-06-15T02:18:57.1383780Z" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459881068704010/pageblob158459881242305319", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218753534504901/pageblob159218753733601062", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -102,20 +102,20 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Thu, 19 Mar 2020 06:20:11 GMT", - "etag": "\"0x8D7CBCD9536E6D1\"", - "last-modified": "Thu, 19 Mar 2020 06:20:12 GMT", + "date": "Mon, 15 Jun 2020 02:18:57 GMT", + "etag": "\"0x8D810D275B77014\"", + "last-modified": "Mon, 15 Jun 2020 02:18:57 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "a8a69856-650d-447e-8dae-53faef56a6ed", - "x-ms-request-id": "30564662-d01e-0037-31b6-fd086e000000", + "x-ms-client-request-id": "3460c0a8-8122-4544-8d05-fc77fdf7c1d2", + "x-ms-request-id": "2ab98d80-d01e-0067-62bb-425d5c000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-19T06:20:12.8361958Z" + "x-ms-version-id": "2020-06-15T02:18:57.7057812Z" } }, { "method": "DELETE", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459881068704010", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218753534504901", "query": { "sip": "0.0.0.0-255.255.255.255", "restype": "container" @@ -125,22 +125,22 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Thu, 19 Mar 2020 06:20:12 GMT", + "date": "Mon, 15 Jun 2020 02:18:57 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "9212afac-d8c2-4b86-91a9-b6e3beef2c7e", - "x-ms-request-id": "30564724-d01e-0037-54b6-fd086e000000", + "x-ms-client-request-id": "e40f1477-1475-44dd-a0d6-e292b9e050a3", + "x-ms-request-id": "2ab98eac-d01e-0067-80bb-425d5c000000", "x-ms-version": "2019-12-12" } } ], "uniqueTestInfo": { "uniqueName": { - "container": "container158459881068704010", - "blob": "blob158459881116905984", - "appendblob": "appendblob158459881193700671", - "pageblob": "pageblob158459881242305319" + "container": "container159218753534504901", + "blob": "blob159218753591105322", + "appendblob": "appendblob159218753676801884", + "pageblob": "pageblob159218753733601062" }, "newDate": {} }, - "hash": "6ff8fe801dcbf1a372d61468348d38ff" + "hash": "0d9e9a208f4e78f26e23b5cd0470f653" } \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_delete_a_snapshot.json b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_delete_a_snapshot.json index 1d279cfc1463..ad4030a5979b 100644 --- a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_delete_a_snapshot.json +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_delete_a_snapshot.json @@ -2,7 +2,7 @@ "recordings": [ { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459879661206364", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218751672102253", "query": { "sip": "0.0.0.0-255.255.255.255", "restype": "container" @@ -12,18 +12,18 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Thu, 19 Mar 2020 06:19:56 GMT", - "etag": "\"0x8D7CBCD8BC2A63D\"", - "last-modified": "Thu, 19 Mar 2020 06:19:56 GMT", + "date": "Mon, 15 Jun 2020 02:18:36 GMT", + "etag": "\"0x8D810D2696D00D9\"", + "last-modified": "Mon, 15 Jun 2020 02:18:37 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "02a8bd62-08c6-419d-ad3b-75334803b2c9", - "x-ms-request-id": "d85c813b-201e-0041-01b6-fd8226000000", + "x-ms-client-request-id": "566b2005-0738-41c1-88de-fac26619fbc3", + "x-ms-request-id": "b4a42223-001e-0029-1cbb-4273d4000000", "x-ms-version": "2019-12-12" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459879661206364/blob158459879710201125", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218751672102253/blob159218751728309923", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -33,21 +33,21 @@ "responseHeaders": { "content-length": "0", "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", - "date": "Thu, 19 Mar 2020 06:19:57 GMT", - "etag": "\"0x8D7CBCD8C0BCDB5\"", - "last-modified": "Thu, 19 Mar 2020 06:19:57 GMT", + "date": "Mon, 15 Jun 2020 02:18:37 GMT", + "etag": "\"0x8D810D269C3DDFE\"", + "last-modified": "Mon, 15 Jun 2020 02:18:37 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "e0260587-09c4-41b6-9e48-531cb77a0b90", + "x-ms-client-request-id": "38bd28e2-6052-415f-954a-939e05fde265", "x-ms-content-crc64": "YeJLfssylmU=", - "x-ms-request-id": "d85c8249-201e-0041-62b6-fd8226000000", + "x-ms-request-id": "b4a42343-001e-0029-2cbb-4273d4000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-19T06:19:57.4532533Z" + "x-ms-version-id": "2020-06-15T02:18:37.6555802Z" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459879661206364/blob158459879710201125", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218751672102253/blob159218751728309923", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -57,21 +57,21 @@ "responseHeaders": { "content-length": "0", "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", - "date": "Thu, 19 Mar 2020 06:19:57 GMT", - "etag": "\"0x8D7CBCD8C333304\"", - "last-modified": "Thu, 19 Mar 2020 06:19:57 GMT", + "date": "Mon, 15 Jun 2020 02:18:37 GMT", + "etag": "\"0x8D810D269EFFF16\"", + "last-modified": "Mon, 15 Jun 2020 02:18:37 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "152a35ac-dda5-417d-ba02-5f032c3c0014", + "x-ms-client-request-id": "2c7c4ae3-3e2a-4a0b-b77d-a2098e136072", "x-ms-content-crc64": "AAAAAAAAAAA=", - "x-ms-request-id": "d85c82a9-201e-0041-39b6-fd8226000000", + "x-ms-request-id": "b4a423a6-001e-0029-0bbb-4273d4000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-19T06:19:57.7124372Z" + "x-ms-version-id": "2020-06-15T02:18:37.9457853Z" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459879661206364/blob158459879710201125", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218751672102253/blob159218751728309923", "query": { "sip": "0.0.0.0-255.255.255.255", "comp": "snapshot" @@ -81,61 +81,61 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Thu, 19 Mar 2020 06:19:57 GMT", - "etag": "\"0x8D7CBCD8C333304\"", - "last-modified": "Thu, 19 Mar 2020 06:19:57 GMT", + "date": "Mon, 15 Jun 2020 02:18:38 GMT", + "etag": "\"0x8D810D269EFFF16\"", + "last-modified": "Mon, 15 Jun 2020 02:18:37 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "6ea0fcc2-f318-42a1-8137-19eac872e78b", - "x-ms-request-id": "d85c83d9-201e-0041-32b6-fd8226000000", + "x-ms-client-request-id": "83a3180c-d303-4790-96c2-f14ac1db70c7", + "x-ms-request-id": "b4a4253f-001e-0029-0dbb-4273d4000000", "x-ms-request-server-encrypted": "false", - "x-ms-snapshot": "2020-03-19T06:19:58.2007844Z", + "x-ms-snapshot": "2020-06-15T02:18:38.5121846Z", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-19T06:19:58.2017844Z" + "x-ms-version-id": "2020-06-15T02:18:38.5131846Z" } }, { "method": "DELETE", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459879661206364/blob158459879710201125", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218751672102253/blob159218751728309923", "query": { "sip": "0.0.0.0-255.255.255.255", - "snapshot": "2020-03-19T06:19:58.2007844Z" + "snapshot": "2020-06-15T02:18:38.5121846Z" }, "requestBody": null, "status": 202, "response": "", "responseHeaders": { "content-length": "0", - "date": "Thu, 19 Mar 2020 06:19:58 GMT", + "date": "Mon, 15 Jun 2020 02:18:38 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "23702850-aa66-4cc8-a787-be09b5476ff1", + "x-ms-client-request-id": "50354cba-373d-4ba2-913a-83c25a1954a8", "x-ms-delete-type-permanent": "false", - "x-ms-request-id": "d85c84cd-201e-0041-7fb6-fd8226000000", + "x-ms-request-id": "b4a426d9-001e-0029-16bb-4273d4000000", "x-ms-version": "2019-12-12" } }, { "method": "HEAD", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459879661206364/blob158459879710201125", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218751672102253/blob159218751728309923", "query": { "sip": "0.0.0.0-255.255.255.255", - "snapshot": "2020-03-19T06:19:58.2007844Z" + "snapshot": "2020-06-15T02:18:38.5121846Z" }, "requestBody": null, "status": 404, "response": "", "responseHeaders": { - "date": "Thu, 19 Mar 2020 06:19:58 GMT", + "date": "Mon, 15 Jun 2020 02:18:39 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "transfer-encoding": "chunked", - "x-ms-client-request-id": "bd3f7388-50c4-4d48-8004-efb6d36a9436", + "x-ms-client-request-id": "9ca77f1b-23c7-467d-9365-01328c73dfda", "x-ms-error-code": "BlobNotFound", - "x-ms-request-id": "d85c85fa-201e-0041-04b6-fd8226000000", + "x-ms-request-id": "b4a42834-001e-0029-56bb-4273d4000000", "x-ms-version": "2019-12-12" } }, { "method": "HEAD", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459879661206364/blob158459879710201125", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218751672102253/blob159218751728309923", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -147,27 +147,27 @@ "content-length": "0", "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", "content-type": "application/octet-stream", - "date": "Thu, 19 Mar 2020 06:19:59 GMT", - "etag": "\"0x8D7CBCD8C333304\"", - "last-modified": "Thu, 19 Mar 2020 06:19:57 GMT", + "date": "Mon, 15 Jun 2020 02:18:39 GMT", + "etag": "\"0x8D810D269EFFF16\"", + "last-modified": "Mon, 15 Jun 2020 02:18:37 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-access-tier": "Hot", "x-ms-access-tier-inferred": "true", "x-ms-blob-type": "BlockBlob", - "x-ms-client-request-id": "89d79e7d-7ac6-4965-af69-1f10078a21d9", - "x-ms-creation-time": "Thu, 19 Mar 2020 06:19:57 GMT", + "x-ms-client-request-id": "dbdf2ae1-e5e3-4a95-9e23-1f0f21775f08", + "x-ms-creation-time": "Mon, 15 Jun 2020 02:18:37 GMT", "x-ms-is-current-version": "true", "x-ms-lease-state": "available", "x-ms-lease-status": "unlocked", - "x-ms-request-id": "d85c8711-201e-0041-77b6-fd8226000000", + "x-ms-request-id": "b4a42967-001e-0029-6abb-4273d4000000", "x-ms-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-19T06:19:58.2017844Z" + "x-ms-version-id": "2020-06-15T02:18:38.5131846Z" } }, { "method": "DELETE", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459879661206364", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218751672102253", "query": { "sip": "0.0.0.0-255.255.255.255", "restype": "container" @@ -177,20 +177,20 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Thu, 19 Mar 2020 06:19:59 GMT", + "date": "Mon, 15 Jun 2020 02:18:40 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "66be119a-18cf-420e-be0c-2240fdb1f79f", - "x-ms-request-id": "d85c8837-201e-0041-7bb6-fd8226000000", + "x-ms-client-request-id": "d98edd50-7e0c-4efc-a7fd-adc1e99f4bb5", + "x-ms-request-id": "b4a42a68-001e-0029-57bb-4273d4000000", "x-ms-version": "2019-12-12" } } ], "uniqueTestInfo": { "uniqueName": { - "container": "container158459879661206364", - "blob": "blob158459879710201125" + "container": "container159218751672102253", + "blob": "blob159218751728309923" }, "newDate": {} }, - "hash": "fa5324b30c133d0ec62344e1923ea2b7" + "hash": "3b2acdf28eee168f01a7025de24d5092" } \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_delete_a_version.json b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_delete_a_version.json index 02bc08abcff2..1e79de63229a 100644 --- a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_delete_a_version.json +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_delete_a_version.json @@ -2,7 +2,7 @@ "recordings": [ { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459879093306077", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218750699302009", "query": { "sip": "0.0.0.0-255.255.255.255", "restype": "container" @@ -12,18 +12,18 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Thu, 19 Mar 2020 06:19:50 GMT", - "etag": "\"0x8D7CBCD885FA3A0\"", - "last-modified": "Thu, 19 Mar 2020 06:19:51 GMT", + "date": "Mon, 15 Jun 2020 02:18:27 GMT", + "etag": "\"0x8D810D263A0F408\"", + "last-modified": "Mon, 15 Jun 2020 02:18:27 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "0bc7ba75-bd9a-40bb-a23f-c2b86bd43857", - "x-ms-request-id": "d85c73cc-201e-0041-03b6-fd8226000000", + "x-ms-client-request-id": "f3a64ccd-ce4b-4df5-8e6a-7ad6d8aa5e99", + "x-ms-request-id": "b4a40f0e-001e-0029-15bb-4273d4000000", "x-ms-version": "2019-12-12" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459879093306077/blob158459879142408129", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218750699302009/blob159218750757002786", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -33,21 +33,21 @@ "responseHeaders": { "content-length": "0", "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", - "date": "Thu, 19 Mar 2020 06:19:51 GMT", - "etag": "\"0x8D7CBCD88AA2AD5\"", - "last-modified": "Thu, 19 Mar 2020 06:19:51 GMT", + "date": "Mon, 15 Jun 2020 02:18:27 GMT", + "etag": "\"0x8D810D263FA41EF\"", + "last-modified": "Mon, 15 Jun 2020 02:18:27 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "0ce54f6c-3e8f-46e0-b45b-fc5f67544d60", + "x-ms-client-request-id": "f64aea1a-d44f-4e3d-930b-ef6919bef92d", "x-ms-content-crc64": "YeJLfssylmU=", - "x-ms-request-id": "d85c7534-201e-0041-53b6-fd8226000000", + "x-ms-request-id": "b4a41028-001e-0029-29bb-4273d4000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-19T06:19:51.7802197Z" + "x-ms-version-id": "2020-06-15T02:18:27.9447023Z" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459879093306077/blob158459879142408129", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218750699302009/blob159218750757002786", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -57,42 +57,93 @@ "responseHeaders": { "content-length": "0", "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", - "date": "Thu, 19 Mar 2020 06:19:51 GMT", - "etag": "\"0x8D7CBCD88D168FA\"", - "last-modified": "Thu, 19 Mar 2020 06:19:52 GMT", + "date": "Mon, 15 Jun 2020 02:18:27 GMT", + "etag": "\"0x8D810D264263BEB\"", + "last-modified": "Mon, 15 Jun 2020 02:18:28 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "4868aa99-26dc-483f-a319-2918a3a8e696", + "x-ms-client-request-id": "e721d5e2-c09f-47dc-b981-6b056b453dba", "x-ms-content-crc64": "AAAAAAAAAAA=", - "x-ms-request-id": "d85c75e9-201e-0041-79b6-fd8226000000", + "x-ms-request-id": "b4a410b4-001e-0029-2fbb-4273d4000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-19T06:19:52.0394020Z" + "x-ms-version-id": "2020-06-15T02:18:28.2349074Z" } }, { "method": "DELETE", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459879093306077/blob158459879142408129", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218750699302009/blob159218750757002786", "query": { "sip": "0.0.0.0-255.255.255.255", - "versionid": "2020-03-19T06:19:51.7802197Z" + "versionid": "2020-06-15T02:18:27.9447023Z" }, "requestBody": null, - "status": 403, - "response": "OperationNotAllowedOnAutomaticSnapshotThe specified operation is not allowed on version.\nRequestId:d85c7740-201e-0041-2db6-fd8226000000\nTime:2020-03-19T06:19:52.5676992Z", + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Mon, 15 Jun 2020 02:18:28 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "dbe4f81a-1836-4c77-8b9d-f25c532eed53", + "x-ms-delete-type-permanent": "false", + "x-ms-request-id": "b4a41197-001e-0029-08bb-4273d4000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "HEAD", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218750699302009/blob159218750757002786", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "versionid": "2020-06-15T02:18:27.9447023Z" + }, + "requestBody": null, + "status": 404, + "response": "", "responseHeaders": { - "content-length": "257", - "content-type": "application/xml", - "date": "Thu, 19 Mar 2020 06:19:52 GMT", + "date": "Mon, 15 Jun 2020 02:18:29 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "3e94c185-1c84-42dd-be11-a276d2996023", - "x-ms-error-code": "OperationNotAllowedOnAutomaticSnapshot", - "x-ms-request-id": "d85c7740-201e-0041-2db6-fd8226000000", + "transfer-encoding": "chunked", + "x-ms-client-request-id": "43ac6a1b-b3de-4581-b70b-38d4a6a3fdf0", + "x-ms-error-code": "BlobNotFound", + "x-ms-request-id": "b4a4127e-001e-0029-5ebb-4273d4000000", "x-ms-version": "2019-12-12" } }, + { + "method": "HEAD", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218750699302009/blob159218750757002786", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": null, + "status": 200, + "response": "", + "responseHeaders": { + "accept-ranges": "bytes", + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "content-type": "application/octet-stream", + "date": "Mon, 15 Jun 2020 02:18:29 GMT", + "etag": "\"0x8D810D264263BEB\"", + "last-modified": "Mon, 15 Jun 2020 02:18:28 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-access-tier": "Hot", + "x-ms-access-tier-inferred": "true", + "x-ms-blob-type": "BlockBlob", + "x-ms-client-request-id": "e6d84297-54b1-4c95-a387-97077481e506", + "x-ms-creation-time": "Mon, 15 Jun 2020 02:18:28 GMT", + "x-ms-is-current-version": "true", + "x-ms-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-request-id": "b4a41347-001e-0029-1ebb-4273d4000000", + "x-ms-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-06-15T02:18:28.2349074Z" + } + }, { "method": "DELETE", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459879093306077", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218750699302009", "query": { "sip": "0.0.0.0-255.255.255.255", "restype": "container" @@ -102,20 +153,20 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Thu, 19 Mar 2020 06:19:52 GMT", + "date": "Mon, 15 Jun 2020 02:18:30 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "bca420c1-6c2b-4e88-9de7-0d2cd2cb33d9", - "x-ms-request-id": "d85c7840-201e-0041-19b6-fd8226000000", + "x-ms-client-request-id": "c0e7f463-637c-4679-90cd-d93ef1d0e1f1", + "x-ms-request-id": "b4a4144a-001e-0029-1cbb-4273d4000000", "x-ms-version": "2019-12-12" } } ], "uniqueTestInfo": { "uniqueName": { - "container": "container158459879093306077", - "blob": "blob158459879142408129" + "container": "container159218750699302009", + "blob": "blob159218750757002786" }, "newDate": {} }, - "hash": "d263dc6e0d99350c3775dc96bbaf37de" + "hash": "78404e2df2a98a145d1b15290055c155" } \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleteblobs_should_work_for_batch_delete.json b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleteblobs_should_work_for_batch_delete.json index 073e8129dff7..3f18fc98fc6b 100644 --- a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleteblobs_should_work_for_batch_delete.json +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleteblobs_should_work_for_batch_delete.json @@ -2,7 +2,7 @@ "recordings": [ { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459879319605712", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218751071103005", "query": { "sip": "0.0.0.0-255.255.255.255", "restype": "container" @@ -12,18 +12,18 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Thu, 19 Mar 2020 06:19:53 GMT", - "etag": "\"0x8D7CBCD89B6BF7C\"", - "last-modified": "Thu, 19 Mar 2020 06:19:53 GMT", + "date": "Mon, 15 Jun 2020 02:18:30 GMT", + "etag": "\"0x8D810D265D837D2\"", + "last-modified": "Mon, 15 Jun 2020 02:18:31 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "d5a4e550-f76d-4eaa-a4ef-cf53f1d2597f", - "x-ms-request-id": "d85c79fe-201e-0041-39b6-fd8226000000", + "x-ms-client-request-id": "5cb12272-b1a0-4c03-82af-7e2024a33459", + "x-ms-request-id": "b4a4156e-001e-0029-32bb-4273d4000000", "x-ms-version": "2019-12-12" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459879319605712/blob158459879366602194", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218751071103005/blob159218751127402779", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -33,21 +33,21 @@ "responseHeaders": { "content-length": "0", "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", - "date": "Thu, 19 Mar 2020 06:19:53 GMT", - "etag": "\"0x8D7CBCD8A000DD9\"", - "last-modified": "Thu, 19 Mar 2020 06:19:54 GMT", + "date": "Mon, 15 Jun 2020 02:18:31 GMT", + "etag": "\"0x8D810D2662E780E\"", + "last-modified": "Mon, 15 Jun 2020 02:18:31 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "5dd4d0b8-94fa-4a33-a28b-0adaab37b73b", + "x-ms-client-request-id": "235f2850-d7b7-4428-9d4f-244ef8731251", "x-ms-content-crc64": "YeJLfssylmU=", - "x-ms-request-id": "d85c7b50-201e-0041-78b6-fd8226000000", + "x-ms-request-id": "b4a416a9-001e-0029-59bb-4273d4000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-19T06:19:54.0218098Z" + "x-ms-version-id": "2020-06-15T02:18:31.6423182Z" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459879319605712/blob158459879366602194", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218751071103005/blob159218751127402779", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -57,25 +57,44 @@ "responseHeaders": { "content-length": "0", "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", - "date": "Thu, 19 Mar 2020 06:19:53 GMT", - "etag": "\"0x8D7CBCD8A246559\"", - "last-modified": "Thu, 19 Mar 2020 06:19:54 GMT", + "date": "Mon, 15 Jun 2020 02:18:31 GMT", + "etag": "\"0x8D810D2665B5C9D\"", + "last-modified": "Mon, 15 Jun 2020 02:18:31 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "6aca827b-5864-4f3c-a5d7-a59940c02af2", + "x-ms-client-request-id": "634ae815-8bd1-4274-9882-85a3a17f0c6d", "x-ms-content-crc64": "AAAAAAAAAAA=", - "x-ms-request-id": "d85c7c0a-201e-0041-21b6-fd8226000000", + "x-ms-request-id": "b4a4172e-001e-0029-54bb-4273d4000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-19T06:19:54.2609794Z" + "x-ms-version-id": "2020-06-15T02:18:31.9375277Z" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218751071103005", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Mon, 15 Jun 2020 02:18:32 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "128d806d-dc26-49af-b7a5-6d9bde3cac38", + "x-ms-request-id": "b4a4183a-001e-0029-5cbb-4273d4000000", + "x-ms-version": "2019-12-12" } } ], "uniqueTestInfo": { "uniqueName": { - "container": "container158459879319605712", - "blob": "blob158459879366602194" + "container": "container159218751071103005", + "blob": "blob159218751127402779" }, "newDate": {} }, - "hash": "af27cae29f2417e05856465e122ed57d" + "hash": "0a5e5c0f2b8a0a00c384973e1006ae2d" } \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleting_a_blob_that_has_snapshots_needs_deletesnapshots_option.json b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleting_a_blob_that_has_snapshots_needs_deletesnapshots_option.json index 6a6c8531e6ad..bcffaaa91322 100644 --- a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleting_a_blob_that_has_snapshots_needs_deletesnapshots_option.json +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleting_a_blob_that_has_snapshots_needs_deletesnapshots_option.json @@ -2,7 +2,7 @@ "recordings": [ { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459880030109807", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218752100203400", "query": { "sip": "0.0.0.0-255.255.255.255", "restype": "container" @@ -12,18 +12,18 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Thu, 19 Mar 2020 06:20:00 GMT", - "etag": "\"0x8D7CBCD8DF492BE\"", - "last-modified": "Thu, 19 Mar 2020 06:20:00 GMT", + "date": "Mon, 15 Jun 2020 02:18:41 GMT", + "etag": "\"0x8D810D26BFA6376\"", + "last-modified": "Mon, 15 Jun 2020 02:18:41 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "7e0341fc-e706-4274-99ee-4e327b78872a", - "x-ms-request-id": "d85c8938-201e-0041-63b6-fd8226000000", + "x-ms-client-request-id": "0eca33bb-5e16-4c29-8ada-8f24cb30249f", + "x-ms-request-id": "b4a42b7e-001e-0029-5abb-4273d4000000", "x-ms-version": "2019-12-12" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459880030109807/blob158459880079005200", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218752100203400/blob159218752156608091", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -33,21 +33,21 @@ "responseHeaders": { "content-length": "0", "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", - "date": "Thu, 19 Mar 2020 06:20:00 GMT", - "etag": "\"0x8D7CBCD8E420097\"", - "last-modified": "Thu, 19 Mar 2020 06:20:01 GMT", + "date": "Mon, 15 Jun 2020 02:18:41 GMT", + "etag": "\"0x8D810D26C50F2A8\"", + "last-modified": "Mon, 15 Jun 2020 02:18:41 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "1eef727e-788f-4815-aa3f-cf19a030c379", + "x-ms-client-request-id": "407bd0cc-b85f-44d2-9cff-68b1157494dd", "x-ms-content-crc64": "YeJLfssylmU=", - "x-ms-request-id": "d85c8a27-201e-0041-34b6-fd8226000000", + "x-ms-request-id": "b4a42cae-001e-0029-01bb-4273d4000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-19T06:20:01.1638935Z" + "x-ms-version-id": "2020-06-15T02:18:41.9346088Z" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459880030109807/blob158459880079005200", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218752100203400/blob159218752156608091", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -57,21 +57,21 @@ "responseHeaders": { "content-length": "0", "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", - "date": "Thu, 19 Mar 2020 06:20:01 GMT", - "etag": "\"0x8D7CBCD8E674293\"", - "last-modified": "Thu, 19 Mar 2020 06:20:01 GMT", + "date": "Mon, 15 Jun 2020 02:18:41 GMT", + "etag": "\"0x8D810D26C7D61EE\"", + "last-modified": "Mon, 15 Jun 2020 02:18:42 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "4cc0058f-faf4-4a0b-839f-6cff5250ad47", + "x-ms-client-request-id": "e1da1049-070f-4fc8-9f46-4c82475c40b3", "x-ms-content-crc64": "AAAAAAAAAAA=", - "x-ms-request-id": "d85c8aaf-201e-0041-2db6-fd8226000000", + "x-ms-request-id": "b4a42d21-001e-0029-6ebb-4273d4000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-19T06:20:01.4090659Z" + "x-ms-version-id": "2020-06-15T02:18:42.2268158Z" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459880030109807/blob158459880079005200", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218752100203400/blob159218752156608091", "query": { "sip": "0.0.0.0-255.255.255.255", "comp": "snapshot" @@ -81,41 +81,41 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Thu, 19 Mar 2020 06:20:01 GMT", - "etag": "\"0x8D7CBCD8E674293\"", - "last-modified": "Thu, 19 Mar 2020 06:20:01 GMT", + "date": "Mon, 15 Jun 2020 02:18:42 GMT", + "etag": "\"0x8D810D26C7D61EE\"", + "last-modified": "Mon, 15 Jun 2020 02:18:42 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "586c73ad-1235-42ca-8f0b-f42a92444392", - "x-ms-request-id": "d85c8ba8-201e-0041-12b6-fd8226000000", + "x-ms-client-request-id": "63750593-104b-43d7-82a8-b4a326c9d095", + "x-ms-request-id": "b4a42e61-001e-0029-1dbb-4273d4000000", "x-ms-request-server-encrypted": "false", - "x-ms-snapshot": "2020-03-19T06:20:01.9054165Z", + "x-ms-snapshot": "2020-06-15T02:18:42.7972204Z", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-19T06:20:01.9064165Z" + "x-ms-version-id": "2020-06-15T02:18:42.7982204Z" } }, { "method": "DELETE", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459880030109807/blob158459880079005200", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218752100203400/blob159218752156608091", "query": { "sip": "0.0.0.0-255.255.255.255" }, "requestBody": null, "status": 409, - "response": "SnapshotsPresentThis operation is not permitted because the blob has snapshots.\nRequestId:d85c8cfb-201e-0041-43b6-fd8226000000\nTime:2020-03-19T06:20:02.3976916Z", + "response": "SnapshotsPresentThis operation is not permitted because the blob has snapshots.\nRequestId:b4a42fa4-001e-0029-4ebb-4273d4000000\nTime:2020-06-15T02:18:43.3837574Z", "responseHeaders": { "content-length": "248", "content-type": "application/xml", - "date": "Thu, 19 Mar 2020 06:20:02 GMT", + "date": "Mon, 15 Jun 2020 02:18:43 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "a0b5f09f-f906-4048-87d3-4cdbf47675dc", + "x-ms-client-request-id": "680365f2-b7c5-41bd-aff4-846ea01ce4df", "x-ms-error-code": "SnapshotsPresent", - "x-ms-request-id": "d85c8cfb-201e-0041-43b6-fd8226000000", + "x-ms-request-id": "b4a42fa4-001e-0029-4ebb-4273d4000000", "x-ms-version": "2019-12-12" } }, { "method": "DELETE", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459880030109807/blob158459880079005200", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218752100203400/blob159218752156608091", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -124,37 +124,37 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Thu, 19 Mar 2020 06:20:02 GMT", + "date": "Mon, 15 Jun 2020 02:18:43 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "62b4e3e5-1736-46a4-9a9b-c1f1a2524e2f", + "x-ms-client-request-id": "0e02dd3e-33f7-4d78-8168-c6d91b80bd40", "x-ms-delete-type-permanent": "false", - "x-ms-request-id": "d85c8eb8-201e-0041-5bb6-fd8226000000", + "x-ms-request-id": "b4a431d7-001e-0029-6bbb-4273d4000000", "x-ms-version": "2019-12-12" } }, { "method": "HEAD", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459880030109807/blob158459880079005200", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218752100203400/blob159218752156608091", "query": { "sip": "0.0.0.0-255.255.255.255", - "snapshot": "2020-03-19T06:20:01.9054165Z" + "snapshot": "2020-06-15T02:18:42.7972204Z" }, "requestBody": null, "status": 404, "response": "", "responseHeaders": { - "date": "Thu, 19 Mar 2020 06:20:02 GMT", + "date": "Mon, 15 Jun 2020 02:18:44 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "transfer-encoding": "chunked", - "x-ms-client-request-id": "4371eea4-30d6-431e-b16d-46f6a8b2326e", + "x-ms-client-request-id": "336a66f6-f445-4b2a-adc4-7c80c7bd535d", "x-ms-error-code": "BlobNotFound", - "x-ms-request-id": "3056358f-d01e-0037-3ab6-fd086e000000", + "x-ms-request-id": "2ab96da0-d01e-0067-18bb-425d5c000000", "x-ms-version": "2019-12-12" } }, { "method": "HEAD", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459880030109807/blob158459880079005200", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218752100203400/blob159218752156608091", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -162,18 +162,18 @@ "status": 404, "response": "", "responseHeaders": { - "date": "Thu, 19 Mar 2020 06:20:02 GMT", + "date": "Mon, 15 Jun 2020 02:18:44 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "transfer-encoding": "chunked", - "x-ms-client-request-id": "4d9beb14-b18b-43a6-8150-2aee269556ec", + "x-ms-client-request-id": "e3f485e7-a6b4-4a9c-a78b-1b74abdfcb49", "x-ms-error-code": "BlobNotFound", - "x-ms-request-id": "305636a3-d01e-0037-3ab6-fd086e000000", + "x-ms-request-id": "2ab96f8a-d01e-0067-79bb-425d5c000000", "x-ms-version": "2019-12-12" } }, { "method": "DELETE", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459880030109807", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218752100203400", "query": { "sip": "0.0.0.0-255.255.255.255", "restype": "container" @@ -183,20 +183,20 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Thu, 19 Mar 2020 06:20:03 GMT", + "date": "Mon, 15 Jun 2020 02:18:45 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "2832260a-256d-4976-b382-92b8c18ada8c", - "x-ms-request-id": "305637ee-d01e-0037-70b6-fd086e000000", + "x-ms-client-request-id": "acd29139-92ce-4f88-9015-9873090948ac", + "x-ms-request-id": "2ab97127-d01e-0067-0dbb-425d5c000000", "x-ms-version": "2019-12-12" } } ], "uniqueTestInfo": { "uniqueName": { - "container": "container158459880030109807", - "blob": "blob158459880079005200" + "container": "container159218752100203400", + "blob": "blob159218752156608091" }, "newDate": {} }, - "hash": "741141415d860b5903327a103230e775" + "hash": "b44556e99ae2c7b53cf77c20b54600e6" } \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleting_a_blob_with_both_deletesnapshots_and_versionid_option_should_fail.json b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleting_a_blob_with_both_deletesnapshots_and_versionid_option_should_fail.json index 6bb864940999..df452533504d 100644 --- a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleting_a_blob_with_both_deletesnapshots_and_versionid_option_should_fail.json +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleting_a_blob_with_both_deletesnapshots_and_versionid_option_should_fail.json @@ -2,7 +2,7 @@ "recordings": [ { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158511704469003843", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218752592001401", "query": { "sip": "0.0.0.0-255.255.255.255", "restype": "container" @@ -11,17 +11,19 @@ "status": 201, "response": "", "responseHeaders": { - "etag": "\"0x8D7D084310E5545\"", - "last-modified": "Wed, 25 Mar 2020 06:17:27 GMT", + "content-length": "0", + "date": "Mon, 15 Jun 2020 02:18:45 GMT", + "etag": "\"0x8D810D26EE8E344\"", + "last-modified": "Mon, 15 Jun 2020 02:18:46 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "29c1801d-fded-47f7-831c-f3abf2370d6f", - "x-ms-request-id": "47f40d11-701e-000e-326d-02ac8e000000", + "x-ms-client-request-id": "25b4ed15-d579-46b5-8039-3ad005631f84", + "x-ms-request-id": "2ab972f8-d01e-0067-59bb-425d5c000000", "x-ms-version": "2019-12-12" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158511704469003843/blob158511704637103330", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218752592001401/blob159218752648909591", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -29,21 +31,23 @@ "status": 201, "response": "", "responseHeaders": { + "content-length": "0", "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", - "etag": "\"0x8D7D08431547049\"", - "last-modified": "Wed, 25 Mar 2020 06:17:27 GMT", + "date": "Mon, 15 Jun 2020 02:18:46 GMT", + "etag": "\"0x8D810D26F400F48\"", + "last-modified": "Mon, 15 Jun 2020 02:18:46 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "425838ab-06ee-44e6-854a-9b8ad4665446", + "x-ms-client-request-id": "66304e5f-6947-437d-b614-c577bff2e469", "x-ms-content-crc64": "YeJLfssylmU=", - "x-ms-request-id": "47f40d3d-701e-000e-576d-02ac8e000000", + "x-ms-request-id": "2ab97496-d01e-0067-70bb-425d5c000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-25T06:17:27.8102366Z" + "x-ms-version-id": "2020-06-15T02:18:46.8580959Z" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158511704469003843/blob158511704637103330", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218752592001401/blob159218752648909591", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -51,21 +55,23 @@ "status": 201, "response": "", "responseHeaders": { + "content-length": "0", "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", - "etag": "\"0x8D7D08431796444\"", - "last-modified": "Wed, 25 Mar 2020 06:17:28 GMT", + "date": "Mon, 15 Jun 2020 02:18:46 GMT", + "etag": "\"0x8D810D26F6C5776\"", + "last-modified": "Mon, 15 Jun 2020 02:18:47 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "14e86c47-149a-4504-92d0-4bcf1da3e33a", + "x-ms-client-request-id": "75259acf-956e-4d05-9370-eb6d578c4684", "x-ms-content-crc64": "AAAAAAAAAAA=", - "x-ms-request-id": "47f40d51-701e-000e-666d-02ac8e000000", + "x-ms-request-id": "2ab97561-d01e-0067-32bb-425d5c000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-25T06:17:28.0524116Z" + "x-ms-version-id": "2020-06-15T02:18:47.1483014Z" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158511704469003843/blob158511704637103330", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218752592001401/blob159218752648909591", "query": { "sip": "0.0.0.0-255.255.255.255", "comp": "snapshot" @@ -74,60 +80,64 @@ "status": 201, "response": "", "responseHeaders": { - "etag": "\"0x8D7D08431796444\"", - "last-modified": "Wed, 25 Mar 2020 06:17:28 GMT", + "content-length": "0", + "date": "Mon, 15 Jun 2020 02:18:47 GMT", + "etag": "\"0x8D810D26F6C5776\"", + "last-modified": "Mon, 15 Jun 2020 02:18:47 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "b2a5648a-35b5-4818-a26a-efed33e9ce5a", - "x-ms-request-id": "47f40d68-701e-000e-796d-02ac8e000000", + "x-ms-client-request-id": "45a84677-5faa-43f7-b9e9-2e3a0c272f94", + "x-ms-request-id": "2ab9774a-d01e-0067-06bb-425d5c000000", "x-ms-request-server-encrypted": "false", - "x-ms-snapshot": "2020-03-25T06:17:28.5447662Z", + "x-ms-snapshot": "2020-06-15T02:18:47.7147032Z", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-25T06:17:28.5457662Z" + "x-ms-version-id": "2020-06-15T02:18:47.7157032Z" } }, { "method": "DELETE", - "url": "https://fakestorageaccount.blob.core.windows.net/container158511704469003843/blob158511704637103330", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218752592001401/blob159218752648909591", "query": { "sip": "0.0.0.0-255.255.255.255", - "versionid": "2020-03-25T06:17:27.8102366Z" + "versionid": "2020-06-15T02:18:46.8580959Z" }, "requestBody": null, "status": 400, - "response": "InvalidQueryParameterValueValue for one of the query parameters specified in the request URI is invalid.\nRequestId:47f40d8f-701e-000e-1c6d-02ac8e000000\nTime:2020-03-25T06:17:29.0750153Zversionid2020-03-25T06:17:27.8102366ZThis operation is only allowed on the root blob. Version id should not be provided.", + "response": "InvalidQueryParameterValueValue for one of the query parameters specified in the request URI is invalid.\nRequestId:2ab97909-d01e-0067-39bb-425d5c000000\nTime:2020-06-15T02:18:48.2772209Zversionid2020-06-15T02:18:46.8580959ZThis operation is only allowed on the root blob. Version id should not be provided.", "responseHeaders": { "content-length": "494", "content-type": "application/xml", + "date": "Mon, 15 Jun 2020 02:18:47 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "e68295c6-48e0-43b5-8441-7680fbb3c2e1", + "x-ms-client-request-id": "5d171ac8-fe33-4fc4-b91e-b481f880cef7", "x-ms-error-code": "InvalidQueryParameterValue", - "x-ms-request-id": "47f40d8f-701e-000e-1c6d-02ac8e000000", + "x-ms-request-id": "2ab97909-d01e-0067-39bb-425d5c000000", "x-ms-version": "2019-12-12" } }, { "method": "DELETE", - "url": "https://fakestorageaccount.blob.core.windows.net/container158511704469003843/blob158511704637103330", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218752592001401/blob159218752648909591", "query": { "sip": "0.0.0.0-255.255.255.255", - "versionid": "2020-03-25T06:17:28.0524116Z" + "versionid": "2020-06-15T02:18:47.1483014Z" }, "requestBody": null, "status": 400, - "response": "InvalidQueryParameterValueValue for one of the query parameters specified in the request URI is invalid.\nRequestId:47f40dd8-701e-000e-556d-02ac8e000000\nTime:2020-03-25T06:17:29.8595747Zversionid2020-03-25T06:17:28.0524116ZThis operation is only allowed on the root blob. Version id should not be provided.", + "response": "InvalidQueryParameterValueValue for one of the query parameters specified in the request URI is invalid.\nRequestId:2ab97a85-d01e-0067-2ebb-425d5c000000\nTime:2020-06-15T02:18:48.8376194Zversionid2020-06-15T02:18:47.1483014ZThis operation is only allowed on the root blob. Version id should not be provided.", "responseHeaders": { "content-length": "494", "content-type": "application/xml", + "date": "Mon, 15 Jun 2020 02:18:48 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "c12b3dba-d019-4f57-b3d1-c181c9bbb1cf", + "x-ms-client-request-id": "e38bc658-912d-4398-8dc2-c69c157dbd13", "x-ms-error-code": "InvalidQueryParameterValue", - "x-ms-request-id": "47f40dd8-701e-000e-556d-02ac8e000000", + "x-ms-request-id": "2ab97a85-d01e-0067-2ebb-425d5c000000", "x-ms-version": "2019-12-12" } }, { "method": "DELETE", - "url": "https://fakestorageaccount.blob.core.windows.net/container158511704469003843", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218752592001401", "query": { "sip": "0.0.0.0-255.255.255.255", "restype": "container" @@ -136,19 +146,21 @@ "status": 202, "response": "", "responseHeaders": { + "content-length": "0", + "date": "Mon, 15 Jun 2020 02:18:48 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "be790e2b-ef87-4769-a195-a4a517029c9f", - "x-ms-request-id": "47f40dfd-701e-000e-716d-02ac8e000000", + "x-ms-client-request-id": "91fbd936-b737-4f54-8298-70db8136f9e3", + "x-ms-request-id": "2ab97c05-d01e-0067-29bb-425d5c000000", "x-ms-version": "2019-12-12" } } ], "uniqueTestInfo": { "uniqueName": { - "container": "container158511704469003843", - "blob": "blob158511704637103330" + "container": "container159218752592001401", + "blob": "blob159218752648909591" }, "newDate": {} }, - "hash": "ce17be22ef0017e51e781f06fd9b37ec" + "hash": "05226039259d83b32f5cab06ba4f0c14" } \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleting_a_versioned_blob_without_extra_parameters_should_succeed.json b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleting_a_versioned_blob_without_extra_parameters_should_succeed.json index 9d8cb5e15db6..694a1aa570cf 100644 --- a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleting_a_versioned_blob_without_extra_parameters_should_succeed.json +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleting_a_versioned_blob_without_extra_parameters_should_succeed.json @@ -2,7 +2,7 @@ "recordings": [ { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459880443801883", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218752963103848", "query": { "sip": "0.0.0.0-255.255.255.255", "restype": "container" @@ -12,18 +12,18 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Thu, 19 Mar 2020 06:20:03 GMT", - "etag": "\"0x8D7CBCD90717055\"", - "last-modified": "Thu, 19 Mar 2020 06:20:04 GMT", + "date": "Mon, 15 Jun 2020 02:18:49 GMT", + "etag": "\"0x8D810D2711F6449\"", + "last-modified": "Mon, 15 Jun 2020 02:18:49 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "5835af13-3e08-4e3e-85c9-222f7456f8ca", - "x-ms-request-id": "305638fe-d01e-0037-63b6-fd086e000000", + "x-ms-client-request-id": "31a0dc17-d5fa-4839-b4f2-d61b0835dfad", + "x-ms-request-id": "2ab97de5-d01e-0067-80bb-425d5c000000", "x-ms-version": "2019-12-12" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459880443801883/blob158459880500206880", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218752963103848/blob159218753019700780", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -33,21 +33,21 @@ "responseHeaders": { "content-length": "0", "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", - "date": "Thu, 19 Mar 2020 06:20:04 GMT", - "etag": "\"0x8D7CBCD90C59E39\"", - "last-modified": "Thu, 19 Mar 2020 06:20:05 GMT", + "date": "Mon, 15 Jun 2020 02:18:50 GMT", + "etag": "\"0x8D810D2717668CE\"", + "last-modified": "Mon, 15 Jun 2020 02:18:50 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "b5d15f9d-4abc-4fc2-9ab8-7ffb93e11cbc", + "x-ms-client-request-id": "6b2da256-9bc3-401e-a1ac-291e4c96176d", "x-ms-content-crc64": "YeJLfssylmU=", - "x-ms-request-id": "30563a09-d01e-0037-5db6-fd086e000000", + "x-ms-request-id": "2ab97fb9-d01e-0067-3cbb-425d5c000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-19T06:20:05.3818937Z" + "x-ms-version-id": "2020-06-15T02:18:50.5687246Z" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459880443801883/blob158459880500206880", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218752963103848/blob159218753019700780", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -57,21 +57,21 @@ "responseHeaders": { "content-length": "0", "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", - "date": "Thu, 19 Mar 2020 06:20:04 GMT", - "etag": "\"0x8D7CBCD90EBCACE\"", - "last-modified": "Thu, 19 Mar 2020 06:20:05 GMT", + "date": "Mon, 15 Jun 2020 02:18:50 GMT", + "etag": "\"0x8D810D271A262BD\"", + "last-modified": "Mon, 15 Jun 2020 02:18:50 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "0a553a3b-cb48-4199-9d20-be6c7bd3d158", + "x-ms-client-request-id": "05336c6c-1d99-4d16-9ffc-c865efcedcf3", "x-ms-content-crc64": "AAAAAAAAAAA=", - "x-ms-request-id": "30563a65-d01e-0037-31b6-fd086e000000", + "x-ms-request-id": "2ab9803b-d01e-0067-38bb-425d5c000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-19T06:20:05.6340723Z" + "x-ms-version-id": "2020-06-15T02:18:50.8579277Z" } }, { "method": "DELETE", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459880443801883/blob158459880500206880", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218752963103848/blob159218753019700780", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -80,17 +80,17 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Thu, 19 Mar 2020 06:20:05 GMT", + "date": "Mon, 15 Jun 2020 02:18:50 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "282f6a70-5d56-4d80-8725-7db8f1dfdee6", + "x-ms-client-request-id": "e88abf72-3b6f-4ea8-8fe7-801fdd240f1a", "x-ms-delete-type-permanent": "false", - "x-ms-request-id": "30563b5d-d01e-0037-19b6-fd086e000000", + "x-ms-request-id": "2ab98196-d01e-0067-02bb-425d5c000000", "x-ms-version": "2019-12-12" } }, { "method": "HEAD", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459880443801883/blob158459880500206880", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218752963103848/blob159218753019700780", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -98,21 +98,21 @@ "status": 404, "response": "", "responseHeaders": { - "date": "Thu, 19 Mar 2020 06:20:05 GMT", + "date": "Mon, 15 Jun 2020 02:18:51 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "transfer-encoding": "chunked", - "x-ms-client-request-id": "905d9652-a979-411c-9761-e85a6fdc9d23", + "x-ms-client-request-id": "7779ddd3-fc32-4a9d-a388-11f7362080af", "x-ms-error-code": "BlobNotFound", - "x-ms-request-id": "30563c5a-d01e-0037-0ab6-fd086e000000", + "x-ms-request-id": "2ab982bb-d01e-0067-1dbb-425d5c000000", "x-ms-version": "2019-12-12" } }, { "method": "HEAD", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459880443801883/blob158459880500206880", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218752963103848/blob159218753019700780", "query": { "sip": "0.0.0.0-255.255.255.255", - "versionid": "2020-03-19T06:20:05.3818937Z" + "versionid": "2020-06-15T02:18:50.5687246Z" }, "requestBody": null, "status": 200, @@ -122,24 +122,24 @@ "content-length": "11", "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", "content-type": "application/octet-stream", - "date": "Thu, 19 Mar 2020 06:20:06 GMT", - "etag": "\"0x8D7CBCD90C59E39\"", - "last-modified": "Thu, 19 Mar 2020 06:20:05 GMT", + "date": "Mon, 15 Jun 2020 02:18:52 GMT", + "etag": "\"0x8D810D2717668CE\"", + "last-modified": "Mon, 15 Jun 2020 02:18:50 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-access-tier": "Hot", "x-ms-access-tier-inferred": "true", "x-ms-blob-type": "BlockBlob", - "x-ms-client-request-id": "7eee92af-f9b9-4f84-8f06-e2c52d33fa05", - "x-ms-creation-time": "Thu, 19 Mar 2020 06:20:05 GMT", - "x-ms-request-id": "30563d79-d01e-0037-0fb6-fd086e000000", + "x-ms-client-request-id": "0471b96f-9a2d-4562-ad5c-4ab6ee89b876", + "x-ms-creation-time": "Mon, 15 Jun 2020 02:18:50 GMT", + "x-ms-request-id": "2ab9841d-d01e-0067-70bb-425d5c000000", "x-ms-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-19T06:20:05.3818937Z" + "x-ms-version-id": "2020-06-15T02:18:50.5687246Z" } }, { "method": "DELETE", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459880443801883", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218752963103848", "query": { "sip": "0.0.0.0-255.255.255.255", "restype": "container" @@ -149,20 +149,20 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Thu, 19 Mar 2020 06:20:07 GMT", + "date": "Mon, 15 Jun 2020 02:18:52 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "2e06e094-8c8c-4065-ba44-545c97e98ebc", - "x-ms-request-id": "30563ef6-d01e-0037-6db6-fd086e000000", + "x-ms-client-request-id": "02536a04-d4e3-41a5-9c77-93dee50d6d3c", + "x-ms-request-id": "2ab9854f-d01e-0067-14bb-425d5c000000", "x-ms-version": "2019-12-12" } } ], "uniqueTestInfo": { "uniqueName": { - "container": "container158459880443801883", - "blob": "blob158459880500206880" + "container": "container159218752963103848", + "blob": "blob159218753019700780" }, "newDate": {} }, - "hash": "30c758c59a537f6a51dbe1847a8881eb" + "hash": "8ca13d443712776451e1d9dfa8f27049" } \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleting_root_blob_with_versionid_should_fail.json b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleting_root_blob_with_versionid_should_fail.json index 8cfb19a084f6..d439c9461d6f 100644 --- a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleting_root_blob_with_versionid_should_fail.json +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleting_root_blob_with_versionid_should_fail.json @@ -2,7 +2,7 @@ "recordings": [ { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459879439802511", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218751274003093", "query": { "sip": "0.0.0.0-255.255.255.255", "restype": "container" @@ -12,18 +12,18 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Thu, 19 Mar 2020 06:19:54 GMT", - "etag": "\"0x8D7CBCD8A6F348C\"", - "last-modified": "Thu, 19 Mar 2020 06:19:54 GMT", + "date": "Mon, 15 Jun 2020 02:18:32 GMT", + "etag": "\"0x8D810D267102CEC\"", + "last-modified": "Mon, 15 Jun 2020 02:18:33 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "f520e22b-8d7e-4a1f-b98a-066256f19959", - "x-ms-request-id": "d85c7cd6-201e-0041-55b6-fd8226000000", + "x-ms-client-request-id": "fb7848d2-2b4e-4143-b9dc-143dc16688e7", + "x-ms-request-id": "b4a41958-001e-0029-6bbb-4273d4000000", "x-ms-version": "2019-12-12" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459879439802511/blob158459879487700392", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218751274003093/blob159218751332101483", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -33,21 +33,21 @@ "responseHeaders": { "content-length": "0", "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", - "date": "Thu, 19 Mar 2020 06:19:54 GMT", - "etag": "\"0x8D7CBCD8AB96D84\"", - "last-modified": "Thu, 19 Mar 2020 06:19:55 GMT", + "date": "Mon, 15 Jun 2020 02:18:33 GMT", + "etag": "\"0x8D810D26766E2A1\"", + "last-modified": "Mon, 15 Jun 2020 02:18:33 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "d71385b6-4a68-4d0e-ac02-b1938685f782", + "x-ms-client-request-id": "81335832-7908-40da-9a93-7c1873aaadfa", "x-ms-content-crc64": "YeJLfssylmU=", - "x-ms-request-id": "d85c7ddd-201e-0041-35b6-fd8226000000", + "x-ms-request-id": "b4a41a6c-001e-0029-66bb-4273d4000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-19T06:19:55.2366750Z" + "x-ms-version-id": "2020-06-15T02:18:33.6897697Z" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459879439802511/blob158459879487700392", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218751274003093/blob159218751332101483", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -57,42 +57,82 @@ "responseHeaders": { "content-length": "0", "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", - "date": "Thu, 19 Mar 2020 06:19:55 GMT", - "etag": "\"0x8D7CBCD8ADF24D7\"", - "last-modified": "Thu, 19 Mar 2020 06:19:55 GMT", + "date": "Mon, 15 Jun 2020 02:18:33 GMT", + "etag": "\"0x8D810D26792DC8F\"", + "last-modified": "Mon, 15 Jun 2020 02:18:33 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "b777caf1-cae0-421c-a694-f5e22b697b6e", + "x-ms-client-request-id": "1d05ca1e-527e-4e79-8635-2a7d3a4e61de", "x-ms-content-crc64": "AAAAAAAAAAA=", - "x-ms-request-id": "d85c7e71-201e-0041-39b6-fd8226000000", + "x-ms-request-id": "b4a41ad7-001e-0029-4dbb-4273d4000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-19T06:19:55.4848508Z" + "x-ms-version-id": "2020-06-15T02:18:33.9789727Z" } }, { "method": "DELETE", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459879439802511/blob158459879487700392", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218751274003093/blob159218751332101483", "query": { "sip": "0.0.0.0-255.255.255.255", - "versionid": "2020-03-19T06:19:55.2366750Z" + "versionid": "2020-06-15T02:18:33.6897697Z" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Mon, 15 Jun 2020 02:18:34 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "f4f87579-c47e-4058-919d-b43d28211825", + "x-ms-delete-type-permanent": "false", + "x-ms-request-id": "b4a41c2b-001e-0029-0fbb-4273d4000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "HEAD", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218751274003093/blob159218751332101483", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "versionid": "2020-06-15T02:18:33.6897697Z" + }, + "requestBody": null, + "status": 404, + "response": "", + "responseHeaders": { + "date": "Mon, 15 Jun 2020 02:18:34 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "transfer-encoding": "chunked", + "x-ms-client-request-id": "31dc3404-6dcb-4421-b83d-2c39adf5a209", + "x-ms-error-code": "BlobNotFound", + "x-ms-request-id": "b4a41d51-001e-0029-21bb-4273d4000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218751274003093/blob159218751332101483", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "versionid": "2020-06-15T02:18:33.9789727Z" }, "requestBody": null, "status": 403, - "response": "OperationNotAllowedOnAutomaticSnapshotThe specified operation is not allowed on version.\nRequestId:d85c7f59-201e-0041-7bb6-fd8226000000\nTime:2020-03-19T06:19:55.9751208Z", + "response": "OperationNotAllowedOnRootBlobThe specified operation is not allowed on root blob.\nRequestId:b4a41ebb-001e-0029-6dbb-4273d4000000\nTime:2020-06-15T02:18:35.9505069Z", "responseHeaders": { - "content-length": "257", + "content-length": "250", "content-type": "application/xml", - "date": "Thu, 19 Mar 2020 06:19:55 GMT", + "date": "Mon, 15 Jun 2020 02:18:35 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "d8ff42df-638e-4b77-ae36-59dc977355fb", - "x-ms-error-code": "OperationNotAllowedOnAutomaticSnapshot", - "x-ms-request-id": "d85c7f59-201e-0041-7bb6-fd8226000000", + "x-ms-client-request-id": "de5d189f-b495-48b0-b488-88e0b6acb85a", + "x-ms-error-code": "OperationNotAllowedOnRootBlob", + "x-ms-request-id": "b4a41ebb-001e-0029-6dbb-4273d4000000", "x-ms-version": "2019-12-12" } }, { "method": "DELETE", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459879439802511", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218751274003093", "query": { "sip": "0.0.0.0-255.255.255.255", "restype": "container" @@ -102,20 +142,20 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Thu, 19 Mar 2020 06:19:56 GMT", + "date": "Mon, 15 Jun 2020 02:18:36 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "3c77946d-01bf-4ddc-9e86-3523ae903be9", - "x-ms-request-id": "d85c8048-201e-0041-2db6-fd8226000000", + "x-ms-client-request-id": "774b3ceb-be63-4410-8ba5-5706615e6028", + "x-ms-request-id": "b4a420bf-001e-0029-52bb-4273d4000000", "x-ms-version": "2019-12-12" } } ], "uniqueTestInfo": { "uniqueName": { - "container": "container158459879439802511", - "blob": "blob158459879487700392" + "container": "container159218751274003093", + "blob": "blob159218751332101483" }, "newDate": {} }, - "hash": "8c6ce79a5f98d1097bf341c30058f4ca" + "hash": "7d5e29cd2a44e7f71c69261a6b12ff7e" } \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_download_a_blob_version.json b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_download_a_blob_version.json index ea8af7779ad2..1585ca013e0d 100644 --- a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_download_a_blob_version.json +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_download_a_blob_version.json @@ -2,7 +2,7 @@ "recordings": [ { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158472286918903504", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218749693906157", "query": { "sip": "0.0.0.0-255.255.255.255", "restype": "container" @@ -12,18 +12,18 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Fri, 20 Mar 2020 16:47:50 GMT", - "etag": "\"0x8D7CCEE6D6DE606\"", - "last-modified": "Fri, 20 Mar 2020 16:47:50 GMT", + "date": "Mon, 15 Jun 2020 02:18:17 GMT", + "etag": "\"0x8D810D25DA2D1A9\"", + "last-modified": "Mon, 15 Jun 2020 02:18:17 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "470423fe-dd5b-4284-8e55-c5a0fb2424da", - "x-ms-request-id": "0f286783-701e-0011-75d7-fe4076000000", + "x-ms-client-request-id": "393d0dad-39c0-451a-a73f-684912028129", + "x-ms-request-id": "b4a3fc2e-001e-0029-2ebb-4273d4000000", "x-ms-version": "2019-12-12" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158472286918903504/blob158472287073207995", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218749693906157/blob159218749750307586", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -33,21 +33,21 @@ "responseHeaders": { "content-length": "0", "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", - "date": "Fri, 20 Mar 2020 16:47:50 GMT", - "etag": "\"0x8D7CCEE6DB97A18\"", - "last-modified": "Fri, 20 Mar 2020 16:47:51 GMT", + "date": "Mon, 15 Jun 2020 02:18:17 GMT", + "etag": "\"0x8D810D25DF95F36\"", + "last-modified": "Mon, 15 Jun 2020 02:18:17 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "f0379dcf-d8f6-486d-a3e2-53828622319e", + "x-ms-client-request-id": "40c1df97-9a1b-4c5a-bbf3-dfa2ec393196", "x-ms-content-crc64": "YeJLfssylmU=", - "x-ms-request-id": "0f286a17-701e-0011-72d7-fe4076000000", + "x-ms-request-id": "b4a3fd32-001e-0029-23bb-4273d4000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-20T16:47:51.1369240Z" + "x-ms-version-id": "2020-06-15T02:18:17.8725686Z" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158472286918903504/blob158472287073207995", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218749693906157/blob159218749750307586", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -57,24 +57,24 @@ "responseHeaders": { "content-length": "0", "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", - "date": "Fri, 20 Mar 2020 16:47:51 GMT", - "etag": "\"0x8D7CCEE6DE4144A\"", - "last-modified": "Fri, 20 Mar 2020 16:47:51 GMT", + "date": "Mon, 15 Jun 2020 02:18:17 GMT", + "etag": "\"0x8D810D25E25A75F\"", + "last-modified": "Mon, 15 Jun 2020 02:18:18 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "8214dd11-6eb6-432a-b053-c48687d25149", + "x-ms-client-request-id": "3a86f78c-21fa-410e-a0be-96c160aebea3", "x-ms-content-crc64": "AAAAAAAAAAA=", - "x-ms-request-id": "0f286b88-701e-0011-56d7-fe4076000000", + "x-ms-request-id": "b4a3fde7-001e-0029-54bb-4273d4000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-20T16:47:51.4181236Z" + "x-ms-version-id": "2020-06-15T02:18:18.1637743Z" } }, { "method": "GET", - "url": "https://fakestorageaccount.blob.core.windows.net/container158472286918903504/blob158472287073207995", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218749693906157/blob159218749750307586", "query": { "sip": "0.0.0.0-255.255.255.255", - "versionid": "2020-03-20T16:47:51.1369240Z" + "versionid": "2020-06-15T02:18:17.8725686Z" }, "requestBody": null, "status": 200, @@ -84,25 +84,25 @@ "content-length": "11", "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", "content-type": "application/octet-stream", - "date": "Fri, 20 Mar 2020 16:47:51 GMT", - "etag": "\"0x8D7CCEE6DB97A18\"", - "last-modified": "Fri, 20 Mar 2020 16:47:51 GMT", + "date": "Mon, 15 Jun 2020 02:18:18 GMT", + "etag": "\"0x8D810D25DF95F36\"", + "last-modified": "Mon, 15 Jun 2020 02:18:17 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-blob-type": "BlockBlob", - "x-ms-client-request-id": "b89738ae-eff5-43d0-acf6-6e6f99bda17e", - "x-ms-creation-time": "Fri, 20 Mar 2020 16:47:51 GMT", - "x-ms-request-id": "0f286df3-701e-0011-22d7-fe4076000000", + "x-ms-client-request-id": "e4bd6bc5-8f43-426d-b971-d9907ba654ff", + "x-ms-creation-time": "Mon, 15 Jun 2020 02:18:17 GMT", + "x-ms-request-id": "b4a3fef2-001e-0029-55bb-4273d4000000", "x-ms-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-20T16:47:51.1369240Z" + "x-ms-version-id": "2020-06-15T02:18:17.8725686Z" } }, { "method": "GET", - "url": "https://fakestorageaccount.blob.core.windows.net/container158472286918903504/blob158472287073207995", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218749693906157/blob159218749750307586", "query": { "sip": "0.0.0.0-255.255.255.255", - "versionid": "2020-03-20T16:47:51.4181236Z" + "versionid": "2020-06-15T02:18:18.1637743Z" }, "requestBody": null, "status": 200, @@ -112,23 +112,23 @@ "content-length": "0", "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", "content-type": "application/octet-stream", - "date": "Fri, 20 Mar 2020 16:47:52 GMT", - "etag": "\"0x8D7CCEE6DE4144A\"", - "last-modified": "Fri, 20 Mar 2020 16:47:51 GMT", + "date": "Mon, 15 Jun 2020 02:18:19 GMT", + "etag": "\"0x8D810D25E25A75F\"", + "last-modified": "Mon, 15 Jun 2020 02:18:18 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-blob-type": "BlockBlob", - "x-ms-client-request-id": "fc9f47f1-9561-4148-9b38-dbba2ceb96d9", - "x-ms-creation-time": "Fri, 20 Mar 2020 16:47:51 GMT", + "x-ms-client-request-id": "3272dbbc-24a3-400d-83be-a7bdcbd3103d", + "x-ms-creation-time": "Mon, 15 Jun 2020 02:18:18 GMT", "x-ms-is-current-version": "true", - "x-ms-request-id": "0f287085-701e-0011-12d7-fe4076000000", + "x-ms-request-id": "b4a40013-001e-0029-6abb-4273d4000000", "x-ms-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-20T16:47:51.4181236Z" + "x-ms-version-id": "2020-06-15T02:18:18.1637743Z" } }, { "method": "DELETE", - "url": "https://fakestorageaccount.blob.core.windows.net/container158472286918903504", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218749693906157", "query": { "sip": "0.0.0.0-255.255.255.255", "restype": "container" @@ -138,20 +138,20 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Fri, 20 Mar 2020 16:47:52 GMT", + "date": "Mon, 15 Jun 2020 02:18:19 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "50b75a6e-bd17-4861-adc9-92f02236f773", - "x-ms-request-id": "0f287296-701e-0011-0ed7-fe4076000000", + "x-ms-client-request-id": "8a1e2640-8004-4d7e-b2db-a5b456b176f5", + "x-ms-request-id": "b4a40100-001e-0029-41bb-4273d4000000", "x-ms-version": "2019-12-12" } } ], "uniqueTestInfo": { "uniqueName": { - "container": "container158472286918903504", - "blob": "blob158472287073207995" + "container": "container159218749693906157", + "blob": "blob159218749750307586" }, "newDate": {} }, - "hash": "8c7cb69114d7e5abeea0690257bb1fe1" + "hash": "0121ce521b7db1c2d6c145bf42679608" } \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_download_a_version_to_file.json b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_download_a_version_to_file.json index 47064d01ad99..1be0b2d20f0c 100644 --- a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_download_a_version_to_file.json +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_download_a_version_to_file.json @@ -2,7 +2,7 @@ "recordings": [ { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container159215215896309782", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218750009609026", "query": { "sip": "0.0.0.0-255.255.255.255", "restype": "container" @@ -12,18 +12,18 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Sun, 14 Jun 2020 16:29:18 GMT", - "etag": "\"0x8D81080165BAEA8\"", - "last-modified": "Sun, 14 Jun 2020 16:29:18 GMT", + "date": "Mon, 15 Jun 2020 02:18:20 GMT", + "etag": "\"0x8D810D25F8444CA\"", + "last-modified": "Mon, 15 Jun 2020 02:18:20 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "7d42c949-2126-43f1-81a5-6e71562144be", - "x-ms-request-id": "1ae6bd44-c01e-0009-7e68-420873000000", + "x-ms-client-request-id": "ac2d5168-0d8d-40da-a8a3-bc4592da16c2", + "x-ms-request-id": "b4a40245-001e-0029-6fbb-4273d4000000", "x-ms-version": "2019-12-12" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container159215215896309782/blob159215215898803746", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218750009609026/blob159218750066009251", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -33,21 +33,21 @@ "responseHeaders": { "content-length": "0", "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", - "date": "Sun, 14 Jun 2020 16:29:18 GMT", - "etag": "\"0x8D81080165F843C\"", - "last-modified": "Sun, 14 Jun 2020 16:29:19 GMT", + "date": "Mon, 15 Jun 2020 02:18:20 GMT", + "etag": "\"0x8D810D25FDAF97C\"", + "last-modified": "Mon, 15 Jun 2020 02:18:21 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "b3d4d1f8-2e4c-46b1-a5fd-5bca768d99ed", + "x-ms-client-request-id": "4e2414de-22e1-4926-b522-2019ad8effab", "x-ms-content-crc64": "YeJLfssylmU=", - "x-ms-request-id": "1ae6bd54-c01e-0009-0d68-420873000000", + "x-ms-request-id": "b4a4032c-001e-0029-49bb-4273d4000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-06-14T16:29:19.0142012Z" + "x-ms-version-id": "2020-06-15T02:18:21.0287996Z" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container159215215896309782/blob159215215898803746", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218750009609026/blob159218750066009251", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -57,21 +57,21 @@ "responseHeaders": { "content-length": "0", "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", - "date": "Sun, 14 Jun 2020 16:29:18 GMT", - "etag": "\"0x8D810801661F5A9\"", - "last-modified": "Sun, 14 Jun 2020 16:29:19 GMT", + "date": "Mon, 15 Jun 2020 02:18:21 GMT", + "etag": "\"0x8D810D260071A90\"", + "last-modified": "Mon, 15 Jun 2020 02:18:21 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "68cd0399-52fe-46a7-bf75-70e244576035", + "x-ms-client-request-id": "e2f3c6eb-804f-43c9-8715-85af3bcf9d04", "x-ms-content-crc64": "AAAAAAAAAAA=", - "x-ms-request-id": "1ae6bd60-c01e-0009-1968-420873000000", + "x-ms-request-id": "b4a403ad-001e-0029-32bb-4273d4000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-06-14T16:29:19.0312121Z" + "x-ms-version-id": "2020-06-15T02:18:21.3190048Z" } }, { "method": "DELETE", - "url": "https://fakestorageaccount.blob.core.windows.net/container159215215896309782", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218750009609026", "query": { "sip": "0.0.0.0-255.255.255.255", "restype": "container" @@ -81,20 +81,20 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Sun, 14 Jun 2020 16:29:18 GMT", + "date": "Mon, 15 Jun 2020 02:18:21 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "de63ec73-138b-40a8-a1f0-005715bf0dd2", - "x-ms-request-id": "1ae6bd6a-c01e-0009-2368-420873000000", + "x-ms-client-request-id": "94a35ffc-1738-4201-a399-cd9a7bbf0e03", + "x-ms-request-id": "b4a404b8-001e-0029-30bb-4273d4000000", "x-ms-version": "2019-12-12" } } ], "uniqueTestInfo": { "uniqueName": { - "container": "container159215215896309782", - "blob": "blob159215215898803746" + "container": "container159218750009609026", + "blob": "blob159218750066009251" }, "newDate": {} }, - "hash": "2c6decd6d2e8df811c5baba00d0309bb" + "hash": "6f6931683c2f74377b43ed857a7b8968" } \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_get_properties_of_a_blob_version.json b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_get_properties_of_a_blob_version.json index 20161de3aa84..64beda81ca67 100644 --- a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_get_properties_of_a_blob_version.json +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_get_properties_of_a_blob_version.json @@ -2,7 +2,7 @@ "recordings": [ { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158512523509207137", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218750211801847", "query": { "sip": "0.0.0.0-255.255.255.255", "restype": "container" @@ -11,17 +11,19 @@ "status": 201, "response": "", "responseHeaders": { - "etag": "\"0x8D7D09742E9DD2A\"", - "last-modified": "Wed, 25 Mar 2020 08:33:57 GMT", + "content-length": "0", + "date": "Mon, 15 Jun 2020 02:18:22 GMT", + "etag": "\"0x8D810D260B92C17\"", + "last-modified": "Mon, 15 Jun 2020 02:18:22 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "fb1b9427-5a48-4af2-b38c-3bc0082f1499", - "x-ms-request-id": "47fde939-701e-000e-0880-02ac8e000000", + "x-ms-client-request-id": "76fc923d-59dc-4447-9819-935ff4276597", + "x-ms-request-id": "b4a4057f-001e-0029-65bb-4273d4000000", "x-ms-version": "2019-12-12" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158512523509207137/blob158512523676806270", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218750211801847/blob159218750268606854", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -29,21 +31,23 @@ "status": 201, "response": "", "responseHeaders": { + "content-length": "0", "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", - "etag": "\"0x8D7D097433D626E\"", - "last-modified": "Wed, 25 Mar 2020 08:33:58 GMT", + "date": "Mon, 15 Jun 2020 02:18:22 GMT", + "etag": "\"0x8D810D261102F4F\"", + "last-modified": "Mon, 15 Jun 2020 02:18:23 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "4ac07cb5-f634-4485-8b81-fceabb939d08", + "x-ms-client-request-id": "488086f4-ceed-4a21-be6d-ee970d401290", "x-ms-content-crc64": "YeJLfssylmU=", - "x-ms-request-id": "47fde96d-701e-000e-3180-02ac8e000000", + "x-ms-request-id": "b4a40621-001e-0029-78bb-4273d4000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-25T08:33:58.2949998Z" + "x-ms-version-id": "2020-06-15T02:18:23.0552399Z" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158512523509207137/blob158512523676806270", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218750211801847/blob159218750268606854", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -51,24 +55,26 @@ "status": 201, "response": "", "responseHeaders": { + "content-length": "0", "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", - "etag": "\"0x8D7D09743669CEF\"", - "last-modified": "Wed, 25 Mar 2020 08:33:58 GMT", + "date": "Mon, 15 Jun 2020 02:18:23 GMT", + "etag": "\"0x8D810D2613C5052\"", + "last-modified": "Mon, 15 Jun 2020 02:18:23 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "6cf367a1-4485-4944-b202-5ca140892227", + "x-ms-client-request-id": "8645cd6b-6a23-4f7e-a678-06333d425fca", "x-ms-content-crc64": "AAAAAAAAAAA=", - "x-ms-request-id": "47fde995-701e-000e-4f80-02ac8e000000", + "x-ms-request-id": "b4a406d0-001e-0029-18bb-4273d4000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-25T08:33:58.5661951Z" + "x-ms-version-id": "2020-06-15T02:18:23.3454434Z" } }, { "method": "HEAD", - "url": "https://fakestorageaccount.blob.core.windows.net/container158512523509207137/blob158512523676806270", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218750211801847/blob159218750268606854", "query": { "sip": "0.0.0.0-255.255.255.255", - "versionid": "2020-03-25T08:33:58.2949998Z" + "versionid": "2020-06-15T02:18:23.0552399Z" }, "requestBody": null, "status": 200, @@ -78,23 +84,24 @@ "content-length": "11", "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", "content-type": "application/octet-stream", - "etag": "\"0x8D7D097433D626E\"", - "last-modified": "Wed, 25 Mar 2020 08:33:58 GMT", + "date": "Mon, 15 Jun 2020 02:18:23 GMT", + "etag": "\"0x8D810D261102F4F\"", + "last-modified": "Mon, 15 Jun 2020 02:18:23 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-access-tier": "Hot", "x-ms-access-tier-inferred": "true", "x-ms-blob-type": "BlockBlob", - "x-ms-client-request-id": "67e15c74-f971-47b4-a3f9-6aecb5c39cb3", - "x-ms-creation-time": "Wed, 25 Mar 2020 08:33:58 GMT", - "x-ms-request-id": "47fdea18-701e-000e-3780-02ac8e000000", + "x-ms-client-request-id": "a3f713e9-3bd3-485d-9b47-31e9cfd34b90", + "x-ms-creation-time": "Mon, 15 Jun 2020 02:18:23 GMT", + "x-ms-request-id": "b4a40795-001e-0029-54bb-4273d4000000", "x-ms-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-25T08:33:58.2949998Z" + "x-ms-version-id": "2020-06-15T02:18:23.0552399Z" } }, { "method": "HEAD", - "url": "https://fakestorageaccount.blob.core.windows.net/container158512523509207137/blob158512523676806270", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218750211801847/blob159218750268606854", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -106,26 +113,27 @@ "content-length": "0", "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", "content-type": "application/octet-stream", - "etag": "\"0x8D7D09743669CEF\"", - "last-modified": "Wed, 25 Mar 2020 08:33:58 GMT", + "date": "Mon, 15 Jun 2020 02:18:24 GMT", + "etag": "\"0x8D810D2613C5052\"", + "last-modified": "Mon, 15 Jun 2020 02:18:23 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-access-tier": "Hot", "x-ms-access-tier-inferred": "true", "x-ms-blob-type": "BlockBlob", - "x-ms-client-request-id": "6bc67fa6-bca2-48b4-b3d1-5811aa296ff9", - "x-ms-creation-time": "Wed, 25 Mar 2020 08:33:58 GMT", + "x-ms-client-request-id": "eea7c82a-139b-46a4-b02a-ac38d4d1944e", + "x-ms-creation-time": "Mon, 15 Jun 2020 02:18:23 GMT", "x-ms-is-current-version": "true", "x-ms-lease-state": "available", "x-ms-lease-status": "unlocked", - "x-ms-request-id": "47fdea62-701e-000e-7c80-02ac8e000000", + "x-ms-request-id": "b4a4087d-001e-0029-2bbb-4273d4000000", "x-ms-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-25T08:33:58.5661951Z" + "x-ms-version-id": "2020-06-15T02:18:23.3454434Z" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158512523509207137/blob158512523676806270", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218750211801847/blob159218750268606854", "query": { "sip": "0.0.0.0-255.255.255.255", "comp": "snapshot" @@ -134,42 +142,44 @@ "status": 201, "response": "", "responseHeaders": { - "etag": "\"0x8D7D09743669CEF\"", - "last-modified": "Wed, 25 Mar 2020 08:33:58 GMT", + "content-length": "0", + "date": "Mon, 15 Jun 2020 02:18:24 GMT", + "etag": "\"0x8D810D2613C5052\"", + "last-modified": "Mon, 15 Jun 2020 02:18:23 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "3f47c5e8-8c80-423d-aeca-a65f3cfc2404", - "x-ms-request-id": "47fdeaac-701e-000e-3680-02ac8e000000", + "x-ms-client-request-id": "076eded4-3c93-4ca5-98e4-fdc19c559700", + "x-ms-request-id": "b4a409ae-001e-0029-3dbb-4273d4000000", "x-ms-request-server-encrypted": "false", - "x-ms-snapshot": "2020-03-25T08:34:01.1310480Z", + "x-ms-snapshot": "2020-06-15T02:18:25.0426449Z", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-25T08:34:01.1320480Z" + "x-ms-version-id": "2020-06-15T02:18:25.0436449Z" } }, { "method": "HEAD", - "url": "https://fakestorageaccount.blob.core.windows.net/container158512523509207137/blob158512523676806270", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218750211801847/blob159218750268606854", "query": { "sip": "0.0.0.0-255.255.255.255", - "versionid": "2020-03-25T08:33:58.2949998Z", - "snapshot": "2020-03-25T08:34:01.1310480Z" + "versionid": "2020-06-15T02:18:23.0552399Z", + "snapshot": "2020-06-15T02:18:25.0426449Z" }, "requestBody": null, "status": 400, "response": "", "responseHeaders": { - "date": "Wed, 25 Mar 2020 08:34:00 GMT", + "date": "Mon, 15 Jun 2020 02:18:25 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code": "MutuallyExclusiveQueryParameters", - "x-ms-request-id": "47fdeaed-701e-000e-6b80-02ac8e000000", + "x-ms-request-id": "b4a40b56-001e-0029-1bbb-4273d4000000", "x-ms-version": "2019-12-12" } }, { "method": "HEAD", - "url": "https://fakestorageaccount.blob.core.windows.net/container158512523509207137/blob158512523676806270", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218750211801847/blob159218750268606854", "query": { "sip": "0.0.0.0-255.255.255.255", - "versionid": "2020-03-25T08:33:58.2949998Z" + "versionid": "2020-06-15T02:18:23.0552399Z" }, "requestBody": null, "status": 200, @@ -179,23 +189,24 @@ "content-length": "11", "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", "content-type": "application/octet-stream", - "etag": "\"0x8D7D097433D626E\"", - "last-modified": "Wed, 25 Mar 2020 08:33:58 GMT", + "date": "Mon, 15 Jun 2020 02:18:25 GMT", + "etag": "\"0x8D810D261102F4F\"", + "last-modified": "Mon, 15 Jun 2020 02:18:23 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-access-tier": "Hot", "x-ms-access-tier-inferred": "true", "x-ms-blob-type": "BlockBlob", - "x-ms-client-request-id": "68ae6024-c444-4aca-a8f1-16abb38e9e00", - "x-ms-creation-time": "Wed, 25 Mar 2020 08:33:58 GMT", - "x-ms-request-id": "47fdeb1e-701e-000e-1280-02ac8e000000", + "x-ms-client-request-id": "2baeddcd-4e18-4720-9362-bef1fd34e3f6", + "x-ms-creation-time": "Mon, 15 Jun 2020 02:18:23 GMT", + "x-ms-request-id": "b4a40ca9-001e-0029-5cbb-4273d4000000", "x-ms-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-25T08:33:58.2949998Z" + "x-ms-version-id": "2020-06-15T02:18:23.0552399Z" } }, { "method": "DELETE", - "url": "https://fakestorageaccount.blob.core.windows.net/container158512523509207137", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218750211801847", "query": { "sip": "0.0.0.0-255.255.255.255", "restype": "container" @@ -204,19 +215,21 @@ "status": 202, "response": "", "responseHeaders": { + "content-length": "0", + "date": "Mon, 15 Jun 2020 02:18:26 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "0f7832d8-f465-48f0-a87f-1cf317f48934", - "x-ms-request-id": "47fdeb38-701e-000e-2c80-02ac8e000000", + "x-ms-client-request-id": "44957275-a07d-4020-84b8-36b5ce3c39fa", + "x-ms-request-id": "b4a40dbf-001e-0029-5bbb-4273d4000000", "x-ms-version": "2019-12-12" } } ], "uniqueTestInfo": { "uniqueName": { - "container": "container158512523509207137", - "blob": "blob158512523676806270" + "container": "container159218750211801847", + "blob": "blob159218750268606854" }, "newDate": {} }, - "hash": "dd2960a3038af12a4eb5df52621b2ac6" + "hash": "231bc915c1ec82474343244892455b62" } \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_list_blobs_include_versions.json b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_list_blobs_include_versions.json index 3c25a4e8a06b..4e5d1f3d2df4 100644 --- a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_list_blobs_include_versions.json +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_list_blobs_include_versions.json @@ -2,7 +2,7 @@ "recordings": [ { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459877968401121", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218749276106537", "query": { "sip": "0.0.0.0-255.255.255.255", "restype": "container" @@ -12,18 +12,18 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Thu, 19 Mar 2020 06:19:40 GMT", - "etag": "\"0x8D7CBCD8248C2B3\"", - "last-modified": "Thu, 19 Mar 2020 06:19:41 GMT", + "date": "Mon, 15 Jun 2020 02:18:12 GMT", + "etag": "\"0x8D810D25B259EA2\"", + "last-modified": "Mon, 15 Jun 2020 02:18:13 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "c0a590f0-a3d5-4fe9-ab6d-3b0f9d1ce13f", - "x-ms-request-id": "d85c6074-201e-0041-40b6-fd8226000000", + "x-ms-client-request-id": "981467ee-dfac-4265-a6bc-084558bfae9c", + "x-ms-request-id": "b4a3f506-001e-0029-5cbb-4273d4000000", "x-ms-version": "2019-12-12" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459877968401121/blob158459878121002897", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218749276106537/blob159218749332805006", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -33,21 +33,21 @@ "responseHeaders": { "content-length": "0", "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", - "date": "Thu, 19 Mar 2020 06:19:41 GMT", - "etag": "\"0x8D7CBCD82956D12\"", - "last-modified": "Thu, 19 Mar 2020 06:19:41 GMT", + "date": "Mon, 15 Jun 2020 02:18:13 GMT", + "etag": "\"0x8D810D25B7C52E1\"", + "last-modified": "Mon, 15 Jun 2020 02:18:13 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "de4fe410-a87f-4093-8434-11b73d19c914", + "x-ms-client-request-id": "7b26de92-6fbf-4b7e-8dc8-db1979b1d21d", "x-ms-content-crc64": "YeJLfssylmU=", - "x-ms-request-id": "d85c61ca-201e-0041-63b6-fd8226000000", + "x-ms-request-id": "b4a3f59d-001e-0029-6abb-4273d4000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-19T06:19:41.5779602Z" + "x-ms-version-id": "2020-06-15T02:18:13.6976097Z" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459877968401121/blob158459878121002897", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218749276106537/blob159218749332805006", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -57,21 +57,21 @@ "responseHeaders": { "content-length": "0", "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", - "date": "Thu, 19 Mar 2020 06:19:41 GMT", - "etag": "\"0x8D7CBCD82C2519B\"", - "last-modified": "Thu, 19 Mar 2020 06:19:41 GMT", + "date": "Mon, 15 Jun 2020 02:18:13 GMT", + "etag": "\"0x8D810D25BA89AF6\"", + "last-modified": "Mon, 15 Jun 2020 02:18:13 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "2e305bc5-546e-45fb-b434-eba2377f5ded", + "x-ms-client-request-id": "a38402d3-d14e-4e02-ad5e-ad7b083833e2", "x-ms-content-crc64": "AAAAAAAAAAA=", - "x-ms-request-id": "d85c626c-201e-0041-73b6-fd8226000000", + "x-ms-request-id": "b4a3f61c-001e-0029-5ebb-4273d4000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-19T06:19:41.8731691Z" + "x-ms-version-id": "2020-06-15T02:18:13.9888134Z" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459877968401121/blockblob%2F0158459878200208375", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218749276106537/blockblob%2F0159218749418603936", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -81,21 +81,21 @@ "responseHeaders": { "content-length": "0", "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", - "date": "Thu, 19 Mar 2020 06:19:42 GMT", - "etag": "\"0x8D7CBCD830DE736\"", - "last-modified": "Thu, 19 Mar 2020 06:19:42 GMT", + "date": "Mon, 15 Jun 2020 02:18:14 GMT", + "etag": "\"0x8D810D25BFF080F\"", + "last-modified": "Mon, 15 Jun 2020 02:18:14 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "1f1dd490-7efb-47c9-8a66-be04a8869cbf", + "x-ms-client-request-id": "99691821-93f6-4c61-97b3-0f2cbf5c1946", "x-ms-content-crc64": "AAAAAAAAAAA=", - "x-ms-request-id": "d85c6378-201e-0041-4eb6-fd8226000000", + "x-ms-request-id": "b4a3f727-001e-0029-4cbb-4273d4000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-19T06:19:42.3675190Z" + "x-ms-version-id": "2020-06-15T02:18:14.5542159Z" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459877968401121/blockblob%2F1158459878249300647", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218749276106537/blockblob%2F1159218749475303359", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -105,21 +105,21 @@ "responseHeaders": { "content-length": "0", "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", - "date": "Thu, 19 Mar 2020 06:19:42 GMT", - "etag": "\"0x8D7CBCD8357F5EB\"", - "last-modified": "Thu, 19 Mar 2020 06:19:42 GMT", + "date": "Mon, 15 Jun 2020 02:18:14 GMT", + "etag": "\"0x8D810D25C559C40\"", + "last-modified": "Mon, 15 Jun 2020 02:18:15 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "dde44d40-ee08-424a-ad4d-eeff2c736f22", + "x-ms-client-request-id": "d141a683-a945-4dd6-9c9f-cdb80ce3be5d", "x-ms-content-crc64": "AAAAAAAAAAA=", - "x-ms-request-id": "d85c6419-201e-0041-58b6-fd8226000000", + "x-ms-request-id": "b4a3f83f-001e-0029-5ebb-4273d4000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-19T06:19:42.8528619Z" + "x-ms-version-id": "2020-06-15T02:18:15.1216192Z" } }, { "method": "GET", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459877968401121", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218749276106537", "query": { "sip": "0.0.0.0-255.255.255.255", "include": "versions", @@ -128,20 +128,20 @@ }, "requestBody": null, "status": 200, - "response": "blob1584598781210028972020-03-19T06:19:41.5779602ZThu, 19 Mar 2020 06:19:41 GMTThu, 19 Mar 2020 06:19:41 GMT0x8D7CBCD82956D1211application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottruetrueblob1584598781210028972020-03-19T06:19:41.8731691ZtrueThu, 19 Mar 2020 06:19:41 GMTThu, 19 Mar 2020 06:19:41 GMT0x8D7CBCD82C2519B0application/octet-stream1B2M2Y8AsgTpgAmY7PhCfg==BlockBlobHottrueunlockedavailabletrueblockblob/01584598782002083752020-03-19T06:19:42.3675190ZtrueThu, 19 Mar 2020 06:19:42 GMTThu, 19 Mar 2020 06:19:42 GMT0x8D7CBCD830DE7360application/octet-stream1B2M2Y8AsgTpgAmY7PhCfg==BlockBlobHottrueunlockedavailabletrueblockblob/11584598782493006472020-03-19T06:19:42.8528619ZtrueThu, 19 Mar 2020 06:19:42 GMTThu, 19 Mar 2020 06:19:42 GMT0x8D7CBCD8357F5EB0application/octet-stream1B2M2Y8AsgTpgAmY7PhCfg==BlockBlobHottrueunlockedavailabletrue", + "response": "blob1592187493328050062020-06-15T02:18:13.6976097ZMon, 15 Jun 2020 02:18:13 GMTMon, 15 Jun 2020 02:18:13 GMT0x8D810D25B7C52E111application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottruetrueblob1592187493328050062020-06-15T02:18:13.9888134ZtrueMon, 15 Jun 2020 02:18:13 GMTMon, 15 Jun 2020 02:18:13 GMT0x8D810D25BA89AF60application/octet-stream1B2M2Y8AsgTpgAmY7PhCfg==BlockBlobHottrueunlockedavailabletrueblockblob/01592187494186039362020-06-15T02:18:14.5542159ZtrueMon, 15 Jun 2020 02:18:14 GMTMon, 15 Jun 2020 02:18:14 GMT0x8D810D25BFF080F0application/octet-stream1B2M2Y8AsgTpgAmY7PhCfg==BlockBlobHottrueunlockedavailabletrueblockblob/11592187494753033592020-06-15T02:18:15.1216192ZtrueMon, 15 Jun 2020 02:18:15 GMTMon, 15 Jun 2020 02:18:15 GMT0x8D810D25C559C400application/octet-stream1B2M2Y8AsgTpgAmY7PhCfg==BlockBlobHottrueunlockedavailabletrue", "responseHeaders": { "content-type": "application/xml", - "date": "Thu, 19 Mar 2020 06:19:43 GMT", + "date": "Mon, 15 Jun 2020 02:18:15 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "transfer-encoding": "chunked", - "x-ms-client-request-id": "9a060e01-91c7-4dca-a56a-8f15d574418c", - "x-ms-request-id": "d85c6505-201e-0041-1ab6-fd8226000000", + "x-ms-client-request-id": "bc3727f8-656a-4563-b563-d9458dfdc370", + "x-ms-request-id": "b4a3f961-001e-0029-77bb-4273d4000000", "x-ms-version": "2019-12-12" } }, { "method": "DELETE", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459877968401121", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218749276106537", "query": { "sip": "0.0.0.0-255.255.255.255", "restype": "container" @@ -151,22 +151,22 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Thu, 19 Mar 2020 06:19:43 GMT", + "date": "Mon, 15 Jun 2020 02:18:16 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "e4926de4-d977-4721-8989-4065e215b1cf", - "x-ms-request-id": "d85c664b-201e-0041-2db6-fd8226000000", + "x-ms-client-request-id": "eccaa938-0e08-4d39-8680-4e3e07bdf35b", + "x-ms-request-id": "b4a3fae0-001e-0029-6cbb-4273d4000000", "x-ms-version": "2019-12-12" } } ], "uniqueTestInfo": { "uniqueName": { - "container": "container158459877968401121", - "blob": "blob158459878121002897", - "blockblob/0": "blockblob/0158459878200208375", - "blockblob/1": "blockblob/1158459878249300647" + "container": "container159218749276106537", + "blob": "blob159218749332805006", + "blockblob/0": "blockblob/0159218749418603936", + "blockblob/1": "blockblob/1159218749475303359" }, "newDate": {} }, - "hash": "1da2f2af412dda9265ceab4931cfb577" + "hash": "b08eb17f72d430f08657866c2038c7fc" } \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_promote_a_version_as_the_copy_source.json b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_promote_a_version_as_the_copy_source.json index 97740cb57a4f..fbbb21c0e0f6 100644 --- a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_promote_a_version_as_the_copy_source.json +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_promote_a_version_as_the_copy_source.json @@ -2,7 +2,7 @@ "recordings": [ { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158512524174808034", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218753334906482", "query": { "sip": "0.0.0.0-255.255.255.255", "restype": "container" @@ -11,17 +11,19 @@ "status": 201, "response": "", "responseHeaders": { - "etag": "\"0x8D7D09746355BD9\"", - "last-modified": "Wed, 25 Mar 2020 08:34:03 GMT", + "content-length": "0", + "date": "Mon, 15 Jun 2020 02:18:53 GMT", + "etag": "\"0x8D810D2735681A6\"", + "last-modified": "Mon, 15 Jun 2020 02:18:53 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "83e91efc-1970-4c4a-9051-8a0b32bb2ea2", - "x-ms-request-id": "47fdeb5a-701e-000e-4880-02ac8e000000", + "x-ms-client-request-id": "1c2ca221-8101-4a40-9253-87a0b3f1b7cd", + "x-ms-request-id": "2ab98662-d01e-0067-1dbb-425d5c000000", "x-ms-version": "2019-12-12" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158512524174808034/blob158512524270507574", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218753334906482/blob159218753391205402", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -29,21 +31,23 @@ "status": 201, "response": "", "responseHeaders": { + "content-length": "0", "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", - "etag": "\"0x8D7D09746D22F56\"", - "last-modified": "Wed, 25 Mar 2020 08:34:04 GMT", + "date": "Mon, 15 Jun 2020 02:18:53 GMT", + "etag": "\"0x8D810D273AC9B31\"", + "last-modified": "Mon, 15 Jun 2020 02:18:54 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "35ab7485-b603-4c7b-9708-5182f162b8f5", + "x-ms-client-request-id": "17670953-41dc-40e3-bf61-c1a6f46a1a9f", "x-ms-content-crc64": "YeJLfssylmU=", - "x-ms-request-id": "47fdebbd-701e-000e-1b80-02ac8e000000", + "x-ms-request-id": "2ab9874e-d01e-0067-7ebb-425d5c000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-25T08:34:04.3033430Z" + "x-ms-version-id": "2020-06-15T02:18:54.2803528Z" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158512524174808034/blob158512524270507574", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218753334906482/blob159218753391205402", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -51,125 +55,23 @@ "status": 201, "response": "", "responseHeaders": { + "content-length": "0", "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", - "etag": "\"0x8D7D0974701374A\"", - "last-modified": "Wed, 25 Mar 2020 08:34:04 GMT", + "date": "Mon, 15 Jun 2020 02:18:54 GMT", + "etag": "\"0x8D810D273D8BC48\"", + "last-modified": "Mon, 15 Jun 2020 02:18:54 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "8222e39c-8c11-42b8-b051-fe1e57098230", + "x-ms-client-request-id": "69c6e80d-ee31-4982-b72e-2c32026768b6", "x-ms-content-crc64": "AAAAAAAAAAA=", - "x-ms-request-id": "47fdebe0-701e-000e-3d80-02ac8e000000", + "x-ms-request-id": "2ab987db-d01e-0067-07bb-425d5c000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-25T08:34:04.6125658Z" - } - }, - { - "method": "HEAD", - "url": "https://fakestorageaccount.blob.core.windows.net/container158512524174808034/blob158512524270507574", - "query": { - "sip": "0.0.0.0-255.255.255.255", - "versionid": "2020-03-25T08:34:04.3033430Z" - }, - "requestBody": null, - "status": 200, - "response": "", - "responseHeaders": { - "accept-ranges": "bytes", - "content-length": "11", - "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", - "content-type": "application/octet-stream", - "etag": "\"0x8D7D09746D22F56\"", - "last-modified": "Wed, 25 Mar 2020 08:34:04 GMT", - "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-access-tier": "Hot", - "x-ms-access-tier-inferred": "true", - "x-ms-blob-type": "BlockBlob", - "x-ms-client-request-id": "28aa44a4-b20a-4309-b40d-eae457ffb625", - "x-ms-creation-time": "Wed, 25 Mar 2020 08:34:04 GMT", - "x-ms-request-id": "47fdec09-701e-000e-6080-02ac8e000000", - "x-ms-server-encrypted": "true", - "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-25T08:34:04.3033430Z" - } - }, - { - "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158512524174808034/blob158512524270507574", - "query": { - "sip": "0.0.0.0-255.255.255.255" - }, - "requestBody": null, - "status": 202, - "response": "", - "responseHeaders": { - "etag": "\"0x8D7D09747A49A66\"", - "last-modified": "Wed, 25 Mar 2020 08:34:05 GMT", - "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "df1e0dea-7ea9-4b52-aa4e-a2c6ed33c204", - "x-ms-copy-id": "aa69ab9a-f625-44b5-86cc-8107b0357b47", - "x-ms-copy-status": "success", - "x-ms-request-id": "47fdec34-701e-000e-0680-02ac8e000000", - "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-25T08:34:05.6843403Z" - } - }, - { - "method": "GET", - "url": "https://fakestorageaccount.blob.core.windows.net/container158512524174808034", - "query": { - "sip": "0.0.0.0-255.255.255.255", - "include": "versions", - "restype": "container", - "comp": "list" - }, - "requestBody": null, - "status": 200, - "response": "blob1585125242705075742020-03-25T08:34:04.3033430ZWed, 25 Mar 2020 08:34:04 GMTWed, 25 Mar 2020 08:34:04 GMT0x8D7D09746D22F5611application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottruetrueblob1585125242705075742020-03-25T08:34:04.6125658ZWed, 25 Mar 2020 08:34:04 GMTWed, 25 Mar 2020 08:34:04 GMT0x8D7D0974701374A0application/octet-stream1B2M2Y8AsgTpgAmY7PhCfg==BlockBlobHottruetrueblob1585125242705075742020-03-25T08:34:05.6843403ZtrueWed, 25 Mar 2020 08:34:04 GMTWed, 25 Mar 2020 08:34:05 GMT0x8D7D09747A49A6611application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottrueunlockedavailabletrue", - "responseHeaders": { - "content-type": "application/xml", - "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "4d2a6bd4-c84c-467a-8cf1-ece72d23a02d", - "x-ms-request-id": "47fdec69-701e-000e-3880-02ac8e000000", - "x-ms-version": "2019-12-12" - } - }, - { - "method": "GET", - "url": "https://fakestorageaccount.blob.core.windows.net/container158512524174808034/blob158512524270507574", - "query": { - "sip": "0.0.0.0-255.255.255.255" - }, - "requestBody": null, - "status": 200, - "response": "Hello World", - "responseHeaders": { - "accept-ranges": "bytes", - "content-length": "11", - "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", - "content-type": "application/octet-stream", - "etag": "\"0x8D7D09747A49A66\"", - "last-modified": "Wed, 25 Mar 2020 08:34:05 GMT", - "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-blob-type": "BlockBlob", - "x-ms-client-request-id": "48c4e9ed-b6f9-433e-9c73-909b1169bf6a", - "x-ms-copy-completion-time": "Wed, 25 Mar 2020 08:34:05 GMT", - "x-ms-copy-id": "aa69ab9a-f625-44b5-86cc-8107b0357b47", - "x-ms-copy-progress": "11/11", - "x-ms-copy-source": "https://fakestorageaccount.blob.core.windows.net/container158512524174808034/blob158512524270507574?sv=2019-10-10&ss=btqf&srt=sco&spr=https%2Chttp&st=2020-03-20T09%3A00%3A00Z&se=2022-12-15T09%3A05%3A00Z&sip=0.0.0.0-255.255.255.255&sp=rwdxlacup&versionid=2020-03-25T08:34:04.3033430Z", - "x-ms-copy-status": "success", - "x-ms-creation-time": "Wed, 25 Mar 2020 08:34:04 GMT", - "x-ms-is-current-version": "true", - "x-ms-lease-state": "available", - "x-ms-lease-status": "unlocked", - "x-ms-request-id": "47fdecbf-701e-000e-0480-02ac8e000000", - "x-ms-server-encrypted": "true", - "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-25T08:34:05.6843403Z" + "x-ms-version-id": "2020-06-15T02:18:54.5695576Z" } }, { "method": "DELETE", - "url": "https://fakestorageaccount.blob.core.windows.net/container158512524174808034", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218753334906482", "query": { "sip": "0.0.0.0-255.255.255.255", "restype": "container" @@ -178,19 +80,21 @@ "status": 202, "response": "", "responseHeaders": { + "content-length": "0", + "date": "Mon, 15 Jun 2020 02:18:54 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "8f6735b3-27a7-4552-a5bc-818b351d7699", - "x-ms-request-id": "47fded10-701e-000e-5080-02ac8e000000", + "x-ms-client-request-id": "399c45ee-4ad9-47c6-81a9-c34e68bc1fea", + "x-ms-request-id": "2ab98925-d01e-0067-3dbb-425d5c000000", "x-ms-version": "2019-12-12" } } ], "uniqueTestInfo": { "uniqueName": { - "container": "container158512524174808034", - "blob": "blob158512524270507574" + "container": "container159218753334906482", + "blob": "blob159218753391205402" }, "newDate": {} }, - "hash": "638077f3701ea504dd68739c992ec307" + "hash": "7babdaecbd7c5e101733cf84ccfa00ad" } \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_setmetadata.json b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_setmetadata.json index e85455d3156f..591a39120d5c 100644 --- a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_setmetadata.json +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_setmetadata.json @@ -2,7 +2,7 @@ "recordings": [ { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459881838601962", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218754372700309", "query": { "sip": "0.0.0.0-255.255.255.255", "restype": "container" @@ -12,18 +12,18 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Thu, 19 Mar 2020 06:20:17 GMT", - "etag": "\"0x8D7CBCD98BB2091\"", - "last-modified": "Thu, 19 Mar 2020 06:20:18 GMT", + "date": "Mon, 15 Jun 2020 02:19:03 GMT", + "etag": "\"0x8D810D2798730BE\"", + "last-modified": "Mon, 15 Jun 2020 02:19:04 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "254a5406-549d-4b79-9ef6-9f6c45d5bf59", - "x-ms-request-id": "30564f34-d01e-0037-2bb6-fd086e000000", + "x-ms-client-request-id": "e3815542-4e1f-4ddd-93c1-ca9f3df3d1b3", + "x-ms-request-id": "2ab9977f-d01e-0067-75bb-425d5c000000", "x-ms-version": "2019-12-12" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459881838601962/blob158459881886105715", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218754372700309/blob159218754430001001", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -33,21 +33,21 @@ "responseHeaders": { "content-length": "0", "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", - "date": "Thu, 19 Mar 2020 06:20:18 GMT", - "etag": "\"0x8D7CBCD9903BB5A\"", - "last-modified": "Thu, 19 Mar 2020 06:20:19 GMT", + "date": "Mon, 15 Jun 2020 02:19:04 GMT", + "etag": "\"0x8D810D279DDE591\"", + "last-modified": "Mon, 15 Jun 2020 02:19:04 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "0c24c0c8-b77f-412c-a1de-b37f6ddcaaa0", + "x-ms-client-request-id": "5c88989d-71fb-46cc-b5a1-09922d23f989", "x-ms-content-crc64": "YeJLfssylmU=", - "x-ms-request-id": "30564ff0-d01e-0037-55b6-fd086e000000", + "x-ms-request-id": "2ab9984f-d01e-0067-36bb-425d5c000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-19T06:20:19.2107354Z" + "x-ms-version-id": "2020-06-15T02:19:04.6687121Z" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459881838601962/blob158459881886105715", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218754372700309/blob159218754430001001", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -57,21 +57,21 @@ "responseHeaders": { "content-length": "0", "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", - "date": "Thu, 19 Mar 2020 06:20:18 GMT", - "etag": "\"0x8D7CBCD992999C2\"", - "last-modified": "Thu, 19 Mar 2020 06:20:19 GMT", + "date": "Mon, 15 Jun 2020 02:19:04 GMT", + "etag": "\"0x8D810D27A09915F\"", + "last-modified": "Mon, 15 Jun 2020 02:19:04 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "e040398f-32a5-490c-bd3b-cb9f75faeb25", + "x-ms-client-request-id": "4b02dd51-5682-4930-bfa4-0c73dfc8e35a", "x-ms-content-crc64": "AAAAAAAAAAA=", - "x-ms-request-id": "3056505b-d01e-0037-36b6-fd086e000000", + "x-ms-request-id": "2ab998b3-d01e-0067-14bb-425d5c000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-19T06:20:19.4609131Z" + "x-ms-version-id": "2020-06-15T02:19:04.9559151Z" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459881838601962/blob158459881886105715", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218754372700309/blob159218754430001001", "query": { "sip": "0.0.0.0-255.255.255.255", "comp": "metadata" @@ -81,20 +81,20 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Thu, 19 Mar 2020 06:20:19 GMT", - "etag": "\"0x8D7CBCD9972E51E\"", - "last-modified": "Thu, 19 Mar 2020 06:20:19 GMT", + "date": "Mon, 15 Jun 2020 02:19:05 GMT", + "etag": "\"0x8D810D27A5FD748\"", + "last-modified": "Mon, 15 Jun 2020 02:19:05 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "c12c9c26-0ed0-4f4e-bd91-edcbeda84636", - "x-ms-request-id": "30565129-d01e-0037-7ab6-fd086e000000", + "x-ms-client-request-id": "e733113d-4ce2-4899-a3b5-5496e7a930ba", + "x-ms-request-id": "2ab99978-d01e-0067-49bb-425d5c000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-19T06:20:19.9402542Z" + "x-ms-version-id": "2020-06-15T02:19:05.5223156Z" } }, { "method": "DELETE", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459881838601962", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218754372700309", "query": { "sip": "0.0.0.0-255.255.255.255", "restype": "container" @@ -104,20 +104,20 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Thu, 19 Mar 2020 06:20:19 GMT", + "date": "Mon, 15 Jun 2020 02:19:05 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "6cfb6192-5ce5-4e07-b66f-29b3a6a1c5ff", - "x-ms-request-id": "30565236-d01e-0037-6eb6-fd086e000000", + "x-ms-client-request-id": "0d70c173-3cba-4a31-b132-d484d954e40b", + "x-ms-request-id": "2ab99a49-d01e-0067-0fbb-425d5c000000", "x-ms-version": "2019-12-12" } } ], "uniqueTestInfo": { "uniqueName": { - "container": "container158459881838601962", - "blob": "blob158459881886105715" + "container": "container159218754372700309", + "blob": "blob159218754430001001" }, "newDate": {} }, - "hash": "707b5201201727b785455ac69d6a0da0" + "hash": "d4bcb87c6e48b98a6e54b6c20c16a2c7" } \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_undelete_a_softdeleted_version.json b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_undelete_a_softdeleted_version.json index d6a06b8ee3a8..8258e912ab3e 100644 --- a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_undelete_a_softdeleted_version.json +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_undelete_a_softdeleted_version.json @@ -2,7 +2,7 @@ "recordings": [ { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459882055502672", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218754630302160", "query": { "sip": "0.0.0.0-255.255.255.255", "restype": "container" @@ -12,18 +12,18 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Thu, 19 Mar 2020 06:20:20 GMT", - "etag": "\"0x8D7CBCD9A06EEA3\"", - "last-modified": "Thu, 19 Mar 2020 06:20:20 GMT", + "date": "Mon, 15 Jun 2020 02:19:06 GMT", + "etag": "\"0x8D810D27B0F50A0\"", + "last-modified": "Mon, 15 Jun 2020 02:19:06 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "2aed0192-7a23-408f-96fa-096e4609528e", - "x-ms-request-id": "305652dd-d01e-0037-09b6-fd086e000000", + "x-ms-client-request-id": "3583e10a-15bf-4da8-a3cc-568294dbe23a", + "x-ms-request-id": "2ab99b06-d01e-0067-42bb-425d5c000000", "x-ms-version": "2019-12-12" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459882055502672/blob158459882104501497", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218754630302160/blob159218754686903269", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -33,21 +33,21 @@ "responseHeaders": { "content-length": "0", "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", - "date": "Thu, 19 Mar 2020 06:20:20 GMT", - "etag": "\"0x8D7CBCD9A513882\"", - "last-modified": "Thu, 19 Mar 2020 06:20:21 GMT", + "date": "Mon, 15 Jun 2020 02:19:06 GMT", + "etag": "\"0x8D810D27B660528\"", + "last-modified": "Mon, 15 Jun 2020 02:19:07 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "fb1e24bd-fc4c-48ba-a688-852f39642db9", + "x-ms-client-request-id": "3d393b03-0090-4a4c-b305-f5446c99da4e", "x-ms-content-crc64": "YeJLfssylmU=", - "x-ms-request-id": "305653be-d01e-0037-57b6-fd086e000000", + "x-ms-request-id": "2ab99bd8-d01e-0067-01bb-425d5c000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-19T06:20:21.3962882Z" + "x-ms-version-id": "2020-06-15T02:19:07.2385320Z" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459882055502672/blob158459882104501497", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218754630302160/blob159218754686903269", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -57,16 +57,16 @@ "responseHeaders": { "content-length": "0", "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", - "date": "Thu, 19 Mar 2020 06:20:20 GMT", - "etag": "\"0x8D7CBCD9A75DE22\"", - "last-modified": "Thu, 19 Mar 2020 06:20:21 GMT", + "date": "Mon, 15 Jun 2020 02:19:07 GMT", + "etag": "\"0x8D810D27B93FB59\"", + "last-modified": "Mon, 15 Jun 2020 02:19:07 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "37728b64-4f21-4c84-8c95-95218cff1ab2", + "x-ms-client-request-id": "3db459a1-6612-4ce4-802d-bfcaaf873d91", "x-ms-content-crc64": "AAAAAAAAAAA=", - "x-ms-request-id": "30565420-d01e-0037-30b6-fd086e000000", + "x-ms-request-id": "2ab99c46-d01e-0067-6abb-425d5c000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-19T06:20:21.6374578Z" + "x-ms-version-id": "2020-06-15T02:19:07.5417468Z" } }, { @@ -79,41 +79,109 @@ }, "requestBody": null, "status": 200, - "response": "1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalseGET,PUT,POST,HEAD,DELETE,MERGE,OPTIONS,PATCH***86400true7false", + "response": "1.0truetruetruetrue51.0truetruetrue31.0truetruetrue4DELETE,GET,HEAD,MERGE,POST,OPTIONS,PUT***86400GETexample.com**8888GETexample.com**8888GETexample.com**8888GETexample.com**8888true7false2018-03-28", "responseHeaders": { "content-type": "application/xml", - "date": "Thu, 19 Mar 2020 06:20:21 GMT", + "date": "Mon, 15 Jun 2020 02:19:07 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "transfer-encoding": "chunked", - "x-ms-client-request-id": "f2281506-e6e8-4678-82c7-c274024b2085", - "x-ms-request-id": "305654ea-d01e-0037-67b6-fd086e000000", + "x-ms-client-request-id": "3509c62b-daa0-4468-bafd-2456355d50b4", + "x-ms-request-id": "2ab99d26-d01e-0067-38bb-425d5c000000", "x-ms-version": "2019-12-12" } }, { "method": "DELETE", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459882055502672/blob158459882104501497", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218754630302160/blob159218754686903269", "query": { "sip": "0.0.0.0-255.255.255.255", - "versionid": "2020-03-19T06:20:21.3962882Z" + "versionid": "2020-06-15T02:19:07.2385320Z" }, "requestBody": null, - "status": 403, - "response": "OperationNotAllowedOnAutomaticSnapshotThe specified operation is not allowed on version.\nRequestId:30565582-d01e-0037-77b6-fd086e000000\nTime:2020-03-19T06:20:22.7757319Z", + "status": 202, + "response": "", "responseHeaders": { - "content-length": "257", - "content-type": "application/xml", - "date": "Thu, 19 Mar 2020 06:20:21 GMT", + "content-length": "0", + "date": "Mon, 15 Jun 2020 02:19:08 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "03a0dcdd-54be-4ebf-9c66-80cb6d1115fc", + "x-ms-delete-type-permanent": "false", + "x-ms-request-id": "2ab99df3-d01e-0067-77bb-425d5c000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "HEAD", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218754630302160/blob159218754686903269", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "versionid": "2020-06-15T02:19:07.2385320Z" + }, + "requestBody": null, + "status": 404, + "response": "", + "responseHeaders": { + "date": "Mon, 15 Jun 2020 02:19:08 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "ec8a9f82-3076-4709-9189-ad6910cb0f2f", - "x-ms-error-code": "OperationNotAllowedOnAutomaticSnapshot", - "x-ms-request-id": "30565582-d01e-0037-77b6-fd086e000000", + "transfer-encoding": "chunked", + "x-ms-client-request-id": "71a6e37d-1945-404c-8a1f-67d65acc13e6", + "x-ms-error-code": "BlobNotFound", + "x-ms-request-id": "2ab99ed5-d01e-0067-4ebb-425d5c000000", "x-ms-version": "2019-12-12" } }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218754630302160/blob159218754686903269", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "comp": "undelete" + }, + "requestBody": null, + "status": 200, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Mon, 15 Jun 2020 02:19:09 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "344c119c-6d00-486d-b37a-f7f0e4ec91b3", + "x-ms-request-id": "2ab99f93-d01e-0067-80bb-425d5c000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "HEAD", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218754630302160/blob159218754686903269", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "versionid": "2020-06-15T02:19:07.2385320Z" + }, + "requestBody": null, + "status": 200, + "response": "", + "responseHeaders": { + "accept-ranges": "bytes", + "content-length": "11", + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "content-type": "application/octet-stream", + "date": "Mon, 15 Jun 2020 02:19:09 GMT", + "etag": "\"0x8D810D27B660528\"", + "last-modified": "Mon, 15 Jun 2020 02:19:07 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-access-tier": "Hot", + "x-ms-access-tier-inferred": "true", + "x-ms-blob-type": "BlockBlob", + "x-ms-client-request-id": "5541772e-d1c3-4c1a-a05e-c8abb914358f", + "x-ms-creation-time": "Mon, 15 Jun 2020 02:19:07 GMT", + "x-ms-request-id": "2ab9a0cb-d01e-0067-28bb-425d5c000000", + "x-ms-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-06-15T02:19:07.2385320Z" + } + }, { "method": "DELETE", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459882055502672", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218754630302160", "query": { "sip": "0.0.0.0-255.255.255.255", "restype": "container" @@ -123,20 +191,20 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Thu, 19 Mar 2020 06:20:22 GMT", + "date": "Mon, 15 Jun 2020 02:19:10 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "a35dac7f-d094-428b-8ea9-350dfec73203", - "x-ms-request-id": "30565684-d01e-0037-65b6-fd086e000000", + "x-ms-client-request-id": "5f17a9c6-c9c2-448e-9f2e-312e0d1ed8df", + "x-ms-request-id": "2ab9a1d0-d01e-0067-29bb-425d5c000000", "x-ms-version": "2019-12-12" } } ], "uniqueTestInfo": { "uniqueName": { - "container": "container158459882055502672", - "blob": "blob158459882104501497" + "container": "container159218754630302160", + "blob": "blob159218754686903269" }, "newDate": {} }, - "hash": "532f15900a07a42923319f706bbc6e06" + "hash": "f1f4035dcb8b271af6bfaa60ef227f05" } \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_upload_block_blob_return_versionid.json b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_upload_block_blob_return_versionid.json index 5c5a0b153d20..376dce494fd1 100644 --- a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_upload_block_blob_return_versionid.json +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_upload_block_blob_return_versionid.json @@ -2,7 +2,7 @@ "recordings": [ { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459881347506266", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218753849008663", "query": { "sip": "0.0.0.0-255.255.255.255", "restype": "container" @@ -12,18 +12,18 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Thu, 19 Mar 2020 06:20:13 GMT", - "etag": "\"0x8D7CBCD95D6DD62\"", - "last-modified": "Thu, 19 Mar 2020 06:20:13 GMT", + "date": "Mon, 15 Jun 2020 02:18:58 GMT", + "etag": "\"0x8D810D276670F95\"", + "last-modified": "Mon, 15 Jun 2020 02:18:58 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "a2cd532a-b1de-43fd-bda1-1ab722c1766a", - "x-ms-request-id": "305647e2-d01e-0037-01b6-fd086e000000", + "x-ms-client-request-id": "b2acc2b3-c83a-4a87-92e1-5a867d80f16f", + "x-ms-request-id": "2ab99015-d01e-0067-60bb-425d5c000000", "x-ms-version": "2019-12-12" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459881347506266/blob158459881423702452", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218753849008663/blob159218753905300177", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -33,21 +33,21 @@ "responseHeaders": { "content-length": "0", "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", - "date": "Thu, 19 Mar 2020 06:20:13 GMT", - "etag": "\"0x8D7CBCD964CA822\"", - "last-modified": "Thu, 19 Mar 2020 06:20:14 GMT", + "date": "Mon, 15 Jun 2020 02:18:58 GMT", + "etag": "\"0x8D810D276BD4FAD\"", + "last-modified": "Mon, 15 Jun 2020 02:18:59 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "3306fa29-fd56-40ce-a669-28412165788c", + "x-ms-client-request-id": "7016da34-ad25-4796-9b68-65064c661daa", "x-ms-content-crc64": "YeJLfssylmU=", - "x-ms-request-id": "3056494b-d01e-0037-42b6-fd086e000000", + "x-ms-request-id": "2ab9911e-d01e-0067-5ebb-425d5c000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-19T06:20:14.6564923Z" + "x-ms-version-id": "2020-06-15T02:18:59.4219949Z" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459881347506266/blob158459881423702452", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218753849008663/blob159218753905300177", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -57,21 +57,21 @@ "responseHeaders": { "content-length": "0", "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", - "date": "Thu, 19 Mar 2020 06:20:14 GMT", - "etag": "\"0x8D7CBCD967E2167\"", - "last-modified": "Thu, 19 Mar 2020 06:20:14 GMT", + "date": "Mon, 15 Jun 2020 02:18:59 GMT", + "etag": "\"0x8D810D276E949AD\"", + "last-modified": "Mon, 15 Jun 2020 02:18:59 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "6dbb512a-6f3a-4541-925b-0b315983192a", + "x-ms-client-request-id": "d3ac67f7-2fa3-4c46-87ce-923d1be18b19", "x-ms-content-crc64": "AAAAAAAAAAA=", - "x-ms-request-id": "305649aa-d01e-0037-1bb6-fd086e000000", + "x-ms-request-id": "2ab9918f-d01e-0067-49bb-425d5c000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-19T06:20:14.9817232Z" + "x-ms-version-id": "2020-06-15T02:18:59.7111997Z" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459881347506266/blob158459881423702452", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218753849008663/blob159218753905300177", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -81,21 +81,21 @@ "responseHeaders": { "content-length": "0", "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", - "date": "Thu, 19 Mar 2020 06:20:14 GMT", - "etag": "\"0x8D7CBCD96A2C715\"", - "last-modified": "Thu, 19 Mar 2020 06:20:15 GMT", + "date": "Mon, 15 Jun 2020 02:18:59 GMT", + "etag": "\"0x8D810D277156AC5\"", + "last-modified": "Mon, 15 Jun 2020 02:18:59 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "b7ed4cea-f7c3-46e7-a0d0-3ce8678bf744", + "x-ms-client-request-id": "10993531-e030-4dfc-84b4-ab64296bd634", "x-ms-content-crc64": "YeJLfssylmU=", - "x-ms-request-id": "30564a11-d01e-0037-79b6-fd086e000000", + "x-ms-request-id": "2ab99212-d01e-0067-46bb-425d5c000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-19T06:20:15.2208943Z" + "x-ms-version-id": "2020-06-15T02:19:00.0004053Z" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459881347506266/blob158459881423702452", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218753849008663/blob159218753905300177", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -105,21 +105,21 @@ "responseHeaders": { "content-length": "0", "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", - "date": "Thu, 19 Mar 2020 06:20:14 GMT", - "etag": "\"0x8D7CBCD96CFD2BE\"", - "last-modified": "Thu, 19 Mar 2020 06:20:15 GMT", + "date": "Mon, 15 Jun 2020 02:18:59 GMT", + "etag": "\"0x8D810D27743D62F\"", + "last-modified": "Mon, 15 Jun 2020 02:19:00 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "9eddb025-ef53-4752-8962-b480860fa7f7", + "x-ms-client-request-id": "5c3640b6-ba03-4e8e-92c3-22c4f86982b4", "x-ms-content-crc64": "YeJLfssylmU=", - "x-ms-request-id": "30564a75-d01e-0037-52b6-fd086e000000", + "x-ms-request-id": "2ab99292-d01e-0067-3fbb-425d5c000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-03-19T06:20:15.5161038Z" + "x-ms-version-id": "2020-06-15T02:19:00.3046207Z" } }, { "method": "DELETE", - "url": "https://fakestorageaccount.blob.core.windows.net/container158459881347506266", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218753849008663", "query": { "sip": "0.0.0.0-255.255.255.255", "restype": "container" @@ -129,20 +129,20 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Thu, 19 Mar 2020 06:20:15 GMT", + "date": "Mon, 15 Jun 2020 02:19:00 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "58c792f0-4c42-4e8e-b3ca-5038152c3b70", - "x-ms-request-id": "30564b3d-d01e-0037-08b6-fd086e000000", + "x-ms-client-request-id": "dba6a32c-d3ae-4205-bd43-6a5efdd6344b", + "x-ms-request-id": "2ab99346-d01e-0067-6abb-425d5c000000", "x-ms-version": "2019-12-12" } } ], "uniqueTestInfo": { "uniqueName": { - "container": "container158459881347506266", - "blob": "blob158459881423702452" + "container": "container159218753849008663", + "blob": "blob159218753905300177" }, "newDate": {} }, - "hash": "603c7ef07e53e865d736dbd3d3ec4290" + "hash": "7086fafed40ca593c7e12e805472dee7" } \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_asynchorous_copy_return_versionid.js b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_asynchorous_copy_return_versionid.js index 950e654d0348..cafb9674bc2e 100644 --- a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_asynchorous_copy_return_versionid.js +++ b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_asynchorous_copy_return_versionid.js @@ -2,47 +2,47 @@ let nock = require('nock'); module.exports.hash = "e398b7bcabf21c191b9670bc84a4fc30"; -module.exports.testInfo = {"uniqueName":{"container":"container158459901672706413","blob":"blob158459901696704278","copiedblob":"copiedblob158459901745702616"},"newDate":{}} +module.exports.testInfo = {"uniqueName":{"container":"container159218742818906916","blob":"blob159218742847404567","copiedblob":"copiedblob159218742904903148"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459901672706413') + .put('/container159218742818906916') .query(true) .reply(201, "", [ 'Content-Length', '0', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:36 GMT', + 'Mon, 15 Jun 2020 02:17:08 GMT', 'ETag', - '"0x8D7CBCE0ECFF5AA"', + '"0x8D810D2347E171E"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'b42b9026-701e-005c-1eb6-fd8f9a000000', + '4bfa9fc6-e01e-0021-0bbb-4269db000000', 'x-ms-client-request-id', - 'f104b9b5-248d-4a04-ad6d-43cd54288c1d', + '928df801-1a2e-4ac2-8a7d-78e05df4d41c', 'x-ms-version', '2019-12-12', 'Date', - 'Thu, 19 Mar 2020 06:23:36 GMT' + 'Mon, 15 Jun 2020 02:17:07 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459901672706413/blob158459901696704278', "Hello World") + .put('/container159218742818906916/blob159218742847404567', "Hello World") .reply(201, "", [ 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:37 GMT', + 'Mon, 15 Jun 2020 02:17:08 GMT', 'ETag', - '"0x8D7CBCE0EF52E44"', + '"0x8D810D234AA4106"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e55d1-b01e-0088-29b6-fd3fcb000000', + '0f470f5b-701e-006e-6bbb-42188f000000', 'x-ms-client-request-id', - '26737cca-f85e-439f-8570-3ec7b029cc2b', + '23400dd3-e41a-4781-b221-f3325d8cfce7', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -50,28 +50,28 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-03-19T06:23:37.0865220Z', + '2020-06-15T02:17:08.5674758Z', 'Date', - 'Thu, 19 Mar 2020 06:23:36 GMT' + 'Mon, 15 Jun 2020 02:17:08 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459901672706413/blob158459901696704278') + .put('/container159218742818906916/blob159218742847404567') .reply(201, "", [ 'Content-Length', '0', 'Content-MD5', '1B2M2Y8AsgTpgAmY7PhCfg==', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:37 GMT', + 'Mon, 15 Jun 2020 02:17:08 GMT', 'ETag', - '"0x8D7CBCE0F1AE597"', + '"0x8D810D234D5ECD8"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'b42b90ea-701e-005c-46b6-fd8f9a000000', + '4bfaa0ac-e01e-0021-62bb-4269db000000', 'x-ms-client-request-id', - 'db1cbd1e-f99e-4038-bdc8-aa6bbe4fb89b', + '2f2c7587-c3ad-46f2-a604-d7d8d5695417', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -79,40 +79,40 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-03-19T06:23:37.3356992Z', + '2020-06-15T02:17:08.8546792Z', 'Date', - 'Thu, 19 Mar 2020 06:23:36 GMT' + 'Mon, 15 Jun 2020 02:17:08 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459901672706413/copiedblob158459901745702616') + .put('/container159218742818906916/copiedblob159218742904903148') .reply(202, "", [ 'Content-Length', '0', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:37 GMT', + 'Mon, 15 Jun 2020 02:17:09 GMT', 'ETag', - '"0x8D7CBCE0F409CE5"', + '"0x8D810D235020DF0"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e568d-b01e-0088-47b6-fd3fcb000000', + '0f4710e1-701e-006e-61bb-42188f000000', 'x-ms-client-request-id', - 'c72b3194-a8cf-4d4d-8d2b-2102e19ff48b', + 'f64403d2-8974-432f-a1f9-71519f0b5cde', 'x-ms-version', '2019-12-12', 'x-ms-version-id', - '2020-03-19T06:23:37.5818746Z', + '2020-06-15T02:17:09.1428848Z', 'x-ms-copy-id', - '6b333786-1dd4-452d-8ed5-e6a48eb7c838', + 'c6568929-560c-40e9-8ebe-45681efb26b2', 'x-ms-copy-status', 'success', 'Date', - 'Thu, 19 Mar 2020 06:23:37 GMT' + 'Mon, 15 Jun 2020 02:17:09 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container158459901672706413') + .delete('/container159218742818906916') .query(true) .reply(202, "", [ 'Content-Length', @@ -120,11 +120,11 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'b42b91bc-701e-005c-06b6-fd8f9a000000', + '4bfaa188-e01e-0021-31bb-4269db000000', 'x-ms-client-request-id', - '8307f037-3e1e-4daa-b706-5132be449766', + '5c3bbef5-41ea-4e94-9e98-02ceedbe6fdd', 'x-ms-version', '2019-12-12', 'Date', - 'Thu, 19 Mar 2020 06:23:37 GMT' + 'Mon, 15 Jun 2020 02:17:08 GMT' ]); diff --git a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_blob_create_return_versionid.js b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_blob_create_return_versionid.js index e035d8fd7ef2..715728ae8117 100644 --- a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_blob_create_return_versionid.js +++ b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_blob_create_return_versionid.js @@ -2,47 +2,47 @@ let nock = require('nock'); module.exports.hash = "451c6fd62c81383c6e0cce46649063e6"; -module.exports.testInfo = {"uniqueName":{"container":"container158459901405902088","blob":"blob158459901430407722","appendblob":"appendblob158459901478704253","pageblob":"pageblob158459901502809947"},"newDate":{}} +module.exports.testInfo = {"uniqueName":{"container":"container159218742502502412","blob":"blob159218742531004748","appendblob":"appendblob159218742588203170","pageblob":"pageblob159218742616903229"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459901405902088') + .put('/container159218742502502412') .query(true) .reply(201, "", [ 'Content-Length', '0', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:34 GMT', + 'Mon, 15 Jun 2020 02:17:05 GMT', 'ETag', - '"0x8D7CBCE0D395269"', + '"0x8D810D2329B5347"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e51d6-b01e-0088-23b6-fd3fcb000000', + '0f470730-701e-006e-35bb-42188f000000', 'x-ms-client-request-id', - 'a860ac66-29b6-44a1-8fed-9444239e0645', + '7d1aed3f-3a2e-4ed6-8c7b-9739e3003eb6', 'x-ms-version', '2019-12-12', 'Date', - 'Thu, 19 Mar 2020 06:23:33 GMT' + 'Mon, 15 Jun 2020 02:17:04 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459901405902088/blob158459901430407722', "Hello World") + .put('/container159218742502502412/blob159218742531004748', "Hello World") .reply(201, "", [ 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:34 GMT', + 'Mon, 15 Jun 2020 02:17:05 GMT', 'ETag', - '"0x8D7CBCE0D5E8CEE"', + '"0x8D810D232C71FC1"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'b42b8b95-701e-005c-79b6-fd8f9a000000', + '4bfa9c68-e01e-0021-64bb-4269db000000', 'x-ms-client-request-id', - '758156ed-19ca-4cbc-90ac-d3233809b027', + 'afebd812-009f-4eeb-a895-0351224b8ca7', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -50,28 +50,28 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-03-19T06:23:34.4226312Z', + '2020-06-15T02:17:05.4012353Z', 'Date', - 'Thu, 19 Mar 2020 06:23:34 GMT' + 'Mon, 15 Jun 2020 02:17:04 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459901405902088/blob158459901430407722') + .put('/container159218742502502412/blob159218742531004748') .reply(201, "", [ 'Content-Length', '0', 'Content-MD5', '1B2M2Y8AsgTpgAmY7PhCfg==', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:34 GMT', + 'Mon, 15 Jun 2020 02:17:05 GMT', 'ETag', - '"0x8D7CBCE0D83A7E4"', + '"0x8D810D232F27D5D"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e526b-b01e-0088-25b6-fd3fcb000000', + '0f470876-701e-006e-61bb-42188f000000', 'x-ms-client-request-id', - '983e5e09-80f1-4347-aeed-2f9aaef9eabc', + 'ab511444-0a3b-4b2d-b111-71a11a619c32', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -79,63 +79,63 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-03-19T06:23:34.6658036Z', + '2020-06-15T02:17:05.6874363Z', 'Date', - 'Thu, 19 Mar 2020 06:23:34 GMT' + 'Mon, 15 Jun 2020 02:17:04 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459901405902088/appendblob158459901478704253') + .put('/container159218742502502412/appendblob159218742588203170') .reply(201, "", [ 'Content-Length', '0', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:34 GMT', + 'Mon, 15 Jun 2020 02:17:05 GMT', 'ETag', - '"0x8D7CBCE0DA89BC1"', + '"0x8D810D2331E7743"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'b42b8c3b-701e-005c-0eb6-fd8f9a000000', + '4bfa9d5b-e01e-0021-4fbb-4269db000000', 'x-ms-client-request-id', - 'f74f7cb5-8987-4250-a54a-a8b48ba25e63', + '70e17d29-64fd-466d-9911-6f97523752ce', 'x-ms-version', '2019-12-12', 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-03-19T06:23:34.9069761Z', + '2020-06-15T02:17:05.9736387Z', 'Date', - 'Thu, 19 Mar 2020 06:23:34 GMT' + 'Mon, 15 Jun 2020 02:17:05 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459901405902088/pageblob158459901502809947') + .put('/container159218742502502412/pageblob159218742616903229') .reply(201, "", [ 'Content-Length', '0', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:35 GMT', + 'Mon, 15 Jun 2020 02:17:06 GMT', 'ETag', - '"0x8D7CBCE0DCD6884"', + '"0x8D810D2334A7141"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e5321-b01e-0088-46b6-fd3fcb000000', + '0f4709e9-701e-006e-41bb-42188f000000', 'x-ms-client-request-id', - 'c030965b-1792-4fe5-8ac7-aa7d620bd50e', + '8e15403d-329d-4e6c-895f-b05e37fa9b7d', 'x-ms-version', '2019-12-12', 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-03-19T06:23:35.1481476Z', + '2020-06-15T02:17:06.2618433Z', 'Date', - 'Thu, 19 Mar 2020 06:23:34 GMT' + 'Mon, 15 Jun 2020 02:17:05 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container158459901405902088') + .delete('/container159218742502502412') .query(true) .reply(202, "", [ 'Content-Length', @@ -143,11 +143,11 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'b42b8d21-701e-005c-5ab6-fd8f9a000000', + '4bfa9dff-e01e-0021-67bb-4269db000000', 'x-ms-client-request-id', - 'c1122fe5-8e67-403e-ada5-0d683341ca80', + '03879b11-a81a-44d0-b7c5-bf5f895e0605', 'x-ms-version', '2019-12-12', 'Date', - 'Thu, 19 Mar 2020 06:23:34 GMT' + 'Mon, 15 Jun 2020 02:17:05 GMT' ]); diff --git a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_delete_a_snapshot.js b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_delete_a_snapshot.js index 85fba3a92442..38c653cbaa6b 100644 --- a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_delete_a_snapshot.js +++ b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_delete_a_snapshot.js @@ -1,48 +1,48 @@ let nock = require('nock'); -module.exports.hash = "58513e0c39f37daceede07e04a9062d7"; +module.exports.hash = "4a10969378b483457b67ea3e5414861a"; -module.exports.testInfo = {"uniqueName":{"container":"container158459900517006636","blob":"blob158459900541003605"},"newDate":{}} +module.exports.testInfo = {"uniqueName":{"container":"container159218741251207833","blob":"blob159218741280002928"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459900517006636') + .put('/container159218741251207833') .query(true) .reply(201, "", [ 'Content-Length', '0', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:25 GMT', + 'Mon, 15 Jun 2020 02:16:52 GMT', 'ETag', - '"0x8D7CBCE07EC9D40"', + '"0x8D810D22B269B9D"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e45b1-b01e-0088-58b6-fd3fcb000000', + '0f46e8b5-701e-006e-0fbb-42188f000000', 'x-ms-client-request-id', - '733d2bdc-1c46-4c6b-ad25-f1bab95a4d28', + 'b6dc20ca-0031-4588-826c-4a22db81fbe2', 'x-ms-version', '2019-12-12', 'Date', - 'Thu, 19 Mar 2020 06:23:25 GMT' + 'Mon, 15 Jun 2020 02:16:51 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459900517006636/blob158459900541003605', "Hello World") + .put('/container159218741251207833/blob159218741280002928', "Hello World") .reply(201, "", [ 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:25 GMT', + 'Mon, 15 Jun 2020 02:16:52 GMT', 'ETag', - '"0x8D7CBCE08131040"', + '"0x8D810D22B524539"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e4604-b01e-0088-1bb6-fd3fcb000000', + '0f46e95b-701e-006e-2ebb-42188f000000', 'x-ms-client-request-id', - '9f2600f8-24c8-4777-add7-c4d4cd828891', + '57d3d9a6-4df1-4ca4-bca2-6c75a5e4f415', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -50,28 +50,28 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-03-19T06:23:25.5393109Z', + '2020-06-15T02:16:52.8913721Z', 'Date', - 'Thu, 19 Mar 2020 06:23:25 GMT' + 'Mon, 15 Jun 2020 02:16:51 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459900517006636/blob158459900541003605') + .put('/container159218741251207833/blob159218741280002928') .reply(201, "", [ 'Content-Length', '0', 'Content-MD5', '1B2M2Y8AsgTpgAmY7PhCfg==', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:25 GMT', + 'Mon, 15 Jun 2020 02:16:53 GMT', 'ETag', - '"0x8D7CBCE0838EEA8"', + '"0x8D810D22B7E664A"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e4655-b01e-0088-57b6-fd3fcb000000', + '0f46ea08-701e-006e-52bb-42188f000000', 'x-ms-client-request-id', - '4a619f85-b558-43fe-9b50-9e19f35c80dc', + '2cf2324d-c567-46c8-b7f8-bc2287172abb', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -79,41 +79,41 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-03-19T06:23:25.7884877Z', + '2020-06-15T02:16:53.1815770Z', 'Date', - 'Thu, 19 Mar 2020 06:23:25 GMT' + 'Mon, 15 Jun 2020 02:16:52 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459900517006636/blob158459900541003605') + .put('/container159218741251207833/blob159218741280002928') .query(true) .reply(201, "", [ 'Content-Length', '0', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:25 GMT', + 'Mon, 15 Jun 2020 02:16:53 GMT', 'ETag', - '"0x8D7CBCE0838EEA8"', + '"0x8D810D22B7E664A"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e46a6-b01e-0088-1cb6-fd3fcb000000', + '0f46ead9-701e-006e-1ebb-42188f000000', 'x-ms-client-request-id', - '94b6e56b-1a4e-4534-8e00-0853c2edb25e', + 'e5ba2665-f14a-4e58-a2b8-5bbacc77ccab', 'x-ms-version', '2019-12-12', 'x-ms-version-id', - '2020-03-19T06:23:26.0416662Z', + '2020-06-15T02:16:53.4727821Z', 'x-ms-snapshot', - '2020-03-19T06:23:26.0406662Z', + '2020-06-15T02:16:53.4717821Z', 'x-ms-request-server-encrypted', 'false', 'Date', - 'Thu, 19 Mar 2020 06:23:25 GMT' + 'Mon, 15 Jun 2020 02:16:52 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container158459900517006636/blob158459900541003605') + .delete('/container159218741251207833/blob159218741280002928') .query(true) .reply(202, "", [ 'Content-Length', @@ -121,19 +121,19 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e4731-b01e-0088-7ab6-fd3fcb000000', + '0f46eb7c-701e-006e-3cbb-42188f000000', 'x-ms-client-request-id', - '2dd68f98-6cc4-42e3-bd25-5c2aa3a24021', + '19a1ed43-d8a0-45bb-8fdc-6c0e3fc39bbd', 'x-ms-version', '2019-12-12', 'x-ms-delete-type-permanent', 'false', 'Date', - 'Thu, 19 Mar 2020 06:23:26 GMT' + 'Mon, 15 Jun 2020 02:16:52 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container158459900517006636/blob158459900541003605') + .head('/container159218741251207833/blob159218741280002928') .query(true) .reply(404, "", [ 'Transfer-Encoding', @@ -141,9 +141,9 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e4777-b01e-0088-36b6-fd3fcb000000', + '0f46ec58-701e-006e-15bb-42188f000000', 'x-ms-client-request-id', - '414f3441-c5c8-423f-9969-321199850025', + 'df951396-977e-48f3-8798-2820554459cb', 'x-ms-version', '2019-12-12', 'x-ms-error-code', @@ -153,11 +153,11 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Access-Control-Allow-Origin', '*', 'Date', - 'Thu, 19 Mar 2020 06:23:26 GMT' + 'Mon, 15 Jun 2020 02:16:53 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container158459900517006636/blob158459900541003605') + .head('/container159218741251207833/blob159218741280002928') .reply(200, "", [ 'Content-Length', '0', @@ -166,25 +166,25 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Content-MD5', '1B2M2Y8AsgTpgAmY7PhCfg==', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:25 GMT', + 'Mon, 15 Jun 2020 02:16:53 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7CBCE0838EEA8"', + '"0x8D810D22B7E664A"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e47cc-b01e-0088-7bb6-fd3fcb000000', + '0f46ed0b-701e-006e-43bb-42188f000000', 'x-ms-client-request-id', - 'eb986bff-0e1e-488c-9dd3-022426430a14', + 'b028be59-ba2e-4388-a8cf-d87ef21d9f27', 'x-ms-version', '2019-12-12', 'x-ms-version-id', - '2020-03-19T06:23:26.0416662Z', + '2020-06-15T02:16:53.4727821Z', 'x-ms-is-current-version', 'true', 'x-ms-creation-time', - 'Thu, 19 Mar 2020 06:23:25 GMT', + 'Mon, 15 Jun 2020 02:16:53 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -202,11 +202,11 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Access-Control-Allow-Origin', '*', 'Date', - 'Thu, 19 Mar 2020 06:23:26 GMT' + 'Mon, 15 Jun 2020 02:16:53 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container158459900517006636') + .delete('/container159218741251207833') .query(true) .reply(202, "", [ 'Content-Length', @@ -214,11 +214,11 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e4835-b01e-0088-55b6-fd3fcb000000', + '0f46edbe-701e-006e-73bb-42188f000000', 'x-ms-client-request-id', - 'c48eb5cb-477d-4c21-9e81-6eeee53c9525', + '7c13225b-05ce-4b31-a476-a2a2c866da2e', 'x-ms-version', '2019-12-12', 'Date', - 'Thu, 19 Mar 2020 06:23:26 GMT' + 'Mon, 15 Jun 2020 02:16:53 GMT' ]); diff --git a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_delete_a_version.js b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_delete_a_version.js index 86023d3df706..bf67822d62a9 100644 --- a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_delete_a_version.js +++ b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_delete_a_version.js @@ -1,48 +1,48 @@ let nock = require('nock'); -module.exports.hash = "bc4dd729c5dd87bf12319e80d8e8545f"; +module.exports.hash = "340a336daa63798f474bf864d9f55bbc"; -module.exports.testInfo = {"uniqueName":{"container":"container158459900100501054","blob":"blob158459900124500587"},"newDate":{}} +module.exports.testInfo = {"uniqueName":{"container":"container159218740728802920","blob":"blob159218740757504391"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459900100501054') + .put('/container159218740728802920') .query(true) .reply(201, "", [ 'Content-Length', '0', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:21 GMT', + 'Mon, 15 Jun 2020 02:16:47 GMT', 'ETag', - '"0x8D7CBCE05713E93"', + '"0x8D810D2280938DC"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e4071-b01e-0088-52b6-fd3fcb000000', + '0f46da8b-701e-006e-72bb-42188f000000', 'x-ms-client-request-id', - '012c13e8-7b4d-4c9d-b8a2-da8647837ae1', + 'eed4cddf-496d-43e5-8044-9bd4e87c3bc6', 'x-ms-version', '2019-12-12', 'Date', - 'Thu, 19 Mar 2020 06:23:20 GMT' + 'Mon, 15 Jun 2020 02:16:46 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459900100501054/blob158459900124500587', "Hello World") + .put('/container159218740728802920/blob159218740757504391', "Hello World") .reply(201, "", [ 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:21 GMT', + 'Mon, 15 Jun 2020 02:16:47 GMT', 'ETag', - '"0x8D7CBCE0596C6CE"', + '"0x8D810D22835A7C0"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e40ac-b01e-0088-05b6-fd3fcb000000', + '0f46db49-701e-006e-2fbb-42188f000000', 'x-ms-client-request-id', - '0d5ef65f-c510-4533-89ad-4118a25df3ee', + '2fb077bb-3797-4408-b688-065d5db24458', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -50,28 +50,28 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-03-19T06:23:21.3693415Z', + '2020-06-15T02:16:47.6706752Z', 'Date', - 'Thu, 19 Mar 2020 06:23:21 GMT' + 'Mon, 15 Jun 2020 02:16:46 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459900100501054/blob158459900124500587') + .put('/container159218740728802920/blob159218740757504391') .reply(201, "", [ 'Content-Length', '0', 'Content-MD5', '1B2M2Y8AsgTpgAmY7PhCfg==', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:21 GMT', + 'Mon, 15 Jun 2020 02:16:47 GMT', 'ETag', - '"0x8D7CBCE05BB9395"', + '"0x8D810D22861537C"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e40ed-b01e-0088-3eb6-fd3fcb000000', + '0f46dbde-701e-006e-3ebb-42188f000000', 'x-ms-client-request-id', - 'fadba3a7-65e3-4a84-9fc4-408e67a95bfb', + 'dab33227-e542-4fa4-996c-fa6434b64943', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -79,13 +79,13 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-03-19T06:23:21.6115130Z', + '2020-06-15T02:16:47.9578764Z', 'Date', - 'Thu, 19 Mar 2020 06:23:21 GMT' + 'Mon, 15 Jun 2020 02:16:46 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container158459900100501054/blob158459900124500587') + .delete('/container159218740728802920/blob159218740757504391') .query(true) .reply(202, "", [ 'Content-Length', @@ -93,19 +93,19 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e4139-b01e-0088-02b6-fd3fcb000000', + '0f46dcb3-701e-006e-09bb-42188f000000', 'x-ms-client-request-id', - '24727022-163f-487e-8ea4-a0097c6b54d8', + '65f30f0b-c2cb-4472-86e9-702401970d55', 'x-ms-version', '2019-12-12', 'x-ms-delete-type-permanent', 'false', 'Date', - 'Thu, 19 Mar 2020 06:23:21 GMT' + 'Mon, 15 Jun 2020 02:16:47 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container158459900100501054/blob158459900124500587') + .head('/container159218740728802920/blob159218740757504391') .query(true) .reply(404, "", [ 'Transfer-Encoding', @@ -113,9 +113,9 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e4189-b01e-0088-4ab6-fd3fcb000000', + '0f46ddb5-701e-006e-07bb-42188f000000', 'x-ms-client-request-id', - 'af9eca93-5e39-46f9-8485-14c012b27d62', + 'dd6cf012-60b6-404f-b0ee-f0f17b3d8ce0', 'x-ms-version', '2019-12-12', 'x-ms-error-code', @@ -125,11 +125,11 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Access-Control-Allow-Origin', '*', 'Date', - 'Thu, 19 Mar 2020 06:23:21 GMT' + 'Mon, 15 Jun 2020 02:16:47 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container158459900100501054/blob158459900124500587') + .head('/container159218740728802920/blob159218740757504391') .reply(200, "", [ 'Content-Length', '0', @@ -138,25 +138,25 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Content-MD5', '1B2M2Y8AsgTpgAmY7PhCfg==', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:21 GMT', + 'Mon, 15 Jun 2020 02:16:47 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7CBCE05BB9395"', + '"0x8D810D22861537C"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e41da-b01e-0088-08b6-fd3fcb000000', + '0f46de9a-701e-006e-66bb-42188f000000', 'x-ms-client-request-id', - '4529a963-a613-4f64-8563-55c56314ccf8', + 'c05e76b0-eb1c-4531-b493-f49cff6365f7', 'x-ms-version', '2019-12-12', 'x-ms-version-id', - '2020-03-19T06:23:21.6115130Z', + '2020-06-15T02:16:47.9578764Z', 'x-ms-is-current-version', 'true', 'x-ms-creation-time', - 'Thu, 19 Mar 2020 06:23:21 GMT', + 'Mon, 15 Jun 2020 02:16:47 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -174,11 +174,11 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Access-Control-Allow-Origin', '*', 'Date', - 'Thu, 19 Mar 2020 06:23:22 GMT' + 'Mon, 15 Jun 2020 02:16:47 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container158459900100501054') + .delete('/container159218740728802920') .query(true) .reply(202, "", [ 'Content-Length', @@ -186,11 +186,11 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e4227-b01e-0088-4bb6-fd3fcb000000', + '0f46df54-701e-006e-1bbb-42188f000000', 'x-ms-client-request-id', - 'edf24965-6935-4388-bd93-2a2b50cd9da6', + 'df6a3b01-ab78-49cc-8a00-afbd5c495c13', 'x-ms-version', '2019-12-12', 'Date', - 'Thu, 19 Mar 2020 06:23:22 GMT' + 'Mon, 15 Jun 2020 02:16:48 GMT' ]); diff --git a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleteblobs_should_work_for_batch_delete.js b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleteblobs_should_work_for_batch_delete.js index c41d73bad94b..2cb6cdc187cb 100644 --- a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleteblobs_should_work_for_batch_delete.js +++ b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleteblobs_should_work_for_batch_delete.js @@ -2,47 +2,47 @@ let nock = require('nock'); module.exports.hash = "f3924ffbb542416858b2a5df9d0271fe"; -module.exports.testInfo = {"uniqueName":{"container":"container159213484138100238","blob":"blob159213484151806013"},"newDate":{}} +module.exports.testInfo = {"uniqueName":{"container":"container159218740931506721","blob":"blob159218740960300270"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container159213484138100238') + .put('/container159218740931506721') .query(true) .reply(201, "", [ 'Content-Length', '0', 'Last-Modified', - 'Sun, 14 Jun 2020 11:40:41 GMT', + 'Mon, 15 Jun 2020 02:16:49 GMT', 'ETag', - '"0x8D81057C45530AA"', + '"0x8D810D2293E9647"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'f9238049-101e-0035-4940-4221b4000000', + '0f46e087-701e-006e-43bb-42188f000000', 'x-ms-client-request-id', - 'b3ef4b4f-91af-441c-b988-d4bf78557d3c', + '6dcfe237-a65a-4dad-9217-278e642a7d6a', 'x-ms-version', '2019-12-12', 'Date', - 'Sun, 14 Jun 2020 11:40:40 GMT' + 'Mon, 15 Jun 2020 02:16:48 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container159213484138100238/blob159213484151806013', "Hello World") + .put('/container159218740931506721/blob159218740960300270', "Hello World") .reply(201, "", [ 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Sun, 14 Jun 2020 11:40:41 GMT', + 'Mon, 15 Jun 2020 02:16:49 GMT', 'ETag', - '"0x8D81057C45A85DD"', + '"0x8D810D2296A411C"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'f923806b-101e-0035-6940-4221b4000000', + '0f46e15c-701e-006e-0ebb-42188f000000', 'x-ms-client-request-id', - '987cdf1d-40cf-45b2-84f5-171498aba9b8', + 'd582f000-d28e-4606-a54c-d7ec2b7570d8', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -50,28 +50,28 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-06-14T11:40:41.5391197Z', + '2020-06-15T02:16:49.6931100Z', 'Date', - 'Sun, 14 Jun 2020 11:40:41 GMT' + 'Mon, 15 Jun 2020 02:16:48 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container159213484138100238/blob159213484151806013') + .put('/container159218740931506721/blob159218740960300270') .reply(201, "", [ 'Content-Length', '0', 'Content-MD5', '1B2M2Y8AsgTpgAmY7PhCfg==', 'Last-Modified', - 'Sun, 14 Jun 2020 11:40:41 GMT', + 'Mon, 15 Jun 2020 02:16:49 GMT', 'ETag', - '"0x8D81057C45D1E66"', + '"0x8D810D229961401"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'f9238078-101e-0035-7640-4221b4000000', + '0f46e25a-701e-006e-03bb-42188f000000', 'x-ms-client-request-id', - '1913e0ce-7397-4b06-9f05-3d51e44d4614', + '0f95400a-997a-45e7-91dd-0da000ce2d48', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -79,13 +79,13 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-06-14T11:40:41.5571318Z', + '2020-06-15T02:16:49.9813137Z', 'Date', - 'Sun, 14 Jun 2020 11:40:41 GMT' + 'Mon, 15 Jun 2020 02:16:49 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container159213484138100238') + .delete('/container159218740931506721') .query(true) .reply(202, "", [ 'Content-Length', @@ -93,11 +93,11 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'f9238084-101e-0035-0240-4221b4000000', + '0f46e334-701e-006e-4cbb-42188f000000', 'x-ms-client-request-id', - '36f90171-99e9-4689-93c6-76b66fd5c18d', + '5e31ec86-f159-4460-b73a-edad1c387fd1', 'x-ms-version', '2019-12-12', 'Date', - 'Sun, 14 Jun 2020 11:40:41 GMT' + 'Mon, 15 Jun 2020 02:16:49 GMT' ]); diff --git a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleting_a_blob_that_has_snapshots_needs_deletesnapshots_option.js b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleting_a_blob_that_has_snapshots_needs_deletesnapshots_option.js index bf5c7943782b..92eb715cc0cc 100644 --- a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleting_a_blob_that_has_snapshots_needs_deletesnapshots_option.js +++ b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleting_a_blob_that_has_snapshots_needs_deletesnapshots_option.js @@ -1,48 +1,48 @@ let nock = require('nock'); -module.exports.hash = "db1d48bb3945806dc2f8f8b03ffa17a5"; +module.exports.hash = "a672c204152471aa4bce73e42405ffa0"; -module.exports.testInfo = {"uniqueName":{"container":"container158459900716901393","blob":"blob158459900741801925"},"newDate":{}} +module.exports.testInfo = {"uniqueName":{"container":"container159218741481808199","blob":"blob159218741536301937"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459900716901393') + .put('/container159218741481808199') .query(true) .reply(201, "", [ 'Content-Length', '0', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:27 GMT', + 'Mon, 15 Jun 2020 02:16:54 GMT', 'ETag', - '"0x8D7CBCE091E28E7"', + '"0x8D810D22C861E00"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e48a8-b01e-0088-33b6-fd3fcb000000', + '0f46eeb5-701e-006e-68bb-42188f000000', 'x-ms-client-request-id', - '32d1dc49-1081-42ce-ba6a-d845d7bf3b07', + '95e5ac62-2c39-4e86-afd9-97f414f30169', 'x-ms-version', '2019-12-12', 'Date', - 'Thu, 19 Mar 2020 06:23:27 GMT' + 'Mon, 15 Jun 2020 02:16:54 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459900716901393/blob158459900741801925', "Hello World") + .put('/container159218741481808199/blob159218741536301937', "Hello World") .reply(201, "", [ 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:27 GMT', + 'Mon, 15 Jun 2020 02:16:55 GMT', 'ETag', - '"0x8D7CBCE0945110B"', + '"0x8D810D22CD9A17B"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e4906-b01e-0088-03b6-fd3fcb000000', + '0f46f020-701e-006e-41bb-42188f000000', 'x-ms-client-request-id', - '11e5478c-a4eb-4fcc-9f4c-969ae0b21b8b', + '8a78c653-386f-4b1e-acdf-3512031bb281', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -50,28 +50,28 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-03-19T06:23:27.5437323Z', + '2020-06-15T02:16:55.4561915Z', 'Date', - 'Thu, 19 Mar 2020 06:23:27 GMT' + 'Mon, 15 Jun 2020 02:16:54 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459900716901393/blob158459900741801925') + .put('/container159218741481808199/blob159218741536301937') .reply(201, "", [ 'Content-Length', '0', 'Content-MD5', '1B2M2Y8AsgTpgAmY7PhCfg==', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:27 GMT', + 'Mon, 15 Jun 2020 02:16:55 GMT', 'ETag', - '"0x8D7CBCE096A04E8"', + '"0x8D810D22D052621"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e494c-b01e-0088-3cb6-fd3fcb000000', + '0f46f0ed-701e-006e-0abb-42188f000000', 'x-ms-client-request-id', - 'd5666cfb-1d22-4a2e-83a8-b3a12aafc77d', + '2fdf4d50-d974-40a1-9292-a50f4cf796d6', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -79,42 +79,42 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-03-19T06:23:27.7869048Z', + '2020-06-15T02:16:55.7423921Z', 'Date', - 'Thu, 19 Mar 2020 06:23:27 GMT' + 'Mon, 15 Jun 2020 02:16:54 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459900716901393/blob158459900741801925') + .put('/container159218741481808199/blob159218741536301937') .query(true) .reply(201, "", [ 'Content-Length', '0', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:27 GMT', + 'Mon, 15 Jun 2020 02:16:55 GMT', 'ETag', - '"0x8D7CBCE096A04E8"', + '"0x8D810D22D052621"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e4995-b01e-0088-7db6-fd3fcb000000', + '0f46f1c6-701e-006e-5dbb-42188f000000', 'x-ms-client-request-id', - 'd33a297c-129c-4de1-8322-a932e0497a39', + '9f068a97-b5fc-4b34-8f78-264f8cfe5532', 'x-ms-version', '2019-12-12', 'x-ms-version-id', - '2020-03-19T06:23:28.0310773Z', + '2020-06-15T02:16:56.0315946Z', 'x-ms-snapshot', - '2020-03-19T06:23:28.0300773Z', + '2020-06-15T02:16:56.0305946Z', 'x-ms-request-server-encrypted', 'false', 'Date', - 'Thu, 19 Mar 2020 06:23:27 GMT' + 'Mon, 15 Jun 2020 02:16:55 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container158459900716901393/blob158459900741801925') - .reply(409, "SnapshotsPresentThis operation is not permitted because the blob has snapshots.\nRequestId:775e4a07-b01e-0088-53b6-fd3fcb000000\nTime:2020-03-19T06:23:28.3044745Z", [ + .delete('/container159218741481808199/blob159218741536301937') + .reply(409, "SnapshotsPresentThis operation is not permitted because the blob has snapshots.\nRequestId:0f46f286-701e-006e-14bb-42188f000000\nTime:2020-06-15T02:16:56.3429056Z", [ 'Content-Length', '248', 'Content-Type', @@ -122,38 +122,38 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e4a07-b01e-0088-53b6-fd3fcb000000', + '0f46f286-701e-006e-14bb-42188f000000', 'x-ms-client-request-id', - '062856c8-f552-4d70-8aa1-78291df3cc05', + '6cb1d2d3-b392-4caf-a4ba-68b72ca53297', 'x-ms-version', '2019-12-12', 'x-ms-error-code', 'SnapshotsPresent', 'Date', - 'Thu, 19 Mar 2020 06:23:28 GMT' + 'Mon, 15 Jun 2020 02:16:55 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container158459900716901393/blob158459900741801925') + .delete('/container159218741481808199/blob159218741536301937') .reply(202, "", [ 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e4a64-b01e-0088-23b6-fd3fcb000000', + '0f46f337-701e-006e-45bb-42188f000000', 'x-ms-client-request-id', - '209597c0-ca18-47f0-b6c8-54ff2de516d4', + 'd990d2b9-36b5-4aed-ad9c-bcb711f05446', 'x-ms-version', '2019-12-12', 'x-ms-delete-type-permanent', 'false', 'Date', - 'Thu, 19 Mar 2020 06:23:28 GMT' + 'Mon, 15 Jun 2020 02:16:55 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container158459900716901393/blob158459900741801925') + .head('/container159218741481808199/blob159218741536301937') .query(true) .reply(404, "", [ 'Transfer-Encoding', @@ -161,9 +161,9 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'b42b83b1-701e-005c-0db6-fd8f9a000000', + '4bfa9219-e01e-0021-12bb-4269db000000', 'x-ms-client-request-id', - '15fccdb4-c158-4bfa-ba60-e5e9646e5a78', + '799d1acd-f1ef-4439-b08f-a792c0f3fca0', 'x-ms-version', '2019-12-12', 'x-ms-error-code', @@ -173,20 +173,20 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Access-Control-Allow-Origin', '*', 'Date', - 'Thu, 19 Mar 2020 06:23:28 GMT' + 'Mon, 15 Jun 2020 02:16:56 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container158459900716901393/blob158459900741801925') + .head('/container159218741481808199/blob159218741536301937') .reply(404, "", [ 'Transfer-Encoding', 'chunked', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e4be3-b01e-0088-63b6-fd3fcb000000', + '0f46f5ba-701e-006e-3fbb-42188f000000', 'x-ms-client-request-id', - '7d3f7598-4b5a-45b6-a03e-97ee76c6c8ea', + '95b25c06-93b7-44f1-a8ee-a01ddfa1e87c', 'x-ms-version', '2019-12-12', 'x-ms-error-code', @@ -196,11 +196,11 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Access-Control-Allow-Origin', '*', 'Date', - 'Thu, 19 Mar 2020 06:23:29 GMT' + 'Mon, 15 Jun 2020 02:16:56 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container158459900716901393') + .delete('/container159218741481808199') .query(true) .reply(202, "", [ 'Content-Length', @@ -208,11 +208,11 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'b42b8478-701e-005c-34b6-fd8f9a000000', + '4bfa92e3-e01e-0021-56bb-4269db000000', 'x-ms-client-request-id', - 'b37b4b1a-0c0a-4abf-904c-9fb9345b2489', + '78819c83-e69c-4e72-911c-3f3a49ddbcd0', 'x-ms-version', '2019-12-12', 'Date', - 'Thu, 19 Mar 2020 06:23:29 GMT' + 'Mon, 15 Jun 2020 02:16:57 GMT' ]); diff --git a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleting_a_blob_with_both_deletesnapshots_and_versionid_option_should_fail.js b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleting_a_blob_with_both_deletesnapshots_and_versionid_option_should_fail.js index 411cd0ef33b8..d18c09c7dbbe 100644 --- a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleting_a_blob_with_both_deletesnapshots_and_versionid_option_should_fail.js +++ b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleting_a_blob_with_both_deletesnapshots_and_versionid_option_should_fail.js @@ -2,47 +2,47 @@ let nock = require('nock'); module.exports.hash = "225342bc54f257faee0103248ddc59dd"; -module.exports.testInfo = {"uniqueName":{"container":"container158511669236805116","blob":"blob158511669646200888"},"newDate":{}} +module.exports.testInfo = {"uniqueName":{"container":"container159218741823804712","blob":"blob159218741852503916"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158511669236805116') + .put('/container159218741823804712') .query(true) .reply(201, "", [ - 'Transfer-Encoding', - 'chunked', + 'Content-Length', + '0', 'Last-Modified', - 'Wed, 25 Mar 2020 06:11:36 GMT', + 'Mon, 15 Jun 2020 02:16:58 GMT', 'ETag', - '"0x8D7D08360141C11"', + '"0x8D810D22E900975"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '5866e7db-301e-000f-566c-02f352000000', + '0f46f6ae-701e-006e-24bb-42188f000000', 'x-ms-client-request-id', - 'b7c3b932-dcd6-4e44-8cd6-e64865a984f0', + '588c2e07-8d36-49d9-b4bc-2a626167d421', 'x-ms-version', '2019-12-12', 'Date', - 'Wed, 25 Mar 2020 06:11:36 GMT' + 'Mon, 15 Jun 2020 02:16:57 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158511669236805116/blob158511669646200888', "Hello World") + .put('/container159218741823804712/blob159218741852503916', "Hello World") .reply(201, "", [ - 'Transfer-Encoding', - 'chunked', + 'Content-Length', + '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 25 Mar 2020 06:11:37 GMT', + 'Mon, 15 Jun 2020 02:16:58 GMT', 'ETag', - '"0x8D7D08360A37E50"', + '"0x8D810D22EBBB11E"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '5866e856-301e-000f-446c-02f352000000', + '4bfa9398-e01e-0021-03bb-4269db000000', 'x-ms-client-request-id', - 'c042277d-609f-414b-a596-e6034624a489', + 'e2747464-382c-429f-8626-941f8395ea33', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -50,28 +50,28 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-03-25T06:11:37.6845161Z', + '2020-06-15T02:16:58.6154270Z', 'Date', - 'Wed, 25 Mar 2020 06:11:37 GMT' + 'Mon, 15 Jun 2020 02:16:57 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158511669236805116/blob158511669646200888') + .put('/container159218741823804712/blob159218741852503916') .reply(201, "", [ - 'Transfer-Encoding', - 'chunked', + 'Content-Length', + '0', 'Content-MD5', '1B2M2Y8AsgTpgAmY7PhCfg==', 'Last-Modified', - 'Wed, 25 Mar 2020 06:11:40 GMT', + 'Mon, 15 Jun 2020 02:16:58 GMT', 'ETag', - '"0x8D7D083627119AE"', + '"0x8D810D22EE735D9"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '5866e90f-301e-000f-6b6c-02f352000000', + '0f46f803-701e-006e-72bb-42188f000000', 'x-ms-client-request-id', - '5e503553-0e09-45be-9b31-feb74f0c8777', + '997c9903-fa85-41dc-93ca-b59b3426cf02', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -79,43 +79,43 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-03-25T06:11:40.7097022Z', + '2020-06-15T02:16:58.9016297Z', 'Date', - 'Wed, 25 Mar 2020 06:11:40 GMT' + 'Mon, 15 Jun 2020 02:16:57 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158511669236805116/blob158511669646200888') + .put('/container159218741823804712/blob159218741852503916') .query(true) .reply(201, "", [ - 'Transfer-Encoding', - 'chunked', + 'Content-Length', + '0', 'Last-Modified', - 'Wed, 25 Mar 2020 06:11:40 GMT', + 'Mon, 15 Jun 2020 02:16:58 GMT', 'ETag', - '"0x8D7D083627119AE"', + '"0x8D810D22EE735D9"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '5866e920-301e-000f-786c-02f352000000', + '4bfa9463-e01e-0021-45bb-4269db000000', 'x-ms-client-request-id', - '3587b8b4-f8d1-4ec9-9d35-49570198205e', + 'db6380d1-d73a-463a-b04b-9040b972ba91', 'x-ms-version', '2019-12-12', 'x-ms-version-id', - '2020-03-25T06:11:41.0089164Z', + '2020-06-15T02:16:59.1908338Z', 'x-ms-snapshot', - '2020-03-25T06:11:41.0079164Z', + '2020-06-15T02:16:59.1898338Z', 'x-ms-request-server-encrypted', 'false', 'Date', - 'Wed, 25 Mar 2020 06:11:40 GMT' + 'Mon, 15 Jun 2020 02:16:58 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container158511669236805116/blob158511669646200888') + .delete('/container159218741823804712/blob159218741852503916') .query(true) - .reply(400, "InvalidQueryParameterValueValue for one of the query parameters specified in the request URI is invalid.\nRequestId:5866e932-301e-000f-066c-02f352000000\nTime:2020-03-25T06:11:41.2891209Zversionid2020-03-25T06:11:37.6845161ZThis operation is only allowed on the root blob. Version id should not be provided.", [ + .reply(400, "InvalidQueryParameterValueValue for one of the query parameters specified in the request URI is invalid.\nRequestId:0f46f942-701e-006e-25bb-42188f000000\nTime:2020-06-15T02:16:59.4741506Zversionid2020-06-15T02:16:58.6154270ZThis operation is only allowed on the root blob. Version id should not be provided.", [ 'Content-Length', '494', 'Content-Type', @@ -123,21 +123,21 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '5866e932-301e-000f-066c-02f352000000', + '0f46f942-701e-006e-25bb-42188f000000', 'x-ms-client-request-id', - 'c399a343-f3f5-47d0-aa1a-efa9f8374633', + '54d1f88d-aa1f-4a2d-830c-bd8e3c3c64c8', 'x-ms-version', '2019-12-12', 'x-ms-error-code', 'InvalidQueryParameterValue', 'Date', - 'Wed, 25 Mar 2020 06:11:40 GMT' + 'Mon, 15 Jun 2020 02:16:58 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container158511669236805116/blob158511669646200888') + .delete('/container159218741823804712/blob159218741852503916') .query(true) - .reply(400, "InvalidQueryParameterValueValue for one of the query parameters specified in the request URI is invalid.\nRequestId:5866e94f-301e-000f-186c-02f352000000\nTime:2020-03-25T06:11:41.5833335Zversionid2020-03-25T06:11:40.7097022ZThis operation is only allowed on the root blob. Version id should not be provided.", [ + .reply(400, "InvalidQueryParameterValueValue for one of the query parameters specified in the request URI is invalid.\nRequestId:4bfa950c-e01e-0021-61bb-4269db000000\nTime:2020-06-15T02:16:59.7550179Zversionid2020-06-15T02:16:58.9016297ZThis operation is only allowed on the root blob. Version id should not be provided.", [ 'Content-Length', '494', 'Content-Type', @@ -145,31 +145,31 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '5866e94f-301e-000f-186c-02f352000000', + '4bfa950c-e01e-0021-61bb-4269db000000', 'x-ms-client-request-id', - 'eb7f104d-7dde-4a87-816f-af32f6db306e', + '65dfd122-faf8-4b95-9ee0-9b294023e53a', 'x-ms-version', '2019-12-12', 'x-ms-error-code', 'InvalidQueryParameterValue', 'Date', - 'Wed, 25 Mar 2020 06:11:41 GMT' + 'Mon, 15 Jun 2020 02:16:59 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container158511669236805116') + .delete('/container159218741823804712') .query(true) .reply(202, "", [ - 'Transfer-Encoding', - 'chunked', + 'Content-Length', + '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '5866e963-301e-000f-286c-02f352000000', + '0f46faa5-701e-006e-02bb-42188f000000', 'x-ms-client-request-id', - 'c69694de-4765-4d24-be1e-4643fdd46a73', + '760feece-80cb-4118-90b0-8d52753fb831', 'x-ms-version', '2019-12-12', 'Date', - 'Wed, 25 Mar 2020 06:11:41 GMT' + 'Mon, 15 Jun 2020 02:16:59 GMT' ]); diff --git a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleting_a_versioned_blob_without_extra_parameters_should_succeed.js b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleting_a_versioned_blob_without_extra_parameters_should_succeed.js index ccf75fa7c56d..0e20c98e3fb1 100644 --- a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleting_a_versioned_blob_without_extra_parameters_should_succeed.js +++ b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleting_a_versioned_blob_without_extra_parameters_should_succeed.js @@ -1,48 +1,48 @@ let nock = require('nock'); -module.exports.hash = "20cc456e0374a6511f10ecd16ac23b06"; +module.exports.hash = "a9690167b9c588618d4a754b063f37e3"; -module.exports.testInfo = {"uniqueName":{"container":"container158459900995505704","blob":"blob158459901037808615"},"newDate":{}} +module.exports.testInfo = {"uniqueName":{"container":"container159218742024108749","blob":"blob159218742052803751"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459900995505704') + .put('/container159218742024108749') .query(true) .reply(201, "", [ 'Content-Length', '0', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:30 GMT', + 'Mon, 15 Jun 2020 02:17:00 GMT', 'ETag', - '"0x8D7CBCE0AD6D774"', + '"0x8D810D22FC1884F"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e4cad-b01e-0088-12b6-fd3fcb000000', + '4bfa95b1-e01e-0021-7fbb-4269db000000', 'x-ms-client-request-id', - '47ab8233-939f-46dc-8aa2-a7c1b7baff32', + '5b3c5af5-1985-49ec-b2ea-2979d46e74db', 'x-ms-version', '2019-12-12', 'Date', - 'Thu, 19 Mar 2020 06:23:29 GMT' + 'Mon, 15 Jun 2020 02:16:59 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459900995505704/blob158459901037808615', "Hello World") + .put('/container159218742024108749/blob159218742052803751', "Hello World") .reply(201, "", [ 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:30 GMT', + 'Mon, 15 Jun 2020 02:17:00 GMT', 'ETag', - '"0x8D7CBCE0B09A8D3"', + '"0x8D810D22FED63C1"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'b42b85a5-701e-005c-3ab6-fd8f9a000000', + '0f46fbef-701e-006e-3bbb-42188f000000', 'x-ms-client-request-id', - 'ab1ac37f-58a5-4a0d-8c4c-ae0a311d511f', + '05311b7b-b26a-48cc-bbc0-3ecce139dc28', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -50,28 +50,28 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-03-19T06:23:30.5098451Z', + '2020-06-15T02:17:00.6188481Z', 'Date', - 'Thu, 19 Mar 2020 06:23:30 GMT' + 'Mon, 15 Jun 2020 02:16:59 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459900995505704/blob158459901037808615') + .put('/container159218742024108749/blob159218742052803751') .reply(201, "", [ 'Content-Length', '0', 'Content-MD5', '1B2M2Y8AsgTpgAmY7PhCfg==', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:30 GMT', + 'Mon, 15 Jun 2020 02:17:00 GMT', 'ETag', - '"0x8D7CBCE0B35A2D3"', + '"0x8D810D23018C14B"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e4d77-b01e-0088-3bb6-fd3fcb000000', + '4bfa96b6-e01e-0021-7bbb-4269db000000', 'x-ms-client-request-id', - 'dd9287b1-14a9-4a53-8e07-5c21d74cf7a9', + '628b7191-d57c-4e2a-987e-6e02249be5dd', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -79,41 +79,41 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-03-19T06:23:30.7990499Z', + '2020-06-15T02:17:00.9050482Z', 'Date', - 'Thu, 19 Mar 2020 06:23:30 GMT' + 'Mon, 15 Jun 2020 02:17:00 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container158459900995505704/blob158459901037808615') + .delete('/container159218742024108749/blob159218742052803751') .reply(202, "", [ 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'b42b86a4-701e-005c-21b6-fd8f9a000000', + '0f46fd96-701e-006e-5bbb-42188f000000', 'x-ms-client-request-id', - '7cd3e246-d1a6-41cf-9794-bbb62c114655', + '41c7712c-21db-48f0-9dc7-f8410b1a8ae1', 'x-ms-version', '2019-12-12', 'x-ms-delete-type-permanent', 'false', 'Date', - 'Thu, 19 Mar 2020 06:23:30 GMT' + 'Mon, 15 Jun 2020 02:17:00 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container158459900995505704/blob158459901037808615') + .head('/container159218742024108749/blob159218742052803751') .reply(404, "", [ 'Transfer-Encoding', 'chunked', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e4e35-b01e-0088-5ab6-fd3fcb000000', + '4bfa9786-e01e-0021-42bb-4269db000000', 'x-ms-client-request-id', - 'dfd6e2bf-290f-4999-80d1-6a2a8abf084e', + '75aa7517-2fb2-485b-b4ac-72fdf3a75482', 'x-ms-version', '2019-12-12', 'x-ms-error-code', @@ -123,11 +123,11 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Access-Control-Allow-Origin', '*', 'Date', - 'Thu, 19 Mar 2020 06:23:31 GMT' + 'Mon, 15 Jun 2020 02:17:00 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container158459900995505704/blob158459901037808615') + .head('/container159218742024108749/blob159218742052803751') .query(true) .reply(200, "", [ 'Content-Length', @@ -137,23 +137,23 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:30 GMT', + 'Mon, 15 Jun 2020 02:17:00 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7CBCE0B09A8D3"', + '"0x8D810D22FED63C1"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'b42b876c-701e-005c-4bb6-fd8f9a000000', + '0f46fed0-701e-006e-12bb-42188f000000', 'x-ms-client-request-id', - '84080d34-0e6a-4c81-9345-2a2e0b25fafd', + 'fa537f6b-5286-4e03-9a2d-513ee9aa3c34', 'x-ms-version', '2019-12-12', 'x-ms-version-id', - '2020-03-19T06:23:30.5098451Z', + '2020-06-15T02:17:00.6188481Z', 'x-ms-creation-time', - 'Thu, 19 Mar 2020 06:23:30 GMT', + 'Mon, 15 Jun 2020 02:17:00 GMT', 'x-ms-blob-type', 'BlockBlob', 'x-ms-server-encrypted', @@ -167,11 +167,11 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Access-Control-Allow-Origin', '*', 'Date', - 'Thu, 19 Mar 2020 06:23:31 GMT' + 'Mon, 15 Jun 2020 02:17:00 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container158459900995505704') + .delete('/container159218742024108749') .query(true) .reply(202, "", [ 'Content-Length', @@ -179,11 +179,11 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e4ede-b01e-0088-75b6-fd3fcb000000', + '4bfa984a-e01e-0021-04bb-4269db000000', 'x-ms-client-request-id', - 'ed1929cd-3e70-4f8d-829e-818718b4ba3d', + '182cd7f2-8907-416b-b012-1a7cb8ecd75b', 'x-ms-version', '2019-12-12', 'Date', - 'Thu, 19 Mar 2020 06:23:31 GMT' + 'Mon, 15 Jun 2020 02:17:01 GMT' ]); diff --git a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleting_root_blob_with_versionid_should_fail.js b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleting_root_blob_with_versionid_should_fail.js index c33cbb717b3a..1b07d36b9537 100644 --- a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleting_root_blob_with_versionid_should_fail.js +++ b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleting_root_blob_with_versionid_should_fail.js @@ -1,48 +1,48 @@ let nock = require('nock'); -module.exports.hash = "00606a4db118fe0be9eb18e940c81596"; +module.exports.hash = "9a28f69321d9c4b6cfcebf3390e1a80c"; -module.exports.testInfo = {"uniqueName":{"container":"container158459900344007763","blob":"blob158459900368205915"},"newDate":{}} +module.exports.testInfo = {"uniqueName":{"container":"container159218741047501233","blob":"blob159218741076107981"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459900344007763') + .put('/container159218741047501233') .query(true) .reply(201, "", [ 'Content-Length', '0', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:23 GMT', + 'Mon, 15 Jun 2020 02:16:50 GMT', 'ETag', - '"0x8D7CBCE06E49A27"', + '"0x8D810D229EF6918"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e4376-b01e-0088-74b6-fd3fcb000000', + '0f46e417-701e-006e-25bb-42188f000000', 'x-ms-client-request-id', - '52958440-1031-4149-b4e2-62f1dcab9218', + '07faf14b-80cf-40f8-9330-8ffee8b71bd3', 'x-ms-version', '2019-12-12', 'Date', - 'Thu, 19 Mar 2020 06:23:23 GMT' + 'Mon, 15 Jun 2020 02:16:49 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459900344007763/blob158459900368205915', "Hello World") + .put('/container159218741047501233/blob159218741076107981', "Hello World") .reply(201, "", [ 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:23 GMT', + 'Mon, 15 Jun 2020 02:16:50 GMT', 'ETag', - '"0x8D7CBCE070A499B"', + '"0x8D810D22A1B61A8"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e43c9-b01e-0088-3fb6-fd3fcb000000', + '0f46e4ce-701e-006e-55bb-42188f000000', 'x-ms-client-request-id', - '656dd5ea-d17a-4f3b-9b11-c13340c88056', + '94da0e4d-53a1-497e-b7dc-6bebab66765e', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -50,28 +50,28 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-03-19T06:23:23.8030747Z', + '2020-06-15T02:16:50.8539304Z', 'Date', - 'Thu, 19 Mar 2020 06:23:23 GMT' + 'Mon, 15 Jun 2020 02:16:49 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459900344007763/blob158459900368205915') + .put('/container159218741047501233/blob159218741076107981') .reply(201, "", [ 'Content-Length', '0', 'Content-MD5', '1B2M2Y8AsgTpgAmY7PhCfg==', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:24 GMT', + 'Mon, 15 Jun 2020 02:16:51 GMT', 'ETag', - '"0x8D7CBCE072F8BA6"', + '"0x8D810D22A470D70"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e43fd-b01e-0088-6eb6-fd3fcb000000', + '0f46e568-701e-006e-65bb-42188f000000', 'x-ms-client-request-id', - '8ae99738-81b7-4576-ad37-b699dd6f1ec3', + '44a035eb-6f84-4790-a69b-315ace9444a4', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -79,13 +79,13 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-03-19T06:23:24.0482486Z', + '2020-06-15T02:16:51.1411328Z', 'Date', - 'Thu, 19 Mar 2020 06:23:23 GMT' + 'Mon, 15 Jun 2020 02:16:50 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container158459900344007763/blob158459900368205915') + .delete('/container159218741047501233/blob159218741076107981') .query(true) .reply(202, "", [ 'Content-Length', @@ -93,19 +93,19 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e4455-b01e-0088-39b6-fd3fcb000000', + '0f46e622-701e-006e-18bb-42188f000000', 'x-ms-client-request-id', - 'ce88d01f-e99a-46a7-b6ff-a93fd39412c9', + 'ed32e2ff-4c64-4876-bdc8-f4788e28f83f', 'x-ms-version', '2019-12-12', 'x-ms-delete-type-permanent', 'false', 'Date', - 'Thu, 19 Mar 2020 06:23:24 GMT' + 'Mon, 15 Jun 2020 02:16:50 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container158459900344007763/blob158459900368205915') + .head('/container159218741047501233/blob159218741076107981') .query(true) .reply(404, "", [ 'Transfer-Encoding', @@ -113,9 +113,9 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e44a0-b01e-0088-78b6-fd3fcb000000', + '0f46e699-701e-006e-0cbb-42188f000000', 'x-ms-client-request-id', - '2759b383-a2a9-4ce9-ad54-4066fb7720b7', + 'e20bac05-fb0c-46fc-ae96-29078ae643ad', 'x-ms-version', '2019-12-12', 'x-ms-error-code', @@ -125,13 +125,13 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Access-Control-Allow-Origin', '*', 'Date', - 'Thu, 19 Mar 2020 06:23:24 GMT' + 'Mon, 15 Jun 2020 02:16:50 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container158459900344007763/blob158459900368205915') + .delete('/container159218741047501233/blob159218741076107981') .query(true) - .reply(403, "OperationNotAllowedOnRootBlobThe specified operation is not allowed on root blob.\nRequestId:775e44df-b01e-0088-2bb6-fd3fcb000000\nTime:2020-03-19T06:23:24.8029861Z", [ + .reply(403, "OperationNotAllowedOnRootBlobThe specified operation is not allowed on root blob.\nRequestId:0f46e738-701e-006e-26bb-42188f000000\nTime:2020-06-15T02:16:52.0248087Z", [ 'Content-Length', '250', 'Content-Type', @@ -139,19 +139,19 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e44df-b01e-0088-2bb6-fd3fcb000000', + '0f46e738-701e-006e-26bb-42188f000000', 'x-ms-client-request-id', - '8e07f3fd-dab5-48b7-b43a-9ba13112a491', + 'f448770f-7560-4883-8564-ac132b1a3027', 'x-ms-version', '2019-12-12', 'x-ms-error-code', 'OperationNotAllowedOnRootBlob', 'Date', - 'Thu, 19 Mar 2020 06:23:24 GMT' + 'Mon, 15 Jun 2020 02:16:51 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container158459900344007763') + .delete('/container159218741047501233') .query(true) .reply(202, "", [ 'Content-Length', @@ -159,11 +159,11 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e4537-b01e-0088-75b6-fd3fcb000000', + '0f46e7ef-701e-006e-54bb-42188f000000', 'x-ms-client-request-id', - 'e6b488d4-b0b5-40b9-b99b-5a6924d71501', + 'f22245bf-dff2-4965-94e8-77150ebb0a6c', 'x-ms-version', '2019-12-12', 'Date', - 'Thu, 19 Mar 2020 06:23:24 GMT' + 'Mon, 15 Jun 2020 02:16:51 GMT' ]); diff --git a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_download_a_blob_version.js b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_download_a_blob_version.js index 4ec8d9c949a6..e8c71d51c26c 100644 --- a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_download_a_blob_version.js +++ b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_download_a_blob_version.js @@ -1,48 +1,48 @@ let nock = require('nock'); -module.exports.hash = "ee99fdab9f827965e4e47d0a2601ab44"; +module.exports.hash = "113ee8169869417dd035a963c97e6055"; -module.exports.testInfo = {"uniqueName":{"container":"container158472280465409921","blob":"blob158472280609502441"},"newDate":{}} +module.exports.testInfo = {"uniqueName":{"container":"container159218740035305198","blob":"blob159218740064009891"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158472280465409921') + .put('/container159218740035305198') .query(true) .reply(201, "", [ 'Content-Length', '0', 'Last-Modified', - 'Fri, 20 Mar 2020 16:46:45 GMT', + 'Mon, 15 Jun 2020 02:16:40 GMT', 'ETag', - '"0x8D7CCEE46E331F1"', + '"0x8D810D223E6C9C2"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'c1a967b8-101e-0017-01d7-fe73c9000000', + 'd80321c6-501e-0069-44bb-4274ec000000', 'x-ms-client-request-id', - 'f721189a-d6ef-4df6-9fe6-2b21a1307c52', + 'bc6e0fda-4251-414e-9646-41afb5e2da13', 'x-ms-version', '2019-12-12', 'Date', - 'Fri, 20 Mar 2020 16:46:45 GMT' + 'Mon, 15 Jun 2020 02:16:39 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158472280465409921/blob158472280609502441', "Hello World") + .put('/container159218740035305198/blob159218740064009891', "Hello World") .reply(201, "", [ 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Fri, 20 Mar 2020 16:46:46 GMT', + 'Mon, 15 Jun 2020 02:16:40 GMT', 'ETag', - '"0x8D7CCEE472896F8"', + '"0x8D810D22412DCE1"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'c1a96a28-101e-0017-52d7-fe73c9000000', + 'd803227a-501e-0069-70bb-4274ec000000', 'x-ms-client-request-id', - '8a4c75f1-19dc-47f3-8381-f222ddb3abe0', + '9881f75c-0407-4e7f-99d0-2daac496bcb4', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -50,28 +50,28 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-03-20T16:46:46.4339704Z', + '2020-06-15T02:16:40.7317729Z', 'Date', - 'Fri, 20 Mar 2020 16:46:45 GMT' + 'Mon, 15 Jun 2020 02:16:40 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158472280465409921/blob158472280609502441') + .put('/container159218740035305198/blob159218740064009891') .reply(201, "", [ 'Content-Length', '0', 'Content-MD5', '1B2M2Y8AsgTpgAmY7PhCfg==', 'Last-Modified', - 'Fri, 20 Mar 2020 16:46:47 GMT', + 'Mon, 15 Jun 2020 02:16:41 GMT', 'ETag', - '"0x8D7CCEE4784352E"', + '"0x8D810D2243E88A2"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'c1a96d02-101e-0017-15d7-fe73c9000000', + 'd803231f-501e-0069-0cbb-4274ec000000', 'x-ms-client-request-id', - 'd71eaff1-7630-4231-bbe0-b454c62a09e9', + '690e7fc3-37b5-4949-a6f5-85cdb323b217', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -79,13 +79,13 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-03-20T16:46:47.0363987Z', + '2020-06-15T02:16:41.0199753Z', 'Date', - 'Fri, 20 Mar 2020 16:46:46 GMT' + 'Mon, 15 Jun 2020 02:16:40 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .get('/container158472280465409921/blob158472280609502441') + .get('/container159218740035305198/blob159218740064009891') .query(true) .reply(200, "Hello World", [ 'Content-Length', @@ -95,23 +95,23 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Fri, 20 Mar 2020 16:46:46 GMT', + 'Mon, 15 Jun 2020 02:16:40 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7CCEE472896F8"', + '"0x8D810D22412DCE1"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'c1a96ff6-101e-0017-6bd7-fe73c9000000', + 'd80323ca-501e-0069-2ebb-4274ec000000', 'x-ms-client-request-id', - 'c6eaa16f-2569-42f8-9e9d-3f5a9d988993', + '74242ac8-3e1f-4bfa-ab72-9190cc6a8ff8', 'x-ms-version', '2019-12-12', 'x-ms-version-id', - '2020-03-20T16:46:46.4339704Z', + '2020-06-15T02:16:40.7317729Z', 'x-ms-creation-time', - 'Fri, 20 Mar 2020 16:46:46 GMT', + 'Mon, 15 Jun 2020 02:16:40 GMT', 'x-ms-blob-type', 'BlockBlob', 'x-ms-server-encrypted', @@ -121,11 +121,11 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Access-Control-Allow-Origin', '*', 'Date', - 'Fri, 20 Mar 2020 16:46:46 GMT' + 'Mon, 15 Jun 2020 02:16:40 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .get('/container158472280465409921/blob158472280609502441') + .get('/container159218740035305198/blob159218740064009891') .query(true) .reply(200, "", [ 'Content-Length', @@ -135,25 +135,25 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Content-MD5', '1B2M2Y8AsgTpgAmY7PhCfg==', 'Last-Modified', - 'Fri, 20 Mar 2020 16:46:47 GMT', + 'Mon, 15 Jun 2020 02:16:41 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7CCEE4784352E"', + '"0x8D810D2243E88A2"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'c1a971c9-101e-0017-2cd7-fe73c9000000', + 'd8032459-501e-0069-39bb-4274ec000000', 'x-ms-client-request-id', - 'd90e48e3-ddab-434e-b534-8221de450a60', + '08ad25a3-6aa9-48b7-b239-9c8e8e59cad9', 'x-ms-version', '2019-12-12', 'x-ms-version-id', - '2020-03-20T16:46:47.0363987Z', + '2020-06-15T02:16:41.0199753Z', 'x-ms-is-current-version', 'true', 'x-ms-creation-time', - 'Fri, 20 Mar 2020 16:46:47 GMT', + 'Mon, 15 Jun 2020 02:16:41 GMT', 'x-ms-blob-type', 'BlockBlob', 'x-ms-server-encrypted', @@ -163,11 +163,11 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Access-Control-Allow-Origin', '*', 'Date', - 'Fri, 20 Mar 2020 16:46:47 GMT' + 'Mon, 15 Jun 2020 02:16:41 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container158472280465409921/blob158472280609502441') + .head('/container159218740035305198/blob159218740064009891') .query(true) .reply(200, "", [ 'Content-Length', @@ -177,23 +177,23 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Fri, 20 Mar 2020 16:46:46 GMT', + 'Mon, 15 Jun 2020 02:16:40 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7CCEE472896F8"', + '"0x8D810D22412DCE1"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'c1a9736b-101e-0017-34d7-fe73c9000000', + 'd80324dd-501e-0069-39bb-4274ec000000', 'x-ms-client-request-id', - 'f071747b-cb9d-4732-80ac-c32e733cf8fc', + 'b858aae6-8f28-4797-bd5e-60747dd215c9', 'x-ms-version', '2019-12-12', 'x-ms-version-id', - '2020-03-20T16:46:46.4339704Z', + '2020-06-15T02:16:40.7317729Z', 'x-ms-creation-time', - 'Fri, 20 Mar 2020 16:46:46 GMT', + 'Mon, 15 Jun 2020 02:16:40 GMT', 'x-ms-blob-type', 'BlockBlob', 'x-ms-server-encrypted', @@ -207,11 +207,11 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Access-Control-Allow-Origin', '*', 'Date', - 'Fri, 20 Mar 2020 16:46:47 GMT' + 'Mon, 15 Jun 2020 02:16:41 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .get('/container158472280465409921/blob158472280609502441') + .get('/container159218740035305198/blob159218740064009891') .query(true) .reply(206, "Hello World", [ 'Content-Length', @@ -221,23 +221,23 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Content-Range', 'bytes 0-10/11', 'Last-Modified', - 'Fri, 20 Mar 2020 16:46:46 GMT', + 'Mon, 15 Jun 2020 02:16:40 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7CCEE472896F8"', + '"0x8D810D22412DCE1"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'c1a97501-101e-0017-3cd7-fe73c9000000', + 'd8032576-501e-0069-50bb-4274ec000000', 'x-ms-client-request-id', - 'a08075b3-d079-412c-98b3-7b22caedaeaf', + 'ca5f0aeb-aa98-4ae0-baf4-b0d0c5e22fe0', 'x-ms-version', '2019-12-12', 'x-ms-version-id', - '2020-03-20T16:46:46.4339704Z', + '2020-06-15T02:16:40.7317729Z', 'x-ms-creation-time', - 'Fri, 20 Mar 2020 16:46:46 GMT', + 'Mon, 15 Jun 2020 02:16:40 GMT', 'x-ms-blob-content-md5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'x-ms-blob-type', @@ -249,11 +249,11 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Access-Control-Allow-Origin', '*', 'Date', - 'Fri, 20 Mar 2020 16:46:47 GMT' + 'Mon, 15 Jun 2020 02:16:41 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container158472280465409921') + .delete('/container159218740035305198') .query(true) .reply(202, "", [ 'Content-Length', @@ -261,11 +261,11 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'c1a97758-101e-0017-7cd7-fe73c9000000', + 'd8032638-501e-0069-10bb-4274ec000000', 'x-ms-client-request-id', - '4b1fa8c1-90b0-4fc0-8035-176a2ff695c0', + '6d54502c-a9fe-4f18-beae-83f9cf66326e', 'x-ms-version', '2019-12-12', 'Date', - 'Fri, 20 Mar 2020 16:46:48 GMT' + 'Mon, 15 Jun 2020 02:16:41 GMT' ]); diff --git a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_download_a_version_to_file.js b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_download_a_version_to_file.js index e5efe6beb255..86d24b37cb81 100644 --- a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_download_a_version_to_file.js +++ b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_download_a_version_to_file.js @@ -1,48 +1,48 @@ let nock = require('nock'); -module.exports.hash = "61459601926d3ae8244cf9c706f3ee1c"; +module.exports.hash = "3bf3d3a7eb6b3ad211fad9ad1ab86a40"; -module.exports.testInfo = {"uniqueName":{"container":"container159212881463608430","blob":"blob159212881477103032"},"newDate":{}} +module.exports.testInfo = {"uniqueName":{"container":"container159218740266103668","blob":"blob159218740294704363"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container159212881463608430') + .put('/container159218740266103668') .query(true) .reply(201, "", [ 'Content-Length', '0', 'Last-Modified', - 'Sun, 14 Jun 2020 10:00:14 GMT', + 'Mon, 15 Jun 2020 02:16:42 GMT', 'ETag', - '"0x8D81049BC1DC653"', + '"0x8D810D22546E810"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '5c69d39a-301e-0050-2932-428ff0000000', + 'd80326ea-501e-0069-3ebb-4274ec000000', 'x-ms-client-request-id', - '3279ce28-dac4-4a6c-b8f2-ba1f078916ff', + '5f90e77b-4e83-4b12-bb95-640458e12222', 'x-ms-version', '2019-12-12', 'Date', - 'Sun, 14 Jun 2020 10:00:14 GMT' + 'Mon, 15 Jun 2020 02:16:42 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container159212881463608430/blob159212881477103032', "Hello World") + .put('/container159218740266103668/blob159218740294704363', "Hello World") .reply(201, "", [ 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Sun, 14 Jun 2020 10:00:14 GMT', + 'Mon, 15 Jun 2020 02:16:43 GMT', 'ETag', - '"0x8D81049BC23709F"', + '"0x8D810D22572AC59"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '5c69d3d1-301e-0050-4e32-428ff0000000', + 'd80327a6-501e-0069-74bb-4274ec000000', 'x-ms-client-request-id', - 'dd33e5df-ba3b-4523-b0a4-764238c95a81', + 'd8c0e6fd-1964-44f5-892e-c778be63dd45', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -50,28 +50,28 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-06-14T10:00:14.8021407Z', + '2020-06-15T02:16:43.0383984Z', 'Date', - 'Sun, 14 Jun 2020 10:00:14 GMT' + 'Mon, 15 Jun 2020 02:16:42 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container159212881463608430/blob159212881477103032') + .put('/container159218740266103668/blob159218740294704363') .reply(201, "", [ 'Content-Length', '0', 'Content-MD5', '1B2M2Y8AsgTpgAmY7PhCfg==', 'Last-Modified', - 'Sun, 14 Jun 2020 10:00:14 GMT', + 'Mon, 15 Jun 2020 02:16:43 GMT', 'ETag', - '"0x8D81049BC26CCA0"', + '"0x8D810D2259F1B8D"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '5c69d3e5-301e-0050-5b32-428ff0000000', + 'd80328c6-501e-0069-09bb-4274ec000000', 'x-ms-client-request-id', - 'df4ffe0c-51d9-4837-ab2d-094df9e7c2bd', + 'b88f5854-3648-4dae-b1cf-5c7d1251c97c', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -79,13 +79,13 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-06-14T10:00:14.8261571Z', + '2020-06-15T02:16:43.3296029Z', 'Date', - 'Sun, 14 Jun 2020 10:00:14 GMT' + 'Mon, 15 Jun 2020 02:16:42 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container159212881463608430') + .delete('/container159218740266103668') .query(true) .reply(202, "", [ 'Content-Length', @@ -93,11 +93,11 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '5c69d3fe-301e-0050-6c32-428ff0000000', + 'd803298e-501e-0069-49bb-4274ec000000', 'x-ms-client-request-id', - '04722bae-f7c1-4c41-9373-e2d6e8719b88', + 'd542ad46-d4a3-492f-b7c9-4a3f6a4fe93b', 'x-ms-version', '2019-12-12', 'Date', - 'Sun, 14 Jun 2020 10:00:14 GMT' + 'Mon, 15 Jun 2020 02:16:43 GMT' ]); diff --git a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_get_properties_of_a_blob_version.js b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_get_properties_of_a_blob_version.js index fc47dbdbdc1a..4417226113dd 100644 --- a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_get_properties_of_a_blob_version.js +++ b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_get_properties_of_a_blob_version.js @@ -2,47 +2,47 @@ let nock = require('nock'); module.exports.hash = "60bf506b341e62b4b649aa4832f73b66"; -module.exports.testInfo = {"uniqueName":{"container":"container158512474743806447","blob":"blob158512474989600217"},"newDate":{}} +module.exports.testInfo = {"uniqueName":{"container":"container159218740382903198","blob":"blob159218740411605260"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158512474743806447') + .put('/container159218740382903198') .query(true) .reply(201, "", [ - 'Transfer-Encoding', - 'chunked', + 'Content-Length', + '0', 'Last-Modified', - 'Wed, 25 Mar 2020 08:25:50 GMT', + 'Mon, 15 Jun 2020 02:16:43 GMT', 'ETag', - '"0x8D7D09620A60950"', + '"0x8D810D225F94195"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '47fd4f0a-701e-000e-137e-02ac8e000000', + 'd8032a8a-501e-0069-44bb-4274ec000000', 'x-ms-client-request-id', - 'ed1d73c7-9b36-47b4-924f-fb64f597f951', + '31998398-a51f-4cb6-bc57-a34c9f7a53ea', 'x-ms-version', '2019-12-12', 'Date', - 'Wed, 25 Mar 2020 08:25:50 GMT' + 'Mon, 15 Jun 2020 02:16:43 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158512474743806447/blob158512474989600217', "Hello World") + .put('/container159218740382903198/blob159218740411605260', "Hello World") .reply(201, "", [ - 'Transfer-Encoding', - 'chunked', + 'Content-Length', + '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 25 Mar 2020 08:25:51 GMT', + 'Mon, 15 Jun 2020 02:16:44 GMT', 'ETag', - '"0x8D7D09620E8A521"', + '"0x8D810D226257AD7"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '47fd4f1b-701e-000e-1d7e-02ac8e000000', + 'd8032b70-501e-0069-22bb-4274ec000000', 'x-ms-client-request-id', - '8bbe2f00-a4cd-47d6-9cce-d11644859808', + 'eef80347-e281-4d65-b4af-c1e50f3eb27f', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -50,28 +50,28 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-03-25T08:25:51.2003873Z', + '2020-06-15T02:16:44.2092247Z', 'Date', - 'Wed, 25 Mar 2020 08:25:50 GMT' + 'Mon, 15 Jun 2020 02:16:43 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158512474743806447/blob158512474989600217') + .put('/container159218740382903198/blob159218740411605260') .reply(201, "", [ - 'Transfer-Encoding', - 'chunked', + 'Content-Length', + '0', 'Content-MD5', '1B2M2Y8AsgTpgAmY7PhCfg==', 'Last-Modified', - 'Wed, 25 Mar 2020 08:25:51 GMT', + 'Mon, 15 Jun 2020 02:16:44 GMT', 'ETag', - '"0x8D7D09621203A2F"', + '"0x8D810D2265174D7"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '47fd4f30-701e-000e-2c7e-02ac8e000000', + 'd8032c43-501e-0069-71bb-4274ec000000', 'x-ms-client-request-id', - '47a2baa3-c93f-400a-9094-25b8d369d2bd', + '9e19cd29-acd6-40e6-9e8c-72661eb6059f', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -79,13 +79,13 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-03-25T08:25:51.5656511Z', + '2020-06-15T02:16:44.4994302Z', 'Date', - 'Wed, 25 Mar 2020 08:25:51 GMT' + 'Mon, 15 Jun 2020 02:16:43 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container158512474743806447/blob158512474989600217') + .head('/container159218740382903198/blob159218740411605260') .query(true) .reply(200, "", [ 'Content-Length', @@ -95,23 +95,23 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 25 Mar 2020 08:25:51 GMT', + 'Mon, 15 Jun 2020 02:16:44 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7D09620E8A521"', + '"0x8D810D226257AD7"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '47fd4f4d-701e-000e-467e-02ac8e000000', + 'd8032cf8-501e-0069-1fbb-4274ec000000', 'x-ms-client-request-id', - 'f7c0e9e6-b916-4012-bf26-5c448ad93b6a', + 'c74feffd-18a8-4f25-a80e-c7d5bbc3c577', 'x-ms-version', '2019-12-12', 'x-ms-version-id', - '2020-03-25T08:25:51.2003873Z', + '2020-06-15T02:16:44.2092247Z', 'x-ms-creation-time', - 'Wed, 25 Mar 2020 08:25:51 GMT', + 'Mon, 15 Jun 2020 02:16:44 GMT', 'x-ms-blob-type', 'BlockBlob', 'x-ms-server-encrypted', @@ -121,15 +121,15 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-access-tier-inferred', 'true', 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-version-id,Content-Type,Last-Modified,ETag,x-ms-creation-time,Content-MD5,x-ms-blob-type,x-ms-server-encrypted,x-ms-access-tier,x-ms-access-tier-inferred,Accept-Ranges', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-version-id,Content-Type,Last-Modified,ETag,x-ms-creation-time,Content-MD5,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', - 'Wed, 25 Mar 2020 08:25:52 GMT' + 'Mon, 15 Jun 2020 02:16:44 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container158512474743806447/blob158512474989600217') + .head('/container159218740382903198/blob159218740411605260') .reply(200, "", [ 'Content-Length', '0', @@ -138,25 +138,25 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Content-MD5', '1B2M2Y8AsgTpgAmY7PhCfg==', 'Last-Modified', - 'Wed, 25 Mar 2020 08:25:51 GMT', + 'Mon, 15 Jun 2020 02:16:44 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7D09621203A2F"', + '"0x8D810D2265174D7"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '47fd4f5c-701e-000e-507e-02ac8e000000', + 'd8032d9a-501e-0069-3fbb-4274ec000000', 'x-ms-client-request-id', - '3ec25096-10d0-4fc2-ba73-bc6f922120bd', + 'f550aba1-4f07-4748-9bd8-681e9418fc67', 'x-ms-version', '2019-12-12', 'x-ms-version-id', - '2020-03-25T08:25:51.5656511Z', + '2020-06-15T02:16:44.4994302Z', 'x-ms-is-current-version', 'true', 'x-ms-creation-time', - 'Wed, 25 Mar 2020 08:25:51 GMT', + 'Mon, 15 Jun 2020 02:16:44 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -170,43 +170,43 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-access-tier-inferred', 'true', 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-version-id,x-ms-is-current-version,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', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-version-id,x-ms-is-current-version,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', - 'Wed, 25 Mar 2020 08:25:52 GMT' + 'Mon, 15 Jun 2020 02:16:44 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158512474743806447/blob158512474989600217') + .put('/container159218740382903198/blob159218740411605260') .query(true) .reply(201, "", [ - 'Transfer-Encoding', - 'chunked', + 'Content-Length', + '0', 'Last-Modified', - 'Wed, 25 Mar 2020 08:25:51 GMT', + 'Mon, 15 Jun 2020 02:16:44 GMT', 'ETag', - '"0x8D7D09621203A2F"', + '"0x8D810D2265174D7"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '47fd4f66-701e-000e-597e-02ac8e000000', + 'd8032ec4-501e-0069-61bb-4274ec000000', 'x-ms-client-request-id', - '69edbe4a-ff52-4654-b134-e8c4d2e36fda', + 'b9be23b1-d73c-4717-81f6-34a9c326286f', 'x-ms-version', '2019-12-12', 'x-ms-version-id', - '2020-03-25T08:25:53.1958278Z', + '2020-06-15T02:16:45.3590376Z', 'x-ms-snapshot', - '2020-03-25T08:25:53.1948278Z', + '2020-06-15T02:16:45.3580376Z', 'x-ms-request-server-encrypted', 'false', 'Date', - 'Wed, 25 Mar 2020 08:25:52 GMT' + 'Mon, 15 Jun 2020 02:16:44 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container158512474743806447/blob158512474989600217') + .head('/container159218740382903198/blob159218740411605260') .query(true) .reply(400, "", [ 'Vary', @@ -216,15 +216,15 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-error-code', 'MutuallyExclusiveQueryParameters', 'x-ms-request-id', - '47fd4f79-701e-000e-697e-02ac8e000000', + 'd8032f76-501e-0069-0bbb-4274ec000000', 'x-ms-version', '2019-12-12', 'Date', - 'Wed, 25 Mar 2020 08:25:53 GMT' + 'Mon, 15 Jun 2020 02:16:45 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container158512474743806447/blob158512474989600217') + .head('/container159218740382903198/blob159218740411605260') .query(true) .reply(200, "", [ 'Content-Length', @@ -234,23 +234,23 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 25 Mar 2020 08:25:51 GMT', + 'Mon, 15 Jun 2020 02:16:44 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7D09620E8A521"', + '"0x8D810D226257AD7"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'ddad7bd5-501e-0009-2d7f-02c0ed000000', + '0f46d8af-701e-006e-22bb-42188f000000', 'x-ms-client-request-id', - 'da4fadde-551c-418a-9324-a6708c8ced59', + '8b70d6ae-70bb-4073-a523-c51e8ff15910', 'x-ms-version', '2019-12-12', 'x-ms-version-id', - '2020-03-25T08:25:51.2003873Z', + '2020-06-15T02:16:44.2092247Z', 'x-ms-creation-time', - 'Wed, 25 Mar 2020 08:25:51 GMT', + 'Mon, 15 Jun 2020 02:16:44 GMT', 'x-ms-blob-type', 'BlockBlob', 'x-ms-server-encrypted', @@ -260,27 +260,27 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-access-tier-inferred', 'true', 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-version-id,Content-Type,Last-Modified,ETag,x-ms-creation-time,Content-MD5,x-ms-blob-type,x-ms-server-encrypted,x-ms-access-tier,x-ms-access-tier-inferred,Accept-Ranges', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-version-id,Content-Type,Last-Modified,ETag,x-ms-creation-time,Content-MD5,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', - 'Wed, 25 Mar 2020 08:26:00 GMT' + 'Mon, 15 Jun 2020 02:16:45 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container158512474743806447') + .delete('/container159218740382903198') .query(true) .reply(202, "", [ - 'Transfer-Encoding', - 'chunked', + 'Content-Length', + '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'ddad7bfb-501e-0009-417f-02c0ed000000', + '0f46d979-701e-006e-66bb-42188f000000', 'x-ms-client-request-id', - 'db180d6f-d167-4972-992e-0a218470ce2b', + '2adc86ad-5cbd-4997-8d45-ca7a5a8ca0d9', 'x-ms-version', '2019-12-12', 'Date', - 'Wed, 25 Mar 2020 08:26:00 GMT' + 'Mon, 15 Jun 2020 02:16:46 GMT' ]); diff --git a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_list_blobs_include_versions.js b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_list_blobs_include_versions.js index 053b47a16425..0e0a2ea839af 100644 --- a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_list_blobs_include_versions.js +++ b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_list_blobs_include_versions.js @@ -1,48 +1,48 @@ let nock = require('nock'); -module.exports.hash = "7343055b916de5458c6b21755c23322a"; +module.exports.hash = "d1f04813bc3b3c180b3c151592797721"; -module.exports.testInfo = {"uniqueName":{"container":"container158459899364508652","blob":"blob158459899502904787","blockblob/0":"blockblob/0158459899553202352","blockblob/1":"blockblob/1158459899578203015"},"newDate":{}} +module.exports.testInfo = {"uniqueName":{"container":"container159218739798401048","blob":"blob159218739827103012","blockblob/0":"blockblob/0159218739885105753","blockblob/1":"blockblob/1159218739914105458"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459899364508652') + .put('/container159218739798401048') .query(true) .reply(201, "", [ 'Content-Length', '0', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:14 GMT', + 'Mon, 15 Jun 2020 02:16:38 GMT', 'ETag', - '"0x8D7CBCE01BB2B15"', + '"0x8D810D2227D5AF2"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e3887-b01e-0088-1ab6-fd3fcb000000', + 'd8031b57-501e-0069-2cbb-4274ec000000', 'x-ms-client-request-id', - 'd1646155-1755-4762-b3b0-34cf56e413c5', + 'c73c5674-452e-4456-abb4-66680c7d4d31', 'x-ms-version', '2019-12-12', 'Date', - 'Thu, 19 Mar 2020 06:23:14 GMT' + 'Mon, 15 Jun 2020 02:16:37 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459899364508652/blob158459899502904787', "Hello World") + .put('/container159218739798401048/blob159218739827103012', "Hello World") .reply(201, "", [ 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:15 GMT', + 'Mon, 15 Jun 2020 02:16:38 GMT', 'ETag', - '"0x8D7CBCE01E2FD54"', + '"0x8D810D222A9BCEB"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e38e8-b01e-0088-69b6-fd3fcb000000', + 'd8031c45-501e-0069-01bb-4274ec000000', 'x-ms-client-request-id', - 'bad7c8e8-a31b-4aeb-b14f-43fbaa1d612f', + '81d7cd13-761d-4765-a333-368aaf9df399', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -50,28 +50,28 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-03-19T06:23:15.1569236Z', + '2020-06-15T02:16:38.3651051Z', 'Date', - 'Thu, 19 Mar 2020 06:23:14 GMT' + 'Mon, 15 Jun 2020 02:16:37 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459899364508652/blob158459899502904787') + .put('/container159218739798401048/blob159218739827103012') .reply(201, "", [ 'Content-Length', '0', 'Content-MD5', '1B2M2Y8AsgTpgAmY7PhCfg==', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:15 GMT', + 'Mon, 15 Jun 2020 02:16:38 GMT', 'ETag', - '"0x8D7CBCE0208DBBB"', + '"0x8D810D222D5B6DE"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e3934-b01e-0088-2bb6-fd3fcb000000', + 'd8031cef-501e-0069-21bb-4274ec000000', 'x-ms-client-request-id', - 'ae4e39e0-5cfe-419a-9fc9-1e2c382fd708', + 'e2acb811-e53e-4bd9-8da4-83297a145aec', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -79,28 +79,28 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-03-19T06:23:15.4071008Z', + '2020-06-15T02:16:38.6543086Z', 'Date', - 'Thu, 19 Mar 2020 06:23:15 GMT' + 'Mon, 15 Jun 2020 02:16:38 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459899364508652/blockblob%2F0158459899553202352') + .put('/container159218739798401048/blockblob%2F0159218739885105753') .reply(201, "", [ 'Content-Length', '0', 'Content-MD5', '1B2M2Y8AsgTpgAmY7PhCfg==', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:15 GMT', + 'Mon, 15 Jun 2020 02:16:38 GMT', 'ETag', - '"0x8D7CBCE022F7D94"', + '"0x8D810D22301FEFB"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e397c-b01e-0088-6ab6-fd3fcb000000', + 'd8031d87-501e-0069-34bb-4274ec000000', 'x-ms-client-request-id', - 'b6ce1ec0-95b4-41fe-9ca7-1056ea961fc9', + 'c7c727f2-b2d5-45a2-b36b-546271b1cc1c', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -108,28 +108,28 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-03-19T06:23:15.6582804Z', + '2020-06-15T02:16:38.9445138Z', 'Date', - 'Thu, 19 Mar 2020 06:23:15 GMT' + 'Mon, 15 Jun 2020 02:16:38 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459899364508652/blockblob%2F1158459899578203015') + .put('/container159218739798401048/blockblob%2F1159218739914105458') .reply(201, "", [ 'Content-Length', '0', 'Content-MD5', '1B2M2Y8AsgTpgAmY7PhCfg==', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:15 GMT', + 'Mon, 15 Jun 2020 02:16:39 GMT', 'ETag', - '"0x8D7CBCE02566D9F"', + '"0x8D810D2232E6E34"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e39b7-b01e-0088-1eb6-fd3fcb000000', + 'd8031e9c-501e-0069-34bb-4274ec000000', 'x-ms-client-request-id', - '63adf972-aa1b-4e83-b143-0add9508ac57', + '43c1fe8d-fa95-456d-9d61-7df78090cb32', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -137,15 +137,15 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-03-19T06:23:15.9144628Z', + '2020-06-15T02:16:39.2357186Z', 'Date', - 'Thu, 19 Mar 2020 06:23:15 GMT' + 'Mon, 15 Jun 2020 02:16:38 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .get('/container158459899364508652') + .get('/container159218739798401048') .query(true) - .reply(200, "blob1584598995029047872020-03-19T06:23:15.1569236ZThu, 19 Mar 2020 06:23:15 GMTThu, 19 Mar 2020 06:23:15 GMT0x8D7CBCE01E2FD5411application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottruetrueblob1584598995029047872020-03-19T06:23:15.4071008ZtrueThu, 19 Mar 2020 06:23:15 GMTThu, 19 Mar 2020 06:23:15 GMT0x8D7CBCE0208DBBB0application/octet-stream1B2M2Y8AsgTpgAmY7PhCfg==BlockBlobHottrueunlockedavailabletrueblockblob/01584598995532023522020-03-19T06:23:15.6582804ZtrueThu, 19 Mar 2020 06:23:15 GMTThu, 19 Mar 2020 06:23:15 GMT0x8D7CBCE022F7D940application/octet-stream1B2M2Y8AsgTpgAmY7PhCfg==BlockBlobHottrueunlockedavailabletrueblockblob/11584598995782030152020-03-19T06:23:15.9144628ZtrueThu, 19 Mar 2020 06:23:15 GMTThu, 19 Mar 2020 06:23:15 GMT0x8D7CBCE02566D9F0application/octet-stream1B2M2Y8AsgTpgAmY7PhCfg==BlockBlobHottrueunlockedavailabletrue", [ + .reply(200, "blob1592187398271030122020-06-15T02:16:38.3651051ZMon, 15 Jun 2020 02:16:38 GMTMon, 15 Jun 2020 02:16:38 GMT0x8D810D222A9BCEB11application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottruetrueblob1592187398271030122020-06-15T02:16:38.6543086ZtrueMon, 15 Jun 2020 02:16:38 GMTMon, 15 Jun 2020 02:16:38 GMT0x8D810D222D5B6DE0application/octet-stream1B2M2Y8AsgTpgAmY7PhCfg==BlockBlobHottrueunlockedavailabletrueblockblob/01592187398851057532020-06-15T02:16:38.9445138ZtrueMon, 15 Jun 2020 02:16:38 GMTMon, 15 Jun 2020 02:16:38 GMT0x8D810D22301FEFB0application/octet-stream1B2M2Y8AsgTpgAmY7PhCfg==BlockBlobHottrueunlockedavailabletrueblockblob/11592187399141054582020-06-15T02:16:39.2357186ZtrueMon, 15 Jun 2020 02:16:39 GMTMon, 15 Jun 2020 02:16:39 GMT0x8D810D2232E6E340application/octet-stream1B2M2Y8AsgTpgAmY7PhCfg==BlockBlobHottrueunlockedavailabletrue", [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -153,9 +153,9 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e3a22-b01e-0088-77b6-fd3fcb000000', + 'd8031f6c-501e-0069-7dbb-4274ec000000', 'x-ms-client-request-id', - '9678c27f-7c17-4ac4-8c42-c113eac1de8e', + '83b3063d-0c0e-42ee-8557-46870a3bfe7b', 'x-ms-version', '2019-12-12', 'Access-Control-Expose-Headers', @@ -163,11 +163,11 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Access-Control-Allow-Origin', '*', 'Date', - 'Thu, 19 Mar 2020 06:23:15 GMT' + 'Mon, 15 Jun 2020 02:16:38 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container158459899364508652') + .delete('/container159218739798401048') .query(true) .reply(202, "", [ 'Content-Length', @@ -175,11 +175,11 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e3ad2-b01e-0088-08b6-fd3fcb000000', + 'd80320f8-501e-0069-7dbb-4274ec000000', 'x-ms-client-request-id', - '8b9c1686-d29a-46e0-9805-b415a7a2b3f8', + 'cd5154a5-eeb2-4f78-8f41-6faccf2069f4', 'x-ms-version', '2019-12-12', 'Date', - 'Thu, 19 Mar 2020 06:23:16 GMT' + 'Mon, 15 Jun 2020 02:16:39 GMT' ]); diff --git a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_promote_a_version_as_the_copy_source.js b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_promote_a_version_as_the_copy_source.js index 529d3fe6d903..16f0f66aa436 100644 --- a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_promote_a_version_as_the_copy_source.js +++ b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_promote_a_version_as_the_copy_source.js @@ -1,48 +1,48 @@ let nock = require('nock'); -module.exports.hash = "6792f50664e5657867a58bb56c5c68c9"; +module.exports.hash = "a2cec6ad1620c77c50ce31d51972e9c2"; -module.exports.testInfo = {"uniqueName":{"container":"container158512476074705738","blob":"blob158512476253303108"},"newDate":{}} +module.exports.testInfo = {"uniqueName":{"container":"container159218742224703366","blob":"blob159218742269309927"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158512476074705738') + .put('/container159218742224703366') .query(true) .reply(201, "", [ - 'Transfer-Encoding', - 'chunked', + 'Content-Length', + '0', 'Last-Modified', - 'Wed, 25 Mar 2020 08:26:02 GMT', + 'Mon, 15 Jun 2020 02:17:02 GMT', 'ETag', - '"0x8D7D0962760746D"', + '"0x8D810D230F36FF2"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'ddad7c1e-501e-0009-5d7f-02c0ed000000', + '0f46ffe3-701e-006e-20bb-42188f000000', 'x-ms-client-request-id', - 'be8fd281-b1d3-4920-847b-4516b190e157', + '97584d0a-3369-4912-98ea-e5218ab3cd90', 'x-ms-version', '2019-12-12', 'Date', - 'Wed, 25 Mar 2020 08:26:01 GMT' + 'Mon, 15 Jun 2020 02:17:01 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158512476074705738/blob158512476253303108', "Hello World") + .put('/container159218742224703366/blob159218742269309927', "Hello World") .reply(201, "", [ - 'Transfer-Encoding', - 'chunked', + 'Content-Length', + '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 25 Mar 2020 08:26:03 GMT', + 'Mon, 15 Jun 2020 02:17:02 GMT', 'ETag', - '"0x8D7D096286E527B"', + '"0x8D810D231386F2D"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'ddad7c80-501e-0009-307f-02c0ed000000', + '4bfa9945-e01e-0021-76bb-4269db000000', 'x-ms-client-request-id', - '06e1fd49-1491-4074-a7c9-6e4be98f6acf', + '9649cc13-6af4-4264-a640-e98bc007be59', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -50,28 +50,28 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-03-25T08:26:03.8215043Z', + '2020-06-15T02:17:02.7893828Z', 'Date', - 'Wed, 25 Mar 2020 08:26:02 GMT' + 'Mon, 15 Jun 2020 02:17:02 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158512476074705738/blob158512476253303108') + .put('/container159218742224703366/blob159218742269309927') .reply(201, "", [ - 'Transfer-Encoding', - 'chunked', + 'Content-Length', + '0', 'Content-MD5', '1B2M2Y8AsgTpgAmY7PhCfg==', 'Last-Modified', - 'Wed, 25 Mar 2020 08:26:04 GMT', + 'Mon, 15 Jun 2020 02:17:03 GMT', 'ETag', - '"0x8D7D0962897DB0D"', + '"0x8D810D231641AF1"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'ddad7c9a-501e-0009-437f-02c0ed000000', + '0f4701ca-701e-006e-78bb-42188f000000', 'x-ms-client-request-id', - '6d6d3c8e-fa42-4c7a-8f08-f69974a38566', + 'd825a210-3fca-43da-80d3-5e6f7b8d1db5', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -79,13 +79,13 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-03-25T08:26:04.0946994Z', + '2020-06-15T02:17:03.0755841Z', 'Date', - 'Wed, 25 Mar 2020 08:26:03 GMT' + 'Mon, 15 Jun 2020 02:17:02 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container158512476074705738/blob158512476253303108') + .head('/container159218742224703366/blob159218742269309927') .query(true) .reply(200, "", [ 'Content-Length', @@ -95,23 +95,23 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 25 Mar 2020 08:26:03 GMT', + 'Mon, 15 Jun 2020 02:17:02 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7D096286E527B"', + '"0x8D810D231386F2D"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'ddad7cac-501e-0009-517f-02c0ed000000', + '4bfa99e4-e01e-0021-0ebb-4269db000000', 'x-ms-client-request-id', - '0519cdf0-dafd-4295-b470-e969820536d3', + '573cde06-75f6-4d2d-af44-7ca0076af817', 'x-ms-version', '2019-12-12', 'x-ms-version-id', - '2020-03-25T08:26:03.8215043Z', + '2020-06-15T02:17:02.7893828Z', 'x-ms-creation-time', - 'Wed, 25 Mar 2020 08:26:03 GMT', + 'Mon, 15 Jun 2020 02:17:02 GMT', 'x-ms-blob-type', 'BlockBlob', 'x-ms-server-encrypted', @@ -121,44 +121,44 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-access-tier-inferred', 'true', 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-version-id,Content-Type,Last-Modified,ETag,x-ms-creation-time,Content-MD5,x-ms-blob-type,x-ms-server-encrypted,x-ms-access-tier,x-ms-access-tier-inferred,Accept-Ranges', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-version-id,Content-Type,Last-Modified,ETag,x-ms-creation-time,Content-MD5,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', - 'Wed, 25 Mar 2020 08:26:03 GMT' + 'Mon, 15 Jun 2020 02:17:02 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158512476074705738/blob158512476253303108') + .put('/container159218742224703366/blob159218742269309927') .reply(202, "", [ - 'Transfer-Encoding', - 'chunked', + 'Content-Length', + '0', 'Last-Modified', - 'Wed, 25 Mar 2020 08:26:04 GMT', + 'Mon, 15 Jun 2020 02:17:03 GMT', 'ETag', - '"0x8D7D09628ECC160"', + '"0x8D810D231BF43D7"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'ddad7cbb-501e-0009-5c7f-02c0ed000000', + '0f4702ef-701e-006e-13bb-42188f000000', 'x-ms-client-request-id', - '3dd5a71a-42d6-4ffb-b156-1008f143b666', + '4ae9fa30-8535-415b-8bcf-cafbd8f71c72', 'x-ms-version', '2019-12-12', 'x-ms-version-id', - '2020-03-25T08:26:04.6510986Z', + '2020-06-15T02:17:03.6740094Z', 'x-ms-copy-id', - '08dbc451-7517-44a9-8665-051330711f5e', + '1c0d99e1-7768-4600-8d26-fb9e8f3704fd', 'x-ms-copy-status', 'success', 'Date', - 'Wed, 25 Mar 2020 08:26:03 GMT' + 'Mon, 15 Jun 2020 02:17:02 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .get('/container158512476074705738') + .get('/container159218742224703366') .query(true) - .reply(200, "blob1585124762533031082020-03-25T08:26:03.8215043ZWed, 25 Mar 2020 08:26:03 GMTWed, 25 Mar 2020 08:26:03 GMT0x8D7D096286E527B11application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottruetrueblob1585124762533031082020-03-25T08:26:04.0946994ZWed, 25 Mar 2020 08:26:04 GMTWed, 25 Mar 2020 08:26:04 GMT0x8D7D0962897DB0D0application/octet-stream1B2M2Y8AsgTpgAmY7PhCfg==BlockBlobHottruetrueblob1585124762533031082020-03-25T08:26:04.6510986ZtrueWed, 25 Mar 2020 08:26:04 GMTWed, 25 Mar 2020 08:26:04 GMT0x8D7D09628ECC16011application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottrueunlockedavailabletrue", [ + .reply(200, "blob1592187422693099272020-06-15T02:17:02.7893828ZMon, 15 Jun 2020 02:17:02 GMTMon, 15 Jun 2020 02:17:02 GMT0x8D810D231386F2D11application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottruetrueblob1592187422693099272020-06-15T02:17:03.0755841ZMon, 15 Jun 2020 02:17:03 GMTMon, 15 Jun 2020 02:17:03 GMT0x8D810D231641AF10application/octet-stream1B2M2Y8AsgTpgAmY7PhCfg==BlockBlobHottruetrueblob1592187422693099272020-06-15T02:17:03.6740094ZtrueMon, 15 Jun 2020 02:17:03 GMTMon, 15 Jun 2020 02:17:03 GMT0x8D810D231BF43D711application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottrueunlockedavailabletrue", [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -166,21 +166,21 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'ddad7cd4-501e-0009-727f-02c0ed000000', + '4bfa9ad2-e01e-0021-72bb-4269db000000', 'x-ms-client-request-id', - 'c7d8bfe4-c607-4008-89a6-feb23ed3c16b', + 'b388814e-72df-47c5-af41-7034cf66c7e6', 'x-ms-version', '2019-12-12', 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,Content-Type', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,Content-Type,Content-Length,Date,Transfer-Encoding', 'Access-Control-Allow-Origin', '*', 'Date', - 'Wed, 25 Mar 2020 08:26:04 GMT' + 'Mon, 15 Jun 2020 02:17:03 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .get('/container158512476074705738/blob158512476253303108') + .get('/container159218742224703366/blob159218742269309927') .reply(200, "Hello World", [ 'Content-Length', '11', @@ -189,25 +189,25 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 25 Mar 2020 08:26:04 GMT', + 'Mon, 15 Jun 2020 02:17:03 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7D09628ECC160"', + '"0x8D810D231BF43D7"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'ddad7ce6-501e-0009-027f-02c0ed000000', + '0f4705a9-701e-006e-3fbb-42188f000000', 'x-ms-client-request-id', - 'd0c78850-4260-4c7a-ab05-7864ff569c73', + '861d762b-babb-456c-85d0-49f3eb64f38f', 'x-ms-version', '2019-12-12', 'x-ms-version-id', - '2020-03-25T08:26:04.6510986Z', + '2020-06-15T02:17:03.6740094Z', 'x-ms-is-current-version', 'true', 'x-ms-creation-time', - 'Wed, 25 Mar 2020 08:26:04 GMT', + 'Mon, 15 Jun 2020 02:17:03 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -215,39 +215,39 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-blob-type', 'BlockBlob', 'x-ms-copy-id', - '08dbc451-7517-44a9-8665-051330711f5e', + '1c0d99e1-7768-4600-8d26-fb9e8f3704fd', 'x-ms-copy-source', - 'https://fakestorageaccount.blob.core.windows.net/container158512476074705738/blob158512476253303108?versionid=2020-03-25T08:26:03.8215043Z', + 'https://fakestorageaccount.blob.core.windows.net/container159218742224703366/blob159218742269309927?versionid=2020-06-15T02:17:02.7893828Z', 'x-ms-copy-status', 'success', 'x-ms-copy-progress', '11/11', 'x-ms-copy-completion-time', - 'Wed, 25 Mar 2020 08:26:04 GMT', + 'Mon, 15 Jun 2020 02:17:03 GMT', 'x-ms-server-encrypted', 'true', 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-version-id,x-ms-is-current-version,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-copy-id,x-ms-copy-source,x-ms-copy-status,x-ms-copy-progress,x-ms-copy-completion-time,x-ms-server-encrypted,Accept-Ranges', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-version-id,x-ms-is-current-version,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-copy-id,x-ms-copy-source,x-ms-copy-status,x-ms-copy-progress,x-ms-copy-completion-time,x-ms-server-encrypted,Accept-Ranges,Content-Length,Date,Transfer-Encoding', 'Access-Control-Allow-Origin', '*', 'Date', - 'Wed, 25 Mar 2020 08:26:04 GMT' + 'Mon, 15 Jun 2020 02:17:03 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container158512476074705738') + .delete('/container159218742224703366') .query(true) .reply(202, "", [ - 'Transfer-Encoding', - 'chunked', + 'Content-Length', + '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'ddad7d30-501e-0009-3b7f-02c0ed000000', + '4bfa9bb7-e01e-0021-4dbb-4269db000000', 'x-ms-client-request-id', - '96872254-6a83-4c72-8062-f3a3b5e064aa', + 'a2dda8bd-6e27-47ae-9af7-6a3f8c44a4df', 'x-ms-version', '2019-12-12', 'Date', - 'Wed, 25 Mar 2020 08:26:06 GMT' + 'Mon, 15 Jun 2020 02:17:04 GMT' ]); diff --git a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_setmetadata.js b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_setmetadata.js index f889f6844b2a..9c3bff818eae 100644 --- a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_setmetadata.js +++ b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_setmetadata.js @@ -2,47 +2,47 @@ let nock = require('nock'); module.exports.hash = "a02a4136be7d42cb6fdb315eddbb2f95"; -module.exports.testInfo = {"uniqueName":{"container":"container158459901794700068","blob":"blob158459901818509666"},"newDate":{}} +module.exports.testInfo = {"uniqueName":{"container":"container159218742963102288","blob":"blob159218742992007448"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459901794700068') + .put('/container159218742963102288') .query(true) .reply(201, "", [ 'Content-Length', '0', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:38 GMT', + 'Mon, 15 Jun 2020 02:17:09 GMT', 'ETag', - '"0x8D7CBCE0F8A3DB9"', + '"0x8D810D2355AA63F"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e572c-b01e-0088-56b6-fd3fcb000000', + '0f47123c-701e-006e-29bb-42188f000000', 'x-ms-client-request-id', - '953ac2d3-5d0c-4fc8-a850-3db4276e5312', + '91251749-9247-4128-b8bf-0670c6d96d28', 'x-ms-version', '2019-12-12', 'Date', - 'Thu, 19 Mar 2020 06:23:37 GMT' + 'Mon, 15 Jun 2020 02:17:09 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459901794700068/blob158459901818509666', "Hello World") + .put('/container159218742963102288/blob159218742992007448', "Hello World") .reply(201, "", [ 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:38 GMT', + 'Mon, 15 Jun 2020 02:17:10 GMT', 'ETag', - '"0x8D7CBCE0FAEDC1E"', + '"0x8D810D23586984D"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'b42b92e1-701e-005c-1ab6-fd8f9a000000', + '4bfaa282-e01e-0021-1ebb-4269db000000', 'x-ms-client-request-id', - '15a4bfcf-2827-4ab2-9202-1012c2f2690e', + '71c42441-10e9-4a8c-96c3-bdec29d07c1b', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -50,28 +50,28 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-03-19T06:23:38.3033886Z', + '2020-06-15T02:17:10.0115021Z', 'Date', - 'Thu, 19 Mar 2020 06:23:37 GMT' + 'Mon, 15 Jun 2020 02:17:09 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459901794700068/blob158459901818509666') + .put('/container159218742963102288/blob159218742992007448') .reply(201, "", [ 'Content-Length', '0', 'Content-MD5', '1B2M2Y8AsgTpgAmY7PhCfg==', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:38 GMT', + 'Mon, 15 Jun 2020 02:17:10 GMT', 'ETag', - '"0x8D7CBCE0FD4453E"', + '"0x8D810D235B26B2A"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e57e3-b01e-0088-72b6-fd3fcb000000', + '0f4713d5-701e-006e-31bb-42188f000000', 'x-ms-client-request-id', - 'c7004baa-9f8c-4bcd-888e-431485e195b9', + '1d5b54e4-a130-4a25-97c2-9ab5302c1ddc', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -79,39 +79,39 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-03-19T06:23:38.5505639Z', + '2020-06-15T02:17:10.3007057Z', 'Date', - 'Thu, 19 Mar 2020 06:23:38 GMT' + 'Mon, 15 Jun 2020 02:17:10 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459901794700068/blob158459901818509666') + .put('/container159218742963102288/blob159218742992007448') .query(true) .reply(200, "", [ 'Content-Length', '0', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:38 GMT', + 'Mon, 15 Jun 2020 02:17:10 GMT', 'ETag', - '"0x8D7CBCE0FF96034"', + '"0x8D810D235DDEFD3"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'b42b93ae-701e-005c-54b6-fd8f9a000000', + '4bfaa359-e01e-0021-6cbb-4269db000000', 'x-ms-client-request-id', - '5d243375-ca2b-4ff9-ae2c-f9d8ef438db9', + '30ca621d-9de1-43f4-aea0-d749c51d8eb7', 'x-ms-version', '2019-12-12', 'x-ms-version-id', - '2020-03-19T06:23:38.7927364Z', + '2020-06-15T02:17:10.5859067Z', 'x-ms-request-server-encrypted', 'true', 'Date', - 'Thu, 19 Mar 2020 06:23:38 GMT' + 'Mon, 15 Jun 2020 02:17:09 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container158459901794700068') + .delete('/container159218742963102288') .query(true) .reply(202, "", [ 'Content-Length', @@ -119,11 +119,11 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e588b-b01e-0088-07b6-fd3fcb000000', + '0f47156c-701e-006e-39bb-42188f000000', 'x-ms-client-request-id', - '8d6a2723-0a7d-4e33-9465-5230221b28c2', + '23bfeb79-7475-4832-bec9-3432a6157335', 'x-ms-version', '2019-12-12', 'Date', - 'Thu, 19 Mar 2020 06:23:38 GMT' + 'Mon, 15 Jun 2020 02:17:10 GMT' ]); diff --git a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_undelete_a_softdeleted_version.js b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_undelete_a_softdeleted_version.js index 770dcee987af..133f7ae3e40f 100644 --- a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_undelete_a_softdeleted_version.js +++ b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_undelete_a_softdeleted_version.js @@ -1,48 +1,48 @@ let nock = require('nock'); -module.exports.hash = "467dd77f82dae27b49ab3ff9f7eb4d1a"; +module.exports.hash = "32f293411691e14438de95c187e92d3b"; -module.exports.testInfo = {"uniqueName":{"container":"container158459901915803807","blob":"blob158459901939705184"},"newDate":{}} +module.exports.testInfo = {"uniqueName":{"container":"container159218743107601702","blob":"blob159218743136706794"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459901915803807') + .put('/container159218743107601702') .query(true) .reply(201, "", [ 'Content-Length', '0', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:39 GMT', + 'Mon, 15 Jun 2020 02:17:11 GMT', 'ETag', - '"0x8D7CBCE10432A33"', + '"0x8D810D236367702"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'b42b94ce-701e-005c-53b6-fd8f9a000000', + '4bfaa435-e01e-0021-3dbb-4269db000000', 'x-ms-client-request-id', - '300e06a0-b983-42d9-b330-86596cdb2022', + '317a7359-df8f-45b6-a668-427b0388093c', 'x-ms-version', '2019-12-12', 'Date', - 'Thu, 19 Mar 2020 06:23:38 GMT' + 'Mon, 15 Jun 2020 02:17:10 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459901915803807/blob158459901939705184', "Hello World") + .put('/container159218743107601702/blob159218743136706794', "Hello World") .reply(201, "", [ 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:39 GMT', + 'Mon, 15 Jun 2020 02:17:11 GMT', 'ETag', - '"0x8D7CBCE1067ED9C"', + '"0x8D810D236638BB0"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e5946-b01e-0088-32b6-fd3fcb000000', + '0f4716d7-701e-006e-18bb-42188f000000', 'x-ms-client-request-id', - '9e78241f-9eba-471d-8130-53b7fb76acb1', + 'f095c0c6-8fe5-4dba-a2fe-2e89bb9b0605', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -50,28 +50,28 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-03-19T06:23:39.5162524Z', + '2020-06-15T02:17:11.4595248Z', 'Date', - 'Thu, 19 Mar 2020 06:23:39 GMT' + 'Mon, 15 Jun 2020 02:17:11 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459901915803807/blob158459901939705184') + .put('/container159218743107601702/blob159218743136706794') .reply(201, "", [ 'Content-Length', '0', 'Content-MD5', '1B2M2Y8AsgTpgAmY7PhCfg==', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:39 GMT', + 'Mon, 15 Jun 2020 02:17:11 GMT', 'ETag', - '"0x8D7CBCE108C6C31"', + '"0x8D810D2368F378A"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'b42b95c3-701e-005c-2fb6-fd8f9a000000', + '4bfaa512-e01e-0021-05bb-4269db000000', 'x-ms-client-request-id', - '1c1821c9-3067-436f-b5e3-beab2f687a58', + '106e46e3-42dc-4466-bd26-0b3c48246d2a', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -79,15 +79,15 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-03-19T06:23:39.7574234Z', + '2020-06-15T02:17:11.7467290Z', 'Date', - 'Thu, 19 Mar 2020 06:23:39 GMT' + 'Mon, 15 Jun 2020 02:17:11 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) .get('/') .query(true) - .reply(200, "1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalseGET,PUT,POST,HEAD,DELETE,MERGE,OPTIONS,PATCH***86400true7false", [ + .reply(200, "1.0truetruetruetrue51.0truetruetrue31.0truetruetrue4DELETE,GET,HEAD,MERGE,POST,OPTIONS,PUT***86400GETexample.com**8888GETexample.com**8888GETexample.com**8888GETexample.com**8888true7false2018-03-28", [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -95,9 +95,9 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e5a0c-b01e-0088-5ab6-fd3fcb000000', + '0f471869-701e-006e-21bb-42188f000000', 'x-ms-client-request-id', - 'c3196b37-e0a2-40fb-974b-13e6643510f0', + '9619b12c-edbc-42ed-9aaf-7eb594fe3fd6', 'x-ms-version', '2019-12-12', 'Access-Control-Expose-Headers', @@ -105,11 +105,11 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Access-Control-Allow-Origin', '*', 'Date', - 'Thu, 19 Mar 2020 06:23:39 GMT' + 'Mon, 15 Jun 2020 02:17:12 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container158459901915803807/blob158459901939705184') + .delete('/container159218743107601702/blob159218743136706794') .query(true) .reply(202, "", [ 'Content-Length', @@ -117,19 +117,19 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'b42b9705-701e-005c-4bb6-fd8f9a000000', + '4bfaa5fe-e01e-0021-66bb-4269db000000', 'x-ms-client-request-id', - 'bd04df20-1404-45e0-adec-a5d6a690f58f', + '330a264d-eb4c-4798-99d2-61f72eb15814', 'x-ms-version', '2019-12-12', 'x-ms-delete-type-permanent', 'false', 'Date', - 'Thu, 19 Mar 2020 06:23:39 GMT' + 'Mon, 15 Jun 2020 02:17:11 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container158459901915803807/blob158459901939705184') + .head('/container159218743107601702/blob159218743136706794') .query(true) .reply(404, "", [ 'Transfer-Encoding', @@ -137,9 +137,9 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e5b01-b01e-0088-1eb6-fd3fcb000000', + '0f471995-701e-006e-42bb-42188f000000', 'x-ms-client-request-id', - '97cdc424-d74f-4c65-8b6b-f87d28e12a5d', + 'bee1f06b-8f50-40df-ae8b-5745994fbe4c', 'x-ms-version', '2019-12-12', 'x-ms-error-code', @@ -149,11 +149,11 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Access-Control-Allow-Origin', '*', 'Date', - 'Thu, 19 Mar 2020 06:23:40 GMT' + 'Mon, 15 Jun 2020 02:17:12 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459901915803807/blob158459901939705184') + .put('/container159218743107601702/blob159218743136706794') .query(true) .reply(200, "", [ 'Content-Length', @@ -161,17 +161,17 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'b42b97c8-701e-005c-63b6-fd8f9a000000', + '4bfaa6a9-e01e-0021-0cbb-4269db000000', 'x-ms-client-request-id', - '8d18edf6-a68f-4ecc-bfa6-2a51d2293d89', + '249823cb-caa2-48ac-ad0a-368b28de4fd6', 'x-ms-version', '2019-12-12', 'Date', - 'Thu, 19 Mar 2020 06:23:40 GMT' + 'Mon, 15 Jun 2020 02:17:12 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container158459901915803807/blob158459901939705184') + .head('/container159218743107601702/blob159218743136706794') .query(true) .reply(200, "", [ 'Content-Length', @@ -181,23 +181,23 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:39 GMT', + 'Mon, 15 Jun 2020 02:17:11 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7CBCE1067ED9C"', + '"0x8D810D236638BB0"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e5bb6-b01e-0088-2fb6-fd3fcb000000', + '0f471b02-701e-006e-26bb-42188f000000', 'x-ms-client-request-id', - '622f9da6-5247-47ba-b205-5bb7b8926bb8', + '57620bf3-9ef6-4cca-910b-4e4223342e14', 'x-ms-version', '2019-12-12', 'x-ms-version-id', - '2020-03-19T06:23:39.5162524Z', + '2020-06-15T02:17:11.4595248Z', 'x-ms-creation-time', - 'Thu, 19 Mar 2020 06:23:39 GMT', + 'Mon, 15 Jun 2020 02:17:11 GMT', 'x-ms-blob-type', 'BlockBlob', 'x-ms-server-encrypted', @@ -211,11 +211,11 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Access-Control-Allow-Origin', '*', 'Date', - 'Thu, 19 Mar 2020 06:23:40 GMT' + 'Mon, 15 Jun 2020 02:17:13 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container158459901915803807') + .delete('/container159218743107601702') .query(true) .reply(202, "", [ 'Content-Length', @@ -223,11 +223,11 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'b42b98e1-701e-005c-33b6-fd8f9a000000', + '4bfaa75e-e01e-0021-3bbb-4269db000000', 'x-ms-client-request-id', - 'f0ab8bd6-a524-4eb2-aee2-6f0e94349e8e', + '809650fe-1111-4f77-b421-589bbd73135c', 'x-ms-version', '2019-12-12', 'Date', - 'Thu, 19 Mar 2020 06:23:40 GMT' + 'Mon, 15 Jun 2020 02:17:12 GMT' ]); diff --git a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_upload_block_blob_return_versionid.js b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_upload_block_blob_return_versionid.js index c55326e14c55..8993032c9055 100644 --- a/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_upload_block_blob_return_versionid.js +++ b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_upload_block_blob_return_versionid.js @@ -2,47 +2,47 @@ let nock = require('nock'); module.exports.hash = "c3f7171fc37c565be96c4886a01aeb79"; -module.exports.testInfo = {"uniqueName":{"container":"container158459901551208800","blob":"blob158459901575305766"},"newDate":{}} +module.exports.testInfo = {"uniqueName":{"container":"container159218742674901684","blob":"blob159218742703506211"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459901551208800') + .put('/container159218742674901684') .query(true) .reply(201, "", [ 'Content-Length', '0', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:35 GMT', + 'Mon, 15 Jun 2020 02:17:06 GMT', 'ETag', - '"0x8D7CBCE0E16E264"', + '"0x8D810D233A29356"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e53c7-b01e-0088-57b6-fd3fcb000000', + '0f470b3c-701e-006e-07bb-42188f000000', 'x-ms-client-request-id', - '54572add-57d1-43f1-a53d-10285dab39a3', + 'd670e748-c3d7-40f7-825f-685d4476b781', 'x-ms-version', '2019-12-12', 'Date', - 'Thu, 19 Mar 2020 06:23:35 GMT' + 'Mon, 15 Jun 2020 02:17:05 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459901551208800/blob158459901575305766', "Hello World") + .put('/container159218742674901684/blob159218742703506211', "Hello World") .reply(201, "", [ 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:35 GMT', + 'Mon, 15 Jun 2020 02:17:07 GMT', 'ETag', - '"0x8D7CBCE0E3BA7BE"', + '"0x8D810D233CE3828"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'b42b8e08-701e-005c-2fb6-fd8f9a000000', + '4bfa9e96-e01e-0021-75bb-4269db000000', 'x-ms-client-request-id', - 'ef32afdb-4217-441f-b9a4-e3dc9e30c746', + 'f08f1993-bef1-4c32-8bbb-68678d5b7747', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -50,28 +50,28 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-03-19T06:23:35.8706622Z', + '2020-06-15T02:17:07.1254568Z', 'Date', - 'Thu, 19 Mar 2020 06:23:35 GMT' + 'Mon, 15 Jun 2020 02:17:06 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459901551208800/blob158459901575305766') + .put('/container159218742674901684/blob159218742703506211') .reply(201, "", [ 'Content-Length', '0', 'Content-MD5', '1B2M2Y8AsgTpgAmY7PhCfg==', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:36 GMT', + 'Mon, 15 Jun 2020 02:17:07 GMT', 'ETag', - '"0x8D7CBCE0E6137ED"', + '"0x8D810D233F9BCCE"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e5477-b01e-0088-73b6-fd3fcb000000', + '0f470c8c-701e-006e-42bb-42188f000000', 'x-ms-client-request-id', - '94e6dc5e-a2af-4077-bc38-7267e1d077a3', + '5a5612ce-dcb8-422a-85a5-b8f0c8f6b3ea', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -79,28 +79,28 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-03-19T06:23:36.1178365Z', + '2020-06-15T02:17:07.4116574Z', 'Date', - 'Thu, 19 Mar 2020 06:23:35 GMT' + 'Mon, 15 Jun 2020 02:17:07 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158459901551208800/blob158459901575305766', "Hello World") + .put('/container159218742674901684/blob159218742703506211', "Hello World") .reply(201, "", [ 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Thu, 19 Mar 2020 06:23:36 GMT', + 'Mon, 15 Jun 2020 02:17:07 GMT', 'ETag', - '"0x8D7CBCE0E86C816"', + '"0x8D810D234258FAA"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'b42b8f29-701e-005c-39b6-fd8f9a000000', + '4bfa9f2a-e01e-0021-02bb-4269db000000', 'x-ms-client-request-id', - '7bc516fc-9a82-49d9-a1fb-30af2a644ec9', + '2f5aa1f6-a873-445e-b81f-07dd43e977ad', 'x-ms-version', '2019-12-12', 'x-ms-content-crc64', @@ -108,13 +108,13 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-03-19T06:23:36.3640102Z', + '2020-06-15T02:17:07.6988602Z', 'Date', - 'Thu, 19 Mar 2020 06:23:35 GMT' + 'Mon, 15 Jun 2020 02:17:07 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container158459901551208800') + .delete('/container159218742674901684') .query(true) .reply(202, "", [ 'Content-Length', @@ -122,11 +122,11 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '775e5517-b01e-0088-07b6-fd3fcb000000', + '0f470de8-701e-006e-0fbb-42188f000000', 'x-ms-client-request-id', - '56381488-cecc-4669-9ac6-fb8680910163', + '17e172c3-3c3d-441f-85d5-16c93f9ebeaf', 'x-ms-version', '2019-12-12', 'Date', - 'Thu, 19 Mar 2020 06:23:36 GMT' + 'Mon, 15 Jun 2020 02:17:07 GMT' ]); diff --git a/sdk/storage/storage-blob/recordings/node/highlevel/recording_after_all_hook.js b/sdk/storage/storage-blob/recordings/node/highlevel/recording_after_all_hook.js index 66482dfe75e9..ecf2c683101a 100644 --- a/sdk/storage/storage-blob/recordings/node/highlevel/recording_after_all_hook.js +++ b/sdk/storage/storage-blob/recordings/node/highlevel/recording_after_all_hook.js @@ -1,5 +1,5 @@ let nock = require('nock'); -module.exports.hash = "b137424a7c843890b2fcbc3ce52013fc"; +module.exports.hash = "8fc0f0f8be4cfc4b1ab29277203cf2bc"; module.exports.testInfo = {"uniqueName":{},"newDate":{}} diff --git a/sdk/storage/storage-blob/recordings/node/highlevel/recording_before_all_hook.js b/sdk/storage/storage-blob/recordings/node/highlevel/recording_before_all_hook.js index 6fa31975aaca..ecf2c683101a 100644 --- a/sdk/storage/storage-blob/recordings/node/highlevel/recording_before_all_hook.js +++ b/sdk/storage/storage-blob/recordings/node/highlevel/recording_before_all_hook.js @@ -1,5 +1,5 @@ let nock = require('nock'); -module.exports.hash = "82a9338d67ceb4b736c6cb55f3326590"; +module.exports.hash = "8fc0f0f8be4cfc4b1ab29277203cf2bc"; module.exports.testInfo = {"uniqueName":{},"newDate":{}} diff --git a/sdk/storage/storage-blob/test/blobversioning.spec.ts b/sdk/storage/storage-blob/test/blobversioning.spec.ts index 545b3f130fcc..fa5d91eb77a2 100644 --- a/sdk/storage/storage-blob/test/blobversioning.spec.ts +++ b/sdk/storage/storage-blob/test/blobversioning.spec.ts @@ -300,7 +300,7 @@ describe.only("Blob versioning", () => { assert.ok(versionExists); }); - it("promote a version: as the copy source", async () => { + it.only("promote a version: as the copy source", async () => { recorder.skip( "browser", "Failed with One of the query parameters specified in the request URI is not supported." From 1728a17d1faba88510855cd38640a606b7eded4b Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Mon, 15 Jun 2020 10:21:48 +0800 Subject: [PATCH 30/39] wip --- .../recording_exists_with_condition.json | 150 +++++++++++++ .../recording_exists_with_condition.js | 172 +++++++++++++++ .../recording_downloadtobuffer_with_cpk.js | 199 ++++++++++++++++++ 3 files changed, 521 insertions(+) create mode 100644 sdk/storage/storage-blob/recordings/browsers/blobclient/recording_exists_with_condition.json create mode 100644 sdk/storage/storage-blob/recordings/node/blobclient/recording_exists_with_condition.js create mode 100644 sdk/storage/storage-blob/recordings/node/highlevel/recording_downloadtobuffer_with_cpk.js diff --git a/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_exists_with_condition.json b/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_exists_with_condition.json new file mode 100644 index 000000000000..f5b203124c82 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_exists_with_condition.json @@ -0,0 +1,150 @@ +{ + "recordings": [ + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218748821200817", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Mon, 15 Jun 2020 02:18:09 GMT", + "etag": "\"0x8D810D259123D05\"", + "last-modified": "Mon, 15 Jun 2020 02:18:09 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "4cb7e4dd-e4ce-4639-9da5-21d8938b43bb", + "x-ms-request-id": "b4a3efbe-001e-0029-71bb-4273d4000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218748821200817/blob159218748985607824", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "Hello World", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "date": "Mon, 15 Jun 2020 02:18:09 GMT", + "etag": "\"0x8D810D2596C4D04\"", + "last-modified": "Mon, 15 Jun 2020 02:18:10 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "5b25779e-97d5-422d-97d1-02ced8e71bb7", + "x-ms-content-crc64": "YeJLfssylmU=", + "x-ms-request-id": "b4a3f0b5-001e-0029-4ebb-4273d4000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-06-15T02:18:10.2371588Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218748821200817/blob159218748985607824", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "comp": "lease" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Mon, 15 Jun 2020 02:18:10 GMT", + "etag": "\"0x8D810D2596C4D04\"", + "last-modified": "Mon, 15 Jun 2020 02:18:10 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "820728a3-b24f-425a-a988-29386cd83b05", + "x-ms-lease-id": "15b6f7d8-612d-440b-8039-05e525f53a81", + "x-ms-request-id": "b4a3f19f-001e-0029-29bb-4273d4000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "HEAD", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218748821200817/blob159218748985607824", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": null, + "status": 200, + "response": "", + "responseHeaders": { + "accept-ranges": "bytes", + "content-length": "11", + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "content-type": "application/octet-stream", + "date": "Mon, 15 Jun 2020 02:18:11 GMT", + "etag": "\"0x8D810D2596C4D04\"", + "last-modified": "Mon, 15 Jun 2020 02:18:10 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-access-tier": "Hot", + "x-ms-access-tier-inferred": "true", + "x-ms-blob-type": "BlockBlob", + "x-ms-client-request-id": "a0610b29-b6c1-4d7b-b022-b84370e34d93", + "x-ms-creation-time": "Mon, 15 Jun 2020 02:18:10 GMT", + "x-ms-is-current-version": "true", + "x-ms-lease-duration": "fixed", + "x-ms-lease-state": "leased", + "x-ms-lease-status": "locked", + "x-ms-request-id": "b4a3f277-001e-0029-6cbb-4273d4000000", + "x-ms-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-06-15T02:18:10.2371588Z" + } + }, + { + "method": "HEAD", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218748821200817/blob159218748985607824", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": null, + "status": 412, + "response": "", + "responseHeaders": { + "date": "Mon, 15 Jun 2020 02:18:11 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "transfer-encoding": "chunked", + "x-ms-client-request-id": "aaa667af-8478-4850-8ab1-1f1a9123b0d6", + "x-ms-error-code": "LeaseIdMismatchWithBlobOperation", + "x-ms-request-id": "b4a3f357-001e-0029-42bb-4273d4000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218748821200817", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Mon, 15 Jun 2020 02:18:12 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "c5a4db75-dd10-4382-bda5-612ca1cdd044", + "x-ms-request-id": "b4a3f421-001e-0029-7fbb-4273d4000000", + "x-ms-version": "2019-12-12" + } + } + ], + "uniqueTestInfo": { + "uniqueName": { + "container": "container159218748821200817", + "blob": "blob159218748985607824" + }, + "newDate": {} + }, + "hash": "0aec0330a95f16497de24aaa5301b4ee" +} \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/recording_exists_with_condition.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_exists_with_condition.js new file mode 100644 index 000000000000..1268b6d44f6b --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_exists_with_condition.js @@ -0,0 +1,172 @@ +let nock = require('nock'); + +module.exports.hash = "d5502ae98d701eb6230929f447f1bdc5"; + +module.exports.testInfo = {"uniqueName":{"container":"container159218739516209928","blob":"blob159218739652208622"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218739516209928') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:36 GMT', + 'ETag', + '"0x8D810D2216F8A59"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd8031701-501e-0069-04ba-4274ec000000', + 'x-ms-client-request-id', + '1c78e532-ccae-49ab-9bf5-28a7205cc7be', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Mon, 15 Jun 2020 02:16:35 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218739516209928/blob159218739652208622', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:36 GMT', + 'ETag', + '"0x8D810D2219F96F7"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd80317f1-501e-0069-6cba-4274ec000000', + 'x-ms-client-request-id', + '28aa8421-db2b-4748-a545-c6c71f015e50', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-15T02:16:36.6208759Z', + 'Date', + 'Mon, 15 Jun 2020 02:16:36 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218739516209928/blob159218739652208622') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:36 GMT', + 'ETag', + '"0x8D810D2219F96F7"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd8031890-501e-0069-08ba-4274ec000000', + 'x-ms-client-request-id', + '475ac35d-c255-4e87-aaa8-7969751404d8', + 'x-ms-version', + '2019-12-12', + 'x-ms-lease-id', + '618d9b5d-7dd8-422d-ab72-4432f320af0c', + 'Date', + 'Mon, 15 Jun 2020 02:16:36 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container159218739516209928/blob159218739652208622') + .reply(200, "", [ + 'Content-Length', + '11', + 'Content-Type', + 'application/octet-stream', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:36 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D810D2219F96F7"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd803196a-501e-0069-55ba-4274ec000000', + 'x-ms-client-request-id', + '303d4224-17d8-425f-8296-d5f02ea95084', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-06-15T02:16:36.6208759Z', + 'x-ms-is-current-version', + 'true', + 'x-ms-creation-time', + 'Mon, 15 Jun 2020 02:16:36 GMT', + 'x-ms-lease-status', + 'locked', + 'x-ms-lease-state', + 'leased', + 'x-ms-lease-duration', + 'fixed', + 'x-ms-blob-type', + 'BlockBlob', + 'x-ms-server-encrypted', + 'true', + 'x-ms-access-tier', + 'Hot', + 'x-ms-access-tier-inferred', + 'true', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-version-id,x-ms-is-current-version,Content-Type,Last-Modified,ETag,x-ms-creation-time,Content-MD5,x-ms-lease-status,x-ms-lease-state,x-ms-lease-duration,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', + 'Mon, 15 Jun 2020 02:16:36 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container159218739516209928/blob159218739652208622') + .reply(412, "", [ + 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd8031a0b-501e-0069-70ba-4274ec000000', + 'x-ms-client-request-id', + 'ae805336-ecae-485d-b26e-985dfcdb8940', + 'x-ms-version', + '2019-12-12', + 'x-ms-error-code', + 'LeaseIdMismatchWithBlobOperation', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-error-code,Content-Length,Date,Transfer-Encoding', + 'Access-Control-Allow-Origin', + '*', + 'Date', + 'Mon, 15 Jun 2020 02:16:36 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159218739516209928') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd8031a9e-501e-0069-7bba-4274ec000000', + 'x-ms-client-request-id', + '48d0bb6f-5420-4899-9699-50169bcd8212', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Mon, 15 Jun 2020 02:16:37 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/highlevel/recording_downloadtobuffer_with_cpk.js b/sdk/storage/storage-blob/recordings/node/highlevel/recording_downloadtobuffer_with_cpk.js new file mode 100644 index 000000000000..22288a769fe7 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/highlevel/recording_downloadtobuffer_with_cpk.js @@ -0,0 +1,199 @@ +let nock = require('nock'); + +module.exports.hash = "8fc0f0f8be4cfc4b1ab29277203cf2bc"; + +module.exports.testInfo = {"uniqueName":{"container":"container159218743504107204","blob":"blob159218743535309436","blobCPK":"blobCPK159218743535502279"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218743504107204') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:17:15 GMT', + 'ETag', + '"0x8D810D23894E519"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f471fd3-701e-006e-5abb-42188f000000', + 'x-ms-client-request-id', + '41aeb515-a435-4ec2-8def-5f482870485d', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Mon, 15 Jun 2020 02:17:15 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218743504107204/blobCPK159218743535502279', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:17:15 GMT', + 'ETag', + '"0x8D810D238C5DF3C"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '4bfaa98a-e01e-0021-4cbb-4269db000000', + 'x-ms-client-request-id', + 'fb2a4ff0-9f03-4da1-8aa9-c2d469d2b4bd', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-encryption-key-sha256', + '3QFFFpRA5+XANHqwwbT4yXDmrT/2JaLt/FKHjzhOdoE=', + 'x-ms-version-id', + '2020-06-15T02:17:15.4593596Z', + 'Date', + 'Mon, 15 Jun 2020 02:17:14 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container159218743504107204/blobCPK159218743535502279') + .reply(200, "", [ + 'Content-Length', + '11', + 'Content-Type', + 'application/octet-stream', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:17:15 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D810D238C5DF3C"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f472186-701e-006e-7bbb-42188f000000', + 'x-ms-client-request-id', + 'c6df8f7e-2226-4ba5-b4a4-8b61adbedfb0', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-06-15T02:17:15.4593596Z', + 'x-ms-is-current-version', + 'true', + 'x-ms-creation-time', + 'Mon, 15 Jun 2020 02:17:15 GMT', + 'x-ms-lease-status', + 'unlocked', + 'x-ms-lease-state', + 'available', + 'x-ms-blob-type', + 'BlockBlob', + 'x-ms-server-encrypted', + 'true', + 'x-ms-encryption-key-sha256', + '3QFFFpRA5+XANHqwwbT4yXDmrT/2JaLt/FKHjzhOdoE=', + 'x-ms-access-tier', + 'Hot', + 'x-ms-access-tier-inferred', + 'true', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-version-id,x-ms-is-current-version,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-encryption-key-sha256,x-ms-access-tier,x-ms-access-tier-inferred,Accept-Ranges,Content-Length,Date,Transfer-Encoding', + 'Access-Control-Allow-Origin', + '*', + 'Date', + 'Mon, 15 Jun 2020 02:17:15 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/container159218743504107204/blobCPK159218743535502279') + .reply(206, "Hello World", [ + 'Content-Length', + '11', + 'Content-Type', + 'application/octet-stream', + 'Content-Range', + 'bytes 0-10/11', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:17:15 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D810D238C5DF3C"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '4bfaaa45-e01e-0021-7dbb-4269db000000', + 'x-ms-client-request-id', + 'cdb7d256-d5d2-4518-b235-f27d51da2fab', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-06-15T02:17:15.4593596Z', + 'x-ms-is-current-version', + 'true', + 'x-ms-creation-time', + 'Mon, 15 Jun 2020 02:17:15 GMT', + 'x-ms-blob-content-md5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'x-ms-lease-status', + 'unlocked', + 'x-ms-lease-state', + 'available', + 'x-ms-blob-type', + 'BlockBlob', + 'x-ms-server-encrypted', + 'true', + 'x-ms-encryption-key-sha256', + '3QFFFpRA5+XANHqwwbT4yXDmrT/2JaLt/FKHjzhOdoE=', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-version-id,x-ms-is-current-version,Content-Type,Last-Modified,ETag,x-ms-creation-time,x-ms-blob-content-md5,x-ms-lease-status,x-ms-lease-state,x-ms-blob-type,x-ms-server-encrypted,x-ms-encryption-key-sha256,Accept-Ranges,Content-Length,Date,Transfer-Encoding', + 'Access-Control-Allow-Origin', + '*', + 'Date', + 'Mon, 15 Jun 2020 02:17:15 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container159218743504107204/blobCPK159218743535502279') + .reply(409, "", [ + 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f472353-701e-006e-40bb-42188f000000', + 'x-ms-client-request-id', + 'fa84fc7a-5766-40ef-a3e0-c0ffdbbd857f', + 'x-ms-version', + '2019-12-12', + 'x-ms-error-code', + 'BlobUsesCustomerSpecifiedEncryption', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-error-code,Content-Length,Date,Transfer-Encoding', + 'Access-Control-Allow-Origin', + '*', + 'Date', + 'Mon, 15 Jun 2020 02:17:16 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159218743504107204') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '4bfaaaf7-e01e-0021-24bb-4269db000000', + 'x-ms-client-request-id', + '8acff522-b4c5-44e1-9b17-e1d2ce199c96', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Mon, 15 Jun 2020 02:17:16 GMT' +]); From 262053c28599721b8823dadb0d06e34ae18c952d Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Mon, 15 Jun 2020 10:35:59 +0800 Subject: [PATCH 31/39] wip --- ..._promote_a_version_as_the_copy_source.json | 164 +++++++++++++++--- .../storage-blob/test/blobclient.spec.ts | 2 +- .../storage-blob/test/blobversioning.spec.ts | 8 +- .../test/node/highlevel.node.spec.ts | 2 +- 4 files changed, 141 insertions(+), 35 deletions(-) diff --git a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_promote_a_version_as_the_copy_source.json b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_promote_a_version_as_the_copy_source.json index fbbb21c0e0f6..5c2169b41f4e 100644 --- a/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_promote_a_version_as_the_copy_source.json +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_promote_a_version_as_the_copy_source.json @@ -2,7 +2,7 @@ "recordings": [ { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container159218753334906482", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218811479506335", "query": { "sip": "0.0.0.0-255.255.255.255", "restype": "container" @@ -12,18 +12,18 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Mon, 15 Jun 2020 02:18:53 GMT", - "etag": "\"0x8D810D2735681A6\"", - "last-modified": "Mon, 15 Jun 2020 02:18:53 GMT", + "date": "Mon, 15 Jun 2020 02:28:35 GMT", + "etag": "\"0x8D810D3CE7EB4FA\"", + "last-modified": "Mon, 15 Jun 2020 02:28:36 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "1c2ca221-8101-4a40-9253-87a0b3f1b7cd", - "x-ms-request-id": "2ab98662-d01e-0067-1dbb-425d5c000000", + "x-ms-client-request-id": "af3755c3-93e8-47fd-a4b9-9e6d1bcf1b6e", + "x-ms-request-id": "712e7aae-a01e-006d-72bc-42f9eb000000", "x-ms-version": "2019-12-12" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container159218753334906482/blob159218753391205402", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218811479506335/blob159218811635401319", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -33,21 +33,21 @@ "responseHeaders": { "content-length": "0", "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", - "date": "Mon, 15 Jun 2020 02:18:53 GMT", - "etag": "\"0x8D810D273AC9B31\"", - "last-modified": "Mon, 15 Jun 2020 02:18:54 GMT", + "date": "Mon, 15 Jun 2020 02:28:35 GMT", + "etag": "\"0x8D810D3CED78F6E\"", + "last-modified": "Mon, 15 Jun 2020 02:28:36 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "17670953-41dc-40e3-bf61-c1a6f46a1a9f", + "x-ms-client-request-id": "5d089bae-a723-47a1-b0b6-60751b5f1265", "x-ms-content-crc64": "YeJLfssylmU=", - "x-ms-request-id": "2ab9874e-d01e-0067-7ebb-425d5c000000", + "x-ms-request-id": "712e7b8c-a01e-006d-3cbc-42f9eb000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-06-15T02:18:54.2803528Z" + "x-ms-version-id": "2020-06-15T02:28:36.7302510Z" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container159218753334906482/blob159218753391205402", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218811479506335/blob159218811635401319", "query": { "sip": "0.0.0.0-255.255.255.255" }, @@ -57,21 +57,131 @@ "responseHeaders": { "content-length": "0", "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", - "date": "Mon, 15 Jun 2020 02:18:54 GMT", - "etag": "\"0x8D810D273D8BC48\"", - "last-modified": "Mon, 15 Jun 2020 02:18:54 GMT", + "date": "Mon, 15 Jun 2020 02:28:36 GMT", + "etag": "\"0x8D810D3CF0425BD\"", + "last-modified": "Mon, 15 Jun 2020 02:28:37 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "69c6e80d-ee31-4982-b72e-2c32026768b6", + "x-ms-client-request-id": "95a8681c-fc11-4bbd-8be3-b25f5e68ae7e", "x-ms-content-crc64": "AAAAAAAAAAA=", - "x-ms-request-id": "2ab987db-d01e-0067-07bb-425d5c000000", + "x-ms-request-id": "712e7bda-a01e-006d-03bc-42f9eb000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-06-15T02:18:54.5695576Z" + "x-ms-version-id": "2020-06-15T02:28:37.0244580Z" + } + }, + { + "method": "HEAD", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218811479506335/blob159218811635401319", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "versionid": "2020-06-15T02:28:36.7302510Z" + }, + "requestBody": null, + "status": 200, + "response": "", + "responseHeaders": { + "accept-ranges": "bytes", + "content-length": "11", + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "content-type": "application/octet-stream", + "date": "Mon, 15 Jun 2020 02:28:36 GMT", + "etag": "\"0x8D810D3CED78F6E\"", + "last-modified": "Mon, 15 Jun 2020 02:28:36 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-access-tier": "Hot", + "x-ms-access-tier-inferred": "true", + "x-ms-blob-type": "BlockBlob", + "x-ms-client-request-id": "ad173469-746a-4927-b14c-b4d739b187bc", + "x-ms-creation-time": "Mon, 15 Jun 2020 02:28:36 GMT", + "x-ms-request-id": "712e7c5d-a01e-006d-76bc-42f9eb000000", + "x-ms-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-06-15T02:28:36.7302510Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218811479506335/blob159218811635401319", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Mon, 15 Jun 2020 02:28:37 GMT", + "etag": "\"0x8D810D3CFBAC570\"", + "last-modified": "Mon, 15 Jun 2020 02:28:38 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "96d43b2d-1b07-468f-b49b-b14bfcb5385f", + "x-ms-copy-id": "d22b0af6-b9f6-4eda-b797-8e8b8a64ef37", + "x-ms-copy-status": "success", + "x-ms-request-id": "712e7cf0-a01e-006d-7bbc-42f9eb000000", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-06-15T02:28:38.2213015Z" + } + }, + { + "method": "GET", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218811479506335", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "include": "versions", + "restype": "container", + "comp": "list" + }, + "requestBody": null, + "status": 200, + "response": "blob1592188116354013192020-06-15T02:28:36.7302510ZMon, 15 Jun 2020 02:28:36 GMTMon, 15 Jun 2020 02:28:36 GMT0x8D810D3CED78F6E11application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottruetrueblob1592188116354013192020-06-15T02:28:37.0244580ZMon, 15 Jun 2020 02:28:37 GMTMon, 15 Jun 2020 02:28:37 GMT0x8D810D3CF0425BD0application/octet-stream1B2M2Y8AsgTpgAmY7PhCfg==BlockBlobHottruetrueblob1592188116354013192020-06-15T02:28:38.2213015ZtrueMon, 15 Jun 2020 02:28:37 GMTMon, 15 Jun 2020 02:28:38 GMT0x8D810D3CFBAC57011application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottrueunlockedavailabletrue", + "responseHeaders": { + "content-type": "application/xml", + "date": "Mon, 15 Jun 2020 02:28:37 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "transfer-encoding": "chunked", + "x-ms-client-request-id": "9937715b-c798-4b0b-86a7-6ccb3c2a9909", + "x-ms-request-id": "712e7d64-a01e-006d-61bc-42f9eb000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "GET", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218811479506335/blob159218811635401319", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": null, + "status": 200, + "response": "Hello World", + "responseHeaders": { + "accept-ranges": "bytes", + "content-length": "11", + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "content-type": "application/octet-stream", + "date": "Mon, 15 Jun 2020 02:28:38 GMT", + "etag": "\"0x8D810D3CFBAC570\"", + "last-modified": "Mon, 15 Jun 2020 02:28:38 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-type": "BlockBlob", + "x-ms-client-request-id": "7fbacff3-de88-4960-9894-36f2eb2d4d69", + "x-ms-copy-completion-time": "Mon, 15 Jun 2020 02:28:38 GMT", + "x-ms-copy-id": "d22b0af6-b9f6-4eda-b797-8e8b8a64ef37", + "x-ms-copy-progress": "11/11", + "x-ms-copy-source": "https://fakestorageaccount.blob.core.windows.net/container159218811479506335/blob159218811635401319?sv=2019-12-12&ss=btqf&srt=sco&spr=https%2Chttp&st=2020-06-14T14%3A38%3A08Z&se=2020-09-22T14%3A43%3A08Z&sip=0.0.0.0-255.255.255.255&sp=rwdxlacupt&versionid=2020-06-15T02:28:36.7302510Z", + "x-ms-copy-status": "success", + "x-ms-creation-time": "Mon, 15 Jun 2020 02:28:37 GMT", + "x-ms-is-current-version": "true", + "x-ms-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-request-id": "712e7e6e-a01e-006d-4bbc-42f9eb000000", + "x-ms-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-06-15T02:28:38.2213015Z" } }, { "method": "DELETE", - "url": "https://fakestorageaccount.blob.core.windows.net/container159218753334906482", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218811479506335", "query": { "sip": "0.0.0.0-255.255.255.255", "restype": "container" @@ -81,20 +191,20 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Mon, 15 Jun 2020 02:18:54 GMT", + "date": "Mon, 15 Jun 2020 02:28:39 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "399c45ee-4ad9-47c6-81a9-c34e68bc1fea", - "x-ms-request-id": "2ab98925-d01e-0067-3dbb-425d5c000000", + "x-ms-client-request-id": "6280aaa2-2a64-4f01-aec8-5aebc27ad11f", + "x-ms-request-id": "712e7f94-a01e-006d-5abc-42f9eb000000", "x-ms-version": "2019-12-12" } } ], "uniqueTestInfo": { "uniqueName": { - "container": "container159218753334906482", - "blob": "blob159218753391205402" + "container": "container159218811479506335", + "blob": "blob159218811635401319" }, "newDate": {} }, - "hash": "7babdaecbd7c5e101733cf84ccfa00ad" + "hash": "04fa40ec89937446c75a3515f6847c6f" } \ No newline at end of file diff --git a/sdk/storage/storage-blob/test/blobclient.spec.ts b/sdk/storage/storage-blob/test/blobclient.spec.ts index 45f6b7304d15..054359c80063 100644 --- a/sdk/storage/storage-blob/test/blobclient.spec.ts +++ b/sdk/storage/storage-blob/test/blobclient.spec.ts @@ -720,7 +720,7 @@ describe("BlobClient", () => { assert.ok(exceptionCaught); }); - it.only("exists with condition", async () => { + it("exists with condition", async () => { const leaseResp = await blobClient.getBlobLeaseClient().acquireLease(30); assert.ok(leaseResp.leaseId); diff --git a/sdk/storage/storage-blob/test/blobversioning.spec.ts b/sdk/storage/storage-blob/test/blobversioning.spec.ts index fa5d91eb77a2..8593cc2f97fd 100644 --- a/sdk/storage/storage-blob/test/blobversioning.spec.ts +++ b/sdk/storage/storage-blob/test/blobversioning.spec.ts @@ -21,7 +21,7 @@ import { import { setURLParameter } from "../src/utils/utils.common"; dotenv.config({ path: "../.env" }); -describe.only("Blob versioning", () => { +describe("Blob versioning", () => { let blobServiceClient: BlobServiceClient; let containerName: string; let containerClient: ContainerClient; @@ -300,11 +300,7 @@ describe.only("Blob versioning", () => { assert.ok(versionExists); }); - it.only("promote a version: as the copy source", async () => { - recorder.skip( - "browser", - "Failed with One of the query parameters specified in the request URI is not supported." - ); + it("promote a version: as the copy source", async () => { const blobVersionClient = blobClient.withVersion(uploadRes.versionId!); await blobVersionClient.getProperties(); diff --git a/sdk/storage/storage-blob/test/node/highlevel.node.spec.ts b/sdk/storage/storage-blob/test/node/highlevel.node.spec.ts index 3ed8db812687..e300af2290c0 100644 --- a/sdk/storage/storage-blob/test/node/highlevel.node.spec.ts +++ b/sdk/storage/storage-blob/test/node/highlevel.node.spec.ts @@ -456,7 +456,7 @@ describe("Highlevel", () => { assert.ok(eventTriggered); }); - it.only("downloadToBuffer with CPK", async () => { + it("downloadToBuffer with CPK", async () => { const content = "Hello World"; const CPKblobName = recorder.getUniqueName("blobCPK"); const CPKblobClient = containerClient.getBlobClient(CPKblobName); From 2077f2146e944566cdf5eaa61d0962d178fbc0b6 Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Mon, 15 Jun 2020 11:08:03 +0800 Subject: [PATCH 32/39] add f for account SAS permission --- ...sion_f_for_filter_blob_tags_should_work.js | 117 ++++++++++++++++++ .../storage-blob/src/AccountSASPermissions.ts | 28 +++++ .../storage-blob/test/node/sas.spec.ts | 71 ++++++++++- 3 files changed, 212 insertions(+), 4 deletions(-) create mode 100644 sdk/storage/storage-blob/recordings/node/shared_access_signature_sas_generation_nodejs_only/recording_account_sas_permission_f_for_filter_blob_tags_should_work.js diff --git a/sdk/storage/storage-blob/recordings/node/shared_access_signature_sas_generation_nodejs_only/recording_account_sas_permission_f_for_filter_blob_tags_should_work.js b/sdk/storage/storage-blob/recordings/node/shared_access_signature_sas_generation_nodejs_only/recording_account_sas_permission_f_for_filter_blob_tags_should_work.js new file mode 100644 index 000000000000..dd5ad1c2fbc0 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/shared_access_signature_sas_generation_nodejs_only/recording_account_sas_permission_f_for_filter_blob_tags_should_work.js @@ -0,0 +1,117 @@ +let nock = require('nock'); + +module.exports.hash = "5a0449068d3fe94bec9946961f9b9d03"; + +module.exports.testInfo = {"uniqueName":{"container1":"container1159218984686205498","key":"key159218984821401244","key2":"key2159218984821407907","blobname1":"blobname1159218984821507230","val1":"val1159218984821603506","blobname2":"blobname2159218984852304182","val2":"val2159218984852407041"},"newDate":{"now":"2020-06-15T02:57:26.859Z","tmr":"2020-06-15T02:57:26.860Z"}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container1159218984686205498') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:57:27 GMT', + 'ETag', + '"0x8D810D7D6C24E0D"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'dea84e26-a01e-0089-4bc0-42f775000000', + 'x-ms-client-request-id', + '04963732-0d5c-4e8e-a14e-4a2eb1248a53', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Mon, 15 Jun 2020 02:57:27 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container1159218984686205498/blobname1159218984821507230') + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:57:28 GMT', + 'ETag', + '"0x8D810D7D6F42897"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'dea84ee2-a01e-0089-7ec0-42f775000000', + 'x-ms-client-request-id', + '562bfc6c-17aa-4d68-a4c1-672a775491f1', + 'x-ms-version', + '2019-12-12', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-15T02:57:28.3263639Z', + 'Date', + 'Mon, 15 Jun 2020 02:57:27 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container1159218984686205498/blobname2159218984852304182') + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:57:28 GMT', + 'ETag', + '"0x8D810D7D721A968"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'dea84f7e-a01e-0089-15c0-42f775000000', + 'x-ms-client-request-id', + '61447852-d0ec-4982-8baa-1bd2177afe9b', + 'x-ms-version', + '2019-12-12', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-15T02:57:28.6245736Z', + 'Date', + 'Mon, 15 Jun 2020 02:57:28 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/') + .query(true) + .reply(200, "\nkey159218984821401244='val1159218984821603506'blobname1159218984821507230container1159218984686205498val1159218984821603506", [ + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/xml', + 'Vary', + 'Origin', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'dea8554c-a01e-0089-34c0-42f775000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + 'f0d45b84-d5d5-47b6-baf6-b33fb6070ee6', + 'Date', + 'Mon, 15 Jun 2020 02:57:30 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container1159218984686205498') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'dea856d7-a01e-0089-2cc0-42f775000000', + 'x-ms-client-request-id', + 'd4ddb98f-ec79-4868-bf09-73b1a7f2896c', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Mon, 15 Jun 2020 02:57:31 GMT' +]); diff --git a/sdk/storage/storage-blob/src/AccountSASPermissions.ts b/sdk/storage/storage-blob/src/AccountSASPermissions.ts index 93f37750a782..4e1c030e1b68 100644 --- a/sdk/storage/storage-blob/src/AccountSASPermissions.ts +++ b/sdk/storage/storage-blob/src/AccountSASPermissions.ts @@ -54,6 +54,12 @@ export class AccountSASPermissions { case "p": accountSASPermissions.process = true; break; + case "t": + accountSASPermissions.tag = true; + break; + case "f": + accountSASPermissions.filter = true; + break; default: throw new RangeError(`Invalid permission character: ${c}`); } @@ -134,6 +140,22 @@ export class AccountSASPermissions { */ public process: boolean = false; + /** + * Specfies Tag access granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + public tag: boolean = false; + + /** + * Permission to filter blobs. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + public filter: boolean = false; + /** * Produces the SAS permissions string for an Azure Storage account. * Call this method to set AccountSASSignatureValues Permissions field. @@ -163,6 +185,12 @@ export class AccountSASPermissions { if (this.deleteVersion) { permissions.push("x"); } + if (this.filter) { + permissions.push("f"); + } + if (this.tag) { + permissions.push("t"); + } if (this.list) { permissions.push("l"); } diff --git a/sdk/storage/storage-blob/test/node/sas.spec.ts b/sdk/storage/storage-blob/test/node/sas.spec.ts index 90a5a09b3ae4..04a1669c50ec 100644 --- a/sdk/storage/storage-blob/test/node/sas.spec.ts +++ b/sdk/storage/storage-blob/test/node/sas.spec.ts @@ -14,10 +14,11 @@ import { BlobServiceClient, StorageSharedKeyCredential, newPipeline, - BlobClient + BlobClient, + Tags } from "../../src"; import { SASProtocol } from "../../src/SASQueryParameters"; -import { getBSU, getTokenBSU, recorderEnvSetup, isBlobVersioningDisabled } from "../utils"; +import { getBSU, getTokenBSU, recorderEnvSetup, isBlobVersioningDisabled, sleep } from "../utils"; import { delay, record } from "@azure/test-utils-recorder"; import { SERVICE_VERSION } from "../../src/utils/constants"; @@ -956,8 +957,7 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => { await containerClient.delete(); }); - // TODO: prepare ACCOUNT_TOKEN for the test account - it.skip("GenerateUserDelegationSAS should work for blob version delete", async function() { + it("GenerateUserDelegationSAS should work for blob version delete", async function() { if (isBlobVersioningDisabled()) { this.skip(); } @@ -1075,4 +1075,67 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => { await containerClient.delete(); }); + + it.only("account SAS permission f for filter blob tags should work", async function() { + const now = recorder.newDate("now"); + now.setMinutes(now.getMinutes() - 5); // Skip clock skew with server + const tmr = recorder.newDate("tmr"); + tmr.setDate(tmr.getDate() + 1); + + // By default, credential is always the last element of pipeline factories + const factories = (blobServiceClient as any).pipeline.factories; + const sharedKeyCredential = factories[factories.length - 1]; + + const sas = generateAccountSASQueryParameters( + { + expiresOn: tmr, + ipRange: { start: "0.0.0.0", end: "255.255.255.255" }, + permissions: AccountSASPermissions.parse("rwdlacupf"), + protocol: SASProtocol.HttpsAndHttp, + resourceTypes: AccountSASResourceTypes.parse("sco").toString(), + services: AccountSASServices.parse("btqf").toString(), + startsOn: now, + version: "2019-12-12" + }, + sharedKeyCredential as StorageSharedKeyCredential + ).toString(); + + const sasClient = `${blobServiceClient.url}?${sas}`; + const serviceClientWithSAS = new BlobServiceClient( + sasClient, + newPipeline(new AnonymousCredential()) + ); + + // prepare + const containerName = recorder.getUniqueName("container1"); + const containerClient = blobServiceClient.getContainerClient(containerName); + await containerClient.create(); + + const key1 = recorder.getUniqueName("key"); + const key2 = recorder.getUniqueName("key2"); + + const blobName1 = recorder.getUniqueName("blobname1"); + const appendBlobClient1 = containerClient.getAppendBlobClient(blobName1); + const tags1: Tags = {}; + tags1[key1] = recorder.getUniqueName("val1"); + tags1[key2] = "default"; + await appendBlobClient1.create({ tags: tags1 }); + + const blobName2 = recorder.getUniqueName("blobname2"); + const appendBlobClient2 = containerClient.getAppendBlobClient(blobName2); + const tags2: Tags = {}; + tags2[key1] = recorder.getUniqueName("val2"); + tags2[key2] = "default"; + await appendBlobClient2.create({ tags: tags2 }); + + // Wait for indexing tags + await sleep(2); + + for await (const blob of serviceClientWithSAS.findBlobsByTags(`${key1}='${tags1[key1]}'`)) { + assert.deepStrictEqual(blob.containerName, containerName); + assert.deepStrictEqual(blob.name, blobName1); + assert.deepStrictEqual(blob.tagValue, tags1[key1]); + } + await containerClient.delete(); + }); }); From 026b7221949715974648b0bd33788ed9f7cc67f1 Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Mon, 15 Jun 2020 16:25:59 +0800 Subject: [PATCH 33/39] add permission f, and x for container --- ...rmission_f_t_for_blob_tags_should_work.js} | 60 +++---- ...n_x_for_blob_version_delete_should_work.js | 149 ++++++++++++++++++ ...should_work_for_container_for_blob_tags.js | 142 +++++++++++++++++ .../storage-blob/review/storage-blob.api.md | 3 + .../src/AccountSASSignatureValues.ts | 16 ++ .../src/BlobSASSignatureValues.ts | 12 +- .../src/ContainerSASPermissions.ts | 16 +- .../storage-blob/test/node/sas.spec.ts | 116 +++++++++++++- 8 files changed, 477 insertions(+), 37 deletions(-) rename sdk/storage/storage-blob/recordings/node/shared_access_signature_sas_generation_nodejs_only/{recording_account_sas_permission_f_for_filter_blob_tags_should_work.js => recording_account_sas_permission_f_t_for_blob_tags_should_work.js} (55%) create mode 100644 sdk/storage/storage-blob/recordings/node/shared_access_signature_sas_generation_nodejs_only/recording_account_sas_permission_x_for_blob_version_delete_should_work.js create mode 100644 sdk/storage/storage-blob/recordings/node/shared_access_signature_sas_generation_nodejs_only/recording_generateblobsasqueryparameters_should_work_for_container_for_blob_tags.js diff --git a/sdk/storage/storage-blob/recordings/node/shared_access_signature_sas_generation_nodejs_only/recording_account_sas_permission_f_for_filter_blob_tags_should_work.js b/sdk/storage/storage-blob/recordings/node/shared_access_signature_sas_generation_nodejs_only/recording_account_sas_permission_f_t_for_blob_tags_should_work.js similarity index 55% rename from sdk/storage/storage-blob/recordings/node/shared_access_signature_sas_generation_nodejs_only/recording_account_sas_permission_f_for_filter_blob_tags_should_work.js rename to sdk/storage/storage-blob/recordings/node/shared_access_signature_sas_generation_nodejs_only/recording_account_sas_permission_f_t_for_blob_tags_should_work.js index dd5ad1c2fbc0..75384332234a 100644 --- a/sdk/storage/storage-blob/recordings/node/shared_access_signature_sas_generation_nodejs_only/recording_account_sas_permission_f_for_filter_blob_tags_should_work.js +++ b/sdk/storage/storage-blob/recordings/node/shared_access_signature_sas_generation_nodejs_only/recording_account_sas_permission_f_t_for_blob_tags_should_work.js @@ -1,85 +1,85 @@ let nock = require('nock'); -module.exports.hash = "5a0449068d3fe94bec9946961f9b9d03"; +module.exports.hash = "651943585b7f765da30b063517242c8c"; -module.exports.testInfo = {"uniqueName":{"container1":"container1159218984686205498","key":"key159218984821401244","key2":"key2159218984821407907","blobname1":"blobname1159218984821507230","val1":"val1159218984821603506","blobname2":"blobname2159218984852304182","val2":"val2159218984852407041"},"newDate":{"now":"2020-06-15T02:57:26.859Z","tmr":"2020-06-15T02:57:26.860Z"}} +module.exports.testInfo = {"uniqueName":{"container1":"container1159220870164604944","key":"key159220870319306639","key2":"key2159220870319306858","blobname1":"blobname1159220870319304275","val1":"val1159220870319502764","blobname2":"blobname2159220870349903988","val2":"val2159220870350101043"},"newDate":{"now":"2020-06-15T08:11:41.643Z","tmr":"2020-06-15T08:11:41.644Z"}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container1159218984686205498') + .put('/container1159220870164604944') .query(true) .reply(201, "", [ 'Content-Length', '0', 'Last-Modified', - 'Mon, 15 Jun 2020 02:57:27 GMT', + 'Mon, 15 Jun 2020 08:11:42 GMT', 'ETag', - '"0x8D810D7D6C24E0D"', + '"0x8D81103BD1E4CBD"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'dea84e26-a01e-0089-4bc0-42f775000000', + '6eb6eed5-e01e-007c-66ec-42635f000000', 'x-ms-client-request-id', - '04963732-0d5c-4e8e-a14e-4a2eb1248a53', + '659c96af-b45b-4f27-944d-9ad55f6b5bbc', 'x-ms-version', '2019-12-12', 'Date', - 'Mon, 15 Jun 2020 02:57:27 GMT' + 'Mon, 15 Jun 2020 08:11:42 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container1159218984686205498/blobname1159218984821507230') + .put('/container1159220870164604944/blobname1159220870319304275') .reply(201, "", [ 'Content-Length', '0', 'Last-Modified', - 'Mon, 15 Jun 2020 02:57:28 GMT', + 'Mon, 15 Jun 2020 08:11:43 GMT', 'ETag', - '"0x8D810D7D6F42897"', + '"0x8D81103BD6BBE41"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'dea84ee2-a01e-0089-7ec0-42f775000000', + '6eb6eff7-e01e-007c-77ec-42635f000000', 'x-ms-client-request-id', - '562bfc6c-17aa-4d68-a4c1-672a775491f1', + '35cb2ed1-d7c1-4e36-a2ad-6340ba60229b', 'x-ms-version', '2019-12-12', 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-06-15T02:57:28.3263639Z', + '2020-06-15T08:11:43.3454145Z', 'Date', - 'Mon, 15 Jun 2020 02:57:27 GMT' + 'Mon, 15 Jun 2020 08:11:42 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container1159218984686205498/blobname2159218984852304182') + .put('/container1159220870164604944/blobname2159220870349903988') .reply(201, "", [ 'Content-Length', '0', 'Last-Modified', - 'Mon, 15 Jun 2020 02:57:28 GMT', + 'Mon, 15 Jun 2020 08:11:43 GMT', 'ETag', - '"0x8D810D7D721A968"', + '"0x8D81103BD993F1A"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'dea84f7e-a01e-0089-15c0-42f775000000', + '6eb6f0b6-e01e-007c-31ec-42635f000000', 'x-ms-client-request-id', - '61447852-d0ec-4982-8baa-1bd2177afe9b', + '11320ca7-afd2-47ef-810a-a8d1ce13471c', 'x-ms-version', '2019-12-12', 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-06-15T02:57:28.6245736Z', + '2020-06-15T08:11:43.6436250Z', 'Date', - 'Mon, 15 Jun 2020 02:57:28 GMT' + 'Mon, 15 Jun 2020 08:11:43 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) .get('/') .query(true) - .reply(200, "\nkey159218984821401244='val1159218984821603506'blobname1159218984821507230container1159218984686205498val1159218984821603506", [ + .reply(200, "\nkey159220870319306639='val1159220870319502764'blobname1159220870319304275container1159220870164604944val1159220870319502764", [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -89,17 +89,17 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'dea8554c-a01e-0089-34c0-42f775000000', + '6eb6f53a-e01e-007c-75ec-42635f000000', 'x-ms-version', '2019-12-12', 'x-ms-client-request-id', - 'f0d45b84-d5d5-47b6-baf6-b33fb6070ee6', + '0f0f2d4e-7dfa-41ac-8112-b950dd4a6de8', 'Date', - 'Mon, 15 Jun 2020 02:57:30 GMT' + 'Mon, 15 Jun 2020 08:11:45 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container1159218984686205498') + .delete('/container1159220870164604944') .query(true) .reply(202, "", [ 'Content-Length', @@ -107,11 +107,11 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'dea856d7-a01e-0089-2cc0-42f775000000', + '6eb6f658-e01e-007c-01ec-42635f000000', 'x-ms-client-request-id', - 'd4ddb98f-ec79-4868-bf09-73b1a7f2896c', + '3b7bb3be-7d0b-4c3e-8abf-08fee458d84c', 'x-ms-version', '2019-12-12', 'Date', - 'Mon, 15 Jun 2020 02:57:31 GMT' + 'Mon, 15 Jun 2020 08:11:46 GMT' ]); diff --git a/sdk/storage/storage-blob/recordings/node/shared_access_signature_sas_generation_nodejs_only/recording_account_sas_permission_x_for_blob_version_delete_should_work.js b/sdk/storage/storage-blob/recordings/node/shared_access_signature_sas_generation_nodejs_only/recording_account_sas_permission_x_for_blob_version_delete_should_work.js new file mode 100644 index 000000000000..4cd5a567d52e --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/shared_access_signature_sas_generation_nodejs_only/recording_account_sas_permission_x_for_blob_version_delete_should_work.js @@ -0,0 +1,149 @@ +let nock = require('nock'); + +module.exports.hash = "bac6944622b95f465db52c838ac6ab58"; + +module.exports.testInfo = {"uniqueName":{"container":"container159220831910304305","blob":"blob159220832047109000"},"newDate":{"now":"2020-06-15T08:05:19.100Z","tmr":"2020-06-15T08:05:19.101Z"}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159220831910304305') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Mon, 15 Jun 2020 08:05:20 GMT', + 'ETag', + '"0x8D81102D91B3357"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '7605104a-c01e-007b-44eb-420f3c000000', + 'x-ms-client-request-id', + 'f23c88f4-7f24-4c7a-833a-a54826ca1736', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Mon, 15 Jun 2020 08:05:19 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159220831910304305/blob159220832047109000', "Hello World") + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Mon, 15 Jun 2020 08:05:20 GMT', + 'ETag', + '"0x8D81102D94C02C5"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '76051134-c01e-007b-21eb-420f3c000000', + 'x-ms-client-request-id', + '861a8bd0-a4df-4615-897f-fa747d1d2d19', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-15T08:05:20.6169285Z', + 'Date', + 'Mon, 15 Jun 2020 08:05:19 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159220831910304305/blob159220832047109000') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Mon, 15 Jun 2020 08:05:20 GMT', + 'ETag', + '"0x8D81102D97983A3"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '76051205-c01e-007b-6feb-420f3c000000', + 'x-ms-client-request-id', + 'beb7b084-2993-45b2-80c3-bb591c293cf6', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-15T08:05:20.9161395Z', + 'Date', + 'Mon, 15 Jun 2020 08:05:20 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159220831910304305/blob159220832047109000') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '76051e96-c01e-007b-01eb-420f3c000000', + 'x-ms-client-request-id', + '8592b1d0-d910-4013-a2d5-03ac08d0b752', + 'x-ms-version', + '2019-12-12', + 'x-ms-delete-type-permanent', + 'false', + 'Date', + 'Mon, 15 Jun 2020 08:05:25 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container159220831910304305/blob159220832047109000') + .query(true) + .reply(404, "", [ + 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '76051f2e-c01e-007b-17eb-420f3c000000', + 'x-ms-client-request-id', + '01408f5b-25e6-4d1f-9726-8791b11dc44f', + 'x-ms-version', + '2019-12-12', + 'x-ms-error-code', + 'BlobNotFound', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-error-code,Content-Length,Date,Transfer-Encoding', + 'Access-Control-Allow-Origin', + '*', + 'Date', + 'Mon, 15 Jun 2020 08:05:25 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159220831910304305') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '76051ff4-c01e-007b-5aeb-420f3c000000', + 'x-ms-client-request-id', + '10c10553-b561-46b0-8c44-b429b221b085', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Mon, 15 Jun 2020 08:05:25 GMT' +]); diff --git a/sdk/storage/storage-blob/recordings/node/shared_access_signature_sas_generation_nodejs_only/recording_generateblobsasqueryparameters_should_work_for_container_for_blob_tags.js b/sdk/storage/storage-blob/recordings/node/shared_access_signature_sas_generation_nodejs_only/recording_generateblobsasqueryparameters_should_work_for_container_for_blob_tags.js new file mode 100644 index 000000000000..c19ef08704f0 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/shared_access_signature_sas_generation_nodejs_only/recording_generateblobsasqueryparameters_should_work_for_container_for_blob_tags.js @@ -0,0 +1,142 @@ +let nock = require('nock'); + +module.exports.hash = "41c4cc376067b33b41bfb216b122df61"; + +module.exports.testInfo = {"uniqueName":{"container":"container159220845863804244","blob":"blob159220845999306367"},"newDate":{"now":"2020-06-15T08:07:38.637Z","tmr":"2020-06-15T08:07:38.638Z"}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159220845863804244') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Mon, 15 Jun 2020 08:07:39 GMT', + 'ETag', + '"0x8D811032C44A734"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'bc394a50-e01e-000e-2bec-426410000000', + 'x-ms-client-request-id', + '8435a8d2-93ec-48e8-97ea-8328b2d77ebd', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Mon, 15 Jun 2020 08:07:39 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159220845863804244/blob159220845999306367') + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Mon, 15 Jun 2020 08:07:40 GMT', + 'ETag', + '"0x8D811032C7557B4"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'bc394b45-e01e-000e-1aec-426410000000', + 'x-ms-client-request-id', + '7b6c1663-0e54-4f7e-84ea-424b2d71eefc', + 'x-ms-version', + '2019-12-12', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-15T08:07:40.1386932Z', + 'Date', + 'Mon, 15 Jun 2020 08:07:39 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159220845863804244/blob159220845999306367', "tag1val1tag2val2") + .query(true) + .reply(204, "", [ + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'bc394c2c-e01e-000e-7cec-426410000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + '29bb852f-37d8-43a3-af11-8fc5a400b510', + 'Date', + 'Mon, 15 Jun 2020 08:07:39 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container159220845863804244/blob159220845999306367') + .query(true) + .reply(200, [], [ + 'Cache-Control', + 'cache-control-override', + 'Content-Length', + '1024', + 'Content-Type', + 'content-type-override', + 'Content-Encoding', + 'content-encoding-override', + 'Content-Language', + 'content-language-override', + 'Last-Modified', + 'Mon, 15 Jun 2020 08:07:40 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D811032C7557B4"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'bc394e09-e01e-000e-4cec-426410000000', + 'x-ms-client-request-id', + '123993e9-2cba-4b71-89ee-5eae76ae1ebe', + 'x-ms-version', + '2019-12-12', + 'x-ms-tag-count', + '2', + 'x-ms-version-id', + '2020-06-15T08:07:40.1386932Z', + 'x-ms-is-current-version', + 'true', + 'x-ms-creation-time', + 'Mon, 15 Jun 2020 08:07:40 GMT', + 'x-ms-lease-status', + 'unlocked', + 'x-ms-lease-state', + 'available', + 'x-ms-blob-type', + 'PageBlob', + 'x-ms-blob-sequence-number', + '0', + 'Content-Disposition', + 'content-disposition-override', + 'x-ms-server-encrypted', + 'true', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-tag-count,x-ms-version-id,x-ms-is-current-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,Cache-Control,Content-Disposition,Content-Encoding,Content-Language,x-ms-server-encrypted,Accept-Ranges,Content-Length,Date,Transfer-Encoding', + 'Access-Control-Allow-Origin', + '*', + 'Date', + 'Mon, 15 Jun 2020 08:07:40 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159220845863804244') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'bc394f08-e01e-000e-49ec-426410000000', + 'x-ms-client-request-id', + 'a86cabc8-41f7-4865-8b4a-8f7e15c18e11', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Mon, 15 Jun 2020 08:07:40 GMT' +]); diff --git a/sdk/storage/storage-blob/review/storage-blob.api.md b/sdk/storage/storage-blob/review/storage-blob.api.md index fe0da7c71172..3594b8ea9b76 100644 --- a/sdk/storage/storage-blob/review/storage-blob.api.md +++ b/sdk/storage/storage-blob/review/storage-blob.api.md @@ -49,10 +49,12 @@ export class AccountSASPermissions { create: boolean; delete: boolean; deleteVersion: boolean; + filter: boolean; list: boolean; static parse(permissions: string): AccountSASPermissions; process: boolean; read: boolean; + tag: boolean; toString(): string; update: boolean; write: boolean; @@ -1674,6 +1676,7 @@ export class ContainerSASPermissions { add: boolean; create: boolean; delete: boolean; + deleteVersion: boolean; list: boolean; static parse(permissions: string): ContainerSASPermissions; read: boolean; diff --git a/sdk/storage/storage-blob/src/AccountSASSignatureValues.ts b/sdk/storage/storage-blob/src/AccountSASSignatureValues.ts index 5c85d0e649b3..ea1192e6f26d 100644 --- a/sdk/storage/storage-blob/src/AccountSASSignatureValues.ts +++ b/sdk/storage/storage-blob/src/AccountSASSignatureValues.ts @@ -126,6 +126,22 @@ export function generateAccountSASQueryParameters( throw RangeError("'version' must be >= '2019-12-12' when provided 'x' permission."); } + if ( + accountSASSignatureValues.permissions && + accountSASSignatureValues.permissions.tag && + version < "2019-12-12" + ) { + throw RangeError("'version' must be >= '2019-12-12' when provided 't' permission."); + } + + if ( + accountSASSignatureValues.permissions && + accountSASSignatureValues.permissions.filter && + version < "2019-12-12" + ) { + throw RangeError("'version' must be >= '2019-12-12' when provided 'f' permission."); + } + const parsedPermissions = AccountSASPermissions.parse( accountSASSignatureValues.permissions.toString() ); diff --git a/sdk/storage/storage-blob/src/BlobSASSignatureValues.ts b/sdk/storage/storage-blob/src/BlobSASSignatureValues.ts index 2f2fe6c354dc..63af711e65eb 100644 --- a/sdk/storage/storage-blob/src/BlobSASSignatureValues.ts +++ b/sdk/storage/storage-blob/src/BlobSASSignatureValues.ts @@ -377,13 +377,17 @@ function generateBlobSASQueryParameters20150405( } if ( blobSASSignatureValues.permissions && - (blobSASSignatureValues.permissions as BlobSASPermissions).deleteVersion && + blobSASSignatureValues.permissions.deleteVersion && version < "2019-10-10" ) { throw RangeError("'version' must be >= '2019-12-12' when provided 'x' permission."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.tag) { + if ( + blobSASSignatureValues.permissions && + blobSASSignatureValues.permissions.tag && + version < "2019-12-12" + ) { throw RangeError("'version' must be >= '2019-12-12' when provided 't' permission."); } @@ -491,7 +495,7 @@ function generateBlobSASQueryParameters20181109( } if ( blobSASSignatureValues.permissions && - (blobSASSignatureValues.permissions as BlobSASPermissions).deleteVersion && + blobSASSignatureValues.permissions.deleteVersion && version < "2019-10-10" ) { throw RangeError("'version' must be >= '2019-12-12' when provided 'x' permission."); @@ -618,7 +622,7 @@ function generateBlobSASQueryParametersUDK20181109( } if ( blobSASSignatureValues.permissions && - (blobSASSignatureValues.permissions as BlobSASPermissions).deleteVersion && + blobSASSignatureValues.permissions.deleteVersion && version < "2019-10-10" ) { throw RangeError("'version' must be >= '2019-12-12' when provided 'x' permission."); diff --git a/sdk/storage/storage-blob/src/ContainerSASPermissions.ts b/sdk/storage/storage-blob/src/ContainerSASPermissions.ts index 299ba0df129c..be330893ab9f 100644 --- a/sdk/storage/storage-blob/src/ContainerSASPermissions.ts +++ b/sdk/storage/storage-blob/src/ContainerSASPermissions.ts @@ -47,6 +47,9 @@ export class ContainerSASPermissions { case "t": containerSASPermissions.tag = true; break; + case "x": + containerSASPermissions.deleteVersion = true; + break; default: throw new RangeError(`Invalid permission ${char}`); } @@ -95,6 +98,14 @@ export class ContainerSASPermissions { */ public delete: boolean = false; + /** + * Specifies Delete version access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + public deleteVersion: boolean = false; + /** * Specifies List access granted. * @@ -107,7 +118,7 @@ export class ContainerSASPermissions { * Specfies Tag access granted. * * @type {boolean} - * @memberof BlobSASPermissions + * @memberof ContainerSASPermissions */ public tag: boolean = false; @@ -138,6 +149,9 @@ export class ContainerSASPermissions { if (this.delete) { permissions.push("d"); } + if (this.deleteVersion) { + permissions.push("x"); + } if (this.list) { permissions.push("l"); } diff --git a/sdk/storage/storage-blob/test/node/sas.spec.ts b/sdk/storage/storage-blob/test/node/sas.spec.ts index 04a1669c50ec..ea2dbe156034 100644 --- a/sdk/storage/storage-blob/test/node/sas.spec.ts +++ b/sdk/storage/storage-blob/test/node/sas.spec.ts @@ -385,6 +385,65 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => { await containerClient.delete(); }); + it("generateBlobSASQueryParameters should work for container for blob tags", async () => { + const now = recorder.newDate("now"); + now.setMinutes(now.getMinutes() - 5); // Skip clock skew with server + + const tmr = recorder.newDate("tmr"); + tmr.setDate(tmr.getDate() + 1); + + // By default, credential is always the last element of pipeline factories + const factories = (blobServiceClient as any).pipeline.factories; + const sharedKeyCredential = factories[factories.length - 1]; + + const containerName = recorder.getUniqueName("container"); + const containerClient = blobServiceClient.getContainerClient(containerName); + await containerClient.create(); + + const blobName = recorder.getUniqueName("blob"); + const blobClient = containerClient.getPageBlobClient(blobName); + await blobClient.create(1024, { + blobHTTPHeaders: { + blobContentType: "content-type-original" + } + }); + + const blobSAS = generateBlobSASQueryParameters( + { + cacheControl: "cache-control-override", + containerName: blobClient.containerName, + contentDisposition: "content-disposition-override", + contentEncoding: "content-encoding-override", + contentLanguage: "content-language-override", + contentType: "content-type-override", + expiresOn: tmr, + ipRange: { start: "0.0.0.0", end: "255.255.255.255" }, + permissions: BlobSASPermissions.parse("racwdt"), + protocol: SASProtocol.HttpsAndHttp, + startsOn: now + }, + sharedKeyCredential as StorageSharedKeyCredential + ); + + const sasURL = `${blobClient.url}?${blobSAS}`; + const blobClientWithSAS = new PageBlobClient(sasURL, newPipeline(new AnonymousCredential())); + + const tags = { + tag1: "val1", + tag2: "val2" + }; + await blobClientWithSAS.setTags(tags); + + const properties = await blobClientWithSAS.getProperties(); + assert.equal(properties.cacheControl, "cache-control-override"); + assert.equal(properties.contentDisposition, "content-disposition-override"); + assert.equal(properties.contentEncoding, "content-encoding-override"); + assert.equal(properties.contentLanguage, "content-language-override"); + assert.equal(properties.contentType, "content-type-override"); + + await containerClient.delete(); + }); + it("generateBlobSASQueryParameters should work for blob snapshot", async () => { const now = recorder.newDate("now"); now.setMinutes(now.getMinutes() - 5); // Skip clock skew with server @@ -1076,7 +1135,7 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => { await containerClient.delete(); }); - it.only("account SAS permission f for filter blob tags should work", async function() { + it("account SAS permission f, t for blob tags should work", async function() { const now = recorder.newDate("now"); now.setMinutes(now.getMinutes() - 5); // Skip clock skew with server const tmr = recorder.newDate("tmr"); @@ -1090,7 +1149,7 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => { { expiresOn: tmr, ipRange: { start: "0.0.0.0", end: "255.255.255.255" }, - permissions: AccountSASPermissions.parse("rwdlacupf"), + permissions: AccountSASPermissions.parse("rwdlacupft"), protocol: SASProtocol.HttpsAndHttp, resourceTypes: AccountSASResourceTypes.parse("sco").toString(), services: AccountSASServices.parse("btqf").toString(), @@ -1138,4 +1197,57 @@ describe("Shared Access Signature (SAS) generation Node.js only", () => { } await containerClient.delete(); }); + + it("account SAS permission x for blob version delete should work", async function() { + if (isBlobVersioningDisabled()) { + this.skip(); + } + + const now = recorder.newDate("now"); + now.setMinutes(now.getMinutes() - 5); // Skip clock skew with server + const tmr = recorder.newDate("tmr"); + tmr.setDate(tmr.getDate() + 1); + + // By default, credential is always the last element of pipeline factories + const factories = (blobServiceClient as any).pipeline.factories; + const sharedKeyCredential = factories[factories.length - 1]; + + const sas = generateAccountSASQueryParameters( + { + expiresOn: tmr, + ipRange: { start: "0.0.0.0", end: "255.255.255.255" }, + permissions: AccountSASPermissions.parse("rwdlacupx"), + protocol: SASProtocol.HttpsAndHttp, + resourceTypes: AccountSASResourceTypes.parse("sco").toString(), + services: AccountSASServices.parse("btqf").toString(), + startsOn: now, + version: "2019-12-12" + }, + sharedKeyCredential as StorageSharedKeyCredential + ).toString(); + + const sasClient = `${blobServiceClient.url}?${sas}`; + const serviceClientWithSAS = new BlobServiceClient( + sasClient, + newPipeline(new AnonymousCredential()) + ); + + // create version + const containerName = recorder.getUniqueName("container"); + const containerClient = serviceClientWithSAS.getContainerClient(containerName); + await containerClient.create(); + const content = "Hello World"; + const blobName = recorder.getUniqueName("blob"); + const blobClient = containerClient.getBlobClient(blobName); + const blockBlobClient = blobClient.getBlockBlobClient(); + const uploadRes = await blockBlobClient.upload(content, content.length); + await blockBlobClient.upload("", 0); + + const blobVersionClient = blobClient.withVersion(uploadRes.versionId!); + console.log(blobVersionClient.url); + await blobVersionClient.delete(); + assert.ok(!(await blobVersionClient.exists())); + + await containerClient.delete(); + }); }); From c7af1f58a74bf005a6f2b49bb309e19a5b065174 Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Mon, 15 Jun 2020 19:49:22 +0800 Subject: [PATCH 34/39] wip --- ...cording_find_blob_by_tags_should_work.json | 222 ++++++++++++++++++ 1 file changed, 222 insertions(+) create mode 100644 sdk/storage/storage-blob/recordings/browsers/blobserviceclient/recording_find_blob_by_tags_should_work.json diff --git a/sdk/storage/storage-blob/recordings/browsers/blobserviceclient/recording_find_blob_by_tags_should_work.json b/sdk/storage/storage-blob/recordings/browsers/blobserviceclient/recording_find_blob_by_tags_should_work.json new file mode 100644 index 000000000000..c4a694952009 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/browsers/blobserviceclient/recording_find_blob_by_tags_should_work.json @@ -0,0 +1,222 @@ +{ + "recordings": [ + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container1159222164211100285", + "query": { + "restype": "container" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Mon, 15 Jun 2020 11:47:23 GMT", + "etag": "\"0x8D81121DE669E3C\"", + "last-modified": "Mon, 15 Jun 2020 11:47:23 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "b43959d6-85ca-4e34-994d-6ee4a8c2b936", + "x-ms-request-id": "e65d0b7a-001e-0080-180a-43b2a6000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container1159222164211100285/blobname1159222164371100712", + "query": {}, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Mon, 15 Jun 2020 11:47:24 GMT", + "etag": "\"0x8D81121DEC7E018\"", + "last-modified": "Mon, 15 Jun 2020 11:47:24 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "82e0cdb7-fcc2-45ab-93ae-9a4143f0aaef", + "x-ms-request-id": "e65d0cba-001e-0080-4e0a-43b2a6000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-06-15T11:47:24.2169131Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container1159222164211100285/blobname2159222164434005497", + "query": {}, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Mon, 15 Jun 2020 11:47:24 GMT", + "etag": "\"0x8D81121DF21A950\"", + "last-modified": "Mon, 15 Jun 2020 11:47:24 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "a7c528de-a9ae-4a9b-9ac5-0855a6536e30", + "x-ms-request-id": "e65d0dfd-001e-0080-6a0a-43b2a6000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-06-15T11:47:24.8043344Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container1159222164211100285/blobname3159222164492408661", + "query": {}, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Mon, 15 Jun 2020 11:47:25 GMT", + "etag": "\"0x8D81121DF775319\"", + "last-modified": "Mon, 15 Jun 2020 11:47:25 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "23478fb5-96c0-48fb-8c85-575b5c0b297e", + "x-ms-request-id": "e65d0f10-001e-0080-670a-43b2a6000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-06-15T11:47:25.3657369Z" + } + }, + { + "method": "GET", + "url": "https://fakestorageaccount.blob.core.windows.net/", + "query": { + "where": "key159222164371104383='val1159222164371908605'", + "comp": "blobs" + }, + "requestBody": null, + "status": 200, + "response": "\nkey159222164371104383='val1159222164371908605'blobname1159222164371100712container1159222164211100285val1159222164371908605", + "responseHeaders": { + "content-type": "application/xml", + "date": "Mon, 15 Jun 2020 11:47:31 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "transfer-encoding": "chunked", + "x-ms-client-request-id": "dd6eece2-d012-489b-b0e5-afc90d74df6a", + "x-ms-request-id": "e65d14ad-001e-0080-510a-43b2a6000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "GET", + "url": "https://fakestorageaccount.blob.core.windows.net/", + "query": { + "where": "key159222164371104383='val2159222164435409375'", + "comp": "blobs" + }, + "requestBody": null, + "status": 200, + "response": "\nkey159222164371104383='val2159222164435409375'blobname2159222164434005497container1159222164211100285val2159222164435409375", + "responseHeaders": { + "content-type": "application/xml", + "date": "Mon, 15 Jun 2020 11:47:31 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "transfer-encoding": "chunked", + "x-ms-client-request-id": "2bebdd32-24aa-4b26-aa67-3f9d699e1ed0", + "x-ms-request-id": "e65d1e3a-001e-0080-210a-43b2a6000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "GET", + "url": "https://fakestorageaccount.blob.core.windows.net/", + "query": { + "where": "key2159222164371109846='default'", + "maxresults": "1", + "comp": "blobs" + }, + "requestBody": null, + "status": 200, + "response": "\nkey2159222164371109846='default'1blobname1159222164371100712container1159222164211100285default2!308!MDAwMDQ1IWNvbnRhaW5lcjExNTkyMjIxNjQyMTExMDAyODUBMDFENjQzMEFCQkVGRTFEQSEwMDAwMjchYmxvYm5hbWUyMTU5MjIyMTY0NDM0MDA1NDk3ITAwMDAxNSEIAAAABwAAAGRlZmF1bHQhMDAwMDAxITAhMDAwMDI4ITk5OTktMTItMzFUMjM6NTk6NTkuOTk5OTk5OVohMDAwMDM2ITQ0ZjI1ZTUyLTEyMjctNDBmMy1hM2FhLWYxOTQyZTc4ZTc4NyEwMDAwMjIha2V5MjE1OTIyMjE2NDM3MTEwOTg0NiE-", + "responseHeaders": { + "content-type": "application/xml", + "date": "Mon, 15 Jun 2020 11:47:32 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "transfer-encoding": "chunked", + "x-ms-client-request-id": "98fedaa8-aa8e-4ef7-9525-fb8e2ecd15d3", + "x-ms-request-id": "e65d1fc6-001e-0080-200a-43b2a6000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "GET", + "url": "https://fakestorageaccount.blob.core.windows.net/", + "query": { + "where": "key2159222164371109846='default'", + "marker": "2!308!MDAwMDQ1IWNvbnRhaW5lcjExNTkyMjIxNjQyMTExMDAyODUBMDFENjQzMEFCQkVGRTFEQSEwMDAwMjchYmxvYm5hbWUyMTU5MjIyMTY0NDM0MDA1NDk3ITAwMDAxNSEIAAAABwAAAGRlZmF1bHQhMDAwMDAxITAhMDAwMDI4ITk5OTktMTItMzFUMjM6NTk6NTkuOTk5OTk5OVohMDAwMDM2ITQ0ZjI1ZTUyLTEyMjctNDBmMy1hM2FhLWYxOTQyZTc4ZTc4NyEwMDAwMjIha2V5MjE1OTIyMjE2NDM3MTEwOTg0NiE-", + "maxresults": "1", + "comp": "blobs" + }, + "requestBody": null, + "status": 200, + "response": "\n2!308!MDAwMDQ1IWNvbnRhaW5lcjExNTkyMjIxNjQyMTExMDAyODUBMDFENjQzMEFCQkVGRTFEQSEwMDAwMjchYmxvYm5hbWUyMTU5MjIyMTY0NDM0MDA1NDk3ITAwMDAxNSEIAAAABwAAAGRlZmF1bHQhMDAwMDAxITAhMDAwMDI4ITk5OTktMTItMzFUMjM6NTk6NTkuOTk5OTk5OVohMDAwMDM2ITQ0ZjI1ZTUyLTEyMjctNDBmMy1hM2FhLWYxOTQyZTc4ZTc4NyEwMDAwMjIha2V5MjE1OTIyMjE2NDM3MTEwOTg0NiE-key2159222164371109846='default'1blobname2159222164434005497container1159222164211100285default2!308!MDAwMDQ1IWNvbnRhaW5lcjExNTkyMjIxNjQyMTExMDAyODUBMDFENjQzMEFCQkVGRTFEQSEwMDAwMjchYmxvYm5hbWUzMTU5MjIyMTY0NDkyNDA4NjYxITAwMDAxNSEIAAAABwAAAGRlZmF1bHQhMDAwMDAxITAhMDAwMDI4ITk5OTktMTItMzFUMjM6NTk6NTkuOTk5OTk5OVohMDAwMDM2IWY5ZTEzYWFjLWEyODQtNDc0Ny1hZTY3LTYyNmE5ZjNlZmY1ZSEwMDAwMjIha2V5MjE1OTIyMjE2NDM3MTEwOTg0NiE-", + "responseHeaders": { + "content-type": "application/xml", + "date": "Mon, 15 Jun 2020 11:47:32 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "transfer-encoding": "chunked", + "x-ms-client-request-id": "fff6cb0c-dc6c-406e-bc21-2145ea35b9e2", + "x-ms-request-id": "e65d2164-001e-0080-370a-43b2a6000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "GET", + "url": "https://fakestorageaccount.blob.core.windows.net/", + "query": { + "where": "key2159222164371109846='default'", + "marker": "2!308!MDAwMDQ1IWNvbnRhaW5lcjExNTkyMjIxNjQyMTExMDAyODUBMDFENjQzMEFCQkVGRTFEQSEwMDAwMjchYmxvYm5hbWUzMTU5MjIyMTY0NDkyNDA4NjYxITAwMDAxNSEIAAAABwAAAGRlZmF1bHQhMDAwMDAxITAhMDAwMDI4ITk5OTktMTItMzFUMjM6NTk6NTkuOTk5OTk5OVohMDAwMDM2IWY5ZTEzYWFjLWEyODQtNDc0Ny1hZTY3LTYyNmE5ZjNlZmY1ZSEwMDAwMjIha2V5MjE1OTIyMjE2NDM3MTEwOTg0NiE-", + "maxresults": "1", + "comp": "blobs" + }, + "requestBody": null, + "status": 200, + "response": "\n2!308!MDAwMDQ1IWNvbnRhaW5lcjExNTkyMjIxNjQyMTExMDAyODUBMDFENjQzMEFCQkVGRTFEQSEwMDAwMjchYmxvYm5hbWUzMTU5MjIyMTY0NDkyNDA4NjYxITAwMDAxNSEIAAAABwAAAGRlZmF1bHQhMDAwMDAxITAhMDAwMDI4ITk5OTktMTItMzFUMjM6NTk6NTkuOTk5OTk5OVohMDAwMDM2IWY5ZTEzYWFjLWEyODQtNDc0Ny1hZTY3LTYyNmE5ZjNlZmY1ZSEwMDAwMjIha2V5MjE1OTIyMjE2NDM3MTEwOTg0NiE-key2159222164371109846='default'1blobname3159222164492408661container1159222164211100285default", + "responseHeaders": { + "content-type": "application/xml", + "date": "Mon, 15 Jun 2020 11:47:33 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "transfer-encoding": "chunked", + "x-ms-client-request-id": "06f08072-4330-41ed-8acb-dc1422387787", + "x-ms-request-id": "e65d22e4-001e-0080-2e0a-43b2a6000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container1159222164211100285", + "query": { + "restype": "container" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Mon, 15 Jun 2020 11:47:33 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "73d34e1d-55eb-4aa0-9466-5855a5172dc7", + "x-ms-request-id": "e65d244e-001e-0080-0e0a-43b2a6000000", + "x-ms-version": "2019-12-12" + } + } + ], + "uniqueTestInfo": { + "uniqueName": { + "container1": "container1159222164211100285", + "key": "key159222164371104383", + "key2": "key2159222164371109846", + "blobname1": "blobname1159222164371100712", + "val1": "val1159222164371908605", + "blobname2": "blobname2159222164434005497", + "val2": "val2159222164435409375", + "blobname3": "blobname3159222164492408661", + "val3": "val3159222164492408229" + }, + "newDate": {} + }, + "hash": "093076e0be534a8e11d2378f11f220cd" +} \ No newline at end of file From 27f8839e4aeeb40da9563ce66f453d2d9c1106b8 Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Mon, 15 Jun 2020 20:08:55 +0800 Subject: [PATCH 35/39] me --- sdk/storage/storage-blob/test/node/blobclient.spec.ts | 10 +++++++--- .../storage-blob/test/node/highlevel.node.spec.ts | 2 ++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/sdk/storage/storage-blob/test/node/blobclient.spec.ts b/sdk/storage/storage-blob/test/node/blobclient.spec.ts index 929d1dd52e50..c776808b17df 100644 --- a/sdk/storage/storage-blob/test/node/blobclient.spec.ts +++ b/sdk/storage/storage-blob/test/node/blobclient.spec.ts @@ -23,7 +23,7 @@ import { getBSU, getConnectionStringFromEnvironment, recorderEnvSetup, - isBlobVersioningDisabled, + isBlobVersioningDisabled } from "../utils"; import { assertClientUsesTokenCredential } from "../utils/assert"; import { readStreamToLocalFileWithLogs } from "../utils/testutils.node"; @@ -42,7 +42,7 @@ describe("BlobClient Node.js only", () => { let recorder: any; let blobServiceClient: BlobServiceClient; - beforeEach(async function () { + beforeEach(async function() { recorder = record(this, recorderEnvSetup); blobServiceClient = getBSU(); containerName = recorder.getUniqueName("container"); @@ -54,7 +54,7 @@ describe("BlobClient Node.js only", () => { await blockBlobClient.upload(content, content.length); }); - afterEach(async function () { + afterEach(async function() { await containerClient.delete(); recorder.stop(); }); @@ -510,8 +510,12 @@ describe("BlobClient Node.js only", () => { // TODO: Avor reader should abort reading from internal stream assert.deepStrictEqual(error.name, "AbortError"); unlinkSync(downloadedFile); + unlinkSync(tempFileLarge); return; } + + unlinkSync(downloadedFile); + unlinkSync(tempFileLarge); assert.fail(); }); diff --git a/sdk/storage/storage-blob/test/node/highlevel.node.spec.ts b/sdk/storage/storage-blob/test/node/highlevel.node.spec.ts index e300af2290c0..829a1b507688 100644 --- a/sdk/storage/storage-blob/test/node/highlevel.node.spec.ts +++ b/sdk/storage/storage-blob/test/node/highlevel.node.spec.ts @@ -85,6 +85,8 @@ describe("Highlevel", () => { } catch (err) { assert.equal(err.name, "AbortError"); } + + fs.unlinkSync(tempFile); }).timeout(timeoutForLargeFileUploadingTest); it("uploadFile should success when blob >= BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES", async () => { From 78cbb6c1fe5226cd47c07018828f5ab47059b5bd Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Mon, 15 Jun 2020 20:23:41 +0800 Subject: [PATCH 36/39] me --- sdk/storage/storage-blob/src/AccountSASSignatureValues.ts | 2 +- sdk/storage/storage-blob/src/BlobSASSignatureValues.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk/storage/storage-blob/src/AccountSASSignatureValues.ts b/sdk/storage/storage-blob/src/AccountSASSignatureValues.ts index ea1192e6f26d..1ae727989b8c 100644 --- a/sdk/storage/storage-blob/src/AccountSASSignatureValues.ts +++ b/sdk/storage/storage-blob/src/AccountSASSignatureValues.ts @@ -123,7 +123,7 @@ export function generateAccountSASQueryParameters( accountSASSignatureValues.permissions.deleteVersion && version < "2019-10-10" ) { - throw RangeError("'version' must be >= '2019-12-12' when provided 'x' permission."); + throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission."); } if ( diff --git a/sdk/storage/storage-blob/src/BlobSASSignatureValues.ts b/sdk/storage/storage-blob/src/BlobSASSignatureValues.ts index 63af711e65eb..9e83e52538f9 100644 --- a/sdk/storage/storage-blob/src/BlobSASSignatureValues.ts +++ b/sdk/storage/storage-blob/src/BlobSASSignatureValues.ts @@ -380,7 +380,7 @@ function generateBlobSASQueryParameters20150405( blobSASSignatureValues.permissions.deleteVersion && version < "2019-10-10" ) { - throw RangeError("'version' must be >= '2019-12-12' when provided 'x' permission."); + throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission."); } if ( @@ -498,7 +498,7 @@ function generateBlobSASQueryParameters20181109( blobSASSignatureValues.permissions.deleteVersion && version < "2019-10-10" ) { - throw RangeError("'version' must be >= '2019-12-12' when provided 'x' permission."); + throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission."); } if ( @@ -625,7 +625,7 @@ function generateBlobSASQueryParametersUDK20181109( blobSASSignatureValues.permissions.deleteVersion && version < "2019-10-10" ) { - throw RangeError("'version' must be >= '2019-12-12' when provided 'x' permission."); + throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission."); } if ( From a088c4a764047af48fe3c1ec1da8b0095a8815bb Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Tue, 16 Jun 2020 10:45:36 +0800 Subject: [PATCH 37/39] PR comments --- ...block_blob_blob_should_work_with_tags.json | 139 ----------------- ...e_block_blob_blob_should_work_with_tags.js | 142 ------------------ ...recording_find_blob_by_tags_should_work.js | 116 +++++++------- .../storage-blob/src/utils/constants.ts | 2 +- .../storage-blob/test/blobclient.spec.ts | 2 +- .../test/blobserviceclient.spec.ts | 8 +- 6 files changed, 67 insertions(+), 342 deletions(-) delete mode 100644 sdk/storage/storage-blob/recordings/browsers/blobclient/recording_create_block_blob_blob_should_work_with_tags.json delete mode 100644 sdk/storage/storage-blob/recordings/node/blobclient/recording_create_block_blob_blob_should_work_with_tags.js diff --git a/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_create_block_blob_blob_should_work_with_tags.json b/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_create_block_blob_blob_should_work_with_tags.json deleted file mode 100644 index 8a9bd6e5c666..000000000000 --- a/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_create_block_blob_blob_should_work_with_tags.json +++ /dev/null @@ -1,139 +0,0 @@ -{ - "recordings": [ - { - "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container159215214532602071", - "query": { - "sip": "0.0.0.0-255.255.255.255", - "restype": "container" - }, - "requestBody": null, - "status": 201, - "response": "", - "responseHeaders": { - "content-length": "0", - "date": "Sun, 14 Jun 2020 16:29:04 GMT", - "etag": "\"0x8D810800E3A9241\"", - "last-modified": "Sun, 14 Jun 2020 16:29:05 GMT", - "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "6bc32346-b174-41cd-91ae-e1a122a927d7", - "x-ms-request-id": "1ae6a406-c01e-0009-0868-420873000000", - "x-ms-version": "2019-12-12" - } - }, - { - "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container159215214532602071/blob159215214534908371", - "query": { - "sip": "0.0.0.0-255.255.255.255" - }, - "requestBody": "Hello World", - "status": 201, - "response": "", - "responseHeaders": { - "content-length": "0", - "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", - "date": "Sun, 14 Jun 2020 16:29:04 GMT", - "etag": "\"0x8D810800E3E1F06\"", - "last-modified": "Sun, 14 Jun 2020 16:29:05 GMT", - "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "60793102-2f4b-48b8-bdb3-8db941da8561", - "x-ms-content-crc64": "YeJLfssylmU=", - "x-ms-request-id": "1ae6a416-c01e-0009-1768-420873000000", - "x-ms-request-server-encrypted": "true", - "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-06-14T16:29:05.3735686Z" - } - }, - { - "method": "DELETE", - "url": "https://fakestorageaccount.blob.core.windows.net/container159215214532602071/blob159215214534908371", - "query": { - "sip": "0.0.0.0-255.255.255.255" - }, - "requestBody": null, - "status": 202, - "response": "", - "responseHeaders": { - "content-length": "0", - "date": "Sun, 14 Jun 2020 16:29:04 GMT", - "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "98a4d0cb-9bd4-4e8c-b75c-0b1dc17f2ff6", - "x-ms-delete-type-permanent": "false", - "x-ms-request-id": "1ae6a424-c01e-0009-2468-420873000000", - "x-ms-version": "2019-12-12" - } - }, - { - "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container159215214532602071/blob159215214534908371", - "query": { - "sip": "0.0.0.0-255.255.255.255" - }, - "requestBody": "hello", - "status": 201, - "response": "", - "responseHeaders": { - "content-length": "0", - "content-md5": "XUFAKrxLKna5cZ2REBfFkg==", - "date": "Sun, 14 Jun 2020 16:29:04 GMT", - "etag": "\"0x8D810800E4C797D\"", - "last-modified": "Sun, 14 Jun 2020 16:29:05 GMT", - "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "73132f4a-78c6-4f67-b880-1d21c4d4d46a", - "x-ms-content-crc64": "V0JSBnCFdzM=", - "x-ms-request-id": "1ae6a441-c01e-0009-4068-420873000000", - "x-ms-request-server-encrypted": "true", - "x-ms-version": "2019-12-12", - "x-ms-version-id": "2020-06-14T16:29:05.4686356Z" - } - }, - { - "method": "GET", - "url": "https://fakestorageaccount.blob.core.windows.net/container159215214532602071/blob159215214534908371", - "query": { - "sip": "0.0.0.0-255.255.255.255", - "comp": "tags" - }, - "requestBody": null, - "status": 200, - "response": "\ntag1val1tag2val2", - "responseHeaders": { - "content-length": "162", - "content-type": "application/xml", - "date": "Sun, 14 Jun 2020 16:29:04 GMT", - "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "1b9eaf22-a2b1-4bee-8f58-dc05b0ebb274", - "x-ms-request-id": "1ae6a452-c01e-0009-5168-420873000000", - "x-ms-version": "2019-12-12" - } - }, - { - "method": "DELETE", - "url": "https://fakestorageaccount.blob.core.windows.net/container159215214532602071", - "query": { - "sip": "0.0.0.0-255.255.255.255", - "restype": "container" - }, - "requestBody": null, - "status": 202, - "response": "", - "responseHeaders": { - "content-length": "0", - "date": "Sun, 14 Jun 2020 16:29:04 GMT", - "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "49d37774-9788-4d09-bdf5-2338a2d1301d", - "x-ms-request-id": "1ae6a462-c01e-0009-5f68-420873000000", - "x-ms-version": "2019-12-12" - } - } - ], - "uniqueTestInfo": { - "uniqueName": { - "container": "container159215214532602071", - "blob": "blob159215214534908371" - }, - "newDate": {} - }, - "hash": "9ae7d47fe8b3282fa0b8ddcfb760c932" -} \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/recording_create_block_blob_blob_should_work_with_tags.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_create_block_blob_blob_should_work_with_tags.js deleted file mode 100644 index 961734e5d63a..000000000000 --- a/sdk/storage/storage-blob/recordings/node/blobclient/recording_create_block_blob_blob_should_work_with_tags.js +++ /dev/null @@ -1,142 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "825f08fa77af8909631a204a03afccab"; - -module.exports.testInfo = {"uniqueName":{"container":"container159210827100608603","blob":"blob159210827103103981"},"newDate":{}} - -nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container159210827100608603') - .query(true) - .reply(201, "", [ - 'Content-Length', - '0', - 'Last-Modified', - 'Sun, 14 Jun 2020 04:17:51 GMT', - 'ETag', - '"0x8D81019E7177B5A"', - 'Server', - 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', - 'x-ms-request-id', - 'c1308cd0-201e-003e-5502-42dadf000000', - 'x-ms-client-request-id', - 'c093c743-0cc4-407d-aa1d-03a1b321f38d', - 'x-ms-version', - '2019-12-12', - 'Date', - 'Sun, 14 Jun 2020 04:17:50 GMT' -]); - -nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container159210827100608603/blob159210827103103981', "Hello World") - .reply(201, "", [ - 'Content-Length', - '0', - 'Content-MD5', - 'sQqNsWTgdUEFt6mb5y4/5Q==', - 'Last-Modified', - 'Sun, 14 Jun 2020 04:17:51 GMT', - 'ETag', - '"0x8D81019E71A3186"', - 'Server', - 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', - 'x-ms-request-id', - 'c1308cd8-201e-003e-5c02-42dadf000000', - 'x-ms-client-request-id', - '4f0c0647-76d8-4f64-ad03-089461427fa7', - 'x-ms-version', - '2019-12-12', - 'x-ms-content-crc64', - 'YeJLfssylmU=', - 'x-ms-request-server-encrypted', - 'true', - 'x-ms-version-id', - '2020-06-14T04:17:51.0405510Z', - 'Date', - 'Sun, 14 Jun 2020 04:17:50 GMT' -]); - -nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container159210827100608603/blob159210827103103981') - .reply(202, "", [ - 'Content-Length', - '0', - 'Server', - 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', - 'x-ms-request-id', - 'c1308cdf-201e-003e-6302-42dadf000000', - 'x-ms-client-request-id', - 'b7399fb1-0adb-454f-bdb0-78c1a8594db0', - 'x-ms-version', - '2019-12-12', - 'x-ms-delete-type-permanent', - 'false', - 'Date', - 'Sun, 14 Jun 2020 04:17:50 GMT' -]); - -nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container159210827100608603/blob159210827103103981', "hello") - .reply(201, "", [ - 'Content-Length', - '0', - 'Content-MD5', - 'XUFAKrxLKna5cZ2REBfFkg==', - 'Last-Modified', - 'Sun, 14 Jun 2020 04:17:51 GMT', - 'ETag', - '"0x8D81019E7420C04"', - 'Server', - 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', - 'x-ms-request-id', - 'c1308d29-201e-003e-2702-42dadf000000', - 'x-ms-client-request-id', - 'f3eb1c51-cc37-443f-9f89-8689f0363c76', - 'x-ms-version', - '2019-12-12', - 'x-ms-content-crc64', - 'V0JSBnCFdzM=', - 'x-ms-request-server-encrypted', - 'true', - 'x-ms-version-id', - '2020-06-14T04:17:51.3027355Z', - 'Date', - 'Sun, 14 Jun 2020 04:17:50 GMT' -]); - -nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .get('/container159210827100608603/blob159210827103103981') - .query(true) - .reply(200, "\ntag1val1tag2val2", [ - 'Content-Length', - '162', - 'Content-Type', - 'application/xml', - 'Server', - 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', - 'x-ms-request-id', - 'c1308d30-201e-003e-2c02-42dadf000000', - 'x-ms-version', - '2019-12-12', - 'x-ms-client-request-id', - '7cf11f6c-f39b-4efc-b6df-00a927002565', - 'Date', - 'Sun, 14 Jun 2020 04:17:50 GMT' -]); - -nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container159210827100608603') - .query(true) - .reply(202, "", [ - 'Content-Length', - '0', - 'Server', - 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', - 'x-ms-request-id', - 'c1308d36-201e-003e-3102-42dadf000000', - 'x-ms-client-request-id', - '3e02b1cf-907c-41cd-936b-f6e659830a78', - 'x-ms-version', - '2019-12-12', - 'Date', - 'Sun, 14 Jun 2020 04:17:50 GMT' -]); diff --git a/sdk/storage/storage-blob/recordings/node/blobserviceclient/recording_find_blob_by_tags_should_work.js b/sdk/storage/storage-blob/recordings/node/blobserviceclient/recording_find_blob_by_tags_should_work.js index c48e36a430a4..63f31fb594a3 100644 --- a/sdk/storage/storage-blob/recordings/node/blobserviceclient/recording_find_blob_by_tags_should_work.js +++ b/sdk/storage/storage-blob/recordings/node/blobserviceclient/recording_find_blob_by_tags_should_work.js @@ -1,208 +1,218 @@ let nock = require('nock'); -module.exports.hash = "dd7a91564a0c33d834140fadb85525f2"; +module.exports.hash = "4b85ed9ce9fb0d046c9216243246450c"; -module.exports.testInfo = {"uniqueName":{"container1":"container1159210827477909112","key":"key159210827479503303","key2":"key2159210827479506597","blobname1":"blobname1159210827479506992","val1":"val1159210827479501088","blobname2":"blobname2159210827481107997","val2":"val2159210827481104876","blobname3":"blobname3159210827482604531","val3":"val3159210827482605322"},"newDate":{}} +module.exports.testInfo = {"uniqueName":{"container1":"container1159227439943806411","key":"key159227440063502634","key2":"key2159227440063508429","blobname1":"blobname1159227440063507702","val1":"val1159227440063702419","blobname2":"blobname2159227440094109162","val2":"val2159227440094309109","blobname3":"blobname3159227440123509267","val3":"val3159227440123706015"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container1159210827477909112') + .put('/container1159227439943806411') .query(true) .reply(201, "", [ 'Content-Length', '0', 'Last-Modified', - 'Sun, 14 Jun 2020 04:17:54 GMT', + 'Tue, 16 Jun 2020 02:26:40 GMT', 'ETag', - '"0x8D81019E95725BA"', + '"0x8D8119CB3DA7C94"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'c130923e-201e-003e-4e02-42dadf000000', + 'e1be66e0-e01e-0043-7185-43abfc000000', 'x-ms-client-request-id', - 'e5ff72d2-1d79-4c6c-b6c0-87cb28ce5bea', + '2e9f1da6-336c-4cd8-a041-b086f7e5f7b8', 'x-ms-version', '2019-12-12', 'Date', - 'Sun, 14 Jun 2020 04:17:53 GMT' + 'Tue, 16 Jun 2020 02:26:40 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container1159210827477909112/blobname1159210827479506992') + .put('/container1159227439943806411/blobname1159227440063507702') .reply(201, "", [ 'Content-Length', '0', 'Last-Modified', - 'Sun, 14 Jun 2020 04:17:54 GMT', + 'Tue, 16 Jun 2020 02:26:40 GMT', 'ETag', - '"0x8D81019E959B3F5"', + '"0x8D8119CB40BD6AC"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'c1309247-201e-003e-5602-42dadf000000', + 'e1be67a2-e01e-0043-2a85-43abfc000000', 'x-ms-client-request-id', - '3ca4c5db-94d8-4fb0-9ed1-53fa8ea167f6', + 'bdfdd0b6-57bd-4f62-8f69-603ea90e9c21', 'x-ms-version', '2019-12-12', 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-06-14T04:17:54.8122101Z', + '2020-06-16T02:26:40.6170284Z', 'Date', - 'Sun, 14 Jun 2020 04:17:53 GMT' + 'Tue, 16 Jun 2020 02:26:40 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container1159210827477909112/blobname2159210827481107997') + .put('/container1159227439943806411/blobname2159227440094109162') .reply(201, "", [ 'Content-Length', '0', 'Last-Modified', - 'Sun, 14 Jun 2020 04:17:54 GMT', + 'Tue, 16 Jun 2020 02:26:40 GMT', 'ETag', - '"0x8D81019E95BFE4F"', + '"0x8D8119CB439308B"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'c130924e-201e-003e-5d02-42dadf000000', + 'e1be683e-e01e-0043-4485-43abfc000000', 'x-ms-client-request-id', - '0b93a9e0-44cd-4b84-9625-a7f85e88504c', + '0aa29bb0-96fa-4eaf-a91e-7f1dd8984a51', 'x-ms-version', '2019-12-12', 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-06-14T04:17:54.8272207Z', + '2020-06-16T02:26:40.9142411Z', 'Date', - 'Sun, 14 Jun 2020 04:17:53 GMT' + 'Tue, 16 Jun 2020 02:26:40 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container1159210827477909112/blobname3159210827482604531') + .put('/container1159227439943806411/blobname3159227440123509267') .reply(201, "", [ 'Content-Length', '0', 'Last-Modified', - 'Sun, 14 Jun 2020 04:17:54 GMT', + 'Tue, 16 Jun 2020 02:26:41 GMT', 'ETag', - '"0x8D81019E95E48A9"', + '"0x8D8119CB465EE00"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'c1309254-201e-003e-6302-42dadf000000', + 'e1be68bf-e01e-0043-4385-43abfc000000', 'x-ms-client-request-id', - 'f58022f0-a5a7-41d8-95dd-f525fce46c79', + '5a340ce3-6756-41d7-9204-c568d94ad66d', 'x-ms-version', '2019-12-12', 'x-ms-request-server-encrypted', 'true', 'x-ms-version-id', - '2020-06-14T04:17:54.8422313Z', + '2020-06-16T02:26:41.2074496Z', 'Date', - 'Sun, 14 Jun 2020 04:17:53 GMT' + 'Tue, 16 Jun 2020 02:26:41 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) .get('/') .query(true) - .reply(200, "\nkey159210827479503303='val1159210827479501088'blobname1159210827479506992container1159210827477909112val1159210827479501088", [ + .reply(200, "\nkey159227440063502634='val1159227440063702419'blobname1159227440063507702container1159227439943806411val1159227440063702419", [ 'Transfer-Encoding', 'chunked', 'Content-Type', 'application/xml', + 'Vary', + 'Origin', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'c13095a5-201e-003e-8002-42dadf000000', + 'e1be6dad-e01e-0043-0585-43abfc000000', 'x-ms-version', '2019-12-12', 'x-ms-client-request-id', - 'cfb79d17-3c47-407a-afa2-2c1065b46706', + 'dffd0dec-c1fe-4341-b533-2fb7509534e2', 'Date', - 'Sun, 14 Jun 2020 04:17:56 GMT' + 'Tue, 16 Jun 2020 02:26:43 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) .get('/') .query(true) - .reply(200, "\nkey159210827479503303='val2159210827481104876'blobname2159210827481107997container1159210827477909112val2159210827481104876", [ + .reply(200, "\nkey159227440063502634='val2159227440094309109'blobname2159227440094109162container1159227439943806411val2159227440094309109", [ 'Transfer-Encoding', 'chunked', 'Content-Type', 'application/xml', + 'Vary', + 'Origin', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'c1309642-201e-003e-1502-42dadf000000', + 'e1be6ee1-e01e-0043-3485-43abfc000000', 'x-ms-version', '2019-12-12', 'x-ms-client-request-id', - '2e53d7e7-1cab-4b9d-95e6-b9d5975a880f', + '1a11dfe9-e691-422e-916c-046601fb2a0b', 'Date', - 'Sun, 14 Jun 2020 04:17:56 GMT' + 'Tue, 16 Jun 2020 02:26:43 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) .get('/') .query(true) - .reply(200, "\nkey2159210827479506597='default'1blobname1159210827479506992container1159210827477909112default2!308!MDAwMDQ1IWNvbnRhaW5lcjExNTkyMTA4Mjc0Nzc5MDkxMTIBMDFENjQyMDJDNkUwNzhFMyEwMDAwMjchYmxvYm5hbWUyMTU5MjEwODI3NDgxMTA3OTk3ITAwMDAxNSEIAAAABwAAAGRlZmF1bHQhMDAwMDAxITAhMDAwMDI4ITk5OTktMTItMzFUMjM6NTk6NTkuOTk5OTk5OVohMDAwMDM2ITFmOTIxN2IwLWY4MjctNGIzZi1hOTU3LTlhZjUxMjA5ZjYzNiEwMDAwMjIha2V5MjE1OTIxMDgyNzQ3OTUwNjU5NyE-", [ + .reply(200, "\nkey2159227440063508429='default'1blobname1159227440063507702container1159227439943806411default2!308!MDAwMDQ1IWNvbnRhaW5lcjExNTkyMjc0Mzk5NDM4MDY0MTEBMDFENjQzODU5MTYzQTc3OSEwMDAwMjchYmxvYm5hbWUyMTU5MjI3NDQwMDk0MTA5MTYyITAwMDAxNSEIAAAABwAAAGRlZmF1bHQhMDAwMDAxITAhMDAwMDI4ITk5OTktMTItMzFUMjM6NTk6NTkuOTk5OTk5OVohMDAwMDM2ITlmMGZhZDA2LTE4OWItNDk5OS05MTllLWZjZTk3MmQ0ODdiYyEwMDAwMjIha2V5MjE1OTIyNzQ0MDA2MzUwODQyOSE-", [ 'Transfer-Encoding', 'chunked', 'Content-Type', 'application/xml', + 'Vary', + 'Origin', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'c1309648-201e-003e-1902-42dadf000000', + 'e1be6f9f-e01e-0043-6585-43abfc000000', 'x-ms-version', '2019-12-12', 'x-ms-client-request-id', - '520a00a3-87aa-4517-a940-711c25751526', + '9a13b838-e15f-4dff-a978-cdfcb41f4912', 'Date', - 'Sun, 14 Jun 2020 04:17:56 GMT' + 'Tue, 16 Jun 2020 02:26:44 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) .get('/') .query(true) - .reply(200, "\n2!308!MDAwMDQ1IWNvbnRhaW5lcjExNTkyMTA4Mjc0Nzc5MDkxMTIBMDFENjQyMDJDNkUwNzhFMyEwMDAwMjchYmxvYm5hbWUyMTU5MjEwODI3NDgxMTA3OTk3ITAwMDAxNSEIAAAABwAAAGRlZmF1bHQhMDAwMDAxITAhMDAwMDI4ITk5OTktMTItMzFUMjM6NTk6NTkuOTk5OTk5OVohMDAwMDM2ITFmOTIxN2IwLWY4MjctNGIzZi1hOTU3LTlhZjUxMjA5ZjYzNiEwMDAwMjIha2V5MjE1OTIxMDgyNzQ3OTUwNjU5NyE-key2159210827479506597='default'1blobname2159210827481107997container1159210827477909112default2!308!MDAwMDQ1IWNvbnRhaW5lcjExNTkyMTA4Mjc0Nzc5MDkxMTIBMDFENjQyMDJDNkUwNzhFMyEwMDAwMjchYmxvYm5hbWUzMTU5MjEwODI3NDgyNjA0NTMxITAwMDAxNSEIAAAABwAAAGRlZmF1bHQhMDAwMDAxITAhMDAwMDI4ITk5OTktMTItMzFUMjM6NTk6NTkuOTk5OTk5OVohMDAwMDM2ITBlMWFhNDQ2LTIxYTQtNGYzNC1hMDk1LTkwMjVjY2U1ZTU2YyEwMDAwMjIha2V5MjE1OTIxMDgyNzQ3OTUwNjU5NyE-", [ + .reply(200, "\n2!308!MDAwMDQ1IWNvbnRhaW5lcjExNTkyMjc0Mzk5NDM4MDY0MTEBMDFENjQzODU5MTYzQTc3OSEwMDAwMjchYmxvYm5hbWUyMTU5MjI3NDQwMDk0MTA5MTYyITAwMDAxNSEIAAAABwAAAGRlZmF1bHQhMDAwMDAxITAhMDAwMDI4ITk5OTktMTItMzFUMjM6NTk6NTkuOTk5OTk5OVohMDAwMDM2ITlmMGZhZDA2LTE4OWItNDk5OS05MTllLWZjZTk3MmQ0ODdiYyEwMDAwMjIha2V5MjE1OTIyNzQ0MDA2MzUwODQyOSE-key2159227440063508429='default'1blobname2159227440094109162container1159227439943806411default2!308!MDAwMDQ1IWNvbnRhaW5lcjExNTkyMjc0Mzk5NDM4MDY0MTEBMDFENjQzODU5MTYzQTc3OSEwMDAwMjchYmxvYm5hbWUzMTU5MjI3NDQwMTIzNTA5MjY3ITAwMDAxNSEIAAAABwAAAGRlZmF1bHQhMDAwMDAxITAhMDAwMDI4ITk5OTktMTItMzFUMjM6NTk6NTkuOTk5OTk5OVohMDAwMDM2ITcwMzQ0ZTI4LWNiYjctNDYwNi1iZDJmLWJkYzhiZjlmZWNlYSEwMDAwMjIha2V5MjE1OTIyNzQ0MDA2MzUwODQyOSE-", [ 'Transfer-Encoding', 'chunked', 'Content-Type', 'application/xml', + 'Vary', + 'Origin', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'c1309653-201e-003e-2402-42dadf000000', + 'e1be7082-e01e-0043-3c85-43abfc000000', 'x-ms-version', '2019-12-12', 'x-ms-client-request-id', - '13fdb176-af07-412b-8a4e-37709dec32a7', + 'e203e2b7-f526-41d6-9d51-22a179ef0641', 'Date', - 'Sun, 14 Jun 2020 04:17:56 GMT' + 'Tue, 16 Jun 2020 02:26:44 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) .get('/') .query(true) - .reply(200, "\n2!308!MDAwMDQ1IWNvbnRhaW5lcjExNTkyMTA4Mjc0Nzc5MDkxMTIBMDFENjQyMDJDNkUwNzhFMyEwMDAwMjchYmxvYm5hbWUzMTU5MjEwODI3NDgyNjA0NTMxITAwMDAxNSEIAAAABwAAAGRlZmF1bHQhMDAwMDAxITAhMDAwMDI4ITk5OTktMTItMzFUMjM6NTk6NTkuOTk5OTk5OVohMDAwMDM2ITBlMWFhNDQ2LTIxYTQtNGYzNC1hMDk1LTkwMjVjY2U1ZTU2YyEwMDAwMjIha2V5MjE1OTIxMDgyNzQ3OTUwNjU5NyE-key2159210827479506597='default'1blobname3159210827482604531container1159210827477909112default", [ + .reply(200, "\n2!308!MDAwMDQ1IWNvbnRhaW5lcjExNTkyMjc0Mzk5NDM4MDY0MTEBMDFENjQzODU5MTYzQTc3OSEwMDAwMjchYmxvYm5hbWUzMTU5MjI3NDQwMTIzNTA5MjY3ITAwMDAxNSEIAAAABwAAAGRlZmF1bHQhMDAwMDAxITAhMDAwMDI4ITk5OTktMTItMzFUMjM6NTk6NTkuOTk5OTk5OVohMDAwMDM2ITcwMzQ0ZTI4LWNiYjctNDYwNi1iZDJmLWJkYzhiZjlmZWNlYSEwMDAwMjIha2V5MjE1OTIyNzQ0MDA2MzUwODQyOSE-key2159227440063508429='default'1blobname3159227440123509267container1159227439943806411default", [ 'Transfer-Encoding', 'chunked', 'Content-Type', 'application/xml', + 'Vary', + 'Origin', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'c130965a-201e-003e-2b02-42dadf000000', + 'e1be7137-e01e-0043-6a85-43abfc000000', 'x-ms-version', '2019-12-12', 'x-ms-client-request-id', - '06eafac4-6d82-4fd4-a1e0-7443acc87c06', + '990eeded-74c4-43ff-b59f-315879a40b74', 'Date', - 'Sun, 14 Jun 2020 04:17:56 GMT' + 'Tue, 16 Jun 2020 02:26:44 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container1159210827477909112') + .delete('/container1159227439943806411') .query(true) .reply(202, "", [ 'Content-Length', @@ -210,11 +220,11 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'c1309662-201e-003e-3302-42dadf000000', + 'e1be71f0-e01e-0043-1885-43abfc000000', 'x-ms-client-request-id', - 'b140e5cd-9f2b-464b-af2d-d8cb1f8a299f', + 'a72f6748-d11e-4449-9b06-98d71cabd224', 'x-ms-version', '2019-12-12', 'Date', - 'Sun, 14 Jun 2020 04:17:56 GMT' + 'Tue, 16 Jun 2020 02:26:45 GMT' ]); diff --git a/sdk/storage/storage-blob/src/utils/constants.ts b/sdk/storage/storage-blob/src/utils/constants.ts index ed75bdab4bc1..91bd397ab82a 100644 --- a/sdk/storage/storage-blob/src/utils/constants.ts +++ b/sdk/storage/storage-blob/src/utils/constants.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -export const SDK_VERSION: string = "12.2.0-preview"; +export const SDK_VERSION: string = "12.2.0-preview.1"; export const SERVICE_VERSION: string = "2019-12-12"; export const BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES: number = 256 * 1024 * 1024; // 256MB diff --git a/sdk/storage/storage-blob/test/blobclient.spec.ts b/sdk/storage/storage-blob/test/blobclient.spec.ts index 054359c80063..c169f42e2a80 100644 --- a/sdk/storage/storage-blob/test/blobclient.spec.ts +++ b/sdk/storage/storage-blob/test/blobclient.spec.ts @@ -91,7 +91,7 @@ describe("BlobClient", () => { assert.deepStrictEqual(response.tags, tags); }); - it("Create block blob blob should work with tags", async () => { + it("Create block blob should work with tags", async () => { await blockBlobClient.delete(); const tags = { diff --git a/sdk/storage/storage-blob/test/blobserviceclient.spec.ts b/sdk/storage/storage-blob/test/blobserviceclient.spec.ts index d0a541f2b1a3..e70eb84a1daf 100644 --- a/sdk/storage/storage-blob/test/blobserviceclient.spec.ts +++ b/sdk/storage/storage-blob/test/blobserviceclient.spec.ts @@ -510,12 +510,8 @@ describe("BlobServiceClient", () => { } const blobs = []; - for await (const segment of blobServiceClient - .findBlobsByTags(`${key1}='${tags2[key1]}'`) - .byPage()) { - for (const blob of segment.blobs) { - blobs.push(blob); - } + for await (const blob of blobServiceClient.findBlobsByTags(`${key1}='${tags2[key1]}'`)) { + blobs.push(blob); } assert.deepStrictEqual(blobs.length, 1); assert.deepStrictEqual(blobs[0].containerName, containerName); From b20894a3eb24731639870267fb20b02dce9adfb8 Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Tue, 16 Jun 2020 10:46:28 +0800 Subject: [PATCH 38/39] me --- ...eate_block_blob_should_work_with_tags.json | 139 +++++++++++++++++ ...create_block_blob_should_work_with_tags.js | 142 ++++++++++++++++++ 2 files changed, 281 insertions(+) create mode 100644 sdk/storage/storage-blob/recordings/browsers/blobclient/recording_create_block_blob_should_work_with_tags.json create mode 100644 sdk/storage/storage-blob/recordings/node/blobclient/recording_create_block_blob_should_work_with_tags.js diff --git a/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_create_block_blob_should_work_with_tags.json b/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_create_block_blob_should_work_with_tags.json new file mode 100644 index 000000000000..a6b53a50deaa --- /dev/null +++ b/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_create_block_blob_should_work_with_tags.json @@ -0,0 +1,139 @@ +{ + "recordings": [ + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215214532602071", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Sun, 14 Jun 2020 16:29:04 GMT", + "etag": "\"0x8D810800E3A9241\"", + "last-modified": "Sun, 14 Jun 2020 16:29:05 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "6bc32346-b174-41cd-91ae-e1a122a927d7", + "x-ms-request-id": "1ae6a406-c01e-0009-0868-420873000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215214532602071/blob159215214534908371", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "Hello World", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", + "date": "Sun, 14 Jun 2020 16:29:04 GMT", + "etag": "\"0x8D810800E3E1F06\"", + "last-modified": "Sun, 14 Jun 2020 16:29:05 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "60793102-2f4b-48b8-bdb3-8db941da8561", + "x-ms-content-crc64": "YeJLfssylmU=", + "x-ms-request-id": "1ae6a416-c01e-0009-1768-420873000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-06-14T16:29:05.3735686Z" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215214532602071/blob159215214534908371", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Sun, 14 Jun 2020 16:29:04 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "98a4d0cb-9bd4-4e8c-b75c-0b1dc17f2ff6", + "x-ms-delete-type-permanent": "false", + "x-ms-request-id": "1ae6a424-c01e-0009-2468-420873000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215214532602071/blob159215214534908371", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "hello", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "XUFAKrxLKna5cZ2REBfFkg==", + "date": "Sun, 14 Jun 2020 16:29:04 GMT", + "etag": "\"0x8D810800E4C797D\"", + "last-modified": "Sun, 14 Jun 2020 16:29:05 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "73132f4a-78c6-4f67-b880-1d21c4d4d46a", + "x-ms-content-crc64": "V0JSBnCFdzM=", + "x-ms-request-id": "1ae6a441-c01e-0009-4068-420873000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-06-14T16:29:05.4686356Z" + } + }, + { + "method": "GET", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215214532602071/blob159215214534908371", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "comp": "tags" + }, + "requestBody": null, + "status": 200, + "response": "\ntag1val1tag2val2", + "responseHeaders": { + "content-length": "162", + "content-type": "application/xml", + "date": "Sun, 14 Jun 2020 16:29:04 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "1b9eaf22-a2b1-4bee-8f58-dc05b0ebb274", + "x-ms-request-id": "1ae6a452-c01e-0009-5168-420873000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container159215214532602071", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "restype": "container" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Sun, 14 Jun 2020 16:29:04 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "49d37774-9788-4d09-bdf5-2338a2d1301d", + "x-ms-request-id": "1ae6a462-c01e-0009-5f68-420873000000", + "x-ms-version": "2019-12-12" + } + } + ], + "uniqueTestInfo": { + "uniqueName": { + "container": "container159215214532602071", + "blob": "blob159215214534908371" + }, + "newDate": {} + }, + "hash": "9ae7d47fe8b3282fa0b8ddcfb760c932" +} diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/recording_create_block_blob_should_work_with_tags.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_create_block_blob_should_work_with_tags.js new file mode 100644 index 000000000000..961734e5d63a --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_create_block_blob_should_work_with_tags.js @@ -0,0 +1,142 @@ +let nock = require('nock'); + +module.exports.hash = "825f08fa77af8909631a204a03afccab"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827100608603","blob":"blob159210827103103981"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210827100608603') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:17:51 GMT', + 'ETag', + '"0x8D81019E7177B5A"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308cd0-201e-003e-5502-42dadf000000', + 'x-ms-client-request-id', + 'c093c743-0cc4-407d-aa1d-03a1b321f38d', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 04:17:50 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210827100608603/blob159210827103103981', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:17:51 GMT', + 'ETag', + '"0x8D81019E71A3186"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308cd8-201e-003e-5c02-42dadf000000', + 'x-ms-client-request-id', + '4f0c0647-76d8-4f64-ad03-089461427fa7', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-14T04:17:51.0405510Z', + 'Date', + 'Sun, 14 Jun 2020 04:17:50 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159210827100608603/blob159210827103103981') + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308cdf-201e-003e-6302-42dadf000000', + 'x-ms-client-request-id', + 'b7399fb1-0adb-454f-bdb0-78c1a8594db0', + 'x-ms-version', + '2019-12-12', + 'x-ms-delete-type-permanent', + 'false', + 'Date', + 'Sun, 14 Jun 2020 04:17:50 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210827100608603/blob159210827103103981', "hello") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'XUFAKrxLKna5cZ2REBfFkg==', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:17:51 GMT', + 'ETag', + '"0x8D81019E7420C04"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308d29-201e-003e-2702-42dadf000000', + 'x-ms-client-request-id', + 'f3eb1c51-cc37-443f-9f89-8689f0363c76', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'V0JSBnCFdzM=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-14T04:17:51.3027355Z', + 'Date', + 'Sun, 14 Jun 2020 04:17:50 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/container159210827100608603/blob159210827103103981') + .query(true) + .reply(200, "\ntag1val1tag2val2", [ + 'Content-Length', + '162', + 'Content-Type', + 'application/xml', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308d30-201e-003e-2c02-42dadf000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + '7cf11f6c-f39b-4efc-b6df-00a927002565', + 'Date', + 'Sun, 14 Jun 2020 04:17:50 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159210827100608603') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308d36-201e-003e-3102-42dadf000000', + 'x-ms-client-request-id', + '3e02b1cf-907c-41cd-936b-f6e659830a78', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 04:17:50 GMT' +]); From f288d5735bf4ea58f50e7bdc9af6a459a220b145 Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Tue, 16 Jun 2020 18:26:30 +0800 Subject: [PATCH 39/39] add set expiry --- common/config/rush/common-versions.json | 4 +- .../storage-blob-changefeed/package.json | 4 +- sdk/storage/storage-blob/src/Clients.ts | 2 +- .../storage-file-datalake/package.json | 4 +- .../recording_set_expiry__absolute.json | 179 +++++++++++++ .../recording_set_expiry__neverexpire.json | 159 ++++++++++++ .../recording_set_expiry__override.json | 207 +++++++++++++++ ...ording_set_expiry__relativetocreation.json | 160 ++++++++++++ .../recording_set_expiry__relativetonow.json | 149 +++++++++++ .../recording_set_expiry__absolute.js | 201 +++++++++++++++ .../recording_set_expiry__neverexpire.js | 190 ++++++++++++++ .../recording_set_expiry__override.js | 243 ++++++++++++++++++ ...ecording_set_expiry__relativetocreation.js | 178 +++++++++++++ .../recording_set_expiry__relativetonow.js | 156 +++++++++++ .../review/storage-file-datalake.api.md | 46 +++- .../src/StorageClient.ts | 19 ++ .../storage-file-datalake/src/clients.ts | 118 +++++++-- .../src/generated/src/models/index.ts | 44 +--- .../src/operations/pathOperations.ts | 42 ++- .../storage-file-datalake/src/models.ts | 100 ++++++- .../storage-file-datalake/swagger/README.md | 12 +- .../test/pathclient.spec.ts | 52 +++- 22 files changed, 2175 insertions(+), 94 deletions(-) create mode 100644 sdk/storage/storage-file-datalake/recordings/browsers/datalakepathclient/recording_set_expiry__absolute.json create mode 100644 sdk/storage/storage-file-datalake/recordings/browsers/datalakepathclient/recording_set_expiry__neverexpire.json create mode 100644 sdk/storage/storage-file-datalake/recordings/browsers/datalakepathclient/recording_set_expiry__override.json create mode 100644 sdk/storage/storage-file-datalake/recordings/browsers/datalakepathclient/recording_set_expiry__relativetocreation.json create mode 100644 sdk/storage/storage-file-datalake/recordings/browsers/datalakepathclient/recording_set_expiry__relativetonow.json create mode 100644 sdk/storage/storage-file-datalake/recordings/node/datalakepathclient/recording_set_expiry__absolute.js create mode 100644 sdk/storage/storage-file-datalake/recordings/node/datalakepathclient/recording_set_expiry__neverexpire.js create mode 100644 sdk/storage/storage-file-datalake/recordings/node/datalakepathclient/recording_set_expiry__override.js create mode 100644 sdk/storage/storage-file-datalake/recordings/node/datalakepathclient/recording_set_expiry__relativetocreation.js create mode 100644 sdk/storage/storage-file-datalake/recordings/node/datalakepathclient/recording_set_expiry__relativetonow.js diff --git a/common/config/rush/common-versions.json b/common/config/rush/common-versions.json index bc7873115603..f81e3123223d 100644 --- a/common/config/rush/common-versions.json +++ b/common/config/rush/common-versions.json @@ -52,6 +52,8 @@ // Following is required to allow for backward compatibility with Event Processor Host Track 1 "@azure/event-hubs": ["^2.1.4"], // Allow packages to continue to use old eslint-plugin-azure-sdk until they can adapt to 3.0.0 - "@azure/eslint-plugin-azure-sdk": ["^2.0.1"] + "@azure/eslint-plugin-azure-sdk": ["^2.0.1"], + // Allow storage-blob-changefeed and storage-file-datalake to use the preview version of storage-blob. + "@azure/storage-blob": ["^12.2.0-preview.1"] } } diff --git a/sdk/storage/storage-blob-changefeed/package.json b/sdk/storage/storage-blob-changefeed/package.json index ca6e0a4ed34a..b86eb5b43a1c 100644 --- a/sdk/storage/storage-blob-changefeed/package.json +++ b/sdk/storage/storage-blob-changefeed/package.json @@ -94,7 +94,7 @@ ] }, "dependencies": { - "@azure/storage-blob": "^12.1.2", + "@azure/storage-blob": "^12.2.0-preview.1", "@azure/abort-controller": "^1.0.0", "@azure/core-http": "^1.1.1", "@azure/core-lro": "^1.0.2", @@ -160,4 +160,4 @@ "util": "^0.12.1", "sinon": "^9.0.2" } -} \ No newline at end of file +} diff --git a/sdk/storage/storage-blob/src/Clients.ts b/sdk/storage/storage-blob/src/Clients.ts index 4fcc9565e5b6..63130bbf6ae0 100644 --- a/sdk/storage/storage-blob/src/Clients.ts +++ b/sdk/storage/storage-blob/src/Clients.ts @@ -6072,7 +6072,7 @@ export interface ContainerDeleteBlobOptions extends BlobDeleteOptions { /** * An opaque DateTime value that, when present, specifies the version * of the blob to delete. It's for service version 2019-10-10 and newer. - * + * * @type {string} * @memberof ContainerDeleteBlobOptions */ diff --git a/sdk/storage/storage-file-datalake/package.json b/sdk/storage/storage-file-datalake/package.json index 10834962e6ae..1f23d5168d3e 100644 --- a/sdk/storage/storage-file-datalake/package.json +++ b/sdk/storage/storage-file-datalake/package.json @@ -99,7 +99,7 @@ "@azure/core-paging": "^1.1.1", "@azure/core-tracing": "1.0.0-preview.8", "@azure/logger": "^1.0.0", - "@azure/storage-blob": "^12.1.2", + "@azure/storage-blob": "^12.2.0-preview.1", "events": "^3.0.0", "tslib": "^2.0.0" }, @@ -162,4 +162,4 @@ "typescript": "~3.9.3", "util": "^0.12.1" } -} \ No newline at end of file +} diff --git a/sdk/storage/storage-file-datalake/recordings/browsers/datalakepathclient/recording_set_expiry__absolute.json b/sdk/storage/storage-file-datalake/recordings/browsers/datalakepathclient/recording_set_expiry__absolute.json new file mode 100644 index 000000000000..0635cb65463c --- /dev/null +++ b/sdk/storage/storage-file-datalake/recordings/browsers/datalakepathclient/recording_set_expiry__absolute.json @@ -0,0 +1,179 @@ +{ + "recordings": [ + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/filesystem159352498324300178", + "query": { + "restype": "container" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Tue, 30 Jun 2020 13:49:43 GMT", + "etag": "\"0x8D81CFC71F20962\"", + "last-modified": "Tue, 30 Jun 2020 13:49:44 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "b0232c97-ad4f-4fb1-97b3-42cd96e37b0d", + "x-ms-request-id": "86fbebe0-e01e-0016-5ce5-4ed37e000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.dfs.core.windows.net/filesystem159352498324300178/file159352498487800651", + "query": { + "resource": "file" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Tue, 30 Jun 2020 13:49:45 GMT", + "etag": "\"0x8D81CFC72E7C74C\"", + "last-modified": "Tue, 30 Jun 2020 13:49:45 GMT", + "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "9b74d411-8793-416a-83e8-9f69c72277b8", + "x-ms-request-id": "abbf6b9b-001f-000e-2fe5-4e0c19000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PATCH", + "url": "https://fakestorageaccount.dfs.core.windows.net/filesystem159352498324300178/file159352498487800651", + "query": { + "position": "0", + "action": "append" + }, + "requestBody": "Hello World", + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Tue, 30 Jun 2020 13:49:46 GMT", + "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "268e0f3b-b8e0-4dec-b64d-c89b88a6062d", + "x-ms-request-id": "abbf6b9e-001f-000e-31e5-4e0c19000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PATCH", + "url": "https://fakestorageaccount.dfs.core.windows.net/filesystem159352498324300178/file159352498487800651", + "query": { + "position": "11", + "action": "flush" + }, + "requestBody": "", + "status": 200, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Tue, 30 Jun 2020 13:49:46 GMT", + "etag": "\"0x8D81CFC73979C8F\"", + "last-modified": "Tue, 30 Jun 2020 13:49:46 GMT", + "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "28047e9b-0cdb-46ba-96f2-2029308e31fe", + "x-ms-request-id": "abbf6ba0-001f-000e-33e5-4e0c19000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/filesystem159352498324300178/file159352498487800651", + "query": { + "comp": "expiry" + }, + "requestBody": null, + "status": 200, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Tue, 30 Jun 2020 13:49:47 GMT", + "etag": "\"0x8D81CFC73979C8F\"", + "last-modified": "Tue, 30 Jun 2020 13:49:46 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "af048384-e07f-4c98-8774-d1944912610a", + "x-ms-request-id": "86fbeca0-e01e-0016-79e5-4ed37e000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "HEAD", + "url": "https://fakestorageaccount.blob.core.windows.net/filesystem159352498324300178/file159352498487800651", + "query": {}, + "requestBody": null, + "status": 200, + "response": "", + "responseHeaders": { + "accept-ranges": "bytes", + "content-length": "11", + "content-type": "text/plain;charset=UTF-8", + "date": "Tue, 30 Jun 2020 13:49:47 GMT", + "etag": "\"0x8D81CFC73979C8F\"", + "last-modified": "Tue, 30 Jun 2020 13:49:46 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-access-tier": "Hot", + "x-ms-access-tier-inferred": "true", + "x-ms-blob-type": "BlockBlob", + "x-ms-client-request-id": "eba765f2-34c2-482b-90ac-f44d8952bc01", + "x-ms-creation-time": "Tue, 30 Jun 2020 13:49:45 GMT", + "x-ms-expiry-time": "Tue, 30 Jun 2020 13:49:52 GMT", + "x-ms-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-request-id": "86fbeccc-e01e-0016-18e5-4ed37e000000", + "x-ms-server-encrypted": "true", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "HEAD", + "url": "https://fakestorageaccount.blob.core.windows.net/filesystem159352498324300178/file159352498487800651", + "query": {}, + "requestBody": null, + "status": 404, + "response": "", + "responseHeaders": { + "date": "Tue, 30 Jun 2020 13:49:53 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "transfer-encoding": "chunked", + "x-ms-client-request-id": "7b2fa34b-52be-46d8-b31f-73b616cd7516", + "x-ms-error-code": "BlobNotFound", + "x-ms-request-id": "86fbee46-e01e-0016-4ce5-4ed37e000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/filesystem159352498324300178", + "query": { + "restype": "container" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Tue, 30 Jun 2020 13:49:53 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "19b96757-2e1c-406e-84a7-0d7086500351", + "x-ms-request-id": "86fbee65-e01e-0016-66e5-4ed37e000000", + "x-ms-version": "2019-12-12" + } + } + ], + "uniqueTestInfo": { + "uniqueName": { + "filesystem": "filesystem159352498324300178", + "file": "file159352498487800651" + }, + "newDate": { + "now": "2020-06-30T13:49:47.617Z" + } + }, + "hash": "c7bd60afc7b99e8133f2a601c5f613e8" +} \ No newline at end of file diff --git a/sdk/storage/storage-file-datalake/recordings/browsers/datalakepathclient/recording_set_expiry__neverexpire.json b/sdk/storage/storage-file-datalake/recordings/browsers/datalakepathclient/recording_set_expiry__neverexpire.json new file mode 100644 index 000000000000..1568edbf97b8 --- /dev/null +++ b/sdk/storage/storage-file-datalake/recordings/browsers/datalakepathclient/recording_set_expiry__neverexpire.json @@ -0,0 +1,159 @@ +{ + "recordings": [ + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/filesystem159239956833708016", + "query": { + "restype": "container" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Wed, 17 Jun 2020 13:12:49 GMT", + "etag": "\"0x8D812C022C2586D\"", + "last-modified": "Wed, 17 Jun 2020 13:12:49 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "838e0ace-c89c-4548-891b-af02661fd427", + "x-ms-request-id": "21918a50-c01e-0063-1ba9-44b852000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.dfs.core.windows.net/filesystem159239956833708016/file159239957007507452", + "query": { + "resource": "file" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Wed, 17 Jun 2020 13:12:50 GMT", + "etag": "\"0x8D812C023B4A8A3\"", + "last-modified": "Wed, 17 Jun 2020 13:12:51 GMT", + "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "bc8508df-4d74-4161-bafc-08b70fc4b15c", + "x-ms-request-id": "f3d5a31e-101f-0002-2ba9-449b11000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PATCH", + "url": "https://fakestorageaccount.dfs.core.windows.net/filesystem159239956833708016/file159239957007507452", + "query": { + "position": "0", + "action": "append" + }, + "requestBody": "Hello World", + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Wed, 17 Jun 2020 13:12:51 GMT", + "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "a652f82a-6d78-4328-a6fe-94e7da120872", + "x-ms-request-id": "f3d5a320-101f-0002-2da9-449b11000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PATCH", + "url": "https://fakestorageaccount.dfs.core.windows.net/filesystem159239956833708016/file159239957007507452", + "query": { + "position": "11", + "action": "flush" + }, + "requestBody": "", + "status": 200, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Wed, 17 Jun 2020 13:12:51 GMT", + "etag": "\"0x8D812C02465CAE5\"", + "last-modified": "Wed, 17 Jun 2020 13:12:52 GMT", + "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "07a6fc49-5fad-464f-bcf6-b0f279bb0a88", + "x-ms-request-id": "f3d5a322-101f-0002-2fa9-449b11000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/filesystem159239956833708016/file159239957007507452", + "query": { + "comp": "expiry" + }, + "requestBody": null, + "status": 200, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Wed, 17 Jun 2020 13:12:53 GMT", + "etag": "\"0x8D812C02465CAE5\"", + "last-modified": "Wed, 17 Jun 2020 13:12:52 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "c2bf3445-ae98-470c-a10c-beb27c18bafb", + "x-ms-request-id": "6ba7a955-e01e-0029-01a9-441bdd000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "HEAD", + "url": "https://fakestorageaccount.blob.core.windows.net/filesystem159239956833708016/file159239957007507452", + "query": {}, + "requestBody": null, + "status": 200, + "response": "", + "responseHeaders": { + "accept-ranges": "bytes", + "content-length": "11", + "content-type": "text/plain;charset=UTF-8", + "date": "Wed, 17 Jun 2020 13:12:54 GMT", + "etag": "\"0x8D812C02465CAE5\"", + "last-modified": "Wed, 17 Jun 2020 13:12:52 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-access-tier": "Hot", + "x-ms-access-tier-inferred": "true", + "x-ms-blob-type": "BlockBlob", + "x-ms-client-request-id": "eac4a0aa-32e8-4edb-bce8-9ab7027e82a8", + "x-ms-creation-time": "Wed, 17 Jun 2020 13:12:51 GMT", + "x-ms-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-request-id": "6ba7a99d-e01e-0029-3ba9-441bdd000000", + "x-ms-server-encrypted": "true", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/filesystem159239956833708016", + "query": { + "restype": "container" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Wed, 17 Jun 2020 13:12:54 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "1114e467-b86f-4ab6-bde1-9eb2acb1dd4d", + "x-ms-request-id": "6ba7aa08-e01e-0029-18a9-441bdd000000", + "x-ms-version": "2019-12-12" + } + } + ], + "uniqueTestInfo": { + "uniqueName": { + "filesystem": "filesystem159239956833708016", + "file": "file159239957007507452" + }, + "newDate": {} + }, + "hash": "c6d159241838e22eddeb2accb80cf720" +} \ No newline at end of file diff --git a/sdk/storage/storage-file-datalake/recordings/browsers/datalakepathclient/recording_set_expiry__override.json b/sdk/storage/storage-file-datalake/recordings/browsers/datalakepathclient/recording_set_expiry__override.json new file mode 100644 index 000000000000..3a31a8908534 --- /dev/null +++ b/sdk/storage/storage-file-datalake/recordings/browsers/datalakepathclient/recording_set_expiry__override.json @@ -0,0 +1,207 @@ +{ + "recordings": [ + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/filesystem159299282687904611", + "query": { + "restype": "container" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Wed, 24 Jun 2020 10:00:26 GMT", + "etag": "\"0x8D818256BA3F6B3\"", + "last-modified": "Wed, 24 Jun 2020 10:00:27 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "284e6770-2358-4c68-8b14-10791c5794a9", + "x-ms-request-id": "7b699a1f-501e-0013-5a0e-4a01a5000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.dfs.core.windows.net/filesystem159299282687904611/file159299282745900163", + "query": { + "resource": "file" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Wed, 24 Jun 2020 10:00:26 GMT", + "etag": "\"0x8D818256BFD652E\"", + "last-modified": "Wed, 24 Jun 2020 10:00:27 GMT", + "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "80c2d50c-3c97-47d7-ac7d-0948e02d9392", + "x-ms-request-id": "2a2870f9-b01f-0034-210e-4a1661000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PATCH", + "url": "https://fakestorageaccount.dfs.core.windows.net/filesystem159299282687904611/file159299282745900163", + "query": { + "position": "0", + "action": "append" + }, + "requestBody": "Hello World", + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Wed, 24 Jun 2020 10:00:27 GMT", + "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "51a4f743-9bdc-47e8-ac64-15459a2bcffb", + "x-ms-request-id": "2a2870fe-b01f-0034-250e-4a1661000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PATCH", + "url": "https://fakestorageaccount.dfs.core.windows.net/filesystem159299282687904611/file159299282745900163", + "query": { + "position": "11", + "action": "flush" + }, + "requestBody": "", + "status": 200, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Wed, 24 Jun 2020 10:00:28 GMT", + "etag": "\"0x8D818256CAC30A7\"", + "last-modified": "Wed, 24 Jun 2020 10:00:28 GMT", + "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "79b7e151-9ac2-423c-b1de-1752aafc999c", + "x-ms-request-id": "2a287101-b01f-0034-280e-4a1661000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/filesystem159299282687904611/file159299282745900163", + "query": { + "comp": "expiry" + }, + "requestBody": null, + "status": 200, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Wed, 24 Jun 2020 10:00:28 GMT", + "etag": "\"0x8D818256CAC30A7\"", + "last-modified": "Wed, 24 Jun 2020 10:00:28 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "b479d931-6e13-430d-9be6-60ff9f42b9ea", + "x-ms-request-id": "7b699a4d-501e-0013-7f0e-4a01a5000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "HEAD", + "url": "https://fakestorageaccount.blob.core.windows.net/filesystem159299282687904611/file159299282745900163", + "query": {}, + "requestBody": null, + "status": 200, + "response": "", + "responseHeaders": { + "accept-ranges": "bytes", + "content-length": "11", + "content-type": "text/plain;charset=UTF-8", + "date": "Wed, 24 Jun 2020 10:00:29 GMT", + "etag": "\"0x8D818256CAC30A7\"", + "last-modified": "Wed, 24 Jun 2020 10:00:28 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-access-tier": "Hot", + "x-ms-access-tier-inferred": "true", + "x-ms-blob-type": "BlockBlob", + "x-ms-client-request-id": "e477113f-0b4c-4b86-8e5d-96ce34c3cf2b", + "x-ms-creation-time": "Wed, 24 Jun 2020 10:00:27 GMT", + "x-ms-expiry-time": "Wed, 24 Jun 2020 11:00:27 GMT", + "x-ms-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-request-id": "7b699a5d-501e-0013-070e-4a01a5000000", + "x-ms-server-encrypted": "true", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/filesystem159299282687904611/file159299282745900163", + "query": { + "comp": "expiry" + }, + "requestBody": null, + "status": 200, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Wed, 24 Jun 2020 10:00:29 GMT", + "etag": "\"0x8D818256CAC30A7\"", + "last-modified": "Wed, 24 Jun 2020 10:00:28 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "79f76f62-d229-4e84-87d3-7ea8fe925080", + "x-ms-request-id": "7b699a6d-501e-0013-120e-4a01a5000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "HEAD", + "url": "https://fakestorageaccount.blob.core.windows.net/filesystem159299282687904611/file159299282745900163", + "query": {}, + "requestBody": null, + "status": 200, + "response": "", + "responseHeaders": { + "accept-ranges": "bytes", + "content-length": "11", + "content-type": "text/plain;charset=UTF-8", + "date": "Wed, 24 Jun 2020 10:00:29 GMT", + "etag": "\"0x8D818256CAC30A7\"", + "last-modified": "Wed, 24 Jun 2020 10:00:28 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-access-tier": "Hot", + "x-ms-access-tier-inferred": "true", + "x-ms-blob-type": "BlockBlob", + "x-ms-client-request-id": "cabc72df-422f-4bdb-b375-9ef1f1d9ae09", + "x-ms-creation-time": "Wed, 24 Jun 2020 10:00:27 GMT", + "x-ms-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-request-id": "7b699a91-501e-0013-320e-4a01a5000000", + "x-ms-server-encrypted": "true", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/filesystem159299282687904611", + "query": { + "restype": "container" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Wed, 24 Jun 2020 10:00:30 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "18720132-86c0-4183-921f-f21725174dd5", + "x-ms-request-id": "7b699aa6-501e-0013-430e-4a01a5000000", + "x-ms-version": "2019-12-12" + } + } + ], + "uniqueTestInfo": { + "uniqueName": { + "filesystem": "filesystem159299282687904611", + "file": "file159299282745900163" + }, + "newDate": {} + }, + "hash": "481cec3f9359747a3e79454241767795" +} \ No newline at end of file diff --git a/sdk/storage/storage-file-datalake/recordings/browsers/datalakepathclient/recording_set_expiry__relativetocreation.json b/sdk/storage/storage-file-datalake/recordings/browsers/datalakepathclient/recording_set_expiry__relativetocreation.json new file mode 100644 index 000000000000..84519eaf02cb --- /dev/null +++ b/sdk/storage/storage-file-datalake/recordings/browsers/datalakepathclient/recording_set_expiry__relativetocreation.json @@ -0,0 +1,160 @@ +{ + "recordings": [ + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/filesystem159299282283600351", + "query": { + "restype": "container" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Wed, 24 Jun 2020 10:00:22 GMT", + "etag": "\"0x8D81825693B674E\"", + "last-modified": "Wed, 24 Jun 2020 10:00:23 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "1738b4fc-5a96-4118-b22e-599bddc02274", + "x-ms-request-id": "7b69993c-501e-0013-140e-4a01a5000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.dfs.core.windows.net/filesystem159299282283600351/file159299282341904059", + "query": { + "resource": "file" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Wed, 24 Jun 2020 10:00:22 GMT", + "etag": "\"0x8D818256994D24E\"", + "last-modified": "Wed, 24 Jun 2020 10:00:23 GMT", + "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "267684a6-91ca-4e19-9971-483d58ae73f8", + "x-ms-request-id": "2a2870c3-b01f-0034-6d0e-4a1661000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PATCH", + "url": "https://fakestorageaccount.dfs.core.windows.net/filesystem159299282283600351/file159299282341904059", + "query": { + "position": "0", + "action": "append" + }, + "requestBody": "Hello World", + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Wed, 24 Jun 2020 10:00:23 GMT", + "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "9379f59d-1d90-4138-9068-13e12aab467c", + "x-ms-request-id": "2a2870c5-b01f-0034-6f0e-4a1661000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PATCH", + "url": "https://fakestorageaccount.dfs.core.windows.net/filesystem159299282283600351/file159299282341904059", + "query": { + "position": "11", + "action": "flush" + }, + "requestBody": "", + "status": 200, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Wed, 24 Jun 2020 10:00:23 GMT", + "etag": "\"0x8D818256A41F7EB\"", + "last-modified": "Wed, 24 Jun 2020 10:00:24 GMT", + "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "d4ec5275-19ce-40d0-9fa1-9f4b1e041184", + "x-ms-request-id": "2a2870e3-b01f-0034-0d0e-4a1661000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/filesystem159299282283600351/file159299282341904059", + "query": { + "comp": "expiry" + }, + "requestBody": null, + "status": 200, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Wed, 24 Jun 2020 10:00:24 GMT", + "etag": "\"0x8D818256A41F7EB\"", + "last-modified": "Wed, 24 Jun 2020 10:00:24 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "1e8b9979-d442-4abc-8e68-457d76762fcc", + "x-ms-request-id": "7b6999bb-501e-0013-7e0e-4a01a5000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "HEAD", + "url": "https://fakestorageaccount.blob.core.windows.net/filesystem159299282283600351/file159299282341904059", + "query": {}, + "requestBody": null, + "status": 200, + "response": "", + "responseHeaders": { + "accept-ranges": "bytes", + "content-length": "11", + "content-type": "text/plain;charset=UTF-8", + "date": "Wed, 24 Jun 2020 10:00:25 GMT", + "etag": "\"0x8D818256A41F7EB\"", + "last-modified": "Wed, 24 Jun 2020 10:00:24 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-access-tier": "Hot", + "x-ms-access-tier-inferred": "true", + "x-ms-blob-type": "BlockBlob", + "x-ms-client-request-id": "5cec842e-89ae-4692-9479-aa07735aab1f", + "x-ms-creation-time": "Wed, 24 Jun 2020 10:00:23 GMT", + "x-ms-expiry-time": "Wed, 24 Jun 2020 11:00:23 GMT", + "x-ms-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-request-id": "7b6999de-501e-0013-1e0e-4a01a5000000", + "x-ms-server-encrypted": "true", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/filesystem159299282283600351", + "query": { + "restype": "container" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Wed, 24 Jun 2020 10:00:25 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "534826a1-815c-4e23-9c06-63eb04787cb3", + "x-ms-request-id": "7b699a01-501e-0013-3e0e-4a01a5000000", + "x-ms-version": "2019-12-12" + } + } + ], + "uniqueTestInfo": { + "uniqueName": { + "filesystem": "filesystem159299282283600351", + "file": "file159299282341904059" + }, + "newDate": {} + }, + "hash": "201798d7335e3eb29b47567fb4b9c17c" +} \ No newline at end of file diff --git a/sdk/storage/storage-file-datalake/recordings/browsers/datalakepathclient/recording_set_expiry__relativetonow.json b/sdk/storage/storage-file-datalake/recordings/browsers/datalakepathclient/recording_set_expiry__relativetonow.json new file mode 100644 index 000000000000..792bb767fb1b --- /dev/null +++ b/sdk/storage/storage-file-datalake/recordings/browsers/datalakepathclient/recording_set_expiry__relativetonow.json @@ -0,0 +1,149 @@ +{ + "recordings": [ + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/filesystem159299281555203886", + "query": { + "restype": "container" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Wed, 24 Jun 2020 10:00:16 GMT", + "etag": "\"0x8D81825658CF317\"", + "last-modified": "Wed, 24 Jun 2020 10:00:16 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "aef775b7-7512-4c5d-b230-181d79ac815b", + "x-ms-request-id": "7b699848-501e-0013-420e-4a01a5000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.dfs.core.windows.net/filesystem159299281555203886/file159299281729603669", + "query": { + "resource": "file" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Wed, 24 Jun 2020 10:00:17 GMT", + "etag": "\"0x8D8182566872C7E\"", + "last-modified": "Wed, 24 Jun 2020 10:00:18 GMT", + "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "89d244c1-145b-4006-b1f0-45fdaa0751c5", + "x-ms-request-id": "2a28708a-b01f-0034-350e-4a1661000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PATCH", + "url": "https://fakestorageaccount.dfs.core.windows.net/filesystem159299281555203886/file159299281729603669", + "query": { + "position": "0", + "action": "append" + }, + "requestBody": "Hello World", + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Wed, 24 Jun 2020 10:00:18 GMT", + "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "ee4d1524-bd5a-46e7-8152-57b887eab692", + "x-ms-request-id": "2a28708e-b01f-0034-390e-4a1661000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PATCH", + "url": "https://fakestorageaccount.dfs.core.windows.net/filesystem159299281555203886/file159299281729603669", + "query": { + "position": "11", + "action": "flush" + }, + "requestBody": "", + "status": 200, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Wed, 24 Jun 2020 10:00:18 GMT", + "etag": "\"0x8D818256736A9F3\"", + "last-modified": "Wed, 24 Jun 2020 10:00:19 GMT", + "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "9b2f0792-defb-4ba0-8087-af4c1fcdf6aa", + "x-ms-request-id": "2a287091-b01f-0034-3c0e-4a1661000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/filesystem159299281555203886/file159299281729603669", + "query": { + "comp": "expiry" + }, + "requestBody": null, + "status": 200, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Wed, 24 Jun 2020 10:00:19 GMT", + "etag": "\"0x8D818256736A9F3\"", + "last-modified": "Wed, 24 Jun 2020 10:00:19 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "a590a4c7-7459-4da1-bebb-67c7b4e7508a", + "x-ms-request-id": "7b6998b7-501e-0013-1c0e-4a01a5000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "HEAD", + "url": "https://fakestorageaccount.blob.core.windows.net/filesystem159299281555203886/file159299281729603669", + "query": {}, + "requestBody": null, + "status": 404, + "response": "", + "responseHeaders": { + "date": "Wed, 24 Jun 2020 10:00:21 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "transfer-encoding": "chunked", + "x-ms-client-request-id": "af0a4934-6669-49d6-ac52-a77af454a844", + "x-ms-error-code": "BlobNotFound", + "x-ms-request-id": "7b6998f5-501e-0013-570e-4a01a5000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/filesystem159299281555203886", + "query": { + "restype": "container" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Wed, 24 Jun 2020 10:00:21 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "58a23de7-6823-457c-8aa6-1538b80b3749", + "x-ms-request-id": "7b699919-501e-0013-750e-4a01a5000000", + "x-ms-version": "2019-12-12" + } + } + ], + "uniqueTestInfo": { + "uniqueName": { + "filesystem": "filesystem159299281555203886", + "file": "file159299281729603669" + }, + "newDate": {} + }, + "hash": "c0da3264e322f03bf5b03f643ca889cf" +} \ No newline at end of file diff --git a/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient/recording_set_expiry__absolute.js b/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient/recording_set_expiry__absolute.js new file mode 100644 index 000000000000..40010cb3d69d --- /dev/null +++ b/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient/recording_set_expiry__absolute.js @@ -0,0 +1,201 @@ +let nock = require('nock'); + +module.exports.hash = "42ea6f8cd24d4b0d44ffa4ddf236bf54"; + +module.exports.testInfo = {"uniqueName":{"filesystem":"filesystem159352492035906829","file":"file159352492196002191"},"newDate":{"now":"2020-06-30T13:48:43.836Z"}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/filesystem159352492035906829') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Tue, 30 Jun 2020 13:48:41 GMT', + 'ETag', + '"0x8D81CFC4C618ABE"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'e0bc4ebc-201e-006b-19e5-4ea25d000000', + 'x-ms-client-request-id', + '5a185975-5ccc-4798-8c9d-a4a24c8d81c0', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Tue, 30 Jun 2020 13:48:40 GMT' +]); + +nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) + .put('/filesystem159352492035906829/file159352492196002191') + .query(true) + .reply(201, "", [ + 'Last-Modified', + 'Tue, 30 Jun 2020 13:48:42 GMT', + 'ETag', + '"0x8D81CFC4D3A1C4B"', + 'Server', + 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '7da89b3e-a01f-0028-24e5-4e4401000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + '37091797-e064-4645-b3b5-52208ea00020', + 'Date', + 'Tue, 30 Jun 2020 13:48:42 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) + .patch('/filesystem159352492035906829/file159352492196002191', "Hello World") + .query(true) + .reply(202, "", [ + 'Server', + 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-request-id', + '7da89b40-a01f-0028-25e5-4e4401000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + '4732a7ac-1c45-4333-9b4f-7a209c4aca62', + 'Date', + 'Tue, 30 Jun 2020 13:48:42 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) + .patch('/filesystem159352492035906829/file159352492196002191') + .query(true) + .reply(200, "", [ + 'Last-Modified', + 'Tue, 30 Jun 2020 13:48:43 GMT', + 'ETag', + '"0x8D81CFC4D9386C4"', + 'Server', + 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-server-encrypted', + 'false', + 'x-ms-request-id', + '7da89b42-a01f-0028-26e5-4e4401000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + 'e7f455bd-2059-48d8-8d97-a80c99cb9aee', + 'Date', + 'Tue, 30 Jun 2020 13:48:43 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/filesystem159352492035906829/file159352492196002191') + .query(true) + .reply(200, "", [ + 'Last-Modified', + 'Tue, 30 Jun 2020 13:48:43 GMT', + 'ETag', + '"0x8D81CFC4D9386C4"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'e0bc4f2d-201e-006b-6fe5-4ea25d000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + '906a8309-f807-4cc5-9042-ffb24a2bfcfe', + 'Date', + 'Tue, 30 Jun 2020 13:48:43 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/filesystem159352492035906829/file159352492196002191') + .reply(200, "", [ + 'Content-Length', + '11', + 'Content-Type', + 'application/octet-stream', + 'Last-Modified', + 'Tue, 30 Jun 2020 13:48:43 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D81CFC4D9386C4"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'e0bc4f3b-201e-006b-7ae5-4ea25d000000', + 'x-ms-client-request-id', + '124b715a-dd1f-4b80-9da3-9d80039becab', + 'x-ms-version', + '2019-12-12', + 'x-ms-creation-time', + 'Tue, 30 Jun 2020 13:48:42 GMT', + 'x-ms-expiry-time', + 'Tue, 30 Jun 2020 13:48:48 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', + 'Hot', + 'x-ms-access-tier-inferred', + 'true', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,Content-Type,Last-Modified,ETag,x-ms-creation-time,x-ms-expiry-time,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', + 'Tue, 30 Jun 2020 13:48:43 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/filesystem159352492035906829/file159352492196002191') + .reply(404, "", [ + 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'e0bc504b-201e-006b-58e5-4ea25d000000', + 'x-ms-client-request-id', + '8e7659fb-a4a0-4117-9022-1c32706231f2', + 'x-ms-version', + '2019-12-12', + 'x-ms-error-code', + 'BlobNotFound', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-error-code,Content-Length,Date,Transfer-Encoding', + 'Access-Control-Allow-Origin', + '*', + 'Date', + 'Tue, 30 Jun 2020 13:48:48 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/filesystem159352492035906829') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'e0bc5055-201e-006b-5ee5-4ea25d000000', + 'x-ms-client-request-id', + '645421a7-c602-4e6e-900d-df247bccd167', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Tue, 30 Jun 2020 13:48:49 GMT' +]); diff --git a/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient/recording_set_expiry__neverexpire.js b/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient/recording_set_expiry__neverexpire.js new file mode 100644 index 000000000000..d07bfc57eb8d --- /dev/null +++ b/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient/recording_set_expiry__neverexpire.js @@ -0,0 +1,190 @@ +let nock = require('nock'); + +module.exports.hash = "4a4fed79044d292913f1861b636c5f4a"; + +module.exports.testInfo = {"uniqueName":{"filesystem":"filesystem159239943150501028","file":"file159239943296504342"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/filesystem159239943150501028') + .query(true) + .reply(201, "", [ + 'content-length', + '0', + 'last-modified', + 'Wed, 17 Jun 2020 13:10:32 GMT', + 'etag', + '"0x8D812BFD107142D"', + 'server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '4a588ac5-c01e-005c-4ea8-4470f1000000', + 'x-ms-client-request-id', + '944452a5-b237-40bf-8b1c-7d2cbc4608e8', + 'x-ms-version', + '2019-12-12', + 'date', + 'Wed, 17 Jun 2020 13:10:31 GMT', + 'connection', + 'close' +]); + +nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) + .put('/filesystem159239943150501028/file159239943296504342') + .query(true) + .reply(201, "", [ + 'last-modified', + 'Wed, 17 Jun 2020 13:10:34 GMT', + 'etag', + '"0x8D812BFD1D625F7"', + 'server', + 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '727808fc-701f-0004-11a8-44a8ae000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + '057a4301-1bb1-464c-b546-923313169e84', + 'date', + 'Wed, 17 Jun 2020 13:10:33 GMT', + 'connection', + 'close', + 'content-length', + '0' +]); + +nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) + .patch('/filesystem159239943150501028/file159239943296504342', "Hello World") + .query(true) + .reply(202, "", [ + 'server', + 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-request-id', + '23bb3cc3-801f-0010-42a8-44e0c1000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + '702a8037-ec33-46b3-a726-b7d7609cf734', + 'date', + 'Wed, 17 Jun 2020 13:10:35 GMT', + 'connection', + 'close', + 'content-length', + '0' +]); + +nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) + .patch('/filesystem159239943150501028/file159239943296504342') + .query(true) + .reply(200, "", [ + 'last-modified', + 'Wed, 17 Jun 2020 13:10:36 GMT', + 'etag', + '"0x8D812BFD351E306"', + 'server', + 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-server-encrypted', + 'false', + 'x-ms-request-id', + '326cc5a0-601f-0045-34a8-44f04a000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + '92cb20a5-bf65-4dfb-b06d-6c5eb91bf2ba', + 'date', + 'Wed, 17 Jun 2020 13:10:35 GMT', + 'connection', + 'close', + 'content-length', + '0' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/filesystem159239943150501028/file159239943296504342') + .query(true) + .reply(200, "", [ + 'last-modified', + 'Wed, 17 Jun 2020 13:10:36 GMT', + 'etag', + '"0x8D812BFD351E306"', + 'server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'b997c7b7-501e-003c-54a8-440c6e000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + '3565e493-9d75-488b-a896-2b0b7dd28a4e', + 'date', + 'Wed, 17 Jun 2020 13:10:37 GMT', + 'connection', + 'close', + 'content-length', + '0' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/filesystem159239943150501028/file159239943296504342') + .reply(200, "", [ + 'content-length', + '11', + 'content-type', + 'application/octet-stream', + 'last-modified', + 'Wed, 17 Jun 2020 13:10:36 GMT', + 'accept-ranges', + 'bytes', + 'etag', + '"0x8D812BFD351E306"', + 'server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'a4226320-801e-003f-7aa8-44ed0a000000', + 'x-ms-client-request-id', + '3b1fdbb9-6c0a-47dc-ab91-8c247c686aca', + 'x-ms-version', + '2019-12-12', + 'x-ms-creation-time', + 'Wed, 17 Jun 2020 13:10:34 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', + 'Hot', + 'x-ms-access-tier-inferred', + 'true', + 'access-control-expose-headers', + 'x-ms-request-id,x-ms-client-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-server-encrypted,x-ms-access-tier,x-ms-access-tier-inferred,Accept-Ranges,Content-Length,Date,Transfer-Encoding', + 'access-control-allow-origin', + '*', + 'date', + 'Wed, 17 Jun 2020 13:10:38 GMT', + 'connection', + 'close' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/filesystem159239943150501028') + .query(true) + .reply(202, "", [ + 'content-length', + '0', + 'server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'a0ab7cbe-201e-0036-08a8-44a8d9000000', + 'x-ms-client-request-id', + '9663c928-6d37-42f5-aeb4-8188214cb0da', + 'x-ms-version', + '2019-12-12', + 'date', + 'Wed, 17 Jun 2020 13:10:39 GMT', + 'connection', + 'close' +]); diff --git a/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient/recording_set_expiry__override.js b/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient/recording_set_expiry__override.js new file mode 100644 index 000000000000..e380cd71bac1 --- /dev/null +++ b/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient/recording_set_expiry__override.js @@ -0,0 +1,243 @@ +let nock = require('nock'); + +module.exports.hash = "49ae201267dbd16bc5c2949dfdee3daa"; + +module.exports.testInfo = {"uniqueName":{"filesystem":"filesystem159299255423504608","file":"file159299255462704152"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/filesystem159299255423504608') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Wed, 24 Jun 2020 09:55:54 GMT', + 'ETag', + '"0x8D81824C8FC84C9"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '00e03b8d-a01e-0007-7a0d-4a49ca000000', + 'x-ms-client-request-id', + '8399bc23-b69d-46ad-b4ff-5b656ec741d2', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Wed, 24 Jun 2020 09:55:53 GMT' +]); + +nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) + .put('/filesystem159299255423504608/file159299255462704152') + .query(true) + .reply(201, "", [ + 'Last-Modified', + 'Wed, 24 Jun 2020 09:55:54 GMT', + 'ETag', + '"0x8D81824C93ABDDE"', + 'Server', + 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '6f8e5650-501f-0003-790d-4ac4cd000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + 'adcc7919-125e-40d9-9909-47bdc889e0f7', + 'Date', + 'Wed, 24 Jun 2020 09:55:53 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) + .patch('/filesystem159299255423504608/file159299255462704152', "Hello World") + .query(true) + .reply(202, "", [ + 'Server', + 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-request-id', + '6f8e565e-501f-0003-070d-4ac4cd000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + 'e01417a4-e8a8-404c-9d3a-89b44b517fc8', + 'Date', + 'Wed, 24 Jun 2020 09:55:54 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) + .patch('/filesystem159299255423504608/file159299255462704152') + .query(true) + .reply(200, "", [ + 'Last-Modified', + 'Wed, 24 Jun 2020 09:55:55 GMT', + 'ETag', + '"0x8D81824C9C67EF8"', + 'Server', + 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-server-encrypted', + 'false', + 'x-ms-request-id', + '6f8e566c-501f-0003-130d-4ac4cd000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + 'dd4bb946-c11c-4652-b9ca-1dc2a54f644f', + 'Date', + 'Wed, 24 Jun 2020 09:55:54 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/filesystem159299255423504608/file159299255462704152') + .query(true) + .reply(200, "", [ + 'Last-Modified', + 'Wed, 24 Jun 2020 09:55:55 GMT', + 'ETag', + '"0x8D81824C9C67EF8"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '00e03c15-a01e-0007-6a0d-4a49ca000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + 'fd6a7cd3-2b10-43ff-9f3d-d1240d306701', + 'Date', + 'Wed, 24 Jun 2020 09:55:55 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/filesystem159299255423504608/file159299255462704152') + .reply(200, "", [ + 'Content-Length', + '11', + 'Content-Type', + 'application/octet-stream', + 'Last-Modified', + 'Wed, 24 Jun 2020 09:55:55 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D81824C9C67EF8"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '00e03c41-a01e-0007-110d-4a49ca000000', + 'x-ms-client-request-id', + '5ea0a817-c9e0-4207-89d5-a3c6cda5de44', + 'x-ms-version', + '2019-12-12', + 'x-ms-creation-time', + 'Wed, 24 Jun 2020 09:55:54 GMT', + 'x-ms-expiry-time', + 'Wed, 24 Jun 2020 10:55:54 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', + 'Hot', + 'x-ms-access-tier-inferred', + 'true', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,Content-Type,Last-Modified,ETag,x-ms-creation-time,x-ms-expiry-time,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', + 'Wed, 24 Jun 2020 09:55:56 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/filesystem159299255423504608/file159299255462704152') + .query(true) + .reply(200, "", [ + 'Last-Modified', + 'Wed, 24 Jun 2020 09:55:55 GMT', + 'ETag', + '"0x8D81824C9C67EF8"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '00e03c79-a01e-0007-450d-4a49ca000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + '9e2e5751-679d-438b-8385-ca4642b86e2c', + 'Date', + 'Wed, 24 Jun 2020 09:55:56 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/filesystem159299255423504608/file159299255462704152') + .reply(200, "", [ + 'Content-Length', + '11', + 'Content-Type', + 'application/octet-stream', + 'Last-Modified', + 'Wed, 24 Jun 2020 09:55:55 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D81824C9C67EF8"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '00e03c96-a01e-0007-590d-4a49ca000000', + 'x-ms-client-request-id', + 'a07246d0-d412-4b73-b304-c966648ecb76', + 'x-ms-version', + '2019-12-12', + 'x-ms-creation-time', + 'Wed, 24 Jun 2020 09:55:54 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', + 'Hot', + 'x-ms-access-tier-inferred', + 'true', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-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-server-encrypted,x-ms-access-tier,x-ms-access-tier-inferred,Accept-Ranges,Content-Length,Date,Transfer-Encoding', + 'Access-Control-Allow-Origin', + '*', + 'Date', + 'Wed, 24 Jun 2020 09:55:57 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/filesystem159299255423504608') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '00e03cc6-a01e-0007-040d-4a49ca000000', + 'x-ms-client-request-id', + '2a8fb699-f327-427d-9825-d807836519b8', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Wed, 24 Jun 2020 09:55:57 GMT' +]); diff --git a/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient/recording_set_expiry__relativetocreation.js b/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient/recording_set_expiry__relativetocreation.js new file mode 100644 index 000000000000..e865460d650f --- /dev/null +++ b/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient/recording_set_expiry__relativetocreation.js @@ -0,0 +1,178 @@ +let nock = require('nock'); + +module.exports.hash = "1b61a967d608c729ba89903bf69e5ff8"; + +module.exports.testInfo = {"uniqueName":{"filesystem":"filesystem159299255097900923","file":"file159299255140603883"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/filesystem159299255097900923') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Wed, 24 Jun 2020 09:55:50 GMT', + 'ETag', + '"0x8D81824C70679AD"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '00e03a72-a01e-0007-1c0d-4a49ca000000', + 'x-ms-client-request-id', + '87942801-834d-4d1f-8168-6b7e993594f0', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Wed, 24 Jun 2020 09:55:50 GMT' +]); + +nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) + .put('/filesystem159299255097900923/file159299255140603883') + .query(true) + .reply(201, "", [ + 'Last-Modified', + 'Wed, 24 Jun 2020 09:55:51 GMT', + 'ETag', + '"0x8D81824C75D6C43"', + 'Server', + 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '6f8e5601-501f-0003-2b0d-4ac4cd000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + 'caee113c-8d02-4cc7-833c-c4cbbf67e0ec', + 'Date', + 'Wed, 24 Jun 2020 09:55:50 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) + .patch('/filesystem159299255097900923/file159299255140603883', "Hello World") + .query(true) + .reply(202, "", [ + 'Server', + 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-request-id', + '6f8e5602-501f-0003-2c0d-4ac4cd000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + '0a5cbc12-2ae2-4560-94b9-4719100e4629', + 'Date', + 'Wed, 24 Jun 2020 09:55:51 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) + .patch('/filesystem159299255097900923/file159299255140603883') + .query(true) + .reply(200, "", [ + 'Last-Modified', + 'Wed, 24 Jun 2020 09:55:52 GMT', + 'ETag', + '"0x8D81824C7DF53B3"', + 'Server', + 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-server-encrypted', + 'false', + 'x-ms-request-id', + '6f8e5603-501f-0003-2d0d-4ac4cd000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + 'ce07f92e-cc8f-438e-a833-a236bf4e6884', + 'Date', + 'Wed, 24 Jun 2020 09:55:51 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/filesystem159299255097900923/file159299255140603883') + .query(true) + .reply(200, "", [ + 'Last-Modified', + 'Wed, 24 Jun 2020 09:55:52 GMT', + 'ETag', + '"0x8D81824C7DF53B3"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '00e03b36-a01e-0007-2e0d-4a49ca000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + '51df929b-5e32-437d-9527-01dc9348ed23', + 'Date', + 'Wed, 24 Jun 2020 09:55:52 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/filesystem159299255097900923/file159299255140603883') + .reply(200, "", [ + 'Content-Length', + '11', + 'Content-Type', + 'application/octet-stream', + 'Last-Modified', + 'Wed, 24 Jun 2020 09:55:52 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D81824C7DF53B3"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '00e03b52-a01e-0007-460d-4a49ca000000', + 'x-ms-client-request-id', + '9b880212-c59d-4477-81f8-0d942e429cc9', + 'x-ms-version', + '2019-12-12', + 'x-ms-creation-time', + 'Wed, 24 Jun 2020 09:55:51 GMT', + 'x-ms-expiry-time', + 'Wed, 24 Jun 2020 10:55:51 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', + 'Hot', + 'x-ms-access-tier-inferred', + 'true', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,Content-Type,Last-Modified,ETag,x-ms-creation-time,x-ms-expiry-time,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', + 'Wed, 24 Jun 2020 09:55:52 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/filesystem159299255097900923') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '00e03b74-a01e-0007-640d-4a49ca000000', + 'x-ms-client-request-id', + 'c5ae678f-e7d5-4063-9dcb-ac65af589cdc', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Wed, 24 Jun 2020 09:55:53 GMT' +]); diff --git a/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient/recording_set_expiry__relativetonow.js b/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient/recording_set_expiry__relativetonow.js new file mode 100644 index 000000000000..cb1edc154d60 --- /dev/null +++ b/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient/recording_set_expiry__relativetonow.js @@ -0,0 +1,156 @@ +let nock = require('nock'); + +module.exports.hash = "de1ed5242bebc0c085f969ddc1486386"; + +module.exports.testInfo = {"uniqueName":{"filesystem":"filesystem159299254439403398","file":"file159299254594100472"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/filesystem159299254439403398') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Wed, 24 Jun 2020 09:55:45 GMT', + 'ETag', + '"0x8D81824C3C7C8D7"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '00e038c9-a01e-0007-490d-4a49ca000000', + 'x-ms-client-request-id', + 'd5ee2979-c506-412f-93ae-75c0e7cf0024', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Wed, 24 Jun 2020 09:55:45 GMT' +]); + +nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) + .put('/filesystem159299254439403398/file159299254594100472') + .query(true) + .reply(201, "", [ + 'Last-Modified', + 'Wed, 24 Jun 2020 09:55:47 GMT', + 'ETag', + '"0x8D81824C4B7A0DF"', + 'Server', + 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '6f8e55b5-501f-0003-690d-4ac4cd000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + '8ede6eeb-edc0-416e-a9c9-c7460d70a766', + 'Date', + 'Wed, 24 Jun 2020 09:55:46 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) + .patch('/filesystem159299254439403398/file159299254594100472', "Hello World") + .query(true) + .reply(202, "", [ + 'Server', + 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-request-id', + '6f8e55bb-501f-0003-6f0d-4ac4cd000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + '9c370921-6e24-4587-93bb-9fe701baa41e', + 'Date', + 'Wed, 24 Jun 2020 09:55:46 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) + .patch('/filesystem159299254439403398/file159299254594100472') + .query(true) + .reply(200, "", [ + 'Last-Modified', + 'Wed, 24 Jun 2020 09:55:48 GMT', + 'ETag', + '"0x8D81824C5576AFC"', + 'Server', + 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-server-encrypted', + 'false', + 'x-ms-request-id', + '6f8e55c3-501f-0003-700d-4ac4cd000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + '7d6cab88-2231-487b-b040-b512fa3c0e7c', + 'Date', + 'Wed, 24 Jun 2020 09:55:47 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/filesystem159299254439403398/file159299254594100472') + .query(true) + .reply(200, "", [ + 'Last-Modified', + 'Wed, 24 Jun 2020 09:55:48 GMT', + 'ETag', + '"0x8D81824C5576AFC"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '00e039d8-a01e-0007-1f0d-4a49ca000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + 'a9331e1b-818a-41c7-b8cb-1f2e6355e02e', + 'Date', + 'Wed, 24 Jun 2020 09:55:48 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/filesystem159299254439403398/file159299254594100472') + .reply(404, "", [ + 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '00e03a3a-a01e-0007-6f0d-4a49ca000000', + 'x-ms-client-request-id', + 'bd867b0d-504a-4d8f-bac4-6acf493f478a', + 'x-ms-version', + '2019-12-12', + 'x-ms-error-code', + 'BlobNotFound', + 'Access-Control-Expose-Headers', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-error-code,Content-Length,Date,Transfer-Encoding', + 'Access-Control-Allow-Origin', + '*', + 'Date', + 'Wed, 24 Jun 2020 09:55:49 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/filesystem159299254439403398') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '00e03a5e-a01e-0007-0b0d-4a49ca000000', + 'x-ms-client-request-id', + 'f953a6a0-8863-4f31-823c-4cd1328dfa90', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Wed, 24 Jun 2020 09:55:50 GMT' +]); diff --git a/sdk/storage/storage-file-datalake/review/storage-file-datalake.api.md b/sdk/storage/storage-file-datalake/review/storage-file-datalake.api.md index fa3d6f8f6054..9083828ef2e5 100644 --- a/sdk/storage/storage-file-datalake/review/storage-file-datalake.api.md +++ b/sdk/storage/storage-file-datalake/review/storage-file-datalake.api.md @@ -131,7 +131,7 @@ export type CredentialPolicyCreator = (nextPolicy: RequestPolicy, options: Reque // @public export class DataLakeDirectoryClient extends DataLakePathClient { - create(resourceType: PathResourceType, options?: PathCreateOptions): Promise; + create(resourceType: PathResourceTypeModel, options?: PathCreateOptions): Promise; create(options?: DirectoryCreateOptions): Promise; getFileClient(fileName: string): DataLakeFileClient; getSubdirectoryClient(subdirectoryName: string): DataLakeDirectoryClient; @@ -142,13 +142,14 @@ export class DataLakeFileClient extends DataLakePathClient { constructor(url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions); constructor(url: string, pipeline: Pipeline); append(body: HttpRequestBody, offset: number, length: number, options?: FileAppendOptions): Promise; - create(resourceType: PathResourceType, options?: PathCreateOptions): Promise; + create(resourceType: PathResourceTypeModel, options?: PathCreateOptions): Promise; create(options?: FileCreateOptions): Promise; flush(position: number, options?: FileFlushOptions): Promise; read(offset?: number, count?: number, options?: FileReadOptions): Promise; readToBuffer(buffer: Buffer, offset?: number, count?: number, options?: FileReadToBufferOptions): Promise; readToBuffer(offset?: number, count?: number, options?: FileReadToBufferOptions): Promise; readToFile(filePath: string, offset?: number, count?: number, options?: FileReadOptions): Promise; + setExpiry(mode: FileExpiryMode, options?: FileSetExpiryOptions): Promise; upload(data: Buffer | Blob | ArrayBuffer | ArrayBufferView, options?: FileParallelUploadOptions): Promise; uploadFile(filePath: string, options?: FileParallelUploadOptions): Promise; uploadStream(stream: Readable, options?: FileParallelUploadOptions): Promise; @@ -197,7 +198,7 @@ export class DataLakeLeaseClient { export class DataLakePathClient extends StorageClient { constructor(url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions); constructor(url: string, pipeline: Pipeline); - create(resourceType: PathResourceType, options?: PathCreateOptions): Promise; + create(resourceType: PathResourceTypeModel, options?: PathCreateOptions): Promise; delete(recursive?: boolean, options?: PathDeleteOptions): Promise; exists(options?: PathExistsOptions): Promise; get fileSystemName(): string; @@ -295,6 +296,9 @@ export interface FileCreateOptions extends PathCreateOptions { export interface FileCreateResponse extends PathCreateResponse { } +// @public +export type FileExpiryMode = 'NeverExpire' | 'RelativeToCreation' | 'RelativeToNow' | 'Absolute'; + // @public (undocumented) export interface FileFlushOptions extends CommonOptions { // (undocumented) @@ -421,6 +425,32 @@ export interface FileReadToBufferOptions extends CommonOptions { onProgress?: (progress: TransferProgressEvent) => void; } +// @public +export interface FileSetExpiryHeaders { + clientRequestId?: string; + date?: Date; + // (undocumented) + errorCode?: string; + etag?: string; + lastModified?: Date; + requestId?: string; + version?: string; +} + +// @public +export interface FileSetExpiryOptions extends CommonOptions { + abortSignal?: AbortSignalLike; + expiresOn?: Date; + timeToExpireInMs?: number; +} + +// @public +export type FileSetExpiryResponse = FileSetExpiryHeaders & { + _response: coreHttp.HttpResponse & { + parsedHeaders: FileSetExpiryHeaders; + }; +}; + // @public (undocumented) export interface FileSystemCreateHeaders { // (undocumented) @@ -979,6 +1009,9 @@ export enum PathGetPropertiesAction { GetStatus = "getStatus" } +// @public +export type PathGetPropertiesActionModel = 'getAccessControl' | 'getStatus'; + // @public (undocumented) export interface PathGetPropertiesHeaders { // (undocumented) @@ -1029,6 +1062,7 @@ export interface PathGetPropertiesHeaders { encryptionKeySha256?: string; // (undocumented) etag?: string; + expiresOn?: Date; // (undocumented) isIncrementalCopy?: boolean; // (undocumented) @@ -1195,6 +1229,9 @@ export enum PathRenameMode { Posix = "posix" } +// @public +export type PathRenameModeModel = 'legacy' | 'posix'; + // @public export enum PathResourceType { // (undocumented) @@ -1203,6 +1240,9 @@ export enum PathResourceType { File = "file" } +// @public +export type PathResourceTypeModel = 'directory' | 'file'; + // @public export interface PathSetAccessControlHeaders { clientRequestId?: string; diff --git a/sdk/storage/storage-file-datalake/src/StorageClient.ts b/sdk/storage/storage-file-datalake/src/StorageClient.ts index a1d557ebb0e7..0f7478a7acc8 100644 --- a/sdk/storage/storage-file-datalake/src/StorageClient.ts +++ b/sdk/storage/storage-file-datalake/src/StorageClient.ts @@ -63,6 +63,7 @@ export abstract class StorageClient { * @memberof StorageClient */ protected readonly pipeline: Pipeline; + /** * Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. * @@ -70,6 +71,7 @@ export abstract class StorageClient { * @memberof StorageClient */ public readonly credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential; + /** * StorageClient is a reference to protocol layer operations entry, which is * generated by AutoRest generator. @@ -79,6 +81,17 @@ export abstract class StorageClient { * @memberof StorageClient */ protected readonly storageClientContext: StorageClientContext; + + /** + * storageClientContextWithBlobEndpoint is a reference to protocol layer operations entry, which is + * generated by AutoRest generator, with its url pointing to the Blob endpoint. + * + * @protected + * @type {StorageClientContext} + * @memberof StorageClient + */ + protected readonly storageClientContextToBlobEndpoint: StorageClientContext; + /** * @protected * @type {boolean} @@ -103,6 +116,10 @@ export abstract class StorageClient { this.dfsEndpointUrl, pipeline.toServiceClientOptions() ); + this.storageClientContextToBlobEndpoint = new StorageClientContext( + this.blobEndpointUrl, + pipeline.toServiceClientOptions() + ); this.isHttps = iEqual(getURLScheme(this.url) || "", "https"); @@ -120,5 +137,7 @@ export abstract class StorageClient { // Override protocol layer's default content-type const storageClientContext = this.storageClientContext as any; storageClientContext.requestContentType = undefined; + const storageClientContextWithBlobEndpoint = this.storageClientContextToBlobEndpoint as any; + storageClientContextWithBlobEndpoint.requestContentType = undefined; } } diff --git a/sdk/storage/storage-file-datalake/src/clients.ts b/sdk/storage/storage-file-datalake/src/clients.ts index 5adbaaa0b7e4..47e4fc7d159f 100644 --- a/sdk/storage/storage-file-datalake/src/clients.ts +++ b/sdk/storage/storage-file-datalake/src/clients.ts @@ -31,15 +31,13 @@ import { PathExistsOptions, PathGetAccessControlOptions, PathGetAccessControlResponse, - PathGetPropertiesAction, PathGetPropertiesOptions, PathGetPropertiesResponse, PathHttpHeaders, PathMoveOptions, PathMoveResponse, PathPermissions, - PathRenameMode, - PathResourceType, + PathResourceTypeModel, PathSetAccessControlOptions, PathSetAccessControlResponse, PathSetHttpHeadersOptions, @@ -47,7 +45,10 @@ import { PathSetMetadataOptions, PathSetMetadataResponse, PathSetPermissionsOptions, - PathSetPermissionsResponse + PathSetPermissionsResponse, + FileExpiryMode, + FileSetExpiryOptions, + FileSetExpiryResponse } from "./models"; import { newPipeline, Pipeline, StoragePipelineOptions } from "./Pipeline"; import { StorageClient } from "./StorageClient"; @@ -212,13 +213,13 @@ export class DataLakePathClient extends StorageClient { * * @see https://docs.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/create * - * @param {PathResourceType} resourceType Resource type, "directory" or "file". + * @param {PathResourceTypeModel} resourceType Resource type, "directory" or "file". * @param {PathCreateOptions} [options={}] Optional. Options when creating path. * @returns {Promise} * @memberof DataLakePathClient */ public async create( - resourceType: PathResourceType, + resourceType: PathResourceTypeModel, options: PathCreateOptions = {} ): Promise { options.conditions = options.conditions || {}; @@ -335,7 +336,7 @@ export class DataLakePathClient extends StorageClient { ); try { const response = await this.pathContext.getProperties({ - action: PathGetPropertiesAction.GetAccessControl, + action: "getAccessControl", upn: options.userPrincipalName, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions, @@ -611,7 +612,7 @@ export class DataLakePathClient extends StorageClient { try { return await destPathClient.pathContext.create({ - mode: PathRenameMode.Legacy, // By default + mode: "legacy", // By default renameSource, sourceLeaseId: options.conditions.leaseId, leaseAccessConditions: options.destinationConditions, @@ -650,13 +651,13 @@ export class DataLakeDirectoryClient extends DataLakePathClient { * * @see https://docs.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/create * - * @param {PathResourceType} resourceType Resource type, must be "directory" for DataLakeDirectoryClient. + * @param {PathResourceTypeModel} resourceType Resource type, must be "directory" for DataLakeDirectoryClient. * @param {PathCreateOptions} [options] Optional. Options when creating directory. * @returns {Promise} * @memberof DataLakeDirectoryClient */ public async create( - resourceType: PathResourceType, + resourceType: PathResourceTypeModel, options?: PathCreateOptions ): Promise; @@ -672,16 +673,16 @@ export class DataLakeDirectoryClient extends DataLakePathClient { public async create(options?: DirectoryCreateOptions): Promise; public async create( - resourceTypeOrOptions?: PathResourceType | PathCreateOptions, + resourceTypeOrOptions?: PathResourceTypeModel | PathCreateOptions, options: PathCreateOptions = {} ): Promise { - if (resourceTypeOrOptions === PathResourceType.Directory) { - return super.create(resourceTypeOrOptions as PathResourceType, options); + if (resourceTypeOrOptions === "directory") { + return super.create(resourceTypeOrOptions as PathResourceTypeModel, options); } - if (resourceTypeOrOptions === PathResourceType.File) { + if (resourceTypeOrOptions === "file") { throw TypeError( - `DataLakeDirectoryClient:create() resourceType cannot be ${PathResourceType.File}. Refer to DataLakeFileClient for file creation.` + `DataLakeDirectoryClient:create() resourceType cannot be ${resourceTypeOrOptions}. Refer to DataLakeFileClient for file creation.` ); } @@ -692,7 +693,7 @@ export class DataLakeDirectoryClient extends DataLakePathClient { options.tracingOptions ); try { - return await super.create(PathResourceType.Directory, { + return await super.create("directory", { ...options, tracingOptions: { ...options.tracingOptions, @@ -756,6 +757,15 @@ export class DataLakeFileClient extends DataLakePathClient { */ private pathContextInternal: PathOperations; + /** + * pathContextInternal provided by protocol layer, with its url pointing to the Blob endpoint. + * + * @private + * @type {PathOperations} + * @memberof DataLakeFileClient + */ + private pathContextInternalToBlobEndpoint: PathOperations; + /** * blobClientInternal provided by @azure/storage-blob package. * @@ -817,6 +827,9 @@ export class DataLakeFileClient extends DataLakePathClient { } this.pathContextInternal = new PathOperations(this.storageClientContext); + this.pathContextInternalToBlobEndpoint = new PathOperations( + this.storageClientContextToBlobEndpoint + ); this.blobClientInternal = new BlobClient(this.blobEndpointUrl, this.pipeline); } @@ -825,13 +838,13 @@ export class DataLakeFileClient extends DataLakePathClient { * * @see https://docs.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/create * - * @param {PathResourceType} resourceType Resource type, must be "file" for DataLakeFileClient. + * @param {PathResourceTypeModel} resourceType Resource type, must be "file" for DataLakeFileClient. * @param {PathCreateOptions} [options] Optional. Options when creating file. * @returns {Promise} * @memberof DataLakeFileClient */ public async create( - resourceType: PathResourceType, + resourceType: PathResourceTypeModel, options?: PathCreateOptions ): Promise; @@ -847,16 +860,16 @@ export class DataLakeFileClient extends DataLakePathClient { public async create(options?: FileCreateOptions): Promise; public async create( - resourceTypeOrOptions?: PathResourceType | PathCreateOptions, + resourceTypeOrOptions?: PathResourceTypeModel | PathCreateOptions, options: PathCreateOptions = {} ): Promise { - if (resourceTypeOrOptions === PathResourceType.File) { - return super.create(resourceTypeOrOptions as PathResourceType, options); + if (resourceTypeOrOptions === "file") { + return super.create(resourceTypeOrOptions as PathResourceTypeModel, options); } - if (resourceTypeOrOptions === PathResourceType.Directory) { + if (resourceTypeOrOptions === "directory") { throw TypeError( - `DataLakeFileClient:create() resourceType cannot be ${PathResourceType.Directory}. Refer to DataLakeDirectoryClient for directory creation.` + `DataLakeFileClient:create() resourceType cannot be ${resourceTypeOrOptions}. Refer to DataLakeDirectoryClient for directory creation.` ); } @@ -864,7 +877,7 @@ export class DataLakeFileClient extends DataLakePathClient { options.conditions = options.conditions || {}; const { span, spanOptions } = createSpan("DataLakeFileClient-create", options.tracingOptions); try { - return await super.create(PathResourceType.File, { + return await super.create("file", { ...options, tracingOptions: { ...options.tracingOptions, @@ -1228,7 +1241,7 @@ export class DataLakeFileClient extends DataLakePathClient { if (numBlocks > BLOCK_BLOB_MAX_BLOCKS) { throw new RangeError( `The data's size is too big or the chunkSize is too small;` + - `the number of chunks must be <= ${BLOCK_BLOB_MAX_BLOCKS}` + `the number of chunks must be <= ${BLOCK_BLOB_MAX_BLOCKS}` ); } @@ -1509,4 +1522,59 @@ export class DataLakeFileClient extends DataLakePathClient { span.end(); } } + + /** + * Sets an expiry time on a file, once that time is met the file is deleted. + * + * @param {FileExpiryMode} mode + * @param {FileSetExpiryOptions} [options={}] + * @returns {Promise} + * @memberof DataLakeFileClient + */ + public async setExpiry( + mode: FileExpiryMode, + options: FileSetExpiryOptions = {} + ): Promise { + const { span, spanOptions } = createSpan( + "DataLakeFileClient-setExpiry", + options.tracingOptions + ); + try { + let expiresOn: string | undefined = undefined; + if (mode === "RelativeToNow" || mode === "RelativeToCreation") { + if (!options.timeToExpireInMs) { + throw new Error(`Should specify options.timeToExpireInMs when using mode ${mode}.`); + } + // MINOR: need check against <= 2**64, but JS number has the precision problem. + expiresOn = Math.round(options.timeToExpireInMs).toString(); + } + + if (mode === "Absolute") { + if (!options.expiresOn) { + throw new Error(`Should specify options.expiresOn when using mode ${mode}.`); + } + const now = new Date(); + if (!(options.expiresOn!.getTime() > now.getTime())) { + throw new Error( + `options.expiresOn should be later than now: ${now.toUTCString()} when using mode ${mode}, but is ${options.expiresOn?.toUTCString()}` + ); + } + expiresOn = options.expiresOn!.toUTCString(); + } + + const adaptedOptions = { ...options, expiresOn }; + return await this.pathContextInternalToBlobEndpoint.setExpiry(mode, { + ...adaptedOptions, + tracingOptions: { ...options.tracingOptions, spanOptions } + }); + } catch (e) { + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e.message + }); + throw e; + } finally { + span.end(); + } + } } diff --git a/sdk/storage/storage-file-datalake/src/generated/src/models/index.ts b/sdk/storage/storage-file-datalake/src/generated/src/models/index.ts index 5befeea12216..c61a8ed49e58 100644 --- a/sdk/storage/storage-file-datalake/src/generated/src/models/index.ts +++ b/sdk/storage/storage-file-datalake/src/generated/src/models/index.ts @@ -1714,11 +1714,7 @@ export interface PathSetExpiryHeaders { * @readonly * @enum {string} */ -export enum PathSetAccessControlRecursiveMode { - Set = 'set', - Modify = 'modify', - Remove = 'remove', -} +export type PathSetAccessControlRecursiveMode = 'set' | 'modify' | 'remove'; /** * Defines values for PathExpiryOptions. @@ -1726,12 +1722,7 @@ export enum PathSetAccessControlRecursiveMode { * @readonly * @enum {string} */ -export enum PathExpiryOptions { - NeverExpire = 'NeverExpire', - RelativeToCreation = 'RelativeToCreation', - RelativeToNow = 'RelativeToNow', - Absolute = 'Absolute', -} +export type PathExpiryOptions = 'NeverExpire' | 'RelativeToCreation' | 'RelativeToNow' | 'Absolute'; /** * Defines values for PathResourceType. @@ -1739,10 +1730,7 @@ export enum PathExpiryOptions { * @readonly * @enum {string} */ -export enum PathResourceType { - Directory = 'directory', - File = 'file', -} +export type PathResourceType = 'directory' | 'file'; /** * Defines values for PathRenameMode. @@ -1750,10 +1738,7 @@ export enum PathResourceType { * @readonly * @enum {string} */ -export enum PathRenameMode { - Legacy = 'legacy', - Posix = 'posix', -} +export type PathRenameMode = 'legacy' | 'posix'; /** * Defines values for PathUpdateAction. @@ -1762,13 +1747,7 @@ export enum PathRenameMode { * @readonly * @enum {string} */ -export enum PathUpdateAction { - Append = 'append', - Flush = 'flush', - SetProperties = 'setProperties', - SetAccessControl = 'setAccessControl', - SetAccessControlRecursive = 'setAccessControlRecursive', -} +export type PathUpdateAction = 'append' | 'flush' | 'setProperties' | 'setAccessControl' | 'setAccessControlRecursive'; /** * Defines values for PathLeaseAction. @@ -1776,13 +1755,7 @@ export enum PathUpdateAction { * @readonly * @enum {string} */ -export enum PathLeaseAction { - Acquire = 'acquire', - Break = 'break', - Change = 'change', - Renew = 'renew', - Release = 'release', -} +export type PathLeaseAction = 'acquire' | 'break' | 'change' | 'renew' | 'release'; /** * Defines values for PathGetPropertiesAction. @@ -1790,10 +1763,7 @@ export enum PathLeaseAction { * @readonly * @enum {string} */ -export enum PathGetPropertiesAction { - GetAccessControl = 'getAccessControl', - GetStatus = 'getStatus', -} +export type PathGetPropertiesAction = 'getAccessControl' | 'getStatus'; /** * Contains response data for the listFileSystems operation. diff --git a/sdk/storage/storage-file-datalake/src/generated/src/operations/pathOperations.ts b/sdk/storage/storage-file-datalake/src/generated/src/operations/pathOperations.ts index 98968b17ea7d..e8457dddec57 100644 --- a/sdk/storage/storage-file-datalake/src/generated/src/operations/pathOperations.ts +++ b/sdk/storage/storage-file-datalake/src/generated/src/operations/pathOperations.ts @@ -72,11 +72,15 @@ export class PathOperations { * the owner, owning group, and others, so the x-ms-permissions and x-ms-acl request headers are * mutually exclusive. Possible values include: 'append', 'flush', 'setProperties', * 'setAccessControl', 'setAccessControlRecursive' + * @param mode Mode "set" sets POSIX access control rights on files and directories, "modify" + * modifies one or more POSIX access control rights that pre-exist on files and directories, + * "remove" removes one or more POSIX access control rights that were present earlier on files and + * directories. Possible values include: 'set', 'modify', 'remove' * @param body Initial data * @param [options] The optional parameters * @returns Promise */ - update(action: Models.PathUpdateAction, body: coreHttp.HttpRequestBody, options?: Models.PathUpdateOptionalParams): Promise; + update(action: Models.PathUpdateAction, mode: Models.PathSetAccessControlRecursiveMode, body: coreHttp.HttpRequestBody, options?: Models.PathUpdateOptionalParams): Promise; /** * @param action The action must be "append" to upload data to be appended to a file, "flush" to * flush previously uploaded data to a file, "setProperties" to set the properties of a file or @@ -87,10 +91,14 @@ export class PathOperations { * the owner, owning group, and others, so the x-ms-permissions and x-ms-acl request headers are * mutually exclusive. Possible values include: 'append', 'flush', 'setProperties', * 'setAccessControl', 'setAccessControlRecursive' + * @param mode Mode "set" sets POSIX access control rights on files and directories, "modify" + * modifies one or more POSIX access control rights that pre-exist on files and directories, + * "remove" removes one or more POSIX access control rights that were present earlier on files and + * directories. Possible values include: 'set', 'modify', 'remove' * @param body Initial data * @param callback The callback */ - update(action: Models.PathUpdateAction, body: coreHttp.HttpRequestBody, callback: coreHttp.ServiceCallback): void; + update(action: Models.PathUpdateAction, mode: Models.PathSetAccessControlRecursiveMode, body: coreHttp.HttpRequestBody, callback: coreHttp.ServiceCallback): void; /** * @param action The action must be "append" to upload data to be appended to a file, "flush" to * flush previously uploaded data to a file, "setProperties" to set the properties of a file or @@ -101,15 +109,20 @@ export class PathOperations { * the owner, owning group, and others, so the x-ms-permissions and x-ms-acl request headers are * mutually exclusive. Possible values include: 'append', 'flush', 'setProperties', * 'setAccessControl', 'setAccessControlRecursive' + * @param mode Mode "set" sets POSIX access control rights on files and directories, "modify" + * modifies one or more POSIX access control rights that pre-exist on files and directories, + * "remove" removes one or more POSIX access control rights that were present earlier on files and + * directories. Possible values include: 'set', 'modify', 'remove' * @param body Initial data * @param options The optional parameters * @param callback The callback */ - update(action: Models.PathUpdateAction, body: coreHttp.HttpRequestBody, options: Models.PathUpdateOptionalParams, callback: coreHttp.ServiceCallback): void; - update(action: Models.PathUpdateAction, body: coreHttp.HttpRequestBody, options?: Models.PathUpdateOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + update(action: Models.PathUpdateAction, mode: Models.PathSetAccessControlRecursiveMode, body: coreHttp.HttpRequestBody, options: Models.PathUpdateOptionalParams, callback: coreHttp.ServiceCallback): void; + update(action: Models.PathUpdateAction, mode: Models.PathSetAccessControlRecursiveMode, body: coreHttp.HttpRequestBody, options?: Models.PathUpdateOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { action, + mode, body, options }, @@ -286,22 +299,35 @@ export class PathOperations { /** * Set the access control list for a path and subpaths. + * @param mode Mode "set" sets POSIX access control rights on files and directories, "modify" + * modifies one or more POSIX access control rights that pre-exist on files and directories, + * "remove" removes one or more POSIX access control rights that were present earlier on files and + * directories. Possible values include: 'set', 'modify', 'remove' * @param [options] The optional parameters * @returns Promise */ - setAccessControlRecursive(options?: Models.PathSetAccessControlRecursiveOptionalParams): Promise; + setAccessControlRecursive(mode: Models.PathSetAccessControlRecursiveMode, options?: Models.PathSetAccessControlRecursiveOptionalParams): Promise; /** + * @param mode Mode "set" sets POSIX access control rights on files and directories, "modify" + * modifies one or more POSIX access control rights that pre-exist on files and directories, + * "remove" removes one or more POSIX access control rights that were present earlier on files and + * directories. Possible values include: 'set', 'modify', 'remove' * @param callback The callback */ - setAccessControlRecursive(callback: coreHttp.ServiceCallback): void; + setAccessControlRecursive(mode: Models.PathSetAccessControlRecursiveMode, callback: coreHttp.ServiceCallback): void; /** + * @param mode Mode "set" sets POSIX access control rights on files and directories, "modify" + * modifies one or more POSIX access control rights that pre-exist on files and directories, + * "remove" removes one or more POSIX access control rights that were present earlier on files and + * directories. Possible values include: 'set', 'modify', 'remove' * @param options The optional parameters * @param callback The callback */ - setAccessControlRecursive(options: Models.PathSetAccessControlRecursiveOptionalParams, callback: coreHttp.ServiceCallback): void; - setAccessControlRecursive(options?: Models.PathSetAccessControlRecursiveOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + setAccessControlRecursive(mode: Models.PathSetAccessControlRecursiveMode, options: Models.PathSetAccessControlRecursiveOptionalParams, callback: coreHttp.ServiceCallback): void; + setAccessControlRecursive(mode: Models.PathSetAccessControlRecursiveMode, options?: Models.PathSetAccessControlRecursiveOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { + mode, options }, setAccessControlRecursiveOperationSpec, diff --git a/sdk/storage/storage-file-datalake/src/models.ts b/sdk/storage/storage-file-datalake/src/models.ts index 92183357423c..49c1a179c003 100644 --- a/sdk/storage/storage-file-datalake/src/models.ts +++ b/sdk/storage/storage-file-datalake/src/models.ts @@ -37,15 +37,18 @@ export { PathSetAccessControlHeaders, PathSetAccessControlResponse, PathSetAccessControlResponse as PathSetPermissionsResponse, - PathResourceType, + PathResourceType as PathResourceTypeModel, PathUpdateHeaders, PathAppendDataHeaders, PathFlushDataHeaders, PathAppendDataResponse as FileAppendResponse, PathFlushDataResponse as FileFlushResponse, PathFlushDataResponse as FileUploadResponse, - PathGetPropertiesAction, - PathRenameMode + PathGetPropertiesAction as PathGetPropertiesActionModel, + PathRenameMode as PathRenameModeModel, + PathExpiryOptions as FileExpiryMode, + PathSetExpiryResponse as FileSetExpiryResponse, + PathSetExpiryHeaders as FileSetExpiryHeaders } from "./generated/src/models"; export { PathCreateResponse }; @@ -262,12 +265,12 @@ export interface SignedIdentifier { export type FileSystemGetAccessPolicyResponse = { signedIdentifiers: SignedIdentifier[]; } & FileSystemGetAccessPolicyHeaders & { - _response: HttpResponse & { - parsedHeaders: FileSystemGetAccessPolicyHeaders; - bodyAsText: string; - parsedBody: SignedIdentifier[]; + _response: HttpResponse & { + parsedHeaders: FileSystemGetAccessPolicyHeaders; + bodyAsText: string; + parsedBody: SignedIdentifier[]; + }; }; -}; export interface FileSystemSetAccessPolicyOptions extends CommonOptions { abortSignal?: AbortSignalLike; @@ -354,7 +357,7 @@ export interface Metadata { export interface DataLakeRequestConditions extends ModifiedAccessConditions, - LeaseAccessConditions { } + LeaseAccessConditions {} export interface RolePermissions { read: boolean; @@ -488,6 +491,11 @@ export interface PathGetPropertiesHeaders { accessTierInferred?: boolean; archiveStatus?: string; accessTierChangedOn?: Date; + + /** + * The time the file will expire. + */ + expiresOn?: Date; } export type PathGetPropertiesResponse = PathGetPropertiesHeaders & { @@ -589,13 +597,45 @@ export interface PathExistsOptions extends CommonOptions { // customerProvidedKey?: CpkInfo; not supported yet } +// Keeping these for backward compatibility when we changed to use string unions. +/** + * Defines values for PathGetPropertiesAction. + * Possible values include: 'getAccessControl', 'getStatus' + * @readonly + * @enum {string} + */ +export enum PathGetPropertiesAction { + GetAccessControl = "getAccessControl", + GetStatus = "getStatus" +} +/** + * Defines values for PathRenameMode. + * Possible values include: 'legacy', 'posix' + * @readonly + * @enum {string} + */ +export enum PathRenameMode { + Legacy = "legacy", + Posix = "posix" +} +/** + * Defines values for PathResourceType. + * Possible values include: 'directory', 'file' + * @readonly + * @enum {string} + */ +export enum PathResourceType { + Directory = "directory", + File = "file" +} + /****************************************************************/ /** DataLakeDirectoryClient option and response related models **/ /****************************************************************/ -export interface DirectoryCreateOptions extends PathCreateOptions { } +export interface DirectoryCreateOptions extends PathCreateOptions {} -export interface DirectoryCreateResponse extends PathCreateResponse { } +export interface DirectoryCreateResponse extends PathCreateResponse {} /***********************************************************/ /** DataLakeFileClient option and response related models **/ @@ -667,9 +707,9 @@ export interface FileFlushOptions extends CommonOptions { pathHttpHeaders?: PathHttpHeaders; } -export interface FileCreateOptions extends PathCreateOptions { } +export interface FileCreateOptions extends PathCreateOptions {} -export interface FileCreateResponse extends PathCreateResponse { } +export interface FileCreateResponse extends PathCreateResponse {} /** * Option interface for Data Lake file - Upload operations @@ -858,6 +898,40 @@ export interface FileReadToBufferOptions extends CommonOptions { concurrency?: number; } +/** + * Option interface for the {@link DataLakeFileClient.setExpiry} operation. + * + * @export + * @interface FileSetExpiryOptions + */ +export interface FileSetExpiryOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof FileSetExpiryOptions + */ + abortSignal?: AbortSignalLike; + + /** + * The time to set the file to expire on, used in combination with the "Absolute" {@link FileExpiryMode}. + * A time in the past is not allowed and milliseconds will be dropped. + * + * @type {Date} + * @memberof FileSetExpiryOptions + */ + expiresOn?: Date; + + /** + * The number of milliseconds to elapse before the file expires, used in combination with the "RelativeToCreation" or "RelativeToNow" {@link FileExpiryMode}. + * + * @type {number} + * @memberof FileSetExpiryOptions + */ + timeToExpireInMs?: number; +} + /***********************************************************/ /** DataLakeLeaseClient option and response related models */ /***********************************************************/ diff --git a/sdk/storage/storage-file-datalake/swagger/README.md b/sdk/storage/storage-file-datalake/swagger/README.md index b991f690b2b5..d185aa6bf4f9 100644 --- a/sdk/storage/storage-file-datalake/swagger/README.md +++ b/sdk/storage/storage-file-datalake/swagger/README.md @@ -15,7 +15,6 @@ output-folder: ../src/generated input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/storage-dataplane-preview/specification/storage/data-plane/Microsoft.StorageDataLake/stable/2019-12-12/DataLakeStorage.json model-date-time-as-string: true optional-response-headers: true -enum-types: true ``` ## Customizations for Track 2 Generator @@ -93,6 +92,7 @@ directive: ``` ### Rename eTag -> etag + ``` yaml directive: - from: swagger-document @@ -104,3 +104,13 @@ directive: transform: > $["x-ms-client-name"] = "etag"; ``` + +### workaround: adding parameter location for `PathSetAccessControlRecursiveMode` + +``` yaml +directive: +- from: swagger-document + where: $["parameters"].PathSetAccessControlRecursiveMode + transform: > + $["x-ms-parameter-location"] = "method"; +``` diff --git a/sdk/storage/storage-file-datalake/test/pathclient.spec.ts b/sdk/storage/storage-file-datalake/test/pathclient.spec.ts index 0fbc917c0b8f..ae85e074743e 100644 --- a/sdk/storage/storage-file-datalake/test/pathclient.spec.ts +++ b/sdk/storage/storage-file-datalake/test/pathclient.spec.ts @@ -1,5 +1,5 @@ import { AbortController } from "@azure/abort-controller"; -import { isNode, URLBuilder } from "@azure/core-http"; +import { isNode, URLBuilder, delay } from "@azure/core-http"; import { setTracer, SpanGraph, TestTracer } from "@azure/core-tracing"; import { record } from "@azure/test-utils-recorder"; import * as assert from "assert"; @@ -332,4 +332,54 @@ describe("DataLakePathClient", () => { const dirResult = await newDirectoryClient.exists(); assert.ok(dirResult === false, "exists() should return false for a non-existing directory"); }); + + it("set expiry - NeverExpire", async () => { + await fileClient.setExpiry("NeverExpire"); + const getRes = await fileClient.getProperties(); + assert.equal(getRes.expiresOn, undefined); + }); + + it("set expiry - Absolute", async () => { + const now = new Date(); + const recordedNow = recorder.newDate("now"); // Flaky workaround for the recording to work. + const delta = 5 * 1000; + const expiresOn = new Date(now.getTime() + delta); + await fileClient.setExpiry("Absolute", { expiresOn }); + + const getRes = await fileClient.getProperties(); + const recordedExpiresOn = new Date(recordedNow.getTime() + delta); + recordedExpiresOn.setMilliseconds(0); // milliseconds dropped + assert.equal(getRes.expiresOn?.getTime(), recordedExpiresOn.getTime()); + + await delay(delta); + assert.ok(!(await fileClient.exists())); + }); + + it("set expiry - RelativeToNow", async () => { + const delta = 1000; + await fileClient.setExpiry("RelativeToNow", { timeToExpireInMs: delta }); + + await delay(delta); + assert.ok(!(await fileClient.exists())); + }); + + it("set expiry - RelativeToCreation", async () => { + const delta = 1000 * 3600 + 0.12; + await fileClient.setExpiry("RelativeToCreation", { timeToExpireInMs: delta }); + + const getRes = await fileClient.getProperties(); + assert.equal(getRes.expiresOn?.getTime(), getRes.createdOn!.getTime() + Math.round(delta)); + }); + + it("set expiry - override", async () => { + const delta = 1000 * 3600; + await fileClient.setExpiry("RelativeToCreation", { timeToExpireInMs: delta }); + + const getRes = await fileClient.getProperties(); + assert.equal(getRes.expiresOn?.getTime(), getRes.createdOn!.getTime() + delta); + + await fileClient.setExpiry("NeverExpire"); + const getRes2 = await fileClient.getProperties(); + assert.equal(getRes2.expiresOn, undefined); + }); });