你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Microsoft.Insights webtests 2018-05-01-preview

Bicep 资源定义

可以使用目标操作部署 Webtests 资源类型:

有关每个 API 版本中已更改属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.Insights/webtests 资源,请将以下 Bicep 添加到模板。

resource symbolicname 'Microsoft.Insights/webtests@2018-05-01-preview' = {
  kind: 'string'
  location: 'string'
  name: 'string'
  properties: {
    Configuration: {
      WebTest: 'string'
    }
    Description: 'string'
    Enabled: bool
    Frequency: int
    Kind: 'string'
    Locations: [
      {
        Id: 'string'
      }
    ]
    Name: 'string'
    Request: {
      FollowRedirects: bool
      Headers: [
        {
          key: 'string'
          value: 'string'
        }
      ]
      HttpVerb: 'string'
      ParseDependentRequests: bool
      RequestBody: 'string'
      RequestUrl: 'string'
    }
    RetryEnabled: bool
    SyntheticMonitorId: 'string'
    Timeout: int
    ValidationRules: {
      ContentValidation: {
        ContentMatch: 'string'
        IgnoreCase: bool
        PassIfTextFound: bool
      }
      ExpectedHttpStatusCode: int
      IgnoreHttpsStatusCode: bool
      SSLCertRemainingLifetimeCheck: int
      SSLCheck: bool
    }
  }
  tags: {
    {customized property}: 'string'
  }
}

属性值

HeaderField

名字 描述 价值
钥匙 标头的名称。 字符串
价值 标头的值。 字符串

Microsoft.Insights/webtests

名字 描述 价值
此 Web 测试监视的 WebTest 类型。 选项为 ping 和 multistep。 “multistep”
“ping”
位置 资源位置 string (必需)
名字 资源名称 string (必需)
性能 描述 Azure 资源的 Web 测试的元数据。 WebTestProperties
标签 资源标记 标记名称和值的字典。 请参阅模板 中的 标记

WebTestGeolocation

名字 描述 价值
Id 要从中运行的 WebTest 的位置 ID。 字符串

WebTestProperties

名字 描述 价值
配置 WebTest 的 XML 配置规范。 WebTestPropertiesConfiguration
描述 此 WebTest 的用户定义说明。 字符串
启用 正在主动监视测试。 bool
频率 此 WebTest 的测试运行间隔(以秒为单位)。 默认值为 300。 int
Web 测试的类型是 ping、多步骤、基本和标准。 “basic”
“multistep”
“ping”
“standard”(必需)
地点 一个列表,其中列出了从何处物理运行测试,以便为应用程序的可访问性提供全局覆盖范围。 WebTestGeolocation[] (必需)
名字 如果用户定义的名称,则为此 WebTest。 string (必需)
请求 请求属性的集合 WebTestPropertiesRequest
RetryEnabled 如果此 WebTest 失败,则允许重试。 bool
SyntheticMonitorId 此 WebTest 的唯一 ID。 此值通常与“名称”字段相同。 string (必需)
超时 直到此 WebTest 超时并失败的秒。 默认值为 30。 int
ValidationRules 验证规则属性的集合 WebTestPropertiesValidationRules

WebTestPropertiesConfiguration

名字 描述 价值
WebTest 要针对应用程序运行的 WebTest 的 XML 规范。 字符串

WebTestPropertiesRequest

名字 描述 价值
FollowRedirects 按照此 Web 测试的重定向操作。 bool
要添加到 WebTest 调用的标头及其值的列表。 HeaderField[]
HttpVerb 要用于此 Web 测试的 Http 谓词。 字符串
ParseDependentRequests 分析此 WebTest 的从属请求。 bool
RequestBody 要随此 Web 测试一起发送的 Base64 编码字符串正文。 字符串
RequestUrl 要测试的 URL 位置。 字符串

WebTestPropertiesValidationRules

名字 描述 价值
ContentValidation 内容验证属性的集合 WebTestPropertiesValidationRulesContentValidation
ExpectedHttpStatusCode 验证 WebTest 是否返回提供的 http 状态代码。 int
IgnoreHttpsStatusCode 设置后,验证将忽略状态代码。 bool
SSLCertRemainingLifetimeCheck 在现有 SSL 证书过期之前,仍要检查的天数。 值必须为正值,SSLCheck 必须设置为 true。 int
SSLCheck 检查 SSL 证书是否仍然有效。 bool

WebTestPropertiesValidationRulesContentValidation

名字 描述 价值
ContentMatch 在 WebTest 的返回中查找的内容。 不得为 null 或为空。 字符串
IgnoreCase 设置后,此值会使 ContentMatch 验证大小写不区分大小写。 bool
PassIfTextFound 如果为 true,则如果 ContentMatch 字符串匹配,则验证将传递。 如果为 false,则如果存在匹配项,验证将失败 bool

WebtestsResourceTags

名字 描述 价值

ARM 模板资源定义

可以使用目标操作部署 Webtests 资源类型:

有关每个 API 版本中已更改属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.Insights/webtests 资源,请将以下 JSON 添加到模板。

{
  "type": "Microsoft.Insights/webtests",
  "apiVersion": "2018-05-01-preview",
  "name": "string",
  "kind": "string",
  "location": "string",
  "properties": {
    "Configuration": {
      "WebTest": "string"
    },
    "Description": "string",
    "Enabled": "bool",
    "Frequency": "int",
    "Kind": "string",
    "Locations": [
      {
        "Id": "string"
      }
    ],
    "Name": "string",
    "Request": {
      "FollowRedirects": "bool",
      "Headers": [
        {
          "key": "string",
          "value": "string"
        }
      ],
      "HttpVerb": "string",
      "ParseDependentRequests": "bool",
      "RequestBody": "string",
      "RequestUrl": "string"
    },
    "RetryEnabled": "bool",
    "SyntheticMonitorId": "string",
    "Timeout": "int",
    "ValidationRules": {
      "ContentValidation": {
        "ContentMatch": "string",
        "IgnoreCase": "bool",
        "PassIfTextFound": "bool"
      },
      "ExpectedHttpStatusCode": "int",
      "IgnoreHttpsStatusCode": "bool",
      "SSLCertRemainingLifetimeCheck": "int",
      "SSLCheck": "bool"
    }
  },
  "tags": {
    "{customized property}": "string"
  }
}

属性值

HeaderField

名字 描述 价值
钥匙 标头的名称。 字符串
价值 标头的值。 字符串

Microsoft.Insights/webtests

名字 描述 价值
apiVersion API 版本 '2018-05-01-preview'
此 Web 测试监视的 WebTest 类型。 选项为 ping 和 multistep。 “multistep”
“ping”
位置 资源位置 string (必需)
名字 资源名称 string (必需)
性能 描述 Azure 资源的 Web 测试的元数据。 WebTestProperties
标签 资源标记 标记名称和值的字典。 请参阅模板 中的 标记
类型 资源类型 “Microsoft.Insights/webtests”

WebTestGeolocation

名字 描述 价值
Id 要从中运行的 WebTest 的位置 ID。 字符串

WebTestProperties

名字 描述 价值
配置 WebTest 的 XML 配置规范。 WebTestPropertiesConfiguration
描述 此 WebTest 的用户定义说明。 字符串
启用 正在主动监视测试。 bool
频率 此 WebTest 的测试运行间隔(以秒为单位)。 默认值为 300。 int
Web 测试的类型是 ping、多步骤、基本和标准。 “basic”
“multistep”
“ping”
“standard”(必需)
地点 一个列表,其中列出了从何处物理运行测试,以便为应用程序的可访问性提供全局覆盖范围。 WebTestGeolocation[] (必需)
名字 如果用户定义的名称,则为此 WebTest。 string (必需)
请求 请求属性的集合 WebTestPropertiesRequest
RetryEnabled 如果此 WebTest 失败,则允许重试。 bool
SyntheticMonitorId 此 WebTest 的唯一 ID。 此值通常与“名称”字段相同。 string (必需)
超时 直到此 WebTest 超时并失败的秒。 默认值为 30。 int
ValidationRules 验证规则属性的集合 WebTestPropertiesValidationRules

WebTestPropertiesConfiguration

名字 描述 价值
WebTest 要针对应用程序运行的 WebTest 的 XML 规范。 字符串

WebTestPropertiesRequest

名字 描述 价值
FollowRedirects 按照此 Web 测试的重定向操作。 bool
要添加到 WebTest 调用的标头及其值的列表。 HeaderField[]
HttpVerb 要用于此 Web 测试的 Http 谓词。 字符串
ParseDependentRequests 分析此 WebTest 的从属请求。 bool
RequestBody 要随此 Web 测试一起发送的 Base64 编码字符串正文。 字符串
RequestUrl 要测试的 URL 位置。 字符串

WebTestPropertiesValidationRules

名字 描述 价值
ContentValidation 内容验证属性的集合 WebTestPropertiesValidationRulesContentValidation
ExpectedHttpStatusCode 验证 WebTest 是否返回提供的 http 状态代码。 int
IgnoreHttpsStatusCode 设置后,验证将忽略状态代码。 bool
SSLCertRemainingLifetimeCheck 在现有 SSL 证书过期之前,仍要检查的天数。 值必须为正值,SSLCheck 必须设置为 true。 int
SSLCheck 检查 SSL 证书是否仍然有效。 bool

WebTestPropertiesValidationRulesContentValidation

名字 描述 价值
ContentMatch 在 WebTest 的返回中查找的内容。 不得为 null 或为空。 字符串
IgnoreCase 设置后,此值会使 ContentMatch 验证大小写不区分大小写。 bool
PassIfTextFound 如果为 true,则如果 ContentMatch 字符串匹配,则验证将传递。 如果为 false,则如果存在匹配项,验证将失败 bool

WebtestsResourceTags

名字 描述 价值

快速入门模板

以下快速入门模板部署此资源类型。

模板 描述
动态 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@2018-05-01-preview"
  name = "string"
  kind = "string"
  location = "string"
  tags = {
    {customized property} = "string"
  }
  body = jsonencode({
    properties = {
      Configuration = {
        WebTest = "string"
      }
      Description = "string"
      Enabled = bool
      Frequency = int
      Kind = "string"
      Locations = [
        {
          Id = "string"
        }
      ]
      Name = "string"
      Request = {
        FollowRedirects = bool
        Headers = [
          {
            key = "string"
            value = "string"
          }
        ]
        HttpVerb = "string"
        ParseDependentRequests = bool
        RequestBody = "string"
        RequestUrl = "string"
      }
      RetryEnabled = bool
      SyntheticMonitorId = "string"
      Timeout = int
      ValidationRules = {
        ContentValidation = {
          ContentMatch = "string"
          IgnoreCase = bool
          PassIfTextFound = bool
        }
        ExpectedHttpStatusCode = int
        IgnoreHttpsStatusCode = bool
        SSLCertRemainingLifetimeCheck = int
        SSLCheck = bool
      }
    }
  })
}

属性值

HeaderField

名字 描述 价值
钥匙 标头的名称。 字符串
价值 标头的值。 字符串

Microsoft.Insights/webtests

名字 描述 价值
此 Web 测试监视的 WebTest 类型。 选项为 ping 和 multistep。 “multistep”
“ping”
位置 资源位置 string (必需)
名字 资源名称 string (必需)
性能 描述 Azure 资源的 Web 测试的元数据。 WebTestProperties
标签 资源标记 标记名称和值的字典。
类型 资源类型 “Microsoft.Insights/webtests@2018-05-01-preview”

WebTestGeolocation

名字 描述 价值
Id 要从中运行的 WebTest 的位置 ID。 字符串

WebTestProperties

名字 描述 价值
配置 WebTest 的 XML 配置规范。 WebTestPropertiesConfiguration
描述 此 WebTest 的用户定义说明。 字符串
启用 正在主动监视测试。 bool
频率 此 WebTest 的测试运行间隔(以秒为单位)。 默认值为 300。 int
Web 测试的类型是 ping、多步骤、基本和标准。 “basic”
“multistep”
“ping”
“standard”(必需)
地点 一个列表,其中列出了从何处物理运行测试,以便为应用程序的可访问性提供全局覆盖范围。 WebTestGeolocation[] (必需)
名字 如果用户定义的名称,则为此 WebTest。 string (必需)
请求 请求属性的集合 WebTestPropertiesRequest
RetryEnabled 如果此 WebTest 失败,则允许重试。 bool
SyntheticMonitorId 此 WebTest 的唯一 ID。 此值通常与“名称”字段相同。 string (必需)
超时 直到此 WebTest 超时并失败的秒。 默认值为 30。 int
ValidationRules 验证规则属性的集合 WebTestPropertiesValidationRules

WebTestPropertiesConfiguration

名字 描述 价值
WebTest 要针对应用程序运行的 WebTest 的 XML 规范。 字符串

WebTestPropertiesRequest

名字 描述 价值
FollowRedirects 按照此 Web 测试的重定向操作。 bool
要添加到 WebTest 调用的标头及其值的列表。 HeaderField[]
HttpVerb 要用于此 Web 测试的 Http 谓词。 字符串
ParseDependentRequests 分析此 WebTest 的从属请求。 bool
RequestBody 要随此 Web 测试一起发送的 Base64 编码字符串正文。 字符串
RequestUrl 要测试的 URL 位置。 字符串

WebTestPropertiesValidationRules

名字 描述 价值
ContentValidation 内容验证属性的集合 WebTestPropertiesValidationRulesContentValidation
ExpectedHttpStatusCode 验证 WebTest 是否返回提供的 http 状态代码。 int
IgnoreHttpsStatusCode 设置后,验证将忽略状态代码。 bool
SSLCertRemainingLifetimeCheck 在现有 SSL 证书过期之前,仍要检查的天数。 值必须为正值,SSLCheck 必须设置为 true。 int
SSLCheck 检查 SSL 证书是否仍然有效。 bool

WebTestPropertiesValidationRulesContentValidation

名字 描述 价值
ContentMatch 在 WebTest 的返回中查找的内容。 不得为 null 或为空。 字符串
IgnoreCase 设置后,此值会使 ContentMatch 验证大小写不区分大小写。 bool
PassIfTextFound 如果为 true,则如果 ContentMatch 字符串匹配,则验证将传递。 如果为 false,则如果存在匹配项,验证将失败 bool

WebtestsResourceTags

名字 描述 价值