Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Do not Merge] [Private SDK] Add Version Level WORM Api Support #13333

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

azure-async-operation - (default if not specified) poll until terminal state, the final response will be available at the uri pointed to by the header Azure-AsyncOperation

By default it will use the above, which I need so will keep it like this if no worries

}
}
},
"definitions": {
Expand Down Expand Up @@ -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,
HimanshuChhabra marked this conversation as resolved.
Show resolved Hide resolved
"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."
Expand Down Expand Up @@ -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": {
Expand Down
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -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": {}
}
}