/* * Copyright (c) Microsoft Corporation. * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { __awaiter } from "tslib"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; /** * This sample demonstrates how to This operation migrates a blob container from container level WORM to object level immutability enabled container. Prerequisites require a container level immutability policy either in locked or unlocked state, Account level versioning must be enabled and there should be no Legal hold on the container. * * @summary This operation migrates a blob container from container level WORM to object level immutability enabled container. Prerequisites require a container level immutability policy either in locked or unlocked state, Account level versioning must be enabled and there should be no Legal hold on the container. * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/ObjectLevelWormContainerMigration.json */ function versionLevelWormContainerMigration() { return __awaiter(this, void 0, void 0, function* () { const subscriptionId = "{subscription-id}"; const resourceGroupName = "res1782"; const accountName = "sto7069"; const containerName = "container6397"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const result = yield client.blobContainers.beginObjectLevelWormAndWait(resourceGroupName, accountName, containerName); console.log(result); }); } versionLevelWormContainerMigration().catch(console.error); //# sourceMappingURL=blobContainersObjectLevelWormSample.js.map