Skip to content

Commit edf870e

Browse files
authored
[TDE] Swagger changes for Per Database CMK apis (#21973)
* [TDE] Swagger changes for Per Database CMK apis * Fixes * Prettier fix * change LRO to async operation for PUT * Fix databases swagger * Fix build
1 parent 95fcf44 commit edf870e

File tree

46 files changed

+377
-57
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+377
-57
lines changed

specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/DatabaseEncryptionProtectorRevalidate.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@
6666
}
6767
},
6868
"x-ms-long-running-operation": true,
69+
"x-ms-long-running-operation-options": {
70+
"final-state-via": "location"
71+
},
6972
"x-ms-examples": {
7073
"Revalidates the encryption protector for a particular database": {
7174
"$ref": "./examples/DatabaseEncryptionProtectorRevalidate.json"

specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/DatabaseEncryptionProtectorRevert.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@
6666
}
6767
},
6868
"x-ms-long-running-operation": true,
69+
"x-ms-long-running-operation-options": {
70+
"final-state-via": "location"
71+
},
6972
"x-ms-examples": {
7073
"Reverts the encryption protector for a particular database": {
7174
"$ref": "./examples/DatabaseEncryptionProtectorRevert.json"

specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/Databases.json

Lines changed: 15 additions & 6 deletions
Large diffs are not rendered by default.

specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/RecoverableDatabases.json

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
}
4646
},
4747
"default": {
48-
"description": "*** Error Responses: ***\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found."
48+
"description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found."
4949
}
5050
},
5151
"x-ms-pageable": {
@@ -90,18 +90,55 @@
9090
}
9191
},
9292
"default": {
93-
"description": "*** Error Responses: ***\n\n * 400 InvalidRecoverableDatabaseId - Invalid recoverable database identifier.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found."
93+
"description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidRecoverableDatabaseId - Invalid recoverable database identifier.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found."
9494
}
9595
},
9696
"x-ms-examples": {
9797
"Get a recoverable database.": {
9898
"$ref": "./examples/RecoverableDatabaseGet.json"
99+
},
100+
"Gets a recoverable database with expand equals keys.": {
101+
"$ref": "./examples/RecoverableDatabaseGetWithExpandEqualsKeys.json"
99102
}
100103
}
101104
}
102105
}
103106
},
104107
"definitions": {
108+
"DatabaseKey": {
109+
"description": "Database level key used for encryption at rest.",
110+
"type": "object",
111+
"properties": {
112+
"type": {
113+
"description": "The database key type. Only supported value is 'AzureKeyVault'.",
114+
"enum": [
115+
"AzureKeyVault"
116+
],
117+
"type": "string",
118+
"readOnly": true,
119+
"x-ms-enum": {
120+
"name": "DatabaseKeyType",
121+
"modelAsString": true
122+
}
123+
},
124+
"thumbprint": {
125+
"description": "Thumbprint of the database key.",
126+
"type": "string",
127+
"readOnly": true
128+
},
129+
"creationDate": {
130+
"format": "date-time",
131+
"description": "The database key creation date.",
132+
"type": "string",
133+
"readOnly": true
134+
},
135+
"subregion": {
136+
"description": "Subregion of the server key.",
137+
"type": "string",
138+
"readOnly": true
139+
}
140+
}
141+
},
105142
"RecoverableDatabase": {
106143
"description": "A recoverable database resource.",
107144
"type": "object",
@@ -161,6 +198,13 @@
161198
"description": "The last available backup date.",
162199
"type": "string",
163200
"readOnly": true
201+
},
202+
"keys": {
203+
"description": "The resource ids of the user assigned identities to use",
204+
"type": "object",
205+
"additionalProperties": {
206+
"$ref": "#/definitions/DatabaseKey"
207+
}
164208
}
165209
}
166210
}

specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/RestorableDroppedDatabases.json

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
}
4646
},
4747
"default": {
48-
"description": "*** Error Responses: ***\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found"
48+
"description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription."
4949
}
5050
},
5151
"x-ms-pageable": {
@@ -93,18 +93,55 @@
9393
}
9494
},
9595
"default": {
96-
"description": "*** Error Responses: ***\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found."
96+
"description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found."
9797
}
9898
},
9999
"x-ms-examples": {
100100
"Gets a restorable dropped database.": {
101101
"$ref": "./examples/GetRestorableDroppedDatabase.json"
102+
},
103+
"Gets a restorable dropped database with expand equals keys.": {
104+
"$ref": "./examples/GetRestorableDroppedDatabaseWithExpandEqualsKeys.json"
102105
}
103106
}
104107
}
105108
}
106109
},
107110
"definitions": {
111+
"DatabaseKey": {
112+
"description": "Database level key used for encryption at rest.",
113+
"type": "object",
114+
"properties": {
115+
"type": {
116+
"description": "The database key type. Only supported value is 'AzureKeyVault'.",
117+
"enum": [
118+
"AzureKeyVault"
119+
],
120+
"type": "string",
121+
"readOnly": true,
122+
"x-ms-enum": {
123+
"name": "DatabaseKeyType",
124+
"modelAsString": true
125+
}
126+
},
127+
"thumbprint": {
128+
"description": "Thumbprint of the database key.",
129+
"type": "string",
130+
"readOnly": true
131+
},
132+
"creationDate": {
133+
"format": "date-time",
134+
"description": "The database key creation date.",
135+
"type": "string",
136+
"readOnly": true
137+
},
138+
"subregion": {
139+
"description": "Subregion of the server key.",
140+
"type": "string",
141+
"readOnly": true
142+
}
143+
}
144+
},
108145
"RestorableDroppedDatabase": {
109146
"description": "A restorable dropped database resource.",
110147
"type": "object",
@@ -206,6 +243,13 @@
206243
"name": "BackupStorageRedundancy",
207244
"modelAsString": true
208245
}
246+
},
247+
"keys": {
248+
"description": "The resource ids of the user assigned identities to use",
249+
"type": "object",
250+
"additionalProperties": {
251+
"$ref": "#/definitions/DatabaseKey"
252+
}
209253
}
210254
}
211255
}

0 commit comments

Comments
 (0)