Management Group Diagnostic Settings - Create Or Update

Hiermee worden diagnostische instellingen voor beheergroepen voor de opgegeven resource gemaakt of bijgewerkt.

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

URI-parameters

Name In Vereist Type Description
managementGroupId
path True

string

De id van de beheergroep.

name
path True

string

De naam van de diagnostische instelling.

api-version
query True

string

De API-versie die voor deze bewerking moet worden gebruikt.

Aanvraagbody

Name Type Description
location

string

Locatie van de resource

properties.eventHubAuthorizationRuleId

string

De resource-id voor de autorisatieregel voor de Event Hub.

properties.eventHubName

string

De naam van de event hub. Als er geen is opgegeven, wordt de standaard event hub geselecteerd.

properties.logs

ManagementGroupLogSettings[]

De lijst met logboekinstellingen.

properties.serviceBusRuleId

string

De service bus-regel-id van de diagnostische instelling. Dit is bedoeld om compatibiliteit met eerdere versies te behouden.

properties.storageAccountId

string

De resource-id van het opslagaccount waarnaar u diagnostische logboeken wilt verzenden.

properties.workspaceId

string

De volledige ARM-resource-id van de Log Analytics-werkruimte waarnaar u diagnostische logboeken wilt verzenden. Voorbeeld: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2

Antwoorden

Name Type Description
200 OK

ManagementGroupDiagnosticSettingsResource

Geslaagde aanvraag voor het maken van een diagnostische instelling voor een beheergroep

Other Status Codes

ErrorResponse

Foutreactie waarin wordt beschreven waarom de bewerking is mislukt.

Beveiliging

azure_auth

Azure Active Directory OAuth2-stroom

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation Uw gebruikersaccount imiteren

Voorbeelden

Creates or Updates the management group diagnostic setting

Sample Request

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

Sample Response

{
  "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
      }
    ]
  }
}

Definities

Name Description
ErrorResponse

Beschrijft de indeling van foutreactie.

ManagementGroupDiagnosticSettingsResource

De resource voor de diagnostische instelling van de beheergroep.

ManagementGroupLogSettings

Onderdeel van de diagnostische instelling van de beheergroep. Hiermee geeft u de instellingen voor een bepaald logboek.

ErrorResponse

Beschrijft de indeling van foutreactie.

Name Type Description
code

string

Foutcode

message

string

Foutbericht dat aangeeft waarom de bewerking is mislukt.

ManagementGroupDiagnosticSettingsResource

De resource voor de diagnostische instelling van de beheergroep.

Name Type Description
id

string

Azure-resource-id

location

string

Locatie van de resource

name

string

Naam van Azure-resource

properties.eventHubAuthorizationRuleId

string

De resource-id voor de autorisatieregel voor de Event Hub.

properties.eventHubName

string

De naam van de event hub. Als er geen is opgegeven, wordt de standaard event hub geselecteerd.

properties.logs

ManagementGroupLogSettings[]

De lijst met logboekinstellingen.

properties.serviceBusRuleId

string

De service bus-regel-id van de diagnostische instelling. Dit is bedoeld om compatibiliteit met eerdere versies te behouden.

properties.storageAccountId

string

De resource-id van het opslagaccount waarnaar u diagnostische logboeken wilt verzenden.

properties.workspaceId

string

De volledige ARM-resource-id van de Log Analytics-werkruimte waarnaar u diagnostische logboeken wilt verzenden. Voorbeeld: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2

type

string

Azure-resourcetype

ManagementGroupLogSettings

Onderdeel van de diagnostische instelling van de beheergroep. Hiermee geeft u de instellingen voor een bepaald logboek.

Name Type Description
category

string

Naam van de categorie diagnostisch logboek van een beheergroep voor een resourcetype waarvoor deze instelling wordt toegepast.

enabled

boolean

een waarde die aangeeft of dit logboek is ingeschakeld.