diff --git a/specification/storage/resource-manager/Microsoft.Storage/stable/2021-01-01/blob.json b/specification/storage/resource-manager/Microsoft.Storage/stable/2021-01-01/blob.json index 89bb9b6975c1..d42b90880074 100644 --- a/specification/storage/resource-manager/Microsoft.Storage/stable/2021-01-01/blob.json +++ b/specification/storage/resource-manager/Microsoft.Storage/stable/2021-01-01/blob.json @@ -815,6 +815,46 @@ } } } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/migrate": { + "put": { + "tags": [ + "BlobContainers" + ], + "operationId": "BlobContainers_VersionLevelWorm", + "x-ms-examples": { + "VersionLevelWormContainerMigration": { + "$ref": "./examples/VersionLevelWormContainerMigration.json" + } + }, + "description": "This operation migrates a blob container from container level WORM to version level WORM 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 holds.", + "parameters": [ + { + "$ref": "./storage.json#/parameters/ResourceGroupName" + }, + { + "$ref": "./storage.json#/parameters/StorageAccountName" + }, + { + "$ref": "#/parameters/ContainerName" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK -- returned when the blob container migration to support version level WORM completes." + }, + "202": { + "description": "Accepted -- Blob Container migration to support version leve worm is accepted; operation will complete asynchronously." + } + }, + "x-ms-long-running-operation": true + } } }, "definitions": { @@ -937,6 +977,11 @@ "type": "boolean", "readOnly": true, "description": "The hasImmutabilityPolicy public property is set to true by SRP if ImmutabilityPolicy has been created for this container. The hasImmutabilityPolicy public property is set to false by SRP if ImmutabilityPolicy has not been created for this container." + }, + "versionLevelWorm": { + "$ref": "#/definitions/VersionLevelWorm", + "x-ms-client-flatten": true, + "description": "The version level worm property of the container. The property is immutable and can only be set to true at the container creation time. Existing containers must undergo a migration process." } }, "description": "The properties of a container." @@ -1024,6 +1069,35 @@ ], "description": "The ImmutabilityPolicy property of a blob container, including Id, resource name, resource type, Etag." }, + "VersionLevelWorm": { + "properties": { + "enabled": { + "type": "boolean", + "description": "This is an immutable property, when set to true enables version level worm at the container level." + }, + "timeStamp": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "Returns the date and time the version level worm was enabled." + }, + "migrationState": { + "type": "string", + "readOnly": true, + "enum": [ + "InProgress", + "Completed", + "Abort" + ], + "x-ms-enum": { + "name": "MigrationState", + "modelAsString": true + }, + "description": "This property denotes the container level worm to version level worm migration state." + } + }, + "description": "Version level worm properties of the container." + }, "UpdateHistoryProperty": { "properties": { "update": { diff --git a/specification/storage/resource-manager/Microsoft.Storage/stable/2021-01-01/examples/BlobContainersPutVersionLevelWorm.json b/specification/storage/resource-manager/Microsoft.Storage/stable/2021-01-01/examples/BlobContainersPutVersionLevelWorm.json new file mode 100644 index 000000000000..8b7ecc10b32b --- /dev/null +++ b/specification/storage/resource-manager/Microsoft.Storage/stable/2021-01-01/examples/BlobContainersPutVersionLevelWorm.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "res3376", + "accountName": "sto328", + "containerName": "container6185", + "api-version": "2021-01-01", + "monitor": "true", + "blobContainer": { + "properties": { + "versionLevelWorm": { + "enabled": "true" + } + } + } + }, + "responses": { + "201": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/blobServices/default/containers/container6185", + "name": "container6185", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "properties": { + "versionLevelWorm": { + "enabled": "true" + } + } + } + }, + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/blobServices/default/containers/container6185", + "name": "container6185", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "properties": { + "versionLevelWorm": { + "enabled": "true" + } + } + } + } + } +} diff --git a/specification/storage/resource-manager/Microsoft.Storage/stable/2021-01-01/examples/VersionLevelWormContainerMigration.json b/specification/storage/resource-manager/Microsoft.Storage/stable/2021-01-01/examples/VersionLevelWormContainerMigration.json new file mode 100644 index 000000000000..3a8d72ce0428 --- /dev/null +++ b/specification/storage/resource-manager/Microsoft.Storage/stable/2021-01-01/examples/VersionLevelWormContainerMigration.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "res1782", + "accountName": "sto7069", + "containerName": "container6397", + "immutabilityPolicyName": "default", + "api-version": "2021-01-01", + "monitor": "true" + }, + "responses": { + "200": {}, + "202": {} + } +}