Share via


Managed Instances - List By Resource Group

取得資源群組中的受控實例清單。

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances?api-version=2021-11-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances?$expand={$expand}&api-version=2021-11-01

URI 參數

名稱 位於 必要 類型 Description
resourceGroupName
path True

string

包含資源的資源群組名稱。 您可以從 Azure 資源管理員 API 或入口網站取得這個值。

subscriptionId
path True

string

可識別 Azure 訂用帳戶的訂用帳戶識別碼。

api-version
query True

string

要用於要求的 API 版本。

$expand
query

string

要包含在回應中的子資源。

回應

名稱 類型 Description
200 OK

ManagedInstanceListResult

已成功擷取受控實例的清單。

Other Status Codes

錯誤回應: ≦

  • 400 MiGeoRestoreWithWrongBackupStorageRedundancy - Geo-Restore 不允許使用 LRS/ZRS 備份記憶體備援的受控實例。

  • 400 UpdateingInstanceAndBackupRedundancy - 實例區域備援和備份記憶體備援無法在相同的要求中更新。

  • 400 ProvisioningDisabled - 依原樣顯示來自資源作業授權者的錯誤訊息,而不需變更

  • 400 AadOnlyAuthenticationIsEnabled - 已啟用 Azure Active Directory 僅限驗證。 請連絡您的系統管理員。

  • 400 ManagementServiceFeatureDisabled - 用戶嘗試使用已停用的功能。

  • 404 SubscriptionNotFound - 找不到要求的訂用帳戶。

  • 404 ServerNotInSubscription - 指定的伺服器不存在於指定的訂用帳戶上。

  • 404 ManagedInstanceNotInSubscriptionResourceGroup - 指定的受控實例不存在於指定的資源群組和訂用帳戶中。

  • 404 SubscriptionNotFound - 找不到要求的訂用帳戶。

  • 404 ResourceNotFound - 找不到所要求的資源。

  • 409 ConflictingManagedInstanceOperation - 受控實例目前正在進行作業。

  • 409 BackupRedundancyUpdateAndInstanceRedundancyConflict - 實例為 multi-az,但備份記憶體會從區域備援更新為非區域備援。

  • 409 InstanceRedundancyUpdateWhileBackupRedundancyUpdateInProgress - 無法更新實例備援,因為備份記憶體備援更新正在進行中。

  • 409 InstanceRedundancyUpdateAndBackupRedundancyConflict - 備份記憶體是非區域備援,但實例備援會更新為區域備援。

  • 409 BackupRedundancyUpdateConflict - 無法更新備份記憶體備援,因為備份記憶體備援更新正在進行中。

  • 409 MiDropFailedOnAuthLocks - 用戶嘗試卸除子網中已套用鎖定的資源 () 的最後一個 受控執行個體。

  • 409 MiCreateFailedNonDelegatedSubnet - 使用者嘗試在未委派給 Microsoft.Sql/managedInstances 的子網中部署 受控執行個體 或 受控執行個體 集區。

  • 412 InstanceNotReadyForBackupRedundancyUpdate - 無法更新備份記憶體備援,因為實例尚未就緒。

  • 429 SubscriptionTooManyCreateUpdateRequests - 超出可用資源可處理之最大要求的要求。

  • 429 SubscriptionTooManyRequests - 超出可用資源可處理的最大要求。

  • 429 SubscriptionTooManyCreateUpdateRequests - 超出可用資源可處理之最大要求的要求。

  • 429 SubscriptionTooManyRequests - 超出可用資源可處理的最大要求。

  • 429 ConflictingSubscriptionOperation - 訂用帳戶目前正在進行作業。

  • 503 TooManyRequests - 超出可用資源可處理之最大要求的要求。

  • 503 TooManyRequests - 超出可用資源可處理之最大要求的要求。

  • 504 RequestTimeout - 服務要求超過允許的逾時。

  • 504 RequestTimeout - 服務要求超過允許的逾時。

範例

List managed instances by resource group
List managed instances by resource group with $expand=administrators/activedirectory

List managed instances by resource group

Sample Request

GET https://management.azure.com/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances?api-version=2021-11-01

Sample Response

{
  "value": [
    {
      "location": "japaneast",
      "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testinstance1",
      "name": "testinstance1",
      "type": "Microsoft.Sql/managedInstances",
      "sku": {
        "name": "GP_Gen4",
        "tier": "GeneralPurpose",
        "capacity": 8,
        "family": "Gen4"
      },
      "properties": {
        "fullyQualifiedDomainName": "testinstance1.1b4e2caff2530.database.windows.net",
        "administratorLogin": "dummylogin",
        "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/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": "1b4e2caff2530",
        "maintenanceConfigurationId": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1",
        "currentBackupStorageRedundancy": "Geo",
        "requestedBackupStorageRedundancy": "Geo"
      }
    },
    {
      "location": "japaneast",
      "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testinstance2",
      "name": "testinstance2",
      "type": "Microsoft.Sql/managedInstances",
      "sku": {
        "name": "BC_Gen5",
        "tier": "BusinessCritical",
        "capacity": 16,
        "family": "Gen4"
      },
      "properties": {
        "fullyQualifiedDomainName": "testinstance2.2c3d1bdae3412.database.windows.net",
        "administratorLogin": "dummylogin",
        "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/subnet2",
        "state": "Ready",
        "provisioningState": "Succeeded",
        "vCores": 16,
        "storageSizeInGB": 1024,
        "licenseType": "Full",
        "collation": "SQL_Latin1_General_CP1_CI_AS",
        "publicDataEndpointEnabled": false,
        "proxyOverride": "Default",
        "minimalTlsVersion": "1.2",
        "dnsZone": "2c3d1bdae3412",
        "maintenanceConfigurationId": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1",
        "currentBackupStorageRedundancy": "Geo",
        "requestedBackupStorageRedundancy": "Geo"
      }
    }
  ]
}

List managed instances by resource group with $expand=administrators/activedirectory

Sample Request

GET https://management.azure.com/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances?api-version=2021-11-01

Sample Response

{
  "value": [
    {
      "location": "japaneast",
      "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testinstance1",
      "name": "testinstance1",
      "type": "Microsoft.Sql/managedInstances",
      "sku": {
        "name": "GP_Gen4",
        "tier": "GeneralPurpose",
        "capacity": 8,
        "family": "Gen4"
      },
      "properties": {
        "fullyQualifiedDomainName": "testinstance1.1b4e2caff2530.database.windows.net",
        "administratorLogin": "dummylogin",
        "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/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": "1b4e2caff2530",
        "maintenanceConfigurationId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1",
        "currentBackupStorageRedundancy": "Geo",
        "requestedBackupStorageRedundancy": "Geo",
        "administrators": {
          "principalType": "User",
          "login": "bob@contoso.com",
          "sid": "00000011-1111-2222-2222-123456789111",
          "tenantId": "00000011-1111-2222-2222-123456789111",
          "azureADOnlyAuthentication": true
        }
      }
    },
    {
      "location": "japaneast",
      "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testinstance2",
      "name": "testinstance2",
      "type": "Microsoft.Sql/managedInstances",
      "sku": {
        "name": "BC_Gen5",
        "tier": "BusinessCritical",
        "capacity": 16,
        "family": "Gen4"
      },
      "properties": {
        "fullyQualifiedDomainName": "testinstance2.2c3d1bdae3412.database.windows.net",
        "administratorLogin": "dummylogin",
        "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/subnet2",
        "state": "Ready",
        "provisioningState": "Succeeded",
        "vCores": 16,
        "storageSizeInGB": 1024,
        "licenseType": "Full",
        "collation": "SQL_Latin1_General_CP1_CI_AS",
        "publicDataEndpointEnabled": false,
        "proxyOverride": "Default",
        "minimalTlsVersion": "1.2",
        "dnsZone": "2c3d1bdae3412",
        "maintenanceConfigurationId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_2",
        "currentBackupStorageRedundancy": "Geo",
        "requestedBackupStorageRedundancy": "Geo",
        "administrators": {
          "principalType": "User",
          "login": "bob@contoso.com",
          "sid": "00000011-1111-2222-2222-123456789111",
          "tenantId": "00000011-1111-2222-2222-123456789111",
          "azureADOnlyAuthentication": true
        }
      }
    }
  ]
}

定義

名稱 Description
AdministratorType

伺服器管理員的類型。

BackupStorageRedundancy

用來儲存此實例備份的記憶體帳戶類型。 選項包括 Local (LocalRedundantStorage) 、Zone (ZoneRedundantStorage) 、Geo (GeoRedundantStorage) 和 GeoZone (GeoZoneRedundantStorage)

IdentityType

識別類型。 將此設定為 『SystemAssigned』,以便自動建立並指派資源的 Azure Active Directory 主體。

ManagedInstance

Azure SQL 受控實例。

ManagedInstanceExternalAdministrator

Active Directory 系統管理員的屬性。

ManagedInstanceLicenseType

授權類型。 可能的值為 『LicenseIncluded』 (一般價格,其中包含新的 SQL 授權) 和 『BasePrice』 (折扣的 AHB 價格,以攜帶您自己的 SQL 授權) 。

ManagedInstanceListResult

受控實例的清單。

ManagedInstancePecProperty

受控實例下的私人端點連線

ManagedInstancePrivateEndpointConnectionProperties

私人端點連線的屬性。

ManagedInstancePrivateEndpointProperty
ManagedInstancePrivateLinkServiceConnectionStateProperty
ManagedInstanceProxyOverride

用於連接到 實例的連接類型。

ManagedServerCreateMode

指定資料庫建立模式。

默認值:建立一般實例。

還原:將一組備份還原至特定時間點,以建立實例。 必須指定 RestorePointInTime 和 SourceManagedInstanceId。

PrincipalType

伺服器管理員的主體類型。

ResourceIdentity

資源的 Azure Active Directory 身分識別設定。

ServicePrincipal

資源的受控實例服務主體組態。

ServicePrincipalType

服務主體類型。

Sku

ARM 資源 SKU。

UserIdentity

資源的 Azure Active Directory 身分識別設定。

AdministratorType

伺服器管理員的類型。

名稱 類型 Description
ActiveDirectory

string

BackupStorageRedundancy

用來儲存此實例備份的記憶體帳戶類型。 選項包括 Local (LocalRedundantStorage) 、Zone (ZoneRedundantStorage) 、Geo (GeoRedundantStorage) 和 GeoZone (GeoZoneRedundantStorage)

名稱 類型 Description
Geo

string

GeoZone

string

Local

string

Zone

string

IdentityType

識別類型。 將此設定為 『SystemAssigned』,以便自動建立並指派資源的 Azure Active Directory 主體。

名稱 類型 Description
None

string

SystemAssigned

string

SystemAssigned,UserAssigned

string

UserAssigned

string

ManagedInstance

Azure SQL 受控實例。

名稱 類型 Description
id

string

資源識別碼。

identity

ResourceIdentity

受控實例的 Azure Active Directory 身分識別。

location

string

資源位置。

name

string

資源名稱。

properties.administratorLogin

string

受控實例的系統管理員用戶名稱。 只有在建立受控實例 (且建立) 時,才能指定。

properties.administratorLoginPassword

string

建立受控實例) 所需的系統管理員登入密碼 (。

properties.administrators

ManagedInstanceExternalAdministrator

伺服器的 Azure Active Directory 系統管理員。

properties.collation

string

受控實例的定序。

properties.currentBackupStorageRedundancy

BackupStorageRedundancy

用來儲存此實例備份的記憶體帳戶類型。 選項包括 Local (LocalRedundantStorage) 、Zone (ZoneRedundantStorage) 、Geo (GeoRedundantStorage) 和 GeoZone (GeoZoneRedundantStorage)

properties.dnsZone

string

受控實例所在的 Dns 區域。

properties.dnsZonePartner

string

建立之後,此受控實例將會共用其 DNS 區域的另一個受控實例的資源識別碼。

properties.fullyQualifiedDomainName

string

受控實例的完整功能變數名稱。

properties.instancePoolId

string

這個受控伺服器所屬之實例集區的標識碼。

properties.keyId

string

要用於加密之金鑰的 CMK URI。

properties.licenseType

ManagedInstanceLicenseType

授權類型。 可能的值為 『LicenseIncluded』 (一般價格,其中包含新的 SQL 授權) 和 『BasePrice』 (折扣的 AHB 價格,以攜帶您自己的 SQL 授權) 。

properties.maintenanceConfigurationId

string

指定要套用至此受控實例的維護組態標識碼。

properties.managedInstanceCreateMode

ManagedServerCreateMode

指定資料庫建立模式。

默認值:建立一般實例。

還原:將一組備份還原至特定時間點,以建立實例。 必須指定 RestorePointInTime 和 SourceManagedInstanceId。

properties.minimalTlsVersion

string

最低 TLS 版本。 允許的值:'None'、'1.0'、'1.1'、'1.2'

properties.primaryUserAssignedIdentityId

string

預設會使用之使用者指派身分識別的資源標識碼。

properties.privateEndpointConnections

ManagedInstancePecProperty[]

受控實例上的私人端點連線清單。

properties.provisioningState enum:
  • Accepted
  • Canceled
  • Created
  • Creating
  • Deleted
  • Deleting
  • Failed
  • NotSpecified
  • Registering
  • Running
  • Succeeded
  • TimedOut
  • Unknown
  • Unrecognized
  • Updating
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.storageSizeInGB

integer

以 GB 為單位的記憶體大小。 最小值:32。 最大值:16384。 僅允許 32 GB 的增量。 最大值取決於選取的硬體系列和虛擬核心數目。

properties.subnetId

string

受控實例的子網資源標識碼。

properties.timezoneId

string

時區的標識碼。 允許的值是 Windows 支援的時區。 Windows 會保留支援時區的詳細數據,包括登錄中KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones 中的標識符。 您可以藉由查詢 SELECT 名稱 AS timezone_id FROM sys.time_zone_info,透過 SQL Server 取得這些登錄值。 您也可以在 PowerShell 中執行 [System.TimeZoneInfo]::GetSystemTimeZones () 來取得標識符列表。 有效時區標識碼的範例是 「Pacific Standard Time」 或 「W」。 歐洲標準時間」。

properties.vCores

integer

虛擬核心的數目。 允許的值:8、16、24、32、40、64、80。

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

資源類型。

ManagedInstanceExternalAdministrator

Active Directory 系統管理員的屬性。

名稱 類型 Description
administratorType

AdministratorType

伺服器管理員的類型。

azureADOnlyAuthentication

boolean

僅啟用 Azure Active Directory 驗證。

login

string

伺服器管理員的登入名稱。

principalType

PrincipalType

伺服器管理員的主體類型。

sid

string

伺服器管理員) SID (物件識別碼。

tenantId

string

系統管理員的租用戶標識碼。

ManagedInstanceLicenseType

授權類型。 可能的值為 『LicenseIncluded』 (一般價格,其中包含新的 SQL 授權) 和 『BasePrice』 (折扣的 AHB 價格,以攜帶您自己的 SQL 授權) 。

名稱 類型 Description
BasePrice

string

LicenseIncluded

string

ManagedInstanceListResult

受控實例的清單。

名稱 類型 Description
nextLink

string

連結以擷取下一頁的結果。

value

ManagedInstance[]

結果陣列。

ManagedInstancePecProperty

受控實例下的私人端點連線

名稱 類型 Description
id

string

資源識別碼。

properties

ManagedInstancePrivateEndpointConnectionProperties

私人端點連線屬性

ManagedInstancePrivateEndpointConnectionProperties

私人端點連線的屬性。

名稱 類型 Description
privateEndpoint

ManagedInstancePrivateEndpointProperty

線上所屬的私人端點。

privateLinkServiceConnectionState

ManagedInstancePrivateLinkServiceConnectionStateProperty

私人端點連線的連線狀態。

provisioningState

string

私人端點連線的狀態。

ManagedInstancePrivateEndpointProperty

名稱 類型 Description
id

string

私人端點的資源標識碼。

ManagedInstancePrivateLinkServiceConnectionStateProperty

名稱 類型 Description
actionsRequired

string

私人鏈接服務連線描述。

description

string

私人鏈接服務連線描述。

status

string

私人鏈接服務連線狀態。

ManagedInstanceProxyOverride

用於連接到 實例的連接類型。

名稱 類型 Description
Default

string

Proxy

string

Redirect

string

ManagedServerCreateMode

指定資料庫建立模式。

默認值:建立一般實例。

還原:將一組備份還原至特定時間點,以建立實例。 必須指定 RestorePointInTime 和 SourceManagedInstanceId。

名稱 類型 Description
Default

string

PointInTimeRestore

string

PrincipalType

伺服器管理員的主體類型。

名稱 類型 Description
Application

string

Group

string

User

string

ResourceIdentity

資源的 Azure Active Directory 身分識別設定。

名稱 類型 Description
principalId

string

Azure Active Directory 主體標識符。

tenantId

string

Azure Active Directory 租用戶標識符。

type

IdentityType

識別類型。 將此設定為 『SystemAssigned』,以便自動建立並指派資源的 Azure Active Directory 主體。

userAssignedIdentities

<string,  UserIdentity>

要使用的使用者指派身分識別的資源標識碼

ServicePrincipal

資源的受控實例服務主體組態。

名稱 類型 Description
clientId

string

Azure Active Directory 應用程式用戶端標識碼。

principalId

string

Azure Active Directory 應用程式對象識別碼。

tenantId

string

Azure Active Directory 租用戶標識符。

type

ServicePrincipalType

服務主體類型。

ServicePrincipalType

服務主體類型。

名稱 類型 Description
None

string

SystemAssigned

string

Sku

ARM 資源 SKU。

名稱 類型 Description
capacity

integer

特定 SKU 的容量。

family

string

如果服務有不同層代的硬體,則針對相同的SKU,則可以在這裡擷取。

name

string

SKU 的名稱,通常是字母 + 數字代碼,例如 P3。

size

string

特定 SKU 的大小

tier

string

特定 SKU 的層級或版本,例如基本、進階。

UserIdentity

資源的 Azure Active Directory 身分識別設定。

名稱 類型 Description
clientId

string

Azure Active Directory 用戶端標識符。

principalId

string

Azure Active Directory 主體標識符。