共用方式為


Endpoints - Create Or Update

建立或更新流量管理員端點。

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

URI 參數

名稱 位於 必要 類型 Description
endpointName
path True

string

要建立或更新之流量管理員端點的名稱。

endpointType
path True

EndpointType

要建立或更新之流量管理員端點的類型。

profileName
path True

string

流量管理員配置檔的名稱。

resourceGroupName
path True

string

資源群組的名稱。 名稱不區分大小寫。

subscriptionId
path True

string

取得用來唯一識別 Microsoft Azure 訂用帳戶的訂用帳戶認證。 訂用帳戶識別碼會構成每個服務呼叫 URI 的一部分。

api-version
query True

string

用戶端 API 版本。

要求本文

名稱 類型 Description
id

string

資源的完整資源標識碼。 例如 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}

name

string

資源的名稱

properties.alwaysServe

AlwaysServe

如果已啟用 Always Serve,則會停用端點健全狀況的探查,並將端點包含在流量路由方法中。

properties.customHeaders

CustomHeaders[]

自定義標頭的清單。

properties.endpointLocation

string

使用「效能」流量路由方法時,指定外部或巢狀端點的位置。

properties.endpointMonitorStatus

EndpointMonitorStatus

端點的監視狀態。

properties.endpointStatus

EndpointStatus

端點的狀態。 如果端點已啟用,則會探查其健全狀況,並將其包含在流量路由方式中。

properties.geoMapping

string[]

使用「地理」流量路由方法時,對應至此端點的國家/地區清單。 如需已接受值的完整清單,請參閱流量管理員地理檔。

properties.minChildEndpoints

integer

子配置檔中必須可用的端點數目下限,才能將父配置檔視為可用。 僅適用於 『NestedEndpoints』 類型的端點。

properties.minChildEndpointsIPv4

integer

最少的 IPv4 (DNS 記錄類型 A) 端點,必須在子設定檔中使用,才能將父配置檔視為可用。 僅適用於 『NestedEndpoints』 類型的端點。

properties.minChildEndpointsIPv6

integer

必須可在子配置檔中使用的 IPv6 (DNS 記錄類型 AAAA) 端點數目下限,才能將父配置檔視為可用。 僅適用於 『NestedEndpoints』 類型的端點。

properties.priority

integer

使用「優先順序」流量路由方法時,此端點的優先順序。 可能的值為 1 到 1000,較低的值代表較高的優先順序。 這是選擇性參數。 如果已指定參數,必須在所有端點上加以指定,而且不可以有任何兩個端點共用相同的優先順序值。

properties.subnets

Subnets[]

使用「子網」流量路由方法時,對應至此端點的子網、IP 位址和/或地址範圍清單。 空白清單會符合其他端點未涵蓋的所有範圍。

properties.target

string

端點的完整 DNS 名稱或 IP 位址。 流量管理員會傳回 DNS 回應中的此值以將流量導向至此端點。

properties.targetResourceId

string

端點的 Azure 資源 URI。 不適用於 『ExternalEndpoints』 類型的端點。

properties.weight

integer

使用「加權」流量路由方法時,此端點的權數。 可能的值為 1 到 1000。

type

string

資源類型。 Ex- Microsoft.Network/trafficManagerProfiles。

回應

名稱 類型 Description
200 OK

Endpoint

已建立或更新的端點。

201 Created

Endpoint

已建立或更新的端點。

Other Status Codes

CloudError

默認回應。 它會根據錯誤定義還原串行化。

安全性

azure_auth

Azure Active Directory OAuth2 Flow

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

Scopes

名稱 Description
user_impersonation 模擬您的用戶帳戶

範例

Endpoint-PUT-External-WithAlwaysServe
Endpoint-PUT-External-WithCustomHeaders
Endpoint-PUT-External-WithGeoMapping
Endpoint-PUT-External-WithLocation
Endpoint-PUT-External-WithSubnetMapping

Endpoint-PUT-External-WithAlwaysServe

Sample Request

PUT 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",
  "properties": {
    "target": "foobar.contoso.com",
    "endpointStatus": "Enabled",
    "endpointLocation": "North Europe",
    "alwaysServe": "Enabled"
  }
}

Sample Response

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

Endpoint-PUT-External-WithCustomHeaders

Sample Request

PUT 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",
  "properties": {
    "target": "foobar.contoso.com",
    "endpointStatus": "Enabled",
    "endpointLocation": "North Europe",
    "customHeaders": [
      {
        "name": "header-1",
        "value": "value-1"
      },
      {
        "name": "header-2",
        "value": "value-2"
      }
    ]
  }
}

Sample Response

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

Endpoint-PUT-External-WithGeoMapping

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager2191/providers/Microsoft.Network/trafficmanagerprofiles/azuresdkfornetautoresttrafficmanager8224/ExternalEndpoints/My%20external%20endpoint?api-version=2022-04-01

{
  "name": "My external endpoint",
  "type": "Microsoft.network/TrafficManagerProfiles/ExternalEndpoints",
  "properties": {
    "target": "foobar.contoso.com",
    "endpointStatus": "Enabled",
    "geoMapping": [
      "GEO-AS",
      "GEO-AF"
    ]
  }
}

Sample Response

{
  "id": "/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager2191/providers/Microsoft.Network/trafficManagerProfiles/azuresdkfornetautoresttrafficmanager8224/externalEndpoints/My external endpoint",
  "name": "My external endpoint",
  "type": "Microsoft.Network/trafficManagerProfiles/externalEndpoints",
  "properties": {
    "endpointStatus": "Enabled",
    "endpointMonitorStatus": "CheckingEndpoint",
    "target": "foobar.contoso.com",
    "weight": 1,
    "priority": 1,
    "geoMapping": [
      "GEO-AS",
      "GEO-AF"
    ]
  }
}
{
  "id": "/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager2191/providers/Microsoft.Network/trafficManagerProfiles/azuresdkfornetautoresttrafficmanager8224/externalEndpoints/My external endpoint",
  "name": "My external endpoint",
  "type": "Microsoft.Network/trafficManagerProfiles/externalEndpoints",
  "properties": {
    "endpointStatus": "Enabled",
    "endpointMonitorStatus": "CheckingEndpoint",
    "target": "foobar.contoso.com",
    "weight": 1,
    "priority": 1,
    "geoMapping": [
      "GEO-AS",
      "GEO-AF"
    ]
  }
}

Endpoint-PUT-External-WithLocation

Sample Request

PUT 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",
  "properties": {
    "target": "foobar.contoso.com",
    "endpointStatus": "Enabled",
    "endpointLocation": "North Europe"
  }
}

Sample Response

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

Endpoint-PUT-External-WithSubnetMapping

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager2191/providers/Microsoft.Network/trafficmanagerprofiles/azuresdkfornetautoresttrafficmanager8224/ExternalEndpoints/My%20external%20endpoint?api-version=2022-04-01

{
  "name": "My external endpoint",
  "type": "Microsoft.network/TrafficManagerProfiles/ExternalEndpoints",
  "properties": {
    "target": "foobar.contoso.com",
    "endpointStatus": "Enabled",
    "subnets": [
      {
        "first": "1.2.3.0",
        "scope": 24
      },
      {
        "first": "25.26.27.28",
        "last": "29.30.31.32"
      }
    ]
  }
}

Sample Response

{
  "id": "/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager2191/providers/Microsoft.Network/trafficManagerProfiles/azuresdkfornetautoresttrafficmanager8224/externalEndpoints/My external endpoint",
  "name": "My external endpoint",
  "type": "Microsoft.Network/trafficManagerProfiles/externalEndpoints",
  "properties": {
    "endpointStatus": "Enabled",
    "endpointMonitorStatus": "CheckingEndpoint",
    "target": "foobar.contoso.com",
    "weight": 1,
    "priority": 1,
    "subnets": [
      {
        "first": "1.2.3.0",
        "scope": 24
      },
      {
        "first": "25.26.27.28",
        "last": "29.30.31.32"
      }
    ]
  }
}
{
  "id": "/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager2191/providers/Microsoft.Network/trafficManagerProfiles/azuresdkfornetautoresttrafficmanager8224/externalEndpoints/My external endpoint",
  "name": "My external endpoint",
  "type": "Microsoft.Network/trafficManagerProfiles/externalEndpoints",
  "properties": {
    "endpointStatus": "Enabled",
    "endpointMonitorStatus": "CheckingEndpoint",
    "target": "foobar.contoso.com",
    "weight": 1,
    "priority": 1,
    "subnets": [
      {
        "first": "1.2.3.0",
        "scope": 24
      },
      {
        "first": "25.26.27.28",
        "last": "29.30.31.32"
      }
    ]
  }
}

定義

名稱 Description
AlwaysServe

如果已啟用 Always Serve,則會停用端點健全狀況的探查,並將端點包含在流量路由方法中。

CloudError

Azure Resource Manager 傳回的錯誤

CloudErrorBody

Azure Resource Manager 傳回的錯誤內容

CustomHeaders

自定義標頭的清單。

Endpoint

代表流量管理員端點的類別。

EndpointMonitorStatus

端點的監視狀態。

EndpointStatus

端點的狀態。 如果端點已啟用,則會探查其健全狀況,並將其包含在流量路由方式中。

EndpointType

要建立或更新之流量管理員端點的類型。

Subnets

使用「子網」流量路由方法時,對應至此端點的子網、IP 位址和/或地址範圍清單。 空白清單會符合其他端點未涵蓋的所有範圍。

AlwaysServe

如果已啟用 Always Serve,則會停用端點健全狀況的探查,並將端點包含在流量路由方法中。

名稱 類型 Description
Disabled

string

Enabled

string

CloudError

Azure Resource Manager 傳回的錯誤

名稱 類型 Description
error

CloudErrorBody

錯誤的內容。

CloudErrorBody

Azure Resource Manager 傳回的錯誤內容

名稱 類型 Description
code

string

錯誤碼

details

CloudErrorBody[]

錯誤詳細資料

message

string

錯誤訊息

target

string

錯誤目標

CustomHeaders

自定義標頭的清單。

名稱 類型 Description
name

string

標頭名稱。

value

string

標頭值。

Endpoint

代表流量管理員端點的類別。

名稱 類型 Description
id

string

資源的完整資源標識碼。 例如 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}

name

string

資源的名稱

properties.alwaysServe

AlwaysServe

如果已啟用 Always Serve,則會停用端點健全狀況的探查,並將端點包含在流量路由方法中。

properties.customHeaders

CustomHeaders[]

自定義標頭的清單。

properties.endpointLocation

string

使用「效能」流量路由方法時,指定外部或巢狀端點的位置。

properties.endpointMonitorStatus

EndpointMonitorStatus

端點的監視狀態。

properties.endpointStatus

EndpointStatus

端點的狀態。 如果端點已啟用,則會探查其健全狀況,並將其包含在流量路由方式中。

properties.geoMapping

string[]

使用「地理」流量路由方法時,對應至此端點的國家/地區清單。 如需已接受值的完整清單,請參閱流量管理員地理檔。

properties.minChildEndpoints

integer

子配置檔中必須可用的端點數目下限,才能將父配置檔視為可用。 僅適用於 『NestedEndpoints』 類型的端點。

properties.minChildEndpointsIPv4

integer

最少的 IPv4 (DNS 記錄類型 A) 端點,必須在子設定檔中使用,才能將父配置檔視為可用。 僅適用於 『NestedEndpoints』 類型的端點。

properties.minChildEndpointsIPv6

integer

必須可在子配置檔中使用的 IPv6 (DNS 記錄類型 AAAA) 端點數目下限,才能將父配置檔視為可用。 僅適用於 『NestedEndpoints』 類型的端點。

properties.priority

integer

使用「優先順序」流量路由方法時,此端點的優先順序。 可能的值為 1 到 1000,較低的值代表較高的優先順序。 這是選擇性參數。 如果已指定參數,必須在所有端點上加以指定,而且不可以有任何兩個端點共用相同的優先順序值。

properties.subnets

Subnets[]

使用「子網」流量路由方法時,對應至此端點的子網、IP 位址和/或地址範圍清單。 空白清單會符合其他端點未涵蓋的所有範圍。

properties.target

string

端點的完整 DNS 名稱或 IP 位址。 流量管理員會傳回 DNS 回應中的此值以將流量導向至此端點。

properties.targetResourceId

string

端點的 Azure 資源 URI。 不適用於 『ExternalEndpoints』 類型的端點。

properties.weight

integer

使用「加權」流量路由方法時,此端點的權數。 可能的值為 1 到 1000。

type

string

資源類型。 Ex- Microsoft.Network/trafficManagerProfiles。

EndpointMonitorStatus

端點的監視狀態。

名稱 類型 Description
CheckingEndpoint

string

Degraded

string

Disabled

string

Inactive

string

Online

string

Stopped

string

Unmonitored

string

EndpointStatus

端點的狀態。 如果端點已啟用,則會探查其健全狀況,並將其包含在流量路由方式中。

名稱 類型 Description
Disabled

string

Enabled

string

EndpointType

要建立或更新之流量管理員端點的類型。

名稱 類型 Description
AzureEndpoints

string

ExternalEndpoints

string

NestedEndpoints

string

Subnets

使用「子網」流量路由方法時,對應至此端點的子網、IP 位址和/或地址範圍清單。 空白清單會符合其他端點未涵蓋的所有範圍。

名稱 類型 Description
first

string

子網中的第一個位址。

last

string

子網中的最後一個位址。

scope

integer

區塊大小 (子網掩碼中的前置位數目) 。