Share via


Microsoft.Insights webtests 2015-05-01

Bicep 資源定義

Webtests 資源類型可以使用目標作業進行部署:

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

資源格式

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

resource symbolicname 'Microsoft.Insights/webtests@2015-05-01' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  kind: 'string'
  properties: {
    Configuration: {
      WebTest: 'string'
    }
    Description: 'string'
    Enabled: bool
    Frequency: int
    Kind: 'string'
    Locations: [
      {
        Id: 'string'
      }
    ]
    Name: 'string'
    RetryEnabled: bool
    SyntheticMonitorId: 'string'
    Timeout: int
  }
}

屬性值

webtests

名稱 描述
NAME 資源名稱 字串 (必要)
location 資源位置 字串 (必要)
tags 資源標籤 標記名稱和值的字典。 請參閱 範本中的標記
kind 此 Web 測試所監看的 Web 測試種類。 選擇是 ping 和 multistep。 'multistep'
'ping'
properties 描述 Azure 資源的 Web 測試的中繼資料。 WebTestProperties

WebTestProperties

名稱 描述
組態 WebTest 的 XML 組態規格。 WebTestPropertiesConfiguration
描述 此 WebTest 的用途/使用者定義描述性測試。 字串
啟用 是否正在主動監視測試。 bool
頻率 此 WebTest 的測試回合之間以秒為單位的間隔。 預設值為 300。 int
種類 這是 Web 測試的類型,有效的選擇是 ping 和 multistep。 'multistep'
需要 'ping' ()
位置 實際執行測試的來源清單,以提供應用程式協助工具的全域涵蓋範圍。 WebTestGeolocation[] (必要)
名稱 如果使用者定義名稱,則為這個 WebTest。 字串 (必要)
RetryEnabled 允許重試此 WebTest 失敗。 bool
SyntheticMonitorId 此 WebTest 的唯一識別碼。 這通常與 [名稱] 欄位相同。 字串 (必要)
逾時 此 WebTest 的逾時和失敗前的秒數。 預設值為 30。 int

WebTestPropertiesConfiguration

名稱 描述
WebTest 要針對應用程式執行的 WebTest XML 規格。 字串

WebTestGeolocation

名稱 描述
識別碼 要從中執行之 Webtest 的位置識別碼。 字串

快速入門範本

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

範本 描述
動態 Web 測試建立

部署至 Azure
建立任意數目的 App Insights Web (ping) 測試。
可用性測試的計量警示規則

部署至 Azure
此範本會建立 Application Insights 可用性測試,以及監視它的計量警示規則。

ARM 範本資源定義

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

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

資源格式

若要建立 Microsoft.Insights/webtests 資源,請將下列 JSON 新增至範本。

{
  "type": "Microsoft.Insights/webtests",
  "apiVersion": "2015-05-01",
  "name": "string",
  "location": "string",
  "tags": {
    "tagName1": "tagValue1",
    "tagName2": "tagValue2"
  },
  "kind": "string",
  "properties": {
    "Configuration": {
      "WebTest": "string"
    },
    "Description": "string",
    "Enabled": "bool",
    "Frequency": "int",
    "Kind": "string",
    "Locations": [
      {
        "Id": "string"
      }
    ],
    "Name": "string",
    "RetryEnabled": "bool",
    "SyntheticMonitorId": "string",
    "Timeout": "int"
  }
}

屬性值

webtests

名稱 描述
類型 資源類型 'Microsoft.Insights/webtests'
apiVersion 資源 API 版本 '2015-05-01'
NAME 資源名稱 需要字串 ()
location 資源位置 需要字串 ()
tags 資源標籤 標記名稱和值的字典。 請參閱 範本中的標籤
kind 此 Web 測試所監看的 Web 測試種類。 選項為 ping 和 multistep。 'multistep'
'ping'
properties 描述 Azure 資源的 Web 測試的中繼資料。 WebTestProperties

WebTestProperties

名稱 描述
組態 WebTest 的 XML 組態規格。 WebTestPropertiesConfiguration
描述 此 WebTest 的用途/使用者定義描述性測試。 字串
啟用 是否正在監視測試。 bool
頻率 此 WebTest 的測試回合之間以秒為單位的間隔。 預設值為 300。 int
種類 這是 Web 測試的種類,有效的選擇是 ping 和 multistep。 'multistep'
需要 'ping' ()
位置 實際執行測試的位置清單,以提供應用程式的可存取性全域涵蓋範圍。 WebTestGeolocation[] (必要)
名稱 如果使用者定義名稱,則為這個 WebTest。 需要字串 ()
RetryEnabled 如果此 WebTest 失敗,則允許重試。 bool
SyntheticMonitorId 此 WebTest 的唯一識別碼。 這通常與 [名稱] 欄位的值相同。 需要字串 ()
逾時 此 WebTest 逾時並失敗的秒數。 預設值為 30。 int

WebTestPropertiesConfiguration

名稱 描述
WebTest 要針對應用程式執行的 WebTest XML 規格。 字串

WebTestGeolocation

名稱 描述
識別碼 要從中執行之 Webtest 的位置識別碼。 字串

快速入門範本

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

範本 描述
動態 Web 測試建立

部署至 Azure
建立任意數目的 App Insights Web (ping) 測試。
可用性測試的計量警示規則

部署至 Azure
此範本會建立 Application Insights 可用性測試,以及監視它的計量警示規則。

Terraform (AzAPI 提供者) 資源定義

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

  • 資源群組

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

資源格式

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

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Insights/webtests@2015-05-01"
  name = "string"
  location = "string"
  parent_id = "string"
  tags = {
    tagName1 = "tagValue1"
    tagName2 = "tagValue2"
  }
  body = jsonencode({
    properties = {
      Configuration = {
        WebTest = "string"
      }
      Description = "string"
      Enabled = bool
      Frequency = int
      Kind = "string"
      Locations = [
        {
          Id = "string"
        }
      ]
      Name = "string"
      RetryEnabled = bool
      SyntheticMonitorId = "string"
      Timeout = int
    }
    kind = "string"
  })
}

屬性值

webtests

名稱 描述
類型 資源類型 「Microsoft.Insights/webtests@2015-05-01」
NAME 資源名稱 需要字串 ()
location 資源位置 需要字串 ()
parent_id 若要部署至資源群組,請使用該資源群組的識別碼。 需要字串 ()
tags 資源標籤 標記名稱和值的字典。
kind 此 Web 測試所監看的 Web 測試種類。 選項為 ping 和 multistep。 「multistep」
「ping」
properties 描述 Azure 資源的 Web 測試的中繼資料。 WebTestProperties

WebTestProperties

名稱 描述
組態 WebTest 的 XML 組態規格。 WebTestPropertiesConfiguration
描述 此 WebTest 的用途/使用者定義描述性測試。 字串
啟用 是否正在監視測試。 bool
頻率 此 WebTest 的測試回合之間以秒為單位的間隔。 預設值為 300。 int
種類 這是 Web 測試的種類,有效的選擇是 ping 和 multistep。 「multistep」
「ping」 (必要)
位置 實際執行測試的位置清單,以提供應用程式的可存取性全域涵蓋範圍。 WebTestGeolocation[] (必要)
名稱 如果使用者定義名稱,則為這個 WebTest。 需要字串 ()
RetryEnabled 如果此 WebTest 失敗,則允許重試。 bool
SyntheticMonitorId 此 WebTest 的唯一識別碼。 這通常與 [名稱] 欄位的值相同。 需要字串 ()
逾時 此 WebTest 逾時並失敗的秒數。 預設值為 30。 int

WebTestPropertiesConfiguration

名稱 描述
WebTest 要針對應用程式執行的 WebTest XML 規格。 字串

WebTestGeolocation

名稱 描述
識別碼 要從中執行之 Webtest 的位置識別碼。 字串