Skip to content

Commit 0a66845

Browse files
Dev resourcehealth/abhsinghal/2022 10 01 preview (#21758)
* Added ImpactedResources for Tenant. * Added new API listSecurityAdvisoryImpactedResources for Subscriptions and Tenants. * Added Tenant ImpactedResources, SecurityImpactedResources. * Changes to examples for Subscription ImpactedResources. * Added resourceName pattern for ImpactedResourceNameParameter. * Changes to example - SecurityAdvisoryImpactedResources_ListByTenantId_ListByEventId. Removed subscriptionId from unique resourceId.
1 parent 7063fb5 commit 0a66845

7 files changed

+361
-4
lines changed

specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2022-10-01-preview/ResourceHealth.json

Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,174 @@
341341
}
342342
}
343343
},
344+
"/providers/Microsoft.ResourceHealth/events/{eventTrackingId}/impactedResources": {
345+
"get": {
346+
"tags": [
347+
"EventImpactedResources"
348+
],
349+
"operationId": "ImpactedResources_ListByTenantIdAndEventId",
350+
"description": "Lists impacted resources in the tenant by an event.",
351+
"parameters": [
352+
{
353+
"$ref": "#/parameters/EventTrackingIdParameter"
354+
},
355+
{
356+
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
357+
},
358+
{
359+
"$ref": "#/parameters/FilterParameter"
360+
}
361+
],
362+
"responses": {
363+
"200": {
364+
"description": "The list of impacted resources in the tenant by an event.",
365+
"schema": {
366+
"$ref": "#/definitions/eventImpactedResourceListResult"
367+
}
368+
},
369+
"default": {
370+
"description": "DefaultErrorResponse",
371+
"schema": {
372+
"$ref": "#/definitions/ErrorResponse"
373+
}
374+
}
375+
},
376+
"x-ms-pageable": {
377+
"nextLinkName": "nextLink"
378+
},
379+
"x-ms-examples": {
380+
"ListEventsByTenantId": {
381+
"$ref": "./examples/ImpactedResources_ListByTenantId_ListByEventId.json"
382+
}
383+
}
384+
}
385+
},
386+
"/providers/Microsoft.ResourceHealth/events/{eventTrackingId}/impactedResources/{impactedResourceName}": {
387+
"get": {
388+
"tags": [
389+
"EventImpactedResources"
390+
],
391+
"operationId": "ImpactedResources_GetByTenantId",
392+
"description": "Gets the specific impacted resource in the tenant by an event.",
393+
"parameters": [
394+
{
395+
"$ref": "#/parameters/EventTrackingIdParameter"
396+
},
397+
{
398+
"$ref": "#/parameters/ImpactedResourceNameParameter"
399+
},
400+
{
401+
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
402+
}
403+
],
404+
"responses": {
405+
"200": {
406+
"description": "The details of Impacted Resource.",
407+
"schema": {
408+
"$ref": "#/definitions/eventImpactedResource"
409+
}
410+
},
411+
"default": {
412+
"description": "DefaultErrorResponse",
413+
"schema": {
414+
"$ref": "#/definitions/ErrorResponse"
415+
}
416+
}
417+
},
418+
"x-ms-examples": {
419+
"ImpactedResourcesGet": {
420+
"$ref": "./examples/ImpactedResources_GetByTenantId.json"
421+
}
422+
}
423+
}
424+
},
425+
"/subscriptions/{subscriptionId}/providers/Microsoft.ResourceHealth/events/{eventTrackingId}/listSecurityAdvisoryImpactedResources": {
426+
"post": {
427+
"tags": [
428+
"SecurityAdvisoryImpactedResources"
429+
],
430+
"operationId": "SecurityAdvisoryImpactedResources_ListBySubscriptionIdAndEventId",
431+
"description": "Lists impacted resources in the subscription by an event (Security Advisory).",
432+
"parameters": [
433+
{
434+
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter"
435+
},
436+
{
437+
"$ref": "#/parameters/EventTrackingIdParameter"
438+
},
439+
{
440+
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
441+
},
442+
{
443+
"$ref": "#/parameters/FilterParameter"
444+
}
445+
],
446+
"responses": {
447+
"200": {
448+
"description": "The list of impacted resources in the subscription by an event (Security Advisory).",
449+
"schema": {
450+
"$ref": "#/definitions/eventImpactedResourceListResult"
451+
}
452+
},
453+
"default": {
454+
"description": "DefaultErrorResponse",
455+
"schema": {
456+
"$ref": "#/definitions/ErrorResponse"
457+
}
458+
}
459+
},
460+
"x-ms-pageable": {
461+
"nextLinkName": "nextLink"
462+
},
463+
"x-ms-examples": {
464+
"ListSecurityAdvisoryImpactedResourcesBySubscriptionId": {
465+
"$ref": "./examples/SecurityAdvisoryImpactedResources_ListBySubscriptionId_ListByEventId.json"
466+
}
467+
}
468+
}
469+
},
470+
"/providers/Microsoft.ResourceHealth/events/{eventTrackingId}/listSecurityAdvisoryImpactedResources": {
471+
"post": {
472+
"tags": [
473+
"SecurityAdvisoryImpactedResources"
474+
],
475+
"operationId": "SecurityAdvisoryImpactedResources_ListByTenantIdAndEventId",
476+
"description": "Lists impacted resources in the tenant by an event (Security Advisory).",
477+
"parameters": [
478+
{
479+
"$ref": "#/parameters/EventTrackingIdParameter"
480+
},
481+
{
482+
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
483+
},
484+
{
485+
"$ref": "#/parameters/FilterParameter"
486+
}
487+
],
488+
"responses": {
489+
"200": {
490+
"description": "The list of impacted resources in the tenant by an event (Security Advisory).",
491+
"schema": {
492+
"$ref": "#/definitions/eventImpactedResourceListResult"
493+
}
494+
},
495+
"default": {
496+
"description": "DefaultErrorResponse",
497+
"schema": {
498+
"$ref": "#/definitions/ErrorResponse"
499+
}
500+
}
501+
},
502+
"x-ms-pageable": {
503+
"nextLinkName": "nextLink"
504+
},
505+
"x-ms-examples": {
506+
"ListSecurityAdvisoryImpactedResourcesByTenantId": {
507+
"$ref": "./examples/SecurityAdvisoryImpactedResources_ListByTenantId_ListByEventId.json"
508+
}
509+
}
510+
}
511+
},
344512
"/subscriptions/{subscriptionId}/providers/Microsoft.ResourceHealth/events": {
345513
"get": {
346514
"tags": [
@@ -1507,6 +1675,7 @@
15071675
"description": "Name of the Impacted Resource.",
15081676
"required": true,
15091677
"type": "string",
1678+
"pattern": "^[^*#&+:<>%?]+$",
15101679
"x-ms-parameter-location": "method"
15111680
}
15121681
}

specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2022-10-01-preview/examples/ImpactedResources_Get.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"responses": {
99
"200": {
1010
"body": {
11-
"id": "Microsoft.ResourceHealth/events/BC_1-FXZ/impactedResources/abc-123-ghj-456",
11+
"id": "/subscriptions/{subscripitionId}/providers/Microsoft.ResourceHealth/events/BC_1-FXZ/impactedResources/abc-123-ghj-456",
1212
"name": "abc-123-ghj-456",
1313
"type": "Microsoft.ResourceHealth/events/impactedResources",
1414
"properties": {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"parameters": {
3+
"eventTrackingId": "BC_1-FXZ",
4+
"impactedResourceName": "abc-123-ghj-456",
5+
"api-version": "2022-10-01-preview"
6+
},
7+
"responses": {
8+
"200": {
9+
"body": {
10+
"id": "providers/Microsoft.ResourceHealth/events/BC_1-FXZ/impactedResources/abc-123-ghj-456",
11+
"name": "abc-123-ghj-456",
12+
"type": "Microsoft.ResourceHealth/events/impactedResources",
13+
"properties": {
14+
"targetResourceType": "Microsoft.Compute/VirtualMachines",
15+
"targetResourceId": "{resourceId}",
16+
"targetRegion": "westus"
17+
}
18+
}
19+
}
20+
}
21+
}

specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2022-10-01-preview/examples/ImpactedResources_ListBySubscriptionId_ListByEventId.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"body": {
1111
"value": [
1212
{
13-
"id": "Microsoft.ResourceHealth/events/BC_1-FXZ/impactedResources/abc-123-ghj-456",
13+
"id": "/subscriptions/{subscripitionId}/providers/Microsoft.ResourceHealth/events/BC_1-FXZ/impactedResources/abc-123-ghj-456",
1414
"name": "abc-123-ghj-456",
1515
"type": "Microsoft.ResourceHealth/events/impactedResources",
1616
"properties": {
@@ -20,7 +20,7 @@
2020
}
2121
},
2222
{
23-
"id": "Microsoft.ResourceHealth/events/BC_1-FXZ/impactedResources/jkl-901-hgy-445",
23+
"id": "/subscriptions/{subscripitionId}/providers/Microsoft.ResourceHealth/events/BC_1-FXZ/impactedResources/jkl-901-hgy-445",
2424
"name": "jkl-901-hgy-445",
2525
"type": "Microsoft.ResourceHealth/events/impactedResources",
2626
"properties": {
@@ -45,7 +45,7 @@
4545
}
4646
},
4747
{
48-
"id": "Microsoft.ResourceHealth/events/BC_1-FXZ/impactedResources/wer-345-tyu-789",
48+
"id": "/subscriptions/{subscripitionId}/providers/Microsoft.ResourceHealth/events/BC_1-FXZ/impactedResources/wer-345-tyu-789",
4949
"name": "wer-345-tyu-789",
5050
"type": "Microsoft.ResourceHealth/events/impactedResources",
5151
"properties": {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"parameters": {
3+
"eventTrackingId": "BC_1-FXZ",
4+
"api-version": "2022-10-01-preview",
5+
"$filter": "targetRegion eq 'westus'"
6+
},
7+
"responses": {
8+
"200": {
9+
"body": {
10+
"value": [
11+
{
12+
"id": "/providers/Microsoft.ResourceHealth/events/BC_1-FXZ/impactedResources/abc-123-ghj-456",
13+
"name": "abc-123-ghj-456",
14+
"type": "Microsoft.ResourceHealth/events/impactedResources",
15+
"properties": {
16+
"targetResourceType": "Microsoft.Compute/VirtualMachines",
17+
"targetResourceId": "{resourceId-1}",
18+
"targetRegion": "westus"
19+
}
20+
},
21+
{
22+
"id": "/providers/Microsoft.ResourceHealth/events/BC_1-FXZ/impactedResources/wer-345-tyu-789",
23+
"name": "wer-345-tyu-789",
24+
"type": "Microsoft.ResourceHealth/events/impactedResources",
25+
"properties": {
26+
"targetResourceType": "Microsoft.Compute/VirtualMachines",
27+
"targetResourceId": "{resourceId-2}",
28+
"targetRegion": "westus"
29+
}
30+
}
31+
],
32+
"nextLink": "{originalRequestUrl}?$skipToken={OpaquePageNumber}"
33+
}
34+
}
35+
}
36+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "subscriptionId",
4+
"eventTrackingId": "BC_1-FXZ",
5+
"api-version": "2022-10-01-preview"
6+
},
7+
"responses": {
8+
"200": {
9+
"body": {
10+
"value": [
11+
{
12+
"id": "/subscriptions/{subscripitionId}/providers/Microsoft.ResourceHealth/events/BC_1-FXZ/impactedResources/jkl-901-hgy-445",
13+
"name": "jkl-901-hgy-445",
14+
"type": "Microsoft.ResourceHealth/events/impactedResources",
15+
"properties": {
16+
"info": [
17+
{
18+
"key": "key-A",
19+
"value": "sample-1"
20+
},
21+
{
22+
"key": "key-B",
23+
"value": "sample-2"
24+
},
25+
{
26+
"key": "key-C",
27+
"value": "sample-3"
28+
},
29+
{
30+
"key": "key-D",
31+
"value": "sample-4"
32+
}
33+
]
34+
}
35+
},
36+
{
37+
"id": "/subscriptions/{subscripitionId}/providers/Microsoft.ResourceHealth/events/BC_1-FXZ/impactedResources/wer-345-tyu-789",
38+
"name": "wer-345-tyu-789",
39+
"type": "Microsoft.ResourceHealth/events/impactedResources",
40+
"properties": {
41+
"info": [
42+
{
43+
"key": "key-E",
44+
"value": "sample-5"
45+
},
46+
{
47+
"key": "key-F",
48+
"value": "sample-6"
49+
},
50+
{
51+
"key": "key-G",
52+
"value": "sample-7"
53+
},
54+
{
55+
"key": "key-H",
56+
"value": "sample-8"
57+
}
58+
]
59+
}
60+
}
61+
],
62+
"nextLink": "{originalRequestUrl}?$skipToken={OpaquePageNumber}"
63+
}
64+
}
65+
}
66+
}

0 commit comments

Comments
 (0)