Network Watchers - Create Or Update

Hiermee maakt of werkt u een netwerkwatcher bij in de opgegeven resourcegroep.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}?api-version=2025-05-01

URI-parameters

Name In Vereist Type Description
networkWatcherName
path True

string

De naam van de network watcher.

resourceGroupName
path True

string

minLength: 1
maxLength: 90

De naam van de resourcegroep. De naam is hoofdletterongevoelig.

subscriptionId
path True

string (uuid)

De id van het doelabonnement. De waarde moet een UUID zijn.

api-version
query True

string

minLength: 1

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

Aanvraagbody

Name Type Description
id

string

Resource-id.

location

string

Resourcelocatie.

tags

object

Resourcetags.

Antwoorden

Name Type Description
200 OK

Common.NetworkWatcher

De update-operatie van de bron 'NetworkWatcher' is geslaagd

201 Created

Common.NetworkWatcher

De aanmaakoperatie van de bron 'NetworkWatcher' is geslaagd

Other Status Codes

ErrorResponse

Een onverwachte foutreactie.

Beveiliging

azure_auth

OAuth2-stroom voor Azure Active Directory.

Type: oauth2
Stroom: implicit
Autorisatie-URL: https://login.microsoftonline.com/common/oauth2/authorize

Bereiken

Name Description
user_impersonation Uw gebruikersaccount imiteren

Voorbeelden

Create network watcher

Voorbeeldaanvraag

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkWatchers/nw1?api-version=2025-05-01

{
  "location": "eastus",
  "properties": {}
}

Voorbeeldrespons

{
  "name": "nw1",
  "type": "Microsoft.Network/networkWatchers",
  "etag": "W/\"00000000-0000-0000-0000-000000000000\"",
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkWatchers/nw1",
  "location": "eastus",
  "properties": {
    "provisioningState": "Succeeded"
  },
  "tags": {}
}
{
  "name": "nw1",
  "type": "Microsoft.Network/networkWatchers",
  "etag": "W/\"00000000-0000-0000-0000-000000000000\"",
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkWatchers/nw1",
  "location": "eastus",
  "properties": {
    "provisioningState": "Succeeded"
  },
  "tags": {}
}

Definities

Name Description
Common.NetworkWatcher

Network Watcher in een resourcegroep.

ErrorDetails

Algemene weergave van foutdetails.

ErrorResponse

Het foutobject.

ProvisioningState

De inrichtingsstatus van het stroomlogboek.

Common.NetworkWatcher

Network Watcher in een resourcegroep.

Name Type Description
etag

string

Een unieke alleen-lezen tekenreeks die wordt gewijzigd wanneer de resource wordt bijgewerkt.

id

string

Resource-id.

location

string

Resourcelocatie.

name

string

Resourcenaam.

properties.provisioningState

ProvisioningState

De inrichtingsstatus van de network watcher-resource.

tags

object

Resourcetags.

type

string

Type bron

ErrorDetails

Algemene weergave van foutdetails.

Name Type Description
code

string

Foutcode.

message

string

Foutmelding.

target

string

Foutdoel.

ErrorResponse

Het foutobject.

Name Type Description
error

ErrorDetails

Fout
De fout geeft details object.

ProvisioningState

De inrichtingsstatus van het stroomlogboek.

Waarde Description
Failed

Mislukt

Succeeded

Geslaagd

Canceled

Geannuleerd

Creating

Creëren

Updating

Bijwerken

Deleting

Verwijderen