共用方式為


Logger - List By Service

列出指定服務實例中的記錄器集合。

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers?api-version=2024-05-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers?$filter={$filter}&$top={$top}&$skip={$skip}&api-version=2024-05-01

URI 參數

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

string

minLength: 1
maxLength: 90

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

serviceName
path True

string

minLength: 1
maxLength: 50
pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$

API 管理服務的名稱。

subscriptionId
path True

string (uuid)

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

api-version
query True

string

minLength: 1

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

$filter
query

string

|欄位 |使用量 |支持的運算子 |支援的函式 |
|-------------|-------------|-------------|-------------|
|name |filter |ge, le, eq, ne, gt, lt |substringof、contains、startswith、endswith |
|description |filter |ge, le, eq, ne, gt, lt |substringof、contains、startswith、endswith |
|loggerType |filter |eq | |
|resourceId |filter |ge, le, eq, ne, gt, lt |substringof、contains、startswith、endswith |

$skip
query

integer (int32)

minimum: 0

要略過的記錄數目。

$top
query

integer (int32)

minimum: 1

要傳回的記錄數目。

回應

名稱 類型 Description
200 OK

LoggerCollection

列出Logger實體的集合。

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

範例

ApiManagementListLoggers

範例要求

GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers?api-version=2024-05-01

範例回覆

{
  "value": [
    {
      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/azuremonitor",
      "type": "Microsoft.ApiManagement/service/loggers",
      "name": "azuremonitor",
      "properties": {
        "loggerType": "azureMonitor",
        "isBuffered": true
      }
    },
    {
      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/vvktest",
      "type": "Microsoft.ApiManagement/service/loggers",
      "name": "vvktest",
      "properties": {
        "loggerType": "applicationInsights",
        "credentials": {
          "instrumentationKey": "{{Logger-Credentials-5b1a17ef2b3f91153004b10d}}"
        },
        "isBuffered": true
      }
    },
    {
      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/applicationinsights",
      "type": "Microsoft.ApiManagement/service/loggers",
      "name": "applicationinsights",
      "properties": {
        "loggerType": "applicationInsights",
        "description": "miaoappinsight",
        "credentials": {
          "instrumentationKey": "{{Logger-Credentials-5b2056062b3f911ae84a3069}}"
        },
        "isBuffered": true
      }
    }
  ],
  "count": 3,
  "nextLink": ""
}

定義

名稱 Description
ErrorAdditionalInfo

資源管理錯誤其他資訊。

ErrorDetail

錯誤詳細數據。

ErrorResponse

錯誤回應

LoggerCollection

分頁記錄器清單表示。

LoggerContract

記錄器詳細數據。

LoggerType

記錄器類型。

ErrorAdditionalInfo

資源管理錯誤其他資訊。

名稱 類型 Description
info

object

其他資訊。

type

string

其他信息類型。

ErrorDetail

錯誤詳細數據。

名稱 類型 Description
additionalInfo

ErrorAdditionalInfo[]

錯誤其他資訊。

code

string

錯誤碼。

details

ErrorDetail[]

錯誤詳細數據。

message

string

錯誤訊息。

target

string

錯誤目標。

ErrorResponse

錯誤回應

名稱 類型 Description
error

ErrorDetail

error 物件。

LoggerCollection

分頁記錄器清單表示。

名稱 類型 Description
count

integer (int64)

所有頁面的總記錄計數數目。

nextLink

string

如果有的話,下一頁連結。

value

LoggerContract[]

記錄器值。

LoggerContract

記錄器詳細數據。

名稱 類型 Description
id

string

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

name

string

資源的名稱

properties.credentials

object

azureEventHub 記錄器事件中樞的名稱和 SendRule 連接字串。 applicationInsights 記錄器檢測密鑰。

properties.description

string

maxLength: 256

記錄器描述。

properties.isBuffered

boolean

在發佈之前,記錄是否會在記錄器中緩衝處理。 默認值假設為 true。

properties.loggerType

LoggerType

記錄器類型。

properties.resourceId

string

記錄目標的 Azure 資源識別碼(Azure 事件中樞資源或 Azure Application Insights 資源)。

type

string

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

LoggerType

記錄器類型。

Description
applicationInsights

Azure Application Insights 作為記錄目的地。

azureEventHub

Azure 事件中樞作為記錄目的地。

azureMonitor

Azure 監視器