Microsoft.Network trafficmanagerprofiles 2017-05-01

Bicep 資源定義

trafficmanagerprofiles 資源類型可以使用目標作業來部署:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。

資源格式

若要建立 Microsoft.Network/trafficmanagerprofiles 資源,請將下列 Bicep 新增至您的範本。

resource symbolicname 'Microsoft.Network/trafficmanagerprofiles@2017-05-01' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  properties: {
    dnsConfig: {
      relativeName: 'string'
      ttl: int
    }
    endpoints: [
      {
        properties: {
          endpointLocation: 'string'
          endpointMonitorStatus: 'string'
          endpointStatus: 'string'
          geoMapping: [
            'string'
          ]
          minChildEndpoints: int
          priority: int
          target: 'string'
          targetResourceId: 'string'
          weight: int
        }
      }
    ]
    monitorConfig: {
      intervalInSeconds: int
      path: 'string'
      port: int
      profileMonitorStatus: 'string'
      protocol: 'string'
      timeoutInSeconds: int
      toleratedNumberOfFailures: int
    }
    profileStatus: 'string'
    trafficRoutingMethod: 'string'
  }
}

屬性值

trafficmanagerprofiles

名稱 描述
NAME 資源名稱 需要字串 ()

字元限制:1-63

有效字元:
英數字元、連字號和句號。

以英數字元開頭及結尾。

資源名稱在整個 Azure 中必須是唯一的。
location 資源所在的 Azure 區域 string
tags 資源標籤。 標記名稱和值的字典。 請參閱 範本中的標籤
properties 流量管理員設定檔的屬性。 ProfileProperties

ProfileProperties

名稱 描述
dnsConfig 流量管理員設定檔的 DNS 設定。 DnsConfig
端點 流量管理員設定檔中的端點清單。 Endpoint[]
monitorConfig 流量管理員設定檔的端點監視設定。 MonitorConfig
profileStatus 流量管理員設定檔的狀態。 'Disabled'
'Enabled'
trafficRoutingMethod 流量管理員設定檔的流量路由方法。 '地理'
'Performance'
'Priority'
'Weighted'

DnsConfig

名稱 描述
relativeName 此流量管理員設定檔所提供的相對 DNS 名稱。 這個值會與由 Azure 流量管理員使用的 DNS 網域名稱結合,形成設定檔的完整網域名稱 (FQDN)。 字串
ttl DNS 存留時間 (TTL) ,以秒為單位。 這會通知本機 DNS 解析程式和 DNS 用戶端快取此流量管理員設定檔所提供的 DNS 回應多久。 int

端點

名稱 描述
properties 流量管理員端點的屬性。 EndpointProperties

EndpointProperties

名稱 描述
endpointLocation 使用「效能」流量路由方法時,指定外部或巢狀端點的位置。 string
endpointMonitorStatus 端點的監視狀態。 'CheckingEndpoint'
「已降級」
'Disabled'
'Inactive'
'Online'
'Stopped'
endpointStatus 端點的狀態。 如果端點已啟用,則會探查其健全狀況,並將其包含在流量路由方式中。 'Disabled'
'Enabled'
geoMapping 使用「地理」流量路由方法時,對應至此端點的國家/地區清單。 如需已接受值的完整清單,請參閱流量管理員地理檔。 string[]
minChildEndpoints 子設定檔中必須可用的端點數目下限,才能將父設定檔視為可用。 僅適用于 'NestedEndpoints' 類型的端點。 int
priority 使用「優先順序」流量路由方法時,此端點的優先順序。 可能的值為 1 到 1000,較低的值代表較高的優先順序。 這是選擇性參數。 如果已指定參數,必須在所有端點上加以指定,而且不可以有任何兩個端點共用相同的優先順序值。 int
目標 端點的完整 DNS 名稱。 流量管理員會傳回 DNS 回應中的此值以將流量導向至此端點。 string
targetResourceId 端點的 Azure 資源 URI。 不適用於 'ExternalEndpoints' 類型的端點。 string
重量 使用「加權」流量路由方法時,此端點的權數。 可能的值為 1 到 1000。 int

MonitorConfig

名稱 描述
intervalInSeconds 此設定檔中端點的監視間隔。 這是流量管理員會檢查此設定檔中每個端點健康情況的間隔。 int
path 與端點功能變數名稱相對的路徑,用來探查端點健康情況。 string
連接埠 用來探查端點健康情況的 TCP 埠。 int
profileMonitorStatus 流量管理員設定檔的設定檔層級監視狀態。 'CheckingEndpoints'
「已降級」
'Disabled'
'Inactive'
'Online'
protocol 用來探查端點健康情況的通訊協定 (HTTP、HTTPS 或 TCP) 。 'HTTP'
'HTTPS'
'TCP'
timeoutInSeconds 此設定檔中端點的監視逾時。 這是流量管理員允許此設定檔中的端點回應健康情況檢查的時間。 int
toleratedNumberOfFailures 流量管理員在宣告此設定檔中的端點在下次失敗健康狀態檢查之後降級之前,所容許的連續失敗健康情況檢查數目。 int

快速入門範本

下列快速入門範本會部署此資源類型。

[範本] 描述
多層式流量管理員、L4 ILB、L7 AppGateway

部署至 Azure
此範本會部署虛擬網路、透過子網隔離網路、部署 VM 及設定負載平衡
Azure 流量管理員 + 應用程式閘道示範設定

部署至 Azure
此範本可讓您在應用程式閘道示範之上快速部署 Azure 流量管理員,以測試不同區域之間的流量分佈。
Azure 流量管理員示範設定

部署至 Azure
此範本可讓您快速部署 Azure 流量管理員示範,以測試不同區域之間的流量分佈。
Azure 流量管理員外部端點範例

部署至 Azure
此範本示範如何使用外部端點建立 Azure 流量管理員設定檔。
Azure 流量管理員多重值路由

部署至 Azure
此範本示範如何使用具有最小子系和多重值路由的巢狀端點來建立 Azure 流量管理員設定檔。
Azure 流量管理員 VM 範例

部署至 Azure
此範本示範如何跨多部虛擬機器建立 Azure 流量管理員設定檔負載平衡。
具有 可用性區域 的 Azure 流量管理員 VM 範例

部署至 Azure
此範本示範如何在放置於可用性區域的多個虛擬機器上建立 Azure 流量管理員設定檔負載平衡。
Azure 流量管理員 Web 應用程式範例

部署至 Azure
此範本示範如何為App Service建立 Azure 流量管理員設定檔。

ARM 範本資源定義

trafficmanagerprofiles 資源類型可以使用目標作業來部署:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。

資源格式

若要建立 Microsoft.Network/trafficmanagerprofiles 資源,請將下列 JSON 新增至您的範本。

{
  "type": "Microsoft.Network/trafficmanagerprofiles",
  "apiVersion": "2017-05-01",
  "name": "string",
  "location": "string",
  "tags": {
    "tagName1": "tagValue1",
    "tagName2": "tagValue2"
  },
  "properties": {
    "dnsConfig": {
      "relativeName": "string",
      "ttl": "int"
    },
    "endpoints": [
      {
        "properties": {
          "endpointLocation": "string",
          "endpointMonitorStatus": "string",
          "endpointStatus": "string",
          "geoMapping": [ "string" ],
          "minChildEndpoints": "int",
          "priority": "int",
          "target": "string",
          "targetResourceId": "string",
          "weight": "int"
        }
      }
    ],
    "monitorConfig": {
      "intervalInSeconds": "int",
      "path": "string",
      "port": "int",
      "profileMonitorStatus": "string",
      "protocol": "string",
      "timeoutInSeconds": "int",
      "toleratedNumberOfFailures": "int"
    },
    "profileStatus": "string",
    "trafficRoutingMethod": "string"
  }
}

屬性值

trafficmanagerprofiles

名稱 描述
類型 資源類型 'Microsoft.Network/trafficmanagerprofiles'
apiVersion 資源 API 版本 '2017-05-01'
NAME 資源名稱 需要字串 ()

字元限制:1-63

有效字元:
英數字元、連字號和句號。

以英數字元開頭及結尾。

資源名稱在整個 Azure 中必須是唯一的。
location 資源所在的 Azure 區域 string
tags 資源標籤。 標記名稱和值的字典。 請參閱 範本中的標籤
properties 流量管理員設定檔的屬性。 ProfileProperties

ProfileProperties

名稱 描述
dnsConfig 流量管理員設定檔的 DNS 設定。 DnsConfig
端點 流量管理員設定檔中的端點清單。 Endpoint[]
monitorConfig 流量管理員設定檔的端點監視設定。 MonitorConfig
profileStatus 流量管理員設定檔的狀態。 'Disabled'
'Enabled'
trafficRoutingMethod 流量管理員設定檔的流量路由方法。 '地理'
'Performance'
'Priority'
'Weighted'

DnsConfig

名稱 描述
relativeName 此流量管理員設定檔所提供的相對 DNS 名稱。 這個值會與由 Azure 流量管理員使用的 DNS 網域名稱結合,形成設定檔的完整網域名稱 (FQDN)。 字串
ttl DNS 存留時間 (TTL) ,以秒為單位。 這會通知本機 DNS 解析程式和 DNS 用戶端快取此流量管理員設定檔所提供的 DNS 回應多久。 int

端點

名稱 描述
properties 流量管理員端點的屬性。 EndpointProperties

EndpointProperties

名稱 描述
endpointLocation 使用「效能」流量路由方法時,指定外部或巢狀端點的位置。 string
endpointMonitorStatus 端點的監視狀態。 'CheckingEndpoint'
「已降級」
'Disabled'
'Inactive'
'Online'
'Stopped'
endpointStatus 端點的狀態。 如果端點已啟用,則會探查其健全狀況,並將其包含在流量路由方式中。 'Disabled'
'Enabled'
geoMapping 使用「地理」流量路由方法時,對應至此端點的國家/地區清單。 如需已接受值的完整清單,請參閱流量管理員地理檔。 string[]
minChildEndpoints 子設定檔中必須可用的端點數目下限,才能將父設定檔視為可用。 僅適用于 'NestedEndpoints' 類型的端點。 int
priority 使用「優先順序」流量路由方法時,此端點的優先順序。 可能的值為 1 到 1000,較低的值代表較高的優先順序。 這是選擇性參數。 如果已指定參數,必須在所有端點上加以指定,而且不可以有任何兩個端點共用相同的優先順序值。 int
目標 端點的完整 DNS 名稱。 流量管理員會傳回 DNS 回應中的此值以將流量導向至此端點。 string
targetResourceId 端點的 Azure 資源 URI。 不適用於 'ExternalEndpoints' 類型的端點。 string
重量 使用「加權」流量路由方法時,此端點的權數。 可能的值為 1 到 1000。 int

MonitorConfig

名稱 描述
intervalInSeconds 此設定檔中端點的監視間隔。 這是流量管理員會檢查此設定檔中每個端點健康情況的間隔。 int
path 相對於用來探查端點健全狀況之端點功能變數名稱的路徑。 string
連接埠 用來探查端點健康情況的 TCP 埠。 int
profileMonitorStatus 流量管理員設定檔的設定檔層級監視狀態。 'CheckingEndpoints'
'已降級'
'Disabled'
'Inactive'
'Online'
protocol 用來探查端點健康情況的通訊協定 (HTTP、HTTPS 或 TCP) 。 'HTTP'
'HTTPS'
'TCP'
timeoutInSeconds 此設定檔中端點的監視逾時。 這是流量管理員允許此設定檔中的端點回應健康情況檢查的時間。 int
toleratedNumberOfFailures 流量管理員在宣告此設定檔中的端點在下次失敗健康情況檢查之後降級之前,所容許的連續失敗健康情況檢查數目。 int

快速入門範本

下列快速入門範本會部署此資源類型。

[範本] 描述
多層流量管理員、L4 ILB、L7 AppGateway

部署至 Azure
此範本會部署虛擬網路、透過子網隔離網路、部署 VM 並設定負載平衡
Azure 流量管理員 + 應用程式閘道示範設定

部署至 Azure
此範本可讓您在應用程式閘道示範之上快速部署 Azure 流量管理員,以測試不同區域之間的流量分佈。
Azure 流量管理員示範設定

部署至 Azure
此範本可讓您快速部署 Azure 流量管理員示範,以測試不同區域之間的流量分佈。
Azure 流量管理員外部端點範例

部署至 Azure
此範本示範如何使用外部端點建立 Azure 流量管理員設定檔。
Azure 流量管理員多重值路由

部署至 Azure
此範本示範如何使用具有最小子系和多重值路由的巢狀端點來建立 Azure 流量管理員設定檔。
Azure 流量管理員 VM 範例

部署至 Azure
此範本示範如何跨多部虛擬機器建立 Azure 流量管理員設定檔負載平衡。
使用 可用性區域 的 Azure 流量管理員 VM 範例

部署至 Azure
此範本示範如何在放置於可用性區域的多個虛擬機器上建立 Azure 流量管理員設定檔負載平衡。
Azure 流量管理員 Web 應用程式範例

部署至 Azure
此範本示範如何為App Service建立 Azure 流量管理員設定檔。

Terraform (AzAPI 提供者) 資源定義

trafficmanagerprofiles 資源類型可以使用目標作業來部署:

  • 資源群組

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄

資源格式

若要建立 Microsoft.Network/trafficmanagerprofiles 資源,請將下列 Terraform 新增至您的範本。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Network/trafficmanagerprofiles@2017-05-01"
  name = "string"
  location = "string"
  parent_id = "string"
  tags = {
    tagName1 = "tagValue1"
    tagName2 = "tagValue2"
  }
  body = jsonencode({
    properties = {
      dnsConfig = {
        relativeName = "string"
        ttl = int
      }
      endpoints = [
        {
          properties = {
            endpointLocation = "string"
            endpointMonitorStatus = "string"
            endpointStatus = "string"
            geoMapping = [
              "string"
            ]
            minChildEndpoints = int
            priority = int
            target = "string"
            targetResourceId = "string"
            weight = int
          }
        }
      ]
      monitorConfig = {
        intervalInSeconds = int
        path = "string"
        port = int
        profileMonitorStatus = "string"
        protocol = "string"
        timeoutInSeconds = int
        toleratedNumberOfFailures = int
      }
      profileStatus = "string"
      trafficRoutingMethod = "string"
    }
  })
}

屬性值

trafficmanagerprofiles

名稱 描述
類型 資源類型 「Microsoft.Network/trafficmanagerprofiles@2017-05-01」
NAME 資源名稱 字串 (必要)

字元限制:1-63

有效字元:
英數字元、連字號和句號。

以英數字元開頭及結尾。

資源名稱在 Azure 中必須是唯一的。
location 資源所在的 Azure 區域 string
parent_id 若要部署至資源群組,請使用該資源群組的識別碼。 字串 (必要)
tags 資源標籤。 標記名稱和值的字典。
properties 流量管理員設定檔的屬性。 ProfileProperties

ProfileProperties

名稱 描述
dnsConfig 流量管理員設定檔的 DNS 設定。 DnsConfig
端點 流量管理員設定檔中的端點清單。 Endpoint[]
monitorConfig 流量管理員設定檔的端點監視設定。 MonitorConfig
profileStatus 流量管理員設定檔的狀態。 「Disabled」
「Enabled」
trafficRoutingMethod 流量管理員設定檔的流量路由方法。 「地理」
「效能」
「Priority」
「Weighted」

DnsConfig

名稱 描述
relativeName 此流量管理員設定檔所提供的相對 DNS 名稱。 這個值會與由 Azure 流量管理員使用的 DNS 網域名稱結合,形成設定檔的完整網域名稱 (FQDN)。 字串
ttl DNS 存留時間 (TTL) ,以秒為單位。 這會通知本機 DNS 解析程式和 DNS 用戶端快取此流量管理員設定檔所提供的 DNS 回應多久。 int

端點

名稱 描述
properties 流量管理員端點的屬性。 EndpointProperties

EndpointProperties

名稱 描述
endpointLocation 使用「效能」流量路由方法時,指定外部或巢狀端點的位置。 string
endpointMonitorStatus 端點的監視狀態。 「CheckingEndpoint」
「已降級」
「Disabled」
「Inactive」
「Online」
「Stopped」
endpointStatus 端點的狀態。 如果端點已啟用,則會探查其健全狀況,並將其包含在流量路由方式中。 「Disabled」
「Enabled」
geoMapping 使用「地理」流量路由方法時,對應至此端點的國家/地區清單。 如需已接受值的完整清單,請參閱流量管理員地理檔。 string[]
minChildEndpoints 子設定檔中必須可用的端點數目下限,才能將父設定檔視為可用。 僅適用于 'NestedEndpoints' 類型的端點。 int
priority 使用「優先順序」流量路由方法時,此端點的優先順序。 可能的值為 1 到 1000,較低的值代表較高的優先順序。 這是選擇性參數。 如果已指定參數,必須在所有端點上加以指定,而且不可以有任何兩個端點共用相同的優先順序值。 int
目標 端點的完整 DNS 名稱。 流量管理員會傳回 DNS 回應中的此值以將流量導向至此端點。 string
targetResourceId 端點的 Azure 資源 URI。 不適用於 'ExternalEndpoints' 類型的端點。 string
重量 使用「加權」流量路由方法時,此端點的權數。 可能的值為 1 到 1000。 int

MonitorConfig

名稱 描述
intervalInSeconds 此設定檔中端點的監視間隔。 這是流量管理員會檢查此設定檔中每個端點健康情況的間隔。 int
path 與端點功能變數名稱相對的路徑,用來探查端點健康情況。 string
連接埠 用來探查端點健康情況的 TCP 埠。 int
profileMonitorStatus 流量管理員設定檔的設定檔層級監視狀態。 「CheckingEndpoints」
「已降級」
「Disabled」
「非使用中」
「Online」
protocol 用來探查端點健康情況的通訊協定 (HTTP、HTTPS 或 TCP) 。 "HTTP"
「HTTPS」
「TCP」
timeoutInSeconds 此設定檔中端點的監視逾時。 這是流量管理員允許此設定檔中的端點回應健康情況檢查的時間。 int
toleratedNumberOfFailures 流量管理員在宣告此設定檔中的端點在下次失敗健康狀態檢查之後降級之前,所容許的連續失敗健康情況檢查數目。 int