@azure/arm-managedapplications 1.0.2 → 2.0.0-alpha.20211011.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/{LICENSE.txt → LICENSE} +2 -2
- package/README.md +66 -72
- package/dist/index.js +2896 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.js +1 -0
- package/dist/index.min.js.map +1 -0
- package/esm/applicationClient.d.ts +50 -0
- package/esm/applicationClient.d.ts.map +1 -0
- package/esm/applicationClient.js +190 -0
- package/esm/applicationClient.js.map +1 -0
- package/esm/applicationClientContext.d.ts +16 -0
- package/esm/applicationClientContext.d.ts.map +1 -0
- package/esm/applicationClientContext.js +49 -0
- package/esm/applicationClientContext.js.map +1 -0
- package/esm/coreClientLro.d.ts +26 -0
- package/esm/coreClientLro.d.ts.map +1 -0
- package/esm/coreClientLro.js +186 -0
- package/esm/coreClientLro.js.map +1 -0
- package/esm/index.d.ts +770 -0
- package/esm/index.d.ts.map +1 -0
- package/esm/index.js +13 -0
- package/esm/index.js.map +1 -0
- package/esm/lro/azureAsyncPolling.d.ts +3 -0
- package/esm/lro/azureAsyncPolling.d.ts.map +1 -0
- package/esm/lro/azureAsyncPolling.js +67 -0
- package/esm/lro/azureAsyncPolling.js.map +1 -0
- package/esm/lro/bodyPolling.d.ts +8 -0
- package/esm/lro/bodyPolling.d.ts.map +1 -0
- package/esm/lro/bodyPolling.js +37 -0
- package/esm/lro/bodyPolling.js.map +1 -0
- package/esm/lro/index.d.ts +4 -0
- package/esm/lro/index.d.ts.map +1 -0
- package/esm/lro/index.js +12 -0
- package/esm/lro/index.js.map +1 -0
- package/esm/lro/locationPolling.d.ts +3 -0
- package/esm/lro/locationPolling.d.ts.map +1 -0
- package/esm/lro/locationPolling.js +19 -0
- package/esm/lro/locationPolling.js.map +1 -0
- package/esm/lro/lroEngine.d.ts +14 -0
- package/esm/lro/lroEngine.d.ts.map +1 -0
- package/esm/lro/lroEngine.js +41 -0
- package/esm/lro/lroEngine.js.map +1 -0
- package/esm/lro/models.d.ts +138 -0
- package/esm/lro/models.d.ts.map +1 -0
- package/esm/lro/models.js +14 -0
- package/esm/lro/models.js.map +1 -0
- package/esm/lro/operation.d.ts +36 -0
- package/esm/lro/operation.d.ts.map +1 -0
- package/esm/lro/operation.js +82 -0
- package/esm/lro/operation.js.map +1 -0
- package/esm/lro/passthrough.d.ts +3 -0
- package/esm/lro/passthrough.d.ts.map +1 -0
- package/esm/lro/passthrough.js +15 -0
- package/esm/lro/passthrough.js.map +1 -0
- package/esm/lro/requestUtils.d.ts +16 -0
- package/esm/lro/requestUtils.d.ts.map +1 -0
- package/esm/lro/requestUtils.js +73 -0
- package/esm/lro/requestUtils.js.map +1 -0
- package/esm/lro/stateMachine.d.ts +18 -0
- package/esm/lro/stateMachine.d.ts.map +1 -0
- package/esm/lro/stateMachine.js +84 -0
- package/esm/lro/stateMachine.js.map +1 -0
- package/esm/models/index.d.ts +360 -762
- package/esm/models/index.d.ts.map +1 -1
- package/esm/models/index.js +17 -2
- package/esm/models/index.js.map +1 -1
- package/esm/models/mappers.d.ts +18 -20
- package/esm/models/mappers.d.ts.map +1 -1
- package/esm/models/mappers.js +296 -318
- package/esm/models/mappers.js.map +1 -1
- package/esm/models/parameters.d.ts +15 -10
- package/esm/models/parameters.d.ts.map +1 -1
- package/esm/models/parameters.js +77 -49
- package/esm/models/parameters.js.map +1 -1
- package/esm/operations/applicationDefinitions.d.ts +128 -0
- package/esm/operations/applicationDefinitions.d.ts.map +1 -0
- package/esm/operations/applicationDefinitions.js +574 -0
- package/esm/operations/applicationDefinitions.js.map +1 -0
- package/esm/operations/applications.d.ts +182 -0
- package/esm/operations/applications.d.ts.map +1 -0
- package/esm/operations/applications.js +802 -0
- package/esm/operations/applications.js.map +1 -0
- package/esm/operations/index.d.ts +2 -2
- package/esm/operations/index.d.ts.map +1 -1
- package/esm/operations/index.js +5 -7
- package/esm/operations/index.js.map +1 -1
- package/esm/operationsInterfaces/applicationDefinitions.d.ts +95 -0
- package/esm/operationsInterfaces/applicationDefinitions.d.ts.map +1 -0
- package/esm/operationsInterfaces/applicationDefinitions.js +9 -0
- package/esm/operationsInterfaces/applicationDefinitions.js.map +1 -0
- package/esm/operationsInterfaces/applications.d.ts +128 -0
- package/esm/operationsInterfaces/applications.d.ts.map +1 -0
- package/esm/operationsInterfaces/applications.js +9 -0
- package/esm/operationsInterfaces/applications.js.map +1 -0
- package/esm/operationsInterfaces/index.d.ts +3 -0
- package/esm/operationsInterfaces/index.d.ts.map +1 -0
- package/esm/operationsInterfaces/index.js +10 -0
- package/esm/operationsInterfaces/index.js.map +1 -0
- package/package.json +56 -16
- package/review/arm-managedapplications.api.md +443 -0
- package/rollup.config.js +181 -30
- package/src/applicationClient.ts +222 -0
- package/src/applicationClientContext.ts +70 -0
- package/src/coreClientLro.ts +323 -0
- package/src/index.ts +13 -0
- package/src/lro/azureAsyncPolling.ts +96 -0
- package/src/lro/bodyPolling.ts +54 -0
- package/src/lro/index.ts +26 -0
- package/src/lro/locationPolling.ts +30 -0
- package/src/lro/lroEngine.ts +61 -0
- package/src/lro/models.ts +173 -0
- package/src/lro/operation.ts +120 -0
- package/src/lro/passthrough.ts +23 -0
- package/src/lro/requestUtils.ts +105 -0
- package/src/lro/stateMachine.ts +138 -0
- package/src/models/index.ts +402 -794
- package/src/models/mappers.ts +290 -311
- package/src/models/parameters.ts +99 -50
- package/src/operations/applicationDefinitions.ts +810 -0
- package/src/operations/applications.ts +1069 -0
- package/src/operations/index.ts +5 -7
- package/src/operationsInterfaces/applicationDefinitions.ts +179 -0
- package/src/operationsInterfaces/applications.ts +225 -0
- package/src/operationsInterfaces/index.ts +10 -0
- package/tsconfig.json +3 -2
- package/dist/arm-managedapplications.js +0 -1855
- package/dist/arm-managedapplications.js.map +0 -1
- package/dist/arm-managedapplications.min.js +0 -1
- package/dist/arm-managedapplications.min.js.map +0 -1
- package/esm/managedApplicationClient.d.ts +0 -52
- package/esm/managedApplicationClient.d.ts.map +0 -1
- package/esm/managedApplicationClient.js +0 -87
- package/esm/managedApplicationClient.js.map +0 -1
- package/esm/managedApplicationClientContext.d.ts +0 -16
- package/esm/managedApplicationClientContext.d.ts.map +0 -1
- package/esm/managedApplicationClientContext.js +0 -56
- package/esm/managedApplicationClientContext.js.map +0 -1
- package/esm/models/applianceDefinitionsMappers.d.ts +0 -2
- package/esm/models/applianceDefinitionsMappers.d.ts.map +0 -1
- package/esm/models/applianceDefinitionsMappers.js +0 -9
- package/esm/models/applianceDefinitionsMappers.js.map +0 -1
- package/esm/models/appliancesMappers.d.ts +0 -2
- package/esm/models/appliancesMappers.d.ts.map +0 -1
- package/esm/models/appliancesMappers.js +0 -9
- package/esm/models/appliancesMappers.js.map +0 -1
- package/esm/operations/applianceDefinitions.d.ts +0 -167
- package/esm/operations/applianceDefinitions.d.ts.map +0 -1
- package/esm/operations/applianceDefinitions.js +0 -358
- package/esm/operations/applianceDefinitions.js.map +0 -1
- package/esm/operations/appliances.d.ts +0 -247
- package/esm/operations/appliances.d.ts.map +0 -1
- package/esm/operations/appliances.js +0 -482
- package/esm/operations/appliances.js.map +0 -1
- package/src/managedApplicationClient.ts +0 -138
- package/src/managedApplicationClientContext.ts +0 -62
- package/src/models/applianceDefinitionsMappers.ts +0 -24
- package/src/models/appliancesMappers.ts +0 -24
- package/src/operations/applianceDefinitions.ts +0 -492
- package/src/operations/appliances.ts +0 -716
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Release History
|
|
2
|
+
|
|
3
|
+
## 2.0.0-beta.1 (2021-10-09)
|
|
4
|
+
|
|
5
|
+
This is the first preview for the new version of the `@azure/arm-managedapplications` package that follows the new [guidelines for TypeScript SDKs](https://azure.github.io/azure-sdk/typescript_introduction.html) for Azure services.
|
|
6
|
+
|
|
7
|
+
While this package remains auto generated, the SDK generator itself has undergone changes to comply with the above guidelines in order to generate packages that are idiomatic to the JavaScript/TypeScript ecosystem and consistent with other packages for Azure services. For more on this, please see [State of the Azure SDK 2021](https://devblogs.microsoft.com/azure-sdk/state-of-the-azure-sdk-2021/).
|
|
8
|
+
|
|
9
|
+
Please note that this version has breaking changes, all of which were made after careful consideration during the authoring of the guidelines and user studies.
|
|
10
|
+
|
|
11
|
+
**Noteworthy changes and features**
|
|
12
|
+
- Authentication: The packages `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` are no longer supported. Use package [@azure/identity](https://www.npmjs.com/package/@azure/identity) instead. Select a credential from Azure Identity examples based on the authentication method of your choice.
|
|
13
|
+
- Callbacks: Method overloads that used callbacks have been removed and the use of promises is encouraged instead.
|
|
14
|
+
- List operations now return an iterable result that follows the `PagedAsyncIterableIterator` interface as opposed to the previous model where you had to make a new request using the link to the next page.
|
|
15
|
+
- Long running operations i.e. the Lro related object returned by methods whose names started with `begin`, now uses `pollUntilDone` to check whether the request is finished, instead of `pollUntilFinished`. To get the final result, use the corresponding method that will have the suffix `AndWait`.
|
|
16
|
+
- The SDK only supports ECMAScript 2015 (ES6) and beyond, all projects that referenced this SDK should be upgraded to use ES6.
|
package/{LICENSE.txt → LICENSE}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) 2021 Microsoft
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
18
18
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,98 +1,92 @@
|
|
|
1
|
-
|
|
1
|
+
# Azure Application client library for JavaScript
|
|
2
2
|
|
|
3
|
-
This package contains an isomorphic SDK for
|
|
3
|
+
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure Application client.
|
|
4
|
+
|
|
5
|
+
ARM applications
|
|
6
|
+
|
|
7
|
+
[Source code](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/managedapplications/arm-managedapplications) |
|
|
8
|
+
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-managedapplications) |
|
|
9
|
+
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-managedapplications) |
|
|
10
|
+
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)
|
|
11
|
+
|
|
12
|
+
## Getting started
|
|
4
13
|
|
|
5
14
|
### Currently supported environments
|
|
6
15
|
|
|
7
|
-
- Node.js
|
|
8
|
-
-
|
|
16
|
+
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
|
|
17
|
+
- Latest versions of Safari, Chrome, Edge and Firefox.
|
|
18
|
+
|
|
19
|
+
### Prerequisites
|
|
20
|
+
|
|
21
|
+
- An [Azure subscription][azure_sub].
|
|
9
22
|
|
|
10
|
-
###
|
|
23
|
+
### Install the `@azure/arm-managedapplications` package
|
|
24
|
+
|
|
25
|
+
Install the Azure Application client library for JavaScript with `npm`:
|
|
11
26
|
|
|
12
27
|
```bash
|
|
13
28
|
npm install @azure/arm-managedapplications
|
|
14
29
|
```
|
|
15
30
|
|
|
16
|
-
###
|
|
31
|
+
### Create and authenticate a `ApplicationClient`
|
|
32
|
+
|
|
33
|
+
To create a client object to access the Azure Application API, you will need the `endpoint` of your Azure Application resource and a `credential`. The Azure Application client can use Azure Active Directory credentials to authenticate.
|
|
34
|
+
You can find the endpoint for your Azure Application resource in the [Azure Portal][azure_portal].
|
|
17
35
|
|
|
18
|
-
####
|
|
36
|
+
#### Using an Azure Active Directory Credential
|
|
19
37
|
|
|
20
|
-
|
|
38
|
+
You can authenticate with Azure Active Directory using the [Azure Identity library][azure_identity]. To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package:
|
|
21
39
|
|
|
22
40
|
```bash
|
|
23
|
-
npm install @azure/
|
|
41
|
+
npm install @azure/identity
|
|
24
42
|
```
|
|
25
43
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
msRestNodeAuth.interactiveLogin().then((creds) => {
|
|
36
|
-
const client = new ManagedApplicationClient(creds, subscriptionId);
|
|
37
|
-
client.listOperations().then((result) => {
|
|
38
|
-
console.log("The result is:");
|
|
39
|
-
console.log(result);
|
|
40
|
-
});
|
|
41
|
-
}).catch((err) => {
|
|
42
|
-
console.error(err);
|
|
43
|
-
});
|
|
44
|
+
You will also need to register a new AAD application and grant access to Azure Application by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
|
|
45
|
+
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`.
|
|
46
|
+
|
|
47
|
+
```javascript
|
|
48
|
+
const { ApplicationClient } = require("@azure/arm-managedapplications");
|
|
49
|
+
const { DefaultAzureCredential } = require("@azure/identity");
|
|
50
|
+
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
|
51
|
+
const client = new ApplicationClient(new DefaultAzureCredential(), subscriptionId);
|
|
44
52
|
```
|
|
45
53
|
|
|
46
|
-
|
|
54
|
+
## Key concepts
|
|
47
55
|
|
|
48
|
-
|
|
56
|
+
### ApplicationClient
|
|
49
57
|
|
|
50
|
-
|
|
51
|
-
npm install @azure/ms-rest-browserauth
|
|
52
|
-
```
|
|
58
|
+
`ApplicationClient` is the primary interface for developers using the Azure Application client library. Explore the methods on this client object to understand the different features of the Azure Application service that you can access.
|
|
53
59
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
<title>@azure/arm-managedapplications sample</title>
|
|
64
|
-
<script src="node_modules/@azure/ms-rest-js/dist/msRest.browser.js"></script>
|
|
65
|
-
<script src="node_modules/@azure/ms-rest-azure-js/dist/msRestAzure.js"></script>
|
|
66
|
-
<script src="node_modules/@azure/ms-rest-browserauth/dist/msAuth.js"></script>
|
|
67
|
-
<script src="node_modules/@azure/arm-managedapplications/dist/arm-managedapplications.js"></script>
|
|
68
|
-
<script type="text/javascript">
|
|
69
|
-
const subscriptionId = "<Subscription_Id>";
|
|
70
|
-
const authManager = new msAuth.AuthManager({
|
|
71
|
-
clientId: "<client id for your Azure AD app>",
|
|
72
|
-
tenant: "<optional tenant for your organization>"
|
|
73
|
-
});
|
|
74
|
-
authManager.finalizeLogin().then((res) => {
|
|
75
|
-
if (!res.isLoggedIn) {
|
|
76
|
-
// may cause redirects
|
|
77
|
-
authManager.login();
|
|
78
|
-
}
|
|
79
|
-
const client = new Azure.ArmManagedapplications.ManagedApplicationClient(res.creds, subscriptionId);
|
|
80
|
-
client.listOperations().then((result) => {
|
|
81
|
-
console.log("The result is:");
|
|
82
|
-
console.log(result);
|
|
83
|
-
}).catch((err) => {
|
|
84
|
-
console.log("An error occurred:");
|
|
85
|
-
console.error(err);
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
</script>
|
|
89
|
-
</head>
|
|
90
|
-
<body></body>
|
|
91
|
-
</html>
|
|
60
|
+
## Troubleshooting
|
|
61
|
+
|
|
62
|
+
### Logging
|
|
63
|
+
|
|
64
|
+
Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
|
|
65
|
+
|
|
66
|
+
```javascript
|
|
67
|
+
import { setLogLevel } from "@azure/logger";
|
|
68
|
+
setLogLevel("info");
|
|
92
69
|
```
|
|
93
70
|
|
|
71
|
+
For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/core/logger).
|
|
72
|
+
|
|
73
|
+
## Next steps
|
|
74
|
+
|
|
75
|
+
Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library.
|
|
76
|
+
|
|
77
|
+
## Contributing
|
|
78
|
+
|
|
79
|
+
If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/master/CONTRIBUTING.md) to learn more about how to build and test the code.
|
|
80
|
+
|
|
94
81
|
## Related projects
|
|
95
82
|
|
|
96
|
-
- [Microsoft Azure SDK for
|
|
83
|
+
- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js)
|
|
84
|
+
|
|
85
|
+

|
|
97
86
|
|
|
98
|
-
|
|
87
|
+
[azure_cli]: https://docs.microsoft.com/cli/azure
|
|
88
|
+
[azure_sub]: https://azure.microsoft.com/free/
|
|
89
|
+
[azure_sub]: https://azure.microsoft.com/free/
|
|
90
|
+
[azure_portal]: https://portal.azure.com
|
|
91
|
+
[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/identity/identity
|
|
92
|
+
[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/identity/identity#defaultazurecredential
|