Targets - List

取得擴充追蹤區域資源的目標資源清單。

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets?api-version=2025-01-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets?api-version=2025-01-01&continuationToken={continuationToken}

URI 參數

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

string

maxLength: 63
pattern: ^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$

父資源提供者命名空間。

parentResourceName
path True

string

maxLength: 63
pattern: ^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$

父資源名稱。

parentResourceType
path True

string

maxLength: 63
pattern: ^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$

父資源類型。

resourceGroupName
path True

string

minLength: 1
maxLength: 90

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

subscriptionId
path True

string (uuid)

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

api-version
query True

string

minLength: 1

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

continuationToken
query

string

設定接續令牌的字串。

回應

名稱 類型 Description
200 OK

TargetListResult

要求已成功。

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 模擬您的用戶帳戶

範例

List all Targets that extend a virtual machine resource.

範例要求

GET https://management.azure.com/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets?api-version=2025-01-01&continuationToken=

範例回覆

{
  "nextLink": "https://management.azure.com/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets?continuationToken=&api-version=2024-11-01-preview",
  "value": [
    {
      "name": "Microsoft-Agent",
      "type": "Microsoft.Chaos/targets",
      "id": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets/Microsoft-Agent",
      "location": "centraluseuap",
      "properties": {
        "agentProfileId": "ac4e8251-fdc9-4277-8e87-dc57fe5794cf",
        "identities": [
          {
            "type": "CertificateSubjectIssuer",
            "subject": "CN=example.subject"
          }
        ]
      },
      "systemData": {
        "createdAt": "2021-07-01T00:00:00.0Z",
        "lastModifiedAt": "2021-07-01T00:00:00.0Z"
      }
    }
  ]
}

定義

名稱 Description
createdByType

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

ErrorAdditionalInfo

資源管理錯誤其他資訊。

ErrorDetail

錯誤詳細數據。

ErrorResponse

錯誤回應

systemData

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

Target

代表目標資源的模型。

TargetListResult

模型,代表目標資源清單和分頁的連結。

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 物件。

systemData

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

名稱 類型 Description
createdAt

string (date-time)

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

createdBy

string

建立資源的身分識別。

createdByType

createdByType

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

lastModifiedAt

string (date-time)

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

lastModifiedBy

string

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

lastModifiedByType

createdByType

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

Target

代表目標資源的模型。

名稱 類型 Description
id

string (arm-id)

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

location

string

Azure 資源位置。

name

string

資源的名稱

systemData

systemData

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

type

string

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

TargetListResult

模型,代表目標資源清單和分頁的連結。

名稱 類型 Description
nextLink

string (uri)

專案下一頁的連結

value

Target[]

此頁面上的目標專案