Management Group Diagnostic Settings - Create Or Update

指定したリソースの管理グループ診断設定を作成または更新します。

PUT https://management.azure.com/providers/microsoft.management/managementGroups/{managementGroupId}/providers/microsoft.insights/diagnosticSettings/{name}?api-version=2020-01-01-preview

URI パラメーター

名前 / 必須 型 説明
managementGroupId
path True

string

管理グループ ID。

name
path True

string

診断設定の名前。

api-version
query True

string

minLength: 1

この操作に使用する API バージョン。

要求本文

名前 型 説明
location

string

リソースの場所

properties.eventHubAuthorizationRuleId

string

イベント ハブ承認規則のリソース ID。

properties.eventHubName

string

イベント ハブの名前。 何も指定しない場合は、既定のイベント ハブが選択されます。

properties.logs

ManagementGroupLogSettings[]

ログ設定の一覧。

properties.serviceBusRuleId

string

診断設定の Service Bus ルール ID。 ここでは、下位互換性を維持します。

properties.storageAccountId

string

診断ログを送信するストレージ アカウントのリソース ID。

properties.workspaceId

string

診断ログを送信する Log Analytics ワークスペースの完全な ARM リソース ID。 例: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2

応答

名前 型 説明
200 OK

ManagementGroupDiagnosticSettingsResource

管理グループ診断設定を作成するための要求が成功しました

Other Status Codes

ErrorResponse

操作が失敗した理由を説明するエラー応答。

セキュリティ

azure_auth

Azure Active Directory OAuth2 フロー

型: oauth2
フロー: implicit
Authorization URL (承認 URL): https://login.microsoftonline.com/common/oauth2/authorize

スコープ

名前 説明
user_impersonation ユーザー アカウントを偽装する

例

Creates or Updates the management group diagnostic setting

要求のサンプル

PUT https://management.azure.com/providers/microsoft.management/managementGroups/testChildMG7/providers/microsoft.insights/diagnosticSettings/setting1?api-version=2020-01-01-preview

{
  "properties": {
    "storageAccountId": "/subscriptions/bfaef57f-297e-4210-bfe5-27c18cc671f7/resourceGroups/FuncAppRunners/providers/Microsoft.Storage/storageAccounts/testpersonalb6a5",
    "workspaceId": "/subscriptions/9cf7cc0a-0ba1-4624-bc82-97e1ee25dc45/resourceGroups/mgTest/providers/Microsoft.OperationalInsights/workspaces/mgTestWorkspace",
    "eventHubAuthorizationRuleId": "/subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule",
    "eventHubName": "myeventhub",
    "logs": [
      {
        "category": "Administrative",
        "enabled": true
      },
      {
        "category": "Policy",
        "enabled": true
      }
    ]
  }
}

応答のサンプル

{
  "id": "providers/Microsoft.Management/managementGroups/testChildMG7/providers/microsoft.insights/diagnosticSettings/setting1",
  "type": "Microsoft.Insights/diagnosticSettings",
  "name": "setting1",
  "location": "global",
  "properties": {
    "storageAccountId": "/subscriptions/bfaef57f-297e-4210-bfe5-27c18cc671f7/resourceGroups/FuncAppRunners/providers/Microsoft.Storage/storageAccounts/testpersonalb6a5",
    "workspaceId": "/subscriptions/9cf7cc0a-0ba1-4624-bc82-97e1ee25dc45/resourceGroups/mgTest/providers/Microsoft.OperationalInsights/workspaces/mgTestWorkspace",
    "eventHubAuthorizationRuleId": "/subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule",
    "logs": [
      {
        "category": "Administrative",
        "enabled": true
      },
      {
        "category": "Policy",
        "enabled": true
      }
    ]
  }
}

定義

名前 説明
ErrorResponse

エラー応答の形式について説明します。

ManagementGroupDiagnosticSettingsResource

管理グループ診断設定リソース。

ManagementGroupLogSettings

管理グループ診断設定の一部。 特定のログの設定を指定します。

ErrorResponse

エラー応答の形式について説明します。

名前 型 説明
code

string

エラー コード

message

string

操作が失敗した理由を示すエラー メッセージ。

ManagementGroupDiagnosticSettingsResource

管理グループ診断設定リソース。

名前 型 説明
id

string

Azure リソース ID

location

string

リソースの場所

name

string

Azure リソース名

properties.eventHubAuthorizationRuleId

string

イベント ハブ承認規則のリソース ID。

properties.eventHubName

string

イベント ハブの名前。 何も指定しない場合は、既定のイベント ハブが選択されます。

properties.logs

ManagementGroupLogSettings[]

ログ設定の一覧。

properties.serviceBusRuleId

string

診断設定の Service Bus ルール ID。 ここでは、下位互換性を維持します。

properties.storageAccountId

string

診断ログを送信するストレージ アカウントのリソース ID。

properties.workspaceId

string

診断ログを送信する Log Analytics ワークスペースの完全な ARM リソース ID。 例: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2

type

string

Azure リソースの種類

ManagementGroupLogSettings

管理グループ診断設定の一部。 特定のログの設定を指定します。

名前 型 説明
category

string

この設定が適用されるリソースの種類の管理グループ診断ログ カテゴリの名前。

enabled

boolean

このログが有効かどうかを示す値。