Network Watchers - Create Or Update

Hiermee maakt of werkt u een netwerk-watcher bij in de opgegeven resourcegroep.

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

URI-parameters

Name In Vereist Type Description
networkWatcherName
path True

string

De naam van de network watcher.

resourceGroupName
path True

string

De naam van de resourcegroep.

subscriptionId
path True

string

De abonnementsreferenties waarmee het Microsoft Azure-abonnement uniek wordt geïdentificeerd. De abonnements-id maakt deel uit van de URI voor elke service-aanroep.

api-version
query True

string

Client-API-versie.

Aanvraagbody

Name Type Description
id

string

Resource-id.

location

string

Resourcelocatie.

tags

object

Resourcetags.

Antwoorden

Name Type Description
200 OK

NetworkWatcher

De update is voltooid. De bewerking retourneert de resulterende Network Watcher-resource.

201 Created

NetworkWatcher

Maken is voltooid. De bewerking retourneert de resulterende Network Watcher-resource.

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

Create network watcher

Sample Request

PUT https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkWatchers/nw1?api-version=2023-09-01

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

Sample Response

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

Definities

Name Description
ErrorDetails

Algemene weergave van foutdetails.

ErrorResponse

Het foutobject.

NetworkWatcher

Network Watcher in een resourcegroep.

ProvisioningState

De huidige inrichtingsstatus.

ErrorDetails

Algemene weergave van foutdetails.

Name Type Description
code

string

Foutcode.

message

string

Foutbericht.

target

string

Foutdoel.

ErrorResponse

Het foutobject.

Name Type Description
error

ErrorDetails

Fout
Het object foutdetails.

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

Resourcetype.

ProvisioningState

De huidige inrichtingsstatus.

Name Type Description
Deleting

string

Failed

string

Succeeded

string

Updating

string