@azure/arm-resourcehealth 3.0.1-alpha.20220412.1 → 3.0.1-alpha.20220505.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +3 -7
- package/LICENSE +1 -1
- package/README.md +11 -0
- package/dist/index.js +21 -2
- 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.d.ts +2 -0
- package/dist-esm/samples-dev/availabilityStatusesGetByResourceSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/availabilityStatusesGetByResourceSample.js +32 -0
- package/dist-esm/samples-dev/availabilityStatusesGetByResourceSample.js.map +1 -0
- package/dist-esm/samples-dev/availabilityStatusesListByResourceGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/availabilityStatusesListByResourceGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/availabilityStatusesListByResourceGroupSample.js +48 -0
- package/dist-esm/samples-dev/availabilityStatusesListByResourceGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/availabilityStatusesListBySubscriptionIdSample.d.ts +2 -0
- package/dist-esm/samples-dev/availabilityStatusesListBySubscriptionIdSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/availabilityStatusesListBySubscriptionIdSample.js +47 -0
- package/dist-esm/samples-dev/availabilityStatusesListBySubscriptionIdSample.js.map +1 -0
- package/dist-esm/samples-dev/availabilityStatusesListSample.d.ts +2 -0
- package/dist-esm/samples-dev/availabilityStatusesListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/availabilityStatusesListSample.js +44 -0
- package/dist-esm/samples-dev/availabilityStatusesListSample.js.map +1 -0
- package/dist-esm/samples-dev/childAvailabilityStatusesGetByResourceSample.d.ts +2 -0
- package/dist-esm/samples-dev/childAvailabilityStatusesGetByResourceSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/childAvailabilityStatusesGetByResourceSample.js +34 -0
- package/dist-esm/samples-dev/childAvailabilityStatusesGetByResourceSample.js.map +1 -0
- package/dist-esm/samples-dev/childAvailabilityStatusesListSample.d.ts +2 -0
- package/dist-esm/samples-dev/childAvailabilityStatusesListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/childAvailabilityStatusesListSample.js +44 -0
- package/dist-esm/samples-dev/childAvailabilityStatusesListSample.js.map +1 -0
- package/dist-esm/samples-dev/childResourcesListSample.d.ts +2 -0
- package/dist-esm/samples-dev/childResourcesListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/childResourcesListSample.js +44 -0
- package/dist-esm/samples-dev/childResourcesListSample.js.map +1 -0
- package/dist-esm/samples-dev/emergingIssuesGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/emergingIssuesGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/emergingIssuesGetSample.js +29 -0
- package/dist-esm/samples-dev/emergingIssuesGetSample.js.map +1 -0
- package/dist-esm/samples-dev/emergingIssuesListSample.d.ts +2 -0
- package/dist-esm/samples-dev/emergingIssuesListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/emergingIssuesListSample.js +43 -0
- package/dist-esm/samples-dev/emergingIssuesListSample.js.map +1 -0
- package/dist-esm/src/microsoftResourceHealth.d.ts.map +1 -1
- package/dist-esm/src/microsoftResourceHealth.js +20 -2
- package/dist-esm/src/microsoftResourceHealth.js.map +1 -1
- package/package.json +26 -10
- package/rollup.config.js +6 -72
- package/src/microsoftResourceHealth.ts +27 -2
- package/tsconfig.json +19 -5
- package/types/tsdoc-metadata.json +1 -1
@@ -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 { __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
|
+
/**
|
14
|
+
* This sample demonstrates how to Lists the all the children and its current health status for a parent resource. Use the nextLink property in the response to get the next page of children current health
|
15
|
+
*
|
16
|
+
* @summary Lists the all the children and its current health status for a parent resource. Use the nextLink property in the response to get the next page of children current health
|
17
|
+
* x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2017-07-01/examples/ChildResources_List.json
|
18
|
+
*/
|
19
|
+
function getHealthHistoryByResource() {
|
20
|
+
var e_1, _a;
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
22
|
+
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
23
|
+
const resourceUri = "resourceUri";
|
24
|
+
const credential = new DefaultAzureCredential();
|
25
|
+
const client = new MicrosoftResourceHealth(credential, subscriptionId);
|
26
|
+
const resArray = new Array();
|
27
|
+
try {
|
28
|
+
for (var _b = __asyncValues(client.childResources.list(resourceUri)), _c; _c = yield _b.next(), !_c.done;) {
|
29
|
+
let item = _c.value;
|
30
|
+
resArray.push(item);
|
31
|
+
}
|
32
|
+
}
|
33
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
34
|
+
finally {
|
35
|
+
try {
|
36
|
+
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
|
37
|
+
}
|
38
|
+
finally { if (e_1) throw e_1.error; }
|
39
|
+
}
|
40
|
+
console.log(resArray);
|
41
|
+
});
|
42
|
+
}
|
43
|
+
getHealthHistoryByResource().catch(console.error);
|
44
|
+
//# sourceMappingURL=childResourcesListSample.js.map
|
@@ -0,0 +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;AAEzD;;;;;GAKG;AACH,SAAe,0BAA0B;;;QACvC,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,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,IAAA,KAAA,cAAA,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA,IAAA;gBAAnD,IAAI,IAAI,WAAA,CAAA;gBACjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,0BAA0B,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"emergingIssuesGetSample.d.ts","sourceRoot":"","sources":["../../samples-dev/emergingIssuesGetSample.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,29 @@
|
|
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
|
+
/**
|
14
|
+
* This sample demonstrates how to Gets Azure services' emerging issues.
|
15
|
+
*
|
16
|
+
* @summary Gets Azure services' emerging issues.
|
17
|
+
* x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2017-07-01/examples/EmergingIssues_Get.json
|
18
|
+
*/
|
19
|
+
function getEmergingIssues() {
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
21
|
+
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
22
|
+
const credential = new DefaultAzureCredential();
|
23
|
+
const client = new MicrosoftResourceHealth(credential, subscriptionId);
|
24
|
+
const result = yield client.emergingIssues.get();
|
25
|
+
console.log(result);
|
26
|
+
});
|
27
|
+
}
|
28
|
+
getEmergingIssues().catch(console.error);
|
29
|
+
//# sourceMappingURL=emergingIssuesGetSample.js.map
|
@@ -0,0 +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;AAEzD;;;;;GAKG;AACH,SAAe,iBAAiB;;QAC9B,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,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,EAAE,CAAC;QACjD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,iBAAiB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"emergingIssuesListSample.d.ts","sourceRoot":"","sources":["../../samples-dev/emergingIssuesListSample.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 { __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
|
+
/**
|
14
|
+
* This sample demonstrates how to Lists Azure services' emerging issues.
|
15
|
+
*
|
16
|
+
* @summary Lists Azure services' emerging issues.
|
17
|
+
* x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2017-07-01/examples/EmergingIssues_List.json
|
18
|
+
*/
|
19
|
+
function getEmergingIssues() {
|
20
|
+
var e_1, _a;
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
22
|
+
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
23
|
+
const credential = new DefaultAzureCredential();
|
24
|
+
const client = new MicrosoftResourceHealth(credential, subscriptionId);
|
25
|
+
const resArray = new Array();
|
26
|
+
try {
|
27
|
+
for (var _b = __asyncValues(client.emergingIssues.list()), _c; _c = yield _b.next(), !_c.done;) {
|
28
|
+
let item = _c.value;
|
29
|
+
resArray.push(item);
|
30
|
+
}
|
31
|
+
}
|
32
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
33
|
+
finally {
|
34
|
+
try {
|
35
|
+
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
|
36
|
+
}
|
37
|
+
finally { if (e_1) throw e_1.error; }
|
38
|
+
}
|
39
|
+
console.log(resArray);
|
40
|
+
});
|
41
|
+
}
|
42
|
+
getEmergingIssues().catch(console.error);
|
43
|
+
//# sourceMappingURL=emergingIssuesListSample.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"emergingIssuesListSample.js","sourceRoot":"","sources":["../../samples-dev/emergingIssuesListSample.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;AAEzD;;;;;GAKG;AACH,SAAe,iBAAiB;;;QAC9B,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,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,IAAA,KAAA,cAAA,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,CAAA,IAAA;gBAAxC,IAAI,IAAI,WAAA,CAAA;gBACjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,iBAAiB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"microsoftResourceHealth.d.ts","sourceRoot":"","sources":["../../src/microsoftResourceHealth.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;
|
1
|
+
{"version":3,"file":"microsoftResourceHealth.d.ts","sourceRoot":"","sources":["../../src/microsoftResourceHealth.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAEjD,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAQ7C,OAAO,EACL,oBAAoB,EACpB,yBAAyB,EACzB,cAAc,EACd,UAAU,EACV,cAAc,EACf,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,qCAAqC,EAAE,MAAM,UAAU,CAAC;AAEjE,qBAAa,uBAAwB,SAAQ,UAAU,CAAC,aAAa;IACnE,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IAEvB;;;;;;OAMG;gBAED,WAAW,EAAE,QAAQ,CAAC,eAAe,EACrC,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,qCAAqC;IAyEjD,oBAAoB,EAAE,oBAAoB,CAAC;IAC3C,yBAAyB,EAAE,yBAAyB,CAAC;IACrD,cAAc,EAAE,cAAc,CAAC;IAC/B,UAAU,EAAE,UAAU,CAAC;IACvB,cAAc,EAAE,cAAc,CAAC;CAChC"}
|
@@ -6,6 +6,7 @@
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
7
7
|
*/
|
8
8
|
import * as coreClient from "@azure/core-client";
|
9
|
+
import * as coreRestPipeline from "@azure/core-rest-pipeline";
|
9
10
|
import { AvailabilityStatusesImpl, ChildAvailabilityStatusesImpl, ChildResourcesImpl, OperationsImpl, EmergingIssuesImpl } from "./operations";
|
10
11
|
export class MicrosoftResourceHealth extends coreClient.ServiceClient {
|
11
12
|
/**
|
@@ -16,6 +17,7 @@ export class MicrosoftResourceHealth extends coreClient.ServiceClient {
|
|
16
17
|
* @param options The parameter options
|
17
18
|
*/
|
18
19
|
constructor(credentials, subscriptionId, options) {
|
20
|
+
var _a, _b;
|
19
21
|
if (credentials === undefined) {
|
20
22
|
throw new Error("'credentials' cannot be null");
|
21
23
|
}
|
@@ -30,7 +32,7 @@ export class MicrosoftResourceHealth extends coreClient.ServiceClient {
|
|
30
32
|
requestContentType: "application/json; charset=utf-8",
|
31
33
|
credential: credentials
|
32
34
|
};
|
33
|
-
const packageDetails = `azsdk-js-arm-resourcehealth/
|
35
|
+
const packageDetails = `azsdk-js-arm-resourcehealth/3.0.1`;
|
34
36
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
35
37
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
36
38
|
: `${packageDetails}`;
|
@@ -39,8 +41,24 @@ export class MicrosoftResourceHealth extends coreClient.ServiceClient {
|
|
39
41
|
}
|
40
42
|
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
41
43
|
userAgentPrefix
|
42
|
-
}, baseUri: options.endpoint
|
44
|
+
}, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
43
45
|
super(optionsWithDefaults);
|
46
|
+
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
47
|
+
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
48
|
+
const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
49
|
+
coreRestPipeline.bearerTokenAuthenticationPolicyName);
|
50
|
+
if (!bearerTokenAuthenticationPolicyFound) {
|
51
|
+
this.pipeline.removePolicy({
|
52
|
+
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
|
53
|
+
});
|
54
|
+
this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
|
55
|
+
scopes: `${optionsWithDefaults.baseUri}/.default`,
|
56
|
+
challengeCallbacks: {
|
57
|
+
authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
|
58
|
+
}
|
59
|
+
}));
|
60
|
+
}
|
61
|
+
}
|
44
62
|
// Parameter assignments
|
45
63
|
this.subscriptionId = subscriptionId;
|
46
64
|
// Assigning values to Constant parameters
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"microsoftResourceHealth.js","sourceRoot":"","sources":["../../src/microsoftResourceHealth.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;
|
1
|
+
{"version":3,"file":"microsoftResourceHealth.js","sourceRoot":"","sources":["../../src/microsoftResourceHealth.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAE9D,OAAO,EACL,wBAAwB,EACxB,6BAA6B,EAC7B,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EACnB,MAAM,cAAc,CAAC;AAUtB,MAAM,OAAO,uBAAwB,SAAQ,UAAU,CAAC,aAAa;IAKnE;;;;;;OAMG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAA+C;;QAE/C,IAAI,WAAW,KAAK,SAAS,EAAE;YAC7B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;SACjD;QACD,IAAI,cAAc,KAAK,SAAS,EAAE;YAChC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;SACpD;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,EAAE,CAAC;SACd;QACD,MAAM,QAAQ,GAA0C;YACtD,kBAAkB,EAAE,iCAAiC;YACrD,UAAU,EAAE,WAAW;SACxB,CAAC;QAEF,MAAM,cAAc,GAAG,mCAAmC,CAAC;QAC3D,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE;YAC7B,OAAO,CAAC,gBAAgB,GAAG,CAAC,uCAAuC,CAAC,CAAC;SACtE;QACD,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,OAAO,EACL,MAAA,MAAA,OAAO,CAAC,QAAQ,mCAAI,OAAO,CAAC,OAAO,mCAAI,8BAA8B,GACxE,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAE3B,IAAI,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,KAAI,OAAO,CAAC,QAAQ,CAAC,kBAAkB,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE;YACzE,MAAM,gBAAgB,GAAsC,OAAO,CAAC,QAAQ,CAAC,kBAAkB,EAAE,CAAC;YAClG,MAAM,oCAAoC,GAAG,gBAAgB,CAAC,IAAI,CAChE,CAAC,cAAc,EAAE,EAAE,CACjB,cAAc,CAAC,IAAI;gBACnB,gBAAgB,CAAC,mCAAmC,CACvD,CAAC;YACF,IAAI,CAAC,oCAAoC,EAAE;gBACzC,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC;oBACzB,IAAI,EAAE,gBAAgB,CAAC,mCAAmC;iBAC3D,CAAC,CAAC;gBACH,IAAI,CAAC,QAAQ,CAAC,SAAS,CACrB,gBAAgB,CAAC,+BAA+B,CAAC;oBAC/C,MAAM,EAAE,GAAG,mBAAmB,CAAC,OAAO,WAAW;oBACjD,kBAAkB,EAAE;wBAClB,2BAA2B,EACzB,UAAU,CAAC,gCAAgC;qBAC9C;iBACF,CAAC,CACH,CAAC;aACH;SACF;QACD,wBAAwB;QACxB,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QAErC,0CAA0C;QAC1C,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,8BAA8B,CAAC;QAC7D,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,YAAY,CAAC;QACrD,IAAI,CAAC,oBAAoB,GAAG,IAAI,wBAAwB,CAAC,IAAI,CAAC,CAAC;QAC/D,IAAI,CAAC,yBAAyB,GAAG,IAAI,6BAA6B,CAAC,IAAI,CAAC,CAAC;QACzE,IAAI,CAAC,cAAc,GAAG,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC;QACnD,IAAI,CAAC,UAAU,GAAG,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC;QAC3C,IAAI,CAAC,cAAc,GAAG,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACrD,CAAC;CAOF"}
|
package/package.json
CHANGED
@@ -3,15 +3,15 @@
|
|
3
3
|
"sdk-type": "mgmt",
|
4
4
|
"author": "Microsoft Corporation",
|
5
5
|
"description": "A generated SDK for MicrosoftResourceHealth.",
|
6
|
-
"version": "3.0.1-alpha.
|
6
|
+
"version": "3.0.1-alpha.20220505.1",
|
7
7
|
"engines": {
|
8
8
|
"node": ">=12.0.0"
|
9
9
|
},
|
10
10
|
"dependencies": {
|
11
11
|
"@azure/core-paging": "^1.2.0",
|
12
|
-
"@azure/core-client": "^1.
|
12
|
+
"@azure/core-client": "^1.5.0",
|
13
13
|
"@azure/core-auth": "^1.3.0",
|
14
|
-
"@azure/core-rest-pipeline": "^1.
|
14
|
+
"@azure/core-rest-pipeline": "^1.8.0",
|
15
15
|
"tslib": "^2.2.0"
|
16
16
|
},
|
17
17
|
"keywords": [
|
@@ -26,14 +26,14 @@
|
|
26
26
|
"module": "./dist-esm/src/index.js",
|
27
27
|
"types": "./types/arm-resourcehealth.d.ts",
|
28
28
|
"devDependencies": {
|
29
|
-
"@microsoft/api-extractor": "
|
29
|
+
"@microsoft/api-extractor": "7.18.11",
|
30
30
|
"@rollup/plugin-commonjs": "^21.0.1",
|
31
|
-
"@rollup/plugin-json": "^4.
|
32
|
-
"@rollup/plugin-multi-entry": "^
|
33
|
-
"@rollup/plugin-node-resolve": "^
|
31
|
+
"@rollup/plugin-json": "^4.1.0",
|
32
|
+
"@rollup/plugin-multi-entry": "^4.1.0",
|
33
|
+
"@rollup/plugin-node-resolve": "^13.1.3",
|
34
34
|
"mkdirp": "^1.0.4",
|
35
|
-
"rollup": "^2.
|
36
|
-
"rollup-plugin-sourcemaps": "^0.
|
35
|
+
"rollup": "^2.66.1",
|
36
|
+
"rollup-plugin-sourcemaps": "^0.6.3",
|
37
37
|
"typescript": "~4.2.0",
|
38
38
|
"uglify-js": "^3.4.9",
|
39
39
|
"rimraf": "^3.0.0",
|
@@ -96,5 +96,21 @@
|
|
96
96
|
"docs": "echo skipped"
|
97
97
|
},
|
98
98
|
"sideEffects": false,
|
99
|
-
"
|
99
|
+
"//metadata": {
|
100
|
+
"constantPaths": [
|
101
|
+
{
|
102
|
+
"path": "src/microsoftResourceHealth.ts",
|
103
|
+
"prefix": "packageDetails"
|
104
|
+
}
|
105
|
+
]
|
106
|
+
},
|
107
|
+
"autoPublish": true,
|
108
|
+
"//sampleConfiguration": {
|
109
|
+
"productName": "",
|
110
|
+
"productSlugs": [
|
111
|
+
"azure"
|
112
|
+
],
|
113
|
+
"disableDocsMs": true,
|
114
|
+
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-resourcehealth?view=azure-node-preview"
|
115
|
+
}
|
100
116
|
}
|
package/rollup.config.js
CHANGED
@@ -14,62 +14,14 @@ import json from "@rollup/plugin-json";
|
|
14
14
|
|
15
15
|
import nodeBuiltins from "builtin-modules";
|
16
16
|
|
17
|
-
/**
|
18
|
-
* Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api.
|
19
|
-
*
|
20
|
-
* NOTE: this manual configuration is only needed because OpenTelemetry uses an
|
21
|
-
* __exportStar downleveled helper function to declare its exports which confuses
|
22
|
-
* rollup's automatic discovery mechanism.
|
23
|
-
*
|
24
|
-
* @returns an object reference that can be `...`'d into your cjs() configuration.
|
25
|
-
*/
|
26
|
-
export function openTelemetryCommonJs() {
|
27
|
-
const namedExports = {};
|
28
|
-
|
29
|
-
for (const key of [
|
30
|
-
"@opentelemetry/api",
|
31
|
-
"@azure/core-tracing/node_modules/@opentelemetry/api"
|
32
|
-
]) {
|
33
|
-
namedExports[key] = [
|
34
|
-
"SpanKind",
|
35
|
-
"TraceFlags",
|
36
|
-
"getSpan",
|
37
|
-
"setSpan",
|
38
|
-
"SpanStatusCode",
|
39
|
-
"getSpanContext",
|
40
|
-
"setSpanContext"
|
41
|
-
];
|
42
|
-
}
|
43
|
-
|
44
|
-
const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"];
|
45
|
-
|
46
|
-
for (const version of releasedOpenTelemetryVersions) {
|
47
|
-
namedExports[
|
48
|
-
// working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path.
|
49
|
-
`../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js`
|
50
|
-
] = [
|
51
|
-
"SpanKind",
|
52
|
-
"TraceFlags",
|
53
|
-
"getSpan",
|
54
|
-
"setSpan",
|
55
|
-
"StatusCode",
|
56
|
-
"CanonicalCode",
|
57
|
-
"getSpanContext",
|
58
|
-
"setSpanContext"
|
59
|
-
];
|
60
|
-
}
|
61
|
-
|
62
|
-
return namedExports;
|
63
|
-
}
|
64
|
-
|
65
17
|
// #region Warning Handler
|
66
18
|
|
67
19
|
/**
|
68
|
-
* A function that can determine whether a
|
20
|
+
* A function that can determine whether a rollup warning should be ignored. If
|
69
21
|
* the function returns `true`, then the warning will not be displayed.
|
70
22
|
*/
|
71
23
|
|
72
|
-
function
|
24
|
+
function ignoreNiseSinonEval(warning) {
|
73
25
|
return (
|
74
26
|
warning.code === "EVAL" &&
|
75
27
|
warning.id &&
|
@@ -78,17 +30,14 @@ function ignoreNiseSinonEvalWarnings(warning) {
|
|
78
30
|
);
|
79
31
|
}
|
80
32
|
|
81
|
-
function
|
33
|
+
function ignoreChaiCircularDependency(warning) {
|
82
34
|
return (
|
83
35
|
warning.code === "CIRCULAR_DEPENDENCY" &&
|
84
36
|
warning.importer && warning.importer.includes("node_modules/chai") === true
|
85
37
|
);
|
86
38
|
}
|
87
39
|
|
88
|
-
const warningInhibitors = [
|
89
|
-
ignoreChaiCircularDependencyWarnings,
|
90
|
-
ignoreNiseSinonEvalWarnings
|
91
|
-
];
|
40
|
+
const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval];
|
92
41
|
|
93
42
|
/**
|
94
43
|
* Construct a warning handler for the shared rollup configuration
|
@@ -122,22 +71,7 @@ function makeBrowserTestConfig() {
|
|
122
71
|
nodeResolve({
|
123
72
|
mainFields: ["module", "browser"]
|
124
73
|
}),
|
125
|
-
cjs(
|
126
|
-
namedExports: {
|
127
|
-
// Chai's strange internal architecture makes it impossible to statically
|
128
|
-
// analyze its exports.
|
129
|
-
chai: [
|
130
|
-
"version",
|
131
|
-
"use",
|
132
|
-
"util",
|
133
|
-
"config",
|
134
|
-
"expect",
|
135
|
-
"should",
|
136
|
-
"assert"
|
137
|
-
],
|
138
|
-
...openTelemetryCommonJs()
|
139
|
-
}
|
140
|
-
}),
|
74
|
+
cjs(),
|
141
75
|
json(),
|
142
76
|
sourcemaps()
|
143
77
|
//viz({ filename: "dist-test/browser-stats.html", sourcemap: true })
|
@@ -173,7 +107,7 @@ export function makeConfig(pkg, options) {
|
|
173
107
|
],
|
174
108
|
output: { file: "dist/index.js", format: "cjs", sourcemap: true },
|
175
109
|
preserveSymlinks: false,
|
176
|
-
plugins: [sourcemaps(), nodeResolve()
|
110
|
+
plugins: [sourcemaps(), nodeResolve()]
|
177
111
|
};
|
178
112
|
|
179
113
|
const config = [baseConfig];
|
@@ -7,6 +7,7 @@
|
|
7
7
|
*/
|
8
8
|
|
9
9
|
import * as coreClient from "@azure/core-client";
|
10
|
+
import * as coreRestPipeline from "@azure/core-rest-pipeline";
|
10
11
|
import * as coreAuth from "@azure/core-auth";
|
11
12
|
import {
|
12
13
|
AvailabilityStatusesImpl,
|
@@ -57,7 +58,7 @@ export class MicrosoftResourceHealth extends coreClient.ServiceClient {
|
|
57
58
|
credential: credentials
|
58
59
|
};
|
59
60
|
|
60
|
-
const packageDetails = `azsdk-js-arm-resourcehealth/
|
61
|
+
const packageDetails = `azsdk-js-arm-resourcehealth/3.0.1`;
|
61
62
|
const userAgentPrefix =
|
62
63
|
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
63
64
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
@@ -72,9 +73,33 @@ export class MicrosoftResourceHealth extends coreClient.ServiceClient {
|
|
72
73
|
userAgentOptions: {
|
73
74
|
userAgentPrefix
|
74
75
|
},
|
75
|
-
baseUri:
|
76
|
+
baseUri:
|
77
|
+
options.endpoint ?? options.baseUri ?? "https://management.azure.com"
|
76
78
|
};
|
77
79
|
super(optionsWithDefaults);
|
80
|
+
|
81
|
+
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
|
82
|
+
const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();
|
83
|
+
const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
|
84
|
+
(pipelinePolicy) =>
|
85
|
+
pipelinePolicy.name ===
|
86
|
+
coreRestPipeline.bearerTokenAuthenticationPolicyName
|
87
|
+
);
|
88
|
+
if (!bearerTokenAuthenticationPolicyFound) {
|
89
|
+
this.pipeline.removePolicy({
|
90
|
+
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
|
91
|
+
});
|
92
|
+
this.pipeline.addPolicy(
|
93
|
+
coreRestPipeline.bearerTokenAuthenticationPolicy({
|
94
|
+
scopes: `${optionsWithDefaults.baseUri}/.default`,
|
95
|
+
challengeCallbacks: {
|
96
|
+
authorizeRequestOnChallenge:
|
97
|
+
coreClient.authorizeRequestOnClaimChallenge
|
98
|
+
}
|
99
|
+
})
|
100
|
+
);
|
101
|
+
}
|
102
|
+
}
|
78
103
|
// Parameter assignments
|
79
104
|
this.subscriptionId = subscriptionId;
|
80
105
|
|
package/tsconfig.json
CHANGED
@@ -9,11 +9,25 @@
|
|
9
9
|
"esModuleInterop": true,
|
10
10
|
"allowSyntheticDefaultImports": true,
|
11
11
|
"forceConsistentCasingInFileNames": true,
|
12
|
-
"lib": [
|
12
|
+
"lib": [
|
13
|
+
"es6",
|
14
|
+
"dom"
|
15
|
+
],
|
13
16
|
"declaration": true,
|
14
17
|
"outDir": "./dist-esm",
|
15
|
-
"importHelpers": true
|
18
|
+
"importHelpers": true,
|
19
|
+
"paths": {
|
20
|
+
"@azure/arm-resourcehealth": [
|
21
|
+
"./src/index"
|
22
|
+
]
|
23
|
+
}
|
16
24
|
},
|
17
|
-
"include": [
|
18
|
-
|
19
|
-
|
25
|
+
"include": [
|
26
|
+
"./src/**/*.ts",
|
27
|
+
"./test/**/*.ts",
|
28
|
+
"samples-dev/**/*.ts"
|
29
|
+
],
|
30
|
+
"exclude": [
|
31
|
+
"node_modules"
|
32
|
+
]
|
33
|
+
}
|