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 매개 변수

Name In(다음 안에) 필수 형식 Description
managementGroupId
path True

string

관리 그룹 ID입니다.

name
path True

string

진단 설정의 이름입니다.

api-version
query True

string

이 작업에 사용할 API 버전입니다.

요청 본문

Name 형식 Description
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

응답

Name 형식 Description
200 OK

ManagementGroupDiagnosticSettingsResource

관리 그룹 진단 설정을 만들기 위한 성공적인 요청

Other Status Codes

ErrorResponse

작업이 실패한 이유를 설명하는 오류 응답입니다.

보안

azure_auth

Azure Active Directory OAuth2 Flow

형식: oauth2
Flow: implicit
권한 부여 URL: https://login.microsoftonline.com/common/oauth2/authorize

범위

Name Description
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
      }
    ]
  }
}

정의

Name Description
ErrorResponse

오류 응답의 형식을 설명합니다.

ManagementGroupDiagnosticSettingsResource

관리 그룹 진단 설정 리소스입니다.

ManagementGroupLogSettings

관리 그룹 진단 설정의 일부입니다. 특정 로그에 대한 설정을 지정합니다.

ErrorResponse

오류 응답의 형식을 설명합니다.

Name 형식 Description
code

string

오류 코드

message

string

작업이 실패한 이유를 나타내는 오류 메시지입니다.

ManagementGroupDiagnosticSettingsResource

관리 그룹 진단 설정 리소스입니다.

Name 형식 Description
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

관리 그룹 진단 설정의 일부입니다. 특정 로그에 대한 설정을 지정합니다.

Name 형식 Description
category

string

이 설정이 적용되는 리소스 유형에 대한 관리 그룹 진단 로그 범주의 이름입니다.

enabled

boolean

이 로그를 사용할 수 있는지 여부를 나타내는 값입니다.