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

Endpoints - Update

更新流量管理器终结点。

PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}?api-version=2022-04-01

URI 参数

名称 必需 类型 说明
endpointName
path True

string

流量管理器终结点的名称。

endpointType
path True

EndpointType

流量管理器终结点的类型。

profileName
path True

string

流量管理器配置文件的名称。

resourceGroupName
path True

string

minLength: 1
maxLength: 90

资源组的名称。 名称不区分大小写。

subscriptionId
path True

string

minLength: 1

目标订阅的 ID。

api-version
query True

string

minLength: 1

要用于此操作的 API 版本。

请求正文

名称 类型 说明
id

string (arm-id)

资源的完全限定资源 ID。 示例 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}

name

string

资源的名称

properties.alwaysServe

AlwaysServe

如果启用了 Always Serve,将禁用终结点运行状况探测,并且终结点将包含在流量路由方法中。

properties.customHeaders

EndpointPropertiesCustomHeadersItem[]

自定义标头列表。

properties.endpointLocation

string

使用“性能”流量路由方法时,指定外部或嵌套终结点的位置。

properties.endpointMonitorStatus

EndpointMonitorStatus

终结点的监视状态。

properties.endpointStatus

EndpointStatus

终结点的状态。 如果终结点已启用,则会探测终结点运行状况,并将其包含在流量路由方法中。

properties.geoMapping

string[]

使用“地理”流量路由方法时映射到此终结点的国家/地区列表。 有关接受值的完整列表,请参阅流量管理器地理文档。

properties.minChildEndpoints

integer (int64)

子配置文件中必须可用的最小终结点数,以便将父配置文件视为可用。 仅适用于“NestedEndpoints”类型的终结点。

properties.minChildEndpointsIPv4

integer (int64)

子配置文件中必须可用的最小 IPv4(DNS 记录类型 A)终结点,以便将父配置文件视为可用。 仅适用于“NestedEndpoints”类型的终结点。

properties.minChildEndpointsIPv6

integer (int64)

子配置文件中必须可用的最小 IPv6(DNS 记录类型 AAAA)终结点,以便将父配置文件视为可用。 仅适用于“NestedEndpoints”类型的终结点。

properties.priority

integer (int64)

使用“优先级”流量路由方法时,此终结点的优先级。 可能的值为 1 到 1000,较低的值表示更高的优先级。 这是一个可选参数。 如果指定,则必须在所有终结点上指定它,并且两个终结点不能共享相同的优先级值。

properties.subnets

EndpointPropertiesSubnetsItem[]

使用“子网”流量路由方法时映射到此终结点的子网、IP 地址和/或地址范围的列表。 空列表将匹配其他终结点未涵盖的所有范围。

properties.target

string

终结点的完全限定 DNS 名称或 IP 地址。 流量管理器在 DNS 响应中返回此值,以将流量定向到此终结点。

properties.targetResourceId

string

终结点的 Azure 资源 URI。 不适用于“ExternalEndpoints”类型的终结点。

properties.weight

integer (int64)

使用“加权”流量路由方法时此终结点的权重。 可能的值为 1 到 1000。

type

string

资源的类型。 Ex- Microsoft.Network/trafficManagerProfiles。

响应

名称 类型 说明
200 OK

Endpoint

Azure作已成功完成。

Other Status Codes

CloudError

意外错误响应。

安全性

azure_auth

Azure Active Directory OAuth2 Flow。

类型: oauth2
流向: implicit
授权 URL: https://login.microsoftonline.com/common/oauth2/authorize

作用域

名称 说明
user_impersonation 模拟用户帐户

示例

Endpoint-PATCH-External-Target

示例请求

PATCH https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager1421/providers/Microsoft.Network/trafficmanagerprofiles/azsmnet6386/ExternalEndpoints/azsmnet7187?api-version=2022-04-01

{
  "name": "azsmnet7187",
  "type": "Microsoft.Network/trafficManagerProfiles/externalEndpoints",
  "id": "/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager1421/providers/Microsoft.Network/trafficManagerProfiles/azsmnet6386/externalEndpoints/azsmnet7187",
  "properties": {
    "target": "another.foobar.contoso.com"
  }
}

示例响应

{
  "name": "azsmnet7187",
  "type": "Microsoft.Network/trafficManagerProfiles/externalEndpoints",
  "id": "/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager1421/providers/Microsoft.Network/trafficManagerProfiles/azsmnet6386/externalEndpoints/azsmnet7187",
  "properties": {
    "endpointLocation": "North Europe",
    "endpointMonitorStatus": "CheckingEndpoint",
    "endpointStatus": "Enabled",
    "priority": 1,
    "target": "another.foobar.contoso.com",
    "weight": 1
  }
}

定义

名称 说明
AlwaysServe

如果启用了 Always Serve,将禁用终结点运行状况探测,并且终结点将包含在流量路由方法中。

CloudError

Azure 资源管理器返回的错误

CloudErrorBody

Azure 资源管理器返回的错误的内容

Endpoint

表示流量管理器终结点的类。

EndpointMonitorStatus

终结点的监视状态。

EndpointPropertiesCustomHeadersItem

自定义标头名称和值。

EndpointPropertiesSubnetsItem

子网第一个地址、范围和/或最后一个地址。

EndpointStatus

终结点的状态。 如果终结点已启用,则会探测终结点运行状况,并将其包含在流量路由方法中。

EndpointType

流量管理器终结点的类型。

AlwaysServe

如果启用了 Always Serve,将禁用终结点运行状况探测,并且终结点将包含在流量路由方法中。

说明
Enabled
Disabled

CloudError

Azure 资源管理器返回的错误

名称 类型 说明
error

CloudErrorBody

错误的内容。

CloudErrorBody

Azure 资源管理器返回的错误的内容

名称 类型 说明
code

string

错误代码

details

CloudErrorBody[]

错误详细信息

message

string

错误信息

target

string

错误目标

Endpoint

表示流量管理器终结点的类。

名称 类型 说明
id

string (arm-id)

资源的完全限定资源 ID。 示例 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}

name

string

资源的名称

properties.alwaysServe

AlwaysServe

如果启用了 Always Serve,将禁用终结点运行状况探测,并且终结点将包含在流量路由方法中。

properties.customHeaders

EndpointPropertiesCustomHeadersItem[]

自定义标头列表。

properties.endpointLocation

string

使用“性能”流量路由方法时,指定外部或嵌套终结点的位置。

properties.endpointMonitorStatus

EndpointMonitorStatus

终结点的监视状态。

properties.endpointStatus

EndpointStatus

终结点的状态。 如果终结点已启用,则会探测终结点运行状况,并将其包含在流量路由方法中。

properties.geoMapping

string[]

使用“地理”流量路由方法时映射到此终结点的国家/地区列表。 有关接受值的完整列表,请参阅流量管理器地理文档。

properties.minChildEndpoints

integer (int64)

子配置文件中必须可用的最小终结点数,以便将父配置文件视为可用。 仅适用于“NestedEndpoints”类型的终结点。

properties.minChildEndpointsIPv4

integer (int64)

子配置文件中必须可用的最小 IPv4(DNS 记录类型 A)终结点,以便将父配置文件视为可用。 仅适用于“NestedEndpoints”类型的终结点。

properties.minChildEndpointsIPv6

integer (int64)

子配置文件中必须可用的最小 IPv6(DNS 记录类型 AAAA)终结点,以便将父配置文件视为可用。 仅适用于“NestedEndpoints”类型的终结点。

properties.priority

integer (int64)

使用“优先级”流量路由方法时,此终结点的优先级。 可能的值为 1 到 1000,较低的值表示更高的优先级。 这是一个可选参数。 如果指定,则必须在所有终结点上指定它,并且两个终结点不能共享相同的优先级值。

properties.subnets

EndpointPropertiesSubnetsItem[]

使用“子网”流量路由方法时映射到此终结点的子网、IP 地址和/或地址范围的列表。 空列表将匹配其他终结点未涵盖的所有范围。

properties.target

string

终结点的完全限定 DNS 名称或 IP 地址。 流量管理器在 DNS 响应中返回此值,以将流量定向到此终结点。

properties.targetResourceId

string

终结点的 Azure 资源 URI。 不适用于“ExternalEndpoints”类型的终结点。

properties.weight

integer (int64)

使用“加权”流量路由方法时此终结点的权重。 可能的值为 1 到 1000。

type

string

资源的类型。 Ex- Microsoft.Network/trafficManagerProfiles。

EndpointMonitorStatus

终结点的监视状态。

说明
CheckingEndpoint
Online
Degraded
Disabled
Inactive
Stopped
Unmonitored

EndpointPropertiesCustomHeadersItem

自定义标头名称和值。

名称 类型 说明
name

string

标头名称。

value

string

标头值。

EndpointPropertiesSubnetsItem

子网第一个地址、范围和/或最后一个地址。

名称 类型 说明
first

string

子网中的第一个地址。

last

string

子网中的最后一个地址。

scope

integer (int32)

块大小(子网掩码中的前导位数)。

EndpointStatus

终结点的状态。 如果终结点已启用,则会探测终结点运行状况,并将其包含在流量路由方法中。

说明
Enabled
Disabled

EndpointType

流量管理器终结点的类型。

说明
AzureEndpoints
ExternalEndpoints
NestedEndpoints