Targets - List By Watcher

依監看員列出目標資源

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/targets?api-version=2025-01-02

URI 參數

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

string

minLength: 1
maxLength: 90

資源群組的名稱。 名稱不區分大小寫。

subscriptionId
path True

string (uuid)

目標訂用帳戶的標識碼。 此值必須是 UUID。

watcherName
path True

string

pattern: ^[a-zA-Z0-9]{1}[a-zA-Z0-9-_]{3,60}$

資料庫監看員名稱。

api-version
query True

string

minLength: 1

要用於這項作業的 API 版本。

回應

名稱 類型 Description
200 OK

TargetListResult

Azure 作業已順利完成。

Other Status Codes

ErrorResponse

未預期的錯誤回應。

安全性

azure_auth

Azure Active Directory OAuth2 Flow。

類型: oauth2
Flow: implicit
授權 URL: https://login.microsoftonline.com/common/oauth2/authorize

範圍

名稱 Description
user_impersonation 模擬您的用戶帳戶

範例

Targets_ListByWatcher_MaximumSet

範例要求

GET https://management.azure.com/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest-ddat4p/providers/Microsoft.DatabaseWatcher/watchers/databasemo3ej9ih/targets?api-version=2025-01-02

範例回覆

{
  "value": [
    {
      "id": "/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest-px9ma7/providers/Microsoft.DatabaseWatcher/watchers/databasemo3d9sgt/targets/monitoringzkndgm",
      "name": "monitoringzkndgm",
      "type": "microsoft.databasewatcher/watchers/targets",
      "properties": {
        "targetType": "SqlDb",
        "targetAuthenticationType": "Aad",
        "connectionServerName": "sqlServero1ihe2",
        "sqlDbResourceId": "/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest-ddat4p/providers/Microsoft.Sql/servers/m1/databases/m2",
        "provisioningState": "Succeeded"
      },
      "systemData": {
        "createdBy": "enbpvlpqbwd",
        "createdByType": "User",
        "createdAt": "2024-07-25T15:38:47.092Z",
        "lastModifiedBy": "mxp",
        "lastModifiedByType": "User",
        "lastModifiedAt": "2024-07-25T15:38:47.092Z"
      }
    }
  ],
  "nextLink": "https://microsoft.com/a"
}

定義

名稱 Description
createdByType

建立資源的身分識別類型。

ErrorAdditionalInfo

資源管理錯誤其他資訊。

ErrorDetail

錯誤詳細數據。

ErrorResponse

錯誤回應

ResourceProvisioningState

警示規則資源的布建狀態。

SqlDbElasticPoolTargetProperties

Azure SQL 資料庫中彈性集區特有的屬性。

SqlDbSingleDatabaseTargetProperties

Azure SQL 資料庫中資料庫特有的屬性。

SqlMiTargetProperties

Azure SQL 受控執行個體目標特有的屬性。

systemData

與建立和上次修改資源相關的元數據。

Target

您可以使用特定屬性類型來建立具象 Proxy 資源類型。

TargetAuthenticationType

連接到目標時要使用的驗證類型。

TargetListResult

目標清單作業的回應。

VaultSecret

如果使用 SQL 驗證連線到目標,則需要保存庫特定詳細數據。

createdByType

建立資源的身分識別類型。

Description
User
Application
ManagedIdentity
Key

ErrorAdditionalInfo

資源管理錯誤其他資訊。

名稱 類型 Description
info

object

其他資訊。

type

string

其他信息類型。

ErrorDetail

錯誤詳細數據。

名稱 類型 Description
additionalInfo

ErrorAdditionalInfo[]

錯誤其他資訊。

code

string

錯誤碼。

details

ErrorDetail[]

錯誤詳細數據。

message

string

錯誤訊息。

target

string

錯誤目標。

ErrorResponse

錯誤回應

名稱 類型 Description
error

ErrorDetail

error 物件。

ResourceProvisioningState

警示規則資源的布建狀態。

Description
Succeeded

已建立資源。

Failed

資源建立失敗。

Canceled

已取消資源建立。

SqlDbElasticPoolTargetProperties

Azure SQL 資料庫中彈性集區特有的屬性。

名稱 類型 預設值 Description
anchorDatabaseResourceId

string (arm-id)

用來連線到彈性集區的錨點資料庫的 Azure 資源識別碼。

connectionServerName

string

maxLength: 200

連接到目標時,要用於連接字串之伺服器的 FQDN 主機名。 例如,針對 Azure 商業雲端中的 Azure SQL 邏輯伺服器,此值可能是 「sql-logical-server-22092780.database.windows.net」;針對 Azure 商業雲端中的 Azure SQL 受控實例,此值可能是 「sql-mi-39441134.767d5869f605.database.windows.net」。 必須個別指定埠號碼和實例名稱。

provisioningState

ResourceProvisioningState

資源的布建狀態。

readIntent

boolean

False

設定為 true 以監視指定目標的高可用性複本,如果有的話。

sqlEpResourceId

string (arm-id)

Azure SQL DB 彈性集區目標的 Azure 資源識別碼。

targetAuthenticationType

TargetAuthenticationType

連接到目標時要使用的驗證類型。

targetType string:

SqlEp

TargetProperties 的歧視性屬性。

targetVault

VaultSecret

若要在連線到目標時使用 SQL 驗證,請指定儲存登入名稱和密碼秘密的保存庫。

SqlDbSingleDatabaseTargetProperties

Azure SQL 資料庫中資料庫特有的屬性。

名稱 類型 預設值 Description
connectionServerName

string

maxLength: 200

連接到目標時,要用於連接字串之伺服器的 FQDN 主機名。 例如,針對 Azure 商業雲端中的 Azure SQL 邏輯伺服器,此值可能是 「sql-logical-server-22092780.database.windows.net」;針對 Azure 商業雲端中的 Azure SQL 受控實例,此值可能是 「sql-mi-39441134.767d5869f605.database.windows.net」。 必須個別指定埠號碼和實例名稱。

provisioningState

ResourceProvisioningState

資源的布建狀態。

readIntent

boolean

False

設定為 true 以監視指定目標的高可用性複本,如果有的話。

sqlDbResourceId

string (arm-id)

Azure SQL DB 資料庫目標的 Azure 資源識別碼。

targetAuthenticationType

TargetAuthenticationType

連接到目標時要使用的驗證類型。

targetType string:

SqlDb

TargetProperties 的歧視性屬性。

targetVault

VaultSecret

若要在連線到目標時使用 SQL 驗證,請指定儲存登入名稱和密碼秘密的保存庫。

SqlMiTargetProperties

Azure SQL 受控執行個體目標特有的屬性。

名稱 類型 預設值 Description
connectionServerName

string

maxLength: 200

連接到目標時,要用於連接字串之伺服器的 FQDN 主機名。 例如,針對 Azure 商業雲端中的 Azure SQL 邏輯伺服器,此值可能是 「sql-logical-server-22092780.database.windows.net」;針對 Azure 商業雲端中的 Azure SQL 受控實例,此值可能是 「sql-mi-39441134.767d5869f605.database.windows.net」。 必須個別指定埠號碼和實例名稱。

connectionTcpPort

integer (int32)

1433

連接到 Azure SQL 受控實例目標時,在連接字串中選擇性使用的 TCP 連接埠號碼。

provisioningState

ResourceProvisioningState

資源的布建狀態。

readIntent

boolean

False

設定為 true 以監視指定目標的高可用性複本,如果有的話。

sqlMiResourceId

string (arm-id)

Azure SQL 受控實例目標的 Azure 資源識別碼。

targetAuthenticationType

TargetAuthenticationType

連接到目標時要使用的驗證類型。

targetType string:

SqlMi

TargetProperties 的歧視性屬性。

targetVault

VaultSecret

若要在連線到目標時使用 SQL 驗證,請指定儲存登入名稱和密碼秘密的保存庫。

systemData

與建立和上次修改資源相關的元數據。

名稱 類型 Description
createdAt

string (date-time)

資源建立的時間戳(UTC)。

createdBy

string

建立資源的身分識別。

createdByType

createdByType

建立資源的身分識別類型。

lastModifiedAt

string (date-time)

上次修改的資源時間戳 (UTC)

lastModifiedBy

string

上次修改資源的身分識別。

lastModifiedByType

createdByType

上次修改資源的身分識別類型。

Target

您可以使用特定屬性類型來建立具象 Proxy 資源類型。

名稱 類型 Description
id

string (arm-id)

資源的完整資源標識碼。 例如 “/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}”

name

string

資源的名稱

properties TargetProperties:

此資源的資源特定屬性。

systemData

systemData

包含 createdBy 和 modifiedBy 資訊的 Azure Resource Manager 元數據。

type

string

資源的型別。 例如“Microsoft.Compute/virtualMachines” 或 “Microsoft.Storage/storageAccounts”

TargetAuthenticationType

連接到目標時要使用的驗證類型。

Description
Aad

Azure Active Directory 驗證。

Sql

SQL 密碼驗證。

TargetListResult

目標清單作業的回應。

名稱 類型 Description
nextLink

string (uri)

專案下一頁的連結

value

Target[]

此頁面上的目標專案

VaultSecret

如果使用 SQL 驗證連線到目標,則需要保存庫特定詳細數據。

名稱 類型 Description
akvResourceId

string (arm-id)

儲存資料庫驗證秘密之 Key Vault 實例的 Azure 資源識別碼。

akvTargetPassword

string

pattern: ^[a-zA-Z0-9-]{1,127}$

儲存密碼以向目標驗證的 Key Vault 秘密路徑。

akvTargetUser

string

pattern: ^[a-zA-Z0-9-]{1,127}$

儲存登入名稱(也稱為用戶名稱,也稱為帳戶名稱)的Key Vault秘密路徑,以向目標進行驗證。