Compartilhar via


Connection Monitors - Update Tags

Update tags of the specified connection monitor.

PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}?api-version=2024-01-01

URI Parameters

Name In Required Type Description
connectionMonitorName
path True

string

The name of the connection monitor.

networkWatcherName
path True

string

The name of the network watcher.

resourceGroupName
path True

string

The name of the resource group.

subscriptionId
path True

string

The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

api-version
query True

string

Client API version.

Request Body

Name Type Description
tags

object

Resource tags.

Responses

Name Type Description
200 OK

ConnectionMonitorResult

Request successful. The operation returns updated connection monitor.

Other Status Codes

ErrorResponse

Error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow.

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

Scopes

Name Description
user_impersonation impersonate your user account

Examples

Update connection monitor tags

Sample request

PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkWatchers/nw1/connectionMonitors/cm1?api-version=2024-01-01

{
  "tags": {
    "tag1": "value1",
    "tag2": "value2"
  }
}

Sample response

{
  "name": "cm1",
  "id": "/subscriptions/subid/`/rg1/providers/Microsoft.Network/networkWatchers/nw1/connectionMonitors/cm1",
  "etag": "W/\"00000000-0000-0000-0000-000000000000\"",
  "properties": {
    "provisioningState": "Succeeded",
    "source": {
      "resourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1",
      "port": 0
    },
    "destination": {
      "address": "bing.com",
      "port": 80
    },
    "monitoringIntervalInSeconds": 60,
    "autoStart": true,
    "startTime": "2019-09-04T02:48:10.6797393Z",
    "monitoringStatus": "Running"
  },
  "tags": {
    "tag1": "value1",
    "tag2": "value2"
  },
  "type": "Microsoft.Network/networkWatchers/connectionMonitors",
  "location": "westcentralus"
}

Definitions

Name Description
ConnectionMonitorDestination

Describes the destination of connection monitor.

ConnectionMonitorEndpoint

Describes the connection monitor endpoint.

ConnectionMonitorEndpointFilter

Describes the connection monitor endpoint filter.

ConnectionMonitorEndpointFilterItem

Describes the connection monitor endpoint filter item.

ConnectionMonitorEndpointFilterItemType

The type of item included in the filter. Currently only 'AgentAddress' is supported.

ConnectionMonitorEndpointFilterType

The behavior of the endpoint filter. Currently only 'Include' is supported.

ConnectionMonitorEndpointLocationDetails

Connection monitor endpoint location details only being used for 'AzureArcNetwork' type endpoints, which contains the region details.

ConnectionMonitorEndpointScope

Describes the connection monitor endpoint scope.

ConnectionMonitorEndpointScopeItem

Describes the connection monitor endpoint scope item.

ConnectionMonitorHttpConfiguration

Describes the HTTP configuration.

ConnectionMonitorIcmpConfiguration

Describes the ICMP configuration.

ConnectionMonitorOutput

Describes a connection monitor output destination.

ConnectionMonitorResult

Information about the connection monitor.

ConnectionMonitorSource

Describes the source of connection monitor.

ConnectionMonitorSuccessThreshold

Describes the threshold for declaring a test successful.

ConnectionMonitorTcpConfiguration

Describes the TCP configuration.

ConnectionMonitorTestConfiguration

Describes a connection monitor test configuration.

ConnectionMonitorTestConfigurationProtocol

The protocol to use in test evaluation.

ConnectionMonitorTestGroup

Describes the connection monitor test group.

ConnectionMonitorType

Type of connection monitor.

ConnectionMonitorWorkspaceSettings

Describes the settings for producing output into a log analytics workspace.

CoverageLevel

Test coverage for the endpoint.

DestinationPortBehavior

Destination port behavior.

EndpointType

The endpoint type.

ErrorDetails

Common error details representation.

ErrorResponse

The error object.

HTTPConfigurationMethod

The HTTP method to use.

HTTPHeader

The HTTP header.

OutputType

Connection monitor output destination type. Currently, only "Workspace" is supported.

PreferredIPVersion

The preferred IP version to use in test evaluation. The connection monitor may choose to use a different version depending on other parameters.

ProvisioningState

The current provisioning state.

TagsObject

Tags object for patch operations.

ConnectionMonitorDestination

Describes the destination of connection monitor.

Name Type Description
address

string

Address of the connection monitor destination (IP or domain name).

port

integer

The destination port used by connection monitor.

resourceId

string

The ID of the resource used as the destination by connection monitor.

ConnectionMonitorEndpoint

Describes the connection monitor endpoint.

Name Type Description
address

string

Address of the connection monitor endpoint. Supported for AzureVM, ExternalAddress, ArcMachine, MMAWorkspaceMachine endpoint type.

coverageLevel

CoverageLevel

Test coverage for the endpoint.

filter

ConnectionMonitorEndpointFilter

Filter field is getting deprecated and should not be used. Instead use Include/Exclude scope fields for it.

locationDetails

ConnectionMonitorEndpointLocationDetails

Location details is optional and only being used for 'AzureArcNetwork' type endpoints, which contains region details.

name

string

The name of the connection monitor endpoint.

resourceId

string

Resource ID of the connection monitor endpoint are supported for AzureVM, AzureVMSS, AzureVNet, AzureSubnet, MMAWorkspaceMachine, MMAWorkspaceNetwork, AzureArcVM endpoint type.

scope

ConnectionMonitorEndpointScope

Endpoint scope defines which target resource to monitor in case of compound resource endpoints like VMSS, AzureSubnet, AzureVNet, MMAWorkspaceNetwork, AzureArcNetwork.

subscriptionId

string

Subscription ID for connection monitor endpoint. It's an optional parameter which is being used for 'AzureArcNetwork' type endpoint.

type

EndpointType

The endpoint type.

ConnectionMonitorEndpointFilter

Describes the connection monitor endpoint filter.

Name Type Description
items

ConnectionMonitorEndpointFilterItem[]

List of items in the filter.

type

ConnectionMonitorEndpointFilterType

The behavior of the endpoint filter. Currently only 'Include' is supported.

ConnectionMonitorEndpointFilterItem

Describes the connection monitor endpoint filter item.

Name Type Description
address

string

The address of the filter item.

type

ConnectionMonitorEndpointFilterItemType

The type of item included in the filter. Currently only 'AgentAddress' is supported.

ConnectionMonitorEndpointFilterItemType

The type of item included in the filter. Currently only 'AgentAddress' is supported.

Name Type Description
AgentAddress

string

ConnectionMonitorEndpointFilterType

The behavior of the endpoint filter. Currently only 'Include' is supported.

Name Type Description
Include

string

ConnectionMonitorEndpointLocationDetails

Connection monitor endpoint location details only being used for 'AzureArcNetwork' type endpoints, which contains the region details.

Name Type Description
region

string

Region for connection monitor endpoint.

ConnectionMonitorEndpointScope

Describes the connection monitor endpoint scope.

Name Type Description
exclude

ConnectionMonitorEndpointScopeItem[]

List of items which needs to be excluded from the endpoint scope.

include

ConnectionMonitorEndpointScopeItem[]

List of items which needs to be included to the endpoint scope.

ConnectionMonitorEndpointScopeItem

Describes the connection monitor endpoint scope item.

Name Type Description
address

string

The address of the endpoint item. Supported types are IPv4/IPv6 subnet mask or IPv4/IPv6 IP address.

ConnectionMonitorHttpConfiguration

Describes the HTTP configuration.

Name Type Description
method

HTTPConfigurationMethod

The HTTP method to use.

path

string

The path component of the URI. For instance, "/dir1/dir2".

port

integer

The port to connect to.

preferHTTPS

boolean

Value indicating whether HTTPS is preferred over HTTP in cases where the choice is not explicit.

requestHeaders

HTTPHeader[]

The HTTP headers to transmit with the request.

validStatusCodeRanges

string[]

HTTP status codes to consider successful. For instance, "2xx,301-304,418".

ConnectionMonitorIcmpConfiguration

Describes the ICMP configuration.

Name Type Description
disableTraceRoute

boolean

Value indicating whether path evaluation with trace route should be disabled.

ConnectionMonitorOutput

Describes a connection monitor output destination.

Name Type Description
type

OutputType

Connection monitor output destination type. Currently, only "Workspace" is supported.

workspaceSettings

ConnectionMonitorWorkspaceSettings

Describes the settings for producing output into a log analytics workspace.

ConnectionMonitorResult

Information about the connection monitor.

Name Type Default value Description
etag

string

A unique read-only string that changes whenever the resource is updated.

id

string

ID of the connection monitor.

location

string

Connection monitor location.

name

string

Name of the connection monitor.

properties.autoStart

boolean

True

Determines if the connection monitor will start automatically once created.

properties.connectionMonitorType

ConnectionMonitorType

Type of connection monitor.

properties.destination

ConnectionMonitorDestination

Describes the destination of connection monitor.

properties.endpoints

ConnectionMonitorEndpoint[]

List of connection monitor endpoints.

properties.monitoringIntervalInSeconds

integer

60

Monitoring interval in seconds.

properties.monitoringStatus

string

The monitoring status of the connection monitor.

properties.notes

string

Optional notes to be associated with the connection monitor.

properties.outputs

ConnectionMonitorOutput[]

List of connection monitor outputs.

properties.provisioningState

ProvisioningState

The provisioning state of the connection monitor.

properties.source

ConnectionMonitorSource

Describes the source of connection monitor.

properties.startTime

string

The date and time when the connection monitor was started.

properties.testConfigurations

ConnectionMonitorTestConfiguration[]

List of connection monitor test configurations.

properties.testGroups

ConnectionMonitorTestGroup[]

List of connection monitor test groups.

tags

object

Connection monitor tags.

type

string

Connection monitor type.

ConnectionMonitorSource

Describes the source of connection monitor.

Name Type Description
port

integer

The source port used by connection monitor.

resourceId

string

The ID of the resource used as the source by connection monitor.

ConnectionMonitorSuccessThreshold

Describes the threshold for declaring a test successful.

Name Type Description
checksFailedPercent

integer

The maximum percentage of failed checks permitted for a test to evaluate as successful.

roundTripTimeMs

number

The maximum round-trip time in milliseconds permitted for a test to evaluate as successful.

ConnectionMonitorTcpConfiguration

Describes the TCP configuration.

Name Type Description
destinationPortBehavior

DestinationPortBehavior

Destination port behavior.

disableTraceRoute

boolean

Value indicating whether path evaluation with trace route should be disabled.

port

integer

The port to connect to.

ConnectionMonitorTestConfiguration

Describes a connection monitor test configuration.

Name Type Description
httpConfiguration

ConnectionMonitorHttpConfiguration

The parameters used to perform test evaluation over HTTP.

icmpConfiguration

ConnectionMonitorIcmpConfiguration

The parameters used to perform test evaluation over ICMP.

name

string

The name of the connection monitor test configuration.

preferredIPVersion

PreferredIPVersion

The preferred IP version to use in test evaluation. The connection monitor may choose to use a different version depending on other parameters.

protocol

ConnectionMonitorTestConfigurationProtocol

The protocol to use in test evaluation.

successThreshold

ConnectionMonitorSuccessThreshold

The threshold for declaring a test successful.

tcpConfiguration

ConnectionMonitorTcpConfiguration

The parameters used to perform test evaluation over TCP.

testFrequencySec

integer

The frequency of test evaluation, in seconds.

ConnectionMonitorTestConfigurationProtocol

The protocol to use in test evaluation.

Name Type Description
Http

string

Icmp

string

Tcp

string

ConnectionMonitorTestGroup

Describes the connection monitor test group.

Name Type Description
destinations

string[]

List of destination endpoint names.

disable

boolean

Value indicating whether test group is disabled.

name

string

The name of the connection monitor test group.

sources

string[]

List of source endpoint names.

testConfigurations

string[]

List of test configuration names.

ConnectionMonitorType

Type of connection monitor.

Name Type Description
MultiEndpoint

string

SingleSourceDestination

string

ConnectionMonitorWorkspaceSettings

Describes the settings for producing output into a log analytics workspace.

Name Type Description
workspaceResourceId

string

Log analytics workspace resource ID.

CoverageLevel

Test coverage for the endpoint.

Name Type Description
AboveAverage

string

Average

string

BelowAverage

string

Default

string

Full

string

Low

string

DestinationPortBehavior

Destination port behavior.

Name Type Description
ListenIfAvailable

string

None

string

EndpointType

The endpoint type.

Name Type Description
AzureArcNetwork

string

AzureArcVM

string

AzureSubnet

string

AzureVM

string

AzureVMSS

string

AzureVNet

string

ExternalAddress

string

MMAWorkspaceMachine

string

MMAWorkspaceNetwork

string

ErrorDetails

Common error details representation.

Name Type Description
code

string

Error code.

message

string

Error message.

target

string

Error target.

ErrorResponse

The error object.

Name Type Description
error

ErrorDetails

Error
The error details object.

HTTPConfigurationMethod

The HTTP method to use.

Name Type Description
Get

string

Post

string

HTTPHeader

The HTTP header.

Name Type Description
name

string

The name in HTTP header.

value

string

The value in HTTP header.

OutputType

Connection monitor output destination type. Currently, only "Workspace" is supported.

Name Type Description
Workspace

string

PreferredIPVersion

The preferred IP version to use in test evaluation. The connection monitor may choose to use a different version depending on other parameters.

Name Type Description
IPv4

string

IPv6

string

ProvisioningState

The current provisioning state.

Name Type Description
Deleting

string

Failed

string

Succeeded

string

Updating

string

TagsObject

Tags object for patch operations.

Name Type Description
tags

object

Resource tags.