Skip to content

Commit 3ccd82a

Browse files
Adding flush rest api specs
1 parent f59c6c4 commit 3ccd82a

File tree

2 files changed

+98
-0
lines changed

2 files changed

+98
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"parameters": {
3+
"databaseName": "default",
4+
"clusterName": "cache1",
5+
"resourceGroupName": "rg1",
6+
"api-version": "2023-03-01-preview",
7+
"subscriptionId": "subid",
8+
"parameters": {
9+
"ids": [
10+
"/subscriptions/subid2/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default"
11+
]
12+
}
13+
},
14+
"responses": {
15+
"200": {},
16+
"202": {
17+
"headers": {
18+
"Azure-AsyncOperation": "https://management.azure.com/subscriptions/subid/providers/Microsoft.Cache/...pathToOperationStatus..."
19+
}
20+
}
21+
}
22+
}

specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,6 +1182,65 @@
11821182
}
11831183
}
11841184
},
1185+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/databases/{databaseName}/flush": {
1186+
"post": {
1187+
"tags": [
1188+
"RedisEnterprise",
1189+
"Databases"
1190+
],
1191+
"operationId": "Databases_Flush",
1192+
"x-ms-long-running-operation": true,
1193+
"x-ms-long-running-operation-options": {
1194+
"final-state-via": "azure-async-operation"
1195+
},
1196+
"x-ms-examples": {
1197+
"How to flush all the keys in the database": {
1198+
"$ref": "./examples/RedisEnterpriseDatabasesFlush.json"
1199+
}
1200+
},
1201+
"description": "flushes all the keys in this database and also from its linked databases.",
1202+
"parameters": [
1203+
{
1204+
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter"
1205+
},
1206+
{
1207+
"$ref": "#/parameters/ClusterNameParameter"
1208+
},
1209+
{
1210+
"$ref": "#/parameters/DatabaseNameParameter"
1211+
},
1212+
{
1213+
"name": "parameters",
1214+
"in": "body",
1215+
"required": true,
1216+
"schema": {
1217+
"$ref": "#/definitions/FlushParameters"
1218+
},
1219+
"description": "Information identifying the database to be flushed"
1220+
},
1221+
{
1222+
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
1223+
},
1224+
{
1225+
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter"
1226+
}
1227+
],
1228+
"responses": {
1229+
"200": {
1230+
"description": "Flush operation succeeded. All the keys are cleared in this and all its linked databases."
1231+
},
1232+
"202": {
1233+
"description": "Flush operation successfully enqueued; follow the Azure-AsyncOperation header to poll for final outcome."
1234+
},
1235+
"default": {
1236+
"description": "Error response describing why the operation failed.",
1237+
"schema": {
1238+
"$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse"
1239+
}
1240+
}
1241+
}
1242+
}
1243+
},
11851244
"/subscriptions/{subscriptionId}/providers/Microsoft.Cache/locations/{location}/skus": {
11861245
"get": {
11871246
"tags": [
@@ -1921,6 +1980,23 @@
19211980
}
19221981
}
19231982
},
1983+
"FlushParameters": {
1984+
"title": "Flush the keys from the current and all its linked databases.",
1985+
"type": "object",
1986+
"properties": {
1987+
"ids": {
1988+
"type": "array",
1989+
"items": {
1990+
"type": "string"
1991+
},
1992+
"description": "The resource IDs of the database resources to be flushed."
1993+
}
1994+
},
1995+
"required": [
1996+
"ids"
1997+
],
1998+
"description": "Parameters for a Redis Enterprise Active Geo Replication FLush operation."
1999+
},
19242000
"ForceUnlinkParameters": {
19252001
"title": "Forcibly unlink another database from this database.",
19262002
"type": "object",

0 commit comments

Comments
 (0)