你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Managed Instances - Stop

停止托管实例。

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/stop?api-version=2023-08-01-preview

URI 参数

名称 必需 类型 说明
managedInstanceName
path True

string

托管实例的名称。

resourceGroupName
path True

string

包含该资源的资源组名称。 可以从 Azure 资源管理器 API 或门户获取此值。

subscriptionId
path True

string

用于标识 Azure 订阅的订阅 ID。

api-version
query True

string

要用于请求的 API 版本。

响应

名称 类型 说明
200 OK

ManagedInstance

已成功停止托管实例。

202 Accepted

正在停止托管实例。

Other Status Codes

ErrorResponse

错误响应:***

  • 400 ManagementServiceStopManagedInstanceZoneRedundant - 在启用了区域冗余的实例上停止执行。

  • 400 ManagementServiceStopManagedInstancePartOfFailoverGroup - 停止在属于故障转移组的实例上执行。

  • 400 NameAlreadyExists - 提供的名称已存在。

  • 400 ManagementServiceStartStopManagedInstanceSubscriptionNotEnabledForFeature - 用户尝试使用“启动/停止”功能,但未将订阅列入相应订阅功能的允许列表。

  • 400 ManagementServiceStopManagedInstanceNotSupportedOnSKU - 给定 SKU 不支持停止操作。

  • 400 InvalidServerName - 指定的服务器名称无效。

  • 400 StartStopOfManagedInstanceIsDisabled - 未启用托管实例上的启动和停止操作。

  • 400 InvalidIdentifier - 标识符包含 NULL 或无效的 unicode 字符。

  • 400 ManagementServiceStopManagedInstanceUsingMILink - 停止在配置了托管实例链接的实例上执行。

  • 400 ManagementServiceStopManagedInstanceFeatureDisabled - 用户尝试使用已禁用的停止Azure SQL 托管实例功能。

  • 400 ManagementServiceStopManagedInstanceHostedOnRdfePlatform - 停止在未使用 Feature Wave 2022 年 11 月运行的实例上执行

  • 404 ServerNotInSubscriptionResourceGroup - 指定的服务器不存在于指定的资源组和订阅中。

  • 404 SubscriptionDoesNotHaveServer - 找不到请求的服务器

  • 404 OperationIdNotFound - ID 为 的操作不存在。

  • 404 ResourceNotFound - 找不到请求的资源。

  • 404 OperationIdNotFound - ID 为 的操作不存在。

  • 409 ManagementServiceStopManagedInstanceAlreadyInProgress - 为处于停止/停止状态的操作提交的停止操作。

  • 409 ManagementServiceStopManagedInstanceConflictingOperation - 停止Azure SQL 托管实例冲突操作消息。

  • 409 ManagementServiceStopManagedInstanceDroppedDuringStop - 停止在处于删除状态或同时被删除的实例上执行。

  • 409 SubscriptionDisabled - 订阅已禁用。

  • 409 CannotCancelOperation - 管理操作处于无法取消的状态。

  • 409 OperationCancelled - 用户已取消操作。

  • 409 操作中断 - 无法完成对资源的操作,因为同一资源上的另一个操作中断了该操作。

  • 429 SubscriptionTooManyCreateUpdateRequests - 请求数超出可用资源可以处理的最大请求数。

  • 429 SubscriptionTooManyRequests - 请求数超出可用资源可以处理的最大请求数。

  • 500 OperationTimedOut - 操作超时并自动回滚。 请重试该操作。

  • 503 TooManyRequests - 请求数超出可用资源可以处理的最大请求数。

示例

Stops the managed instance.

Sample Request

POST https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/stoprg/providers/Microsoft.Sql/managedInstances/mitostop/stop?api-version=2023-08-01-preview

Sample Response

{
  "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"
    },
    "externalGovernanceStatus": "Enabled",
    "hybridSecondaryUsage": "Passive",
    "authenticationMetadata": "Windows",
    "databaseFormat": "SQLServer2022"
  },
  "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"
}
Location: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/stoprg/providers/Microsoft.Sql/locations/westeurope/stopManagedInstanceOperationResults/11111111-1111-1111-1111-111111111111
Azure-AsyncOperation: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/stoprg/providers/Microsoft.Sql/locations/westeurope/stopManagedInstanceAzureAsyncOperation/11111111-1111-1111-1111-111111111111

定义

名称 说明
AdministratorType

服务器管理员的类型。

AuthMetadataLookupModes

托管实例的身份验证元数据查找模式。

BackupStorageRedundancy

用于存储此实例的备份的存储帐户类型。 选项包括 Local (LocalRedundantStorage) 、Zone (ZoneRedundantStorage) 、Geo (GeoRedundantStorage) 和 GeoZone (GeoZoneRedundantStorage)

ErrorAdditionalInfo

资源管理错误附加信息。

ErrorDetail

错误详细信息。

ErrorResponse

错误响应

ExternalGovernanceStatus

外部治理的状态。

FreemiumType

天气与否托管实例免费。

HybridSecondaryUsage

混合辅助数据库使用情况。 可能的值为“Active” (默认值) 和“Passive”, (客户将辅助数据库用作被动 DR) 。

HybridSecondaryUsageDetected

检测到混合辅助数据库使用情况。 可能的值为“主动” (客户不满足将辅助数据库用作被动 DR) 的要求,而“被动” (客户满足将辅助数据库用作被动 DR) 的要求。

IdentityType

标识类型。 将其设置为“SystemAssigned”,以便自动为资源创建和分配 Azure Active Directory 主体。

ManagedInstance

Azure SQL托管实例。

ManagedInstanceDatabaseFormat

指定特定于 SQL 引擎版本的实例数据库的内部格式。

ManagedInstanceExternalAdministrator

Active Directory 管理员的属性。

ManagedInstanceLicenseType

许可证类型。 可能的值为“LicenseIncluded” (包含新 SQL 许可证) 的常规价格,“BasePrice” (将自己的 SQL 许可证) 的折扣 AHB 价格。

ManagedInstancePecProperty

托管实例下的专用终结点连接

ManagedInstancePrivateEndpointConnectionProperties

专用终结点连接的属性。

ManagedInstancePrivateEndpointProperty
ManagedInstancePrivateLinkServiceConnectionStateProperty
ManagedInstanceProxyOverride

用于连接到实例的连接类型。

ManagedServerCreateMode

指定数据库创建模式。

默认值:定期创建实例。

还原:通过将一组备份还原到特定时间点来创建实例。 必须指定 RestorePointInTime 和 SourceManagedInstanceId。

PrincipalType

服务器管理员的主体类型。

ProvisioningState

托管实例的预配状态。

ResourceIdentity

资源的 Azure Active Directory 标识配置。

ServicePrincipal

资源的托管实例的服务主体配置。

ServicePrincipalType

服务主体类型。

Sku

ARM 资源 SKU。

UserIdentity

资源的 Azure Active Directory 标识配置。

AdministratorType

服务器管理员的类型。

名称 类型 说明
ActiveDirectory

string

AuthMetadataLookupModes

托管实例的身份验证元数据查找模式。

名称 类型 说明
AzureAD

string

Paired

string

Windows

string

BackupStorageRedundancy

用于存储此实例的备份的存储帐户类型。 选项包括 Local (LocalRedundantStorage) 、Zone (ZoneRedundantStorage) 、Geo (GeoRedundantStorage) 和 GeoZone (GeoZoneRedundantStorage)

名称 类型 说明
Geo

string

GeoZone

string

Local

string

Zone

string

ErrorAdditionalInfo

资源管理错误附加信息。

名称 类型 说明
info

object

其他信息。

type

string

其他信息类型。

ErrorDetail

错误详细信息。

名称 类型 说明
additionalInfo

ErrorAdditionalInfo[]

错误附加信息。

code

string

错误代码。

details

ErrorDetail[]

错误详细信息。

message

string

错误消息。

target

string

错误目标。

ErrorResponse

错误响应

名称 类型 说明
error

ErrorDetail

错误对象。

ExternalGovernanceStatus

外部治理的状态。

名称 类型 说明
Disabled

string

Enabled

string

FreemiumType

天气与否托管实例免费。

名称 类型 说明
Freemium

string

Regular

string

HybridSecondaryUsage

混合辅助数据库使用情况。 可能的值为“Active” (默认值) 和“Passive”, (客户将辅助数据库用作被动 DR) 。

名称 类型 说明
Active

string

Passive

string

HybridSecondaryUsageDetected

检测到混合辅助数据库使用情况。 可能的值为“主动” (客户不满足将辅助数据库用作被动 DR) 的要求,而“被动” (客户满足将辅助数据库用作被动 DR) 的要求。

名称 类型 说明
Active

string

Passive

string

IdentityType

标识类型。 将其设置为“SystemAssigned”,以便自动为资源创建和分配 Azure Active Directory 主体。

名称 类型 说明
None

string

SystemAssigned

string

SystemAssigned,UserAssigned

string

UserAssigned

string

ManagedInstance

Azure SQL托管实例。

名称 类型 说明
id

string

资源 ID。

identity

ResourceIdentity

托管实例的 Azure Active Directory 标识。

location

string

资源位置。

name

string

资源名称。

properties.administratorLogin

string

托管实例的管理员用户名。 仅当 (创建托管实例并且需要创建) 时,才能指定。

properties.administratorLoginPassword

string

创建托管实例 () 所需的管理员登录密码。

properties.administrators

ManagedInstanceExternalAdministrator

实例的 Azure Active Directory 管理员。 这只能在创建实例时使用。 如果使用实例更新,则会忽略它,否则将导致错误。 对于更新,需要使用单个 API。

properties.authenticationMetadata

AuthMetadataLookupModes

托管实例的身份验证元数据查找模式。

properties.collation

string

托管实例的排序规则。

properties.createTime

string

指定创建托管实例的时间点 (ISO8601 格式) 。

properties.currentBackupStorageRedundancy

BackupStorageRedundancy

用于存储此实例备份的存储帐户类型。 选项包括 Local (LocalRedundantStorage) 、Zone (ZoneRedundantStorage) 、Geo (GeoRedundantStorage) 和 GeoZone (GeoZoneRedundantStorage)

properties.databaseFormat

ManagedInstanceDatabaseFormat

指定特定于 SQL 引擎版本的实例数据库的内部格式。

properties.dnsZone

string

托管实例位于的 Dns 区域。

properties.dnsZonePartner

string

另一个托管实例的资源 ID,该托管实例在创建后将共享其 DNS 区域。

properties.externalGovernanceStatus

ExternalGovernanceStatus

外部治理的状态。

properties.fullyQualifiedDomainName

string

托管实例的完全限定域名。

properties.hybridSecondaryUsage

HybridSecondaryUsage

混合辅助用法。 可能的值为“Active” (默认值) , (客户将辅助数据库用作被动 DR) 。

properties.hybridSecondaryUsageDetected

HybridSecondaryUsageDetected

检测到混合辅助数据库使用情况。 可能的值为“主动”, (客户不符合将辅助数据库用作被动 DR) 的要求, (客户满足将辅助数据库用作被动 DR) 的要求。

properties.instancePoolId

string

此托管服务器所属的实例池的 ID。

properties.isGeneralPurposeV2

boolean

这是否是 常规用途 版本的 GPv2 变体。

properties.keyId

string

用于加密的密钥的 CMK URI。

properties.licenseType

ManagedInstanceLicenseType

许可证类型。 可能的值为“LicenseIncluded” (包含新 SQL 许可证) 的常规价格,“BasePrice” (将自己的 SQL 许可证) 的折扣 AHB 价格。

properties.maintenanceConfigurationId

string

指定要应用于此托管实例的维护配置 ID。

properties.managedInstanceCreateMode

ManagedServerCreateMode

指定数据库创建模式。

默认值:定期创建实例。

还原:通过将一组备份还原到特定时间点来创建实例。 必须指定 RestorePointInTime 和 SourceManagedInstanceId。

properties.minimalTlsVersion

string

最低 TLS 版本。 允许的值:“None”、“1.0”、“1.1”、“1.2”

properties.pricingModel

FreemiumType

天气与否托管实例是免费的。

properties.primaryUserAssignedIdentityId

string

默认要使用的用户分配标识的资源 ID。

properties.privateEndpointConnections

ManagedInstancePecProperty[]

托管实例上的专用终结点连接列表。

properties.provisioningState

ProvisioningState

托管实例的预配状态。

properties.proxyOverride

ManagedInstanceProxyOverride

用于连接到实例的连接类型。

properties.publicDataEndpointEnabled

boolean

是否启用公共数据终结点。

properties.requestedBackupStorageRedundancy

BackupStorageRedundancy

用于存储此实例备份的存储帐户类型。 选项包括 Local (LocalRedundantStorage) 、Zone (ZoneRedundantStorage) 、Geo (GeoRedundantStorage) 和 GeoZone (GeoZoneRedundantStorage)

properties.restorePointInTime

string

指定要还原以创建新数据库的源数据库的时间点 (ISO8601 格式) 。

properties.servicePrincipal

ServicePrincipal

托管实例的服务主体。

properties.sourceManagedInstanceId

string

与此实例的创建操作关联的源托管实例的资源标识符。

properties.state

string

托管实例的状态。

properties.storageIOps

integer

存储 IOps。 最小值:300。 最大值:80000。 仅允许以 1 个 IOps 为增量。 最大值取决于所选硬件系列和 vCore 数。

properties.storageSizeInGB

integer

存储大小(以 GB 为单位)。 最小值:32。 最大值:16384。 仅允许 32 GB 的增量。 最大值取决于所选硬件系列和 vCore 数。

properties.storageThroughputMBps

integer

实例创建/更新操作不支持存储吞吐量 MBps 参数。

properties.subnetId

string

托管实例的子网资源 ID。

properties.timezoneId

string

时区的 ID。 允许的值是 Windows 支持的时区。 Windows 会在注册表中的 KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zone 下保留有关支持时区(包括 ID)的详细信息。 可以通过查询 SELECT name AS timezone_id FROM sys.time_zone_info,通过 SQL Server 获取这些注册表值。 还可以通过在 PowerShell 中执行 [System.TimeZoneInfo]::GetSystemTimeZones () 来获取 ID 列表。 有效时区 ID 的示例是“太平洋标准时间”或“W”。 欧洲标准时间”。

properties.totalMemoryMB

integer

总内存(以 MB 为单位)。 最小值:7168。 最大值:891328。 仅允许 1 MB 的增量。 最大值取决于所选硬件系列和 vCore 数。

properties.vCores

integer

vCore 数。 允许的值:8、16、24、32、40、64、80。

properties.virtualClusterId

string

托管实例的虚拟群集资源 ID。

properties.zoneRedundant

boolean

是否启用 multi-az。

sku

Sku

托管实例 SKU。 sku.name 允许的值:GP_Gen5、GP_G8IM、GP_G8IH、BC_Gen5、BC_G8IM、BC_G8IH

tags

object

资源标记。

type

string

资源类型。

ManagedInstanceDatabaseFormat

指定特定于 SQL 引擎版本的实例数据库的内部格式。

名称 类型 说明
AlwaysUpToDate

string

SQLServer2022

string

ManagedInstanceExternalAdministrator

Active Directory 管理员的属性。

名称 类型 说明
administratorType

AdministratorType

服务器管理员的类型。

azureADOnlyAuthentication

boolean

已启用“仅限 Azure Active Directory 身份验证”。

login

string

服务器管理员的登录名。

principalType

PrincipalType

服务器管理员的主体类型。

sid

string

SID (服务器管理员的对象 ID) 。

tenantId

string

管理员的租户 ID。

ManagedInstanceLicenseType

许可证类型。 可能的值为“LicenseIncluded” (包含新 SQL 许可证) 的常规价格,“BasePrice” (将自己的 SQL 许可证) 的折扣 AHB 价格。

名称 类型 说明
BasePrice

string

LicenseIncluded

string

ManagedInstancePecProperty

托管实例下的专用终结点连接

名称 类型 说明
id

string

资源 ID。

properties

ManagedInstancePrivateEndpointConnectionProperties

专用终结点连接属性

ManagedInstancePrivateEndpointConnectionProperties

专用终结点连接的属性。

名称 类型 说明
privateEndpoint

ManagedInstancePrivateEndpointProperty

连接所属的专用终结点。

privateLinkServiceConnectionState

ManagedInstancePrivateLinkServiceConnectionStateProperty

专用终结点连接的连接状态。

provisioningState

string

专用终结点连接的状态。

ManagedInstancePrivateEndpointProperty

名称 类型 说明
id

string

专用终结点的资源 ID。

ManagedInstancePrivateLinkServiceConnectionStateProperty

名称 类型 说明
actionsRequired

string

专用链接服务连接说明。

description

string

专用链接服务连接说明。

status

string

专用链接服务连接状态。

ManagedInstanceProxyOverride

用于连接到实例的连接类型。

名称 类型 说明
Default

string

Proxy

string

Redirect

string

ManagedServerCreateMode

指定数据库创建模式。

默认值:定期创建实例。

还原:通过将一组备份还原到特定时间点来创建实例。 必须指定 RestorePointInTime 和 SourceManagedInstanceId。

名称 类型 说明
Default

string

PointInTimeRestore

string

PrincipalType

服务器管理员的主体类型。

名称 类型 说明
Application

string

Group

string

User

string

ProvisioningState

托管实例的预配状态。

名称 类型 说明
Canceled

string

Created

string

Failed

string

InProgress

string

Succeeded

string

ResourceIdentity

资源的 Azure Active Directory 标识配置。

名称 类型 说明
principalId

string

Azure Active Directory 主体 ID。

tenantId

string

Azure Active Directory 租户 ID。

type

IdentityType

标识类型。 将此设置为“SystemAssigned”,以便自动为资源创建和分配 Azure Active Directory 主体。

userAssignedIdentities

<string,  UserIdentity>

要使用的用户分配标识的资源 ID

ServicePrincipal

资源的托管实例的服务主体配置。

名称 类型 说明
clientId

string

Azure Active Directory 应用程序客户端 ID。

principalId

string

Azure Active Directory 应用程序对象 ID。

tenantId

string

Azure Active Directory 租户 ID。

type

ServicePrincipalType

服务主体类型。

ServicePrincipalType

服务主体类型。

名称 类型 说明
None

string

SystemAssigned

string

Sku

ARM 资源 SKU。

名称 类型 说明
capacity

integer

特定 SKU 的容量。

family

string

如果服务具有不同代系的硬件(对于同一 SKU),则可以在此处进行捕获。

name

string

SKU 的名称,通常为字母 + 数字代码,例如 P3。

size

string

特定 SKU 的大小

tier

string

特定 SKU 的层或版本,例如“基本”、“高级”。

UserIdentity

资源的 Azure Active Directory 标识配置。

名称 类型 说明
clientId

string

Azure Active Directory 客户端 ID。

principalId

string

Azure Active Directory 主体 ID。