-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Dev/ivarandj/instance pool operations api #29932
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ms-bogdan-rotaru
merged 6 commits into
Azure:release-sql-Microsoft.Sql-2024-05-01-preview
from
ivanarandjelovic:dev/ivarandj/InstancePools_operations_api
Jul 31, 2024
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
8d85929
Add instance pool operations swagger and examples
e825920
Address prettier check errors
4a39120
Fix Swagger LintDiff errors
90b052b
Fix parameter names to match parameter patterns
51bb009
Remove validation for resourceGroupName parameter as it fails Swagger…
10c53f7
Replace bool with enum (PR review remark)
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
272 changes: 272 additions & 0 deletions
272
...sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/InstancePoolOperations.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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" | ||
ivanarandjelovic marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| }, | ||
| { | ||
| "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}": { | ||
ivanarandjelovic marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "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" | ||
| } | ||
| } | ||
| } | ||
| } | ||
27 changes: 27 additions & 0 deletions
27
...e-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetInstancePoolOperation.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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" | ||
| } | ||
| } | ||
| } | ||
| } |
44 changes: 44 additions & 0 deletions
44
...manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListInstancePoolOperations.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| } | ||
| } |
15 changes: 15 additions & 0 deletions
15
...er/Microsoft.Sql/preview/2024-05-01-preview/examples/ListInstancePoolOperationsEmpty.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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": [] | ||
| } | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.