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 |
|---|---|---|---|---|
|
network
|
path | True |
string |
De naam van de network watcher. |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
De naam van de resourcegroep. De naam is hoofdletterongevoelig. |
|
subscription
|
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 |
De update-operatie van de bron 'NetworkWatcher' is geslaagd |
|
| 201 Created |
De aanmaakoperatie van de bron 'NetworkWatcher' is geslaagd |
|
| Other Status Codes |
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. |
Network Watcher in een resourcegroep. |
|
Error |
Algemene weergave van foutdetails. |
|
Error |
Het foutobject. |
|
Provisioning |
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 |
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 |
Fout |
ProvisioningState
De inrichtingsstatus van het stroomlogboek.
| Waarde | Description |
|---|---|
| Failed |
Mislukt |
| Succeeded |
Geslaagd |
| Canceled |
Geannuleerd |
| Creating |
Creëren |
| Updating |
Bijwerken |
| Deleting |
Verwijderen |