diff --git a/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/preview/2022-11-01-preview/appconfiguration.json b/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/preview/2022-11-01-preview/appconfiguration.json index 50241d2376ee..997e9c1053cd 100644 --- a/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/preview/2022-11-01-preview/appconfiguration.json +++ b/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/preview/2022-11-01-preview/appconfiguration.json @@ -1482,6 +1482,50 @@ } } } + }, + "/operations": { + "get": { + "tags": [ + "Operations" + ], + "summary": "Gets the state of a long running operation.", + "operationId": "GetOperationDetails", + "consumes": [], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersion" + }, + { + "name": "snapshot", + "in": "query", + "description": "Snapshot identifier for the long running operation.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/OperationDetails" + } + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "#/definitions/Error" + } + } + }, + "x-ms-examples": { + "GetOperationStatus": { + "$ref": "./examples/GetOperationStatus.json" + } + } + } } }, "definitions": { @@ -1723,6 +1767,82 @@ }, "readOnly": true }, + "OperationDetails": { + "description": "Details of a long running operation.", + "type": "object", + "properties": { + "id": { + "description": "The unique id of the operation.", + "type": "string" + }, + "status": { + "description": "The current status of the operation", + "enum": [ + "NotStarted", + "Running", + "Succeeded", + "Failed", + "Canceled" + ], + "type": "string", + "x-ms-enum": { + "modelAsString": false, + "name": "State" + } + }, + "error": { + "description": "An error, available when the status is `Failed`, describing why the operation failed.", + "$ref": "#/definitions/ErrorDetail" + } + }, + "required": [ + "id", + "status" + ] + }, + "ErrorDetail": { + "description": "The details of an error.", + "type": "object", + "properties": { + "code": { + "description": "One of a server-defined set of error codes.", + "type": "string" + }, + "message": { + "description": "A human-readable representation of the error.", + "type": "string" + }, + "details": { + "description": "An array of details about specific errors that led to this reported error.", + "type": "array", + "items": { + "$ref": "#/definitions/ErrorDetail" + } + }, + "innererror": { + "description": "An object containing more specific information than the current object about the error.", + "$ref": "#/definitions/InnerError" + } + }, + "required": [ + "code", + "message" + ] + }, + "InnerError": { + "description": "An object containing specific information about an error.", + "type": "object", + "properties": { + "code": { + "description": "One of a server-defined set of error codes.", + "type": "string" + }, + "innererror": { + "description": "An object containing more specific information than the current object about the error.", + "$ref": "#/definitions/InnerError" + } + } + }, "KeyListResult": { "description": "The result of a list request.", "type": "object", diff --git a/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/preview/2022-11-01-preview/examples/GetOperationStatus.json b/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/preview/2022-11-01-preview/examples/GetOperationStatus.json new file mode 100644 index 000000000000..5a53d3ba76b0 --- /dev/null +++ b/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/preview/2022-11-01-preview/examples/GetOperationStatus.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "endpoint": "https://{exampleAppConfigurationName}.azconfig.io", + "api-version": "2022-11-01-preview", + "snapshot": "Prod-2022-08-01" + }, + "responses": { + "200": { + "headers": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 16 Mar 2023 23:14:44 GMT", + "Retry-After": "10", + "Sync-Token": "zAJw6V16=MDotMSMyNzM2OTA=;sn=273690" + }, + "body": { + "id": "4yghgV_8lJJ5t7_kxhMpsyNCyjmZE5Q6zU0pXOp7Jvs", + "status": "Running", + "error": null + } + } + } +}