Microsoft.Insights Webtests

Bicep リソース定義

Webtests リソースの種類は、次を対象とする操作でデプロイできます。

各 API バージョンの変更されたプロパティの一覧については、「 変更ログ」を参照してください。

リソース形式

Microsoft.Insights/webtests リソースを作成するには、次の Bicep をテンプレートに追加します。

resource symbolicname 'Microsoft.Insights/webtests@2022-06-15' = {
  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'
    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
      IgnoreHttpStatusCode: bool
      SSLCertRemainingLifetimeCheck: int
      SSLCheck: bool
    }
  }
}

プロパティ値

webtests

名前 説明
name リソース名 string (必須)
location リソースの場所 string (必須)
tags リソース タグ タグ名と値のディクショナリ。 「テンプレートのタグ」を参照してください
kind この Web テストで監視される WebTest の種類。 選択肢は ping、multistep、standard です。 'multistep'
'ping'
'standard'
properties Azure リソースの Web テストを記述するメタデータ。 WebTestProperties

WebTestProperties

名前 説明
構成 WebTest の XML 構成仕様。 WebTestPropertiesConfiguration
説明 この WebTest のユーザー定義の説明。 string
Enabled テストがアクティブに監視されているか。 [bool]
頻度 この WebTest のテスト実行の間隔 (秒単位)。 既定値は 300 です。 INT
種類 これが Web テストの種類であり、有効な選択肢は ping、multistep、standard です。 'multistep'
'ping'
'standard' (必須)
場所 アプリケーションのアクセシビリティをグローバルにカバーするために、テストを物理的に実行する場所の一覧。 WebTestGeolocation[] (必須)
名前 この WebTest の場合はユーザー定義名。 string (必須)
要求 要求プロパティのコレクション WebTestPropertiesRequest
RetryEnabled この WebTest が失敗した場合は再試行を許可します。 [bool]
SyntheticMonitorId この WebTest の一意の ID。 これは通常、[名前] フィールドと同じ値です。 string (必須)
タイムアウト この WebTest がタイムアウトして失敗するまでの秒数。 既定値は 30 です。 INT
ValidationRules 検証規則のプロパティのコレクション WebTestPropertiesValidationRules

WebTestPropertiesConfiguration

名前 説明
Webtest アプリケーションに対して実行する WebTest の XML 仕様。 string

WebTestGeolocation

名前 説明 [値]
Id WebTest の実行元の場所 ID。 string

WebTestPropertiesRequest

名前 説明
FollowRedirects この Web テストのリダイレクトに従います。 [bool]
ヘッダー WebTest 呼び出しに追加するヘッダーとその値の一覧。 HeaderField[]
HttpVerb この Web テストに使用する Http 動詞。 string
ParseDependentRequests この WebTest の依存要求を解析します。 [bool]
RequestBody この Web テストで送信する Base64 エンコード文字列本文。 string
RequestUrl テストする URL の場所。 string

ヘッダーフィールド

名前 説明
キー ヘッダーの名前。 string
value ヘッダーの値です。 string

WebTestPropertiesValidationRules

名前 説明
ContentValidation コンテンツ検証プロパティのコレクション WebTestPropertiesValidationRulesContentValidation
予期されるHttpStatusCode 指定された http 状態コードが WebTest から返されることを検証します。 INT
IgnoreHttpStatusCode 設定すると、検証は状態コードを無視します。 [bool]
SSLCertRemainingLifetimeCheck 既存の SSL 証明書の有効期限が切れるまでチェック日数が残ります。 値は正の値で、SSLCheck は true に設定する必要があります。 INT
SSLCheck SSL 証明書がまだ有効かどうかを確認します。 [bool]

WebTestPropertiesValidationRulesContentValidation

名前 説明
ContentMatch WebTest の戻り値で検索するコンテンツ。 null または空にすることはできません。 string
IgnoreCase この値を設定すると、ContentMatch 検証では大文字と小文字が区別されません。 [bool]
PassIfTextFound true の場合、ContentMatch 文字列に一致するものがある場合、検証は渡されます。 false の場合、一致する場合、検証は失敗します [bool]

クイック スタート テンプレート

次のクイックスタート テンプレートでは、このリソースの種類をデプロイします。

Template 説明
動的 Web テストの作成

Azure にデプロイする
任意の数の App Insights Web (ping) テストを作成します。
可用性テストのメトリック アラート ルール

Azure にデプロイする
このテンプレートは、Application Insights 可用性テストと、それを監視するメトリック アラート ルールを作成します。

ARM テンプレート リソース定義

Webtests リソースの種類は、次を対象とする操作でデプロイできます。

各 API バージョンの変更されたプロパティの一覧については、「 変更ログ」を参照してください。

リソース形式

Microsoft.Insights/webtests リソースを作成するには、次の JSON をテンプレートに追加します。

{
  "type": "Microsoft.Insights/webtests",
  "apiVersion": "2022-06-15",
  "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",
    "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",
      "IgnoreHttpStatusCode": "bool",
      "SSLCertRemainingLifetimeCheck": "int",
      "SSLCheck": "bool"
    }
  }
}

プロパティ値

webtests

名前 説明
type リソースの種類 'Microsoft.Insights/webtests'
apiVersion リソース API のバージョン '2022-06-15'
name リソース名 string (必須)
location リソースの場所 string (必須)
tags リソース タグ タグの名前と値のディクショナリ。 「テンプレート内のタグ」を参照してください
kind この Web テストで監視される WebTest の種類。 選択肢は ping、マルチステップ、標準です。 'multistep'
'ping'
'standard'
properties Azure リソースの Web テストを記述するメタデータ。 WebTestProperties

WebTestProperties

名前 説明
構成 WebTest の XML 構成仕様。 WebTestPropertiesConfiguration
説明 この WebTest のユーザー定義の説明。 string
Enabled テストがアクティブに監視されているか。 [bool]
頻度 この WebTest のテスト実行の間隔 (秒単位)。 既定値は 300 です。 INT
種類 これは、有効な選択肢は ping、マルチステップ、標準の Web テストの種類です。 'multistep'
'ping'
'standard' (必須)
場所 アプリケーションのアクセシビリティをグローバルにカバーするためにテストを物理的に実行する場所の一覧。 WebTestGeolocation[] (必須)
名前 この WebTest の場合は、ユーザー定義の名前。 string (必須)
要求 要求プロパティのコレクション WebTestPropertiesRequest
RetryEnabled この WebTest が失敗した場合は、再試行を許可します。 [bool]
SyntheticMonitorId この WebTest の一意の ID。 通常、これは [名前] フィールドと同じ値です。 string (必須)
タイムアウト この WebTest がタイムアウトして失敗するまでの秒数。 既定値は 30 です。 INT
ValidationRules 検証規則のプロパティのコレクション WebTestPropertiesValidationRules

WebTestPropertiesConfiguration

名前 説明
Webtest アプリケーションに対して実行する WebTest の XML 仕様。 string

WebTestGeolocation

名前 説明 [値]
Id WebTest の実行元の場所 ID。 string

WebTestPropertiesRequest

名前 説明
FollowRedirects この Web テストのリダイレクトに従います。 [bool]
ヘッダー WebTest 呼び出しに追加するヘッダーとその値の一覧。 HeaderField[]
HttpVerb この Web テストに使用する Http 動詞。 string
ParseDependentRequests この WebTest の依存要求を解析します。 [bool]
RequestBody この Web テストで送信する Base64 エンコード文字列本文。 string
RequestUrl テストする URL の場所。 string

ヘッダーフィールド

名前 説明
キー ヘッダーの名前。 string
value ヘッダーの値です。 string

WebTestPropertiesValidationRules

名前 説明
ContentValidation コンテンツ検証プロパティのコレクション WebTestPropertiesValidationRulesContentValidation
ExpectedHttpStatusCode 指定された http 状態コードが WebTest から返されることを検証します。 INT
IgnoreHttpStatusCode 設定すると、検証は状態コードを無視します。 [bool]
SSLCertRemainingLifetimeCheck チェックまでの日数は、既存の SSL 証明書の有効期限が切れるまで残ります。 値は正で、SSLCheck は true に設定する必要があります。 INT
SSLCheck SSL 証明書がまだ有効かどうかを確認します。 [bool]

WebTestPropertiesValidationRulesContentValidation

名前 説明
ContentMatch WebTest の戻り値で検索するコンテンツ。 null または空にすることはできません。 string
IgnoreCase この値を設定すると、ContentMatch 検証で大文字と小文字が区別されなくなります。 [bool]
PassIfTextFound true の場合、ContentMatch 文字列に一致するものがある場合、検証は渡されます。 false の場合、一致がある場合、検証は失敗します [bool]

クイック スタート テンプレート

次のクイックスタート テンプレートでは、このリソースの種類をデプロイします。

Template 説明
動的 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@2022-06-15"
  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"
      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
        IgnoreHttpStatusCode = bool
        SSLCertRemainingLifetimeCheck = int
        SSLCheck = bool
      }
    }
    kind = "string"
  })
}

プロパティ値

webtests

名前 説明
type リソースの種類 "Microsoft.Insights/webtests@2022-06-15"
name リソース名 string (必須)
location リソースの場所 string (必須)
parent_id リソース グループにデプロイするには、そのリソース グループの ID を使用します。 string (必須)
tags リソース タグ タグ名と値のディクショナリ。
kind この Web テストで監視される WebTest の種類。 選択肢は ping、multistep、standard です。 "multistep"
"ping"
"standard"
properties Azure リソースの Web テストを記述するメタデータ。 WebTestProperties

WebTestProperties

名前 説明
構成 WebTest の XML 構成仕様。 WebTestPropertiesConfiguration
説明 この WebTest のユーザー定義の説明。 string
Enabled テストがアクティブに監視されているか。 [bool]
頻度 この WebTest のテスト実行の間隔 (秒単位)。 既定値は 300 です。 INT
種類 これは、有効な選択肢は ping、マルチステップ、標準の Web テストの種類です。 "multistep"
"ping"
"standard" (必須)
場所 アプリケーションのアクセシビリティをグローバルにカバーするためにテストを物理的に実行する場所の一覧。 WebTestGeolocation[] (必須)
名前 この WebTest の場合は、ユーザー定義の名前。 string (必須)
要求 要求プロパティのコレクション WebTestPropertiesRequest
RetryEnabled この WebTest が失敗した場合は、再試行を許可します。 [bool]
SyntheticMonitorId この WebTest の一意の ID。 通常、これは [名前] フィールドと同じ値です。 string (必須)
タイムアウト この WebTest がタイムアウトして失敗するまでの秒数。 既定値は 30 です。 INT
ValidationRules 検証規則のプロパティのコレクション WebTestPropertiesValidationRules

WebTestPropertiesConfiguration

名前 説明
Webtest アプリケーションに対して実行する WebTest の XML 仕様。 string

WebTestGeolocation

名前 説明 [値]
Id WebTest の実行元の場所 ID。 string

WebTestPropertiesRequest

名前 説明
FollowRedirects この Web テストのリダイレクトに従います。 [bool]
ヘッダー WebTest 呼び出しに追加するヘッダーとその値の一覧。 HeaderField[]
HttpVerb この Web テストに使用する Http 動詞。 string
ParseDependentRequests この WebTest の依存要求を解析します。 [bool]
RequestBody この Web テストで送信する Base64 エンコード文字列本文。 string
RequestUrl テストする URL の場所。 string

ヘッダーフィールド

名前 説明
キー ヘッダーの名前。 string
value ヘッダーの値です。 string

WebTestPropertiesValidationRules

名前 説明
ContentValidation コンテンツ検証プロパティのコレクション WebTestPropertiesValidationRulesContentValidation
予期されるHttpStatusCode 指定された http 状態コードが WebTest から返されることを検証します。 INT
IgnoreHttpStatusCode 設定すると、検証は状態コードを無視します。 [bool]
SSLCertRemainingLifetimeCheck 既存の SSL 証明書の有効期限が切れるまでチェック日数が残ります。 値は正の値で、SSLCheck は true に設定する必要があります。 INT
SSLCheck SSL 証明書がまだ有効かどうかを確認します。 [bool]

WebTestPropertiesValidationRulesContentValidation

名前 説明
ContentMatch WebTest の戻り値で検索するコンテンツ。 null または空にすることはできません。 string
IgnoreCase この値を設定すると、ContentMatch 検証で大文字と小文字が区別されなくなります。 [bool]
PassIfTextFound true の場合、ContentMatch 文字列に一致するものがある場合、検証は渡されます。 false の場合、一致がある場合、検証は失敗します [bool]