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/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 3bc2ceb2f803..45bb37c0c2b1 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -25,8 +25,10 @@ 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' '@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' @@ -34,6 +36,12 @@ dependencies: '@rush-temp/testhub': 'file:projects/testhub.tgz' lockfileVersion: 5.1 packages: + /@azure/abort-controller/1.0.1: + dependencies: + tslib: 1.13.0 + dev: false + resolution: + integrity: sha512-wP2Jw6uPp8DEDy0n4KNidvwzDjyVV2xnycEIq7nPzj1rHyb/r+t3OPeNT1INZePP2wy5ZqlwyuyOMTi0ePyY1A== /@azure/amqp-common/1.0.0-preview.9: dependencies: '@azure/ms-rest-nodeauth': 0.9.3 @@ -55,6 +63,54 @@ packages: dev: false resolution: integrity: sha512-RVG1Ad3Afv9gwFFmpeCXQAm+Sa0L8KEZRJJAAZEGoYDb6EoO1iQDVmoBz720h8mdrGpi0D60xNU/KhriIwuZfQ== + /@azure/core-asynciterator-polyfill/1.0.0: + dev: false + resolution: + integrity: sha512-kmv8CGrPfN9SwMwrkiBK9VTQYxdFQEGe0BmQk+M8io56P9KNzpAxcWE/1fxJj7uouwN4kXF0BHW8DNlgx+wtCg== + /@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.13.0 + dev: false + resolution: + integrity: sha512-IUbP/f3v96dpHgXUwsAjUwDzjlUjawyUhWhGKKB6Qxy+iqppC/pVBPyc6kdpyTe7H30HN+4H3f0lar7Wp9Hx6A== + /@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.7 + '@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.13.0 + 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.13.0 + 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.8: dependencies: '@opencensus/web-types': 0.0.7 @@ -99,6 +155,12 @@ packages: dev: false resolution: integrity: sha512-h58oEROO2tniBTSmFmuHBGvuiFuYsHQBWTVdpT2AiOED4F2Kgf7rs0MPYPXiBcDvihC70M7QPRhIQ3JK1H/ygw== + /@azure/logger/1.0.0: + dependencies: + tslib: 1.13.0 + dev: false + resolution: + integrity: sha512-g2qLDgvmhyIxR3JVS8N67CyIOeFRKQlX/llxYJQr1OSGQqM3HTpVP8MjmjcEKbL/OIt2N9C9UFaNQuKOw1laOA== /@azure/ms-rest-azure-env/1.1.2: dev: false resolution: @@ -124,6 +186,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.13.0 + dev: false + resolution: + integrity: sha512-PCHgG4r3xLt5FaFj+uiMqrRpuzD3TD17cvxCeA1JKK2bJEf8b07H3QRLQVf0DM1MmvYY8FgQagkWZTp+jr9yew== /@babel/code-frame/7.10.1: dependencies: '@babel/highlight': 7.10.1 @@ -861,21 +937,21 @@ packages: node: '>= 0.6' resolution: integrity: sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== - /acorn-jsx/5.2.0_acorn@7.2.0: + /acorn-jsx/5.2.0_acorn@7.3.1: dependencies: - acorn: 7.2.0 + acorn: 7.3.1 dev: false peerDependencies: acorn: ^6.0.0 || ^7.0.0 resolution: integrity: sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ== - /acorn/7.2.0: + /acorn/7.3.1: dev: false engines: node: '>=0.4.0' hasBin: true resolution: - integrity: sha512-apwXVmYVpQ34m/i71vrApRrRKCWQnZZF1+npOD0WV5xZFfwWOmKGQ2RWlfdy9vWITsenisM8M0Qeq8agcFHNiQ== + integrity: sha512-tLc0wSnatxAQHVHUapaHdz72pi9KUyHjq5KyHjGg9Y8Ifdc79pTh2XvI6I1/chZbnM7QtNKzh66ooDogPZSleA== /adal-node/0.1.28: dependencies: '@types/node': 8.10.61 @@ -2357,8 +2433,8 @@ packages: integrity: sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA== /espree/6.2.1: dependencies: - acorn: 7.2.0 - acorn-jsx: 5.2.0_acorn@7.2.0 + acorn: 7.3.1 + acorn-jsx: 5.2.0_acorn@7.3.1 eslint-visitor-keys: 1.2.0 dev: false engines: @@ -5837,7 +5913,7 @@ packages: dependencies: '@types/estree': 0.0.44 '@types/node': 8.10.61 - acorn: 7.2.0 + acorn: 7.3.1 dev: false hasBin: true resolution: @@ -8163,6 +8239,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.2_rollup@1.32.1 @@ -8222,7 +8299,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': @@ -8667,6 +8744,70 @@ 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 + '@azure/storage-blob': 12.1.2 + '@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.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.0.1_rollup@1.32.1 + '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 + '@types/mocha': 7.0.2 + '@types/node': 8.10.61 + '@types/sinon': 9.0.4 + '@typescript-eslint/eslint-plugin': 2.34.0_2ce5ff4d4c428c35a55f8b98c167bebb + '@typescript-eslint/parser': 2.34.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.11.0_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.2 + 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.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 + 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.19 + ts-node: 8.10.2_typescript@3.9.5 + tslib: 2.0.0 + typescript: 3.9.5 + util: 0.12.3 + dev: false + name: '@rush-temp/storage-blob-changefeed' + resolution: + integrity: sha512-VFRkpW/CoNd876GsEp7slaoYns599UyOgFQTK88eaqX1v7egscrZEh3mGQNg4ielWlFV9rc4NZD8iJP+eSshAg== + 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 @@ -8731,6 +8872,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 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 @@ -8791,7 +8933,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': @@ -8855,6 +8997,64 @@ packages: integrity: sha512-+grl8U9yaRX3UGYxkRfmey6oX4gRB/IiUff3B44r+s0ulNndZDPlBLj9zzDu5e7TEfl9kSZayeDdy4ufKwRFSg== 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.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.0.1_rollup@1.32.1 + '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 + '@types/mocha': 7.0.2 + '@types/node': 8.10.61 + '@typescript-eslint/eslint-plugin': 2.34.0_2ce5ff4d4c428c35a55f8b98c167bebb + '@typescript-eslint/parser': 2.34.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.11.0_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.2 + 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.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 + 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 + source-map-support: 0.5.19 + ts-node: 8.10.2_typescript@3.9.5 + tslib: 2.0.0 + typescript: 3.9.5 + util: 0.12.3 + dev: false + name: '@rush-temp/storage-internal-avro' + resolution: + integrity: sha512-gEGX8jJXKzkQM2rnZBdeVRuHnyIaql98RB2jXbOrEbeQjEbn1dLT+TjPxmlP5P8/9CBQBsXV2n53isvBZM5IMw== + tarball: 'file:projects/storage-internal-avro.tgz' + version: 0.0.0 'file:projects/storage-queue.tgz': dependencies: '@azure/core-tracing': 1.0.0-preview.8 @@ -9101,8 +9301,10 @@ 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' '@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 9b8e2c4b2d7d..1a88ae61de66 100644 --- a/rush.json +++ b/rush.json @@ -447,11 +447,21 @@ "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", "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", @@ -488,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..3eb92e74ef9e --- /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..b86eb5b43a1c --- /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.2.0-preview.1", + "@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" + } +} 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/.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/.vscode/settings.json b/sdk/storage/storage-blob/.vscode/settings.json index 7ceb5ace3e9d..8272fa845213 100644 --- a/sdk/storage/storage-blob/.vscode/settings.json +++ b/sdk/storage/storage-blob/.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, diff --git a/sdk/storage/storage-blob/CHANGELOG.md b/sdk/storage/storage-blob/CHANGELOG.md index 88ab22f6117e..1a946b8a0595 100644 --- a/sdk/storage/storage-blob/CHANGELOG.md +++ b/sdk/storage/storage-blob/CHANGELOG.md @@ -1,5 +1,12 @@ # Release History +## 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. +- Supported blob tags. + ## 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/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/karma.conf.js b/sdk/storage/storage-blob/karma.conf.js index ae9fa2681492..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, @@ -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 4dbe141bfe90..11e196882f16 100644 --- a/sdk/storage/storage-blob/package.json +++ b/sdk/storage/storage-blob/package.json @@ -1,17 +1,18 @@ { "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/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", + "./dist-esm/storage-blob/src/BlobQueryResponse.js": "./dist-esm/storage-blob/src/BlobQueryResponse.browser.js", "fs": false, "os": false, "process": false @@ -29,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", @@ -46,7 +47,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 +64,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", 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..6f863d125f5e --- /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/container159218754109002144", + "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: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": "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/container159218754109002144/blob159218754166909217", + "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: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": "429c7949-bff0-4b59-8658-e089b2fbc8ad", + "x-ms-content-crc64": "YeJLfssylmU=", + "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-06-15T02:19:02.0458537Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218754109002144/blob159218754166909217", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "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": "74375d5b-6d4b-4bef-94f9-9fe1c847a010", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "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-06-15T02:19:02.3360592Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218754109002144/copiedblob159218754253406625", + "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: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": "c3f8094b-7772-42d3-b477-05ddaa72b01b", + "x-ms-copy-id": "16992712-101c-499d-b310-69177d56f107", + "x-ms-copy-status": "success", + "x-ms-request-id": "2ab99608-d01e-0067-10bb-425d5c000000", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-06-15T02:19:02.9514973Z" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218754109002144", + "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:19:03 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "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": "container159218754109002144", + "blob": "blob159218754166909217", + "copiedblob": "copiedblob159218754253406625" + }, + "newDate": {} + }, + "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 new file mode 100644 index 000000000000..8074aaedf0c7 --- /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/container159218753534504901", + "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: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": "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/container159218753534504901/blob159218753591105322", + "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: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": "53b96db5-4dd4-48ac-b926-b9d7ac6b54c6", + "x-ms-content-crc64": "YeJLfssylmU=", + "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-06-15T02:18:56.2797678Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218753534504901/blob159218753591105322", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "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": "13e02c53-1648-4b3c-9144-7fd8080f2e9d", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "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-06-15T02:18:56.5699733Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218753534504901/appendblob159218753676801884", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "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": "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-06-15T02:18:57.1383780Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218753534504901/pageblob159218753733601062", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "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": "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-06-15T02:18:57.7057812Z" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218753534504901", + "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:57 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "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": "container159218753534504901", + "blob": "blob159218753591105322", + "appendblob": "appendblob159218753676801884", + "pageblob": "pageblob159218753733601062" + }, + "newDate": {} + }, + "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 new file mode 100644 index 000000000000..ad4030a5979b --- /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/container159218751672102253", + "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: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": "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/container159218751672102253/blob159218751728309923", + "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: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": "38bd28e2-6052-415f-954a-939e05fde265", + "x-ms-content-crc64": "YeJLfssylmU=", + "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-06-15T02:18:37.6555802Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218751672102253/blob159218751728309923", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "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": "2c7c4ae3-3e2a-4a0b-b77d-a2098e136072", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "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-06-15T02:18:37.9457853Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218751672102253/blob159218751728309923", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "comp": "snapshot" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "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": "83a3180c-d303-4790-96c2-f14ac1db70c7", + "x-ms-request-id": "b4a4253f-001e-0029-0dbb-4273d4000000", + "x-ms-request-server-encrypted": "false", + "x-ms-snapshot": "2020-06-15T02:18:38.5121846Z", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-06-15T02:18:38.5131846Z" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218751672102253/blob159218751728309923", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "snapshot": "2020-06-15T02:18:38.5121846Z" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Mon, 15 Jun 2020 02:18:38 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "50354cba-373d-4ba2-913a-83c25a1954a8", + "x-ms-delete-type-permanent": "false", + "x-ms-request-id": "b4a426d9-001e-0029-16bb-4273d4000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "HEAD", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218751672102253/blob159218751728309923", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "snapshot": "2020-06-15T02:18:38.5121846Z" + }, + "requestBody": null, + "status": 404, + "response": "", + "responseHeaders": { + "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": "9ca77f1b-23c7-467d-9365-01328c73dfda", + "x-ms-error-code": "BlobNotFound", + "x-ms-request-id": "b4a42834-001e-0029-56bb-4273d4000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "HEAD", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218751672102253/blob159218751728309923", + "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: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": "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": "b4a42967-001e-0029-6abb-4273d4000000", + "x-ms-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-06-15T02:18:38.5131846Z" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218751672102253", + "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:40 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "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": "container159218751672102253", + "blob": "blob159218751728309923" + }, + "newDate": {} + }, + "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 new file mode 100644 index 000000000000..1e79de63229a --- /dev/null +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_delete_a_version.json @@ -0,0 +1,172 @@ +{ + "recordings": [ + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218750699302009", + "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: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": "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/container159218750699302009/blob159218750757002786", + "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: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": "f64aea1a-d44f-4e3d-930b-ef6919bef92d", + "x-ms-content-crc64": "YeJLfssylmU=", + "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-06-15T02:18:27.9447023Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218750699302009/blob159218750757002786", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "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": "e721d5e2-c09f-47dc-b981-6b056b453dba", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "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-06-15T02:18:28.2349074Z" + } + }, + { + "method": "DELETE", + "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": 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": { + "date": "Mon, 15 Jun 2020 02:18:29 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "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/container159218750699302009", + "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:30 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "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": "container159218750699302009", + "blob": "blob159218750757002786" + }, + "newDate": {} + }, + "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 new file mode 100644 index 000000000000..3f18fc98fc6b --- /dev/null +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleteblobs_should_work_for_batch_delete.json @@ -0,0 +1,100 @@ +{ + "recordings": [ + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218751071103005", + "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: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": "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/container159218751071103005/blob159218751127402779", + "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: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": "235f2850-d7b7-4428-9d4f-244ef8731251", + "x-ms-content-crc64": "YeJLfssylmU=", + "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-06-15T02:18:31.6423182Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218751071103005/blob159218751127402779", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "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": "634ae815-8bd1-4274-9882-85a3a17f0c6d", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "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-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": "container159218751071103005", + "blob": "blob159218751127402779" + }, + "newDate": {} + }, + "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 new file mode 100644 index 000000000000..bcffaaa91322 --- /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/container159218752100203400", + "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: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": "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/container159218752100203400/blob159218752156608091", + "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: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": "407bd0cc-b85f-44d2-9cff-68b1157494dd", + "x-ms-content-crc64": "YeJLfssylmU=", + "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-06-15T02:18:41.9346088Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218752100203400/blob159218752156608091", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "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": "e1da1049-070f-4fc8-9f46-4c82475c40b3", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "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-06-15T02:18:42.2268158Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218752100203400/blob159218752156608091", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "comp": "snapshot" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "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": "63750593-104b-43d7-82a8-b4a326c9d095", + "x-ms-request-id": "b4a42e61-001e-0029-1dbb-4273d4000000", + "x-ms-request-server-encrypted": "false", + "x-ms-snapshot": "2020-06-15T02:18:42.7972204Z", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-06-15T02:18:42.7982204Z" + } + }, + { + "method": "DELETE", + "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:b4a42fa4-001e-0029-4ebb-4273d4000000\nTime:2020-06-15T02:18:43.3837574Z", + "responseHeaders": { + "content-length": "248", + "content-type": "application/xml", + "date": "Mon, 15 Jun 2020 02:18:43 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "680365f2-b7c5-41bd-aff4-846ea01ce4df", + "x-ms-error-code": "SnapshotsPresent", + "x-ms-request-id": "b4a42fa4-001e-0029-4ebb-4273d4000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218752100203400/blob159218752156608091", + "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:18:43 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "0e02dd3e-33f7-4d78-8168-c6d91b80bd40", + "x-ms-delete-type-permanent": "false", + "x-ms-request-id": "b4a431d7-001e-0029-6bbb-4273d4000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "HEAD", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218752100203400/blob159218752156608091", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "snapshot": "2020-06-15T02:18:42.7972204Z" + }, + "requestBody": null, + "status": 404, + "response": "", + "responseHeaders": { + "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": "336a66f6-f445-4b2a-adc4-7c80c7bd535d", + "x-ms-error-code": "BlobNotFound", + "x-ms-request-id": "2ab96da0-d01e-0067-18bb-425d5c000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "HEAD", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218752100203400/blob159218752156608091", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": null, + "status": 404, + "response": "", + "responseHeaders": { + "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": "e3f485e7-a6b4-4a9c-a78b-1b74abdfcb49", + "x-ms-error-code": "BlobNotFound", + "x-ms-request-id": "2ab96f8a-d01e-0067-79bb-425d5c000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218752100203400", + "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:45 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "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": "container159218752100203400", + "blob": "blob159218752156608091" + }, + "newDate": {} + }, + "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 new file mode 100644 index 000000000000..df452533504d --- /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,166 @@ +{ + "recordings": [ + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218752592001401", + "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: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": "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/container159218752592001401/blob159218752648909591", + "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: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": "66304e5f-6947-437d-b614-c577bff2e469", + "x-ms-content-crc64": "YeJLfssylmU=", + "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-06-15T02:18:46.8580959Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218752592001401/blob159218752648909591", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "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": "75259acf-956e-4d05-9370-eb6d578c4684", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "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-06-15T02:18:47.1483014Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218752592001401/blob159218752648909591", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "comp": "snapshot" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "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": "45a84677-5faa-43f7-b9e9-2e3a0c272f94", + "x-ms-request-id": "2ab9774a-d01e-0067-06bb-425d5c000000", + "x-ms-request-server-encrypted": "false", + "x-ms-snapshot": "2020-06-15T02:18:47.7147032Z", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-06-15T02:18:47.7157032Z" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218752592001401/blob159218752648909591", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "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: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": "5d171ac8-fe33-4fc4-b91e-b481f880cef7", + "x-ms-error-code": "InvalidQueryParameterValue", + "x-ms-request-id": "2ab97909-d01e-0067-39bb-425d5c000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218752592001401/blob159218752648909591", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "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: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": "e38bc658-912d-4398-8dc2-c69c157dbd13", + "x-ms-error-code": "InvalidQueryParameterValue", + "x-ms-request-id": "2ab97a85-d01e-0067-2ebb-425d5c000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218752592001401", + "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:48 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "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": "container159218752592001401", + "blob": "blob159218752648909591" + }, + "newDate": {} + }, + "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 new file mode 100644 index 000000000000..694a1aa570cf --- /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/container159218752963103848", + "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: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": "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/container159218752963103848/blob159218753019700780", + "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: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": "6b2da256-9bc3-401e-a1ac-291e4c96176d", + "x-ms-content-crc64": "YeJLfssylmU=", + "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-06-15T02:18:50.5687246Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218752963103848/blob159218753019700780", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "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": "05336c6c-1d99-4d16-9ffc-c865efcedcf3", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "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-06-15T02:18:50.8579277Z" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218752963103848/blob159218753019700780", + "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:18:50 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "e88abf72-3b6f-4ea8-8fe7-801fdd240f1a", + "x-ms-delete-type-permanent": "false", + "x-ms-request-id": "2ab98196-d01e-0067-02bb-425d5c000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "HEAD", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218752963103848/blob159218753019700780", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": null, + "status": 404, + "response": "", + "responseHeaders": { + "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": "7779ddd3-fc32-4a9d-a388-11f7362080af", + "x-ms-error-code": "BlobNotFound", + "x-ms-request-id": "2ab982bb-d01e-0067-1dbb-425d5c000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "HEAD", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218752963103848/blob159218753019700780", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "versionid": "2020-06-15T02:18:50.5687246Z" + }, + "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: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": "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-06-15T02:18:50.5687246Z" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218752963103848", + "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:52 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "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": "container159218752963103848", + "blob": "blob159218753019700780" + }, + "newDate": {} + }, + "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 new file mode 100644 index 000000000000..d439c9461d6f --- /dev/null +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_deleting_root_blob_with_versionid_should_fail.json @@ -0,0 +1,161 @@ +{ + "recordings": [ + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218751274003093", + "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: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": "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/container159218751274003093/blob159218751332101483", + "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: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": "81335832-7908-40da-9a93-7c1873aaadfa", + "x-ms-content-crc64": "YeJLfssylmU=", + "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-06-15T02:18:33.6897697Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218751274003093/blob159218751332101483", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "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": "1d05ca1e-527e-4e79-8635-2a7d3a4e61de", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "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-06-15T02:18:33.9789727Z" + } + }, + { + "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.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": "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": "250", + "content-type": "application/xml", + "date": "Mon, 15 Jun 2020 02:18:35 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "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/container159218751274003093", + "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:36 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "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": "container159218751274003093", + "blob": "blob159218751332101483" + }, + "newDate": {} + }, + "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 new file mode 100644 index 000000000000..1585ca013e0d --- /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/container159218749693906157", + "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: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": "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/container159218749693906157/blob159218749750307586", + "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: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": "40c1df97-9a1b-4c5a-bbf3-dfa2ec393196", + "x-ms-content-crc64": "YeJLfssylmU=", + "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-06-15T02:18:17.8725686Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218749693906157/blob159218749750307586", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "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": "3a86f78c-21fa-410e-a0be-96c160aebea3", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "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-06-15T02:18:18.1637743Z" + } + }, + { + "method": "GET", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218749693906157/blob159218749750307586", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "versionid": "2020-06-15T02:18:17.8725686Z" + }, + "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: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": "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-06-15T02:18:17.8725686Z" + } + }, + { + "method": "GET", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218749693906157/blob159218749750307586", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "versionid": "2020-06-15T02:18:18.1637743Z" + }, + "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: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": "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": "b4a40013-001e-0029-6abb-4273d4000000", + "x-ms-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-06-15T02:18:18.1637743Z" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218749693906157", + "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:19 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "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": "container159218749693906157", + "blob": "blob159218749750307586" + }, + "newDate": {} + }, + "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 new file mode 100644 index 000000000000..1be0b2d20f0c --- /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/container159218750009609026", + "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: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": "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/container159218750009609026/blob159218750066009251", + "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: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": "4e2414de-22e1-4926-b522-2019ad8effab", + "x-ms-content-crc64": "YeJLfssylmU=", + "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-15T02:18:21.0287996Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218750009609026/blob159218750066009251", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "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": "e2f3c6eb-804f-43c9-8715-85af3bcf9d04", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "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-15T02:18:21.3190048Z" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218750009609026", + "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:21 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "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": "container159218750009609026", + "blob": "blob159218750066009251" + }, + "newDate": {} + }, + "hash": "6f6931683c2f74377b43ed857a7b8968" +} \ 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..64beda81ca67 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_get_properties_of_a_blob_version.json @@ -0,0 +1,235 @@ +{ + "recordings": [ + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218750211801847", + "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: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": "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/container159218750211801847/blob159218750268606854", + "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: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": "488086f4-ceed-4a21-be6d-ee970d401290", + "x-ms-content-crc64": "YeJLfssylmU=", + "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-06-15T02:18:23.0552399Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218750211801847/blob159218750268606854", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "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": "8645cd6b-6a23-4f7e-a678-06333d425fca", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "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-06-15T02:18:23.3454434Z" + } + }, + { + "method": "HEAD", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218750211801847/blob159218750268606854", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "versionid": "2020-06-15T02:18:23.0552399Z" + }, + "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: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": "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-06-15T02:18:23.0552399Z" + } + }, + { + "method": "HEAD", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218750211801847/blob159218750268606854", + "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: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": "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": "b4a4087d-001e-0029-2bbb-4273d4000000", + "x-ms-server-encrypted": "true", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-06-15T02:18:23.3454434Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218750211801847/blob159218750268606854", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "comp": "snapshot" + }, + "requestBody": null, + "status": 201, + "response": "", + "responseHeaders": { + "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": "076eded4-3c93-4ca5-98e4-fdc19c559700", + "x-ms-request-id": "b4a409ae-001e-0029-3dbb-4273d4000000", + "x-ms-request-server-encrypted": "false", + "x-ms-snapshot": "2020-06-15T02:18:25.0426449Z", + "x-ms-version": "2019-12-12", + "x-ms-version-id": "2020-06-15T02:18:25.0436449Z" + } + }, + { + "method": "HEAD", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218750211801847/blob159218750268606854", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "versionid": "2020-06-15T02:18:23.0552399Z", + "snapshot": "2020-06-15T02:18:25.0426449Z" + }, + "requestBody": null, + "status": 400, + "response": "", + "responseHeaders": { + "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": "b4a40b56-001e-0029-1bbb-4273d4000000", + "x-ms-version": "2019-12-12" + } + }, + { + "method": "HEAD", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218750211801847/blob159218750268606854", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "versionid": "2020-06-15T02:18:23.0552399Z" + }, + "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: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": "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-06-15T02:18:23.0552399Z" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218750211801847", + "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:26 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "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": "container159218750211801847", + "blob": "blob159218750268606854" + }, + "newDate": {} + }, + "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 new file mode 100644 index 000000000000..4e5d1f3d2df4 --- /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/container159218749276106537", + "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: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": "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/container159218749276106537/blob159218749332805006", + "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: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": "7b26de92-6fbf-4b7e-8dc8-db1979b1d21d", + "x-ms-content-crc64": "YeJLfssylmU=", + "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-06-15T02:18:13.6976097Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218749276106537/blob159218749332805006", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "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": "a38402d3-d14e-4e02-ad5e-ad7b083833e2", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "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-06-15T02:18:13.9888134Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218749276106537/blockblob%2F0159218749418603936", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "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": "99691821-93f6-4c61-97b3-0f2cbf5c1946", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "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-06-15T02:18:14.5542159Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218749276106537/blockblob%2F1159218749475303359", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "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": "d141a683-a945-4dd6-9c9f-cdb80ce3be5d", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "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-06-15T02:18:15.1216192Z" + } + }, + { + "method": "GET", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218749276106537", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "include": "versions", + "restype": "container", + "comp": "list" + }, + "requestBody": null, + "status": 200, + "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": "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": "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/container159218749276106537", + "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:16 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "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": "container159218749276106537", + "blob": "blob159218749332805006", + "blockblob/0": "blockblob/0159218749418603936", + "blockblob/1": "blockblob/1159218749475303359" + }, + "newDate": {} + }, + "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 new file mode 100644 index 000000000000..5c2169b41f4e --- /dev/null +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_promote_a_version_as_the_copy_source.json @@ -0,0 +1,210 @@ +{ + "recordings": [ + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218811479506335", + "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: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": "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/container159218811479506335/blob159218811635401319", + "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: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": "5d089bae-a723-47a1-b0b6-60751b5f1265", + "x-ms-content-crc64": "YeJLfssylmU=", + "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: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": "", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "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": "95a8681c-fc11-4bbd-8be3-b25f5e68ae7e", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "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: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/container159218811479506335", + "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:28:39 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "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": "container159218811479506335", + "blob": "blob159218811635401319" + }, + "newDate": {} + }, + "hash": "04fa40ec89937446c75a3515f6847c6f" +} \ 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..591a39120d5c --- /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/container159218754372700309", + "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: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": "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/container159218754372700309/blob159218754430001001", + "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: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": "5c88989d-71fb-46cc-b5a1-09922d23f989", + "x-ms-content-crc64": "YeJLfssylmU=", + "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-06-15T02:19:04.6687121Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218754372700309/blob159218754430001001", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "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": "4b02dd51-5682-4930-bfa4-0c73dfc8e35a", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "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-06-15T02:19:04.9559151Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218754372700309/blob159218754430001001", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "comp": "metadata" + }, + "requestBody": null, + "status": 200, + "response": "", + "responseHeaders": { + "content-length": "0", + "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": "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-06-15T02:19:05.5223156Z" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218754372700309", + "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:19:05 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "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": "container159218754372700309", + "blob": "blob159218754430001001" + }, + "newDate": {} + }, + "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 new file mode 100644 index 000000000000..8258e912ab3e --- /dev/null +++ b/sdk/storage/storage-blob/recordings/browsers/blob_versioning/recording_undelete_a_softdeleted_version.json @@ -0,0 +1,210 @@ +{ + "recordings": [ + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218754630302160", + "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: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": "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/container159218754630302160/blob159218754686903269", + "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: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": "3d393b03-0090-4a4c-b305-f5446c99da4e", + "x-ms-content-crc64": "YeJLfssylmU=", + "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-06-15T02:19:07.2385320Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218754630302160/blob159218754686903269", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "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": "3db459a1-6612-4ce4-802d-bfcaaf873d91", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "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-06-15T02:19:07.5417468Z" + } + }, + { + "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.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": "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": "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/container159218754630302160/blob159218754686903269", + "query": { + "sip": "0.0.0.0-255.255.255.255", + "versionid": "2020-06-15T02:19:07.2385320Z" + }, + "requestBody": null, + "status": 202, + "response": "", + "responseHeaders": { + "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", + "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/container159218754630302160", + "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:19:10 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "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": "container159218754630302160", + "blob": "blob159218754686903269" + }, + "newDate": {} + }, + "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 new file mode 100644 index 000000000000..376dce494fd1 --- /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/container159218753849008663", + "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: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": "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/container159218753849008663/blob159218753905300177", + "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: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": "7016da34-ad25-4796-9b68-65064c661daa", + "x-ms-content-crc64": "YeJLfssylmU=", + "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-06-15T02:18:59.4219949Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218753849008663/blob159218753905300177", + "query": { + "sip": "0.0.0.0-255.255.255.255" + }, + "requestBody": "", + "status": 201, + "response": "", + "responseHeaders": { + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "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": "d3ac67f7-2fa3-4c46-87ce-923d1be18b19", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "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-06-15T02:18:59.7111997Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218753849008663/blob159218753905300177", + "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: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": "10993531-e030-4dfc-84b4-ab64296bd634", + "x-ms-content-crc64": "YeJLfssylmU=", + "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-06-15T02:19:00.0004053Z" + } + }, + { + "method": "PUT", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218753849008663/blob159218753905300177", + "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: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": "5c3640b6-ba03-4e8e-92c3-22c4f86982b4", + "x-ms-content-crc64": "YeJLfssylmU=", + "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-06-15T02:19:00.3046207Z" + } + }, + { + "method": "DELETE", + "url": "https://fakestorageaccount.blob.core.windows.net/container159218753849008663", + "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:19:00 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "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": "container159218753849008663", + "blob": "blob159218753905300177" + }, + "newDate": {} + }, + "hash": "7086fafed40ca593c7e12e805472dee7" +} \ 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_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/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_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/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 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/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 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..cafb9674bc2e --- /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":"container159218742818906916","blob":"blob159218742847404567","copiedblob":"copiedblob159218742904903148"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218742818906916') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:17:08 GMT', + 'ETag', + '"0x8D810D2347E171E"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '4bfa9fc6-e01e-0021-0bbb-4269db000000', + 'x-ms-client-request-id', + '928df801-1a2e-4ac2-8a7d-78e05df4d41c', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Mon, 15 Jun 2020 02:17:07 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218742818906916/blob159218742847404567', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:17:08 GMT', + 'ETag', + '"0x8D810D234AA4106"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f470f5b-701e-006e-6bbb-42188f000000', + 'x-ms-client-request-id', + '23400dd3-e41a-4781-b221-f3325d8cfce7', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-15T02:17:08.5674758Z', + 'Date', + 'Mon, 15 Jun 2020 02:17:08 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218742818906916/blob159218742847404567') + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:17:08 GMT', + 'ETag', + '"0x8D810D234D5ECD8"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '4bfaa0ac-e01e-0021-62bb-4269db000000', + 'x-ms-client-request-id', + '2f2c7587-c3ad-46f2-a604-d7d8d5695417', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-15T02:17:08.8546792Z', + 'Date', + 'Mon, 15 Jun 2020 02:17:08 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218742818906916/copiedblob159218742904903148') + .reply(202, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:17:09 GMT', + 'ETag', + '"0x8D810D235020DF0"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f4710e1-701e-006e-61bb-42188f000000', + 'x-ms-client-request-id', + 'f64403d2-8974-432f-a1f9-71519f0b5cde', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-06-15T02:17:09.1428848Z', + 'x-ms-copy-id', + 'c6568929-560c-40e9-8ebe-45681efb26b2', + 'x-ms-copy-status', + 'success', + 'Date', + 'Mon, 15 Jun 2020 02:17:09 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159218742818906916') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '4bfaa188-e01e-0021-31bb-4269db000000', + 'x-ms-client-request-id', + '5c3bbef5-41ea-4e94-9e98-02ceedbe6fdd', + 'x-ms-version', + '2019-12-12', + 'Date', + '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 new file mode 100644 index 000000000000..715728ae8117 --- /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":"container159218742502502412","blob":"blob159218742531004748","appendblob":"appendblob159218742588203170","pageblob":"pageblob159218742616903229"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218742502502412') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:17:05 GMT', + 'ETag', + '"0x8D810D2329B5347"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f470730-701e-006e-35bb-42188f000000', + 'x-ms-client-request-id', + '7d1aed3f-3a2e-4ed6-8c7b-9739e3003eb6', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Mon, 15 Jun 2020 02:17:04 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218742502502412/blob159218742531004748', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:17:05 GMT', + 'ETag', + '"0x8D810D232C71FC1"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '4bfa9c68-e01e-0021-64bb-4269db000000', + 'x-ms-client-request-id', + 'afebd812-009f-4eeb-a895-0351224b8ca7', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-15T02:17:05.4012353Z', + 'Date', + 'Mon, 15 Jun 2020 02:17:04 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218742502502412/blob159218742531004748') + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:17:05 GMT', + 'ETag', + '"0x8D810D232F27D5D"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f470876-701e-006e-61bb-42188f000000', + 'x-ms-client-request-id', + 'ab511444-0a3b-4b2d-b111-71a11a619c32', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-15T02:17:05.6874363Z', + 'Date', + 'Mon, 15 Jun 2020 02:17:04 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218742502502412/appendblob159218742588203170') + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:17:05 GMT', + 'ETag', + '"0x8D810D2331E7743"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '4bfa9d5b-e01e-0021-4fbb-4269db000000', + 'x-ms-client-request-id', + '70e17d29-64fd-466d-9911-6f97523752ce', + 'x-ms-version', + '2019-12-12', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-15T02:17:05.9736387Z', + 'Date', + 'Mon, 15 Jun 2020 02:17:05 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218742502502412/pageblob159218742616903229') + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:17:06 GMT', + 'ETag', + '"0x8D810D2334A7141"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f4709e9-701e-006e-41bb-42188f000000', + 'x-ms-client-request-id', + '8e15403d-329d-4e6c-895f-b05e37fa9b7d', + 'x-ms-version', + '2019-12-12', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-15T02:17:06.2618433Z', + 'Date', + 'Mon, 15 Jun 2020 02:17:05 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159218742502502412') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '4bfa9dff-e01e-0021-67bb-4269db000000', + 'x-ms-client-request-id', + '03879b11-a81a-44d0-b7c5-bf5f895e0605', + 'x-ms-version', + '2019-12-12', + 'Date', + '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 new file mode 100644 index 000000000000..38c653cbaa6b --- /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 = "4a10969378b483457b67ea3e5414861a"; + +module.exports.testInfo = {"uniqueName":{"container":"container159218741251207833","blob":"blob159218741280002928"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218741251207833') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:52 GMT', + 'ETag', + '"0x8D810D22B269B9D"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46e8b5-701e-006e-0fbb-42188f000000', + 'x-ms-client-request-id', + 'b6dc20ca-0031-4588-826c-4a22db81fbe2', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Mon, 15 Jun 2020 02:16:51 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218741251207833/blob159218741280002928', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:52 GMT', + 'ETag', + '"0x8D810D22B524539"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46e95b-701e-006e-2ebb-42188f000000', + 'x-ms-client-request-id', + '57d3d9a6-4df1-4ca4-bca2-6c75a5e4f415', + '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:52.8913721Z', + 'Date', + 'Mon, 15 Jun 2020 02:16:51 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218741251207833/blob159218741280002928') + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:53 GMT', + 'ETag', + '"0x8D810D22B7E664A"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46ea08-701e-006e-52bb-42188f000000', + 'x-ms-client-request-id', + '2cf2324d-c567-46c8-b7f8-bc2287172abb', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-15T02:16:53.1815770Z', + 'Date', + 'Mon, 15 Jun 2020 02:16:52 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218741251207833/blob159218741280002928') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:53 GMT', + 'ETag', + '"0x8D810D22B7E664A"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46ead9-701e-006e-1ebb-42188f000000', + 'x-ms-client-request-id', + 'e5ba2665-f14a-4e58-a2b8-5bbacc77ccab', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-06-15T02:16:53.4727821Z', + 'x-ms-snapshot', + '2020-06-15T02:16:53.4717821Z', + 'x-ms-request-server-encrypted', + 'false', + 'Date', + 'Mon, 15 Jun 2020 02:16:52 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159218741251207833/blob159218741280002928') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46eb7c-701e-006e-3cbb-42188f000000', + 'x-ms-client-request-id', + '19a1ed43-d8a0-45bb-8fdc-6c0e3fc39bbd', + 'x-ms-version', + '2019-12-12', + 'x-ms-delete-type-permanent', + 'false', + 'Date', + 'Mon, 15 Jun 2020 02:16:52 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container159218741251207833/blob159218741280002928') + .query(true) + .reply(404, "", [ + 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46ec58-701e-006e-15bb-42188f000000', + 'x-ms-client-request-id', + 'df951396-977e-48f3-8798-2820554459cb', + '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 02:16:53 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container159218741251207833/blob159218741280002928') + .reply(200, "", [ + 'Content-Length', + '0', + 'Content-Type', + 'application/octet-stream', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:53 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D810D22B7E664A"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46ed0b-701e-006e-43bb-42188f000000', + 'x-ms-client-request-id', + 'b028be59-ba2e-4388-a8cf-d87ef21d9f27', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-06-15T02:16:53.4727821Z', + 'x-ms-is-current-version', + 'true', + 'x-ms-creation-time', + 'Mon, 15 Jun 2020 02:16:53 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', + 'Mon, 15 Jun 2020 02:16:53 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159218741251207833') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46edbe-701e-006e-73bb-42188f000000', + 'x-ms-client-request-id', + '7c13225b-05ce-4b31-a476-a2a2c866da2e', + 'x-ms-version', + '2019-12-12', + 'Date', + '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 new file mode 100644 index 000000000000..bf67822d62a9 --- /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 = "340a336daa63798f474bf864d9f55bbc"; + +module.exports.testInfo = {"uniqueName":{"container":"container159218740728802920","blob":"blob159218740757504391"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218740728802920') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:47 GMT', + 'ETag', + '"0x8D810D2280938DC"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46da8b-701e-006e-72bb-42188f000000', + 'x-ms-client-request-id', + 'eed4cddf-496d-43e5-8044-9bd4e87c3bc6', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Mon, 15 Jun 2020 02:16:46 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218740728802920/blob159218740757504391', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:47 GMT', + 'ETag', + '"0x8D810D22835A7C0"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46db49-701e-006e-2fbb-42188f000000', + 'x-ms-client-request-id', + '2fb077bb-3797-4408-b688-065d5db24458', + '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:47.6706752Z', + 'Date', + 'Mon, 15 Jun 2020 02:16:46 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218740728802920/blob159218740757504391') + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:47 GMT', + 'ETag', + '"0x8D810D22861537C"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46dbde-701e-006e-3ebb-42188f000000', + 'x-ms-client-request-id', + 'dab33227-e542-4fa4-996c-fa6434b64943', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-15T02:16:47.9578764Z', + 'Date', + 'Mon, 15 Jun 2020 02:16:46 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159218740728802920/blob159218740757504391') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46dcb3-701e-006e-09bb-42188f000000', + 'x-ms-client-request-id', + '65f30f0b-c2cb-4472-86e9-702401970d55', + 'x-ms-version', + '2019-12-12', + 'x-ms-delete-type-permanent', + 'false', + 'Date', + 'Mon, 15 Jun 2020 02:16:47 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container159218740728802920/blob159218740757504391') + .query(true) + .reply(404, "", [ + 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46ddb5-701e-006e-07bb-42188f000000', + 'x-ms-client-request-id', + 'dd6cf012-60b6-404f-b0ee-f0f17b3d8ce0', + '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 02:16:47 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container159218740728802920/blob159218740757504391') + .reply(200, "", [ + 'Content-Length', + '0', + 'Content-Type', + 'application/octet-stream', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:47 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D810D22861537C"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46de9a-701e-006e-66bb-42188f000000', + 'x-ms-client-request-id', + 'c05e76b0-eb1c-4531-b493-f49cff6365f7', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-06-15T02:16:47.9578764Z', + 'x-ms-is-current-version', + 'true', + 'x-ms-creation-time', + 'Mon, 15 Jun 2020 02:16:47 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', + 'Mon, 15 Jun 2020 02:16:47 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159218740728802920') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46df54-701e-006e-1bbb-42188f000000', + 'x-ms-client-request-id', + 'df6a3b01-ab78-49cc-8a00-afbd5c495c13', + 'x-ms-version', + '2019-12-12', + 'Date', + '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 new file mode 100644 index 000000000000..2cb6cdc187cb --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_deleteblobs_should_work_for_batch_delete.js @@ -0,0 +1,103 @@ +let nock = require('nock'); + +module.exports.hash = "f3924ffbb542416858b2a5df9d0271fe"; + +module.exports.testInfo = {"uniqueName":{"container":"container159218740931506721","blob":"blob159218740960300270"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218740931506721') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:49 GMT', + 'ETag', + '"0x8D810D2293E9647"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46e087-701e-006e-43bb-42188f000000', + 'x-ms-client-request-id', + '6dcfe237-a65a-4dad-9217-278e642a7d6a', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Mon, 15 Jun 2020 02:16:48 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218740931506721/blob159218740960300270', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:49 GMT', + 'ETag', + '"0x8D810D2296A411C"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46e15c-701e-006e-0ebb-42188f000000', + 'x-ms-client-request-id', + 'd582f000-d28e-4606-a54c-d7ec2b7570d8', + '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:49.6931100Z', + 'Date', + 'Mon, 15 Jun 2020 02:16:48 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218740931506721/blob159218740960300270') + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:49 GMT', + 'ETag', + '"0x8D810D229961401"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46e25a-701e-006e-03bb-42188f000000', + 'x-ms-client-request-id', + '0f95400a-997a-45e7-91dd-0da000ce2d48', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-15T02:16:49.9813137Z', + 'Date', + 'Mon, 15 Jun 2020 02:16:49 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159218740931506721') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46e334-701e-006e-4cbb-42188f000000', + 'x-ms-client-request-id', + '5e31ec86-f159-4460-b73a-edad1c387fd1', + 'x-ms-version', + '2019-12-12', + 'Date', + '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 new file mode 100644 index 000000000000..92eb715cc0cc --- /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 = "a672c204152471aa4bce73e42405ffa0"; + +module.exports.testInfo = {"uniqueName":{"container":"container159218741481808199","blob":"blob159218741536301937"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218741481808199') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:54 GMT', + 'ETag', + '"0x8D810D22C861E00"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46eeb5-701e-006e-68bb-42188f000000', + 'x-ms-client-request-id', + '95e5ac62-2c39-4e86-afd9-97f414f30169', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Mon, 15 Jun 2020 02:16:54 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218741481808199/blob159218741536301937', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:55 GMT', + 'ETag', + '"0x8D810D22CD9A17B"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46f020-701e-006e-41bb-42188f000000', + 'x-ms-client-request-id', + '8a78c653-386f-4b1e-acdf-3512031bb281', + '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:55.4561915Z', + 'Date', + 'Mon, 15 Jun 2020 02:16:54 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218741481808199/blob159218741536301937') + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:55 GMT', + 'ETag', + '"0x8D810D22D052621"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46f0ed-701e-006e-0abb-42188f000000', + 'x-ms-client-request-id', + '2fdf4d50-d974-40a1-9292-a50f4cf796d6', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-15T02:16:55.7423921Z', + 'Date', + 'Mon, 15 Jun 2020 02:16:54 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218741481808199/blob159218741536301937') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:55 GMT', + 'ETag', + '"0x8D810D22D052621"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46f1c6-701e-006e-5dbb-42188f000000', + 'x-ms-client-request-id', + '9f068a97-b5fc-4b34-8f78-264f8cfe5532', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-06-15T02:16:56.0315946Z', + 'x-ms-snapshot', + '2020-06-15T02:16:56.0305946Z', + 'x-ms-request-server-encrypted', + 'false', + 'Date', + 'Mon, 15 Jun 2020 02:16:55 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .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', + 'application/xml', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46f286-701e-006e-14bb-42188f000000', + 'x-ms-client-request-id', + '6cb1d2d3-b392-4caf-a4ba-68b72ca53297', + 'x-ms-version', + '2019-12-12', + 'x-ms-error-code', + 'SnapshotsPresent', + 'Date', + 'Mon, 15 Jun 2020 02:16:55 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159218741481808199/blob159218741536301937') + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46f337-701e-006e-45bb-42188f000000', + 'x-ms-client-request-id', + 'd990d2b9-36b5-4aed-ad9c-bcb711f05446', + 'x-ms-version', + '2019-12-12', + 'x-ms-delete-type-permanent', + 'false', + 'Date', + 'Mon, 15 Jun 2020 02:16:55 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container159218741481808199/blob159218741536301937') + .query(true) + .reply(404, "", [ + 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '4bfa9219-e01e-0021-12bb-4269db000000', + 'x-ms-client-request-id', + '799d1acd-f1ef-4439-b08f-a792c0f3fca0', + '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 02:16:56 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container159218741481808199/blob159218741536301937') + .reply(404, "", [ + 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46f5ba-701e-006e-3fbb-42188f000000', + 'x-ms-client-request-id', + '95b25c06-93b7-44f1-a8ee-a01ddfa1e87c', + '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 02:16:56 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159218741481808199') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '4bfa92e3-e01e-0021-56bb-4269db000000', + 'x-ms-client-request-id', + '78819c83-e69c-4e72-911c-3f3a49ddbcd0', + 'x-ms-version', + '2019-12-12', + 'Date', + '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 new file mode 100644 index 000000000000..d18c09c7dbbe --- /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":"container159218741823804712","blob":"blob159218741852503916"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218741823804712') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:58 GMT', + 'ETag', + '"0x8D810D22E900975"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46f6ae-701e-006e-24bb-42188f000000', + 'x-ms-client-request-id', + '588c2e07-8d36-49d9-b4bc-2a626167d421', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Mon, 15 Jun 2020 02:16:57 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218741823804712/blob159218741852503916', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:58 GMT', + 'ETag', + '"0x8D810D22EBBB11E"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '4bfa9398-e01e-0021-03bb-4269db000000', + 'x-ms-client-request-id', + 'e2747464-382c-429f-8626-941f8395ea33', + '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:58.6154270Z', + 'Date', + 'Mon, 15 Jun 2020 02:16:57 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218741823804712/blob159218741852503916') + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:58 GMT', + 'ETag', + '"0x8D810D22EE735D9"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46f803-701e-006e-72bb-42188f000000', + 'x-ms-client-request-id', + '997c9903-fa85-41dc-93ca-b59b3426cf02', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-15T02:16:58.9016297Z', + 'Date', + 'Mon, 15 Jun 2020 02:16:57 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218741823804712/blob159218741852503916') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:58 GMT', + 'ETag', + '"0x8D810D22EE735D9"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '4bfa9463-e01e-0021-45bb-4269db000000', + 'x-ms-client-request-id', + 'db6380d1-d73a-463a-b04b-9040b972ba91', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-06-15T02:16:59.1908338Z', + 'x-ms-snapshot', + '2020-06-15T02:16:59.1898338Z', + 'x-ms-request-server-encrypted', + 'false', + 'Date', + 'Mon, 15 Jun 2020 02:16:58 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159218741823804712/blob159218741852503916') + .query(true) + .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', + 'application/xml', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46f942-701e-006e-25bb-42188f000000', + 'x-ms-client-request-id', + '54d1f88d-aa1f-4a2d-830c-bd8e3c3c64c8', + 'x-ms-version', + '2019-12-12', + 'x-ms-error-code', + 'InvalidQueryParameterValue', + 'Date', + 'Mon, 15 Jun 2020 02:16:58 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159218741823804712/blob159218741852503916') + .query(true) + .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', + 'application/xml', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '4bfa950c-e01e-0021-61bb-4269db000000', + 'x-ms-client-request-id', + '65dfd122-faf8-4b95-9ee0-9b294023e53a', + 'x-ms-version', + '2019-12-12', + 'x-ms-error-code', + 'InvalidQueryParameterValue', + 'Date', + 'Mon, 15 Jun 2020 02:16:59 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159218741823804712') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46faa5-701e-006e-02bb-42188f000000', + 'x-ms-client-request-id', + '760feece-80cb-4118-90b0-8d52753fb831', + 'x-ms-version', + '2019-12-12', + 'Date', + '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 new file mode 100644 index 000000000000..0e20c98e3fb1 --- /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 = "a9690167b9c588618d4a754b063f37e3"; + +module.exports.testInfo = {"uniqueName":{"container":"container159218742024108749","blob":"blob159218742052803751"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218742024108749') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:17:00 GMT', + 'ETag', + '"0x8D810D22FC1884F"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '4bfa95b1-e01e-0021-7fbb-4269db000000', + 'x-ms-client-request-id', + '5b3c5af5-1985-49ec-b2ea-2979d46e74db', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Mon, 15 Jun 2020 02:16:59 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218742024108749/blob159218742052803751', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:17:00 GMT', + 'ETag', + '"0x8D810D22FED63C1"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46fbef-701e-006e-3bbb-42188f000000', + 'x-ms-client-request-id', + '05311b7b-b26a-48cc-bbc0-3ecce139dc28', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-15T02:17:00.6188481Z', + 'Date', + 'Mon, 15 Jun 2020 02:16:59 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218742024108749/blob159218742052803751') + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:17:00 GMT', + 'ETag', + '"0x8D810D23018C14B"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '4bfa96b6-e01e-0021-7bbb-4269db000000', + 'x-ms-client-request-id', + '628b7191-d57c-4e2a-987e-6e02249be5dd', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-15T02:17:00.9050482Z', + 'Date', + 'Mon, 15 Jun 2020 02:17:00 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159218742024108749/blob159218742052803751') + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46fd96-701e-006e-5bbb-42188f000000', + 'x-ms-client-request-id', + '41c7712c-21db-48f0-9dc7-f8410b1a8ae1', + 'x-ms-version', + '2019-12-12', + 'x-ms-delete-type-permanent', + 'false', + 'Date', + 'Mon, 15 Jun 2020 02:17:00 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container159218742024108749/blob159218742052803751') + .reply(404, "", [ + 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '4bfa9786-e01e-0021-42bb-4269db000000', + 'x-ms-client-request-id', + '75aa7517-2fb2-485b-b4ac-72fdf3a75482', + '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 02:17:00 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container159218742024108749/blob159218742052803751') + .query(true) + .reply(200, "", [ + 'Content-Length', + '11', + 'Content-Type', + 'application/octet-stream', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:17:00 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D810D22FED63C1"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46fed0-701e-006e-12bb-42188f000000', + 'x-ms-client-request-id', + 'fa537f6b-5286-4e03-9a2d-513ee9aa3c34', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-06-15T02:17:00.6188481Z', + 'x-ms-creation-time', + 'Mon, 15 Jun 2020 02:17:00 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', + 'Mon, 15 Jun 2020 02:17:00 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159218742024108749') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '4bfa984a-e01e-0021-04bb-4269db000000', + 'x-ms-client-request-id', + '182cd7f2-8907-416b-b012-1a7cb8ecd75b', + 'x-ms-version', + '2019-12-12', + 'Date', + '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 new file mode 100644 index 000000000000..1b07d36b9537 --- /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 = "9a28f69321d9c4b6cfcebf3390e1a80c"; + +module.exports.testInfo = {"uniqueName":{"container":"container159218741047501233","blob":"blob159218741076107981"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218741047501233') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:50 GMT', + 'ETag', + '"0x8D810D229EF6918"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46e417-701e-006e-25bb-42188f000000', + 'x-ms-client-request-id', + '07faf14b-80cf-40f8-9330-8ffee8b71bd3', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Mon, 15 Jun 2020 02:16:49 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218741047501233/blob159218741076107981', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:50 GMT', + 'ETag', + '"0x8D810D22A1B61A8"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46e4ce-701e-006e-55bb-42188f000000', + 'x-ms-client-request-id', + '94da0e4d-53a1-497e-b7dc-6bebab66765e', + '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:50.8539304Z', + 'Date', + 'Mon, 15 Jun 2020 02:16:49 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218741047501233/blob159218741076107981') + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:51 GMT', + 'ETag', + '"0x8D810D22A470D70"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46e568-701e-006e-65bb-42188f000000', + 'x-ms-client-request-id', + '44a035eb-6f84-4790-a69b-315ace9444a4', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-15T02:16:51.1411328Z', + 'Date', + 'Mon, 15 Jun 2020 02:16:50 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159218741047501233/blob159218741076107981') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46e622-701e-006e-18bb-42188f000000', + 'x-ms-client-request-id', + 'ed32e2ff-4c64-4876-bdc8-f4788e28f83f', + 'x-ms-version', + '2019-12-12', + 'x-ms-delete-type-permanent', + 'false', + 'Date', + 'Mon, 15 Jun 2020 02:16:50 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container159218741047501233/blob159218741076107981') + .query(true) + .reply(404, "", [ + 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46e699-701e-006e-0cbb-42188f000000', + 'x-ms-client-request-id', + 'e20bac05-fb0c-46fc-ae96-29078ae643ad', + '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 02:16:50 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159218741047501233/blob159218741076107981') + .query(true) + .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', + 'application/xml', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46e738-701e-006e-26bb-42188f000000', + 'x-ms-client-request-id', + 'f448770f-7560-4883-8564-ac132b1a3027', + 'x-ms-version', + '2019-12-12', + 'x-ms-error-code', + 'OperationNotAllowedOnRootBlob', + 'Date', + 'Mon, 15 Jun 2020 02:16:51 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159218741047501233') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46e7ef-701e-006e-54bb-42188f000000', + 'x-ms-client-request-id', + 'f22245bf-dff2-4965-94e8-77150ebb0a6c', + 'x-ms-version', + '2019-12-12', + 'Date', + '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 new file mode 100644 index 000000000000..e8c71d51c26c --- /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 = "113ee8169869417dd035a963c97e6055"; + +module.exports.testInfo = {"uniqueName":{"container":"container159218740035305198","blob":"blob159218740064009891"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218740035305198') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:40 GMT', + 'ETag', + '"0x8D810D223E6C9C2"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd80321c6-501e-0069-44bb-4274ec000000', + 'x-ms-client-request-id', + 'bc6e0fda-4251-414e-9646-41afb5e2da13', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Mon, 15 Jun 2020 02:16:39 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218740035305198/blob159218740064009891', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:40 GMT', + 'ETag', + '"0x8D810D22412DCE1"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd803227a-501e-0069-70bb-4274ec000000', + 'x-ms-client-request-id', + '9881f75c-0407-4e7f-99d0-2daac496bcb4', + '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:40.7317729Z', + 'Date', + 'Mon, 15 Jun 2020 02:16:40 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218740035305198/blob159218740064009891') + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:41 GMT', + 'ETag', + '"0x8D810D2243E88A2"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd803231f-501e-0069-0cbb-4274ec000000', + 'x-ms-client-request-id', + '690e7fc3-37b5-4949-a6f5-85cdb323b217', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-15T02:16:41.0199753Z', + 'Date', + 'Mon, 15 Jun 2020 02:16:40 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/container159218740035305198/blob159218740064009891') + .query(true) + .reply(200, "Hello World", [ + 'Content-Length', + '11', + 'Content-Type', + 'application/octet-stream', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:40 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D810D22412DCE1"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd80323ca-501e-0069-2ebb-4274ec000000', + 'x-ms-client-request-id', + '74242ac8-3e1f-4bfa-ab72-9190cc6a8ff8', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-06-15T02:16:40.7317729Z', + 'x-ms-creation-time', + 'Mon, 15 Jun 2020 02:16:40 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', + 'Mon, 15 Jun 2020 02:16:40 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/container159218740035305198/blob159218740064009891') + .query(true) + .reply(200, "", [ + 'Content-Length', + '0', + 'Content-Type', + 'application/octet-stream', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:41 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D810D2243E88A2"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd8032459-501e-0069-39bb-4274ec000000', + 'x-ms-client-request-id', + '08ad25a3-6aa9-48b7-b239-9c8e8e59cad9', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-06-15T02:16:41.0199753Z', + 'x-ms-is-current-version', + 'true', + 'x-ms-creation-time', + 'Mon, 15 Jun 2020 02:16:41 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', + 'Mon, 15 Jun 2020 02:16:41 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container159218740035305198/blob159218740064009891') + .query(true) + .reply(200, "", [ + 'Content-Length', + '11', + 'Content-Type', + 'application/octet-stream', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:40 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D810D22412DCE1"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd80324dd-501e-0069-39bb-4274ec000000', + 'x-ms-client-request-id', + 'b858aae6-8f28-4797-bd5e-60747dd215c9', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-06-15T02:16:40.7317729Z', + 'x-ms-creation-time', + 'Mon, 15 Jun 2020 02:16:40 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', + 'Mon, 15 Jun 2020 02:16:41 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/container159218740035305198/blob159218740064009891') + .query(true) + .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:16:40 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D810D22412DCE1"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd8032576-501e-0069-50bb-4274ec000000', + 'x-ms-client-request-id', + 'ca5f0aeb-aa98-4ae0-baf4-b0d0c5e22fe0', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-06-15T02:16:40.7317729Z', + 'x-ms-creation-time', + 'Mon, 15 Jun 2020 02:16:40 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', + 'Mon, 15 Jun 2020 02:16:41 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159218740035305198') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd8032638-501e-0069-10bb-4274ec000000', + 'x-ms-client-request-id', + '6d54502c-a9fe-4f18-beae-83f9cf66326e', + 'x-ms-version', + '2019-12-12', + 'Date', + '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 new file mode 100644 index 000000000000..86d24b37cb81 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blob_versioning/recording_download_a_version_to_file.js @@ -0,0 +1,103 @@ +let nock = require('nock'); + +module.exports.hash = "3bf3d3a7eb6b3ad211fad9ad1ab86a40"; + +module.exports.testInfo = {"uniqueName":{"container":"container159218740266103668","blob":"blob159218740294704363"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218740266103668') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:42 GMT', + 'ETag', + '"0x8D810D22546E810"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd80326ea-501e-0069-3ebb-4274ec000000', + 'x-ms-client-request-id', + '5f90e77b-4e83-4b12-bb95-640458e12222', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Mon, 15 Jun 2020 02:16:42 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218740266103668/blob159218740294704363', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:43 GMT', + 'ETag', + '"0x8D810D22572AC59"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd80327a6-501e-0069-74bb-4274ec000000', + 'x-ms-client-request-id', + 'd8c0e6fd-1964-44f5-892e-c778be63dd45', + '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:43.0383984Z', + 'Date', + 'Mon, 15 Jun 2020 02:16:42 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218740266103668/blob159218740294704363') + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:43 GMT', + 'ETag', + '"0x8D810D2259F1B8D"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd80328c6-501e-0069-09bb-4274ec000000', + 'x-ms-client-request-id', + 'b88f5854-3648-4dae-b1cf-5c7d1251c97c', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-15T02:16:43.3296029Z', + 'Date', + 'Mon, 15 Jun 2020 02:16:42 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159218740266103668') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd803298e-501e-0069-49bb-4274ec000000', + 'x-ms-client-request-id', + 'd542ad46-d4a3-492f-b7c9-4a3f6a4fe93b', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Mon, 15 Jun 2020 02:16:43 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..4417226113dd --- /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":"container159218740382903198","blob":"blob159218740411605260"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218740382903198') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:43 GMT', + 'ETag', + '"0x8D810D225F94195"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd8032a8a-501e-0069-44bb-4274ec000000', + 'x-ms-client-request-id', + '31998398-a51f-4cb6-bc57-a34c9f7a53ea', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Mon, 15 Jun 2020 02:16:43 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218740382903198/blob159218740411605260', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:44 GMT', + 'ETag', + '"0x8D810D226257AD7"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd8032b70-501e-0069-22bb-4274ec000000', + 'x-ms-client-request-id', + 'eef80347-e281-4d65-b4af-c1e50f3eb27f', + '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:44.2092247Z', + 'Date', + 'Mon, 15 Jun 2020 02:16:43 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218740382903198/blob159218740411605260') + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:44 GMT', + 'ETag', + '"0x8D810D2265174D7"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd8032c43-501e-0069-71bb-4274ec000000', + 'x-ms-client-request-id', + '9e19cd29-acd6-40e6-9e8c-72661eb6059f', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-15T02:16:44.4994302Z', + 'Date', + 'Mon, 15 Jun 2020 02:16:43 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container159218740382903198/blob159218740411605260') + .query(true) + .reply(200, "", [ + 'Content-Length', + '11', + 'Content-Type', + 'application/octet-stream', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:44 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D810D226257AD7"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd8032cf8-501e-0069-1fbb-4274ec000000', + 'x-ms-client-request-id', + 'c74feffd-18a8-4f25-a80e-c7d5bbc3c577', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-06-15T02:16:44.2092247Z', + 'x-ms-creation-time', + 'Mon, 15 Jun 2020 02:16:44 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', + 'Mon, 15 Jun 2020 02:16:44 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container159218740382903198/blob159218740411605260') + .reply(200, "", [ + 'Content-Length', + '0', + 'Content-Type', + 'application/octet-stream', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:44 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D810D2265174D7"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd8032d9a-501e-0069-3fbb-4274ec000000', + 'x-ms-client-request-id', + 'f550aba1-4f07-4748-9bd8-681e9418fc67', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-06-15T02:16:44.4994302Z', + 'x-ms-is-current-version', + 'true', + 'x-ms-creation-time', + 'Mon, 15 Jun 2020 02:16:44 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', + 'Mon, 15 Jun 2020 02:16:44 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218740382903198/blob159218740411605260') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:44 GMT', + 'ETag', + '"0x8D810D2265174D7"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd8032ec4-501e-0069-61bb-4274ec000000', + 'x-ms-client-request-id', + 'b9be23b1-d73c-4717-81f6-34a9c326286f', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-06-15T02:16:45.3590376Z', + 'x-ms-snapshot', + '2020-06-15T02:16:45.3580376Z', + 'x-ms-request-server-encrypted', + 'false', + 'Date', + 'Mon, 15 Jun 2020 02:16:44 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container159218740382903198/blob159218740411605260') + .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', + 'd8032f76-501e-0069-0bbb-4274ec000000', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Mon, 15 Jun 2020 02:16:45 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container159218740382903198/blob159218740411605260') + .query(true) + .reply(200, "", [ + 'Content-Length', + '11', + 'Content-Type', + 'application/octet-stream', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:44 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D810D226257AD7"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46d8af-701e-006e-22bb-42188f000000', + 'x-ms-client-request-id', + '8b70d6ae-70bb-4073-a523-c51e8ff15910', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-06-15T02:16:44.2092247Z', + 'x-ms-creation-time', + 'Mon, 15 Jun 2020 02:16:44 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', + 'Mon, 15 Jun 2020 02:16:45 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159218740382903198') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46d979-701e-006e-66bb-42188f000000', + 'x-ms-client-request-id', + '2adc86ad-5cbd-4997-8d45-ca7a5a8ca0d9', + 'x-ms-version', + '2019-12-12', + 'Date', + '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 new file mode 100644 index 000000000000..0e0a2ea839af --- /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 = "d1f04813bc3b3c180b3c151592797721"; + +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('/container159218739798401048') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:38 GMT', + 'ETag', + '"0x8D810D2227D5AF2"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd8031b57-501e-0069-2cbb-4274ec000000', + 'x-ms-client-request-id', + 'c73c5674-452e-4456-abb4-66680c7d4d31', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Mon, 15 Jun 2020 02:16:37 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218739798401048/blob159218739827103012', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:38 GMT', + 'ETag', + '"0x8D810D222A9BCEB"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd8031c45-501e-0069-01bb-4274ec000000', + 'x-ms-client-request-id', + '81d7cd13-761d-4765-a333-368aaf9df399', + '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:38.3651051Z', + 'Date', + 'Mon, 15 Jun 2020 02:16:37 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218739798401048/blob159218739827103012') + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:38 GMT', + 'ETag', + '"0x8D810D222D5B6DE"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd8031cef-501e-0069-21bb-4274ec000000', + 'x-ms-client-request-id', + 'e2acb811-e53e-4bd9-8da4-83297a145aec', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-15T02:16:38.6543086Z', + 'Date', + 'Mon, 15 Jun 2020 02:16:38 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218739798401048/blockblob%2F0159218739885105753') + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:38 GMT', + 'ETag', + '"0x8D810D22301FEFB"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd8031d87-501e-0069-34bb-4274ec000000', + 'x-ms-client-request-id', + 'c7c727f2-b2d5-45a2-b36b-546271b1cc1c', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-15T02:16:38.9445138Z', + 'Date', + 'Mon, 15 Jun 2020 02:16:38 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218739798401048/blockblob%2F1159218739914105458') + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:16:39 GMT', + 'ETag', + '"0x8D810D2232E6E34"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd8031e9c-501e-0069-34bb-4274ec000000', + 'x-ms-client-request-id', + '43c1fe8d-fa95-456d-9d61-7df78090cb32', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-15T02:16:39.2357186Z', + 'Date', + 'Mon, 15 Jun 2020 02:16:38 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/container159218739798401048') + .query(true) + .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', + 'application/xml', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd8031f6c-501e-0069-7dbb-4274ec000000', + 'x-ms-client-request-id', + '83b3063d-0c0e-42ee-8557-46870a3bfe7b', + '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', + 'Mon, 15 Jun 2020 02:16:38 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159218739798401048') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd80320f8-501e-0069-7dbb-4274ec000000', + 'x-ms-client-request-id', + 'cd5154a5-eeb2-4f78-8f41-6faccf2069f4', + 'x-ms-version', + '2019-12-12', + 'Date', + '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 new file mode 100644 index 000000000000..16f0f66aa436 --- /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 = "a2cec6ad1620c77c50ce31d51972e9c2"; + +module.exports.testInfo = {"uniqueName":{"container":"container159218742224703366","blob":"blob159218742269309927"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218742224703366') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:17:02 GMT', + 'ETag', + '"0x8D810D230F36FF2"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f46ffe3-701e-006e-20bb-42188f000000', + 'x-ms-client-request-id', + '97584d0a-3369-4912-98ea-e5218ab3cd90', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Mon, 15 Jun 2020 02:17:01 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218742224703366/blob159218742269309927', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:17:02 GMT', + 'ETag', + '"0x8D810D231386F2D"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '4bfa9945-e01e-0021-76bb-4269db000000', + 'x-ms-client-request-id', + '9649cc13-6af4-4264-a640-e98bc007be59', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-15T02:17:02.7893828Z', + 'Date', + 'Mon, 15 Jun 2020 02:17:02 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218742224703366/blob159218742269309927') + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:17:03 GMT', + 'ETag', + '"0x8D810D231641AF1"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f4701ca-701e-006e-78bb-42188f000000', + 'x-ms-client-request-id', + 'd825a210-3fca-43da-80d3-5e6f7b8d1db5', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-15T02:17:03.0755841Z', + 'Date', + 'Mon, 15 Jun 2020 02:17:02 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container159218742224703366/blob159218742269309927') + .query(true) + .reply(200, "", [ + 'Content-Length', + '11', + 'Content-Type', + 'application/octet-stream', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:17:02 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D810D231386F2D"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '4bfa99e4-e01e-0021-0ebb-4269db000000', + 'x-ms-client-request-id', + '573cde06-75f6-4d2d-af44-7ca0076af817', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-06-15T02:17:02.7893828Z', + 'x-ms-creation-time', + 'Mon, 15 Jun 2020 02:17:02 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', + 'Mon, 15 Jun 2020 02:17:02 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218742224703366/blob159218742269309927') + .reply(202, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:17:03 GMT', + 'ETag', + '"0x8D810D231BF43D7"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f4702ef-701e-006e-13bb-42188f000000', + 'x-ms-client-request-id', + '4ae9fa30-8535-415b-8bcf-cafbd8f71c72', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-06-15T02:17:03.6740094Z', + 'x-ms-copy-id', + '1c0d99e1-7768-4600-8d26-fb9e8f3704fd', + 'x-ms-copy-status', + 'success', + 'Date', + 'Mon, 15 Jun 2020 02:17:02 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/container159218742224703366') + .query(true) + .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', + 'application/xml', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '4bfa9ad2-e01e-0021-72bb-4269db000000', + 'x-ms-client-request-id', + '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,Content-Length,Date,Transfer-Encoding', + 'Access-Control-Allow-Origin', + '*', + 'Date', + 'Mon, 15 Jun 2020 02:17:03 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/container159218742224703366/blob159218742269309927') + .reply(200, "Hello World", [ + 'Content-Length', + '11', + 'Content-Type', + 'application/octet-stream', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:17:03 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D810D231BF43D7"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f4705a9-701e-006e-3fbb-42188f000000', + 'x-ms-client-request-id', + '861d762b-babb-456c-85d0-49f3eb64f38f', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-06-15T02:17:03.6740094Z', + 'x-ms-is-current-version', + 'true', + 'x-ms-creation-time', + 'Mon, 15 Jun 2020 02:17:03 GMT', + 'x-ms-lease-status', + 'unlocked', + 'x-ms-lease-state', + 'available', + 'x-ms-blob-type', + 'BlockBlob', + 'x-ms-copy-id', + '1c0d99e1-7768-4600-8d26-fb9e8f3704fd', + 'x-ms-copy-source', + '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', + '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,Content-Length,Date,Transfer-Encoding', + 'Access-Control-Allow-Origin', + '*', + 'Date', + 'Mon, 15 Jun 2020 02:17:03 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159218742224703366') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '4bfa9bb7-e01e-0021-4dbb-4269db000000', + 'x-ms-client-request-id', + 'a2dda8bd-6e27-47ae-9af7-6a3f8c44a4df', + 'x-ms-version', + '2019-12-12', + 'Date', + '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 new file mode 100644 index 000000000000..9c3bff818eae --- /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":"container159218742963102288","blob":"blob159218742992007448"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218742963102288') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:17:09 GMT', + 'ETag', + '"0x8D810D2355AA63F"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f47123c-701e-006e-29bb-42188f000000', + 'x-ms-client-request-id', + '91251749-9247-4128-b8bf-0670c6d96d28', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Mon, 15 Jun 2020 02:17:09 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218742963102288/blob159218742992007448', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:17:10 GMT', + 'ETag', + '"0x8D810D23586984D"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '4bfaa282-e01e-0021-1ebb-4269db000000', + 'x-ms-client-request-id', + '71c42441-10e9-4a8c-96c3-bdec29d07c1b', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-15T02:17:10.0115021Z', + 'Date', + 'Mon, 15 Jun 2020 02:17:09 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218742963102288/blob159218742992007448') + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:17:10 GMT', + 'ETag', + '"0x8D810D235B26B2A"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f4713d5-701e-006e-31bb-42188f000000', + 'x-ms-client-request-id', + '1d5b54e4-a130-4a25-97c2-9ab5302c1ddc', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-15T02:17:10.3007057Z', + 'Date', + 'Mon, 15 Jun 2020 02:17:10 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218742963102288/blob159218742992007448') + .query(true) + .reply(200, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:17:10 GMT', + 'ETag', + '"0x8D810D235DDEFD3"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '4bfaa359-e01e-0021-6cbb-4269db000000', + 'x-ms-client-request-id', + '30ca621d-9de1-43f4-aea0-d749c51d8eb7', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-06-15T02:17:10.5859067Z', + 'x-ms-request-server-encrypted', + 'true', + 'Date', + 'Mon, 15 Jun 2020 02:17:09 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159218742963102288') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f47156c-701e-006e-39bb-42188f000000', + 'x-ms-client-request-id', + '23bfeb79-7475-4832-bec9-3432a6157335', + 'x-ms-version', + '2019-12-12', + 'Date', + '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 new file mode 100644 index 000000000000..133f7ae3e40f --- /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 = "32f293411691e14438de95c187e92d3b"; + +module.exports.testInfo = {"uniqueName":{"container":"container159218743107601702","blob":"blob159218743136706794"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218743107601702') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:17:11 GMT', + 'ETag', + '"0x8D810D236367702"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '4bfaa435-e01e-0021-3dbb-4269db000000', + 'x-ms-client-request-id', + '317a7359-df8f-45b6-a668-427b0388093c', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Mon, 15 Jun 2020 02:17:10 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218743107601702/blob159218743136706794', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:17:11 GMT', + 'ETag', + '"0x8D810D236638BB0"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f4716d7-701e-006e-18bb-42188f000000', + 'x-ms-client-request-id', + 'f095c0c6-8fe5-4dba-a2fe-2e89bb9b0605', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-15T02:17:11.4595248Z', + 'Date', + 'Mon, 15 Jun 2020 02:17:11 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218743107601702/blob159218743136706794') + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:17:11 GMT', + 'ETag', + '"0x8D810D2368F378A"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '4bfaa512-e01e-0021-05bb-4269db000000', + 'x-ms-client-request-id', + '106e46e3-42dc-4466-bd26-0b3c48246d2a', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-15T02:17:11.7467290Z', + 'Date', + 'Mon, 15 Jun 2020 02:17:11 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***86400GETexample.com**8888GETexample.com**8888GETexample.com**8888GETexample.com**8888true7false2018-03-28", [ + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/xml', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f471869-701e-006e-21bb-42188f000000', + 'x-ms-client-request-id', + '9619b12c-edbc-42ed-9aaf-7eb594fe3fd6', + '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', + 'Mon, 15 Jun 2020 02:17:12 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159218743107601702/blob159218743136706794') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '4bfaa5fe-e01e-0021-66bb-4269db000000', + 'x-ms-client-request-id', + '330a264d-eb4c-4798-99d2-61f72eb15814', + 'x-ms-version', + '2019-12-12', + 'x-ms-delete-type-permanent', + 'false', + 'Date', + 'Mon, 15 Jun 2020 02:17:11 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container159218743107601702/blob159218743136706794') + .query(true) + .reply(404, "", [ + 'Transfer-Encoding', + 'chunked', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f471995-701e-006e-42bb-42188f000000', + 'x-ms-client-request-id', + 'bee1f06b-8f50-40df-ae8b-5745994fbe4c', + '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 02:17:12 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218743107601702/blob159218743136706794') + .query(true) + .reply(200, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '4bfaa6a9-e01e-0021-0cbb-4269db000000', + 'x-ms-client-request-id', + '249823cb-caa2-48ac-ad0a-368b28de4fd6', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Mon, 15 Jun 2020 02:17:12 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/container159218743107601702/blob159218743136706794') + .query(true) + .reply(200, "", [ + 'Content-Length', + '11', + 'Content-Type', + 'application/octet-stream', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:17:11 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D810D236638BB0"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f471b02-701e-006e-26bb-42188f000000', + 'x-ms-client-request-id', + '57620bf3-9ef6-4cca-910b-4e4223342e14', + 'x-ms-version', + '2019-12-12', + 'x-ms-version-id', + '2020-06-15T02:17:11.4595248Z', + 'x-ms-creation-time', + 'Mon, 15 Jun 2020 02:17:11 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', + 'Mon, 15 Jun 2020 02:17:13 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159218743107601702') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '4bfaa75e-e01e-0021-3bbb-4269db000000', + 'x-ms-client-request-id', + '809650fe-1111-4f77-b421-589bbd73135c', + 'x-ms-version', + '2019-12-12', + 'Date', + '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 new file mode 100644 index 000000000000..8993032c9055 --- /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":"container159218742674901684","blob":"blob159218742703506211"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218742674901684') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:17:06 GMT', + 'ETag', + '"0x8D810D233A29356"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f470b3c-701e-006e-07bb-42188f000000', + 'x-ms-client-request-id', + 'd670e748-c3d7-40f7-825f-685d4476b781', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Mon, 15 Jun 2020 02:17:05 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218742674901684/blob159218742703506211', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:17:07 GMT', + 'ETag', + '"0x8D810D233CE3828"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '4bfa9e96-e01e-0021-75bb-4269db000000', + 'x-ms-client-request-id', + 'f08f1993-bef1-4c32-8bbb-68678d5b7747', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-15T02:17:07.1254568Z', + 'Date', + 'Mon, 15 Jun 2020 02:17:06 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218742674901684/blob159218742703506211') + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + '1B2M2Y8AsgTpgAmY7PhCfg==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:17:07 GMT', + 'ETag', + '"0x8D810D233F9BCCE"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f470c8c-701e-006e-42bb-42188f000000', + 'x-ms-client-request-id', + '5a5612ce-dcb8-422a-85a5-b8f0c8f6b3ea', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'AAAAAAAAAAA=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-15T02:17:07.4116574Z', + 'Date', + 'Mon, 15 Jun 2020 02:17:07 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159218742674901684/blob159218742703506211', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Mon, 15 Jun 2020 02:17:07 GMT', + 'ETag', + '"0x8D810D234258FAA"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '4bfa9f2a-e01e-0021-02bb-4269db000000', + 'x-ms-client-request-id', + '2f5aa1f6-a873-445e-b81f-07dd43e977ad', + 'x-ms-version', + '2019-12-12', + 'x-ms-content-crc64', + 'YeJLfssylmU=', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-15T02:17:07.6988602Z', + 'Date', + 'Mon, 15 Jun 2020 02:17:07 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159218742674901684') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f470de8-701e-006e-0fbb-42188f000000', + 'x-ms-client-request-id', + '17e172c3-3c3d-441f-85d5-16c93f9ebeaf', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Mon, 15 Jun 2020 02:17:07 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_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' +]); 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_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/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 5b29a6c9f41c..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,60 +1,102 @@ let nock = require('nock'); -module.exports.testInfo = {"uniqueName":{"container":"container158224819242602498","blob":"blob158224819384806465"},"newDate":{}} +module.exports.hash = "22aa270c807fed270cf40da4204adab6"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827283501141","blob":"blob159210827283703139"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158224819242602498') + .put('/container159210827283501141') .query(true) .reply(201, "", [ 'Content-Length', '0', 'Last-Modified', - 'Fri, 21 Feb 2020 01:23:13 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'ETag', - '"0x8D7B66C9F05446C"', + '"0x8D81019E82D157B"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '16a15905-f01e-0048-4755-e84232000000', + 'c1308f41-201e-003e-0e02-42dadf000000', 'x-ms-client-request-id', - '0701b4e0-e23c-4571-b062-a811c675cc23', + 'b6dcca5d-e71f-4082-97ea-62600d64fc29', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Fri, 21 Feb 2020 01:23:12 GMT' + 'Sun, 14 Jun 2020 04:17:51 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158224819242602498/blob158224819384806465', "Hello World") + .put('/container159210827283501141/blob159210827283703139', "Hello World") .reply(201, "", [ 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Fri, 21 Feb 2020 01:23:14 GMT', + 'Sun, 14 Jun 2020 04:17:52 GMT', 'ETag', - '"0x8D7B66C9FB99A69"', + '"0x8D81019E82FCB3E"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'f1569be6-a01e-0008-2155-e8450a000000', + 'c1308f46-201e-003e-1102-42dadf000000', 'x-ms-client-request-id', - '1d217bd0-430b-4927-92e8-c9e983188d6e', + '186f7e20-9a3f-4721-a629-cccc7c250950', '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.8598334Z', + '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.0falsefalsefalsefalse2018-03-28", [ + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/xml', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1308f4a-201e-003e-1402-42dadf000000', + 'x-ms-client-request-id', + '79817cbd-e026-4820-946a-dd875da1b907', + '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}) + .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', - 'Fri, 21 Feb 2020 01:23:14 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.0truetruetruetrue51.0truetruetrue31.0truetruetrue4DELETE,GET,HEAD,MERGE,POST,OPTIONS,PUT,PATCH***86400GETexample.com**8888GETexample.com**8888GETexample.com**8888GETexample.com**8888true7false", [ + .reply(200, "1.0falsefalsefalsefalse1.0falsefalse1.0falsefalsetrue7false2018-03-28", [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -62,42 +104,38 @@ 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', + 'c1308f56-201e-003e-1a02-42dadf000000', 'x-ms-client-request-id', - 'a54eeccd-225e-4712-8fc2-a0ecd57f1cca', + '94987602-4d4e-4943-b9e8-e2960fdef3e5', 'x-ms-version', - '2019-02-02', - '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', - '*', + '2019-12-12', 'Date', - 'Fri, 21 Feb 2020 01:23:15 GMT' + 'Sun, 14 Jun 2020 04:17:51 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container158224819242602498/blob158224819384806465') + .delete('/container159210827283501141/blob159210827283703139') .reply(202, "", [ 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '4317385a-801e-0052-2355-e823ed000000', + 'c1308f58-201e-003e-1c02-42dadf000000', 'x-ms-client-request-id', - '74edeedb-f29f-4143-bc94-24d1ce31e039', + '49b9603d-e038-4ea1-bada-58105c2da8e3', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-delete-type-permanent', 'false', 'Date', - 'Fri, 21 Feb 2020 01:23:16 GMT' + 'Sun, 14 Jun 2020 04:17:51 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .get('/container158224819242602498') + .get('/container159210827283501141') .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, "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', @@ -105,21 +143,17 @@ 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', + 'c1308f5d-201e-003e-2002-42dadf000000', 'x-ms-client-request-id', - '9ee5fb28-702d-4320-9897-bb38ddd5bf82', + '60e46583-bd02-47fd-9961-6dc7ed633206', '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', - 'Fri, 21 Feb 2020 01:23:16 GMT' + 'Sun, 14 Jun 2020 04:17:51 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158224819242602498/blob158224819384806465') + .put('/container159210827283501141/blob159210827283703139') .query(true) .reply(200, "", [ 'Content-Length', @@ -127,19 +161,19 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '4317393f-801e-0052-7755-e823ed000000', + 'c1308f5f-201e-003e-2202-42dadf000000', 'x-ms-client-request-id', - '9b5fb2c2-879c-4747-88cb-05d2adbde60e', + '92fe5607-2425-4feb-8a70-7304b807db24', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Fri, 21 Feb 2020 01:23:16 GMT' + 'Sun, 14 Jun 2020 04:17:52 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .get('/container158224819242602498') + .get('/container159210827283501141') .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, "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', @@ -147,21 +181,17 @@ 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', + 'c1308f65-201e-003e-2802-42dadf000000', 'x-ms-client-request-id', - '7231eea9-7bf1-40a0-a359-811726cc6404', + '2457fc1b-f748-47ed-9ce5-d7547667f23f', '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', - 'Fri, 21 Feb 2020 01:23:17 GMT' + 'Sun, 14 Jun 2020 04:17:52 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container158224819242602498') + .delete('/container159210827283501141') .query(true) .reply(202, "", [ 'Content-Length', @@ -169,11 +199,11 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '16a16113-f01e-0048-7355-e84232000000', + 'c1308f68-201e-003e-2b02-42dadf000000', 'x-ms-client-request-id', - '500e08dc-9fa1-487c-91d0-3ca0ac351314', + '0150839c-6062-4178-98ca-ff2fa1bca745', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Fri, 21 Feb 2020 01:23:17 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 new file mode 100644 index 000000000000..f3b0b1015f0d --- /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,74 @@ +let nock = require('nock'); + +module.exports.hash = "c29ab049f3c90f17b01e8111d565d6f6"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827987503646","blob":"blob159210827989101802"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210827987503646') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:17:59 GMT', + 'ETag', + '"0x8D81019EC6149CC"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309a2a-201e-003e-4202-42dadf000000', + 'x-ms-client-request-id', + '0abc2f58-a8c6-4b7b-8b06-be5f657444d1', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210827987503646/blob159210827989101802', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:17:59 GMT', + 'ETag', + '"0x8D81019EC64251A"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309a33-201e-003e-4a02-42dadf000000', + 'x-ms-client-request-id', + '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', + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159210827987503646') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309a36-201e-003e-4d02-42dadf000000', + 'x-ms-client-request-id', + 'eb4f77b9-4d3d-4719-b4b1-9d662c6e6a30', + 'x-ms-version', + '2019-12-12', + 'Date', + '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 new file mode 100644 index 000000000000..af831fb5f20e --- /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,74 @@ +let nock = require('nock'); + +module.exports.hash = "ff7d50dc3de36b014e9d2582c95ddf56"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827992203656","blob":"blob159210827995306126"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210827992203656') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:17:59 GMT', + 'ETag', + '"0x8D81019EC687706"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309a39-201e-003e-5002-42dadf000000', + 'x-ms-client-request-id', + 'a11fac75-e9e4-4496-b867-b394d96a2080', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210827992203656/blob159210827995306126', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:17:59 GMT', + 'ETag', + '"0x8D81019EC6BEEAD"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309a42-201e-003e-5802-42dadf000000', + 'x-ms-client-request-id', + '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', + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159210827992203656') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309a46-201e-003e-5c02-42dadf000000', + 'x-ms-client-request-id', + '613d5629-51e5-432b-922e-532ca8f35398', + 'x-ms-version', + '2019-12-12', + 'Date', + '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 new file mode 100644 index 000000000000..47027ceec267 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work.js @@ -0,0 +1,74 @@ +let nock = require('nock'); + +module.exports.hash = "6aeaea3dc0f60f3ffbb5251da70cf248"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827978205363","blob":"blob159210827979706474"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210827978205363') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:17:59 GMT', + 'ETag', + '"0x8D81019EC531663"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c13099f1-201e-003e-0d02-42dadf000000', + 'x-ms-client-request-id', + 'd82f93b7-ae98-4ea7-b4dc-96ab8f6cc1e4', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210827978205363/blob159210827979706474', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:17:59 GMT', + 'ETag', + '"0x8D81019EC55CAA7"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c13099f9-201e-003e-1402-42dadf000000', + 'x-ms-client-request-id', + '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', + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159210827978205363') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309a02-201e-003e-1c02-42dadf000000', + 'x-ms-client-request-id', + 'fa138a3a-fcf0-4708-ac9f-caba15f8e5fb', + 'x-ms-version', + '2019-12-12', + 'Date', + '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 new file mode 100644 index 000000000000..587c2f9c91de --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_aborter.js @@ -0,0 +1,74 @@ +let nock = require('nock'); + +module.exports.hash = "a15c209ef562a2fc8fc02c560a49e705"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210828025306285","blob":"blob159210828025400574"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210828025306285') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:18:00 GMT', + 'ETag', + '"0x8D81019EC98DEA9"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309ac1-201e-003e-4c02-42dadf000000', + 'x-ms-client-request-id', + '7ed2799e-5c6b-4304-8d3c-f6a666f7db52', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210828025306285/blob159210828025400574', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:18:00 GMT', + 'ETag', + '"0x8D81019EC9B6BB8"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309ac9-201e-003e-5302-42dadf000000', + 'x-ms-client-request-id', + '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', + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159210828025306285') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309ad0-201e-003e-5a02-42dadf000000', + 'x-ms-client-request-id', + '517160fb-6b3d-48c2-9d7f-01a804ac1c72', + 'x-ms-version', + '2019-12-12', + 'Date', + '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 new file mode 100644 index 000000000000..f2cd40697438 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_access_conditions.js @@ -0,0 +1,74 @@ +let nock = require('nock'); + +module.exports.hash = "088f9619785dd5dbabc153cfe3e50d2f"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827982901028","blob":"blob159210827984404337"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210827982901028') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:17:59 GMT', + 'ETag', + '"0x8D81019EC5A43A1"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309a0b-201e-003e-2502-42dadf000000', + 'x-ms-client-request-id', + '018b3eb0-89d3-4330-8750-e4e98bf92abc', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210827982901028/blob159210827984404337', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:17:59 GMT', + 'ETag', + '"0x8D81019EC5CD0C3"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309a13-201e-003e-2c02-42dadf000000', + 'x-ms-client-request-id', + '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', + 'Sun, 14 Jun 2020 04:17:58 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159210827982901028') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309a1f-201e-003e-3702-42dadf000000', + 'x-ms-client-request-id', + 'e0f2bf8f-e57f-469e-bd79-f725d456a9fd', + 'x-ms-version', + '2019-12-12', + 'Date', + '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 new file mode 100644 index 000000000000..62c622e2050c --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_blob_properties.js @@ -0,0 +1,74 @@ +let nock = require('nock'); + +module.exports.hash = "8ac5123044481e868581f044adfe15f5"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210828014702637","blob":"blob159210828016304914"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210828014702637') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:18:00 GMT', + 'ETag', + '"0x8D81019EC8A0EE7"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309a90-201e-003e-2002-42dadf000000', + 'x-ms-client-request-id', + 'ed9970f1-43e7-44e3-bd7a-bf71df45a7f1', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210828014702637/blob159210828016304914', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:18:00 GMT', + 'ETag', + '"0x8D81019EC8D3854"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309a96-201e-003e-2402-42dadf000000', + 'x-ms-client-request-id', + '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', + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159210828014702637') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309aa0-201e-003e-2d02-42dadf000000', + 'x-ms-client-request-id', + '479323a8-a899-4bfa-b2ef-11409abe2ae9', + 'x-ms-version', + '2019-12-12', + 'Date', + '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 new file mode 100644 index 000000000000..4c4c0329aed6 --- /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,74 @@ +let nock = require('nock'); + +module.exports.hash = "c1e5526d5c8ce2953153cbe1fac65891"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210828051903765","blob":"blob159210828053501523"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210828051903765') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:18:00 GMT', + 'ETag', + '"0x8D81019ECC30390"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309b40-201e-003e-4102-42dadf000000', + 'x-ms-client-request-id', + 'cbc43c6b-724d-4ec0-840e-f29e08fca85d', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210828051903765/blob159210828053501523', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:18:00 GMT', + 'ETag', + '"0x8D81019ECC5B7A7"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309b4a-201e-003e-4902-42dadf000000', + 'x-ms-client-request-id', + '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', + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159210828051903765') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309b5b-201e-003e-5802-42dadf000000', + 'x-ms-client-request-id', + '61c60639-3814-491a-abd7-696578b66381', + 'x-ms-version', + '2019-12-12', + 'Date', + '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 new file mode 100644 index 000000000000..ecc3663bf7c1 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_empty_results.js @@ -0,0 +1,74 @@ +let nock = require('nock'); + +module.exports.hash = "9b06cd9ef0b1905c71e56501996c1bb3"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210828010108761","blob":"blob159210828011600788"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210828010108761') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:18:00 GMT', + 'ETag', + '"0x8D81019EC82BA8E"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309a7c-201e-003e-0e02-42dadf000000', + 'x-ms-client-request-id', + 'c3d24b89-9e96-44ef-abf1-4ca1e1e80818', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210828010108761/blob159210828011600788', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:18:00 GMT', + 'ETag', + '"0x8D81019EC8547A9"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309a87-201e-003e-1702-42dadf000000', + 'x-ms-client-request-id', + '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', + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159210828010108761') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309a8d-201e-003e-1d02-42dadf000000', + 'x-ms-client-request-id', + '1970a7b2-ce89-488f-a989-f7607b64408e', + 'x-ms-version', + '2019-12-12', + 'Date', + '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 new file mode 100644 index 000000000000..a65add7b2ed5 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_fatal_error_event.js @@ -0,0 +1,74 @@ +let nock = require('nock'); + +module.exports.hash = "ff936e30e31a1959674da1a4b9202f5e"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210828041005422","blob":"blob159210828042603825"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210828041005422') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:18:00 GMT', + 'ETag', + '"0x8D81019ECB2ACE7"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309b04-201e-003e-0802-42dadf000000', + 'x-ms-client-request-id', + '5749288e-7d29-4a52-b50e-da73d346436d', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210828041005422/blob159210828042603825', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:18:00 GMT', + 'ETag', + '"0x8D81019ECB56104"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309b0f-201e-003e-1202-42dadf000000', + 'x-ms-client-request-id', + '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', + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159210828041005422') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309b15-201e-003e-1802-42dadf000000', + 'x-ms-client-request-id', + '5e530ac9-4ec8-49ba-aaa5-5845a57a7470', + 'x-ms-version', + '2019-12-12', + 'Date', + '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 new file mode 100644 index 000000000000..d7c5215cd5b5 --- /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,74 @@ +let nock = require('nock'); + +module.exports.hash = "202bab48bbe0ff350d44978250512663"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210828056608669","blob":"blob159210828058208020"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210828056608669') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:18:00 GMT', + 'ETag', + '"0x8D81019ECCAA613"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309b69-201e-003e-6602-42dadf000000', + 'x-ms-client-request-id', + '52488d5a-e8dd-4e0d-bbec-b514d5137f87', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210828056608669/blob159210828058208020', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:18:00 GMT', + 'ETag', + '"0x8D81019ECCD0BFA"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309b71-201e-003e-6d02-42dadf000000', + 'x-ms-client-request-id', + '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', + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159210828056608669') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309b78-201e-003e-7402-42dadf000000', + 'x-ms-client-request-id', + '81b488d3-efa5-4058-b3b9-c644d6877baf', + 'x-ms-version', + '2019-12-12', + 'Date', + '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 new file mode 100644 index 000000000000..5bf7cc3219f6 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_large_file.js @@ -0,0 +1,74 @@ +let nock = require('nock'); + +module.exports.hash = "d3f0ebebf3dcd28ed374f37ebe29b4a8"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210828019402829","blob":"blob159210828022206926"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210828019402829') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:18:00 GMT', + 'ETag', + '"0x8D81019EC91FF95"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309aa9-201e-003e-3502-42dadf000000', + 'x-ms-client-request-id', + '544d0ca6-802d-4389-9243-58eafcb33f3c', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210828019402829/blob159210828022206926', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:18:00 GMT', + 'ETag', + '"0x8D81019EC948CAB"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309ab6-201e-003e-4102-42dadf000000', + 'x-ms-client-request-id', + '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', + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159210828019402829') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309abc-201e-003e-4702-42dadf000000', + 'x-ms-client-request-id', + '7d199c47-6cda-41fc-a28d-6fd02624abeb', + 'x-ms-version', + '2019-12-12', + 'Date', + '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 new file mode 100644 index 000000000000..53986a983016 --- /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,74 @@ +let nock = require('nock'); + +module.exports.hash = "298e5b23721ef7c469e86bc6ca431710"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210828045701568","blob":"blob159210828047201329"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210828045701568') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:18:00 GMT', + 'ETag', + '"0x8D81019ECB9DA29"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309b1c-201e-003e-1f02-42dadf000000', + 'x-ms-client-request-id', + '5af06ad9-f572-4d9a-8905-6d7e48549d06', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210828045701568/blob159210828047201329', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:18:00 GMT', + 'ETag', + '"0x8D81019ECBC6728"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309b26-201e-003e-2802-42dadf000000', + 'x-ms-client-request-id', + '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', + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159210828045701568') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309b31-201e-003e-3302-42dadf000000', + 'x-ms-client-request-id', + 'cf966833-590c-4729-8fe8-c405e12c0faa', + 'x-ms-version', + '2019-12-12', + 'Date', + '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 new file mode 100644 index 000000000000..248cbb2d5791 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_progress_event.js @@ -0,0 +1,74 @@ +let nock = require('nock'); + +module.exports.hash = "358f6725ae41663b24921a49f2d724ba"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210828028502479","blob":"blob159210828036306881"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210828028502479') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:18:00 GMT', + 'ETag', + '"0x8D81019EC9FE4CC"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309ad8-201e-003e-6202-42dadf000000', + 'x-ms-client-request-id', + 'c0c5e45e-20d5-4f31-b8e0-9a6edf4219d0', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210828028502479/blob159210828036306881', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:18:00 GMT', + 'ETag', + '"0x8D81019ECABE973"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309af7-201e-003e-7d02-42dadf000000', + 'x-ms-client-request-id', + '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', + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159210828028502479') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309afe-201e-003e-0302-42dadf000000', + 'x-ms-client-request-id', + '79a97e74-e572-43fe-8ca7-807f79989278', + 'x-ms-version', + '2019-12-12', + 'Date', + '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 new file mode 100644 index 000000000000..61b139338203 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_snapshot.js @@ -0,0 +1,74 @@ +let nock = require('nock'); + +module.exports.hash = "76c1583bf5b97b7bf3b2740d780c0843"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210827998608035","blob":"blob159210828000007795"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210827998608035') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:17:59 GMT', + 'ETag', + '"0x8D81019EC7040A1"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309a4b-201e-003e-6102-42dadf000000', + 'x-ms-client-request-id', + '98f18915-3a53-4636-b25c-b002f3579e4f', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210827998608035/blob159210828000007795', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:18:00 GMT', + 'ETag', + '"0x8D81019EC72CDBF"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309a53-201e-003e-6802-42dadf000000', + 'x-ms-client-request-id', + '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', + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159210827998608035') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309a5b-201e-003e-7002-42dadf000000', + 'x-ms-client-request-id', + 'a120cb1f-68fe-4b7a-9ed7-dd00e3d6b8cb', + 'x-ms-version', + '2019-12-12', + 'Date', + '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 new file mode 100644 index 000000000000..dbab316997a5 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blobclient_nodejs_only/recording_query_should_work_with_where_conditionals.js @@ -0,0 +1,74 @@ +let nock = require('nock'); + +module.exports.hash = "c4f766d931daa5bdfbb3450e86ec701f"; + +module.exports.testInfo = {"uniqueName":{"container":"container159210828002206364","blob":"blob159210828003804395"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210828002206364') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:18:00 GMT', + 'ETag', + '"0x8D81019EC77E329"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309a5e-201e-003e-7302-42dadf000000', + 'x-ms-client-request-id', + 'd94e2deb-6c65-491a-870a-b86a3fbd61a0', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container159210828002206364/blob159210828003804395', "Hello World") + .reply(201, "", [ + 'Content-Length', + '0', + 'Content-MD5', + 'sQqNsWTgdUEFt6mb5y4/5Q==', + 'Last-Modified', + 'Sun, 14 Jun 2020 04:18:00 GMT', + 'ETag', + '"0x8D81019EC7A9757"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309a66-201e-003e-7902-42dadf000000', + 'x-ms-client-request-id', + '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', + 'Sun, 14 Jun 2020 04:17:59 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container159210828002206364') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'c1309a74-201e-003e-0602-42dadf000000', + 'x-ms-client-request-id', + 'e6e10c07-0003-4020-b99b-f705033a5327', + 'x-ms-version', + '2019-12-12', + 'Date', + '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 4daf9a41384d..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,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 = "aff5e790ac70fb8a3626de9f7734e800"; + +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('/container156816863123100857') + .put('/container159210827854300126') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:51 GMT', + 'Sun, 14 Jun 2020 04:17:58 GMT', 'ETag', - '"0x8D7365F16080F17"', + '"0x8D81019EB94ACCE"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '10740dfc-c01e-0024-1b47-68ffb2000000', + 'c1309874-201e-003e-2c02-42dadf000000', 'x-ms-client-request-id', - '9c8d8118-79ee-4f0d-ba28-fe383e0aaf41', + '90c960d0-518e-46a2-8389-7b001068f611', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:23:50 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:57 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816863123100857/blob156816863163502976', "Hello World") - .reply(201, "", [ 'Content-Length', + .put('/container159210827854300126/blob159210827855903755', "Hello World") + .reply(201, "", [ + 'Content-Length', '0', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:51 GMT', + 'Sun, 14 Jun 2020 04:17:58 GMT', 'ETag', - '"0x8D7365F1647EEB1"', + '"0x8D81019EB973A41"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '8b513fd1-b01e-0002-3e47-686406000000', + 'c130987c-201e-003e-3202-42dadf000000', 'x-ms-client-request-id', - '352e0ac4-e031-4cae-b518-33c844de1428', + '015cab40-a1c6-40b3-81ec-d69ee8d749b4', '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.5708609Z', 'Date', - 'Wed, 11 Sep 2019 02:23:51 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:57 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container156816863123100857/copiedblob156816863205304473') - .reply(202, "", [ 'Content-Length', + .put('/container159210827854300126/copiedblob159210827857404795') + .reply(202, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:52 GMT', + 'Sun, 14 Jun 2020 04:17:58 GMT', 'ETag', - '"0x8D7365F16907164"', + '"0x8D81019EBAEF055"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'b7b617a7-901e-005a-7647-68607d000000', + 'c1309881-201e-003e-3702-42dadf000000', 'x-ms-client-request-id', - 'b670711c-0000-44de-8c15-0e1ddf9a8b3d', + 'b2d25a81-3c3f-4bce-b375-cb4f41876461', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', + 'x-ms-version-id', + '2020-06-14T04:17:58.7309733Z', 'x-ms-copy-id', - '755e0632-f4e0-4777-86c0-22c01a318024', + '3a9897d2-6f20-4c6c-9cb3-45f851205a22', 'x-ms-copy-status', 'success', 'Date', - 'Wed, 11 Sep 2019 02:23:51 GMT' ]); - + 'Sun, 14 Jun 2020 04:17:57 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container156816863123100857/blob156816863163502976') - .reply(200, "", [ 'Content-Length', + .head('/container159210827854300126/blob159210827855903755') + .reply(200, "", [ + 'Content-Length', '11', 'Content-Type', 'application/octet-stream', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:51 GMT', + 'Sun, 14 Jun 2020 04:17:58 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7365F1647EEB1"', + '"0x8D81019EB973A41"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '63d1f70b-601e-0000-6447-6866fc000000', + 'c130989f-201e-003e-5402-42dadf000000', 'x-ms-client-request-id', - '4b01d581-1e6c-4395-93a3-95d746c13a3b', + 'ea34de71-99d7-479f-9544-fa414c7ee85f', 'x-ms-version', - '2019-02-02', - 'x-ms-tag-count', - '0', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:58.5708609Z', + 'x-ms-is-current-version', + 'true', 'x-ms-creation-time', - 'Wed, 11 Sep 2019 02:23:51 GMT', + 'Sun, 14 Jun 2020 04:17:58 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' ]); - + 'Sun, 14 Jun 2020 04:17:57 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/container156816863123100857/copiedblob156816863205304473') - .reply(200, "", [ 'Content-Length', + .head('/container159210827854300126/copiedblob159210827857404795') + .reply(200, "", [ + 'Content-Length', '11', 'Content-Type', 'application/octet-stream', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Wed, 11 Sep 2019 02:23:52 GMT', + 'Sun, 14 Jun 2020 04:17:58 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D7365F16907164"', + '"0x8D81019EBAEF055"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'd9732ca1-501e-004c-6447-68a1e3000000', + 'c13098a3-201e-003e-5802-42dadf000000', 'x-ms-client-request-id', - 'a02cee0a-b303-4303-b169-74da43c36364', + '8ea3e8cc-757d-4cbe-868f-1d270064bbba', 'x-ms-version', - '2019-02-02', - 'x-ms-tag-count', - '0', + '2019-12-12', + 'x-ms-version-id', + '2020-06-14T04:17:58.7309733Z', + 'x-ms-is-current-version', + 'true', 'x-ms-creation-time', - 'Wed, 11 Sep 2019 02:23:52 GMT', + 'Sun, 14 Jun 2020 04:17:58 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', + '3a9897d2-6f20-4c6c-9cb3-45f851205a22', '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/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', - 'Wed, 11 Sep 2019 02:23:52 GMT', + 'Sun, 14 Jun 2020 04:17:58 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' ]); - + 'Sun, 14 Jun 2020 04:17:57 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container156816863123100857') + .delete('/container159210827854300126') .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', + 'c13098a7-201e-003e-5c02-42dadf000000', 'x-ms-client-request-id', - '25ca3e0b-858b-4d55-a4ac-c6a0ef49d24a', + '7363a034-0afa-43cd-8094-74adc3c0e648', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Wed, 11 Sep 2019 02:23:52 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..63f31fb594a3 --- /dev/null +++ b/sdk/storage/storage-blob/recordings/node/blobserviceclient/recording_find_blob_by_tags_should_work.js @@ -0,0 +1,230 @@ +let nock = require('nock'); + +module.exports.hash = "4b85ed9ce9fb0d046c9216243246450c"; + +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('/container1159227439943806411') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Tue, 16 Jun 2020 02:26:40 GMT', + 'ETag', + '"0x8D8119CB3DA7C94"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'e1be66e0-e01e-0043-7185-43abfc000000', + 'x-ms-client-request-id', + '2e9f1da6-336c-4cd8-a041-b086f7e5f7b8', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Tue, 16 Jun 2020 02:26:40 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container1159227439943806411/blobname1159227440063507702') + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Tue, 16 Jun 2020 02:26:40 GMT', + 'ETag', + '"0x8D8119CB40BD6AC"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'e1be67a2-e01e-0043-2a85-43abfc000000', + 'x-ms-client-request-id', + 'bdfdd0b6-57bd-4f62-8f69-603ea90e9c21', + 'x-ms-version', + '2019-12-12', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-16T02:26:40.6170284Z', + 'Date', + 'Tue, 16 Jun 2020 02:26:40 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container1159227439943806411/blobname2159227440094109162') + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Tue, 16 Jun 2020 02:26:40 GMT', + 'ETag', + '"0x8D8119CB439308B"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'e1be683e-e01e-0043-4485-43abfc000000', + 'x-ms-client-request-id', + '0aa29bb0-96fa-4eaf-a91e-7f1dd8984a51', + 'x-ms-version', + '2019-12-12', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-16T02:26:40.9142411Z', + 'Date', + 'Tue, 16 Jun 2020 02:26:40 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container1159227439943806411/blobname3159227440123509267') + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Tue, 16 Jun 2020 02:26:41 GMT', + 'ETag', + '"0x8D8119CB465EE00"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'e1be68bf-e01e-0043-4385-43abfc000000', + 'x-ms-client-request-id', + '5a340ce3-6756-41d7-9204-c568d94ad66d', + 'x-ms-version', + '2019-12-12', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-16T02:26:41.2074496Z', + 'Date', + 'Tue, 16 Jun 2020 02:26:41 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/') + .query(true) + .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', + 'e1be6dad-e01e-0043-0585-43abfc000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + 'dffd0dec-c1fe-4341-b533-2fb7509534e2', + 'Date', + 'Tue, 16 Jun 2020 02:26:43 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/') + .query(true) + .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', + 'e1be6ee1-e01e-0043-3485-43abfc000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + '1a11dfe9-e691-422e-916c-046601fb2a0b', + 'Date', + 'Tue, 16 Jun 2020 02:26:43 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/') + .query(true) + .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', + 'e1be6f9f-e01e-0043-6585-43abfc000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + '9a13b838-e15f-4dff-a978-cdfcb41f4912', + 'Date', + '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!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', + 'e1be7082-e01e-0043-3c85-43abfc000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + 'e203e2b7-f526-41d6-9d51-22a179ef0641', + 'Date', + '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!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', + 'e1be7137-e01e-0043-6a85-43abfc000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + '990eeded-74c4-43ff-b59f-315879a40b74', + 'Date', + 'Tue, 16 Jun 2020 02:26:44 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container1159227439943806411') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'e1be71f0-e01e-0043-1885-43abfc000000', + 'x-ms-client-request-id', + 'a72f6748-d11e-4449-9b06-98d71cabd224', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Tue, 16 Jun 2020 02:26:45 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..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,3 +1,5 @@ let nock = require('nock'); -module.exports.testInfo = {} +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 438dbf32ba0f..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,3 +1,5 @@ let nock = require('nock'); -module.exports.testInfo = {} +module.exports.hash = "8fc0f0f8be4cfc4b1ab29277203cf2bc"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} 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' +]); 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_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' +]); 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_account_sas_permission_f_t_for_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 new file mode 100644 index 000000000000..75384332234a --- /dev/null +++ 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 @@ -0,0 +1,117 @@ +let nock = require('nock'); + +module.exports.hash = "651943585b7f765da30b063517242c8c"; + +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('/container1159220870164604944') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Mon, 15 Jun 2020 08:11:42 GMT', + 'ETag', + '"0x8D81103BD1E4CBD"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '6eb6eed5-e01e-007c-66ec-42635f000000', + 'x-ms-client-request-id', + '659c96af-b45b-4f27-944d-9ad55f6b5bbc', + 'x-ms-version', + '2019-12-12', + 'Date', + 'Mon, 15 Jun 2020 08:11:42 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container1159220870164604944/blobname1159220870319304275') + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Mon, 15 Jun 2020 08:11:43 GMT', + 'ETag', + '"0x8D81103BD6BBE41"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '6eb6eff7-e01e-007c-77ec-42635f000000', + 'x-ms-client-request-id', + '35cb2ed1-d7c1-4e36-a2ad-6340ba60229b', + 'x-ms-version', + '2019-12-12', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-15T08:11:43.3454145Z', + 'Date', + 'Mon, 15 Jun 2020 08:11:42 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/container1159220870164604944/blobname2159220870349903988') + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Mon, 15 Jun 2020 08:11:43 GMT', + 'ETag', + '"0x8D81103BD993F1A"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '6eb6f0b6-e01e-007c-31ec-42635f000000', + 'x-ms-client-request-id', + '11320ca7-afd2-47ef-810a-a8d1ce13471c', + 'x-ms-version', + '2019-12-12', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-version-id', + '2020-06-15T08:11:43.6436250Z', + 'Date', + 'Mon, 15 Jun 2020 08:11:43 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .get('/') + .query(true) + .reply(200, "\nkey159220870319306639='val1159220870319502764'blobname1159220870319304275container1159220870164604944val1159220870319502764", [ + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/xml', + 'Vary', + 'Origin', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '6eb6f53a-e01e-007c-75ec-42635f000000', + 'x-ms-version', + '2019-12-12', + 'x-ms-client-request-id', + '0f0f2d4e-7dfa-41ac-8112-b950dd4a6de8', + 'Date', + 'Mon, 15 Jun 2020 08:11:45 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/container1159220870164604944') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '6eb6f658-e01e-007c-01ec-42635f000000', + 'x-ms-client-request-id', + '3b7bb3be-7d0b-4c3e-8abf-08fee458d84c', + 'x-ms-version', + '2019-12-12', + 'Date', + '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_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_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/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/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/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 10c05ece2200..3594b8ea9b76 100644 --- a/sdk/storage/storage-blob/review/storage-blob.api.md +++ b/sdk/storage/storage-blob/review/storage-blob.api.md @@ -48,10 +48,13 @@ export class AccountSASPermissions { add: boolean; 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; @@ -196,6 +199,7 @@ export interface AppendBlobCreateHeaders { lastModified?: Date; requestId?: string; version?: string; + versionId?: string; } // @public @@ -206,6 +210,7 @@ export interface AppendBlobCreateOptions extends CommonOptions { customerProvidedKey?: CpkInfo; encryptionScope?: string; metadata?: Metadata; + tags?: Tags; } // @public @@ -371,13 +376,16 @@ 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; + withVersion(versionId: string): BlobClient; } // @public @@ -393,6 +401,7 @@ export interface BlobCopyFromURLHeaders { lastModified?: Date; requestId?: string; version?: string; + versionId?: string; xMsContentCrc64?: Uint8Array; } @@ -415,6 +424,7 @@ export interface BlobCreateSnapshotHeaders { requestId?: string; snapshot?: string; version?: string; + versionId?: string; } // @public @@ -487,6 +497,7 @@ export interface BlobDownloadHeaders { // (undocumented) errorCode?: string; etag?: string; + isSealed?: boolean; isServerEncrypted?: boolean; lastModified?: Date; leaseDuration?: LeaseDurationType; @@ -496,8 +507,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 +529,7 @@ export interface BlobDownloadOptionalParams extends coreHttp.RequestOptionsBase requestId?: string; snapshot?: string; timeoutInSeconds?: number; + versionId?: string; } // @public @@ -540,6 +559,7 @@ export interface BlobDownloadToBufferOptions extends CommonOptions { blockSize?: number; concurrency?: number; conditions?: BlobRequestConditions; + customerProvidedKey?: CpkInfo; maxRetryRequestsPerBlock?: number; onProgress?: (progress: TransferProgressEvent) => void; } @@ -547,6 +567,7 @@ export interface BlobDownloadToBufferOptions extends CommonOptions { // @public export interface BlobExistsOptions extends CommonOptions { abortSignal?: AbortSignalLike; + conditions?: BlobRequestConditions; customerProvidedKey?: CpkInfo; } @@ -588,7 +609,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 +622,15 @@ export interface BlobGetPropertiesHeaders { metadata?: { [propertyName: string]: string; }; + objectReplicationPolicyId?: string; + // (undocumented) + objectReplicationRules?: { + [propertyName: string]: string; + }; requestId?: string; + tagCount?: number; version?: string; + versionId?: string; } // @public @@ -616,6 +647,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) @@ -639,15 +696,25 @@ export interface BlobItem { // (undocumented) deleted: boolean; // (undocumented) + isCurrentVersion?: boolean; + // (undocumented) metadata?: { [propertyName: string]: string; }; // (undocumented) name: string; // (undocumented) + objectReplicationMetadata?: { + [propertyName: string]: string; + }; + // (undocumented) properties: BlobProperties; // (undocumented) snapshot: string; + // (undocumented) + tags?: Tags; + // (undocumented) + versionId?: string; } // @public @@ -715,8 +782,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 +796,46 @@ export interface BlobProperties { remainingRetentionDays?: number; // (undocumented) serverEncrypted?: boolean; + // (undocumented) + 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 @@ -748,8 +859,10 @@ export class BlobSASPermissions { add: boolean; create: boolean; delete: boolean; + deleteVersion: boolean; static parse(permissions: string): BlobSASPermissions; read: boolean; + tag: boolean; toString(): string; write: boolean; } @@ -766,11 +879,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 @@ -782,6 +896,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; @@ -855,6 +970,7 @@ export interface BlobSetMetadataHeaders { lastModified?: Date; requestId?: string; version?: string; + versionId?: string; } // @public @@ -872,6 +988,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; @@ -907,6 +1045,7 @@ export interface BlobStartCopyFromURLHeaders { lastModified?: Date; requestId?: string; version?: string; + versionId?: string; } // @public @@ -916,6 +1055,7 @@ export interface BlobStartCopyFromURLOptions extends CommonOptions { metadata?: Metadata; rehydratePriority?: RehydratePriority; sourceConditions?: ModifiedAccessConditions; + tags?: Tags; tier?: BlockBlobTier | PremiumPageBlobTier | string; } @@ -933,6 +1073,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 @@ -979,6 +1134,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; @@ -1002,6 +1158,7 @@ export interface BlockBlobCommitBlockListHeaders { lastModified?: Date; requestId?: string; version?: string; + versionId?: string; xMsContentCrc64?: Uint8Array; } @@ -1013,6 +1170,7 @@ export interface BlockBlobCommitBlockListOptions extends CommonOptions { customerProvidedKey?: CpkInfo; encryptionScope?: string; metadata?: Metadata; + tags?: Tags; tier?: BlockBlobTier | string; } @@ -1065,6 +1223,18 @@ export interface BlockBlobParallelUploadOptions extends CommonOptions { [propertyName: string]: string; }; onProgress?: (progress: TransferProgressEvent) => void; + tags?: Tags; +} + +// @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 @@ -1154,6 +1324,7 @@ export interface BlockBlobUploadHeaders { lastModified?: Date; requestId?: string; version?: string; + versionId?: string; } // @public @@ -1165,6 +1336,7 @@ export interface BlockBlobUploadOptions extends CommonOptions { encryptionScope?: string; metadata?: Metadata; onProgress?: (progress: TransferProgressEvent) => void; + tags?: Tags; tier?: BlockBlobTier | string; } @@ -1185,6 +1357,7 @@ export interface BlockBlobUploadStreamOptions extends CommonOptions { [propertyName: string]: string; }; onProgress?: (progress: TransferProgressEvent) => void; + tags?: Tags; } // @public @@ -1237,7 +1410,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; @@ -1287,6 +1460,11 @@ export type ContainerCreateResponse = ContainerCreateHeaders & { }; }; +// @public +export interface ContainerDeleteBlobOptions extends BlobDeleteOptions { + versionId?: string; +} + // @public export interface ContainerDeleteHeaders { clientRequestId?: string; @@ -1390,6 +1568,8 @@ export type ContainerGetPropertiesResponse = ContainerGetPropertiesHeaders & { // @public export interface ContainerItem { + // (undocumented) + deleted?: boolean; // (undocumented) metadata?: { [propertyName: string]: string; @@ -1398,6 +1578,8 @@ export interface ContainerItem { name: string; // (undocumented) properties: ContainerProperties; + // (undocumented) + version?: string; } // @public @@ -1413,10 +1595,10 @@ export interface ContainerListBlobFlatSegmentHeaders { // @public export type ContainerListBlobFlatSegmentResponse = ListBlobsFlatSegmentResponse & ContainerListBlobFlatSegmentHeaders & { - _response: coreHttp.HttpResponse & { + _response: HttpResponse & { parsedHeaders: ContainerListBlobFlatSegmentHeaders; bodyAsText: string; - parsedBody: ListBlobsFlatSegmentResponse; + parsedBody: ListBlobsFlatSegmentResponseModel; }; }; @@ -1433,10 +1615,10 @@ export interface ContainerListBlobHierarchySegmentHeaders { // @public export type ContainerListBlobHierarchySegmentResponse = ListBlobsHierarchySegmentResponse & ContainerListBlobHierarchySegmentHeaders & { - _response: coreHttp.HttpResponse & { + _response: HttpResponse & { parsedHeaders: ContainerListBlobHierarchySegmentHeaders; bodyAsText: string; - parsedBody: ListBlobsHierarchySegmentResponse; + parsedBody: ListBlobsHierarchySegmentResponseModel; }; }; @@ -1447,7 +1629,9 @@ export interface ContainerListBlobsOptions extends CommonOptions { includeDeleted?: boolean; includeMetadata?: boolean; includeSnapshots?: boolean; + includeTags?: boolean; includeUncommitedBlobs?: boolean; + includeVersions?: boolean; prefix?: string; } @@ -1456,6 +1640,8 @@ export interface ContainerProperties { // (undocumented) defaultEncryptionScope?: string; // (undocumented) + deletedOn?: Date; + // (undocumented) etag: string; // (undocumented) hasImmutabilityPolicy?: boolean; @@ -1469,6 +1655,8 @@ export interface ContainerProperties { // (undocumented) preventEncryptionScopeOverride?: boolean; publicAccess?: PublicAccessType; + // (undocumented) + remainingRetentionDays?: number; } // @public @@ -1488,9 +1676,11 @@ export class ContainerSASPermissions { add: boolean; create: boolean; delete: boolean; + deleteVersion: boolean; list: boolean; static parse(permissions: string): ContainerSASPermissions; read: boolean; + tag: boolean; toString(): string; write: boolean; } @@ -1591,6 +1781,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; @@ -1674,6 +1886,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) @@ -1695,10 +1927,32 @@ export interface ListBlobsHierarchySegmentResponse { } // @public -export type ListBlobsIncludeItem = 'copy' | 'deleted' | 'metadata' | 'snapshots' | 'uncommittedblobs'; +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 ListContainersIncludeType = 'metadata'; +export type ListBlobsIncludeItem = 'copy' | 'deleted' | 'metadata' | 'snapshots' | 'uncommittedblobs' | 'versions' | 'tags'; + +// @public +export type ListContainersIncludeType = 'metadata' | 'deleted'; // @public export interface ListContainersSegmentResponse { @@ -1748,6 +2002,7 @@ export interface ModifiedAccessConditions { ifMatch?: string; ifModifiedSince?: Date; ifNoneMatch?: string; + ifTags?: string; ifUnmodifiedSince?: Date; } @@ -1837,6 +2092,7 @@ export interface PageBlobCreateHeaders { lastModified?: Date; requestId?: string; version?: string; + versionId?: string; } // @public @@ -1848,6 +2104,7 @@ export interface PageBlobCreateOptions extends CommonOptions { customerProvidedKey?: CpkInfo; encryptionScope?: string; metadata?: Metadata; + tags?: Tags; tier?: PremiumPageBlobTier | string; } @@ -2164,6 +2421,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; @@ -2427,6 +2708,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/rollup.base.config.js b/sdk/storage/storage-blob/rollup.base.config.js index 33ffb8ddb9fc..5549715c7dc5 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", @@ -64,9 +64,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()); @@ -91,7 +91,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, @@ -157,7 +157,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/src/AccountSASPermissions.ts b/sdk/storage/storage-blob/src/AccountSASPermissions.ts index f7ec597d2ac9..4e1c030e1b68 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; @@ -51,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}`); } @@ -83,6 +92,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. * @@ -123,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. @@ -149,6 +182,15 @@ export class AccountSASPermissions { if (this.delete) { permissions.push("d"); } + 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/src/AccountSASSignatureValues.ts b/sdk/storage/storage-blob/src/AccountSASSignatureValues.ts index d9f798f90d66..1ae727989b8c 100644 --- a/sdk/storage/storage-blob/src/AccountSASSignatureValues.ts +++ b/sdk/storage/storage-blob/src/AccountSASSignatureValues.ts @@ -118,6 +118,30 @@ export function generateAccountSASQueryParameters( ? accountSASSignatureValues.version : SERVICE_VERSION; + if ( + accountSASSignatureValues.permissions && + accountSASSignatureValues.permissions.deleteVersion && + version < "2019-10-10" + ) { + throw RangeError("'version' must be >= '2019-10-10' 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/BlobDownloadResponse.ts b/sdk/storage/storage-blob/src/BlobDownloadResponse.ts index 05ff11a329ed..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. * @@ -413,7 +424,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 +435,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/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/BlobSASPermissions.ts b/sdk/storage/storage-blob/src/BlobSASPermissions.ts index 2df60e1af0b7..6c12d7cd7639 100644 --- a/sdk/storage/storage-blob/src/BlobSASPermissions.ts +++ b/sdk/storage/storage-blob/src/BlobSASPermissions.ts @@ -43,6 +43,12 @@ export class BlobSASPermissions { case "d": blobSASPermissions.delete = true; break; + case "x": + blobSASPermissions.deleteVersion = true; + break; + case "t": + blobSASPermissions.tag = true; + break; default: throw new RangeError(`Invalid permission: ${char}`); } @@ -91,6 +97,22 @@ export class BlobSASPermissions { */ public delete: boolean = false; + /** + * Specifies Delete version access granted. + * + * @type {boolean} + * @memberof 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. @@ -115,6 +137,12 @@ export class BlobSASPermissions { if (this.delete) { permissions.push("d"); } + 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 06823403a832..9e83e52538f9 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. * @@ -298,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") { @@ -347,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." @@ -362,6 +372,25 @@ 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.permissions && + blobSASSignatureValues.permissions.deleteVersion && + version < "2019-10-10" + ) { + throw RangeError("'version' must be >= '2019-10-10' 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."); + } + if (blobSASSignatureValues.blobName) { resource = "b"; } @@ -449,7 +478,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." @@ -460,14 +490,41 @@ 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.deleteVersion && + version < "2019-10-10" + ) { + throw RangeError("'version' must be >= '2019-10-10' 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."); + } + if (blobSASSignatureValues.blobName === undefined && blobSASSignatureValues.snapshotTime) { 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 +560,7 @@ function generateBlobSASQueryParameters20181109( blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", version, resource, - blobSASSignatureValues.snapshotTime, + timestamp, blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", @@ -559,6 +616,26 @@ function generateBlobSASQueryParametersUDK20181109( } 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.deleteVersion && + version < "2019-10-10" + ) { + throw RangeError("'version' must be >= '2019-10-10' 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."); + } + let resource: string = "c"; let verifiedPermissions: string | undefined; @@ -566,10 +643,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 +699,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/BlobServiceClient.ts b/sdk/storage/storage-blob/src/BlobServiceClient.ts index d270a5a36cc7..e48d9cb0d73c 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"; @@ -155,7 +157,35 @@ 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[]; +} + +/** + * 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; } /** @@ -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. */ @@ -647,11 +694,64 @@ export class BlobServiceClient extends StorageClient { "BlobServiceClient-listContainersSegment", options.tracingOptions ); + try { return await this.serviceContext.listContainersSegment({ abortSignal: options.abortSignal, marker, ...options, + include: typeof options.include === "string" ? [options.include] : options.include, + spanOptions + }); + } catch (e) { + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e.message + }); + throw e; + } finally { + span.end(); + } + } + + /** + * 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) { @@ -665,6 +765,183 @@ export class BlobServiceClient extends StorageClient { } } + /** + * 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 5caa6e817ee0..63130bbf6ae0 100644 --- a/sdk/storage/storage-blob/src/Clients.ts +++ b/sdk/storage/storage-blob/src/Clients.ts @@ -1,140 +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 -} 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"; + 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. @@ -283,6 +289,13 @@ export interface BlobExistsOptions extends CommonOptions { * @memberof BlobExistsOptions */ customerProvidedKey?: CpkInfo; + /** + * Conditions to meet. + * + * @type {BlobRequestConditions} + * @memberof BlobExistsOptions + */ + conditions?: BlobRequestConditions; } /** @@ -452,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. * @@ -672,6 +744,13 @@ export interface BlobStartCopyFromURLOptions extends CommonOptions { * @memberof BlobStartCopyFromURLOptions */ rehydratePriority?: RehydratePriority; + /** + * Blob tags. + * + * @type {Tags} + * @memberof BlobStartCopyFromURLOptions + */ + tags?: Tags; } /** @@ -742,6 +821,13 @@ export interface BlobSyncCopyFromURLOptions extends CommonOptions { * @memberof BlobSyncCopyFromURLOptions */ sourceContentMD5?: Uint8Array; + /** + * Blob tags. + * + * @type {Tags} + * @memberof BlobSyncCopyFromURLOptions + */ + tags?: Tags; } /** @@ -844,6 +930,13 @@ export interface BlobDownloadToBufferOptions extends CommonOptions { * @memberof BlobDownloadToBufferOptions */ concurrency?: number; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof BlobDownloadToBufferOptions + */ + customerProvidedKey?: CpkInfo; } /** @@ -862,6 +955,7 @@ export class BlobClient extends StorageClient { * @memberof BlobClient */ private blobContext: StorageBlob; + private _name: string; private _containerName: string; @@ -1044,6 +1138,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. * @@ -1237,7 +1350,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 @@ -1254,6 +1367,7 @@ export class BlobClient extends StorageClient { await this.getProperties({ abortSignal: options.abortSignal, customerProvidedKey: options.customerProvidedKey, + conditions: options.conditions, tracingOptions: { ...options.tracingOptions, spanOptions @@ -1460,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. * @@ -1668,6 +1842,7 @@ export class BlobClient extends StorageClient { sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince }, sourceContentMD5: options.sourceContentMD5, + blobTagsString: toBlobTagsString(options.tags), spanOptions }); } catch (e) { @@ -1856,6 +2031,7 @@ export class BlobClient extends StorageClient { abortSignal: options.abortSignal, conditions: options.conditions, maxRetryRequests: options.maxRetryRequestsPerBlock, + customerProvidedKey: options.customerProvidedKey, tracingOptions: { ...options.tracingOptions, spanOptions @@ -2021,6 +2197,7 @@ export class BlobClient extends StorageClient { }, rehydratePriority: options.rehydratePriority, tier: toAccessTier(options.tier), + blobTagsString: toBlobTagsString(options.tags), spanOptions }); } catch (e) { @@ -2089,6 +2266,13 @@ export interface AppendBlobCreateOptions extends CommonOptions { * @memberof AppendBlobCreateOptions */ encryptionScope?: string; + /** + * Blob tags. + * + * @type {Tags} + * @memberof AppendBlobCreateOptions + */ + tags?: Tags; } /** @@ -2442,6 +2626,7 @@ export class AppendBlobClient extends BlobClient { modifiedAccessConditions: options.conditions, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, + blobTagsString: toBlobTagsString(options.tags), spanOptions }); } catch (e) { @@ -2547,43 +2732,233 @@ export class AppendBlobClient extends BlobClient { try { ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, { - abortSignal: options.abortSignal, - sourceRange: rangeToString({ offset: sourceOffset, count }), - sourceContentMD5: options.sourceContentMD5, - sourceContentCrc64: options.sourceContentCrc64, - leaseAccessConditions: options.conditions, - appendPositionAccessConditions: options.conditions, - modifiedAccessConditions: options.conditions, - sourceModifiedAccessConditions: { - sourceIfMatch: options.sourceConditions.ifMatch, - sourceIfModifiedSince: options.sourceConditions.ifModifiedSince, - sourceIfNoneMatch: options.sourceConditions.ifNoneMatch, - sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince - }, - cpkInfo: options.customerProvidedKey, - encryptionScope: options.encryptionScope, - spanOptions - }); - } catch (e) { - span.setStatus({ - code: CanonicalCode.UNKNOWN, - message: e.message - }); - throw e; - } finally { - span.end(); - } - } + return await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, { + abortSignal: options.abortSignal, + sourceRange: rangeToString({ offset: sourceOffset, count }), + sourceContentMD5: options.sourceContentMD5, + sourceContentCrc64: options.sourceContentCrc64, + leaseAccessConditions: options.conditions, + appendPositionAccessConditions: options.conditions, + modifiedAccessConditions: options.conditions, + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions.ifMatch, + sourceIfModifiedSince: options.sourceConditions.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince + }, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + spanOptions + }); + } catch (e) { + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e.message + }); + throw e; + } finally { + span.end(); + } + } +} + +/** + * Options to configure {@link BlockBlobClient.upload} operation. + * + * @export + * @interface BlockBlobUploadOptions + */ +export interface BlockBlobUploadOptions 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; + /** + * Conditions to meet when uploading to the block blob. + * + * @type {BlobRequestConditions} + * @memberof BlockBlobUploadOptions + */ + conditions?: BlobRequestConditions; + /** + * HTTP headers to set when uploading to a block blob. + * + * @type {BlobHTTPHeaders} + * @memberof BlockBlobUploadOptions + */ + blobHTTPHeaders?: BlobHTTPHeaders; + /** + * A collection of key-value string pair to associate with the blob when uploading to a block blob. + * + * @type {Metadata} + * @memberof BlockBlobUploadOptions + */ + metadata?: Metadata; + /** + * Callback to receive events on the progress of upload operation. + * + * @type {(progress: TransferProgressEvent) => void} + * @memberof BlockBlobUploadOptions + */ + onProgress?: (progress: TransferProgressEvent) => void; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof BlockBlobUploadOptions + */ + customerProvidedKey?: CpkInfo; + /** + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to + * encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure + * Storage Services. + * + * @type {string} + * @memberof BlockBlobUploadOptions + */ + encryptionScope?: string; + /** + * Access tier. + * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers + * + * @type {BlockBlobTier | string} + * @memberof BlockBlobUploadOptions + */ + tier?: BlockBlobTier | string; + /** + * Blob tags. + * + * @type {Tags} + * @memberof BlockBlobUploadOptions + */ + tags?: Tags; +} + +/** + * 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. Default is ",". + * + * @type {string} + * @memberof BlobQueryCsvTextConfiguration + */ + columnSeparator?: string; + /** + * Field quote. + * + * @type {string} + * @memberof BlobQueryCsvTextConfiguration + */ + fieldQuote?: string; + /** + * Escape character. + * + * @type {string} + * @memberof BlobQueryCsvTextConfiguration + */ + escapeCharacter?: string; + /** + * Has headers. Default is false. + * + * @type {boolean} + * @memberof BlobQueryCsvTextConfiguration + */ + hasHeaders?: boolean; } /** - * Options to configure {@link BlockBlobClient.upload} operation. + * Options to configure {@link BlockBlobClient.query} operation. * * @export - * @interface BlockBlobUploadOptions + * @interface BlockBlobQueryOptions */ -export interface BlockBlobUploadOptions extends CommonOptions { +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`. @@ -2593,58 +2968,46 @@ export interface BlockBlobUploadOptions extends CommonOptions { */ abortSignal?: AbortSignalLike; /** - * Conditions to meet when uploading to the block blob. - * - * @type {BlobRequestConditions} - * @memberof BlockBlobUploadOptions - */ - conditions?: BlobRequestConditions; - /** - * HTTP headers to set when uploading to a block blob. + * Configurations for the query input. * - * @type {BlobHTTPHeaders} - * @memberof BlockBlobUploadOptions + * @type {BlobQueryJsonTextConfiguration | BlobQueryCsvTextConfiguration} + * @memberof BlockBlobQueryOptions */ - blobHTTPHeaders?: BlobHTTPHeaders; + inputTextConfiguration?: BlobQueryJsonTextConfiguration | BlobQueryCsvTextConfiguration; /** - * A collection of key-value string pair to associate with the blob when uploading to a block blob. + * Configurations for the query output. * - * @type {Metadata} - * @memberof BlockBlobUploadOptions + * @type {BlobQueryJsonTextConfiguration | BlobQueryCsvTextConfiguration} + * @memberof BlockBlobQueryOptions */ - metadata?: Metadata; + outputTextConfiguration?: BlobQueryJsonTextConfiguration | BlobQueryCsvTextConfiguration; /** - * Callback to receive events on the progress of upload operation. + * Callback to receive events on the progress of query operation. * * @type {(progress: TransferProgressEvent) => void} * @memberof BlockBlobUploadOptions */ onProgress?: (progress: TransferProgressEvent) => void; /** - * Customer Provided Key Info. + * Callback to receive error events during the query operaiton. * - * @type {CpkInfo} - * @memberof BlockBlobUploadOptions + * @memberof BlockBlobQueryOptions */ - customerProvidedKey?: CpkInfo; + onError?: (error: BlobQueryError) => void; /** - * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to - * encrypt the data provided in the request. If not specified, encryption is performed with the - * default account encryption scope. For more information, see Encryption at Rest for Azure - * Storage Services. + * Conditions to meet when uploading to the block blob. * - * @type {string} + * @type {BlobRequestConditions} * @memberof BlockBlobUploadOptions */ - encryptionScope?: string; + conditions?: BlobRequestConditions; /** - * Access tier. - * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers + * Customer Provided Key Info. * - * @type {BlockBlobTier | string} + * @type {CpkInfo} * @memberof BlockBlobUploadOptions */ - tier?: BlockBlobTier | string; + customerProvidedKey?: CpkInfo; } /** @@ -2849,6 +3212,14 @@ export interface BlockBlobCommitBlockListOptions extends CommonOptions { * @memberof BlockBlobCommitBlockListOptions */ tier?: BlockBlobTier | string; + + /** + * Blob tags. + * + * @type {Tags} + * @memberof BlockBlobCommitBlockListOptions + */ + tags?: Tags; } /** @@ -2934,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}. @@ -3020,6 +3399,14 @@ export interface BlockBlobParallelUploadOptions extends CommonOptions { * @memberof BlockBlobParallelUploadOptions */ encryptionScope?: string; + + /** + * Blob tags. + * + * @type {Tags} + * @memberof BlockBlobParallelUploadOptions + */ + tags?: Tags; } /** @@ -3046,6 +3433,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 +3599,7 @@ export class BlockBlobClient extends BlobClient { } super(url, pipeline); this.blockBlobContext = new BlockBlob(this.storageClientContext); + this._blobContext = new StorageBlob(this.storageClientContext); } /** @@ -3222,6 +3622,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("BlockBlobClient-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. @@ -3269,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) { @@ -3415,6 +3882,7 @@ export class BlockBlobClient extends BlobClient { cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, tier: toAccessTier(options.tier), + blobTagsString: toBlobTagsString(options.tags), spanOptions } ); @@ -3978,6 +4446,13 @@ export interface PageBlobCreateOptions extends CommonOptions { * @memberof PageBlobCreateOptions */ tier?: PremiumPageBlobTier | string; + /** + * Blob tags. + * + * @type {Tags} + * @memberof PageBlobCreateOptions + */ + tags?: Tags; } /** @@ -4500,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) { @@ -5586,6 +6062,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. * @@ -5629,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. * @@ -5667,13 +6269,21 @@ 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. */ includeUncommitedBlobs?: boolean; + /** + * Specifies whether blob tags be returned in the response. + */ + includeTags?: boolean; } /** @@ -6325,17 +6935,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 } @@ -6372,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, @@ -6411,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, @@ -6560,9 +7201,15 @@ export class ContainerClient extends StorageClient { if (options.includeSnapshots) { include.push("snapshots"); } + if (options.includeVersions) { + include.push("versions"); + } if (options.includeUncommitedBlobs) { include.push("uncommittedblobs"); } + if (options.includeTags) { + include.push("tags"); + } if (options.prefix === "") { options.prefix = undefined; } @@ -6614,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 = {} @@ -6765,9 +7413,15 @@ export class ContainerClient extends StorageClient { if (options.includeSnapshots) { include.push("snapshots"); } + if (options.includeVersions) { + include.push("versions"); + } 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..be330893ab9f 100644 --- a/sdk/storage/storage-blob/src/ContainerSASPermissions.ts +++ b/sdk/storage/storage-blob/src/ContainerSASPermissions.ts @@ -44,6 +44,12 @@ export class ContainerSASPermissions { case "l": containerSASPermissions.list = true; break; + case "t": + containerSASPermissions.tag = true; + break; + case "x": + containerSASPermissions.deleteVersion = true; + break; default: throw new RangeError(`Invalid permission ${char}`); } @@ -92,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. * @@ -100,6 +114,14 @@ export class ContainerSASPermissions { */ public list: boolean = false; + /** + * Specfies Tag access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + 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. @@ -127,9 +149,15 @@ export class ContainerSASPermissions { if (this.delete) { permissions.push("d"); } + if (this.deleteVersion) { + permissions.push("x"); + } if (this.list) { permissions.push("l"); } + if (this.tag) { + permissions.push("t"); + } return permissions.join(""); } } 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..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; } /** @@ -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,46 @@ 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; + objectReplicationMetadata?: { [propertyName: string]: string }; } /** * An interface representing BlobFlatListSegment. */ export interface BlobFlatListSegment { - blobItems: BlobItem[]; + blobItems: BlobItemInternal[]; } /** @@ -223,7 +245,7 @@ export interface BlobPrefix { */ export interface BlobHierarchyListSegment { blobPrefixes?: BlobPrefix[]; - blobItems: BlobItem[]; + blobItems: BlobItemInternal[]; } /** @@ -297,6 +319,8 @@ export interface ContainerProperties { hasLegalHold?: boolean; defaultEncryptionScope?: string; preventEncryptionScopeOverride?: boolean; + deletedOn?: Date; + remainingRetentionDays?: number; } /** @@ -304,10 +328,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 +416,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 +533,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 */ @@ -557,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; } /** @@ -608,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; } /** @@ -691,7 +811,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 +909,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 +959,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 +1171,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. */ @@ -1321,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; /** @@ -1469,6 +1656,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 +1711,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 +1752,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 @@ -1698,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; /** @@ -1741,6 +1943,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 +2247,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 +2303,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 +2350,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 @@ -2136,50 +2387,29 @@ export interface BlobSetTierOptionalParams extends coreHttp.RequestOptionsBase { /** * Optional Parameters. */ -export interface PageBlobCreateOptionalParams extends coreHttp.RequestOptionsBase { - /** - * The timeout parameter is expressed in seconds. For more information, see Setting - * Timeouts for Blob Service Operations. - */ - timeoutInSeconds?: number; - /** - * Optional. Indicates the tier to be set on the blob. Possible values include: 'P4', 'P6', - * 'P10', 'P15', 'P20', 'P30', 'P40', 'P50', 'P60', 'P70', 'P80', 'Hot', 'Cool', 'Archive' - */ - tier?: AccessTier; +export interface BlobQueryOptionalParams extends coreHttp.RequestOptionsBase { /** - * Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the - * destination blob. If one or more name-value pairs are specified, the destination blob is - * created with the specified metadata, and metadata is not copied from the source blob or file. - * Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules - * for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more - * information. + * the query request */ - metadata?: { [propertyName: string]: string }; + queryRequest?: QueryRequest; /** - * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to - * encrypt the data provided in the request. If not specified, encryption is performed with the - * default account encryption scope. For more information, see Encryption at Rest for Azure - * Storage Services. + * 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. */ - encryptionScope?: string; + snapshot?: string; /** - * Set for page blobs only. The sequence number is a user-controlled value that you can use to - * track requests. The value of the sequence number must be between 0 and 2^63 - 1. Default - * value: 0. + * The timeout parameter is expressed in seconds. For more information, see Setting + * Timeouts for Blob Service Operations. */ - blobSequenceNumber?: number; + 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 - */ - blobHTTPHeaders?: BlobHTTPHeaders; /** * Additional parameters for the operation */ @@ -2197,49 +2427,30 @@ export interface PageBlobCreateOptionalParams extends coreHttp.RequestOptionsBas /** * Optional Parameters. */ -export interface PageBlobUploadPagesOptionalParams extends coreHttp.RequestOptionsBase { - /** - * 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; +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; - /** - * Return only the bytes of the blob in the specified range. - */ - range?: string; - /** - * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to - * encrypt the data provided in the request. If not specified, encryption is performed with the - * default account encryption scope. For more information, see Encryption at Rest for Azure - * Storage Services. - */ - encryptionScope?: 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; /** - * Additional parameters for the operation - */ - leaseAccessConditions?: LeaseAccessConditions; - /** - * Additional parameters for the operation + * 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. */ - cpkInfo?: CpkInfo; + snapshot?: string; /** - * Additional parameters for the operation + * 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. */ - sequenceNumberAccessConditions?: SequenceNumberAccessConditions; + versionId?: string; /** * Additional parameters for the operation */ @@ -2249,7 +2460,7 @@ export interface PageBlobUploadPagesOptionalParams extends coreHttp.RequestOptio /** * Optional Parameters. */ -export interface PageBlobClearPagesOptionalParams extends coreHttp.RequestOptionsBase { +export interface BlobSetTagsOptionalParams extends coreHttp.RequestOptionsBase { /** * The timeout parameter is expressed in seconds. For more information, see Setting @@ -2257,31 +2468,186 @@ export interface PageBlobClearPagesOptionalParams extends coreHttp.RequestOption */ timeoutInSeconds?: number; /** - * Return only the bytes of the blob in the specified range. + * 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. */ - range?: string; + versionId?: string; /** - * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to - * encrypt the data provided in the request. If not specified, encryption is performed with the - * default account encryption scope. For more information, see Encryption at Rest for Azure - * Storage Services. + * Specify the transactional md5 for the body, to be validated by the service. */ - encryptionScope?: string; + 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; /** - * Additional parameters for the operation + * Blob tags */ - leaseAccessConditions?: LeaseAccessConditions; + tags?: BlobTags; /** * Additional parameters for the operation */ - cpkInfo?: CpkInfo; - /** - * Additional parameters for the operation + modifiedAccessConditions?: ModifiedAccessConditions; +} + +/** + * Optional Parameters. + */ +export interface PageBlobCreateOptionalParams extends coreHttp.RequestOptionsBase { + /** + * The timeout parameter is expressed in seconds. For more information, see Setting + * Timeouts for Blob Service Operations. + */ + timeoutInSeconds?: number; + /** + * Optional. Indicates the tier to be set on the blob. Possible values include: 'P4', 'P6', + * 'P10', 'P15', 'P20', 'P30', 'P40', 'P50', 'P60', 'P70', 'P80', 'Hot', 'Cool', 'Archive' + */ + tier?: AccessTier; + /** + * Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the + * destination blob. If one or more name-value pairs are specified, the destination blob is + * created with the specified metadata, and metadata is not copied from the source blob or file. + * Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules + * for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more + * information. + */ + metadata?: { [propertyName: string]: string }; + /** + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to + * encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure + * Storage Services. + */ + encryptionScope?: string; + /** + * Set for page blobs only. The sequence number is a user-controlled value that you can use to + * track requests. The value of the sequence number must be between 0 and 2^63 - 1. Default + * value: 0. + */ + blobSequenceNumber?: 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. Used to set blob tags in various blob operations. + */ + blobTagsString?: string; + /** + * Additional parameters for the operation + */ + blobHTTPHeaders?: BlobHTTPHeaders; + /** + * 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 PageBlobUploadPagesOptionalParams extends coreHttp.RequestOptionsBase { + /** + * 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; + /** + * The timeout parameter is expressed in seconds. For more information, see Setting + * Timeouts for Blob Service Operations. + */ + timeoutInSeconds?: number; + /** + * Return only the bytes of the blob in the specified range. + */ + range?: string; + /** + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to + * encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure + * Storage Services. + */ + encryptionScope?: 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; + /** + * Additional parameters for the operation + */ + leaseAccessConditions?: LeaseAccessConditions; + /** + * Additional parameters for the operation + */ + cpkInfo?: CpkInfo; + /** + * Additional parameters for the operation + */ + sequenceNumberAccessConditions?: SequenceNumberAccessConditions; + /** + * Additional parameters for the operation + */ + modifiedAccessConditions?: ModifiedAccessConditions; +} + +/** + * Optional Parameters. + */ +export interface PageBlobClearPagesOptionalParams extends coreHttp.RequestOptionsBase { + /** + * The timeout parameter is expressed in seconds. For more information, see Setting + * Timeouts for Blob Service Operations. + */ + timeoutInSeconds?: number; + /** + * Return only the bytes of the blob in the specified range. + */ + range?: string; + /** + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to + * encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure + * Storage Services. + */ + encryptionScope?: 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; + /** + * Additional parameters for the operation + */ + leaseAccessConditions?: LeaseAccessConditions; + /** + * Additional parameters for the operation + */ + cpkInfo?: CpkInfo; + /** + * Additional parameters for the operation */ sequenceNumberAccessConditions?: SequenceNumberAccessConditions; /** @@ -2549,6 +2915,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 */ @@ -2675,6 +3045,35 @@ export interface AppendBlobAppendBlockFromUrlOptionalParams extends coreHttp.Req sourceModifiedAccessConditions?: SourceModifiedAccessConditions; } +/** + * Optional Parameters. + */ +export interface AppendBlobSealOptionalParams 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; + /** + * Additional parameters for the operation + */ + leaseAccessConditions?: LeaseAccessConditions; + /** + * Additional parameters for the operation + */ + modifiedAccessConditions?: ModifiedAccessConditions; + /** + * Additional parameters for the operation + */ + appendPositionAccessConditions?: AppendPositionAccessConditions; +} + /** * Optional Parameters. */ @@ -2716,6 +3115,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 +3270,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 */ @@ -2911,6 +3318,10 @@ export interface BlockBlobGetBlockListOptionalParams extends coreHttp.RequestOpt * Additional parameters for the operation */ leaseAccessConditions?: LeaseAccessConditions; + /** + * Additional parameters for the operation + */ + modifiedAccessConditions?: ModifiedAccessConditions; } /** @@ -3096,6 +3507,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 +3792,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 +4334,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 +4464,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 +4508,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 +4541,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,10 +4733,33 @@ export interface BlobGetPropertiesHeaders { * blob was ever set. */ accessTierChangedOn?: Date; - errorCode?: 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; + /** + * 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; +} + +/** * Defines headers for Delete operation. */ export interface BlobDeleteHeaders { @@ -4430,6 +4944,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 +5009,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 +5074,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 +5131,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 +5242,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 +5513,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 +5563,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 +5617,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 +5886,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 @@ -5911,6 +6511,285 @@ export interface AppendBlobAppendBlockFromUrlHeaders { errorCode?: string; } +/** + * Defines headers for Seal operation. + */ +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 headers for Query operation. + */ +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' @@ -6027,6 +6906,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 +6922,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 +6956,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 +7173,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 +7298,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 +7649,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 +7859,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 +8130,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..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: { @@ -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,26 @@ export const BlobItem: coreHttp.CompositeMapper = { } } } + }, + blobTags: { + xmlName: "Tags", + serializedName: "BlobTags", + type: { + name: "Composite", + className: "BlobTags" + } + }, + objectReplicationMetadata: { + xmlName: "OrMetadata", + serializedName: "ObjectReplicationMetadata", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } } } } @@ -527,7 +636,7 @@ export const BlobFlatListSegment: coreHttp.CompositeMapper = { element: { type: { name: "Composite", - className: "BlobItem" + className: "BlobItemInternal" } } } @@ -651,7 +760,7 @@ export const BlobHierarchyListSegment: coreHttp.CompositeMapper = { element: { type: { name: "Composite", - className: "BlobItem" + className: "BlobItemInternal" } } } @@ -941,6 +1050,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 +1084,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 +1123,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 +1308,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,50 +1629,150 @@ 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", + serializedName: "Format", type: { - name: "Boolean" + name: "Composite", + className: "QueryFormat" } - }, - indexDocument: { - xmlName: "IndexDocument", - serializedName: "IndexDocument", + } + } + } +}; + +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" } @@ -1556,6 +1947,12 @@ export const ModifiedAccessConditions: coreHttp.CompositeMapper = { type: { name: "String" } + }, + ifTags: { + xmlName: "ifTags", + type: { + name: "String" + } } } } @@ -1630,6 +2027,12 @@ export const SourceModifiedAccessConditions: coreHttp.CompositeMapper = { type: { name: "String" } + }, + sourceIfTags: { + xmlName: "sourceIfTags", + type: { + name: "String" + } } } } @@ -2048,6 +2451,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 +2872,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 +3642,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 +3824,12 @@ export const BlobDownloadHeaders: coreHttp.CompositeMapper = { name: "String" } }, + versionId: { + serializedName: "x-ms-version-id", + type: { + name: "String" + } + }, acceptRanges: { serializedName: "accept-ranges", type: { @@ -3365,6 +3872,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 +3930,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 +4178,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 +4468,12 @@ export const PageBlobCreateHeaders: coreHttp.CompositeMapper = { name: "String" } }, + versionId: { + serializedName: "x-ms-version-id", + type: { + name: "String" + } + }, date: { serializedName: "date", type: { @@ -3977,6 +4550,12 @@ export const AppendBlobCreateHeaders: coreHttp.CompositeMapper = { name: "String" } }, + versionId: { + serializedName: "x-ms-version-id", + type: { + name: "String" + } + }, date: { serializedName: "date", type: { @@ -4053,6 +4632,12 @@ export const BlockBlobUploadHeaders: coreHttp.CompositeMapper = { name: "String" } }, + versionId: { + serializedName: "x-ms-version-id", + type: { + name: "String" + } + }, date: { serializedName: "date", type: { @@ -4127,11 +4712,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 +4730,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 +4764,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 +4782,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,24 +4812,82 @@ export const BlobSetMetadataHeaders: coreHttp.CompositeMapper = { 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", + 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: { + name: "String" + } + }, errorCode: { serializedName: "x-ms-error-code", type: { @@ -4581,6 +5224,12 @@ export const BlobCreateSnapshotHeaders: coreHttp.CompositeMapper = { name: "String" } }, + versionId: { + serializedName: "x-ms-version-id", + type: { + name: "String" + } + }, date: { serializedName: "date", type: { @@ -4639,6 +5288,12 @@ export const BlobStartCopyFromURLHeaders: coreHttp.CompositeMapper = { name: "String" } }, + versionId: { + serializedName: "x-ms-version-id", + type: { + name: "String" + } + }, date: { serializedName: "date", type: { @@ -4709,6 +5364,12 @@ export const BlobCopyFromURLHeaders: coreHttp.CompositeMapper = { name: "String" } }, + versionId: { + serializedName: "x-ms-version-id", + type: { + name: "String" + } + }, date: { serializedName: "date", type: { @@ -5078,6 +5739,12 @@ export const BlockBlobCommitBlockListHeaders: coreHttp.CompositeMapper = { name: "String" } }, + versionId: { + serializedName: "x-ms-version-id", + type: { + name: "String" + } + }, date: { serializedName: "date", type: { @@ -5899,3 +6566,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..c985e05682ff 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", @@ -808,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", @@ -829,12 +960,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 +991,9 @@ export const include1: coreHttp.OperationQueryParameter = { "deleted", "metadata", "snapshots", - "uncommittedblobs" + "uncommittedblobs", + "versions", + "tags" ] } } @@ -1277,6 +1417,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: { @@ -1367,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", @@ -1515,7 +1680,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..49d5040217b4 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, @@ -155,7 +181,8 @@ const createOperationSpec: coreHttp.OperationSpec = { Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.ifTags ], responses: { 201: { @@ -178,7 +205,7 @@ const appendBlockOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.timeoutInSeconds, - Parameters.comp15 + Parameters.comp19 ], headerParameters: [ Parameters.contentLength, @@ -196,7 +223,8 @@ const appendBlockOperationSpec: coreHttp.OperationSpec = { Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.ifTags ], requestBody: { parameterPath: "body", @@ -230,7 +258,7 @@ const appendBlockFromUrlOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.timeoutInSeconds, - Parameters.comp15 + Parameters.comp19 ], headerParameters: [ Parameters.sourceUrl, @@ -252,6 +280,7 @@ const appendBlockFromUrlOperationSpec: coreHttp.OperationSpec = { Parameters.ifUnmodifiedSince, Parameters.ifMatch, Parameters.ifNoneMatch, + Parameters.ifTags, Parameters.sourceIfModifiedSince, Parameters.sourceIfUnmodifiedSince, Parameters.sourceIfMatch, @@ -269,3 +298,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..4f7b4deea02e 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: [ @@ -633,7 +738,8 @@ const downloadOperationSpec: coreHttp.OperationSpec = { Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.ifTags ], responses: { 200: { @@ -671,6 +777,7 @@ const getPropertiesOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.snapshot, + Parameters.versionId, Parameters.timeoutInSeconds ], headerParameters: [ @@ -683,7 +790,8 @@ const getPropertiesOperationSpec: coreHttp.OperationSpec = { Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.ifTags ], responses: { 200: { @@ -706,6 +814,7 @@ const deleteMethodOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.snapshot, + Parameters.versionId, Parameters.timeoutInSeconds ], headerParameters: [ @@ -716,7 +825,8 @@ const deleteMethodOperationSpec: coreHttp.OperationSpec = { Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.ifTags ], responses: { 202: { @@ -873,6 +983,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}", @@ -896,7 +1035,8 @@ const setHTTPHeadersOperationSpec: coreHttp.OperationSpec = { Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.ifTags ], responses: { 200: { @@ -919,7 +1059,7 @@ const setMetadataOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.timeoutInSeconds, - Parameters.comp5 + Parameters.comp6 ], headerParameters: [ Parameters.metadata, @@ -933,7 +1073,8 @@ const setMetadataOperationSpec: coreHttp.OperationSpec = { Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.ifTags ], responses: { 200: { @@ -956,7 +1097,7 @@ const acquireLeaseOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.timeoutInSeconds, - Parameters.comp7 + Parameters.comp9 ], headerParameters: [ Parameters.duration, @@ -967,7 +1108,8 @@ const acquireLeaseOperationSpec: coreHttp.OperationSpec = { Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.ifTags ], responses: { 201: { @@ -990,7 +1132,7 @@ const releaseLeaseOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.timeoutInSeconds, - Parameters.comp7 + Parameters.comp9 ], headerParameters: [ Parameters.leaseId1, @@ -1000,7 +1142,8 @@ const releaseLeaseOperationSpec: coreHttp.OperationSpec = { Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.ifTags ], responses: { 200: { @@ -1023,7 +1166,7 @@ const renewLeaseOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.timeoutInSeconds, - Parameters.comp7 + Parameters.comp9 ], headerParameters: [ Parameters.leaseId1, @@ -1033,7 +1176,8 @@ const renewLeaseOperationSpec: coreHttp.OperationSpec = { Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.ifTags ], responses: { 200: { @@ -1056,7 +1200,7 @@ const changeLeaseOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.timeoutInSeconds, - Parameters.comp7 + Parameters.comp9 ], headerParameters: [ Parameters.leaseId1, @@ -1067,7 +1211,8 @@ const changeLeaseOperationSpec: coreHttp.OperationSpec = { Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.ifTags ], responses: { 200: { @@ -1090,7 +1235,7 @@ const breakLeaseOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.timeoutInSeconds, - Parameters.comp7 + Parameters.comp9 ], headerParameters: [ Parameters.breakPeriod, @@ -1100,7 +1245,8 @@ const breakLeaseOperationSpec: coreHttp.OperationSpec = { Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.ifTags ], responses: { 202: { @@ -1123,7 +1269,7 @@ const createSnapshotOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.timeoutInSeconds, - Parameters.comp9 + Parameters.comp11 ], headerParameters: [ Parameters.metadata, @@ -1137,6 +1283,7 @@ const createSnapshotOperationSpec: coreHttp.OperationSpec = { Parameters.ifUnmodifiedSince, Parameters.ifMatch, Parameters.ifNoneMatch, + Parameters.ifTags, Parameters.leaseId0 ], responses: { @@ -1168,14 +1315,18 @@ const startCopyFromURLOperationSpec: coreHttp.OperationSpec = { Parameters.copySource, Parameters.version, Parameters.requestId, + Parameters.blobTagsString, + Parameters.sealBlob, Parameters.sourceIfModifiedSince, Parameters.sourceIfUnmodifiedSince, Parameters.sourceIfMatch, Parameters.sourceIfNoneMatch, + Parameters.sourceIfTags, Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, Parameters.ifNoneMatch, + Parameters.ifTags, Parameters.leaseId0 ], responses: { @@ -1207,6 +1358,8 @@ const copyFromURLOperationSpec: coreHttp.OperationSpec = { Parameters.version, Parameters.requestId, Parameters.sourceContentMD5, + Parameters.blobTagsString, + Parameters.sealBlob, Parameters.xMsRequiresSync, Parameters.sourceIfModifiedSince, Parameters.sourceIfUnmodifiedSince, @@ -1216,6 +1369,7 @@ const copyFromURLOperationSpec: coreHttp.OperationSpec = { Parameters.ifUnmodifiedSince, Parameters.ifMatch, Parameters.ifNoneMatch, + Parameters.ifTags, Parameters.leaseId0 ], responses: { @@ -1240,7 +1394,7 @@ const abortCopyFromURLOperationSpec: coreHttp.OperationSpec = { queryParameters: [ Parameters.copyId, Parameters.timeoutInSeconds, - Parameters.comp10 + Parameters.comp12 ], headerParameters: [ Parameters.version, @@ -1268,8 +1422,10 @@ const setTierOperationSpec: coreHttp.OperationSpec = { Parameters.url ], queryParameters: [ + Parameters.snapshot, + Parameters.versionId, Parameters.timeoutInSeconds, - Parameters.comp11 + Parameters.comp13 ], headerParameters: [ Parameters.tier1, @@ -1319,3 +1475,132 @@ 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, + Parameters.ifTags + ], + 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, + Parameters.ifTags + ], + 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..b3c010908c20 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, @@ -250,7 +251,8 @@ const uploadOperationSpec: coreHttp.OperationSpec = { Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.ifTags ], requestBody: { parameterPath: "body", @@ -285,7 +287,7 @@ const stageBlockOperationSpec: coreHttp.OperationSpec = { queryParameters: [ Parameters.blockId, Parameters.timeoutInSeconds, - Parameters.comp16 + Parameters.comp21 ], headerParameters: [ Parameters.contentLength, @@ -332,7 +334,7 @@ const stageBlockFromURLOperationSpec: coreHttp.OperationSpec = { queryParameters: [ Parameters.blockId, Parameters.timeoutInSeconds, - Parameters.comp16 + Parameters.comp21 ], headerParameters: [ Parameters.contentLength, @@ -373,7 +375,7 @@ const commitBlockListOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.timeoutInSeconds, - Parameters.comp17 + Parameters.comp22 ], headerParameters: [ Parameters.transactionalContentMD5, @@ -383,6 +385,7 @@ const commitBlockListOperationSpec: coreHttp.OperationSpec = { Parameters.tier0, Parameters.version, Parameters.requestId, + Parameters.blobTagsString, Parameters.blobCacheControl, Parameters.blobContentType, Parameters.blobContentEncoding, @@ -396,7 +399,8 @@ const commitBlockListOperationSpec: coreHttp.OperationSpec = { Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.ifTags ], requestBody: { parameterPath: "blocks", @@ -429,12 +433,13 @@ const getBlockListOperationSpec: coreHttp.OperationSpec = { Parameters.snapshot, Parameters.listType, Parameters.timeoutInSeconds, - Parameters.comp17 + Parameters.comp22 ], headerParameters: [ Parameters.version, Parameters.requestId, - Parameters.leaseId0 + Parameters.leaseId0, + Parameters.ifTags ], responses: { 200: { 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..01a2d303301c 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, @@ -359,7 +360,8 @@ const createOperationSpec: coreHttp.OperationSpec = { Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.ifTags ], responses: { 201: { @@ -382,7 +384,7 @@ const uploadPagesOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.timeoutInSeconds, - Parameters.comp12 + Parameters.comp16 ], headerParameters: [ Parameters.contentLength, @@ -403,7 +405,8 @@ const uploadPagesOperationSpec: coreHttp.OperationSpec = { Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.ifTags ], requestBody: { parameterPath: "body", @@ -437,7 +440,7 @@ const clearPagesOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.timeoutInSeconds, - Parameters.comp12 + Parameters.comp16 ], headerParameters: [ Parameters.contentLength, @@ -479,7 +482,7 @@ const uploadPagesFromURLOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.timeoutInSeconds, - Parameters.comp12 + Parameters.comp16 ], headerParameters: [ Parameters.sourceUrl, @@ -503,6 +506,7 @@ const uploadPagesFromURLOperationSpec: coreHttp.OperationSpec = { Parameters.ifUnmodifiedSince, Parameters.ifMatch, Parameters.ifNoneMatch, + Parameters.ifTags, Parameters.sourceIfModifiedSince, Parameters.sourceIfUnmodifiedSince, Parameters.sourceIfMatch, @@ -530,7 +534,7 @@ const getPageRangesOperationSpec: coreHttp.OperationSpec = { queryParameters: [ Parameters.snapshot, Parameters.timeoutInSeconds, - Parameters.comp13 + Parameters.comp17 ], headerParameters: [ Parameters.range0, @@ -540,7 +544,8 @@ const getPageRangesOperationSpec: coreHttp.OperationSpec = { Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.ifTags ], responses: { 200: { @@ -566,7 +571,7 @@ const getPageRangesDiffOperationSpec: coreHttp.OperationSpec = { Parameters.snapshot, Parameters.timeoutInSeconds, Parameters.prevsnapshot, - Parameters.comp13 + Parameters.comp17 ], headerParameters: [ Parameters.prevSnapshotUrl, @@ -577,7 +582,8 @@ const getPageRangesDiffOperationSpec: coreHttp.OperationSpec = { Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.ifNoneMatch, + Parameters.ifTags ], responses: { 200: { @@ -672,7 +678,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..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; @@ -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..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, @@ -21,13 +21,13 @@ export { BlobDownloadOptionalParams, BlobGetPropertiesHeaders, BlobGetPropertiesResponse, - BlobProperties, + BlobPropertiesInternal as BlobProperties, BlobUndeleteResponse, BlobHTTPHeaders, BlobSetHTTPHeadersResponse, BlobSetMetadataResponse, + BlobSetTagsResponse, BlobCreateSnapshotResponse, - BlobFlatListSegment, BlobStartCopyFromURLHeaders, BlobStartCopyFromURLResponse, BlobAbortCopyFromURLResponse, @@ -36,12 +36,13 @@ export { BlobSetMetadataHeaders, BlobSetTierHeaders, BlobSetTierResponse, - BlobHierarchyListSegment, - BlobItem, + BlobSetTagsHeaders, BlobPrefix, BlobDownloadHeaders, + BlobQueryResponse as BlobQueryResponseModel, BlobDownloadResponse as BlobDownloadResponseModel, BlobType, + BlobTags, BlobUndeleteHeaders, Block, BlockBlobCommitBlockListHeaders, @@ -58,6 +59,8 @@ export { BlockBlobGetBlockListResponse, BlobServiceProperties, BlobServiceStatistics, + BlobGetTagsHeaders, + BlobTag, ContainerCreateHeaders, ContainerCreateResponse, ContainerDeleteHeaders, @@ -66,9 +69,7 @@ export { ContainerGetPropertiesHeaders, ContainerBreakLeaseOptionalParams, ContainerListBlobFlatSegmentHeaders, - ContainerListBlobFlatSegmentResponse, ContainerListBlobHierarchySegmentHeaders, - ContainerListBlobHierarchySegmentResponse, ContainerGetPropertiesResponse, ContainerProperties, ContainerSetMetadataResponse, @@ -86,10 +87,12 @@ export { LeaseDurationType, LeaseStateType, LeaseStatusType, - ListBlobsHierarchySegmentResponse, + ListBlobsHierarchySegmentResponse as ListBlobsHierarchySegmentResponseModel, ListBlobsIncludeItem, ListContainersIncludeType, ListContainersSegmentResponse, + FilterBlobSegment, + ServiceFilterBlobsHeaders, Logging, Metrics, ModifiedAccessConditions, @@ -137,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/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/constants.ts b/sdk/storage/storage-blob/src/utils/constants.ts index 59c91c9bbcd8..91bd397ab82a 100644 --- a/sdk/storage/storage-blob/src/utils/constants.ts +++ b/sdk/storage/storage-blob/src/utils/constants.ts @@ -1,11 +1,11 @@ // 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.1"; +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 @@ -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/src/utils/utils.common.ts b/sdk/storage/storage-blob/src/utils/utils.common.ts index a6aedcf41455..3889ffa0d62d 100644 --- a/sdk/storage/storage-blob/src/utils/utils.common.ts +++ b/sdk/storage/storage-blob/src/utils/utils.common.ts @@ -3,7 +3,11 @@ 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, 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. @@ -552,3 +556,115 @@ export function getAccountNameFromUrl(url: string): string { throw new Error("Unable to extract accountName with provided information."); } } + +/** + * 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. + * + * @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 || false + } + } + }; + case "json": + return { + format: { + type: "json", + jsonTextConfiguration: { + recordSeparator: textConfiguration.recordSeparator + } + } + }; + default: + throw Error("Invalid BlobQueryTextConfiguration."); + } +} 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 ``` diff --git a/sdk/storage/storage-blob/test/blobclient.spec.ts b/sdk/storage/storage-blob/test/blobclient.spec.ts index 0ba700f1af4c..c169f42e2a80 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 { @@ -51,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 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); @@ -252,7 +335,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 +360,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 +374,19 @@ 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(); @@ -629,6 +719,28 @@ describe("BlobClient", () => { } 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); + }); }); describe("BlobClient - Verify Name Properties", () => { diff --git a/sdk/storage/storage-blob/test/blobserviceclient.spec.ts b/sdk/storage/storage-blob/test/blobserviceclient.spec.ts index 06fd1574700e..e70eb84a1daf 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,67 @@ 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 blob of blobServiceClient.findBlobsByTags(`${key1}='${tags2[key1]}'`)) { + 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/blobversioning.spec.ts b/sdk/storage/storage-blob/test/blobversioning.spec.ts new file mode 100644 index 000000000000..8593cc2f97fd --- /dev/null +++ b/sdk/storage/storage-blob/test/blobversioning.spec.ts @@ -0,0 +1,394 @@ +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"; +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(content))); + 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()); + }); +}); 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/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 9bbaa5fb972b..c776808b17df 100644 --- a/sdk/storage/storage-blob/test/node/blobclient.spec.ts +++ b/sdk/storage/storage-blob/test/node/blobclient.spec.ts @@ -1,26 +1,33 @@ 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 + recorderEnvSetup, + isBlobVersioningDisabled } 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 +37,7 @@ describe("BlobClient Node.js only", () => { let blobClient: BlobClient; let blockBlobClient: BlockBlobClient; const content = "Hello World"; + const tempFolderPath = "temp"; let recorder: any; @@ -209,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(); @@ -339,4 +348,286 @@ 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); + unlinkSync(tempFileLarge); + return; + } + + unlinkSync(downloadedFile); + unlinkSync(tempFileLarge); + 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/node/highlevel.node.spec.ts b/sdk/storage/storage-blob/test/node/highlevel.node.spec.ts index 7f938aef0e4b..829a1b507688 100644 --- a/sdk/storage/storage-blob/test/node/highlevel.node.spec.ts +++ b/sdk/storage/storage-blob/test/node/highlevel.node.spec.ts @@ -4,11 +4,18 @@ 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"; 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", () => { @@ -64,6 +71,24 @@ 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"); + } + + fs.unlinkSync(tempFile); + }).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, { @@ -82,6 +107,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, { @@ -193,6 +236,25 @@ 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); @@ -216,7 +278,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); @@ -229,6 +292,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); @@ -377,6 +458,30 @@ describe("Highlevel", () => { assert.ok(eventTriggered); }); + it("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, { diff --git a/sdk/storage/storage-blob/test/node/sas.spec.ts b/sdk/storage/storage-blob/test/node/sas.spec.ts index 4f7ae933590f..ea2dbe156034 100644 --- a/sdk/storage/storage-blob/test/node/sas.spec.ts +++ b/sdk/storage/storage-blob/test/node/sas.spec.ts @@ -13,10 +13,12 @@ import { PageBlobClient, BlobServiceClient, StorageSharedKeyCredential, - newPipeline + newPipeline, + BlobClient, + Tags } from "../../src"; import { SASProtocol } from "../../src/SASQueryParameters"; -import { getBSU, getTokenBSU, recorderEnvSetup } 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"; @@ -323,6 +325,125 @@ 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 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 @@ -800,4 +921,333 @@ 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(); + }); + + it("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(); + }); + + 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(); + }); + + 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"); + 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("rwdlacupft"), + 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(); + }); + + 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(); + }); }); 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 7a633cda4dab..cfaba1a61001 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(); } @@ -216,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; +} 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); + }); +} diff --git a/sdk/storage/storage-blob/tsconfig.json b/sdk/storage/storage-blob/tsconfig.json index 6e93555f95cd..c18040722743 100644 --- a/sdk/storage/storage-blob/tsconfig.json +++ b/sdk/storage/storage-blob/tsconfig.json @@ -6,6 +6,7 @@ "outDir": "./dist-esm", "lib": ["dom", "es5", "es6", "es7", "esnext"] }, - "exclude": ["node_modules", "./typings/**/*.d.ts", "./samples/**"], - "include": ["./src/**/*.ts", "./test/**/*.ts"] + "compileOnSave": true, + "exclude": ["node_modules", "./typings/**/*.d.ts", "../storage-internal-avro/node_modules", "./samples/**"], + "include": ["./src/**/*.ts", "./test/**/*.ts", "../storage-internal-avro/**/*.ts"] } 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/.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, 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/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/package.json b/sdk/storage/storage-file-datalake/package.json index 8b5b15ff3a8d..1f23d5168d3e 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", @@ -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" }, 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/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":{}} 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..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; @@ -141,17 +141,18 @@ 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; - create(resourceType: PathResourceType, options?: PathCreateOptions): Promise; + append(body: HttpRequestBody, offset: number, length: number, options?: FileAppendOptions): Promise; + create(resourceType: PathResourceTypeModel, 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; + 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; } // Warning: (ae-forgotten-export) The symbol "StorageClient" needs to be exported by the entry point index.d.ts @@ -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; @@ -280,6 +281,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 { } @@ -288,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) @@ -414,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) @@ -819,6 +856,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 +944,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) @@ -942,6 +1009,9 @@ export enum PathGetPropertiesAction { GetStatus = "getStatus" } +// @public +export type PathGetPropertiesActionModel = 'getAccessControl' | 'getStatus'; + // @public (undocumented) export interface PathGetPropertiesHeaders { // (undocumented) @@ -992,6 +1062,7 @@ export interface PathGetPropertiesHeaders { encryptionKeySha256?: string; // (undocumented) etag?: string; + expiresOn?: Date; // (undocumented) isIncrementalCopy?: boolean; // (undocumented) @@ -1158,6 +1229,9 @@ export enum PathRenameMode { Posix = "posix" } +// @public +export type PathRenameModeModel = 'legacy' | 'posix'; + // @public export enum PathResourceType { // (undocumented) @@ -1166,6 +1240,9 @@ export enum PathResourceType { File = "file" } +// @public +export type PathResourceTypeModel = 'directory' | 'file'; + // @public export interface PathSetAccessControlHeaders { clientRequestId?: string; @@ -1296,21 +1373,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/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 3d15bb942803..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, @@ -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 b3b0a22960d4..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 @@ -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,16 +1670,67 @@ 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 type PathSetAccessControlRecursiveMode = 'set' | 'modify' | 'remove'; + +/** + * Defines values for PathExpiryOptions. + * Possible values include: 'NeverExpire', 'RelativeToCreation', 'RelativeToNow', 'Absolute' + * @readonly + * @enum {string} + */ +export type PathExpiryOptions = 'NeverExpire' | 'RelativeToCreation' | 'RelativeToNow' | 'Absolute'; + /** * Defines values for PathResourceType. * Possible values include: 'directory', 'file' * @readonly * @enum {string} */ -export enum PathResourceType { - Directory = 'directory', - File = 'file', -} +export type PathResourceType = 'directory' | 'file'; /** * Defines values for PathRenameMode. @@ -1555,23 +1738,16 @@ export enum PathResourceType { * @readonly * @enum {string} */ -export enum PathRenameMode { - Legacy = 'legacy', - Posix = 'posix', -} +export type PathRenameMode = 'legacy' | 'posix'; /** * Defines values for PathUpdateAction. - * Possible values include: 'append', 'flush', 'setProperties', 'setAccessControl' + * Possible values include: 'append', 'flush', 'setProperties', 'setAccessControl', + * 'setAccessControlRecursive' * @readonly * @enum {string} */ -export enum PathUpdateAction { - Append = 'append', - Flush = 'flush', - SetProperties = 'setProperties', - SetAccessControl = 'setAccessControl', -} +export type PathUpdateAction = 'append' | 'flush' | 'setProperties' | 'setAccessControl' | 'setAccessControlRecursive'; /** * Defines values for PathLeaseAction. @@ -1579,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. @@ -1593,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. @@ -1726,7 +1893,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 +1902,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 +2006,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 +2060,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..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 @@ -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", @@ -643,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/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..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 @@ -65,48 +65,64 @@ 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 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 - * 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 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 - * 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 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 }, @@ -281,6 +297,43 @@ export class PathOperations { callback) as Promise; } + /** + * 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(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(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(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, + callback) as Promise; + } + /** * Set the owner, group, permissions, or access control list for a path. * @param [options] The optional parameters @@ -332,6 +385,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 +429,7 @@ const createOperationSpec: coreHttp.OperationSpec = { queryParameters: [ Parameters.resource2, Parameters.continuation, - Parameters.mode, + Parameters.mode0, Parameters.timeout ], headerParameters: [ @@ -391,6 +475,9 @@ const updateOperationSpec: coreHttp.OperationSpec = { ], queryParameters: [ Parameters.action0, + Parameters.maxRecords, + Parameters.continuation, + Parameters.mode1, Parameters.position, Parameters.retainUncommittedData, Parameters.close, @@ -430,6 +517,7 @@ const updateOperationSpec: coreHttp.OperationSpec = { contentType: "application/octet-stream", responses: { 200: { + bodyMapper: Mappers.SetAccessControlRecursiveResponse, headersMapper: Mappers.PathUpdateHeaders }, 202: { @@ -629,6 +717,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 +759,7 @@ const flushDataOperationSpec: coreHttp.OperationSpec = { Parameters.position, Parameters.retainUncommittedData, Parameters.close, - Parameters.action3 + Parameters.action4 ], headerParameters: [ Parameters.contentLength, @@ -679,7 +798,7 @@ const appendDataOperationSpec: coreHttp.OperationSpec = { queryParameters: [ Parameters.position, Parameters.timeout, - Parameters.action4 + Parameters.action5 ], headerParameters: [ Parameters.contentLength, @@ -709,3 +828,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/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/models.ts b/sdk/storage/storage-file-datalake/src/models.ts index a00b82ccadd7..49c1a179c003 100644 --- a/sdk/storage/storage-file-datalake/src/models.ts +++ b/sdk/storage/storage-file-datalake/src/models.ts @@ -37,13 +37,18 @@ export { PathSetAccessControlHeaders, PathSetAccessControlResponse, PathSetAccessControlResponse as PathSetPermissionsResponse, - PathResourceType, + PathResourceType as PathResourceTypeModel, PathUpdateHeaders, - PathUpdateResponse as FileAppendResponse, - PathUpdateResponse as FileFlushResponse, - PathUpdateResponse as FileUploadResponse, - PathGetPropertiesAction, - PathRenameMode + PathAppendDataHeaders, + PathFlushDataHeaders, + PathAppendDataResponse as FileAppendResponse, + PathFlushDataResponse as FileFlushResponse, + PathFlushDataResponse as FileUploadResponse, + PathGetPropertiesAction as PathGetPropertiesActionModel, + PathRenameMode as PathRenameModeModel, + PathExpiryOptions as FileExpiryMode, + PathSetExpiryResponse as FileSetExpiryResponse, + PathSetExpiryHeaders as FileSetExpiryHeaders } from "./generated/src/models"; export { PathCreateResponse }; @@ -486,6 +491,11 @@ export interface PathGetPropertiesHeaders { accessTierInferred?: boolean; archiveStatus?: string; accessTierChangedOn?: Date; + + /** + * The time the file will expire. + */ + expiresOn?: Date; } export type PathGetPropertiesResponse = PathGetPropertiesHeaders & { @@ -587,6 +597,38 @@ 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 **/ /****************************************************************/ @@ -856,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/src/utils/constants.ts b/sdk/storage/storage-file-datalake/src/utils/constants.ts index dcceca94a1b4..b33825674b73 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; @@ -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/swagger/README.md b/sdk/storage/storage-file-datalake/swagger/README.md index 40d61c3ab60d..d185aa6bf4f9 100644 --- a/sdk/storage/storage-file-datalake/swagger/README.md +++ b/sdk/storage/storage-file-datalake/swagger/README.md @@ -12,10 +12,9 @@ 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 ``` ## Customizations for Track 2 Generator @@ -83,16 +82,17 @@ 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 + ``` 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/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"); 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); + }); }); 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 ``` 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..8a1bb28f4acf --- /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", + "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": "^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", + "@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" + } +} 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..4a418593e1b4 --- /dev/null +++ b/sdk/storage/storage-internal-avro/src/AvroParser.ts @@ -0,0 +1,384 @@ +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]; + } + + // 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 { + let zigZagEncoded = 0; + let significanceInBit = 0; + let byte, haveMoreByte, significanceInFloat; + + do { + 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) + zigZagEncoded = zigZagEncoded; + significanceInFloat = 268435456; // 2 ** 28. + do { + byte = await AvroParser.readByte(stream); + zigZagEncoded += (byte & 0x7f) * significanceInFloat; + significanceInFloat *= 128; // 2 ** 7 + } while (byte & 0x80); + return (zigZagEncoded % 2 ? -(zigZagEncoded + 1) : zigZagEncoded) / 2; + } + + return (zigZagEncoded >> 1) ^ -(zigZagEncoded & 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..0dd8e75b5a1d --- /dev/null +++ b/sdk/storage/storage-internal-avro/src/AvroReadableFromStream.ts @@ -0,0 +1,85 @@ +import { AvroReadable } from "./AvroReadable"; + +export class AvroReadableFromStream extends AvroReadable { + private _position: number; + 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: NodeJS.ReadableStream) { + super(); + this._readable = readable; + this._position = 0; + // workaround due to Readable.readable only available 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 { + // console.log(`reading stream for size ${size} at position ${this._position}`); + 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) { + 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.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 readableCallback = () => { + 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)); + } + }; + + 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); + }); + } + } +} 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 000000000000..91c2b2469e54 Binary files /dev/null and b/sdk/storage/storage-internal-avro/test/resources/test_null_0.avro differ 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 000000000000..01371934eba3 Binary files /dev/null and b/sdk/storage/storage-internal-avro/test/resources/test_null_1.avro differ 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 000000000000..97aaaa0bb91a Binary files /dev/null and b/sdk/storage/storage-internal-avro/test/resources/test_null_10.avro differ diff --git a/sdk/storage/storage-internal-avro/test/resources/test_null_11.avro b/sdk/storage/storage-internal-avro/test/resources/test_null_11.avro new file mode 100644 index 000000000000..7dcc7b48f774 Binary files /dev/null and b/sdk/storage/storage-internal-avro/test/resources/test_null_11.avro differ 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 000000000000..ddf42625f4f3 Binary files /dev/null and b/sdk/storage/storage-internal-avro/test/resources/test_null_12.avro differ 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 000000000000..277376ae1aa5 Binary files /dev/null and b/sdk/storage/storage-internal-avro/test/resources/test_null_13.avro differ 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 000000000000..3c34ec843837 Binary files /dev/null and b/sdk/storage/storage-internal-avro/test/resources/test_null_14.avro differ 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 000000000000..bf119d9e16f5 Binary files /dev/null and b/sdk/storage/storage-internal-avro/test/resources/test_null_2.avro differ 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 000000000000..d542117f7f6e Binary files /dev/null and b/sdk/storage/storage-internal-avro/test/resources/test_null_3.avro differ 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 000000000000..b514fd821841 Binary files /dev/null and b/sdk/storage/storage-internal-avro/test/resources/test_null_4.avro differ 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 000000000000..29e8ca4d5f35 Binary files /dev/null and b/sdk/storage/storage-internal-avro/test/resources/test_null_5.avro differ 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 000000000000..df22b0f901a3 Binary files /dev/null and b/sdk/storage/storage-internal-avro/test/resources/test_null_6.avro differ 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 000000000000..1168f99d0d19 Binary files /dev/null and b/sdk/storage/storage-internal-avro/test/resources/test_null_7.avro differ 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 000000000000..b4136af69b60 Binary files /dev/null and b/sdk/storage/storage-internal-avro/test/resources/test_null_8.avro differ 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 000000000000..90abc0622404 Binary files /dev/null and b/sdk/storage/storage-internal-avro/test/resources/test_null_9.avro differ 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"] +}