Diagnostic - List By Service
API Management サービス インスタンスのすべての診断を一覧表示します。
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics?api-version=2022-08-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics?$filter={$filter}&$top={$top}&$skip={$skip}&api-version=2022-08-01
URI パラメーター
名前 | / | 必須 | 型 | 説明 |
---|---|---|---|---|
resource
|
path | True |
string |
リソース グループの名前。 名前の大文字と小文字は区別されます。 |
service
|
path | True |
string |
API Management サービスの名前。 Regex pattern: |
subscription
|
path | True |
string |
ターゲット サブスクリプションの ID。 |
api-version
|
query | True |
string |
この操作に使用する API バージョン。 |
$filter
|
query |
string |
|フィールド |使用法 |サポートされている演算子 |サポートされている関数 | |
|
$skip
|
query |
integer int32 |
スキップするレコードの数。 |
|
$top
|
query |
integer int32 |
返されるレコードの数。 |
応答
名前 | 型 | 説明 |
---|---|---|
200 OK |
診断の Paged Result 応答。 |
|
Other Status Codes |
操作に失敗した理由を説明するエラー応答。 |
セキュリティ
azure_auth
Azure Active Directory OAuth2 フロー。
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
名前 | 説明 |
---|---|
user_impersonation | ユーザー アカウントの借用 |
例
ApiManagementListDiagnostics
Sample Request
GET https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/diagnostics?api-version=2022-08-01
Sample Response
{
"value": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/diagnostics/applicationinsights",
"type": "Microsoft.ApiManagement/service/diagnostics",
"name": "applicationinsights",
"properties": {
"alwaysLog": "allErrors",
"httpCorrelationProtocol": "Legacy",
"verbosity": "information",
"logClientIp": true,
"loggerId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/aisamplingtest",
"sampling": {
"samplingType": "fixed",
"percentage": 100
},
"frontend": {
"request": {
"headers": [],
"body": {
"bytes": 0
}
},
"response": {
"headers": [],
"body": {
"bytes": 0
}
}
},
"backend": {
"request": {
"headers": [],
"body": {
"bytes": 0
}
},
"response": {
"headers": [],
"body": {
"bytes": 0
}
}
}
}
},
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/diagnostics/azuremonitor",
"type": "Microsoft.ApiManagement/service/diagnostics",
"name": "azuremonitor",
"properties": {
"logClientIp": true,
"loggerId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/azuremonitor",
"sampling": {
"samplingType": "fixed",
"percentage": 100
}
}
}
],
"count": 1
}
定義
名前 | 説明 |
---|---|
Always |
適用しないメッセージサンプリング設定の種類を指定します。 |
Body |
本文ログの設定。 |
Data |
|
Data |
|
Data |
データ マスク モード。 |
Diagnostic |
ページ診断リストの表現。 |
Diagnostic |
診断の詳細。 |
Error |
エラー フィールド コントラクト。 |
Error |
エラー応答。 |
Http |
Application Insights 診断に使用する関連付けプロトコルを設定します。 |
Http |
Http メッセージ診断設定。 |
Operation |
Application Insights テレメトリの操作名の形式。 既定値は Name です。 |
Pipeline |
ゲートウェイへの受信/送信 HTTP メッセージの診断設定。 |
Sampling |
診断のサンプリング設定。 |
Sampling |
サンプリングの種類。 |
Verbosity |
トレース ポリシーによって出力されるトレースに適用される詳細レベル。 |
AlwaysLog
適用しないメッセージサンプリング設定の種類を指定します。
名前 | 型 | 説明 |
---|---|---|
allErrors |
string |
サンプリング設定に関係なく、常にすべての誤った要求をログに記録します。 |
BodyDiagnosticSettings
本文ログの設定。
名前 | 型 | 説明 |
---|---|---|
bytes |
integer |
ログに記録する要求本文のバイト数。 |
DataMasking
名前 | 型 | 説明 |
---|---|---|
headers |
ヘッダーのマスク設定 |
|
queryParams |
URL クエリ パラメーターのマスク設定 |
DataMaskingEntity
名前 | 型 | 説明 |
---|---|---|
mode |
データ マスク モード。 |
|
value |
string |
マスクするエンティティの名前 (ヘッダーの名前やクエリ パラメーターなど)。 |
DataMaskingMode
データ マスク モード。
名前 | 型 | 説明 |
---|---|---|
Hide |
string |
エンティティの存在を非表示にします。 |
Mask |
string |
エンティティの値をマスクします。 |
DiagnosticCollection
ページ診断リストの表現。
名前 | 型 | 説明 |
---|---|---|
count |
integer |
すべてのページの合計レコード数。 |
nextLink |
string |
次のページリンク (存在する場合)。 |
value |
ページ値。 |
DiagnosticContract
診断の詳細。
名前 | 型 | 説明 |
---|---|---|
id |
string |
リソースの完全修飾リソース ID。 例 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name |
string |
リソースの名前 |
properties.alwaysLog |
適用しないメッセージサンプリング設定の種類を指定します。 |
|
properties.backend |
バックエンドへの受信/送信 HTTP メッセージの診断設定 |
|
properties.frontend |
ゲートウェイへの受信/送信 HTTP メッセージの診断設定。 |
|
properties.httpCorrelationProtocol |
Application Insights 診断に使用する関連付けプロトコルを設定します。 |
|
properties.logClientIp |
boolean |
ClientIP をログに記録します。 既定値は false です。 |
properties.loggerId |
string |
ターゲット ロガーのリソース ID。 |
properties.metrics |
boolean |
出力メトリック ポリシーを使用してカスタム メトリックを出力します。 Application Insights 診断設定にのみ適用されます。 |
properties.operationNameFormat |
Application Insights テレメトリの操作名の形式。 既定値は Name です。 |
|
properties.sampling |
診断のサンプリング設定。 |
|
properties.verbosity |
トレース ポリシーによって出力されるトレースに適用される詳細レベル。 |
|
type |
string |
リソースの型。 例: "Microsoft.Compute/virtualMachines" または "Microsoft.Storage/storageAccounts" |
ErrorFieldContract
エラー フィールド コントラクト。
名前 | 型 | 説明 |
---|---|---|
code |
string |
プロパティ レベルのエラー コード。 |
message |
string |
プロパティ レベルエラーの人間が判読できる表現。 |
target |
string |
プロパティ名。 |
ErrorResponse
エラー応答。
名前 | 型 | 説明 |
---|---|---|
error.code |
string |
サービスによって定義されたエラー コード。 このコードは、応答に指定された HTTP エラー コードのサブステータスとして機能します。 |
error.details |
検証エラーが発生した場合に要求で送信される無効なフィールドの一覧。 |
|
error.message |
string |
人が判読できるエラーの表現。 |
HttpCorrelationProtocol
Application Insights 診断に使用する関連付けプロトコルを設定します。
名前 | 型 | 説明 |
---|---|---|
Legacy |
string |
要求の関連付けデータを含む Request-Id ヘッダーと Request-Context ヘッダーを挿入します。 「https://github.com/dotnet/corefx/blob/master/src/System.Diagnostics.DiagnosticSource/src/HttpCorrelationProtocol.md」を参照してください。 |
None |
string |
関連付けヘッダーを読み取って挿入しないでください。 |
W3C |
string |
トレース コンテキスト ヘッダーを挿入します。 「https://w3c.github.io/trace-context」を参照してください。 |
HttpMessageDiagnostic
Http メッセージ診断設定。
名前 | 型 | 説明 |
---|---|---|
body |
本文ログの設定。 |
|
dataMasking |
データ マスクの設定。 |
|
headers |
string[] |
ログに記録する HTTP ヘッダーの配列。 |
OperationNameFormat
Application Insights テレメトリの操作名の形式。 既定値は Name です。
名前 | 型 | 説明 |
---|---|---|
Name |
string |
API_NAME;rev=API_REVISION - OPERATION_NAME |
Url |
string |
HTTP_VERB URL |
PipelineDiagnosticSettings
ゲートウェイへの受信/送信 HTTP メッセージの診断設定。
名前 | 型 | 説明 |
---|---|---|
request |
要求の診断設定。 |
|
response |
応答の診断設定。 |
SamplingSettings
診断のサンプリング設定。
名前 | 型 | 説明 |
---|---|---|
percentage |
number |
固定レート サンプリングのサンプリングレート。 |
samplingType |
サンプリングの種類。 |
SamplingType
サンプリングの種類。
名前 | 型 | 説明 |
---|---|---|
fixed |
string |
固定レート サンプリング。 |
Verbosity
トレース ポリシーによって出力されるトレースに適用される詳細レベル。
名前 | 型 | 説明 |
---|---|---|
error |
string |
'severity' が 'error' に設定されているトレースのみが、この診断インスタンスにアタッチされたロガーに送信されます。 |
information |
string |
'severity' が 'information' と 'error' に設定されているトレースは、この診断インスタンスにアタッチされているロガーに送信されます。 |
verbose |
string |
トレース ポリシーによって出力されるすべてのトレースは、この診断インスタンスにアタッチされているロガーに送信されます。 |