@azure/arm-resourcehealth 3.0.1 → 3.1.1-alpha.20220715.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +16 -0
- package/README.md +7 -7
- package/dist/index.js +36 -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/src/microsoftResourceHealth.d.ts +2 -0
- package/dist-esm/src/microsoftResourceHealth.d.ts.map +1 -1
- package/dist-esm/src/microsoftResourceHealth.js +30 -1
- package/dist-esm/src/microsoftResourceHealth.js.map +1 -1
- package/dist-esm/src/models/index.d.ts +8 -2
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +6 -0
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/test/sampleTest.js +11 -13
- package/dist-esm/test/sampleTest.js.map +1 -1
- package/package.json +9 -6
- package/review/arm-resourcehealth.api.md +3 -9
- package/src/microsoftResourceHealth.ts +35 -1
- package/src/models/index.ts +8 -2
- package/types/arm-resourcehealth.d.ts +10 -2
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,21 @@
|
|
1
1
|
# Release History
|
2
2
|
|
3
|
+
## 3.1.1 (Unreleased)
|
4
|
+
|
5
|
+
### Features Added
|
6
|
+
|
7
|
+
### Breaking Changes
|
8
|
+
|
9
|
+
### Bugs Fixed
|
10
|
+
|
11
|
+
### Other Changes
|
12
|
+
|
13
|
+
## 3.1.0 (2022-07-14)
|
14
|
+
|
15
|
+
**Features**
|
16
|
+
|
17
|
+
- Added Interface EmergingIssuesGetResult
|
18
|
+
|
3
19
|
## 3.0.1 (2022-04-29)
|
4
20
|
|
5
21
|
**Features**
|
package/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
# Azure
|
1
|
+
# Azure MicrosoftResourceHealth client library for JavaScript
|
2
2
|
|
3
|
-
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure
|
3
|
+
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure MicrosoftResourceHealth client.
|
4
4
|
|
5
5
|
The Resource Health Client.
|
6
6
|
|
@@ -24,7 +24,7 @@ See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUP
|
|
24
24
|
|
25
25
|
### Install the `@azure/arm-resourcehealth` package
|
26
26
|
|
27
|
-
Install the Azure
|
27
|
+
Install the Azure MicrosoftResourceHealth client library for JavaScript with `npm`:
|
28
28
|
|
29
29
|
```bash
|
30
30
|
npm install @azure/arm-resourcehealth
|
@@ -32,8 +32,8 @@ npm install @azure/arm-resourcehealth
|
|
32
32
|
|
33
33
|
### Create and authenticate a `MicrosoftResourceHealth`
|
34
34
|
|
35
|
-
To create a client object to access the Azure
|
36
|
-
You can find the endpoint for your Azure
|
35
|
+
To create a client object to access the Azure MicrosoftResourceHealth API, you will need the `endpoint` of your Azure MicrosoftResourceHealth resource and a `credential`. The Azure MicrosoftResourceHealth client can use Azure Active Directory credentials to authenticate.
|
36
|
+
You can find the endpoint for your Azure MicrosoftResourceHealth resource in the [Azure Portal][azure_portal].
|
37
37
|
|
38
38
|
You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token).
|
39
39
|
|
@@ -43,7 +43,7 @@ To use the [DefaultAzureCredential][defaultazurecredential] provider shown below
|
|
43
43
|
npm install @azure/identity
|
44
44
|
```
|
45
45
|
|
46
|
-
You will also need to **register a new AAD application and grant access to Azure
|
46
|
+
You will also need to **register a new AAD application and grant access to Azure MicrosoftResourceHealth** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
|
47
47
|
Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`.
|
48
48
|
|
49
49
|
For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).
|
@@ -72,7 +72,7 @@ To use this client library in the browser, first you need to use a bundler. For
|
|
72
72
|
|
73
73
|
### MicrosoftResourceHealth
|
74
74
|
|
75
|
-
`MicrosoftResourceHealth` is the primary interface for developers using the Azure
|
75
|
+
`MicrosoftResourceHealth` is the primary interface for developers using the Azure MicrosoftResourceHealth client library. Explore the methods on this client object to understand the different features of the Azure MicrosoftResourceHealth service that you can access.
|
76
76
|
|
77
77
|
## Troubleshooting
|
78
78
|
|
package/dist/index.js
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
+
var tslib = require('tslib');
|
5
6
|
var coreClient = require('@azure/core-client');
|
6
7
|
var coreRestPipeline = require('@azure/core-rest-pipeline');
|
7
|
-
var tslib = require('tslib');
|
8
8
|
|
9
9
|
function _interopNamespace(e) {
|
10
10
|
if (e && e.__esModule) return e;
|
@@ -37,15 +37,21 @@ var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipelin
|
|
37
37
|
/** Known values of {@link SeverityValues} that the service accepts. */
|
38
38
|
exports.KnownSeverityValues = void 0;
|
39
39
|
(function (KnownSeverityValues) {
|
40
|
+
/** Information */
|
40
41
|
KnownSeverityValues["Information"] = "Information";
|
42
|
+
/** Warning */
|
41
43
|
KnownSeverityValues["Warning"] = "Warning";
|
44
|
+
/** Error */
|
42
45
|
KnownSeverityValues["Error"] = "Error";
|
43
46
|
})(exports.KnownSeverityValues || (exports.KnownSeverityValues = {}));
|
44
47
|
/** Known values of {@link StageValues} that the service accepts. */
|
45
48
|
exports.KnownStageValues = void 0;
|
46
49
|
(function (KnownStageValues) {
|
50
|
+
/** Active */
|
47
51
|
KnownStageValues["Active"] = "Active";
|
52
|
+
/** Resolve */
|
48
53
|
KnownStageValues["Resolve"] = "Resolve";
|
54
|
+
/** Archived */
|
49
55
|
KnownStageValues["Archived"] = "Archived";
|
50
56
|
})(exports.KnownStageValues || (exports.KnownStageValues = {}));
|
51
57
|
|
@@ -1789,7 +1795,7 @@ class MicrosoftResourceHealth extends coreClient__namespace.ServiceClient {
|
|
1789
1795
|
requestContentType: "application/json; charset=utf-8",
|
1790
1796
|
credential: credentials
|
1791
1797
|
};
|
1792
|
-
const packageDetails = `azsdk-js-arm-resourcehealth/3.
|
1798
|
+
const packageDetails = `azsdk-js-arm-resourcehealth/3.1.1`;
|
1793
1799
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
1794
1800
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
1795
1801
|
: `${packageDetails}`;
|
@@ -1826,6 +1832,34 @@ class MicrosoftResourceHealth extends coreClient__namespace.ServiceClient {
|
|
1826
1832
|
this.childResources = new ChildResourcesImpl(this);
|
1827
1833
|
this.operations = new OperationsImpl(this);
|
1828
1834
|
this.emergingIssues = new EmergingIssuesImpl(this);
|
1835
|
+
this.addCustomApiVersionPolicy(options.apiVersion);
|
1836
|
+
}
|
1837
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
1838
|
+
addCustomApiVersionPolicy(apiVersion) {
|
1839
|
+
if (!apiVersion) {
|
1840
|
+
return;
|
1841
|
+
}
|
1842
|
+
const apiVersionPolicy = {
|
1843
|
+
name: "CustomApiVersionPolicy",
|
1844
|
+
sendRequest(request, next) {
|
1845
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
1846
|
+
const param = request.url.split("?");
|
1847
|
+
if (param.length > 1) {
|
1848
|
+
const newParams = param[1].split("&").map((item) => {
|
1849
|
+
if (item.indexOf("api-version") > -1) {
|
1850
|
+
return "api-version=" + apiVersion;
|
1851
|
+
}
|
1852
|
+
else {
|
1853
|
+
return item;
|
1854
|
+
}
|
1855
|
+
});
|
1856
|
+
request.url = param[0] + "?" + newParams.join("&");
|
1857
|
+
}
|
1858
|
+
return next(request);
|
1859
|
+
});
|
1860
|
+
}
|
1861
|
+
};
|
1862
|
+
this.pipeline.addPolicy(apiVersionPolicy);
|
1829
1863
|
}
|
1830
1864
|
}
|
1831
1865
|
|