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

Add support for default encryption scope & block encryption scope override for blob container APIs. #8595

Merged
merged 5 commits into from
Mar 26, 2020
Merged
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 @@ -200,6 +200,9 @@
"x-ms-examples": {
"PutContainers": {
"$ref": "./examples/BlobContainersPut.json"
},
"PutContainerWithDefaultEncryptionScope": {
"$ref": "./examples/BlobContainersPutDefaultEncryptionScope.json"
}
},
"description": "Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container. ",
Expand Down Expand Up @@ -797,6 +800,14 @@
"definitions": {
"ContainerProperties": {
"properties": {
"defaultEncryptionScope": {
Copy link
Member

Choose a reason for hiding this comment

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

Adding new writable properties to a stable API is considered a breaking change. Could this instead be moved into a new API version?

Copy link
Member

Choose a reason for hiding this comment

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

Add these 2 new properties should no be breaking since:

  1. Old sdk still work, as the new properties are optional
  2. Old SDK won't change the properties added with new SDK

"type": "string",
"description": "Default the container to use specified encryption scope for all writes."
},
"denyEncryptionScopeOverride": {
Copy link
Member

@qianwens qianwens Mar 9, 2020

Choose a reason for hiding this comment

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

denyEncryptionScopeOverride [](start = 9, length = 27)

Consider to to use enum or string instead of boolean in case you need other mode which may cause breaking change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was intentionally modeled as a boolean to match data plane headers following the same.

"type": "boolean",
"description": "Block override of encryption scope from the container default."
},
"publicAccess": {
"type": "string",
"enum": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"parameters": {
"subscriptionId": "{subscription-id}",
"resourceGroupName": "res3376",
"accountName": "sto328",
"containerName": "container6185",
"api-version": "2019-06-01",
"monitor": "true",
"blobContainer": {
"properties": {
"defaultEncryptionScope": "encryptionscope185",
"denyEncryptionScopeOverride": 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": {
"defaultEncryptionScope": "encryptionscope185",
"denyEncryptionScopeOverride": 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": {
"defaultEncryptionScope": "encryptionscope185",
"denyEncryptionScopeOverride": true
}
}
}
}
}