Skip to content

Commit aa42133

Browse files
author
SDKAuto
committed
CodeGen from PR 14678 in Azure/azure-rest-api-specs
Merge f3893d3284790dd5980609ee62ad933916ba0484 into 5af197915f97a1ccc6f9186537ba4309ea274cb6
1 parent 785029b commit aa42133

File tree

100 files changed

+5507
-7307
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+5507
-7307
lines changed

sdk/recoveryservicesbackup/arm-recoveryservicesbackup/README.md

Lines changed: 28 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
## Azure RecoveryServicesBackupClient SDK for JavaScript
22

3-
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for RecoveryServicesBackupClient.
3+
This package contains an isomorphic SDK (runs both in node.js and in browsers) for RecoveryServicesBackupClient.
44

55
### Currently supported environments
66

77
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
8-
- Latest versions of Safari, Chrome, Edge, and Firefox.
8+
- Latest versions of Safari, Chrome, Edge and Firefox.
99

1010
### Prerequisites
1111

@@ -14,18 +14,15 @@ You must have an [Azure subscription](https://azure.microsoft.com/free/).
1414
### How to install
1515

1616
To use this SDK in your project, you will need to install two packages.
17-
1817
- `@azure/arm-recoveryservicesbackup` that contains the client.
1918
- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory.
2019

2120
Install both packages using the below command:
22-
2321
```bash
2422
npm install --save @azure/arm-recoveryservicesbackup @azure/identity
2523
```
26-
2724
> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features.
28-
> If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options.
25+
If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options.
2926

3027
### How to use
3128

@@ -39,8 +36,7 @@ npm install --save @azure/arm-recoveryservicesbackup @azure/identity
3936

4037
In the below samples, we pass the credential and the Azure subscription id to instantiate the client.
4138
Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started.
42-
43-
#### nodejs - Authentication, client creation, and get backupResourceVaultConfigs as an example written in JavaScript.
39+
#### nodejs - Authentication, client creation, and get protectionIntent as an example written in JavaScript.
4440

4541
##### Sample code
4642

@@ -55,24 +51,22 @@ const creds = new DefaultAzureCredential();
5551
const client = new RecoveryServicesBackupClient(creds, subscriptionId);
5652
const vaultName = "testvaultName";
5753
const resourceGroupName = "testresourceGroupName";
58-
client.backupResourceVaultConfigs
59-
.get(vaultName, resourceGroupName)
60-
.then((result) => {
61-
console.log("The result is:");
62-
console.log(result);
63-
})
64-
.catch((err) => {
65-
console.log("An error occurred:");
66-
console.error(err);
67-
});
54+
const fabricName = "testfabricName";
55+
const intentObjectName = "testintentObjectName";
56+
client.protectionIntent.get(vaultName, resourceGroupName, fabricName, intentObjectName).then((result) => {
57+
console.log("The result is:");
58+
console.log(result);
59+
}).catch((err) => {
60+
console.log("An error occurred:");
61+
console.error(err);
62+
});
6863
```
6964

70-
#### browser - Authentication, client creation, and get backupResourceVaultConfigs as an example written in JavaScript.
65+
#### browser - Authentication, client creation, and get protectionIntent as an example written in JavaScript.
7166

7267
In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser.
73-
74-
- See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser.
75-
- Note down the client Id from the previous step and use it in the browser sample below.
68+
- See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser.
69+
- Note down the client Id from the previous step and use it in the browser sample below.
7670

7771
##### Sample code
7872

@@ -90,26 +84,23 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t
9084
const subscriptionId = "<Subscription_Id>";
9185
// Create credentials using the `@azure/identity` package.
9286
// Please note that you can also use credentials from the `@azure/ms-rest-browserauth` package instead.
93-
const credential = new InteractiveBrowserCredential({
87+
const credential = new InteractiveBrowserCredential(
88+
{
9489
clientId: "<client id for your Azure AD app>",
9590
tenant: "<optional tenant for your organization>"
9691
});
97-
const client = new Azure.ArmRecoveryservicesbackup.RecoveryServicesBackupClient(
98-
creds,
99-
subscriptionId
100-
);
92+
const client = new Azure.ArmRecoveryservicesbackup.RecoveryServicesBackupClient(creds, subscriptionId);
10193
const vaultName = "testvaultName";
10294
const resourceGroupName = "testresourceGroupName";
103-
client.backupResourceVaultConfigs
104-
.get(vaultName, resourceGroupName)
105-
.then((result) => {
106-
console.log("The result is:");
107-
console.log(result);
108-
})
109-
.catch((err) => {
110-
console.log("An error occurred:");
111-
console.error(err);
112-
});
95+
const fabricName = "testfabricName";
96+
const intentObjectName = "testintentObjectName";
97+
client.protectionIntent.get(vaultName, resourceGroupName, fabricName, intentObjectName).then((result) => {
98+
console.log("The result is:");
99+
console.log(result);
100+
}).catch((err) => {
101+
console.log("An error occurred:");
102+
console.error(err);
103+
});
113104
</script>
114105
</head>
115106
<body></body>

sdk/recoveryservicesbackup/arm-recoveryservicesbackup/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"rollup-plugin-sourcemaps": "^0.4.2",
2828
"uglify-js": "^3.6.0"
2929
},
30-
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/recoveryservicesbackup/arm-recoveryservicesbackup",
30+
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/recoveryservicesbackup/arm-recoveryservicesbackup",
3131
"repository": {
3232
"type": "git",
3333
"url": "https://github.com/Azure/azure-sdk-for-js.git"

sdk/recoveryservicesbackup/arm-recoveryservicesbackup/rollup.config.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ import sourcemaps from "rollup-plugin-sourcemaps";
77
*/
88
const config = {
99
input: "./esm/recoveryServicesBackupClient.js",
10-
external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"],
10+
external: [
11+
"@azure/ms-rest-js",
12+
"@azure/ms-rest-azure-js"
13+
],
1114
output: {
1215
file: "./dist/arm-recoveryservicesbackup.js",
1316
format: "umd",
@@ -25,7 +28,10 @@ const config = {
2528
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
2629
*/`
2730
},
28-
plugins: [nodeResolve({ mainFields: ["module", "main"] }), sourcemaps()]
31+
plugins: [
32+
nodeResolve({ mainFields: ['module', 'main'] }),
33+
sourcemaps()
34+
]
2935
};
3036

3137
export default config;

sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/aadPropertiesMappers.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ export {
103103
BackupResourceConfig,
104104
BackupResourceConfigResource,
105105
BackupResourceEncryptionConfig,
106+
BackupResourceEncryptionConfigExtended,
107+
BackupResourceEncryptionConfigExtendedResource,
106108
BackupResourceEncryptionConfigResource,
107109
BackupResourceVaultConfig,
108110
BackupResourceVaultConfigResource,
@@ -146,6 +148,7 @@ export {
146148
IaasVMRecoveryPoint,
147149
IaasVMRestoreRequest,
148150
IaasVMRestoreWithRehydrationRequest,
151+
IdentityInfo,
149152
ILRRequest,
150153
ILRRequestResource,
151154
InquiryInfo,

sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupCrrJobDetailsMappers.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ export {
103103
BackupResourceConfig,
104104
BackupResourceConfigResource,
105105
BackupResourceEncryptionConfig,
106+
BackupResourceEncryptionConfigExtended,
107+
BackupResourceEncryptionConfigExtendedResource,
106108
BackupResourceEncryptionConfigResource,
107109
BackupResourceVaultConfig,
108110
BackupResourceVaultConfigResource,
@@ -146,6 +148,7 @@ export {
146148
IaasVMRecoveryPoint,
147149
IaasVMRestoreRequest,
148150
IaasVMRestoreWithRehydrationRequest,
151+
IdentityInfo,
149152
ILRRequest,
150153
ILRRequestResource,
151154
InquiryInfo,

sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupCrrJobsMappers.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ export {
104104
BackupResourceConfig,
105105
BackupResourceConfigResource,
106106
BackupResourceEncryptionConfig,
107+
BackupResourceEncryptionConfigExtended,
108+
BackupResourceEncryptionConfigExtendedResource,
107109
BackupResourceEncryptionConfigResource,
108110
BackupResourceVaultConfig,
109111
BackupResourceVaultConfigResource,
@@ -147,6 +149,7 @@ export {
147149
IaasVMRecoveryPoint,
148150
IaasVMRestoreRequest,
149151
IaasVMRestoreWithRehydrationRequest,
152+
IdentityInfo,
150153
ILRRequest,
151154
ILRRequestResource,
152155
InquiryInfo,

sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupEnginesMappers.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ export {
104104
BackupResourceConfig,
105105
BackupResourceConfigResource,
106106
BackupResourceEncryptionConfig,
107+
BackupResourceEncryptionConfigExtended,
108+
BackupResourceEncryptionConfigExtendedResource,
107109
BackupResourceEncryptionConfigResource,
108110
BackupResourceVaultConfig,
109111
BackupResourceVaultConfigResource,
@@ -147,6 +149,7 @@ export {
147149
IaasVMRecoveryPoint,
148150
IaasVMRestoreRequest,
149151
IaasVMRestoreWithRehydrationRequest,
152+
IdentityInfo,
150153
ILRRequest,
151154
ILRRequestResource,
152155
InquiryInfo,

sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupJobsMappers.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ export {
104104
BackupResourceConfig,
105105
BackupResourceConfigResource,
106106
BackupResourceEncryptionConfig,
107+
BackupResourceEncryptionConfigExtended,
108+
BackupResourceEncryptionConfigExtendedResource,
107109
BackupResourceEncryptionConfigResource,
108110
BackupResourceVaultConfig,
109111
BackupResourceVaultConfigResource,
@@ -147,6 +149,7 @@ export {
147149
IaasVMRecoveryPoint,
148150
IaasVMRestoreRequest,
149151
IaasVMRestoreWithRehydrationRequest,
152+
IdentityInfo,
150153
ILRRequest,
151154
ILRRequestResource,
152155
InquiryInfo,

sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupOperationResultsMappers.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,7 @@
66
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
*/
88

9-
export { discriminators, CloudError } from "../models/mappers";
9+
export {
10+
discriminators,
11+
CloudError
12+
} from "../models/mappers";

sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupPoliciesMappers.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ export {
104104
BackupResourceConfig,
105105
BackupResourceConfigResource,
106106
BackupResourceEncryptionConfig,
107+
BackupResourceEncryptionConfigExtended,
108+
BackupResourceEncryptionConfigExtendedResource,
107109
BackupResourceEncryptionConfigResource,
108110
BackupResourceVaultConfig,
109111
BackupResourceVaultConfigResource,
@@ -147,6 +149,7 @@ export {
147149
IaasVMRecoveryPoint,
148150
IaasVMRestoreRequest,
149151
IaasVMRestoreWithRehydrationRequest,
152+
IdentityInfo,
150153
ILRRequest,
151154
ILRRequestResource,
152155
InquiryInfo,

0 commit comments

Comments
 (0)