Bicep 資源定義
trafficmanagerprofiles 資源類型可以使用目標作業來部署:
- 資源群組 - 請參閱 資源群組部署命令
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。
使用範例
Bicep 範例
部署流量管理員設定檔的基本範例。
param resourceName string = 'acctest0001'
param location string = 'westeurope'
resource trafficManagerProfile 'Microsoft.Network/trafficManagerProfiles@2018-08-01' = {
name: resourceName
location: 'global'
properties: {
dnsConfig: {
relativeName: 'acctest-tmp-230630034107605443'
ttl: 30
}
monitorConfig: {
expectedStatusCodeRanges: []
intervalInSeconds: 30
path: '/'
port: 443
protocol: 'HTTPS'
timeoutInSeconds: 10
toleratedNumberOfFailures: 3
}
trafficRoutingMethod: 'Weighted'
}
}
Azure 已驗證的模組
下列 Azure 驗證模組 可用來部署此資源類型。
| 模組 | 描述 |
|---|---|
| 流量管理員配置檔 | 流量管理員配置檔的AVM資源模組 |
Azure 快速入門範例
下列 Azure 快速入門範本 包含用於部署此資源類型的 Bicep 範例。
| Bicep 檔案 | 描述 |
|---|---|
| Azure 流量管理員外部端點範例 | 此範本示範如何使用外部端點建立 Azure 流量管理員配置檔。 |
| Azure 流量管理員 VM 範例 | 此範本示範如何建立跨多部虛擬機的 Azure 流量管理員配置檔負載平衡。 |
| Azure 流量管理員 Web 應用程式範例 | 此範本示範如何建立 App Service 的 Azure 流量管理員配置檔。 |
資源格式
若要建立 Microsoft.Network/trafficmanagerprofiles 資源,請將下列 Bicep 新增至範本。
resource symbolicname 'Microsoft.Network/trafficmanagerprofiles@2026-09-01' = {
location: 'string'
name: 'string'
properties: {
allowedEndpointRecordTypes: [
'string'
]
dnsConfig: {
relativeName: 'string'
ttl: int
}
endpoints: [
{
id: 'string'
name: 'string'
properties: {
alwaysServe: 'string'
customHeaders: [
{
name: 'string'
value: 'string'
}
]
endpointLocation: 'string'
endpointMonitorStatus: 'string'
endpointStatus: 'string'
geoMapping: [
'string'
]
minChildEndpoints: int
minChildEndpointsIPv4: int
minChildEndpointsIPv6: int
priority: int
subnets: [
{
first: 'string'
last: 'string'
scope: int
}
]
target: 'string'
targetResourceId: 'string'
weight: int
}
type: 'string'
}
]
maxReturn: int
monitorConfig: {
customHeaders: [
{
name: 'string'
value: 'string'
}
]
expectedStatusCodeRanges: [
{
max: int
min: int
}
]
intervalInSeconds: int
path: 'string'
port: int
profileMonitorStatus: 'string'
protocol: 'string'
timeoutInSeconds: int
toleratedNumberOfFailures: int
}
profileStatus: 'string'
recordType: 'string'
trafficRoutingMethod: 'string'
trafficViewEnrollmentStatus: 'string'
}
tags: {
{customized property}: 'string'
}
}
屬性值
Microsoft.Network/trafficmanager配置檔
| 名字 | 描述 | 價值 |
|---|---|---|
| 位置 | 資源所在的 Azure 區域 | 字串 |
| 名字 | 資源名稱 | 字串 (必要) |
| 性能 | 流量管理員配置檔的屬性。 | ProfileProperties |
| 標籤 | 資源標籤 | 標記名稱和值的字典。 請參閱範本中的 標籤 |
DnsConfig
| 名字 | 描述 | 價值 |
|---|---|---|
| relativeName (相對名稱) | 此流量管理員配置檔所提供的相對 DNS 名稱。 此值會與 Azure 流量管理員所使用的 DNS 功能變數名稱結合,以形成配置檔的完整功能變數名稱 (FQDN)。 | 字串 |
| ttl | DNS 時間To-Live (TTL),以秒為單位。 這會通知本機 DNS 解析程式和 DNS 用戶端快取此流量管理員配置檔所提供的 DNS 回應多久。 | 整數 (int) |
端點
| 名字 | 描述 | 價值 |
|---|---|---|
| 識別碼 | 資源的完整資源標識碼。 例如 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} | 字串 |
| 名字 | 資源的名稱 | 字串 |
| 性能 | 流量管理員端點的屬性。 | 端點屬性 |
| 型別 | 資源的型別。 Ex- Microsoft.Network/trafficManagerProfiles。 | 字串 |
端點屬性
| 名字 | 描述 | 價值 |
|---|---|---|
| alwaysServe 始終服務 | 如果已啟用 Always Serve,將會停用端點健全狀況探查,並將端點包含在流量路由方法中。 | “已禁用” “已啟用” |
| 自定義標頭 | 自定義標頭的清單。 | EndpointPropertiesCustomHeadersItem[] |
| endpointLocation | 使用「效能」流量路由方法時,指定外部或巢狀端點的位置。 | 字串 |
| endpointMonitorStatus | 端點的監視狀態。 | “檢查端點” 「已降級」 “已禁用” “非活動” “在線” “停止” “不受監控” |
| endpointStatus | 端點的狀態。 如果端點為 Enabled,則會針對端點健康情況進行探查,並包含在流量路由方法中。 | “已禁用” “已啟用” |
| 地理測繪 | 使用「地理」流量路由方法時,對應至此端點的國家/地區清單。 如需已接受值的完整清單,請參閱流量管理員地理檔。 | 字串[] |
| minChildEndpoints 的 | 子配置檔中必須可用的端點數目下限,才能將父配置檔視為可用。 僅適用於類型為 『NestedEndpoints』 的端點。 | 整數 (int) |
| minChildEndpointsIPv4 | 子配置檔中必須有可用的 IPv4 (DNS 記錄類型 A) 端點數目下限,才能將父設定檔視為可用。 僅適用於類型為 『NestedEndpoints』 的端點。 | 整數 (int) |
| minChildEndpointsIPv6 | 必須可在子配置檔中取得的 IPv6 (DNS 記錄類型 AAAA) 端點數目下限,才能將父配置檔視為可用。 僅適用於類型為 『NestedEndpoints』 的端點。 | 整數 (int) |
| 優先權 | 使用「優先順序」流量路由方法時,此端點的優先順序。 可能的值為 1 到 1000,較低的值代表較高的優先順序。 這是選擇性參數。 如果指定,則必須在所有端點上指定它,而且沒有任何兩個端點可以共用相同的優先順序值。 | 整數 (int) |
| 子網 | 使用「子網」流量路由方法時,對應至此端點的子網、IP 位址和/或地址範圍清單。 空白清單會符合其他端點未涵蓋的所有範圍。 | EndpointPropertiesSubnetsItem[] |
| 目標 | 端點的完整 DNS 名稱或 IP 位址。 流量管理員會在 DNS 回應中傳回此值,以將流量導向此端點。 | 字串 |
| 目標資源ID | 端點的 Azure 資源 URI。 不適用於類型為 『ExternalEndpoints』 的端點。 | 字串 |
| 重量 | 使用「加權」流量路由方法時,此端點的權數。 可能的值為 1 到 1000。 | 整數 (int) |
EndpointPropertiesCustomHeadersItem
| 名字 | 描述 | 價值 |
|---|---|---|
| 名字 | 標頭名稱。 | 字串 |
| 價值 | 標頭值。 | 字串 |
EndpointPropertiesSubnetsItem
| 名字 | 描述 | 價值 |
|---|---|---|
| 第一 | 子網中的第一個位址。 | 字串 |
| 最後 | 子網中的最後一個位址。 | 字串 |
| 範圍 | 區塊大小(子網掩碼中的前置位數目)。 | 整數 (int) |
監視器設定
| 名字 | 描述 | 價值 |
|---|---|---|
| 自定義標頭 | 自定義標頭的清單。 | MonitorConfigCustomHeadersItem[] |
| expectedStatusCodeRanges | 預期的狀態代碼範圍清單。 | 監視器ConfigExpectedStatusCodeRangesItem[] |
| 時間間隔(秒) | 此配置檔中端點的監視間隔。 這是流量管理員會檢查此配置檔中每個端點健康情況的間隔。 | 整數 (int) |
| 路徑 | 相對於用來探查端點健康情況之端點功能變數名稱的路徑。 | 字串 |
| 傳輸埠 | 用來探查端點健康情況的 TCP 埠。 | 整數 (int) |
| profileMonitorStatus | 流量管理員配置檔的配置檔層級監視狀態。 | '檢查端點' 「已降級」 “已禁用” “非活動” “在線” |
| 通訊協定 | 用來探查端點健康情況的通訊協定(HTTP、HTTPS 或 TCP)。 | 'HTTP' 'HTTPS' “TCP” |
| timeoutInSeconds | 此設定檔中端點的監視逾時。 這是流量管理員允許此配置檔中的端點回應健康狀態檢查的時間。 | 整數 (int) |
| toleratedNumberOfFailures | 流量管理員在宣告此配置檔中的端點在下次失敗健康狀態檢查之後降級之前,所容許的連續失敗健康情況檢查數目。 | 整數 (int) |
監視器配置自定義標頭項
| 名字 | 描述 | 價值 |
|---|---|---|
| 名字 | 標頭名稱。 | 字串 |
| 價值 | 標頭值。 | 字串 |
監視器ConfigExpectedStatusCodeRangesItem
| 名字 | 描述 | 價值 |
|---|---|---|
| 麥克斯 | 狀態代碼上限。 | 整數 (int) |
| 分鐘 | 最小狀態代碼。 | 整數 (int) |
ProfileProperties
| 名字 | 描述 | 價值 |
|---|---|---|
| allowedEndpointRecordTypes | 允許的端點記錄類型清單。 | 包含任何的字串數組: '任何' '域名' 'IPv4位址' 'IPv6位址' |
| dnsConfig 的 | 流量管理員配置檔的 DNS 設定。 | DnsConfig |
| 端點 | 流量管理員配置檔中的端點清單。 | 端點[] |
| 最大返回 | 要針對 MultiValue 路由類型傳回的端點數目上限。 | 整數 (int) |
| monitorConfig 的 | 流量管理員配置檔的端點監視設定。 | 監控配置 |
| profileStatus | 流量管理員配置檔的狀態。 | “已禁用” “已啟用” |
| recordType | 設置記錄類型后,流量管理器配置檔將僅允許與此類型匹配的終結點。 如果沒有設定,流量管理設定檔會允許新增所有類型的端點。 若未設定此值,則會以空回傳。 | 'A' 'AAAA' 'CNAME' |
| trafficRouting方法 | 流量管理員配置檔的流量路由方法。 | '地理' 多值” “性能” “優先” “子網” 「加權」 |
| trafficViewEnrollmentStatus | 指出流量管理員配置檔的流量檢視為「已啟用」或「已停用」。 Null,表示 'Disabled'。 啟用此功能會增加流量管理配置檔的成本。 | “已禁用” “已啟用” |
TrackedResourceTags
| 名字 | 描述 | 價值 |
|---|
ARM 樣本資源定義
trafficmanagerprofiles 資源類型可以使用目標作業來部署:
使用範例
Azure 快速入門範本
下列 Azure 快速入門範本 部署此資源類型。
| 範本 | 描述 |
|---|---|
|
Azure 流量管理員 + 應用程式閘道示範設定 |
此範本可讓您在應用程式閘道示範之上快速部署 Azure 流量管理員,以測試不同區域之間的流量分佈。 |
|
Azure 流量管理員示範設定 |
此範本可讓您快速部署 Azure 流量管理員示範,以測試不同區域之間的流量分佈。 |
|
Azure 流量管理員外部端點範例 |
此範本示範如何使用外部端點建立 Azure 流量管理員配置檔。 |
|
Azure 流量管理員多重值路由 |
此範本示範如何使用巢狀端點搭配最小子系和多重值路由來建立 Azure 流量管理員配置檔。 |
|
Azure 流量管理員 VM 範例 |
此範本示範如何建立跨多部虛擬機的 Azure 流量管理員配置檔負載平衡。 |
|
可用性區域 的 Azure 流量管理員 VM 範例 |
此範本示範如何跨放置於可用性區域的多個虛擬機建立 Azure 流量管理員配置檔負載平衡。 |
|
Azure 流量管理員 Web 應用程式範例 |
此範本示範如何建立 App Service 的 Azure 流量管理員配置檔。 |
|
多層式流量管理員、L4 ILB、L7 AppGateway |
此範本會部署虛擬網路、透過子網隔離網路、部署 VM 並設定負載平衡 |
資源格式
若要建立 Microsoft.Network/trafficmanagerprofiles 資源,請將下列 JSON 新增至範本。
{
"type": "Microsoft.Network/trafficmanagerprofiles",
"apiVersion": "2026-09-01",
"name": "string",
"location": "string",
"properties": {
"allowedEndpointRecordTypes": [ "string" ],
"dnsConfig": {
"relativeName": "string",
"ttl": "int"
},
"endpoints": [
{
"id": "string",
"name": "string",
"properties": {
"alwaysServe": "string",
"customHeaders": [
{
"name": "string",
"value": "string"
}
],
"endpointLocation": "string",
"endpointMonitorStatus": "string",
"endpointStatus": "string",
"geoMapping": [ "string" ],
"minChildEndpoints": "int",
"minChildEndpointsIPv4": "int",
"minChildEndpointsIPv6": "int",
"priority": "int",
"subnets": [
{
"first": "string",
"last": "string",
"scope": "int"
}
],
"target": "string",
"targetResourceId": "string",
"weight": "int"
},
"type": "string"
}
],
"maxReturn": "int",
"monitorConfig": {
"customHeaders": [
{
"name": "string",
"value": "string"
}
],
"expectedStatusCodeRanges": [
{
"max": "int",
"min": "int"
}
],
"intervalInSeconds": "int",
"path": "string",
"port": "int",
"profileMonitorStatus": "string",
"protocol": "string",
"timeoutInSeconds": "int",
"toleratedNumberOfFailures": "int"
},
"profileStatus": "string",
"recordType": "string",
"trafficRoutingMethod": "string",
"trafficViewEnrollmentStatus": "string"
},
"tags": {
"{customized property}": "string"
}
}
屬性值
Microsoft.Network/trafficmanager配置檔
| 名字 | 描述 | 價值 |
|---|---|---|
| apiVersion | API 版本 | '2026-09-01' |
| 位置 | 資源所在的 Azure 區域 | 字串 |
| 名字 | 資源名稱 | 字串 (必要) |
| 性能 | 流量管理員配置檔的屬性。 | ProfileProperties |
| 標籤 | 資源標籤 | 標記名稱和值的字典。 請參閱範本中的 標籤 |
| 型別 | 資源類型 | “Microsoft.Network/trafficmanagerprofiles” |
DnsConfig
| 名字 | 描述 | 價值 |
|---|---|---|
| relativeName (相對名稱) | 此流量管理員配置檔所提供的相對 DNS 名稱。 此值會與 Azure 流量管理員所使用的 DNS 功能變數名稱結合,以形成配置檔的完整功能變數名稱 (FQDN)。 | 字串 |
| ttl | DNS 時間To-Live (TTL),以秒為單位。 這會通知本機 DNS 解析程式和 DNS 用戶端快取此流量管理員配置檔所提供的 DNS 回應多久。 | 整數 (int) |
端點
| 名字 | 描述 | 價值 |
|---|---|---|
| 識別碼 | 資源的完整資源標識碼。 例如 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} | 字串 |
| 名字 | 資源的名稱 | 字串 |
| 性能 | 流量管理員端點的屬性。 | 端點屬性 |
| 型別 | 資源的型別。 Ex- Microsoft.Network/trafficManagerProfiles。 | 字串 |
端點屬性
| 名字 | 描述 | 價值 |
|---|---|---|
| alwaysServe 始終服務 | 如果已啟用 Always Serve,將會停用端點健全狀況探查,並將端點包含在流量路由方法中。 | “已禁用” “已啟用” |
| 自定義標頭 | 自定義標頭的清單。 | EndpointPropertiesCustomHeadersItem[] |
| endpointLocation | 使用「效能」流量路由方法時,指定外部或巢狀端點的位置。 | 字串 |
| endpointMonitorStatus | 端點的監視狀態。 | “檢查端點” 「已降級」 “已禁用” “非活動” “在線” “停止” “不受監控” |
| endpointStatus | 端點的狀態。 如果端點為 Enabled,則會針對端點健康情況進行探查,並包含在流量路由方法中。 | “已禁用” “已啟用” |
| 地理測繪 | 使用「地理」流量路由方法時,對應至此端點的國家/地區清單。 如需已接受值的完整清單,請參閱流量管理員地理檔。 | 字串[] |
| minChildEndpoints 的 | 子配置檔中必須可用的端點數目下限,才能將父配置檔視為可用。 僅適用於類型為 『NestedEndpoints』 的端點。 | 整數 (int) |
| minChildEndpointsIPv4 | 子配置檔中必須有可用的 IPv4 (DNS 記錄類型 A) 端點數目下限,才能將父設定檔視為可用。 僅適用於類型為 『NestedEndpoints』 的端點。 | 整數 (int) |
| minChildEndpointsIPv6 | 必須可在子配置檔中取得的 IPv6 (DNS 記錄類型 AAAA) 端點數目下限,才能將父配置檔視為可用。 僅適用於類型為 『NestedEndpoints』 的端點。 | 整數 (int) |
| 優先權 | 使用「優先順序」流量路由方法時,此端點的優先順序。 可能的值為 1 到 1000,較低的值代表較高的優先順序。 這是選擇性參數。 如果指定,則必須在所有端點上指定它,而且沒有任何兩個端點可以共用相同的優先順序值。 | 整數 (int) |
| 子網 | 使用「子網」流量路由方法時,對應至此端點的子網、IP 位址和/或地址範圍清單。 空白清單會符合其他端點未涵蓋的所有範圍。 | EndpointPropertiesSubnetsItem[] |
| 目標 | 端點的完整 DNS 名稱或 IP 位址。 流量管理員會在 DNS 回應中傳回此值,以將流量導向此端點。 | 字串 |
| 目標資源ID | 端點的 Azure 資源 URI。 不適用於類型為 『ExternalEndpoints』 的端點。 | 字串 |
| 重量 | 使用「加權」流量路由方法時,此端點的權數。 可能的值為 1 到 1000。 | 整數 (int) |
EndpointPropertiesCustomHeadersItem
| 名字 | 描述 | 價值 |
|---|---|---|
| 名字 | 標頭名稱。 | 字串 |
| 價值 | 標頭值。 | 字串 |
EndpointPropertiesSubnetsItem
| 名字 | 描述 | 價值 |
|---|---|---|
| 第一 | 子網中的第一個位址。 | 字串 |
| 最後 | 子網中的最後一個位址。 | 字串 |
| 範圍 | 區塊大小(子網掩碼中的前置位數目)。 | 整數 (int) |
監視器設定
| 名字 | 描述 | 價值 |
|---|---|---|
| 自定義標頭 | 自定義標頭的清單。 | MonitorConfigCustomHeadersItem[] |
| expectedStatusCodeRanges | 預期的狀態代碼範圍清單。 | 監視器ConfigExpectedStatusCodeRangesItem[] |
| 時間間隔(秒) | 此配置檔中端點的監視間隔。 這是流量管理員會檢查此配置檔中每個端點健康情況的間隔。 | 整數 (int) |
| 路徑 | 相對於用來探查端點健康情況之端點功能變數名稱的路徑。 | 字串 |
| 傳輸埠 | 用來探查端點健康情況的 TCP 埠。 | 整數 (int) |
| profileMonitorStatus | 流量管理員配置檔的配置檔層級監視狀態。 | '檢查端點' 「已降級」 “已禁用” “非活動” “在線” |
| 通訊協定 | 用來探查端點健康情況的通訊協定(HTTP、HTTPS 或 TCP)。 | 'HTTP' 'HTTPS' “TCP” |
| timeoutInSeconds | 此設定檔中端點的監視逾時。 這是流量管理員允許此配置檔中的端點回應健康狀態檢查的時間。 | 整數 (int) |
| toleratedNumberOfFailures | 流量管理員在宣告此配置檔中的端點在下次失敗健康狀態檢查之後降級之前,所容許的連續失敗健康情況檢查數目。 | 整數 (int) |
監視器配置自定義標頭項
| 名字 | 描述 | 價值 |
|---|---|---|
| 名字 | 標頭名稱。 | 字串 |
| 價值 | 標頭值。 | 字串 |
監視器ConfigExpectedStatusCodeRangesItem
| 名字 | 描述 | 價值 |
|---|---|---|
| 麥克斯 | 狀態代碼上限。 | 整數 (int) |
| 分鐘 | 最小狀態代碼。 | 整數 (int) |
ProfileProperties
| 名字 | 描述 | 價值 |
|---|---|---|
| allowedEndpointRecordTypes | 允許的端點記錄類型清單。 | 包含任何的字串數組: '任何' '域名' 'IPv4位址' 'IPv6位址' |
| dnsConfig 的 | 流量管理員配置檔的 DNS 設定。 | DnsConfig |
| 端點 | 流量管理員配置檔中的端點清單。 | 端點[] |
| 最大返回 | 要針對 MultiValue 路由類型傳回的端點數目上限。 | 整數 (int) |
| monitorConfig 的 | 流量管理員配置檔的端點監視設定。 | 監控配置 |
| profileStatus | 流量管理員配置檔的狀態。 | “已禁用” “已啟用” |
| recordType | 設置記錄類型后,流量管理器配置檔將僅允許與此類型匹配的終結點。 如果沒有設定,流量管理設定檔會允許新增所有類型的端點。 若未設定此值,則會以空回傳。 | 'A' 'AAAA' 'CNAME' |
| trafficRouting方法 | 流量管理員配置檔的流量路由方法。 | '地理' 多值” “性能” “優先” “子網” 「加權」 |
| trafficViewEnrollmentStatus | 指出流量管理員配置檔的流量檢視為「已啟用」或「已停用」。 Null,表示 'Disabled'。 啟用此功能會增加流量管理配置檔的成本。 | “已禁用” “已啟用” |
TrackedResourceTags
| 名字 | 描述 | 價值 |
|---|
Terraform (AzAPI 提供者) 資源定義
trafficmanagerprofiles 資源類型可以使用目標作業來部署:
- 資源團體 關於每個 API 版本變更屬性的清單,請參見 變更日誌。
使用範例
Terraform 範例
部署流量管理員設定檔的基本範例。
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "resource_name" {
type = string
default = "acctest0001"
}
variable "location" {
type = string
default = "westeurope"
}
resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
location = var.location
}
resource "azapi_resource" "trafficManagerProfile" {
type = "Microsoft.Network/trafficManagerProfiles@2018-08-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = "global"
body = {
properties = {
dnsConfig = {
relativeName = "acctest-tmp-230630034107605443"
ttl = 30
}
monitorConfig = {
expectedStatusCodeRanges = [
]
intervalInSeconds = 30
path = "/"
port = 443
protocol = "HTTPS"
timeoutInSeconds = 10
toleratedNumberOfFailures = 3
}
trafficRoutingMethod = "Weighted"
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
Azure 已驗證的模組
下列 Azure 驗證模組 可用來部署此資源類型。
| 模組 | 描述 |
|---|---|
| 流量管理員配置檔 | 流量管理員配置檔的AVM資源模組 |
資源格式
若要建立 Microsoft.Network/trafficmanagerprofiles 資源,請將下列 Terraform 新增至範本。
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Network/trafficmanagerprofiles@2026-09-01"
name = "string"
parent_id = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = {
properties = {
allowedEndpointRecordTypes = [
"string"
]
dnsConfig = {
relativeName = "string"
ttl = int
}
endpoints = [
{
id = "string"
name = "string"
properties = {
alwaysServe = "string"
customHeaders = [
{
name = "string"
value = "string"
}
]
endpointLocation = "string"
endpointMonitorStatus = "string"
endpointStatus = "string"
geoMapping = [
"string"
]
minChildEndpoints = int
minChildEndpointsIPv4 = int
minChildEndpointsIPv6 = int
priority = int
subnets = [
{
first = "string"
last = "string"
scope = int
}
]
target = "string"
targetResourceId = "string"
weight = int
}
type = "string"
}
]
maxReturn = int
monitorConfig = {
customHeaders = [
{
name = "string"
value = "string"
}
]
expectedStatusCodeRanges = [
{
max = int
min = int
}
]
intervalInSeconds = int
path = "string"
port = int
profileMonitorStatus = "string"
protocol = "string"
timeoutInSeconds = int
toleratedNumberOfFailures = int
}
profileStatus = "string"
recordType = "string"
trafficRoutingMethod = "string"
trafficViewEnrollmentStatus = "string"
}
}
}
屬性值
Microsoft.Network/trafficmanager配置檔
| 名字 | 描述 | 價值 |
|---|---|---|
| 位置 | 資源所在的 Azure 區域 | 字串 |
| 名字 | 資源名稱 | 字串 (必要) |
| 性能 | 流量管理員配置檔的屬性。 | ProfileProperties |
| 標籤 | 資源標籤 | 標記名稱和值的字典。 |
| 型別 | 資源類型 | 「Microsoft。電視台/trafficmanagerprofiles@2026-09-01」 |
DnsConfig
| 名字 | 描述 | 價值 |
|---|---|---|
| relativeName (相對名稱) | 此流量管理員配置檔所提供的相對 DNS 名稱。 此值會與 Azure 流量管理員所使用的 DNS 功能變數名稱結合,以形成配置檔的完整功能變數名稱 (FQDN)。 | 字串 |
| ttl | DNS 時間To-Live (TTL),以秒為單位。 這會通知本機 DNS 解析程式和 DNS 用戶端快取此流量管理員配置檔所提供的 DNS 回應多久。 | 整數 (int) |
端點
| 名字 | 描述 | 價值 |
|---|---|---|
| 識別碼 | 資源的完整資源標識碼。 例如 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} | 字串 |
| 名字 | 資源的名稱 | 字串 |
| 性能 | 流量管理員端點的屬性。 | 端點屬性 |
| 型別 | 資源的型別。 Ex- Microsoft.Network/trafficManagerProfiles。 | 字串 |
端點屬性
| 名字 | 描述 | 價值 |
|---|---|---|
| alwaysServe 始終服務 | 如果已啟用 Always Serve,將會停用端點健全狀況探查,並將端點包含在流量路由方法中。 | “已禁用” “已啟用” |
| 自定義標頭 | 自定義標頭的清單。 | EndpointPropertiesCustomHeadersItem[] |
| endpointLocation | 使用「效能」流量路由方法時,指定外部或巢狀端點的位置。 | 字串 |
| endpointMonitorStatus | 端點的監視狀態。 | “檢查端點” 「已降級」 “已禁用” “非活動” “在線” “停止” “不受監控” |
| endpointStatus | 端點的狀態。 如果端點為 Enabled,則會針對端點健康情況進行探查,並包含在流量路由方法中。 | “已禁用” “已啟用” |
| 地理測繪 | 使用「地理」流量路由方法時,對應至此端點的國家/地區清單。 如需已接受值的完整清單,請參閱流量管理員地理檔。 | 字串[] |
| minChildEndpoints 的 | 子配置檔中必須可用的端點數目下限,才能將父配置檔視為可用。 僅適用於類型為 『NestedEndpoints』 的端點。 | 整數 (int) |
| minChildEndpointsIPv4 | 子配置檔中必須有可用的 IPv4 (DNS 記錄類型 A) 端點數目下限,才能將父設定檔視為可用。 僅適用於類型為 『NestedEndpoints』 的端點。 | 整數 (int) |
| minChildEndpointsIPv6 | 必須可在子配置檔中取得的 IPv6 (DNS 記錄類型 AAAA) 端點數目下限,才能將父配置檔視為可用。 僅適用於類型為 『NestedEndpoints』 的端點。 | 整數 (int) |
| 優先權 | 使用「優先順序」流量路由方法時,此端點的優先順序。 可能的值為 1 到 1000,較低的值代表較高的優先順序。 這是選擇性參數。 如果指定,則必須在所有端點上指定它,而且沒有任何兩個端點可以共用相同的優先順序值。 | 整數 (int) |
| 子網 | 使用「子網」流量路由方法時,對應至此端點的子網、IP 位址和/或地址範圍清單。 空白清單會符合其他端點未涵蓋的所有範圍。 | EndpointPropertiesSubnetsItem[] |
| 目標 | 端點的完整 DNS 名稱或 IP 位址。 流量管理員會在 DNS 回應中傳回此值,以將流量導向此端點。 | 字串 |
| 目標資源ID | 端點的 Azure 資源 URI。 不適用於類型為 『ExternalEndpoints』 的端點。 | 字串 |
| 重量 | 使用「加權」流量路由方法時,此端點的權數。 可能的值為 1 到 1000。 | 整數 (int) |
EndpointPropertiesCustomHeadersItem
| 名字 | 描述 | 價值 |
|---|---|---|
| 名字 | 標頭名稱。 | 字串 |
| 價值 | 標頭值。 | 字串 |
EndpointPropertiesSubnetsItem
| 名字 | 描述 | 價值 |
|---|---|---|
| 第一 | 子網中的第一個位址。 | 字串 |
| 最後 | 子網中的最後一個位址。 | 字串 |
| 範圍 | 區塊大小(子網掩碼中的前置位數目)。 | 整數 (int) |
監視器設定
| 名字 | 描述 | 價值 |
|---|---|---|
| 自定義標頭 | 自定義標頭的清單。 | MonitorConfigCustomHeadersItem[] |
| expectedStatusCodeRanges | 預期的狀態代碼範圍清單。 | 監視器ConfigExpectedStatusCodeRangesItem[] |
| 時間間隔(秒) | 此配置檔中端點的監視間隔。 這是流量管理員會檢查此配置檔中每個端點健康情況的間隔。 | 整數 (int) |
| 路徑 | 相對於用來探查端點健康情況之端點功能變數名稱的路徑。 | 字串 |
| 傳輸埠 | 用來探查端點健康情況的 TCP 埠。 | 整數 (int) |
| profileMonitorStatus | 流量管理員配置檔的配置檔層級監視狀態。 | '檢查端點' 「已降級」 “已禁用” “非活動” “在線” |
| 通訊協定 | 用來探查端點健康情況的通訊協定(HTTP、HTTPS 或 TCP)。 | 'HTTP' 'HTTPS' “TCP” |
| timeoutInSeconds | 此設定檔中端點的監視逾時。 這是流量管理員允許此配置檔中的端點回應健康狀態檢查的時間。 | 整數 (int) |
| toleratedNumberOfFailures | 流量管理員在宣告此配置檔中的端點在下次失敗健康狀態檢查之後降級之前,所容許的連續失敗健康情況檢查數目。 | 整數 (int) |
監視器配置自定義標頭項
| 名字 | 描述 | 價值 |
|---|---|---|
| 名字 | 標頭名稱。 | 字串 |
| 價值 | 標頭值。 | 字串 |
監視器ConfigExpectedStatusCodeRangesItem
| 名字 | 描述 | 價值 |
|---|---|---|
| 麥克斯 | 狀態代碼上限。 | 整數 (int) |
| 分鐘 | 最小狀態代碼。 | 整數 (int) |
ProfileProperties
| 名字 | 描述 | 價值 |
|---|---|---|
| allowedEndpointRecordTypes | 允許的端點記錄類型清單。 | 包含任何的字串數組: '任何' '域名' 'IPv4位址' 'IPv6位址' |
| dnsConfig 的 | 流量管理員配置檔的 DNS 設定。 | DnsConfig |
| 端點 | 流量管理員配置檔中的端點清單。 | 端點[] |
| 最大返回 | 要針對 MultiValue 路由類型傳回的端點數目上限。 | 整數 (int) |
| monitorConfig 的 | 流量管理員配置檔的端點監視設定。 | 監控配置 |
| profileStatus | 流量管理員配置檔的狀態。 | “已禁用” “已啟用” |
| recordType | 設置記錄類型后,流量管理器配置檔將僅允許與此類型匹配的終結點。 如果沒有設定,流量管理設定檔會允許新增所有類型的端點。 若未設定此值,則會以空回傳。 | 'A' 'AAAA' 'CNAME' |
| trafficRouting方法 | 流量管理員配置檔的流量路由方法。 | '地理' 多值” “性能” “優先” “子網” 「加權」 |
| trafficViewEnrollmentStatus | 指出流量管理員配置檔的流量檢視為「已啟用」或「已停用」。 Null,表示 'Disabled'。 啟用此功能會增加流量管理配置檔的成本。 | “已禁用” “已啟用” |
TrackedResourceTags
| 名字 | 描述 | 價值 |
|---|