From aee7a78a37915528c810d49babc9724f1265a25b Mon Sep 17 00:00:00 2001 From: ilijadivljan-ms <122982104+ilijadivljan-ms@users.noreply.github.com> Date: Fri, 10 Mar 2023 04:18:50 +0100 Subject: [PATCH] Update swagger documentation for Managed Instance start-stop actions (#22992) --- .../2022-11-01-preview/ManagedInstances.json | 12 ++++++ .../examples/StartManagedInstance.json | 42 +++++++++++++++++++ .../examples/StopManagedInstance.json | 42 +++++++++++++++++++ 3 files changed, 96 insertions(+) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/ManagedInstances.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/ManagedInstances.json index d5e2f1ed75e4..ae4ec975b040 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/ManagedInstances.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/ManagedInstances.json @@ -495,6 +495,12 @@ } ], "responses": { + "200": { + "description": "Successfully started the managed instance.", + "schema": { + "$ref": "#/definitions/ManagedInstance" + } + }, "default": { "description": "*** Error Responses: ***\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 StartStopOfManagedInstanceIsDisabled - Start and stop operation on managed instance is not enabled.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 ManagementServiceStartStopManagedInstanceSubscriptionNotEnabledForFeature - User attempted to use Start/Stop feature without having the subscription allowlisted for the appropriate subscription feature.\n\n * 400 ManagementServiceStartManagedInstanceFeatureDisabled - User attempted to use the Start Azure SQL Managed Instance feature, which is disabled.\n\n * 400 NameAlreadyExists - The provided name already exists.\n\n * 400 ManagementServiceStartManagedInstanceNotSupportedOnSKU - Start operation is not supported on the given SKU.\n\n * 400 ManagementServiceStartManagedInstanceTriggeredWhileStartInProgress - User attempted to Start Azure SQL Managed Instance that is not in Stopped 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 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." }, @@ -535,6 +541,12 @@ } ], "responses": { + "200": { + "description": "Successfully stopped the managed instance.", + "schema": { + "$ref": "#/definitions/ManagedInstance" + } + }, "default": { "description": "*** Error Responses: ***\n\n * 400 ManagementServiceStopManagedInstanceZoneRedundant - Stop executed on instance with zone redundancy enabled.\n\n * 400 ManagementServiceStopManagedInstancePartOfFailoverGroup - Stop executed on the instance that is part of failover group.\n\n * 400 NameAlreadyExists - The provided name already exists.\n\n * 400 ManagementServiceStartStopManagedInstanceSubscriptionNotEnabledForFeature - User attempted to use Start/Stop feature without having the subscription allowlisted for the appropriate subscription feature.\n\n * 400 ManagementServiceStopManagedInstanceNotSupportedOnSKU - Stop operation is not supported on the given SKU.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 StartStopOfManagedInstanceIsDisabled - Start and stop operation on managed instance is not enabled.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 ManagementServiceStopManagedInstanceUsingMILink - Stop executed on the instance that has Managed Instance link configured.\n\n * 400 ManagementServiceStopManagedInstanceFeatureDisabled - User attempted to use the Stop Azure SQL Managed Instance feature, which is disabled.\n\n * 400 ManagementServiceStopManagedInstanceHostedOnRdfePlatform - Stop executed on the instance that is not running with Feature Wave November 2022\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ManagementServiceStopManagedInstanceAlreadyInProgress - Stop operation submitted for operation that is in stopping/stopped state.\n\n * 409 ManagementServiceStopManagedInstanceConflictingOperation - Stop Azure SQL Managed Instance conflicting operation message.\n\n * 409 ManagementServiceStopManagedInstanceDroppedDuringStop - Stop executed on instance that is in deleting state or removed in the meantime.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." }, diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/StartManagedInstance.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/StartManagedInstance.json index 32b7d63e186b..d9d86a8d77b7 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/StartManagedInstance.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/StartManagedInstance.json @@ -6,6 +6,48 @@ "api-version": "2022-11-01-preview" }, "responses": { + "200": { + "body": { + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "capacity": 8, + "family": "Gen5" + }, + "properties": { + "fullyQualifiedDomainName": "mitostart.1234567891234.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/startrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state": "Ready", + "provisioningState": "Succeeded", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "LicenseIncluded", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "proxyOverride": "Default", + "minimalTlsVersion": "1.2", + "dnsZone": "1234567891234", + "instancePoolId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/startrg/providers/Microsoft.Sql/instancePools/instancePool1", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1", + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "servicePrincipal": { + "principalId": "00000011-1111-2222-2222-123456789111", + "clientId": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "type": "SystemAssigned" + } + }, + "location": "japaneast", + "tags": { + "key": "value" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/startrg/providers/Microsoft.Sql/managedInstances/mitostart", + "name": "mitostart", + "type": "Microsoft.Sql/managedInstances" + } + }, "202": { "headers": { "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/startrg/providers/Microsoft.Sql/locations/westeurope/startManagedInstanceOperationResults/11111111-1111-1111-1111-111111111111", diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/StopManagedInstance.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/StopManagedInstance.json index 17d7526fe1af..63cf2ff2c937 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/StopManagedInstance.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/StopManagedInstance.json @@ -6,6 +6,48 @@ "api-version": "2022-11-01-preview" }, "responses": { + "200": { + "body": { + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "capacity": 8, + "family": "Gen5" + }, + "properties": { + "fullyQualifiedDomainName": "mitostop.1234567891234.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/stoprg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state": "Stopped", + "provisioningState": "Succeeded", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "LicenseIncluded", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "proxyOverride": "Default", + "minimalTlsVersion": "1.2", + "dnsZone": "1234567891234", + "instancePoolId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/stoprg/providers/Microsoft.Sql/instancePools/instancePool1", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1", + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "servicePrincipal": { + "principalId": "00000011-1111-2222-2222-123456789111", + "clientId": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "type": "SystemAssigned" + } + }, + "location": "japaneast", + "tags": { + "key": "value" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/stoprg/providers/Microsoft.Sql/managedInstances/mitostop", + "name": "mitostop", + "type": "Microsoft.Sql/managedInstances" + } + }, "202": { "headers": { "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/stoprg/providers/Microsoft.Sql/locations/westeurope/stopManagedInstanceOperationResults/11111111-1111-1111-1111-111111111111",