次の方法で共有


Web Tests - Update Tags

Application Insights Web テストに関連付けられているタグを更新します。

PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName}?api-version=2022-06-15

URI パラメーター

名前 / 必須 説明
resourceGroupName
path True

string

リソース グループの名前。 名前の大文字と小文字は区別されます。

subscriptionId
path True

string

ターゲット サブスクリプションの ID。

webTestName
path True

string

Application Insights WebTest リソースの名前。

api-version
query True

string

この操作に使用する API バージョン。

要求本文

名前 説明
tags

object

リソース タグ

応答

名前 説明
200 OK

WebTest

Application Insights Web テスト タグの更新に成功しました。 Web テスト タグは更新され、残りの WebTest オブジェクト プロパティと共に返されます。

セキュリティ

azure_auth

Azure Active Directory OAuth2 フロー。

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名前 説明
user_impersonation ユーザー アカウントの借用

webTestUpdateTags

Sample Request

PATCH https://management.azure.com/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/webtests/my-webtest-my-component?api-version=2022-06-15

{
  "tags": {
    "hidden-link:/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component": "Resource",
    "CustomField-01": "This is a random value",
    "SystemType": "A08",
    "Color": "AzureBlue"
  }
}

Sample Response

{
  "id": "/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/webtests/my-webtest-my-component",
  "name": "my-webtest-my-component",
  "type": "Microsoft.Insights/webtests",
  "location": "southcentralus",
  "tags": {
    "hidden-link:/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component": "Resource",
    "CustomField-01": "This is a random value",
    "SystemType": "A08",
    "Color": "AzureBlue"
  },
  "kind": "ping",
  "properties": {
    "Name": "my-webtest-my-component",
    "SyntheticMonitorId": "my-webtest-my-component",
    "Description": "Ping web test alert for mytestwebapp",
    "Enabled": true,
    "Frequency": 600,
    "Timeout": 30,
    "Kind": "ping",
    "RetryEnabled": true,
    "Locations": [
      {
        "Id": "us-fl-mia-edge"
      },
      {
        "Id": "apac-hk-hkn-azr"
      }
    ],
    "Configuration": {
      "WebTest": "<WebTest Name=\"my-webtest\" Id=\"678ddf96-1ab8-44c8-9274-123456789abc\" Enabled=\"True\" CssProjectStructure=\"\" CssIteration=\"\" Timeout=\"30\" WorkItemIds=\"\" xmlns=\"http://microsoft.com/schemas/VisualStudio/TeamTest/2010\" Description=\"\" CredentialUserName=\"\" CredentialPassword=\"\" PreAuthenticate=\"True\" Proxy=\"default\" StopOnError=\"False\" RecordedResultFile=\"\" ResultsLocale=\"\" ><Items><Request Method=\"GET\" Guid=\"a4162485-9114-fcfc-e086-123456789abc\" Version=\"1.1\" Url=\"http://my-component.azurewebsites.net\" ThinkTime=\"0\" Timeout=\"30\" ParseDependentRequests=\"True\" FollowRedirects=\"True\" RecordResult=\"True\" Cache=\"False\" ResponseTimeGoal=\"0\" Encoding=\"utf-8\" ExpectedHttpStatusCode=\"200\" ExpectedResponseUrl=\"\" ReportingName=\"\" IgnoreHttpStatusCode=\"False\" /></Items></WebTest>"
    },
    "provisioningState": "Succeeded"
  }
}

定義

名前 説明
Configuration

WebTest の XML 構成仕様。

ContentValidation

コンテンツ検証プロパティのコレクション

HeaderField

WebTest に追加するヘッダー。

Request

要求プロパティのコレクション

TagsResource

リソースの Tags のみを保持し、ユーザーが WebTest インスタンスのタグを更新できるようにするコンテナー。

ValidationRules

検証規則のプロパティのコレクション

WebTest

Application Insights WebTest 定義。

WebTestGeolocation

WebTest を実行する地理的な場所。 テストを実行する場所を 1 つ以上指定する必要があります。

WebTestKind

この Web テストで監視される WebTest の種類。 選択肢は ping、マルチステップ、標準です。

Configuration

WebTest の XML 構成仕様。

名前 説明
WebTest

string

アプリケーションに対して実行する WebTest の XML 仕様。

ContentValidation

コンテンツ検証プロパティのコレクション

名前 説明
ContentMatch

string

WebTest の戻り値で検索するコンテンツ。 null または空にすることはできません。

IgnoreCase

boolean

この値を設定すると、ContentMatch 検証では大文字と小文字が区別されません。

PassIfTextFound

boolean

true の場合、ContentMatch 文字列に一致するものがある場合、検証は渡されます。 false の場合、一致する場合、検証は失敗します

HeaderField

WebTest に追加するヘッダー。

名前 説明
key

string

ヘッダーの名前。

value

string

ヘッダーの値です。

Request

要求プロパティのコレクション

名前 説明
FollowRedirects

boolean

この Web テストのリダイレクトに従います。

Headers

HeaderField[]

WebTest 呼び出しに追加するヘッダーとその値の一覧。

HttpVerb

string

この Web テストに使用する Http 動詞。

ParseDependentRequests

boolean

この WebTest の依存要求を解析します。

RequestBody

string

この Web テストで送信する Base64 エンコード文字列本文。

RequestUrl

string

テストする URL の場所。

TagsResource

リソースの Tags のみを保持し、ユーザーが WebTest インスタンスのタグを更新できるようにするコンテナー。

名前 説明
tags

object

リソース タグ

ValidationRules

検証規則のプロパティのコレクション

名前 説明
ContentValidation

ContentValidation

コンテンツ検証プロパティのコレクション

ExpectedHttpStatusCode

integer

指定された http 状態コードが WebTest から返されることを検証します。

IgnoreHttpStatusCode

boolean

設定すると、検証は状態コードを無視します。

SSLCertRemainingLifetimeCheck

integer

既存の SSL 証明書の有効期限が切れるまでチェック日数が残ります。 値は正の値で、SSLCheck は true に設定する必要があります。

SSLCheck

boolean

SSL 証明書がまだ有効かどうかを確認します。

WebTest

Application Insights WebTest 定義。

名前 既定値 説明
id

string

Azure リソース ID

kind

WebTestKind

ping

この Web テストで監視される WebTest の種類。 選択肢は ping、マルチステップ、標準です。

location

string

リソースの場所

name

string

Azure リソース名

properties.Configuration

Configuration

WebTest の XML 構成仕様。

properties.Description

string

この WebTest のユーザー定義の説明。

properties.Enabled

boolean

テストがアクティブに監視されているか。

properties.Frequency

integer

300

この WebTest のテスト実行の間隔 (秒単位)。 既定値は 300 です。

properties.Kind

WebTestKind

ping

これは、有効な選択肢は ping、マルチステップ、標準の Web テストの種類です。

properties.Locations

WebTestGeolocation[]

アプリケーションのアクセシビリティをグローバルにカバーするためにテストを物理的に実行する場所の一覧。

properties.Name

string

この WebTest の場合は、ユーザー定義の名前。

properties.Request

Request

要求プロパティのコレクション

properties.RetryEnabled

boolean

この WebTest が失敗した場合は、再試行を許可します。

properties.SyntheticMonitorId

string

この WebTest の一意の ID。 通常、これは [名前] フィールドと同じ値です。

properties.Timeout

integer

30

この WebTest がタイムアウトして失敗するまでの秒数。 既定値は 30 です。

properties.ValidationRules

ValidationRules

検証規則のプロパティのコレクション

properties.provisioningState

string

このコンポーネントの現在の状態。それが定義されているリソース グループ内にプロビジョニングされているかどうか。 ユーザーはこの値を変更できませんが、そこから読み取ることができます。 値には、Succeeded、Deploying、Canceled、Failed が含まれます。

tags

object

リソース タグ

type

string

Azure リソースタイプ

WebTestGeolocation

WebTest を実行する地理的な場所。 テストを実行する場所を 1 つ以上指定する必要があります。

名前 説明
Id

string

WebTest の実行元の場所 ID。

WebTestKind

この Web テストで監視される WebTest の種類。 選択肢は ping、マルチステップ、標準です。

名前 説明
multistep

string

ping

string

standard

string