diff --git a/sdk/storage/storage-blob/CHANGELOG.md b/sdk/storage/storage-blob/CHANGELOG.md index 0acdd77a4fef..2a9137524915 100644 --- a/sdk/storage/storage-blob/CHANGELOG.md +++ b/sdk/storage/storage-blob/CHANGELOG.md @@ -4,6 +4,7 @@ - Fixed a bug where the `credential` property of the `StorageClient` is not set correctly when using a Token credential. Fixed bug [12219](https://github.com/Azure/azure-sdk-for-js/issues/12219). - Blob Batch operations now reorder the subresponses in the client side to perserve the original input order. See `BlobBatchClient.submitBatch()` and [12335](https://github.com/Azure/azure-sdk-for-js/issues/12335). +- Added `isHierarchicalNamespaceEnabled` to the response of `BlobServiceClient.getAccountInfo()`. ## 12.3.0 (2020-11-10) diff --git a/sdk/storage/storage-blob/recordings/browsers/blobserviceclient/recording_getaccountinfo.json b/sdk/storage/storage-blob/recordings/browsers/blobserviceclient/recording_getaccountinfo.json index 56c43aa36f8a..e4a43f3e9670 100644 --- a/sdk/storage/storage-blob/recordings/browsers/blobserviceclient/recording_getaccountinfo.json +++ b/sdk/storage/storage-blob/recordings/browsers/blobserviceclient/recording_getaccountinfo.json @@ -4,23 +4,28 @@ "method": "GET", "url": "https://fakestorageaccount.blob.core.windows.net/", "query": { - "comp": "properties", - "restype": "account" + "restype": "account", + "comp": "properties" }, "requestBody": null, "status": 200, "response": "", "responseHeaders": { - "date": "Wed, 02 Oct 2019 16:42:45 GMT", + "content-length": "0", + "date": "Tue, 01 Dec 2020 08:16:56 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-account-kind": "StorageV2", - "x-ms-request-id": "215f3c9e-201e-0080-6140-7993dc000000", + "x-ms-client-request-id": "f1bbd26b-0dd9-4344-971e-ef41b6f3099f", + "x-ms-is-hns-enabled": "false", + "x-ms-request-id": "e0841bc3-a01e-0093-18ba-c78ef7000000", "x-ms-sku-name": "Standard_RAGRS", - "x-ms-version": "2019-02-02", - "x-ms-client-request-id": "1f0dd046-80c1-41a8-8bf9-5080f96e766f", - "content-length": "0" + "x-ms-version": "2020-02-10" } } ], - "uniqueTestInfo": {} + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "79d58c3dd1c1ace867744477a4f4997d" } \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/node/blobserviceclient/recording_getaccountinfo.js b/sdk/storage/storage-blob/recordings/node/blobserviceclient/recording_getaccountinfo.js index a93fef1c67e8..aac6ebad7f91 100644 --- a/sdk/storage/storage-blob/recordings/node/blobserviceclient/recording_getaccountinfo.js +++ b/sdk/storage/storage-blob/recordings/node/blobserviceclient/recording_getaccountinfo.js @@ -1,28 +1,33 @@ let nock = require('nock'); -module.exports.testInfo = {} +module.exports.hash = "7b6ac5f1db4933b1d885196e1246e4f6"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) .get('/') .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', - 'eba02cda-d01e-003b-1547-6824a2000000', + '96cd0067-d01e-0052-23ba-c72915000000', 'x-ms-client-request-id', - '62830c5a-29b3-48f0-82eb-236446f6f69f', + '67c75c73-1d27-4d95-935e-27f8861292e1', 'x-ms-version', - '2019-02-02', + '2020-02-10', 'x-ms-sku-name', 'Standard_RAGRS', 'x-ms-account-kind', 'StorageV2', + 'x-ms-is-hns-enabled', + 'false', 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-sku-name,x-ms-account-kind,Content-Length,Date,Transfer-Encoding', + 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-sku-name,x-ms-account-kind,x-ms-is-hns-enabled,Content-Length,Date,Transfer-Encoding', 'Access-Control-Allow-Origin', '*', 'Date', - 'Wed, 11 Sep 2019 02:19:27 GMT' ]); - + 'Tue, 01 Dec 2020 08:15:48 GMT' +]); diff --git a/sdk/storage/storage-blob/review/storage-blob.api.md b/sdk/storage/storage-blob/review/storage-blob.api.md index 7a4c951fa01f..574ad815d9b9 100644 --- a/sdk/storage/storage-blob/review/storage-blob.api.md +++ b/sdk/storage/storage-blob/review/storage-blob.api.md @@ -2708,6 +2708,7 @@ export interface ServiceGetAccountInfoHeaders { date?: Date; // (undocumented) errorCode?: string; + isHierarchicalNamespaceEnabled?: boolean; requestId?: string; skuName?: SkuName; version?: string; 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 0dda905522f3..09c12abba66a 100644 --- a/sdk/storage/storage-blob/src/generated/src/models/index.ts +++ b/sdk/storage/storage-blob/src/generated/src/models/index.ts @@ -3506,6 +3506,10 @@ export interface ServiceGetAccountInfoHeaders { * 'FileStorage', 'BlockBlobStorage' */ accountKind?: AccountKind; + /** + * Version 2019-07-07 and newer. Indicates if the account has a hierarchical namespace enabled. + */ + isHierarchicalNamespaceEnabled?: boolean; errorCode?: string; } 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 aa1c7f239af1..ce581632bca3 100644 --- a/sdk/storage/storage-blob/src/generated/src/models/mappers.ts +++ b/sdk/storage/storage-blob/src/generated/src/models/mappers.ts @@ -2506,6 +2506,12 @@ export const ServiceGetAccountInfoHeaders: coreHttp.CompositeMapper = { ] } }, + isHierarchicalNamespaceEnabled: { + serializedName: "x-ms-is-hns-enabled", + type: { + name: "Boolean" + } + }, errorCode: { serializedName: "x-ms-error-code", type: { diff --git a/sdk/storage/storage-blob/src/generated/src/storageClientContext.ts b/sdk/storage/storage-blob/src/generated/src/storageClientContext.ts index ee45e3ba2635..d676d5b88cd0 100644 --- a/sdk/storage/storage-blob/src/generated/src/storageClientContext.ts +++ b/sdk/storage/storage-blob/src/generated/src/storageClientContext.ts @@ -39,7 +39,7 @@ export class StorageClientContext extends coreHttp.ServiceClient { super(undefined, options); - this.version = "2020-02-10"; + this.version = '2020-02-10'; this.baseUri = "{url}"; this.requestContentType = "application/json; charset=utf-8"; this.url = url; diff --git a/sdk/storage/storage-blob/test/blobserviceclient.spec.ts b/sdk/storage/storage-blob/test/blobserviceclient.spec.ts index ec115032ae1b..470b7a24f255 100644 --- a/sdk/storage/storage-blob/test/blobserviceclient.spec.ts +++ b/sdk/storage/storage-blob/test/blobserviceclient.spec.ts @@ -404,6 +404,7 @@ describe("BlobServiceClient", () => { const accountInfo = await blobServiceClient.getAccountInfo(); assert.ok(accountInfo.accountKind); assert.ok(accountInfo.skuName); + assert.deepStrictEqual(accountInfo.isHierarchicalNamespaceEnabled, false); }); it("createContainer and deleteContainer", async () => {