Skip to content

Commit

Permalink
CodeGen from PR 10962 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge fb51938e82c54fe038f7b7fdb912c2374e72e360 into a3d10d31bcda46c3d6c863288c3375a4f7b28786
  • Loading branch information
SDKAuto committed Nov 27, 2020
1 parent 6c6ce54 commit 81295c8
Show file tree
Hide file tree
Showing 90 changed files with 2,086 additions and 585 deletions.
17 changes: 7 additions & 10 deletions sdk/recoveryservicesbackup/arm-recoveryservicesbackup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ npm install @azure/arm-recoveryservicesbackup

### How to use

#### nodejs - Authentication, client creation and get privateEndpointConnection as an example written in TypeScript.
#### nodejs - client creation and get backupResourceEncryptionConfigs as an example written in TypeScript.

##### Install @azure/ms-rest-nodeauth

Expand All @@ -26,19 +26,17 @@ npm install @azure/ms-rest-nodeauth@"^3.0.0"

##### Sample code

While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package
```typescript
import * as msRest from "@azure/ms-rest-js";
import * as msRestAzure from "@azure/ms-rest-azure-js";
import * as msRestNodeAuth from "@azure/ms-rest-nodeauth";
import { RecoveryServicesBackupClient, RecoveryServicesBackupModels, RecoveryServicesBackupMappers } from "@azure/arm-recoveryservicesbackup";
const msRestNodeAuth = require("@azure/ms-rest-nodeauth");
const { RecoveryServicesBackupClient } = require("@azure/arm-recoveryservicesbackup");
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];

msRestNodeAuth.interactiveLogin().then((creds) => {
const client = new RecoveryServicesBackupClient(creds, subscriptionId);
const vaultName = "testvaultName";
const resourceGroupName = "testresourceGroupName";
const privateEndpointConnectionName = "testprivateEndpointConnectionName";
client.privateEndpointConnection.get(vaultName, resourceGroupName, privateEndpointConnectionName).then((result) => {
client.backupResourceEncryptionConfigs.get(vaultName, resourceGroupName).then((result) => {
console.log("The result is:");
console.log(result);
});
Expand All @@ -47,7 +45,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => {
});
```

#### browser - Authentication, client creation and get privateEndpointConnection as an example written in JavaScript.
#### browser - Authentication, client creation and get backupResourceEncryptionConfigs as an example written in JavaScript.

##### Install @azure/ms-rest-browserauth

Expand Down Expand Up @@ -83,8 +81,7 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to
const client = new Azure.ArmRecoveryservicesbackup.RecoveryServicesBackupClient(res.creds, subscriptionId);
const vaultName = "testvaultName";
const resourceGroupName = "testresourceGroupName";
const privateEndpointConnectionName = "testprivateEndpointConnectionName";
client.privateEndpointConnection.get(vaultName, resourceGroupName, privateEndpointConnectionName).then((result) => {
client.backupResourceEncryptionConfigs.get(vaultName, resourceGroupName).then((result) => {
console.log("The result is:");
console.log(result);
}).catch((err) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ const config = {
"@azure/ms-rest-azure-js": "msRestAzure"
},
banner: `/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/

export {
discriminators,
ErrorAdditionalInfo,
NewErrorResponse,
NewErrorResponseError,
PrepareDataMoveResponse,
VaultStorageConfigOperationResultResponse
} from "../models/mappers";
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
Expand Down Expand Up @@ -97,6 +97,8 @@ export {
BackupRequestResource,
BackupResourceConfig,
BackupResourceConfigResource,
BackupResourceEncryptionConfig,
BackupResourceEncryptionConfigResource,
BackupResourceVaultConfig,
BackupResourceVaultConfigResource,
BaseResource,
Expand Down Expand Up @@ -126,7 +128,6 @@ export {
GenericProtectedItem,
GenericProtectionPolicy,
GenericRecoveryPoint,
HealthDetails,
IaasVMBackupRequest,
IaaSVMContainer,
IaasVMILRRegistrationRequest,
Expand All @@ -143,6 +144,7 @@ export {
JobResourceList,
KEKDetails,
KeyAndSecretDetails,
KPIResourceHealthDetails,
LogSchedulePolicy,
LongTermRetentionPolicy,
LongTermSchedulePolicy,
Expand Down Expand Up @@ -184,6 +186,7 @@ export {
RecoveryPointResourceList,
RecoveryPointTierInformation,
Resource,
ResourceHealthDetails,
ResourceList,
RestoreFileSpecs,
RestoreRequest,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
Expand Down Expand Up @@ -97,6 +97,8 @@ export {
BackupRequestResource,
BackupResourceConfig,
BackupResourceConfigResource,
BackupResourceEncryptionConfig,
BackupResourceEncryptionConfigResource,
BackupResourceVaultConfig,
BackupResourceVaultConfigResource,
BaseResource,
Expand Down Expand Up @@ -126,7 +128,6 @@ export {
GenericProtectedItem,
GenericProtectionPolicy,
GenericRecoveryPoint,
HealthDetails,
IaasVMBackupRequest,
IaaSVMContainer,
IaasVMILRRegistrationRequest,
Expand All @@ -143,6 +144,7 @@ export {
JobResourceList,
KEKDetails,
KeyAndSecretDetails,
KPIResourceHealthDetails,
LogSchedulePolicy,
LongTermRetentionPolicy,
LongTermSchedulePolicy,
Expand Down Expand Up @@ -184,6 +186,7 @@ export {
RecoveryPointResourceList,
RecoveryPointTierInformation,
Resource,
ResourceHealthDetails,
ResourceList,
RestoreFileSpecs,
RestoreRequest,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
Expand Down Expand Up @@ -97,6 +97,8 @@ export {
BackupRequestResource,
BackupResourceConfig,
BackupResourceConfigResource,
BackupResourceEncryptionConfig,
BackupResourceEncryptionConfigResource,
BackupResourceVaultConfig,
BackupResourceVaultConfigResource,
BaseResource,
Expand Down Expand Up @@ -126,7 +128,6 @@ export {
GenericProtectedItem,
GenericProtectionPolicy,
GenericRecoveryPoint,
HealthDetails,
IaasVMBackupRequest,
IaaSVMContainer,
IaasVMILRRegistrationRequest,
Expand All @@ -143,6 +144,7 @@ export {
JobResourceList,
KEKDetails,
KeyAndSecretDetails,
KPIResourceHealthDetails,
LogSchedulePolicy,
LongTermRetentionPolicy,
LongTermSchedulePolicy,
Expand Down Expand Up @@ -184,6 +186,7 @@ export {
RecoveryPointResourceList,
RecoveryPointTierInformation,
Resource,
ResourceHealthDetails,
ResourceList,
RestoreFileSpecs,
RestoreRequest,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
Expand Down Expand Up @@ -97,6 +97,8 @@ export {
BackupRequestResource,
BackupResourceConfig,
BackupResourceConfigResource,
BackupResourceEncryptionConfig,
BackupResourceEncryptionConfigResource,
BackupResourceVaultConfig,
BackupResourceVaultConfigResource,
BaseResource,
Expand Down Expand Up @@ -126,7 +128,6 @@ export {
GenericProtectedItem,
GenericProtectionPolicy,
GenericRecoveryPoint,
HealthDetails,
IaasVMBackupRequest,
IaaSVMContainer,
IaasVMILRRegistrationRequest,
Expand All @@ -143,6 +144,7 @@ export {
JobResourceList,
KEKDetails,
KeyAndSecretDetails,
KPIResourceHealthDetails,
LogSchedulePolicy,
LongTermRetentionPolicy,
LongTermSchedulePolicy,
Expand Down Expand Up @@ -184,6 +186,7 @@ export {
RecoveryPointResourceList,
RecoveryPointTierInformation,
Resource,
ResourceHealthDetails,
ResourceList,
RestoreFileSpecs,
RestoreRequest,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
Expand Down Expand Up @@ -97,6 +97,8 @@ export {
BackupRequestResource,
BackupResourceConfig,
BackupResourceConfigResource,
BackupResourceEncryptionConfig,
BackupResourceEncryptionConfigResource,
BackupResourceVaultConfig,
BackupResourceVaultConfigResource,
BaseResource,
Expand Down Expand Up @@ -126,7 +128,6 @@ export {
GenericProtectedItem,
GenericProtectionPolicy,
GenericRecoveryPoint,
HealthDetails,
IaasVMBackupRequest,
IaaSVMContainer,
IaasVMILRRegistrationRequest,
Expand All @@ -143,6 +144,7 @@ export {
JobResourceList,
KEKDetails,
KeyAndSecretDetails,
KPIResourceHealthDetails,
LogSchedulePolicy,
LongTermRetentionPolicy,
LongTermSchedulePolicy,
Expand Down Expand Up @@ -184,6 +186,7 @@ export {
RecoveryPointResourceList,
RecoveryPointTierInformation,
Resource,
ResourceHealthDetails,
ResourceList,
RestoreFileSpecs,
RestoreRequest,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
Expand Down Expand Up @@ -97,6 +97,8 @@ export {
BackupRequestResource,
BackupResourceConfig,
BackupResourceConfigResource,
BackupResourceEncryptionConfig,
BackupResourceEncryptionConfigResource,
BackupResourceVaultConfig,
BackupResourceVaultConfigResource,
BaseResource,
Expand Down Expand Up @@ -126,7 +128,6 @@ export {
GenericProtectedItem,
GenericProtectionPolicy,
GenericRecoveryPoint,
HealthDetails,
IaasVMBackupRequest,
IaaSVMContainer,
IaasVMILRRegistrationRequest,
Expand All @@ -143,6 +144,7 @@ export {
JobResourceList,
KEKDetails,
KeyAndSecretDetails,
KPIResourceHealthDetails,
LogSchedulePolicy,
LongTermRetentionPolicy,
LongTermSchedulePolicy,
Expand Down Expand Up @@ -184,6 +186,7 @@ export {
RecoveryPointResourceList,
RecoveryPointTierInformation,
Resource,
ResourceHealthDetails,
ResourceList,
RestoreFileSpecs,
RestoreRequest,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
Expand Down Expand Up @@ -97,6 +97,8 @@ export {
BackupRequestResource,
BackupResourceConfig,
BackupResourceConfigResource,
BackupResourceEncryptionConfig,
BackupResourceEncryptionConfigResource,
BackupResourceVaultConfig,
BackupResourceVaultConfigResource,
BaseResource,
Expand Down Expand Up @@ -126,7 +128,6 @@ export {
GenericProtectedItem,
GenericProtectionPolicy,
GenericRecoveryPoint,
HealthDetails,
IaasVMBackupRequest,
IaaSVMContainer,
IaasVMILRRegistrationRequest,
Expand All @@ -143,6 +144,7 @@ export {
JobResourceList,
KEKDetails,
KeyAndSecretDetails,
KPIResourceHealthDetails,
LogSchedulePolicy,
LongTermRetentionPolicy,
LongTermSchedulePolicy,
Expand Down Expand Up @@ -184,6 +186,7 @@ export {
RecoveryPointResourceList,
RecoveryPointTierInformation,
Resource,
ResourceHealthDetails,
ResourceList,
RestoreFileSpecs,
RestoreRequest,
Expand Down
Loading

0 comments on commit 81295c8

Please sign in to comment.