@azure/arm-recoveryservicesdatareplication 1.0.0-alpha.20241213.1 → 1.0.0-alpha.20241218.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/README.md +11 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ A first party Azure service enabling the data replication.
|
|
|
6
6
|
|
|
7
7
|
[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication) |
|
|
8
8
|
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-recoveryservicesdatareplication) |
|
|
9
|
-
[API reference documentation](https://
|
|
9
|
+
[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-recoveryservicesdatareplication?view=azure-node-preview) |
|
|
10
10
|
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)
|
|
11
11
|
|
|
12
12
|
## Getting started
|
|
@@ -46,15 +46,20 @@ npm install @azure/identity
|
|
|
46
46
|
You will also need to **register a new AAD application and grant access to Azure Site Recovery Management** 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
|
-
For more information about how to create an Azure AD Application check out [this guide](https://
|
|
49
|
+
For more information about how to create an Azure AD Application check out [this guide](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).
|
|
50
50
|
|
|
51
51
|
```javascript
|
|
52
|
-
const {
|
|
52
|
+
const {
|
|
53
|
+
AzureSiteRecoveryManagementServiceAPI,
|
|
54
|
+
} = require("@azure/arm-recoveryservicesdatareplication");
|
|
53
55
|
const { DefaultAzureCredential } = require("@azure/identity");
|
|
54
56
|
// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details.
|
|
55
57
|
|
|
56
58
|
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
|
57
|
-
const client = new AzureSiteRecoveryManagementServiceAPI(
|
|
59
|
+
const client = new AzureSiteRecoveryManagementServiceAPI(
|
|
60
|
+
new DefaultAzureCredential(),
|
|
61
|
+
subscriptionId,
|
|
62
|
+
);
|
|
58
63
|
|
|
59
64
|
// For client-side applications running in the browser, use this code instead:
|
|
60
65
|
// const credential = new InteractiveBrowserCredential({
|
|
@@ -64,8 +69,8 @@ const client = new AzureSiteRecoveryManagementServiceAPI(new DefaultAzureCredent
|
|
|
64
69
|
// const client = new AzureSiteRecoveryManagementServiceAPI(credential, subscriptionId);
|
|
65
70
|
```
|
|
66
71
|
|
|
67
|
-
|
|
68
72
|
### JavaScript Bundle
|
|
73
|
+
|
|
69
74
|
To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling).
|
|
70
75
|
|
|
71
76
|
## Key concepts
|
|
@@ -101,7 +106,7 @@ If you'd like to contribute to this library, please read the [contributing guide
|
|
|
101
106
|
|
|
102
107
|

|
|
103
108
|
|
|
104
|
-
[azure_cli]: https://
|
|
109
|
+
[azure_cli]: https://learn.microsoft.com/cli/azure
|
|
105
110
|
[azure_sub]: https://azure.microsoft.com/free/
|
|
106
111
|
[azure_sub]: https://azure.microsoft.com/free/
|
|
107
112
|
[azure_portal]: https://portal.azure.com
|
package/package.json
CHANGED