Skip to content

Commit

Permalink
Follow-up Swagger API changes required for progress-reporting related…
Browse files Browse the repository at this point in the history
… changes in DatabaseOperations (#22775)

* Add Swagger API changes required for progress-reporting related changes in DatabaseOperations

* Follow up changes required for progress-reporting related changes in DatabaseOperations

* updated example file

* Added Failed case in list-operations examples
  • Loading branch information
mohitagarwal-sql authored Feb 27, 2023
1 parent 6d1825d commit 637605c
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -236,16 +236,31 @@
"type": "boolean",
"readOnly": true
},
"phaseCode": {
"format": "int32",
"description": "The operation phase code.",
"type": "integer",
"operationPhaseDetails": {
"$ref": "#/definitions/PhaseDetails",
"description": "The operation phase details.",
"readOnly": true
},
"phaseDescription": {
"description": "The operation phase description.",
}
}
},
"PhaseDetails": {
"description": "The phase details properties of a database operation.",
"type": "object",
"properties": {
"phase": {
"description": "The operation phase.",
"enum": [
"Copying",
"Catchup",
"WaitingForCutover",
"CutoverInProgress"
],
"type": "string",
"readOnly": true
"readOnly": true,
"x-ms-enum": {
"name": "Phase",
"modelAsString": true
}
},
"phaseInformation": {
"description": "The operation phase information.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@
"serverName": "testsvr",
"startTime": "2023-02-13T06:25:23.67Z",
"state": "Succeeded",
"errorCode": 40640,
"errorDescription": "The server encountered an unexpected exception.",
"errorSeverity": 20,
"isUserError": true,
"estimatedCompletionTime": "2023-02-17T14:30:30.71Z",
"description": "'UpdateLogicalDatabase' on database 'testdb', Source ServiceLevelObjective 'SQLDB_GP_Gen5_2', target ServiceLevelObjective 'SQLDB_HS_Gen5_2', target database MaxSize '32'GB",
"isCancellable": true
Expand All @@ -46,13 +42,35 @@
"estimatedCompletionTime": "2023-02-17T14:30:30.71Z",
"description": "'UpdateLogicalDatabase' on database 'testdb', Source ServiceLevelObjective 'SQLDB_GP_Gen5_2', target ServiceLevelObjective 'SQLDB_HS_Gen5_2', target database MaxSize '32'GB",
"isCancellable": true,
"phaseCode": 3,
"phaseDescription": "WaitingForCutover (3 of 4)",
"phaseInformation": {
"performCutoverBy": "2/17/2023 11:57:06 AM",
"dataDelayInMb": "31"
"operationPhaseDetails": {
"phase": "WaitingForCutover",
"phaseInformation": {
"currentStep": "3",
"totalSteps": "4",
"performCutoverBy": "2/17/2023 11:57:06 AM",
"dataDelayInMb": "31"
}
}
}
},
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/operations/55555555-5555-5555-5555-555555555555",
"name": "55555555-5555-5555-5555-555555555555",
"type": "Microsoft.Sql/servers/databases/operations",
"properties": {
"databaseName": "testdb",
"operation": "UpdateLogicalDatabase",
"operationFriendlyName": "ALTER DATABASE",
"percentComplete": 100,
"serverName": "testsvr",
"startTime": "2023-02-24T11:48:29.16Z",
"state": "Failed",
"errorCode": 40640,
"errorDescription": "The server encountered an unexpected exception.",
"errorSeverity": 20,
"isUserError": true,
"description": "'UpdateLogicalDatabase' on database 'testdb'"
}
}
]
}
Expand Down

0 comments on commit 637605c

Please sign in to comment.