你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Local Network Gateways - Update Tags

Updates a local network gateway tags.

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

URI Parameters

Name In Required Type Description
localNetworkGatewayName
path True

string

The name of the local network gateway.

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

LocalNetworkGateway

Update successful. The operation returns the resulting LocalNetworkGateway resource.

Other Status Codes

CloudError

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

UpdateLocalNetworkGatewayTags

Sample request

PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/localNetworkGateways/lgw?api-version=2024-01-01

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

Sample response

{
  "name": "lgw",
  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/localNetworkGateways/lgw",
  "type": "Microsoft.Network/localNetworkGateways",
  "location": "westus",
  "tags": {
    "tag1": "value1",
    "tag2": "value2"
  },
  "properties": {
    "provisioningState": "Succeeded",
    "resourceGuid": "00000000-0000-0000-0000-000000000000",
    "localNetworkAddressSpace": {
      "addressPrefixes": [
        "12.0.0.0/8"
      ]
    },
    "gatewayIpAddress": "12.0.0.1"
  }
}

Definitions

Name Description
AddressSpace

AddressSpace contains an array of IP address ranges that can be used by subnets of the virtual network.

BgpSettings

BGP settings details.

CloudError

An error response from the service.

CloudErrorBody

An error response from the service.

IPConfigurationBgpPeeringAddress

Properties of IPConfigurationBgpPeeringAddress.

LocalNetworkGateway

A common class for general resource information.

ProvisioningState

The current provisioning state.

TagsObject

Tags object for patch operations.

AddressSpace

AddressSpace contains an array of IP address ranges that can be used by subnets of the virtual network.

Name Type Description
addressPrefixes

string[]

A list of address blocks reserved for this virtual network in CIDR notation.

BgpSettings

BGP settings details.

Name Type Description
asn

integer

The BGP speaker's ASN.

bgpPeeringAddress

string

The BGP peering address and BGP identifier of this BGP speaker.

bgpPeeringAddresses

IPConfigurationBgpPeeringAddress[]

BGP peering address with IP configuration ID for virtual network gateway.

peerWeight

integer

The weight added to routes learned from this BGP speaker.

CloudError

An error response from the service.

Name Type Description
error

CloudErrorBody

Cloud error body.

CloudErrorBody

An error response from the service.

Name Type Description
code

string

An identifier for the error. Codes are invariant and are intended to be consumed programmatically.

details

CloudErrorBody[]

A list of additional details about the error.

message

string

A message describing the error, intended to be suitable for display in a user interface.

target

string

The target of the particular error. For example, the name of the property in error.

IPConfigurationBgpPeeringAddress

Properties of IPConfigurationBgpPeeringAddress.

Name Type Description
customBgpIpAddresses

string[]

The list of custom BGP peering addresses which belong to IP configuration.

defaultBgpIpAddresses

string[]

The list of default BGP peering addresses which belong to IP configuration.

ipconfigurationId

string

The ID of IP configuration which belongs to gateway.

tunnelIpAddresses

string[]

The list of tunnel public IP addresses which belong to IP configuration.

LocalNetworkGateway

A common class for general resource information.

Name Type Description
etag

string

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

id

string

Resource ID.

location

string

Resource location.

name

string

Resource name.

properties.bgpSettings

BgpSettings

Local network gateway's BGP speaker settings.

properties.fqdn

string

FQDN of local network gateway.

properties.gatewayIpAddress

string

IP address of local network gateway.

properties.localNetworkAddressSpace

AddressSpace

Local network site address space.

properties.provisioningState

ProvisioningState

The provisioning state of the local network gateway resource.

properties.resourceGuid

string

The resource GUID property of the local network gateway resource.

tags

object

Resource tags.

type

string

Resource type.

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.