Skip to content

Commit 9ab46e8

Browse files
jaredmoojianghaolu
authored andcommitted
Use singleton enum for tde config name, and add tde list operation (#1378)
* Use singleton enum for tde config name. This is needed in order for `autorest --azureresourceschema` to process the operation. * Add swagger for list TDE configurations. This operation is deprecated.
1 parent 5bb3527 commit 9ab46e8

File tree

4 files changed

+104
-3
lines changed

4 files changed

+104
-3
lines changed

arm-sql/2014-04-01/examples/DatabaseTransparentDataEncryptionCreateOrUpdate.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"resourceGroupName": "sqlcrudtest-6852",
55
"serverName": "sqlcrudtest-2080",
66
"databaseName": "sqlcrudtest-9187",
7+
"transparentDataEncryptionName": "current",
78
"api-version": "2014-04-01",
89
"parameters": {
910
"location": "North Europe",

arm-sql/2014-04-01/examples/DatabaseTransparentDataEncryptionGet.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"resourceGroupName": "sqlcrudtest-6852",
55
"serverName": "sqlcrudtest-2080",
66
"databaseName": "sqlcrudtest-9187",
7+
"transparentDataEncryptionName": "current",
78
"api-version": "2014-04-01"
89
},
910
"responses": {
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "00000000-1111-2222-3333-444444444444",
4+
"resourceGroupName": "sqlcrudtest-6852",
5+
"serverName": "sqlcrudtest-2080",
6+
"databaseName": "sqlcrudtest-9187",
7+
"api-version": "2014-04-01"
8+
},
9+
"responses": {
10+
"200": {
11+
"body": {
12+
"value": [
13+
{
14+
"name" : "current",
15+
"location" : "North Europe",
16+
"id" : "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-2080/databases/sqlcrudtest-9187/transparentDataEncryption/current",
17+
"type" : "Microsoft.Sql/servers/databases/transparentDataEncryption",
18+
"properties" : {
19+
"status" : "Enabled"
20+
}
21+
}
22+
]
23+
}
24+
}
25+
}
26+
}

arm-sql/2014-04-01/swagger/sql.core.json

Lines changed: 76 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,7 @@
971971
}
972972
}
973973
},
974-
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/current": {
974+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{transparentDataEncryptionName}": {
975975
"put": {
976976
"tags": [
977977
"TransparentDataEncryption"
@@ -998,6 +998,9 @@
998998
"type": "string",
999999
"description": "The name of the database for which setting the transparent data encryption applies."
10001000
},
1001+
{
1002+
"$ref": "#/parameters/TransparentDataEncryptionNameParameter"
1003+
},
10011004
{
10021005
"name": "parameters",
10031006
"in": "body",
@@ -1029,6 +1032,48 @@
10291032
],
10301033
"operationId": "Databases_GetTransparentDataEncryptionConfiguration",
10311034
"description": "Gets a database's transparent data encryption configuration.",
1035+
"parameters": [
1036+
{
1037+
"$ref": "#/parameters/ApiVersionParameter"
1038+
},
1039+
{
1040+
"$ref": "#/parameters/SubscriptionIdParameter"
1041+
},
1042+
{
1043+
"$ref": "#/parameters/ResourceGroupParameter"
1044+
},
1045+
{
1046+
"$ref": "#/parameters/ServerNameParameter"
1047+
},
1048+
{
1049+
"name": "databaseName",
1050+
"in": "path",
1051+
"required": true,
1052+
"type": "string",
1053+
"description": "The name of the database for which the transparent data encryption applies."
1054+
},
1055+
{
1056+
"$ref": "#/parameters/TransparentDataEncryptionNameParameter"
1057+
}
1058+
],
1059+
"responses": {
1060+
"200": {
1061+
"description": "OK",
1062+
"schema": {
1063+
"$ref": "#/definitions/TransparentDataEncryption"
1064+
}
1065+
}
1066+
}
1067+
}
1068+
},
1069+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption": {
1070+
"get": {
1071+
"tags": [
1072+
"TransparentDataEncryption"
1073+
],
1074+
"operationId": "Databases_ListTransparentDataEncryptionConfigurations",
1075+
"description": "Gets a list of a database's transparent data encryption configurations. There is only ever one element, named 'current', so GetTransparentDataEncryptionConfiguration should be used instead.",
1076+
"deprecated": false,
10321077
"parameters": [
10331078
{
10341079
"$ref": "#/parameters/ApiVersionParameter"
@@ -1060,7 +1105,7 @@
10601105
}
10611106
}
10621107
},
1063-
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/current/operationResults": {
1108+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{transparentDataEncryptionName}/operationResults": {
10641109
"get": {
10651110
"tags": [
10661111
"TransparentDataEncryption"
@@ -1086,6 +1131,9 @@
10861131
"required": true,
10871132
"type": "string",
10881133
"description": "The name of the database for which the transparent data encryption applies."
1134+
},
1135+
{
1136+
"$ref": "#/parameters/TransparentDataEncryptionNameParameter"
10891137
}
10901138
],
10911139
"responses": {
@@ -1885,7 +1933,19 @@
18851933
"$ref": "#/definitions/SubResource"
18861934
}
18871935
],
1888-
"description": "Represents a database transparent data encryption ."
1936+
"description": "Represents a database transparent data encryption configuration."
1937+
},
1938+
"TransparentDataEncryptionListResult": {
1939+
"properties": {
1940+
"value": {
1941+
"type": "array",
1942+
"items": {
1943+
"$ref": "#/definitions/TransparentDataEncryption"
1944+
},
1945+
"description": "The list of transparent data encryption configurations."
1946+
}
1947+
},
1948+
"description": "Represents the response to a list transparent data encryption configurations request."
18891949
},
18901950
"DatabaseProperties": {
18911951
"properties": {
@@ -2471,6 +2531,19 @@
24712531
"type": "string",
24722532
"description": "A comma separated list of child objects to expand in the response. Possible properties: serviceTierAdvisors, transparentDataEncryption.",
24732533
"x-ms-parameter-location": "method"
2534+
},
2535+
"TransparentDataEncryptionNameParameter": {
2536+
"name": "transparentDataEncryptionName",
2537+
"in": "path",
2538+
"required": true,
2539+
"type": "string",
2540+
"enum": ["current"],
2541+
"description": "The name of the transparent data encryption configuration.",
2542+
"x-ms-enum":{
2543+
"modelAsString": true,
2544+
"name": "TransparentDataEncryptionName"
2545+
},
2546+
"x-ms-parameter-location": "method"
24742547
}
24752548
},
24762549
"securityDefinitions": {

0 commit comments

Comments
 (0)