Skip to content

Commit c4132e2

Browse files
authored
[Hub Generated] Review request for Microsoft.Insights to add version preview/2020-10-05-preview (#13712)
* Adjustments to API to include validation grouping and updated text. * Fixed missing curly brace * adjusted name * Added basic and standard examples * adjusted type. * corrected case for key value
1 parent 80be98d commit c4132e2

File tree

3 files changed

+205
-27
lines changed

3 files changed

+205
-27
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"parameters": {
3+
"api-version": "2020-10-05-preview",
4+
"subscriptionId": "subid",
5+
"resourceGroupName": "my-resource-group",
6+
"webTestName": "my-webtest-my-component",
7+
"WebTestDefinition": {
8+
"location": "South Central US",
9+
"properties": {
10+
"Name": "my-webtest-my-component",
11+
"SyntheticMonitorId": "my-webtest-my-component",
12+
"Description": "Ping web test alert for mytestwebapp",
13+
"Enabled": true,
14+
"Frequency": 900,
15+
"Timeout": 120,
16+
"Kind": "basic",
17+
"RetryEnabled": true,
18+
"ValidationRules": {
19+
"ExpectedHttpStatusCode": 200,
20+
"SSLCheck": true
21+
},
22+
"Request": {
23+
"ParseDependentRequests": true,
24+
"RequestUrl": "https://www.bing.com"
25+
},
26+
"Locations": [
27+
{
28+
"Id": "us-fl-mia-edge"
29+
}
30+
]
31+
}
32+
}
33+
},
34+
"responses": {
35+
"200": {
36+
"body": {
37+
"id": "/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/webtests/my-webtest-my-component",
38+
"name": "my-webtest-my-component",
39+
"type": "Microsoft.Insights/webtests",
40+
"location": "southcentralus",
41+
"tags": {
42+
"hidden-link:/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component": "Resource",
43+
"hidden-link:/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/mytestwebapp": "Resource"
44+
},
45+
"properties": {
46+
"Name": "my-webtest-my-component",
47+
"SyntheticMonitorId": "my-webtest-my-component",
48+
"Description": "Ping web test alert for mytestwebapp",
49+
"Enabled": true,
50+
"Frequency": 900,
51+
"Timeout": 120,
52+
"Kind": "basic",
53+
"RetryEnabled": true,
54+
"Locations": [
55+
{
56+
"Id": "us-fl-mia-edge"
57+
}
58+
],
59+
"ValidationRules": {
60+
"ExpectedHttpStatusCode": 200,
61+
"SSLCheck": true
62+
},
63+
"Request": {
64+
"ParseDependentRequests": true,
65+
"RequestUrl": "https://www.bing.com"
66+
},
67+
"provisioningState": "Succeeded"
68+
}
69+
}
70+
}
71+
}
72+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
{
2+
"parameters": {
3+
"api-version": "2020-10-05-preview",
4+
"subscriptionId": "subid",
5+
"resourceGroupName": "my-resource-group",
6+
"webTestName": "my-webtest-my-component",
7+
"WebTestDefinition": {
8+
"location": "South Central US",
9+
"properties": {
10+
"Name": "my-webtest-my-component",
11+
"SyntheticMonitorId": "my-webtest-my-component",
12+
"Description": "Ping web test alert for mytestwebapp",
13+
"Enabled": true,
14+
"Frequency": 900,
15+
"Timeout": 120,
16+
"Kind": "standard",
17+
"RetryEnabled": true,
18+
"Request": {
19+
"RequestUrl": "https://bing.com",
20+
"Headers": [
21+
{
22+
"key": "Content-Language",
23+
"value": "de-DE"
24+
},
25+
{
26+
"key": "Accept-Language",
27+
"value": "de-DE"
28+
}
29+
],
30+
"HttpVerb": "POST",
31+
"RequestBody": "SGVsbG8gd29ybGQ="
32+
},
33+
"ValidationRules": {
34+
"SSLCheck": true,
35+
"SSLCertRemainingLifetimeCheck": 100
36+
},
37+
"Locations": [
38+
{
39+
"Id": "us-fl-mia-edge"
40+
}
41+
]
42+
}
43+
}
44+
},
45+
"responses": {
46+
"200": {
47+
"body": {
48+
"id": "/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/webtests/my-webtest-my-component",
49+
"name": "my-webtest-my-component",
50+
"type": "Microsoft.Insights/webtests",
51+
"location": "southcentralus",
52+
"tags": {
53+
"hidden-link:/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component": "Resource",
54+
"hidden-link:/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/mytestwebapp": "Resource"
55+
},
56+
"properties": {
57+
"Name": "my-webtest-my-component",
58+
"SyntheticMonitorId": "my-webtest-my-component",
59+
"Description": "Ping web test alert for mytestwebapp",
60+
"Enabled": true,
61+
"Frequency": 900,
62+
"Timeout": 120,
63+
"Kind": "standard",
64+
"RetryEnabled": true,
65+
"Locations": [
66+
{
67+
"Id": "us-fl-mia-edge"
68+
}
69+
],
70+
"Request": {
71+
"RequestUrl": "https://bing.com",
72+
"Headers": [
73+
{
74+
"key": "Content-Language",
75+
"value": "de-DE"
76+
},
77+
{
78+
"key": "Accept-Language",
79+
"value": "de-DE"
80+
}
81+
],
82+
"HttpVerb": "POST",
83+
"RequestBody": "SGVsbG8gd29ybGQ="
84+
},
85+
"ValidationRules": {
86+
"SSLCheck": true,
87+
"SSLCertRemainingLifetimeCheck": 100
88+
},
89+
"provisioningState": "Succeeded"
90+
}
91+
}
92+
}
93+
}
94+
}

specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-10-05-preview/webTests_API.json

Lines changed: 39 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,12 @@
175175
"webTestCreate": {
176176
"$ref": "./examples/WebTestCreate.json"
177177
},
178+
"webTestCreateBasic": {
179+
"$ref": "./examples/WebTestCreateBasic.json"
180+
},
181+
"webTestCreateStandard": {
182+
"$ref": "./examples/WebTestCreateStandard.json"
183+
},
178184
"webTestUpdate": {
179185
"$ref": "./examples/WebTestUpdate.json"
180186
}
@@ -529,41 +535,47 @@
529535
}
530536
}
531537
},
532-
"ContentValidation": {
538+
"ValidationRules": {
533539
"type": "object",
534-
"description": "The collection of content validation properties",
540+
"description": "The collection of validation rule properties",
535541
"properties": {
536-
"ContentMatch": {
537-
"type": "string",
538-
"description": "Content to look for in the return of the WebTest."
542+
"ContentValidation": {
543+
"type": "object",
544+
"description": "The collection of content validation properties",
545+
"properties": {
546+
"ContentMatch": {
547+
"type": "string",
548+
"description": "Content to look for in the return of the WebTest. Must not be null or empty."
549+
},
550+
"IgnoreCase": {
551+
"type": "boolean",
552+
"description": "When set, this value makes the ContentMatch validation case insensitive."
553+
},
554+
"PassIfTextFound": {
555+
"type": "boolean",
556+
"description": "When true, validation will pass if there is a match for the ContentMatch string. If false, validation will fail if there is a match"
557+
}
558+
}
539559
},
540-
"IgnoreCase": {
560+
"SSLCheck": {
541561
"type": "boolean",
542-
"description": "When set, this value makes the ContentMatch validation case insensitive."
562+
"description": "Checks to see if the SSL cert is still valid."
543563
},
544-
"PassIfTextFound": {
564+
"SSLCertRemainingLifetimeCheck": {
565+
"type": "integer",
566+
"format": "int32",
567+
"description": "A number of days to check still remain before the the existing SSL cert expires. Value must be positive and the SSLCheck must be set to true."
568+
},
569+
"ExpectedHttpStatusCode": {
570+
"type": "integer",
571+
"format": "int32",
572+
"description": "Validate that the WebTest returns the http status code provided."
573+
},
574+
"IgnoreHttpsStatusCode": {
545575
"type": "boolean",
546-
"description": "When true, validation will pass if there is a match for the ContentMatch string. If false, validation will fail if there is a match"
576+
"description": "When set, validation will ignore the status code."
547577
}
548578
}
549-
},
550-
"SSLCheck": {
551-
"type": "boolean",
552-
"description": "Checks to see if the SSL cert is still valid."
553-
},
554-
"SSLCertRemainingLifetimeCheck": {
555-
"type": "integer",
556-
"format": "int32",
557-
"description": "A number of days to check still remain before the the existing SSL cert expires."
558-
},
559-
"ExpectedHttpStatusCode": {
560-
"type": "integer",
561-
"format": "int32",
562-
"description": "Validate that the WebTest returns the http status code provided."
563-
},
564-
"IgnoreHttpsStatusCode": {
565-
"type": "boolean",
566-
"description": "When set, validation will ignore the status code."
567579
}
568580
}
569581
},

0 commit comments

Comments
 (0)