@azure/arm-resourcehealth 3.2.1-alpha.20230511.1 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +111 -8
- package/dist/index.js +2621 -386
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist-esm/samples-dev/availabilityStatusesGetByResourceSample.js +1 -1
- package/dist-esm/samples-dev/availabilityStatusesListByResourceGroupSample.js +3 -3
- package/dist-esm/samples-dev/availabilityStatusesListBySubscriptionIdSample.js +3 -3
- package/dist-esm/samples-dev/availabilityStatusesListSample.js +3 -3
- package/dist-esm/samples-dev/childAvailabilityStatusesGetByResourceSample.js +4 -4
- package/dist-esm/samples-dev/childAvailabilityStatusesGetByResourceSample.js.map +1 -1
- package/dist-esm/samples-dev/childAvailabilityStatusesListSample.js +4 -4
- package/dist-esm/samples-dev/childAvailabilityStatusesListSample.js.map +1 -1
- package/dist-esm/samples-dev/childResourcesListSample.js +3 -3
- package/dist-esm/samples-dev/childResourcesListSample.js.map +1 -1
- package/dist-esm/samples-dev/emergingIssuesGetSample.js +3 -2
- package/dist-esm/samples-dev/emergingIssuesGetSample.js.map +1 -1
- package/dist-esm/samples-dev/emergingIssuesListSample.js +1 -1
- package/dist-esm/samples-dev/eventFetchDetailsBySubscriptionIdAndTrackingIdSample.d.ts +2 -0
- package/dist-esm/samples-dev/eventFetchDetailsBySubscriptionIdAndTrackingIdSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/eventFetchDetailsBySubscriptionIdAndTrackingIdSample.js +37 -0
- package/dist-esm/samples-dev/eventFetchDetailsBySubscriptionIdAndTrackingIdSample.js.map +1 -0
- package/dist-esm/samples-dev/eventFetchDetailsByTenantIdAndTrackingIdSample.d.ts +2 -0
- package/dist-esm/samples-dev/eventFetchDetailsByTenantIdAndTrackingIdSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/eventFetchDetailsByTenantIdAndTrackingIdSample.js +38 -0
- package/dist-esm/samples-dev/eventFetchDetailsByTenantIdAndTrackingIdSample.js.map +1 -0
- package/dist-esm/samples-dev/eventGetBySubscriptionIdAndTrackingIdSample.d.ts +2 -0
- package/dist-esm/samples-dev/eventGetBySubscriptionIdAndTrackingIdSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/eventGetBySubscriptionIdAndTrackingIdSample.js +43 -0
- package/dist-esm/samples-dev/eventGetBySubscriptionIdAndTrackingIdSample.js.map +1 -0
- package/dist-esm/samples-dev/eventGetByTenantIdAndTrackingIdSample.d.ts +2 -0
- package/dist-esm/samples-dev/eventGetByTenantIdAndTrackingIdSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/eventGetByTenantIdAndTrackingIdSample.js +44 -0
- package/dist-esm/samples-dev/eventGetByTenantIdAndTrackingIdSample.js.map +1 -0
- package/dist-esm/samples-dev/eventsListBySingleResourceSample.d.ts +2 -0
- package/dist-esm/samples-dev/eventsListBySingleResourceSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/eventsListBySingleResourceSample.js +59 -0
- package/dist-esm/samples-dev/eventsListBySingleResourceSample.js.map +1 -0
- package/dist-esm/samples-dev/eventsListBySubscriptionIdSample.d.ts +2 -0
- package/dist-esm/samples-dev/eventsListBySubscriptionIdSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/eventsListBySubscriptionIdSample.js +63 -0
- package/dist-esm/samples-dev/eventsListBySubscriptionIdSample.js.map +1 -0
- package/dist-esm/samples-dev/eventsListByTenantIdSample.d.ts +2 -0
- package/dist-esm/samples-dev/eventsListByTenantIdSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/eventsListByTenantIdSample.js +64 -0
- package/dist-esm/samples-dev/eventsListByTenantIdSample.js.map +1 -0
- package/dist-esm/samples-dev/impactedResourcesGetByTenantIdSample.d.ts +2 -0
- package/dist-esm/samples-dev/impactedResourcesGetByTenantIdSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/impactedResourcesGetByTenantIdSample.js +39 -0
- package/dist-esm/samples-dev/impactedResourcesGetByTenantIdSample.js.map +1 -0
- package/dist-esm/samples-dev/impactedResourcesGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/impactedResourcesGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/impactedResourcesGetSample.js +38 -0
- package/dist-esm/samples-dev/impactedResourcesGetSample.js.map +1 -0
- package/dist-esm/samples-dev/impactedResourcesListBySubscriptionIdAndEventIdSample.d.ts +2 -0
- package/dist-esm/samples-dev/impactedResourcesListBySubscriptionIdAndEventIdSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/impactedResourcesListBySubscriptionIdAndEventIdSample.js +62 -0
- package/dist-esm/samples-dev/impactedResourcesListBySubscriptionIdAndEventIdSample.js.map +1 -0
- package/dist-esm/samples-dev/impactedResourcesListByTenantIdAndEventIdSample.d.ts +2 -0
- package/dist-esm/samples-dev/impactedResourcesListByTenantIdAndEventIdSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/impactedResourcesListByTenantIdAndEventIdSample.js +63 -0
- package/dist-esm/samples-dev/impactedResourcesListByTenantIdAndEventIdSample.js.map +1 -0
- package/dist-esm/samples-dev/metadataGetEntitySample.d.ts +2 -0
- package/dist-esm/samples-dev/metadataGetEntitySample.d.ts.map +1 -0
- package/dist-esm/samples-dev/metadataGetEntitySample.js +38 -0
- package/dist-esm/samples-dev/metadataGetEntitySample.js.map +1 -0
- package/dist-esm/samples-dev/metadataListSample.d.ts +2 -0
- package/dist-esm/samples-dev/metadataListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/metadataListSample.js +58 -0
- package/dist-esm/samples-dev/metadataListSample.js.map +1 -0
- package/dist-esm/samples-dev/operationsListSample.d.ts +2 -0
- package/dist-esm/samples-dev/operationsListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/operationsListSample.js +37 -0
- package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
- package/dist-esm/samples-dev/securityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdSample.d.ts +2 -0
- package/dist-esm/samples-dev/securityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/securityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdSample.js +58 -0
- package/dist-esm/samples-dev/securityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdSample.js.map +1 -0
- package/dist-esm/samples-dev/securityAdvisoryImpactedResourcesListByTenantIdAndEventIdSample.d.ts +2 -0
- package/dist-esm/samples-dev/securityAdvisoryImpactedResourcesListByTenantIdAndEventIdSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/securityAdvisoryImpactedResourcesListByTenantIdAndEventIdSample.js +59 -0
- package/dist-esm/samples-dev/securityAdvisoryImpactedResourcesListByTenantIdAndEventIdSample.js.map +1 -0
- package/dist-esm/src/microsoftResourceHealth.d.ts +8 -4
- package/dist-esm/src/microsoftResourceHealth.d.ts.map +1 -1
- package/dist-esm/src/microsoftResourceHealth.js +10 -6
- package/dist-esm/src/microsoftResourceHealth.js.map +1 -1
- package/dist-esm/src/models/index.d.ts +657 -34
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +114 -0
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/models/mappers.d.ts +24 -3
- package/dist-esm/src/models/mappers.d.ts.map +1 -1
- package/dist-esm/src/models/mappers.js +883 -100
- package/dist-esm/src/models/mappers.js.map +1 -1
- package/dist-esm/src/models/parameters.d.ts +4 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -1
- package/dist-esm/src/models/parameters.js +51 -3
- package/dist-esm/src/models/parameters.js.map +1 -1
- package/dist-esm/src/operations/availabilityStatuses.d.ts +9 -15
- package/dist-esm/src/operations/availabilityStatuses.d.ts.map +1 -1
- package/dist-esm/src/operations/availabilityStatuses.js +9 -15
- package/dist-esm/src/operations/availabilityStatuses.js.map +1 -1
- package/dist-esm/src/operations/emergingIssues.d.ts +6 -5
- package/dist-esm/src/operations/emergingIssues.d.ts.map +1 -1
- package/dist-esm/src/operations/emergingIssues.js +15 -14
- package/dist-esm/src/operations/emergingIssues.js.map +1 -1
- package/dist-esm/src/operations/eventOperations.d.ts +39 -0
- package/dist-esm/src/operations/eventOperations.d.ts.map +1 -0
- package/dist-esm/src/operations/eventOperations.js +137 -0
- package/dist-esm/src/operations/eventOperations.js.map +1 -0
- package/dist-esm/src/operations/eventsOperations.d.ts +83 -0
- package/dist-esm/src/operations/eventsOperations.d.ts.map +1 -0
- package/dist-esm/src/operations/eventsOperations.js +393 -0
- package/dist-esm/src/operations/eventsOperations.js.map +1 -0
- package/dist-esm/src/operations/impactedResources.d.ts +72 -0
- package/dist-esm/src/operations/impactedResources.d.ts.map +1 -0
- package/dist-esm/src/operations/impactedResources.js +330 -0
- package/dist-esm/src/operations/impactedResources.js.map +1 -0
- package/dist-esm/src/operations/index.d.ts +6 -1
- package/dist-esm/src/operations/index.d.ts.map +1 -1
- package/dist-esm/src/operations/index.js +6 -1
- package/dist-esm/src/operations/index.js.map +1 -1
- package/dist-esm/src/operations/metadata.d.ts +38 -0
- package/dist-esm/src/operations/metadata.d.ts.map +1 -0
- package/dist-esm/src/operations/metadata.js +162 -0
- package/dist-esm/src/operations/metadata.js.map +1 -0
- package/dist-esm/src/operations/securityAdvisoryImpactedResources.d.ts +58 -0
- package/dist-esm/src/operations/securityAdvisoryImpactedResources.d.ts.map +1 -0
- package/dist-esm/src/operations/securityAdvisoryImpactedResources.js +271 -0
- package/dist-esm/src/operations/securityAdvisoryImpactedResources.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/availabilityStatuses.d.ts +4 -7
- package/dist-esm/src/operationsInterfaces/availabilityStatuses.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/emergingIssues.d.ts +3 -2
- package/dist-esm/src/operationsInterfaces/emergingIssues.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/eventOperations.d.ts +31 -0
- package/dist-esm/src/operationsInterfaces/eventOperations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/eventOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/eventOperations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/eventsOperations.d.ts +26 -0
- package/dist-esm/src/operationsInterfaces/eventsOperations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/eventsOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/eventsOperations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/impactedResources.d.ts +32 -0
- package/dist-esm/src/operationsInterfaces/impactedResources.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/impactedResources.js +9 -0
- package/dist-esm/src/operationsInterfaces/impactedResources.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +6 -1
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/index.js +6 -1
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/metadata.d.ts +17 -0
- package/dist-esm/src/operationsInterfaces/metadata.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/metadata.js +9 -0
- package/dist-esm/src/operationsInterfaces/metadata.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/securityAdvisoryImpactedResources.d.ts +18 -0
- package/dist-esm/src/operationsInterfaces/securityAdvisoryImpactedResources.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/securityAdvisoryImpactedResources.js +9 -0
- package/dist-esm/src/operationsInterfaces/securityAdvisoryImpactedResources.js.map +1 -0
- package/dist-esm/test/resourcehealth_operations_test.spec.d.ts +4 -0
- package/dist-esm/test/resourcehealth_operations_test.spec.d.ts.map +1 -0
- package/dist-esm/test/resourcehealth_operations_test.spec.js +56 -0
- package/dist-esm/test/resourcehealth_operations_test.spec.js.map +1 -0
- package/package.json +6 -6
- package/review/arm-resourcehealth.api.md +516 -8
- package/src/microsoftResourceHealth.ts +29 -8
- package/src/models/index.ts +757 -35
- package/src/models/mappers.ts +956 -101
- package/src/models/parameters.ts +55 -3
- package/src/operations/availabilityStatuses.ts +9 -15
- package/src/operations/emergingIssues.ts +24 -18
- package/src/operations/eventOperations.ts +184 -0
- package/src/operations/eventsOperations.ts +434 -0
- package/src/operations/impactedResources.ts +414 -0
- package/src/operations/index.ts +6 -1
- package/src/operations/metadata.ts +182 -0
- package/src/operations/securityAdvisoryImpactedResources.ts +342 -0
- package/src/operationsInterfaces/availabilityStatuses.ts +4 -7
- package/src/operationsInterfaces/emergingIssues.ts +3 -0
- package/src/operationsInterfaces/eventOperations.ts +60 -0
- package/src/operationsInterfaces/eventsOperations.ts +47 -0
- package/src/operationsInterfaces/impactedResources.ts +63 -0
- package/src/operationsInterfaces/index.ts +6 -1
- package/src/operationsInterfaces/metadata.ts +36 -0
- package/src/operationsInterfaces/securityAdvisoryImpactedResources.ts +37 -0
- package/types/arm-resourcehealth.d.ts +853 -23
- package/types/tsdoc-metadata.json +1 -1
- package/dist-esm/test/sampleTest.d.ts +0 -2
- package/dist-esm/test/sampleTest.d.ts.map +0 -1
- package/dist-esm/test/sampleTest.js +0 -38
- package/dist-esm/test/sampleTest.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"childResourcesListSample.js","sourceRoot":"","sources":["../../samples-dev/childResourcesListSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe
|
1
|
+
{"version":3,"file":"childResourcesListSample.js","sourceRoot":"","sources":["../../samples-dev/childResourcesListSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,+BAA+B;;;QAC5C,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC;YAC7C,sCAAsC,CAAC;QACzC,MAAM,WAAW,GAAG,aAAa,CAAC;QAClC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,eAAA,KAAA,cAAA,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA,IAAA;gBAAvC,cAAuC;gBAAvC,WAAuC;;oBAAnD,IAAI,IAAI,KAAA,CAAA;oBACjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;;;;;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,SAAe,IAAI;;QACjB,+BAA+B,EAAE,CAAC;IACpC,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
@@ -16,15 +16,16 @@ dotenv.config();
|
|
16
16
|
* This sample demonstrates how to Gets Azure services' emerging issues.
|
17
17
|
*
|
18
18
|
* @summary Gets Azure services' emerging issues.
|
19
|
-
* x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/
|
19
|
+
* x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/EmergingIssues_Get.json
|
20
20
|
*/
|
21
21
|
function getEmergingIssues() {
|
22
22
|
return __awaiter(this, void 0, void 0, function* () {
|
23
23
|
const subscriptionId = process.env["RESOURCEHEALTH_SUBSCRIPTION_ID"] ||
|
24
24
|
"00000000-0000-0000-0000-000000000000";
|
25
|
+
const issueName = "default";
|
25
26
|
const credential = new DefaultAzureCredential();
|
26
27
|
const client = new MicrosoftResourceHealth(credential, subscriptionId);
|
27
|
-
const result = yield client.emergingIssues.get();
|
28
|
+
const result = yield client.emergingIssues.get(issueName);
|
28
29
|
console.log(result);
|
29
30
|
});
|
30
31
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"emergingIssuesGetSample.js","sourceRoot":"","sources":["../../samples-dev/emergingIssuesGetSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,iBAAiB;;QAC9B,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC;YAC7C,sCAAsC,CAAC;QACzC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,GAAG,
|
1
|
+
{"version":3,"file":"emergingIssuesGetSample.js","sourceRoot":"","sources":["../../samples-dev/emergingIssuesGetSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,iBAAiB;;QAC9B,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC;YAC7C,sCAAsC,CAAC;QACzC,MAAM,SAAS,GAAG,SAAS,CAAC;QAC5B,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAC1D,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,iBAAiB,EAAE,CAAC;IACtB,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
@@ -16,7 +16,7 @@ dotenv.config();
|
|
16
16
|
* This sample demonstrates how to Lists Azure services' emerging issues.
|
17
17
|
*
|
18
18
|
* @summary Lists Azure services' emerging issues.
|
19
|
-
* x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/
|
19
|
+
* x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/EmergingIssues_List.json
|
20
20
|
*/
|
21
21
|
function getEmergingIssues() {
|
22
22
|
var _a, e_1, _b, _c;
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"eventFetchDetailsBySubscriptionIdAndTrackingIdSample.d.ts","sourceRoot":"","sources":["../../samples-dev/eventFetchDetailsBySubscriptionIdAndTrackingIdSample.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
3
|
+
* Licensed under the MIT License.
|
4
|
+
*
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
7
|
+
*/
|
8
|
+
import { __awaiter } from "tslib";
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
10
|
+
// Licensed under the MIT License.
|
11
|
+
import { MicrosoftResourceHealth } from "@azure/arm-resourcehealth";
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
13
|
+
import * as dotenv from "dotenv";
|
14
|
+
dotenv.config();
|
15
|
+
/**
|
16
|
+
* This sample demonstrates how to Service health event details in the subscription by event tracking id. This can be used to fetch sensitive properties for Security Advisory events
|
17
|
+
*
|
18
|
+
* @summary Service health event details in the subscription by event tracking id. This can be used to fetch sensitive properties for Security Advisory events
|
19
|
+
* x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/Event_fetchDetailsBySubscriptionIdAndTrackingId.json
|
20
|
+
*/
|
21
|
+
function eventDetailsBySubscriptionIdAndTrackingId() {
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
23
|
+
const subscriptionId = process.env["RESOURCEHEALTH_SUBSCRIPTION_ID"] || "subscriptionId";
|
24
|
+
const eventTrackingId = "eventTrackingId";
|
25
|
+
const credential = new DefaultAzureCredential();
|
26
|
+
const client = new MicrosoftResourceHealth(credential, subscriptionId);
|
27
|
+
const result = yield client.eventOperations.fetchDetailsBySubscriptionIdAndTrackingId(eventTrackingId);
|
28
|
+
console.log(result);
|
29
|
+
});
|
30
|
+
}
|
31
|
+
function main() {
|
32
|
+
return __awaiter(this, void 0, void 0, function* () {
|
33
|
+
eventDetailsBySubscriptionIdAndTrackingId();
|
34
|
+
});
|
35
|
+
}
|
36
|
+
main().catch(console.error);
|
37
|
+
//# sourceMappingURL=eventFetchDetailsBySubscriptionIdAndTrackingIdSample.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"eventFetchDetailsBySubscriptionIdAndTrackingIdSample.js","sourceRoot":"","sources":["../../samples-dev/eventFetchDetailsBySubscriptionIdAndTrackingIdSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,yCAAyC;;QACtD,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,IAAI,gBAAgB,CAAC;QACpE,MAAM,eAAe,GAAG,iBAAiB,CAAC;QAC1C,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,yCAAyC,CACnF,eAAe,CAChB,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,yCAAyC,EAAE,CAAC;IAC9C,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"eventFetchDetailsByTenantIdAndTrackingIdSample.d.ts","sourceRoot":"","sources":["../../samples-dev/eventFetchDetailsByTenantIdAndTrackingIdSample.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
3
|
+
* Licensed under the MIT License.
|
4
|
+
*
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
7
|
+
*/
|
8
|
+
import { __awaiter } from "tslib";
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
10
|
+
// Licensed under the MIT License.
|
11
|
+
import { MicrosoftResourceHealth } from "@azure/arm-resourcehealth";
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
13
|
+
import * as dotenv from "dotenv";
|
14
|
+
dotenv.config();
|
15
|
+
/**
|
16
|
+
* This sample demonstrates how to Service health event details in the tenant by event tracking id. This can be used to fetch sensitive properties for Security Advisory events
|
17
|
+
*
|
18
|
+
* @summary Service health event details in the tenant by event tracking id. This can be used to fetch sensitive properties for Security Advisory events
|
19
|
+
* x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/Event_fetchDetailsByTenantIdAndTrackingId.json
|
20
|
+
*/
|
21
|
+
function eventDetailsByTenantIdAndTrackingId() {
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
23
|
+
const subscriptionId = process.env["RESOURCEHEALTH_SUBSCRIPTION_ID"] ||
|
24
|
+
"00000000-0000-0000-0000-000000000000";
|
25
|
+
const eventTrackingId = "eventTrackingId";
|
26
|
+
const credential = new DefaultAzureCredential();
|
27
|
+
const client = new MicrosoftResourceHealth(credential, subscriptionId);
|
28
|
+
const result = yield client.eventOperations.fetchDetailsByTenantIdAndTrackingId(eventTrackingId);
|
29
|
+
console.log(result);
|
30
|
+
});
|
31
|
+
}
|
32
|
+
function main() {
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
34
|
+
eventDetailsByTenantIdAndTrackingId();
|
35
|
+
});
|
36
|
+
}
|
37
|
+
main().catch(console.error);
|
38
|
+
//# sourceMappingURL=eventFetchDetailsByTenantIdAndTrackingIdSample.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"eventFetchDetailsByTenantIdAndTrackingIdSample.js","sourceRoot":"","sources":["../../samples-dev/eventFetchDetailsByTenantIdAndTrackingIdSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,mCAAmC;;QAChD,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC;YAC7C,sCAAsC,CAAC;QACzC,MAAM,eAAe,GAAG,iBAAiB,CAAC;QAC1C,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,mCAAmC,CAC7E,eAAe,CAChB,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,mCAAmC,EAAE,CAAC;IACxC,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"eventGetBySubscriptionIdAndTrackingIdSample.d.ts","sourceRoot":"","sources":["../../samples-dev/eventGetBySubscriptionIdAndTrackingIdSample.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
3
|
+
* Licensed under the MIT License.
|
4
|
+
*
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
7
|
+
*/
|
8
|
+
import { __awaiter } from "tslib";
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
10
|
+
// Licensed under the MIT License.
|
11
|
+
import { MicrosoftResourceHealth } from "@azure/arm-resourcehealth";
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
13
|
+
import * as dotenv from "dotenv";
|
14
|
+
dotenv.config();
|
15
|
+
/**
|
16
|
+
* This sample demonstrates how to Service health event in the subscription by event tracking id
|
17
|
+
*
|
18
|
+
* @summary Service health event in the subscription by event tracking id
|
19
|
+
* x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/Event_GetBySubscriptionIdAndTrackingId.json
|
20
|
+
*/
|
21
|
+
function securityAdvisoriesEventBySubscriptionIdAndTrackingId() {
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
23
|
+
const subscriptionId = process.env["RESOURCEHEALTH_SUBSCRIPTION_ID"] || "subscriptionId";
|
24
|
+
const filter = "properties/status eq 'Active'";
|
25
|
+
const queryStartTime = "7/10/2022";
|
26
|
+
const eventTrackingId = "eventTrackingId";
|
27
|
+
const options = {
|
28
|
+
filter,
|
29
|
+
queryStartTime
|
30
|
+
};
|
31
|
+
const credential = new DefaultAzureCredential();
|
32
|
+
const client = new MicrosoftResourceHealth(credential, subscriptionId);
|
33
|
+
const result = yield client.eventOperations.getBySubscriptionIdAndTrackingId(eventTrackingId, options);
|
34
|
+
console.log(result);
|
35
|
+
});
|
36
|
+
}
|
37
|
+
function main() {
|
38
|
+
return __awaiter(this, void 0, void 0, function* () {
|
39
|
+
securityAdvisoriesEventBySubscriptionIdAndTrackingId();
|
40
|
+
});
|
41
|
+
}
|
42
|
+
main().catch(console.error);
|
43
|
+
//# sourceMappingURL=eventGetBySubscriptionIdAndTrackingIdSample.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"eventGetBySubscriptionIdAndTrackingIdSample.js","sourceRoot":"","sources":["../../samples-dev/eventGetBySubscriptionIdAndTrackingIdSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,uBAAuB,EACxB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,oDAAoD;;QACjE,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,IAAI,gBAAgB,CAAC;QACpE,MAAM,MAAM,GAAG,+BAA+B,CAAC;QAC/C,MAAM,cAAc,GAAG,WAAW,CAAC;QACnC,MAAM,eAAe,GAAG,iBAAiB,CAAC;QAC1C,MAAM,OAAO,GAAwD;YACnE,MAAM;YACN,cAAc;SACf,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,gCAAgC,CAC1E,eAAe,EACf,OAAO,CACR,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,oDAAoD,EAAE,CAAC;IACzD,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"eventGetByTenantIdAndTrackingIdSample.d.ts","sourceRoot":"","sources":["../../samples-dev/eventGetByTenantIdAndTrackingIdSample.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
3
|
+
* Licensed under the MIT License.
|
4
|
+
*
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
7
|
+
*/
|
8
|
+
import { __awaiter } from "tslib";
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
10
|
+
// Licensed under the MIT License.
|
11
|
+
import { MicrosoftResourceHealth } from "@azure/arm-resourcehealth";
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
13
|
+
import * as dotenv from "dotenv";
|
14
|
+
dotenv.config();
|
15
|
+
/**
|
16
|
+
* This sample demonstrates how to Service health event in the tenant by event tracking id
|
17
|
+
*
|
18
|
+
* @summary Service health event in the tenant by event tracking id
|
19
|
+
* x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/Event_GetByTenantIdAndTrackingId.json
|
20
|
+
*/
|
21
|
+
function eventByTenantIdAndTrackingId() {
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
23
|
+
const subscriptionId = process.env["RESOURCEHEALTH_SUBSCRIPTION_ID"] ||
|
24
|
+
"00000000-0000-0000-0000-000000000000";
|
25
|
+
const filter = "properties/status eq 'Active'";
|
26
|
+
const queryStartTime = "7/10/2022";
|
27
|
+
const eventTrackingId = "eventTrackingId";
|
28
|
+
const options = {
|
29
|
+
filter,
|
30
|
+
queryStartTime
|
31
|
+
};
|
32
|
+
const credential = new DefaultAzureCredential();
|
33
|
+
const client = new MicrosoftResourceHealth(credential, subscriptionId);
|
34
|
+
const result = yield client.eventOperations.getByTenantIdAndTrackingId(eventTrackingId, options);
|
35
|
+
console.log(result);
|
36
|
+
});
|
37
|
+
}
|
38
|
+
function main() {
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
40
|
+
eventByTenantIdAndTrackingId();
|
41
|
+
});
|
42
|
+
}
|
43
|
+
main().catch(console.error);
|
44
|
+
//# sourceMappingURL=eventGetByTenantIdAndTrackingIdSample.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"eventGetByTenantIdAndTrackingIdSample.js","sourceRoot":"","sources":["../../samples-dev/eventGetByTenantIdAndTrackingIdSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,uBAAuB,EACxB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,4BAA4B;;QACzC,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC;YAC7C,sCAAsC,CAAC;QACzC,MAAM,MAAM,GAAG,+BAA+B,CAAC;QAC/C,MAAM,cAAc,GAAG,WAAW,CAAC;QACnC,MAAM,eAAe,GAAG,iBAAiB,CAAC;QAC1C,MAAM,OAAO,GAAkD;YAC7D,MAAM;YACN,cAAc;SACf,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,0BAA0B,CACpE,eAAe,EACf,OAAO,CACR,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,4BAA4B,EAAE,CAAC;IACjC,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"eventsListBySingleResourceSample.d.ts","sourceRoot":"","sources":["../../samples-dev/eventsListBySingleResourceSample.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
3
|
+
* Licensed under the MIT License.
|
4
|
+
*
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
7
|
+
*/
|
8
|
+
import { __asyncValues, __awaiter } from "tslib";
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
10
|
+
// Licensed under the MIT License.
|
11
|
+
import { MicrosoftResourceHealth } from "@azure/arm-resourcehealth";
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
13
|
+
import * as dotenv from "dotenv";
|
14
|
+
dotenv.config();
|
15
|
+
/**
|
16
|
+
* This sample demonstrates how to Lists current service health events for given resource.
|
17
|
+
*
|
18
|
+
* @summary Lists current service health events for given resource.
|
19
|
+
* x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/Events_ListBySingleResource.json
|
20
|
+
*/
|
21
|
+
function listEventsBySingleResource() {
|
22
|
+
var _a, e_1, _b, _c;
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
24
|
+
const subscriptionId = process.env["RESOURCEHEALTH_SUBSCRIPTION_ID"] ||
|
25
|
+
"00000000-0000-0000-0000-000000000000";
|
26
|
+
const resourceUri = "subscriptions/4abcdefgh-ijkl-mnop-qrstuvwxyz/resourceGroups/rhctestenv/providers/Microsoft.Compute/virtualMachines/rhctestenvV1PI";
|
27
|
+
const credential = new DefaultAzureCredential();
|
28
|
+
const client = new MicrosoftResourceHealth(credential, subscriptionId);
|
29
|
+
const resArray = new Array();
|
30
|
+
try {
|
31
|
+
for (var _d = true, _e = __asyncValues(client.eventsOperations.listBySingleResource(resourceUri)), _f; _f = yield _e.next(), _a = _f.done, !_a;) {
|
32
|
+
_c = _f.value;
|
33
|
+
_d = false;
|
34
|
+
try {
|
35
|
+
let item = _c;
|
36
|
+
resArray.push(item);
|
37
|
+
}
|
38
|
+
finally {
|
39
|
+
_d = true;
|
40
|
+
}
|
41
|
+
}
|
42
|
+
}
|
43
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
44
|
+
finally {
|
45
|
+
try {
|
46
|
+
if (!_d && !_a && (_b = _e.return)) yield _b.call(_e);
|
47
|
+
}
|
48
|
+
finally { if (e_1) throw e_1.error; }
|
49
|
+
}
|
50
|
+
console.log(resArray);
|
51
|
+
});
|
52
|
+
}
|
53
|
+
function main() {
|
54
|
+
return __awaiter(this, void 0, void 0, function* () {
|
55
|
+
listEventsBySingleResource();
|
56
|
+
});
|
57
|
+
}
|
58
|
+
main().catch(console.error);
|
59
|
+
//# sourceMappingURL=eventsListBySingleResourceSample.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"eventsListBySingleResourceSample.js","sourceRoot":"","sources":["../../samples-dev/eventsListBySingleResourceSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,0BAA0B;;;QACvC,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC;YAC7C,sCAAsC,CAAC;QACzC,MAAM,WAAW,GACf,mIAAmI,CAAC;QACtI,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,eAAA,KAAA,cAAA,MAAM,CAAC,gBAAgB,CAAC,oBAAoB,CACjE,WAAW,CACZ,CAAA,IAAA;gBAFsB,cAEtB;gBAFsB,WAEtB;;oBAFU,IAAI,IAAI,KAAA,CAAA;oBAGjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;;;;;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,SAAe,IAAI;;QACjB,0BAA0B,EAAE,CAAC;IAC/B,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"eventsListBySubscriptionIdSample.d.ts","sourceRoot":"","sources":["../../samples-dev/eventsListBySubscriptionIdSample.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,63 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
3
|
+
* Licensed under the MIT License.
|
4
|
+
*
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
7
|
+
*/
|
8
|
+
import { __asyncValues, __awaiter } from "tslib";
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
10
|
+
// Licensed under the MIT License.
|
11
|
+
import { MicrosoftResourceHealth } from "@azure/arm-resourcehealth";
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
13
|
+
import * as dotenv from "dotenv";
|
14
|
+
dotenv.config();
|
15
|
+
/**
|
16
|
+
* This sample demonstrates how to Lists service health events in the subscription.
|
17
|
+
*
|
18
|
+
* @summary Lists service health events in the subscription.
|
19
|
+
* x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/Events_ListBySubscriptionId.json
|
20
|
+
*/
|
21
|
+
function listEventsBySubscriptionId() {
|
22
|
+
var _a, e_1, _b, _c;
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
24
|
+
const subscriptionId = process.env["RESOURCEHEALTH_SUBSCRIPTION_ID"] || "subscriptionId";
|
25
|
+
const filter = "service eq 'Virtual Machines' or region eq 'West US'";
|
26
|
+
const queryStartTime = "7/24/2020";
|
27
|
+
const options = {
|
28
|
+
filter,
|
29
|
+
queryStartTime
|
30
|
+
};
|
31
|
+
const credential = new DefaultAzureCredential();
|
32
|
+
const client = new MicrosoftResourceHealth(credential, subscriptionId);
|
33
|
+
const resArray = new Array();
|
34
|
+
try {
|
35
|
+
for (var _d = true, _e = __asyncValues(client.eventsOperations.listBySubscriptionId(options)), _f; _f = yield _e.next(), _a = _f.done, !_a;) {
|
36
|
+
_c = _f.value;
|
37
|
+
_d = false;
|
38
|
+
try {
|
39
|
+
let item = _c;
|
40
|
+
resArray.push(item);
|
41
|
+
}
|
42
|
+
finally {
|
43
|
+
_d = true;
|
44
|
+
}
|
45
|
+
}
|
46
|
+
}
|
47
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
48
|
+
finally {
|
49
|
+
try {
|
50
|
+
if (!_d && !_a && (_b = _e.return)) yield _b.call(_e);
|
51
|
+
}
|
52
|
+
finally { if (e_1) throw e_1.error; }
|
53
|
+
}
|
54
|
+
console.log(resArray);
|
55
|
+
});
|
56
|
+
}
|
57
|
+
function main() {
|
58
|
+
return __awaiter(this, void 0, void 0, function* () {
|
59
|
+
listEventsBySubscriptionId();
|
60
|
+
});
|
61
|
+
}
|
62
|
+
main().catch(console.error);
|
63
|
+
//# sourceMappingURL=eventsListBySubscriptionIdSample.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"eventsListBySubscriptionIdSample.js","sourceRoot":"","sources":["../../samples-dev/eventsListBySubscriptionIdSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,uBAAuB,EACxB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,0BAA0B;;;QACvC,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,IAAI,gBAAgB,CAAC;QACpE,MAAM,MAAM,GAAG,sDAAsD,CAAC;QACtE,MAAM,cAAc,GAAG,WAAW,CAAC;QACnC,MAAM,OAAO,GAA6C;YACxD,MAAM;YACN,cAAc;SACf,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,eAAA,KAAA,cAAA,MAAM,CAAC,gBAAgB,CAAC,oBAAoB,CACjE,OAAO,CACR,CAAA,IAAA;gBAFsB,cAEtB;gBAFsB,WAEtB;;oBAFU,IAAI,IAAI,KAAA,CAAA;oBAGjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;;;;;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,SAAe,IAAI;;QACjB,0BAA0B,EAAE,CAAC;IAC/B,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"eventsListByTenantIdSample.d.ts","sourceRoot":"","sources":["../../samples-dev/eventsListByTenantIdSample.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,64 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
3
|
+
* Licensed under the MIT License.
|
4
|
+
*
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
7
|
+
*/
|
8
|
+
import { __asyncValues, __awaiter } from "tslib";
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
10
|
+
// Licensed under the MIT License.
|
11
|
+
import { MicrosoftResourceHealth } from "@azure/arm-resourcehealth";
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
13
|
+
import * as dotenv from "dotenv";
|
14
|
+
dotenv.config();
|
15
|
+
/**
|
16
|
+
* This sample demonstrates how to Lists current service health events in the tenant.
|
17
|
+
*
|
18
|
+
* @summary Lists current service health events in the tenant.
|
19
|
+
* x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/Events_ListByTenantId.json
|
20
|
+
*/
|
21
|
+
function listEventsByTenantId() {
|
22
|
+
var _a, e_1, _b, _c;
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
24
|
+
const subscriptionId = process.env["RESOURCEHEALTH_SUBSCRIPTION_ID"] ||
|
25
|
+
"00000000-0000-0000-0000-000000000000";
|
26
|
+
const filter = "service eq 'Virtual Machines' or region eq 'West US'";
|
27
|
+
const queryStartTime = "7/24/2020";
|
28
|
+
const options = {
|
29
|
+
filter,
|
30
|
+
queryStartTime
|
31
|
+
};
|
32
|
+
const credential = new DefaultAzureCredential();
|
33
|
+
const client = new MicrosoftResourceHealth(credential, subscriptionId);
|
34
|
+
const resArray = new Array();
|
35
|
+
try {
|
36
|
+
for (var _d = true, _e = __asyncValues(client.eventsOperations.listByTenantId(options)), _f; _f = yield _e.next(), _a = _f.done, !_a;) {
|
37
|
+
_c = _f.value;
|
38
|
+
_d = false;
|
39
|
+
try {
|
40
|
+
let item = _c;
|
41
|
+
resArray.push(item);
|
42
|
+
}
|
43
|
+
finally {
|
44
|
+
_d = true;
|
45
|
+
}
|
46
|
+
}
|
47
|
+
}
|
48
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
49
|
+
finally {
|
50
|
+
try {
|
51
|
+
if (!_d && !_a && (_b = _e.return)) yield _b.call(_e);
|
52
|
+
}
|
53
|
+
finally { if (e_1) throw e_1.error; }
|
54
|
+
}
|
55
|
+
console.log(resArray);
|
56
|
+
});
|
57
|
+
}
|
58
|
+
function main() {
|
59
|
+
return __awaiter(this, void 0, void 0, function* () {
|
60
|
+
listEventsByTenantId();
|
61
|
+
});
|
62
|
+
}
|
63
|
+
main().catch(console.error);
|
64
|
+
//# sourceMappingURL=eventsListByTenantIdSample.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"eventsListByTenantIdSample.js","sourceRoot":"","sources":["../../samples-dev/eventsListByTenantIdSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,uBAAuB,EACxB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,oBAAoB;;;QACjC,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC;YAC7C,sCAAsC,CAAC;QACzC,MAAM,MAAM,GAAG,sDAAsD,CAAC;QACtE,MAAM,cAAc,GAAG,WAAW,CAAC;QACnC,MAAM,OAAO,GAAuC;YAClD,MAAM;YACN,cAAc;SACf,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,eAAA,KAAA,cAAA,MAAM,CAAC,gBAAgB,CAAC,cAAc,CAAC,OAAO,CAAC,CAAA,IAAA;gBAA/C,cAA+C;gBAA/C,WAA+C;;oBAA3D,IAAI,IAAI,KAAA,CAAA;oBACjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;;;;;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,SAAe,IAAI;;QACjB,oBAAoB,EAAE,CAAC;IACzB,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"impactedResourcesGetByTenantIdSample.d.ts","sourceRoot":"","sources":["../../samples-dev/impactedResourcesGetByTenantIdSample.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
3
|
+
* Licensed under the MIT License.
|
4
|
+
*
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
7
|
+
*/
|
8
|
+
import { __awaiter } from "tslib";
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
10
|
+
// Licensed under the MIT License.
|
11
|
+
import { MicrosoftResourceHealth } from "@azure/arm-resourcehealth";
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
13
|
+
import * as dotenv from "dotenv";
|
14
|
+
dotenv.config();
|
15
|
+
/**
|
16
|
+
* This sample demonstrates how to Gets the specific impacted resource in the tenant by an event.
|
17
|
+
*
|
18
|
+
* @summary Gets the specific impacted resource in the tenant by an event.
|
19
|
+
* x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/ImpactedResources_GetByTenantId.json
|
20
|
+
*/
|
21
|
+
function impactedResourcesGet() {
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
23
|
+
const subscriptionId = process.env["RESOURCEHEALTH_SUBSCRIPTION_ID"] ||
|
24
|
+
"00000000-0000-0000-0000-000000000000";
|
25
|
+
const eventTrackingId = "BC_1-FXZ";
|
26
|
+
const impactedResourceName = "abc-123-ghj-456";
|
27
|
+
const credential = new DefaultAzureCredential();
|
28
|
+
const client = new MicrosoftResourceHealth(credential, subscriptionId);
|
29
|
+
const result = yield client.impactedResources.getByTenantId(eventTrackingId, impactedResourceName);
|
30
|
+
console.log(result);
|
31
|
+
});
|
32
|
+
}
|
33
|
+
function main() {
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
35
|
+
impactedResourcesGet();
|
36
|
+
});
|
37
|
+
}
|
38
|
+
main().catch(console.error);
|
39
|
+
//# sourceMappingURL=impactedResourcesGetByTenantIdSample.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"impactedResourcesGetByTenantIdSample.js","sourceRoot":"","sources":["../../samples-dev/impactedResourcesGetByTenantIdSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,oBAAoB;;QACjC,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC;YAC7C,sCAAsC,CAAC;QACzC,MAAM,eAAe,GAAG,UAAU,CAAC;QACnC,MAAM,oBAAoB,GAAG,iBAAiB,CAAC;QAC/C,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,iBAAiB,CAAC,aAAa,CACzD,eAAe,EACf,oBAAoB,CACrB,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,oBAAoB,EAAE,CAAC;IACzB,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"impactedResourcesGetSample.d.ts","sourceRoot":"","sources":["../../samples-dev/impactedResourcesGetSample.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
3
|
+
* Licensed under the MIT License.
|
4
|
+
*
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
7
|
+
*/
|
8
|
+
import { __awaiter } from "tslib";
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
10
|
+
// Licensed under the MIT License.
|
11
|
+
import { MicrosoftResourceHealth } from "@azure/arm-resourcehealth";
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
13
|
+
import * as dotenv from "dotenv";
|
14
|
+
dotenv.config();
|
15
|
+
/**
|
16
|
+
* This sample demonstrates how to Gets the specific impacted resource in the subscription by an event.
|
17
|
+
*
|
18
|
+
* @summary Gets the specific impacted resource in the subscription by an event.
|
19
|
+
* x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/ImpactedResources_Get.json
|
20
|
+
*/
|
21
|
+
function impactedResourcesGet() {
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
23
|
+
const subscriptionId = process.env["RESOURCEHEALTH_SUBSCRIPTION_ID"] || "subscriptionId";
|
24
|
+
const eventTrackingId = "BC_1-FXZ";
|
25
|
+
const impactedResourceName = "abc-123-ghj-456";
|
26
|
+
const credential = new DefaultAzureCredential();
|
27
|
+
const client = new MicrosoftResourceHealth(credential, subscriptionId);
|
28
|
+
const result = yield client.impactedResources.get(eventTrackingId, impactedResourceName);
|
29
|
+
console.log(result);
|
30
|
+
});
|
31
|
+
}
|
32
|
+
function main() {
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
34
|
+
impactedResourcesGet();
|
35
|
+
});
|
36
|
+
}
|
37
|
+
main().catch(console.error);
|
38
|
+
//# sourceMappingURL=impactedResourcesGetSample.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"impactedResourcesGetSample.js","sourceRoot":"","sources":["../../samples-dev/impactedResourcesGetSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,oBAAoB;;QACjC,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,IAAI,gBAAgB,CAAC;QACpE,MAAM,eAAe,GAAG,UAAU,CAAC;QACnC,MAAM,oBAAoB,GAAG,iBAAiB,CAAC;QAC/C,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,iBAAiB,CAAC,GAAG,CAC/C,eAAe,EACf,oBAAoB,CACrB,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,oBAAoB,EAAE,CAAC;IACzB,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"impactedResourcesListBySubscriptionIdAndEventIdSample.d.ts","sourceRoot":"","sources":["../../samples-dev/impactedResourcesListBySubscriptionIdAndEventIdSample.ts"],"names":[],"mappings":""}
|