diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/InstancePoolOperations.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/InstancePoolOperations.json new file mode 100644 index 000000000000..724c77bdd7f0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/InstancePoolOperations.json @@ -0,0 +1,272 @@ +{ + "swagger": "2.0", + "info": { + "version": "2024-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/operations": { + "get": { + "tags": [ + "InstancePoolOperations" + ], + "description": "Gets a list of operations performed on the instance pool.", + "operationId": "InstancePoolOperations_ListByInstancePool", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "instancePoolName", + "in": "path", + "description": "The name of the managed instance pool.", + "required": true, + "type": "string", + "maxLength": 127, + "minLength": 1, + "pattern": "^[a-z0-9]+(-*[a-z0-9]+)*$" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request for getting instance pool operations has been executed successfully.", + "schema": { + "$ref": "#/definitions/InstancePoolOperationListResult" + } + }, + "default": { + "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.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List the instance pool management operations with no results": { + "$ref": "./examples/ListInstancePoolOperationsEmpty.json" + }, + "List the instance pool management operations with some results": { + "$ref": "./examples/ListInstancePoolOperations.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/operations/{operationId}": { + "get": { + "tags": [ + "InstancePoolOperations" + ], + "description": "Gets a management operation on a instance pool.", + "operationId": "InstancePoolOperations_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "instancePoolName", + "in": "path", + "description": "The name of the managed instance pool.", + "required": true, + "type": "string", + "maxLength": 127, + "minLength": 1, + "pattern": "^[a-z0-9]+(-*[a-z0-9]+)*$" + }, + { + "name": "operationId", + "in": "path", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified instance pool operation.", + "schema": { + "$ref": "#/definitions/InstancePoolOperation" + } + }, + "default": { + "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.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Gets the instance pool management operation": { + "$ref": "./examples/GetInstancePoolOperation.json" + } + } + } + } + }, + "definitions": { + "InstancePoolOperation": { + "description": "A instance pool operation.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/InstancePoolOperationProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "InstancePoolOperationListResult": { + "description": "The response to a list instance pool operations request", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/InstancePoolOperation" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "InstancePoolOperationProperties": { + "description": "The properties of a instance pool operation.", + "type": "object", + "properties": { + "instancePoolName": { + "description": "The name of the instance pool the operation is being performed on.", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "The name of operation.", + "type": "string", + "readOnly": true + }, + "operationFriendlyName": { + "description": "The friendly name of operation.", + "type": "string", + "readOnly": true + }, + "percentComplete": { + "format": "int32", + "description": "The percentage of the operation completed.", + "type": "integer", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "The operation start time.", + "type": "string", + "readOnly": true + }, + "state": { + "description": "The operation state.", + "enum": [ + "Pending", + "InProgress", + "Succeeded", + "Failed", + "CancelInProgress", + "Cancelled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ManagementOperationState", + "modelAsString": true + } + }, + "errorCode": { + "format": "int32", + "description": "The operation error code.", + "type": "integer", + "readOnly": true + }, + "errorDescription": { + "description": "The operation error description.", + "type": "string", + "readOnly": true + }, + "errorSeverity": { + "format": "int32", + "description": "The operation error severity.", + "type": "integer", + "readOnly": true + }, + "errorType": { + "description": "Error type (e.g. None, User).", + "enum": [ + "None", + "User" + ], + "type": "string", + "readOnly": true + }, + "estimatedCompletionTime": { + "format": "date-time", + "description": "The estimated completion time of the operation.", + "type": "string", + "readOnly": true + }, + "description": { + "description": "The operation description.", + "type": "string", + "readOnly": true + }, + "isCancellable": { + "description": "Whether the operation can be cancelled.", + "type": "boolean", + "readOnly": true + } + } + } + }, + "parameters": {}, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetInstancePoolOperation.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetInstancePoolOperation.json new file mode 100644 index 000000000000..84573e754fae --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetInstancePoolOperation.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "resource-group", + "instancePoolName": "test-instance-pool", + "operationId": "c218773b-203f-4c7a-b174-6bd71fe20f72", + "api-version": "2024-05-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "instancePoolName": "test-instance-pool", + "operation": "UpsertInstancePoolAsync", + "operationFriendlyName": "UPDATE INSTANCE POOL", + "percentComplete": 100, + "startTime": "2024-04-22T14:46:00.423Z", + "state": "Succeeded", + "isCancellable": true + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resource-group/providers/Microsoft.Sql/instancePools/test-instance-pool", + "name": "c218773b-203f-4c7a-b174-6bd71fe20f72", + "type": "Microsoft.Sql/instancePools/operations" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListInstancePoolOperations.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListInstancePoolOperations.json new file mode 100644 index 000000000000..ee63e2202986 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListInstancePoolOperations.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "resource-group", + "instancePoolName": "test-instance-pool", + "api-version": "2024-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "instancePoolName": "test-instance-pool", + "operation": "UpsertInstancePoolAsync", + "operationFriendlyName": "UPDATE INSTANCE POOL", + "percentComplete": 100, + "startTime": "2024-04-22T14:46:00.423Z", + "state": "Succeeded", + "isCancellable": true + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resource-group/providers/Microsoft.Sql/instancePools/test-instance-pool", + "name": "c218773b-203f-4c7a-b174-6bd71fe20f72", + "type": "Microsoft.Sql/instancePools/operations" + }, + { + "properties": { + "instancePoolName": "test-instance-pool", + "operation": "UpsertInstancePoolAsync", + "operationFriendlyName": "UPDATE INSTANCE POOL", + "percentComplete": 100, + "startTime": "2024-04-22T14:46:22.847Z", + "state": "Succeeded", + "isCancellable": true + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resource-group/providers/Microsoft.Sql/instancePools/test-instance-pool", + "name": "b0326862-03dd-41a0-b239-5c3d7d68d098", + "type": "Microsoft.Sql/instancePools/operations" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListInstancePoolOperationsEmpty.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListInstancePoolOperationsEmpty.json new file mode 100644 index 000000000000..2bed23686655 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListInstancePoolOperationsEmpty.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "resource-group", + "instancePoolName": "test-instance-pool", + "api-version": "2024-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [] + } + } + } +} diff --git a/specification/sql/resource-manager/readme.md b/specification/sql/resource-manager/readme.md index 0f136188ac2e..ba724c774b9f 100644 --- a/specification/sql/resource-manager/readme.md +++ b/specification/sql/resource-manager/readme.md @@ -78,6 +78,7 @@ input-file: - Microsoft.Sql/preview/2024-05-01-preview/IPv6FirewallRules.json - Microsoft.Sql/preview/2024-05-01-preview/InstanceFailoverGroups.json - Microsoft.Sql/preview/2024-05-01-preview/InstancePools.json + - Microsoft.Sql/preview/2024-05-01-preview/InstancePoolOperations.json - Microsoft.Sql/preview/2024-05-01-preview/JobAgents.json - Microsoft.Sql/preview/2024-05-01-preview/JobCredentials.json - Microsoft.Sql/preview/2024-05-01-preview/JobExecutions.json