共用方式為


Profiles - Create Or Update

建立或更新流量管理員配置檔。

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

URI 參數

名稱 位於 必要 類型 Description
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}

location

string

資源所在的 Azure 區域

name

string

資源的名稱

properties.allowedEndpointRecordTypes

AllowedEndpointRecordType[]

允許的端點記錄類型清單。

properties.dnsConfig

DnsConfig

流量管理員配置檔的 DNS 設定。

properties.endpoints

Endpoint[]

流量管理員配置檔中的端點清單。

properties.maxReturn

integer

要針對 MultiValue 路由類型傳回的端點數目上限。

properties.monitorConfig

MonitorConfig

流量管理員配置檔的端點監視設定。

properties.profileStatus

ProfileStatus

流量管理員配置檔的狀態。

properties.trafficRoutingMethod

TrafficRoutingMethod

流量管理員配置檔的流量路由方法。

properties.trafficViewEnrollmentStatus

TrafficViewEnrollmentStatus

指出流量管理員配置檔的 「已啟用」或「已停用」流量檢視。 Null,表示 'Disabled'。 啟用此功能會增加流量管理配置檔的成本。

tags

object

資源標籤。

type

string

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

回應

名稱 類型 Description
200 OK

Profile

已建立或更新的流量管理員配置檔。

201 Created

Profile

已建立或更新的流量管理員配置檔。

Other Status Codes

CloudError

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

安全性

azure_auth

Azure Active Directory OAuth2 Flow

類型: oauth2
Flow: implicit
授權 URL: https://login.microsoftonline.com/common/oauth2/authorize

範圍

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

範例

Profile-PUT-MultiValue
Profile-PUT-NoEndpoints
Profile-PUT-WithAliasing
Profile-PUT-WithCustomHeaders
Profile-PUT-WithEndpoints
Profile-PUT-WithNestedEndpoints

Profile-PUT-MultiValue

範例要求

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

{
  "properties": {
    "profileStatus": "Enabled",
    "trafficRoutingMethod": "MultiValue",
    "dnsConfig": {
      "relativeName": "azsmnet6386",
      "ttl": 35
    },
    "monitorConfig": {
      "protocol": "HTTP",
      "port": 80,
      "path": "/testpath.aspx"
    },
    "trafficViewEnrollmentStatus": "Disabled",
    "maxReturn": 2
  },
  "location": "global"
}

範例回覆

{
  "id": "/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager1421/providers/Microsoft.Network/trafficManagerProfiles/azsmnet6386",
  "name": "azsmnet6386",
  "type": "Microsoft.Network/trafficManagerProfiles",
  "location": "global",
  "properties": {
    "profileStatus": "Enabled",
    "trafficRoutingMethod": "MultiValue",
    "dnsConfig": {
      "relativeName": "azsmnet6386",
      "fqdn": "azsmnet6386.tmpreview.watmtest.azure-test.net",
      "ttl": 35
    },
    "monitorConfig": {
      "profileMonitorStatus": "Inactive",
      "protocol": "HTTP",
      "port": 80,
      "path": "/testpath.aspx",
      "intervalInSeconds": 30,
      "toleratedNumberOfFailures": 3,
      "timeoutInSeconds": 10
    },
    "trafficViewEnrollmentStatus": "Disabled",
    "maxReturn": 2,
    "endpoints": []
  }
}
{
  "id": "/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager1421/providers/Microsoft.Network/trafficManagerProfiles/azsmnet6386",
  "name": "azsmnet6386",
  "type": "Microsoft.Network/trafficManagerProfiles",
  "location": "global",
  "properties": {
    "profileStatus": "Enabled",
    "trafficRoutingMethod": "MultiValue",
    "dnsConfig": {
      "relativeName": "azsmnet6386",
      "fqdn": "azsmnet6386.tmpreview.watmtest.azure-test.net",
      "ttl": 35
    },
    "monitorConfig": {
      "profileMonitorStatus": "Inactive",
      "protocol": "HTTP",
      "port": 80,
      "path": "/testpath.aspx",
      "intervalInSeconds": 30,
      "toleratedNumberOfFailures": 3,
      "timeoutInSeconds": 10
    },
    "trafficViewEnrollmentStatus": "Disabled",
    "maxReturn": 2,
    "endpoints": []
  }
}

Profile-PUT-NoEndpoints

範例要求

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

{
  "properties": {
    "profileStatus": "Enabled",
    "trafficRoutingMethod": "Performance",
    "dnsConfig": {
      "relativeName": "azsmnet6386",
      "ttl": 35
    },
    "monitorConfig": {
      "protocol": "HTTP",
      "port": 80,
      "path": "/testpath.aspx"
    }
  },
  "location": "global"
}

範例回覆

{
  "id": "/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager1421/providers/Microsoft.Network/trafficManagerProfiles/azsmnet6386",
  "name": "azsmnet6386",
  "type": "Microsoft.Network/trafficManagerProfiles",
  "location": "global",
  "properties": {
    "profileStatus": "Enabled",
    "trafficRoutingMethod": "Performance",
    "dnsConfig": {
      "relativeName": "azsmnet6386",
      "fqdn": "azsmnet6386.tmpreview.watmtest.azure-test.net",
      "ttl": 35
    },
    "monitorConfig": {
      "profileMonitorStatus": "Inactive",
      "protocol": "HTTP",
      "port": 80,
      "path": "/testpath.aspx",
      "intervalInSeconds": 30,
      "toleratedNumberOfFailures": 3,
      "timeoutInSeconds": 10
    },
    "endpoints": []
  }
}
{
  "id": "/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager1421/providers/Microsoft.Network/trafficManagerProfiles/azsmnet6386",
  "name": "azsmnet6386",
  "type": "Microsoft.Network/trafficManagerProfiles",
  "location": "global",
  "properties": {
    "profileStatus": "Enabled",
    "trafficRoutingMethod": "Performance",
    "dnsConfig": {
      "relativeName": "azsmnet6386",
      "fqdn": "azsmnet6386.tmpreview.watmtest.azure-test.net",
      "ttl": 35
    },
    "monitorConfig": {
      "profileMonitorStatus": "Inactive",
      "protocol": "HTTP",
      "port": 80,
      "path": "/testpath.aspx",
      "intervalInSeconds": 30,
      "toleratedNumberOfFailures": 3,
      "timeoutInSeconds": 10
    },
    "endpoints": []
  }
}

Profile-PUT-WithAliasing

範例要求

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager2583/providers/Microsoft.Network/trafficmanagerprofiles/azuresdkfornetautoresttrafficmanager6192?api-version=2022-04-01

{
  "properties": {
    "profileStatus": "Enabled",
    "trafficRoutingMethod": "Performance",
    "dnsConfig": {
      "relativeName": "azuresdkfornetautoresttrafficmanager6192",
      "ttl": 35
    },
    "monitorConfig": {
      "protocol": "HTTP",
      "port": 80,
      "path": "/testpath.aspx",
      "intervalInSeconds": 10,
      "timeoutInSeconds": 5,
      "toleratedNumberOfFailures": 2
    },
    "allowedEndpointRecordTypes": [
      "DomainName"
    ],
    "endpoints": [
      {
        "name": "My external endpoint",
        "type": "Microsoft.network/TrafficManagerProfiles/ExternalEndpoints",
        "properties": {
          "target": "foobar.contoso.com",
          "endpointStatus": "Enabled",
          "endpointLocation": "North Europe"
        }
      }
    ]
  },
  "location": "global"
}

範例回覆

{
  "id": "/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager2583/providers/Microsoft.Network/trafficManagerProfiles/azuresdkfornetautoresttrafficmanager6192",
  "name": "azuresdkfornetautoresttrafficmanager6192",
  "type": "Microsoft.Network/trafficManagerProfiles",
  "location": "global",
  "properties": {
    "profileStatus": "Enabled",
    "trafficRoutingMethod": "Performance",
    "dnsConfig": {
      "relativeName": "azuresdkfornetautoresttrafficmanager6192",
      "fqdn": "azuresdkfornetautoresttrafficmanager6192.tmpreview.watmtest.azure-test.net",
      "ttl": 35
    },
    "monitorConfig": {
      "profileMonitorStatus": "CheckingEndpoints",
      "protocol": "HTTP",
      "port": 80,
      "path": "/testpath.aspx",
      "intervalInSeconds": 10,
      "toleratedNumberOfFailures": 2,
      "timeoutInSeconds": 5,
      "customHeaders": [
        {
          "name": "header-1",
          "value": "value-1"
        },
        {
          "name": "header-2",
          "value": "value-2"
        }
      ]
    },
    "allowedEndpointRecordTypes": [
      "DomainName"
    ],
    "endpoints": [
      {
        "id": "/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager2583/providers/Microsoft.Network/trafficManagerProfiles/azuresdkfornetautoresttrafficmanager6192/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,
          "endpointLocation": "North Europe",
          "customHeaders": [
            {
              "name": "header-2",
              "value": "value-2-overridden"
            }
          ]
        }
      }
    ]
  }
}
{
  "id": "/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager2583/providers/Microsoft.Network/trafficManagerProfiles/azuresdkfornetautoresttrafficmanager6192",
  "name": "azuresdkfornetautoresttrafficmanager6192",
  "type": "Microsoft.Network/trafficManagerProfiles",
  "location": "global",
  "properties": {
    "profileStatus": "Enabled",
    "trafficRoutingMethod": "Performance",
    "dnsConfig": {
      "relativeName": "azuresdkfornetautoresttrafficmanager6192",
      "fqdn": "azuresdkfornetautoresttrafficmanager6192.tmpreview.watmtest.azure-test.net",
      "ttl": 35
    },
    "monitorConfig": {
      "profileMonitorStatus": "CheckingEndpoints",
      "protocol": "HTTP",
      "port": 80,
      "path": "/testpath.aspx",
      "intervalInSeconds": 10,
      "toleratedNumberOfFailures": 2,
      "timeoutInSeconds": 5,
      "customHeaders": [
        {
          "name": "header-1",
          "value": "value-1"
        },
        {
          "name": "header-2",
          "value": "value-2"
        }
      ]
    },
    "allowedEndpointRecordTypes": [
      "DomainName"
    ],
    "endpoints": [
      {
        "id": "/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager2583/providers/Microsoft.Network/trafficManagerProfiles/azuresdkfornetautoresttrafficmanager6192/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,
          "endpointLocation": "North Europe",
          "customHeaders": [
            {
              "name": "header-2",
              "value": "value-2-overridden"
            }
          ]
        }
      }
    ]
  }
}

Profile-PUT-WithCustomHeaders

範例要求

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager2583/providers/Microsoft.Network/trafficmanagerprofiles/azuresdkfornetautoresttrafficmanager6192?api-version=2022-04-01

{
  "properties": {
    "profileStatus": "Enabled",
    "trafficRoutingMethod": "Performance",
    "dnsConfig": {
      "relativeName": "azuresdkfornetautoresttrafficmanager6192",
      "ttl": 35
    },
    "monitorConfig": {
      "protocol": "HTTP",
      "port": 80,
      "path": "/testpath.aspx",
      "intervalInSeconds": 10,
      "timeoutInSeconds": 5,
      "toleratedNumberOfFailures": 2,
      "customHeaders": [
        {
          "name": "header-1",
          "value": "value-1"
        },
        {
          "name": "header-2",
          "value": "value-2"
        }
      ],
      "expectedStatusCodeRanges": [
        {
          "min": 200,
          "max": 205
        },
        {
          "min": 400,
          "max": 410
        }
      ]
    },
    "trafficViewEnrollmentStatus": "Disabled",
    "endpoints": [
      {
        "name": "My external endpoint",
        "type": "Microsoft.network/TrafficManagerProfiles/ExternalEndpoints",
        "properties": {
          "target": "foobar.contoso.com",
          "endpointStatus": "Enabled",
          "endpointLocation": "North Europe",
          "customHeaders": [
            {
              "name": "header-2",
              "value": "value-2-overridden"
            }
          ]
        }
      }
    ]
  },
  "location": "global"
}

範例回覆

{
  "id": "/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager2583/providers/Microsoft.Network/trafficManagerProfiles/azuresdkfornetautoresttrafficmanager6192",
  "name": "azuresdkfornetautoresttrafficmanager6192",
  "type": "Microsoft.Network/trafficManagerProfiles",
  "location": "global",
  "properties": {
    "profileStatus": "Enabled",
    "trafficRoutingMethod": "Performance",
    "dnsConfig": {
      "relativeName": "azuresdkfornetautoresttrafficmanager6192",
      "fqdn": "azuresdkfornetautoresttrafficmanager6192.tmpreview.watmtest.azure-test.net",
      "ttl": 35
    },
    "monitorConfig": {
      "profileMonitorStatus": "CheckingEndpoints",
      "protocol": "HTTP",
      "port": 80,
      "path": "/testpath.aspx",
      "intervalInSeconds": 10,
      "toleratedNumberOfFailures": 2,
      "timeoutInSeconds": 5,
      "customHeaders": [
        {
          "name": "header-1",
          "value": "value-1"
        },
        {
          "name": "header-2",
          "value": "value-2"
        }
      ]
    },
    "trafficViewEnrollmentStatus": "Disabled",
    "endpoints": [
      {
        "id": "/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager2583/providers/Microsoft.Network/trafficManagerProfiles/azuresdkfornetautoresttrafficmanager6192/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,
          "endpointLocation": "North Europe",
          "customHeaders": [
            {
              "name": "header-2",
              "value": "value-2-overridden"
            }
          ]
        }
      }
    ]
  }
}
{
  "id": "/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager2583/providers/Microsoft.Network/trafficManagerProfiles/azuresdkfornetautoresttrafficmanager6192",
  "name": "azuresdkfornetautoresttrafficmanager6192",
  "type": "Microsoft.Network/trafficManagerProfiles",
  "location": "global",
  "properties": {
    "profileStatus": "Enabled",
    "trafficRoutingMethod": "Performance",
    "dnsConfig": {
      "relativeName": "azuresdkfornetautoresttrafficmanager6192",
      "fqdn": "azuresdkfornetautoresttrafficmanager6192.tmpreview.watmtest.azure-test.net",
      "ttl": 35
    },
    "monitorConfig": {
      "profileMonitorStatus": "CheckingEndpoints",
      "protocol": "HTTP",
      "port": 80,
      "path": "/testpath.aspx",
      "intervalInSeconds": 10,
      "toleratedNumberOfFailures": 2,
      "timeoutInSeconds": 5,
      "customHeaders": [
        {
          "name": "header-1",
          "value": "value-1"
        },
        {
          "name": "header-2",
          "value": "value-2"
        }
      ]
    },
    "trafficViewEnrollmentStatus": "Disabled",
    "endpoints": [
      {
        "id": "/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager2583/providers/Microsoft.Network/trafficManagerProfiles/azuresdkfornetautoresttrafficmanager6192/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,
          "endpointLocation": "North Europe",
          "customHeaders": [
            {
              "name": "header-2",
              "value": "value-2-overridden"
            }
          ]
        }
      }
    ]
  }
}

Profile-PUT-WithEndpoints

範例要求

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager2583/providers/Microsoft.Network/trafficmanagerprofiles/azuresdkfornetautoresttrafficmanager6192?api-version=2022-04-01

{
  "properties": {
    "profileStatus": "Enabled",
    "trafficRoutingMethod": "Performance",
    "dnsConfig": {
      "relativeName": "azuresdkfornetautoresttrafficmanager6192",
      "ttl": 35
    },
    "monitorConfig": {
      "protocol": "HTTP",
      "port": 80,
      "path": "/testpath.aspx",
      "intervalInSeconds": 10,
      "timeoutInSeconds": 5,
      "toleratedNumberOfFailures": 2
    },
    "endpoints": [
      {
        "name": "My external endpoint",
        "type": "Microsoft.network/TrafficManagerProfiles/ExternalEndpoints",
        "properties": {
          "target": "foobar.contoso.com",
          "endpointStatus": "Enabled",
          "endpointLocation": "North Europe"
        }
      }
    ]
  },
  "location": "global"
}

範例回覆

{
  "id": "/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager2583/providers/Microsoft.Network/trafficManagerProfiles/azuresdkfornetautoresttrafficmanager6192",
  "name": "azuresdkfornetautoresttrafficmanager6192",
  "type": "Microsoft.Network/trafficManagerProfiles",
  "location": "global",
  "properties": {
    "profileStatus": "Enabled",
    "trafficRoutingMethod": "Performance",
    "dnsConfig": {
      "relativeName": "azuresdkfornetautoresttrafficmanager6192",
      "fqdn": "azuresdkfornetautoresttrafficmanager6192.tmpreview.watmtest.azure-test.net",
      "ttl": 35
    },
    "monitorConfig": {
      "profileMonitorStatus": "CheckingEndpoints",
      "protocol": "HTTP",
      "port": 80,
      "path": "/testpath.aspx",
      "intervalInSeconds": 10,
      "toleratedNumberOfFailures": 2,
      "timeoutInSeconds": 5
    },
    "endpoints": [
      {
        "id": "/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager2583/providers/Microsoft.Network/trafficManagerProfiles/azuresdkfornetautoresttrafficmanager6192/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,
          "endpointLocation": "North Europe"
        }
      }
    ]
  }
}
{
  "id": "/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager2583/providers/Microsoft.Network/trafficManagerProfiles/azuresdkfornetautoresttrafficmanager6192",
  "name": "azuresdkfornetautoresttrafficmanager6192",
  "type": "Microsoft.Network/trafficManagerProfiles",
  "location": "global",
  "properties": {
    "profileStatus": "Enabled",
    "trafficRoutingMethod": "Performance",
    "dnsConfig": {
      "relativeName": "azuresdkfornetautoresttrafficmanager6192",
      "fqdn": "azuresdkfornetautoresttrafficmanager6192.tmpreview.watmtest.azure-test.net",
      "ttl": 35
    },
    "monitorConfig": {
      "profileMonitorStatus": "CheckingEndpoints",
      "protocol": "HTTP",
      "port": 80,
      "path": "/testpath.aspx",
      "intervalInSeconds": 10,
      "toleratedNumberOfFailures": 2,
      "timeoutInSeconds": 5
    },
    "endpoints": [
      {
        "id": "/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager2583/providers/Microsoft.Network/trafficManagerProfiles/azuresdkfornetautoresttrafficmanager6192/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,
          "endpointLocation": "North Europe"
        }
      }
    ]
  }
}

Profile-PUT-WithNestedEndpoints

範例要求

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myresourcegroup/providers/Microsoft.Network/trafficmanagerprofiles/parentprofile?api-version=2022-04-01

{
  "properties": {
    "profileStatus": "Enabled",
    "trafficRoutingMethod": "Priority",
    "dnsConfig": {
      "relativeName": "parentprofile",
      "ttl": 35
    },
    "monitorConfig": {
      "protocol": "HTTP",
      "port": 80,
      "path": "/testpath.aspx",
      "intervalInSeconds": 10,
      "timeoutInSeconds": 5,
      "toleratedNumberOfFailures": 2
    },
    "endpoints": [
      {
        "name": "MyFirstNestedEndpoint",
        "type": "Microsoft.Network/trafficManagerProfiles/nestedEndpoints",
        "properties": {
          "target": "firstnestedprofile.tmpreview.watmtest.azure-test.net",
          "endpointStatus": "Enabled",
          "weight": 1,
          "priority": 1,
          "minChildEndpoints": 2,
          "minChildEndpointsIPv4": 1,
          "minChildEndpointsIPv6": 2
        }
      },
      {
        "name": "MySecondNestedEndpoint",
        "type": "Microsoft.Network/trafficManagerProfiles/nestedEndpoints",
        "properties": {
          "target": "secondnestedprofile.tmpreview.watmtest.azure-test.net",
          "endpointStatus": "Enabled",
          "weight": 1,
          "priority": 2,
          "minChildEndpoints": 2,
          "minChildEndpointsIPv4": 2,
          "minChildEndpointsIPv6": 1
        }
      }
    ]
  },
  "location": "global"
}

範例回覆

{
  "id": "/subscriptions/{subscription-id}/resourceGroups/myresourcegroup/providers/Microsoft.Network/trafficManagerProfiles/parentprofile",
  "name": "parentprofile",
  "type": "Microsoft.Network/trafficManagerProfiles",
  "location": "global",
  "properties": {
    "profileStatus": "Enabled",
    "trafficRoutingMethod": "Priority",
    "dnsConfig": {
      "relativeName": "parentprofile",
      "fqdn": "parentprofile.tmpreview.watmtest.azure-test.net",
      "ttl": 35
    },
    "monitorConfig": {
      "profileMonitorStatus": "CheckingEndpoints",
      "protocol": "HTTP",
      "port": 80,
      "path": "/testpath.aspx",
      "intervalInSeconds": 10,
      "toleratedNumberOfFailures": 2,
      "timeoutInSeconds": 5
    },
    "endpoints": [
      {
        "id": "/subscriptions/{subscription-id}/resourceGroups/myresourcegroup/providers/Microsoft.Network/trafficManagerProfiles/parentprofile/nestedEndpoints/MyFirstNestedEndpoint",
        "name": "MyFirstNestedEndpoint",
        "type": "Microsoft.Network/trafficManagerProfiles/nestedEndpoints",
        "properties": {
          "endpointStatus": "Enabled",
          "endpointMonitorStatus": "CheckingEndpoint",
          "target": "firstnestedprofile.tmpreview.watmtest.azure-test.net",
          "weight": 1,
          "priority": 1,
          "minChildEndpoints": 2,
          "minChildEndpointsIPv4": 1,
          "minChildEndpointsIPv6": 2
        }
      },
      {
        "id": "/subscriptions/{subscription-id}/resourceGroups/myresourcegroup/providers/Microsoft.Network/trafficManagerProfiles/parentprofile/nestedEndpoints/MySecondNestedEndpoint",
        "name": "MySecondNestedEndpoint",
        "type": "Microsoft.Network/trafficManagerProfiles/nestedEndpoints",
        "properties": {
          "endpointStatus": "Enabled",
          "endpointMonitorStatus": "CheckingEndpoint",
          "target": "secondnestedprofile.tmpreview.watmtest.azure-test.net",
          "weight": 1,
          "priority": 1,
          "minChildEndpoints": 2,
          "minChildEndpointsIPv4": 2,
          "minChildEndpointsIPv6": 1
        }
      }
    ]
  }
}
{
  "id": "/subscriptions/{subscription-id}/resourceGroups/myresourcegroup/providers/Microsoft.Network/trafficManagerProfiles/parentprofile",
  "name": "parentprofile",
  "type": "Microsoft.Network/trafficManagerProfiles",
  "location": "global",
  "properties": {
    "profileStatus": "Enabled",
    "trafficRoutingMethod": "Priority",
    "dnsConfig": {
      "relativeName": "parentprofile",
      "fqdn": "parentprofile.tmpreview.watmtest.azure-test.net",
      "ttl": 35
    },
    "monitorConfig": {
      "profileMonitorStatus": "CheckingEndpoints",
      "protocol": "HTTP",
      "port": 80,
      "path": "/testpath.aspx",
      "intervalInSeconds": 10,
      "toleratedNumberOfFailures": 2,
      "timeoutInSeconds": 5
    },
    "endpoints": [
      {
        "id": "/subscriptions/{subscription-id}/resourceGroups/myresourcegroup/providers/Microsoft.Network/trafficManagerProfiles/parentprofile/nestedEndpoints/MyFirstNestedEndpoint",
        "name": "MyFirstNestedEndpoint",
        "type": "Microsoft.Network/trafficManagerProfiles/nestedEndpoints",
        "properties": {
          "endpointStatus": "Enabled",
          "endpointMonitorStatus": "CheckingEndpoint",
          "target": "firstnestedprofile.tmpreview.watmtest.azure-test.net",
          "weight": 1,
          "priority": 1,
          "minChildEndpoints": 2,
          "minChildEndpointsIPv4": 1,
          "minChildEndpointsIPv6": 2
        }
      },
      {
        "id": "/subscriptions/{subscription-id}/resourceGroups/myresourcegroup/providers/Microsoft.Network/trafficManagerProfiles/parentprofile/nestedEndpoints/MySecondNestedEndpoint",
        "name": "MySecondNestedEndpoint",
        "type": "Microsoft.Network/trafficManagerProfiles/nestedEndpoints",
        "properties": {
          "endpointStatus": "Enabled",
          "endpointMonitorStatus": "CheckingEndpoint",
          "target": "secondnestedprofile.tmpreview.watmtest.azure-test.net",
          "weight": 1,
          "priority": 1,
          "minChildEndpoints": 2,
          "minChildEndpointsIPv4": 2,
          "minChildEndpointsIPv6": 1
        }
      }
    ]
  }
}

定義

名稱 Description
AllowedEndpointRecordType

這個設定檔的允許類型 DNS 記錄類型。

AlwaysServe

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

CloudError

Azure Resource Manager 傳回的錯誤

CloudErrorBody

Azure Resource Manager 傳回的錯誤內容

CustomHeaders

自定義標頭的清單。

DnsConfig

類別,其中包含流量管理員配置檔中的 DNS 設定。

Endpoint

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

EndpointMonitorStatus

端點的監視狀態。

EndpointStatus

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

ExpectedStatusCodeRanges

預期的狀態代碼範圍清單。

MonitorConfig

類別,其中包含流量管理員配置檔中的端點監視設定。

MonitorProtocol

用來探查端點健康情況的通訊協定 (HTTP、HTTPS 或 TCP) 。

Profile

代表流量管理員配置檔的類別。

ProfileMonitorStatus

流量管理員配置檔的配置檔層級監視狀態。

ProfileStatus

流量管理員配置檔的狀態。

Subnets

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

TrafficRoutingMethod

流量管理員配置檔的流量路由方法。

TrafficViewEnrollmentStatus

指出流量管理員配置檔的流量檢視為 「已啟用」或「已停用」。 Null,表示 'Disabled'。 啟用此功能會增加流量管理配置檔的成本。

AllowedEndpointRecordType

這個設定檔的允許類型 DNS 記錄類型。

名稱 類型 Description
Any

string

DomainName

string

IPv4Address

string

IPv6Address

string

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

標頭值。

DnsConfig

類別,其中包含流量管理員配置檔中的 DNS 設定。

名稱 類型 Description
fqdn

string

流量管理員配置檔的完整域名 (FQDN) 。 這是由 RelativeName 與 Azure 流量管理員所使用的 DNS 網域串連所形成。

relativeName

string

此流量管理員配置檔所提供的相對 DNS 名稱。 這個值會與由 Azure 流量管理員使用的 DNS 網域名稱結合,形成設定檔的完整網域名稱 (FQDN)。

ttl

integer

DNS 存留時間 (TTL) ,以秒為單位。 這會通知本機 DNS 解析程式和 DNS 用戶端快取此流量管理員配置檔所提供的 DNS 回應多久。

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

ExpectedStatusCodeRanges

預期的狀態代碼範圍清單。

名稱 類型 Description
max

integer

狀態代碼上限。

min

integer

最小狀態代碼。

MonitorConfig

類別,其中包含流量管理員配置檔中的端點監視設定。

名稱 類型 Description
customHeaders

CustomHeaders[]

自定義標頭的清單。

expectedStatusCodeRanges

ExpectedStatusCodeRanges[]

預期的狀態代碼範圍清單。

intervalInSeconds

integer

此配置檔中端點的監視間隔。 這是流量管理員會檢查此配置檔中每個端點健康情況的間隔。

path

string

與端點域名相對的路徑,用來探查端點健康情況。

port

integer

用來探查端點健康情況的 TCP 埠。

profileMonitorStatus

ProfileMonitorStatus

流量管理員配置檔的配置檔層級監視狀態。

protocol

MonitorProtocol

用來探查端點健康情況的通訊協定 (HTTP、HTTPS 或 TCP) 。

timeoutInSeconds

integer

此設定檔中端點的監視逾時。 這是流量管理員允許此配置檔中的端點回應健康情況檢查的時間。

toleratedNumberOfFailures

integer

流量管理員在宣告此配置檔中的端點在下次失敗健康狀態檢查之後降級之前,所容許的連續失敗健康情況檢查數目。

MonitorProtocol

用來探查端點健康情況的通訊協定 (HTTP、HTTPS 或 TCP) 。

名稱 類型 Description
HTTP

string

HTTPS

string

TCP

string

Profile

代表流量管理員配置檔的類別。

名稱 類型 Description
id

string

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

location

string

資源所在的 Azure 區域

name

string

資源的名稱

properties.allowedEndpointRecordTypes

AllowedEndpointRecordType[]

允許的端點記錄類型清單。

properties.dnsConfig

DnsConfig

流量管理員配置檔的 DNS 設定。

properties.endpoints

Endpoint[]

流量管理員配置檔中的端點清單。

properties.maxReturn

integer

要針對 MultiValue 路由類型傳回的端點數目上限。

properties.monitorConfig

MonitorConfig

流量管理員配置檔的端點監視設定。

properties.profileStatus

ProfileStatus

流量管理員配置檔的狀態。

properties.trafficRoutingMethod

TrafficRoutingMethod

流量管理員配置檔的流量路由方法。

properties.trafficViewEnrollmentStatus

TrafficViewEnrollmentStatus

指出流量管理員配置檔的流量檢視為 「已啟用」或「已停用」。 Null,表示 'Disabled'。 啟用此功能會增加流量管理配置檔的成本。

tags

object

資源標籤。

type

string

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

ProfileMonitorStatus

流量管理員配置檔的配置檔層級監視狀態。

名稱 類型 Description
CheckingEndpoints

string

Degraded

string

Disabled

string

Inactive

string

Online

string

ProfileStatus

流量管理員配置檔的狀態。

名稱 類型 Description
Disabled

string

Enabled

string

Subnets

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

名稱 類型 Description
first

string

子網中的第一個位址。

last

string

子網中的最後一個位址。

scope

integer

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

TrafficRoutingMethod

流量管理員配置檔的流量路由方法。

名稱 類型 Description
Geographic

string

MultiValue

string

Performance

string

Priority

string

Subnet

string

Weighted

string

TrafficViewEnrollmentStatus

指出流量管理員配置檔的流量檢視為 「已啟用」或「已停用」。 Null,表示 'Disabled'。 啟用此功能會增加流量管理配置檔的成本。

名稱 類型 Description
Disabled

string

Enabled

string