共用方式為


Log Profiles - Get

取得記錄配置檔。

GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles/{logProfileName}?api-version=2016-03-01

URI 參數

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

string

記錄檔配置檔的名稱。

subscriptionId
path True

string

目標訂用帳戶的標識碼。

api-version
query True

string

用於此作業的 API 版本。

回應

名稱 類型 Description
200 OK

LogProfileResource

成功要求以取得記錄配置檔的詳細資訊。

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

範例

Get log profile

範例要求

GET https://management.azure.com/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/providers/Microsoft.Insights/logprofiles/default?api-version=2016-03-01

範例回覆

{
  "id": "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/providers/microsoft.insights/logprofiles/default",
  "type": "",
  "name": "default",
  "location": "",
  "tags": null,
  "properties": {
    "storageAccountId": "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/JohnKemTest/providers/Microsoft.Storage/storageAccounts/johnkemtest8162",
    "serviceBusRuleId": "",
    "locations": [
      "global"
    ],
    "categories": [
      "Delete",
      "Write",
      "Action"
    ],
    "retentionPolicy": {
      "enabled": true,
      "days": 3
    }
  }
}

定義

名稱 Description
ErrorResponse

描述錯誤回應的格式。

LogProfileResource

記錄配置檔資源。

RetentionPolicy

指定記錄的保留原則。

ErrorResponse

描述錯誤回應的格式。

名稱 類型 Description
code

string

錯誤碼

message

string

錯誤訊息,指出作業失敗的原因。

LogProfileResource

記錄配置檔資源。

名稱 類型 Description
id

string

Azure 資源標識碼

location

string

資源位置

name

string

Azure 資源名稱

properties.categories

string[]

記錄的類別。 這些類別會建立為方便使用者。 某些值包括:『Write』、『Delete』 和/或 'Action'。

properties.locations

string[]

應儲存或串流活動記錄事件的區域清單。 這是有效 ARM 位置的逗號分隔清單,包括「全域」位置。

properties.retentionPolicy

RetentionPolicy

記錄中事件的保留原則。

properties.serviceBusRuleId

string

您想要在其中建立事件中樞來串流活動記錄之服務總線命名空間的服務總線規則標識碼。 規則標識碼的格式為:『{服務總線資源標識符}/authorizationrules/{key name}』。

properties.storageAccountId

string

您想要傳送活動記錄之記憶體帳戶的資源識別碼。

tags

object

資源標籤

type

string

Azure 資源類型

RetentionPolicy

指定記錄的保留原則。

名稱 類型 Description
days

integer

保留天數的天數。 值為 0 會無限期地保留事件。

enabled

boolean

值,指出是否啟用保留原則。