Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR @azure/arm-recoveryservicesbackup] Updating the error response class in Backup API Version 2021-01-01 #3552

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2020 Microsoft
Copyright (c) 2021 Microsoft

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
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 backupResourceVaultConfigs 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.backupResourceVaultConfigs.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 backupResourceVaultConfigs 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.backupResourceVaultConfigs.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,225 @@
/*
* 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,
AADProperties,
AADPropertiesResource,
AzureBackupServerContainer,
AzureBackupServerEngine,
AzureFileShareBackupRequest,
AzureFileShareProtectableItem,
AzureFileshareProtectedItem,
AzureFileshareProtectedItemExtendedInfo,
AzureFileShareProtectionPolicy,
AzureFileShareProvisionILRRequest,
AzureFileShareRecoveryPoint,
AzureFileShareRestoreRequest,
AzureIaaSClassicComputeVMContainer,
AzureIaaSClassicComputeVMProtectableItem,
AzureIaaSClassicComputeVMProtectedItem,
AzureIaaSComputeVMContainer,
AzureIaaSComputeVMProtectableItem,
AzureIaaSComputeVMProtectedItem,
AzureIaaSVMErrorInfo,
AzureIaaSVMHealthDetails,
AzureIaaSVMJob,
AzureIaaSVMJobExtendedInfo,
AzureIaaSVMJobTaskDetails,
AzureIaaSVMProtectedItem,
AzureIaaSVMProtectedItemExtendedInfo,
AzureIaaSVMProtectionPolicy,
AzureRecoveryServiceVaultProtectionIntent,
AzureResourceProtectionIntent,
AzureSQLAGWorkloadContainerProtectionContainer,
AzureSqlContainer,
AzureSqlProtectedItem,
AzureSqlProtectedItemExtendedInfo,
AzureSqlProtectionPolicy,
AzureStorageContainer,
AzureStorageErrorInfo,
AzureStorageJob,
AzureStorageJobExtendedInfo,
AzureStorageJobTaskDetails,
AzureStorageProtectableContainer,
AzureVMAppContainerProtectableContainer,
AzureVMAppContainerProtectionContainer,
AzureVmWorkloadItem,
AzureVmWorkloadProtectableItem,
AzureVmWorkloadProtectedItem,
AzureVmWorkloadProtectedItemExtendedInfo,
AzureVmWorkloadProtectionPolicy,
AzureVmWorkloadSAPAseDatabaseProtectedItem,
AzureVmWorkloadSAPAseDatabaseWorkloadItem,
AzureVmWorkloadSAPAseSystemProtectableItem,
AzureVmWorkloadSAPAseSystemWorkloadItem,
AzureVmWorkloadSAPHanaDatabaseProtectableItem,
AzureVmWorkloadSAPHanaDatabaseProtectedItem,
AzureVmWorkloadSAPHanaDatabaseWorkloadItem,
AzureVmWorkloadSAPHanaSystemProtectableItem,
AzureVmWorkloadSAPHanaSystemWorkloadItem,
AzureVmWorkloadSQLAvailabilityGroupProtectableItem,
AzureVmWorkloadSQLDatabaseProtectableItem,
AzureVmWorkloadSQLDatabaseProtectedItem,
AzureVmWorkloadSQLDatabaseWorkloadItem,
AzureVmWorkloadSQLInstanceProtectableItem,
AzureVmWorkloadSQLInstanceWorkloadItem,
AzureWorkloadAutoProtectionIntent,
AzureWorkloadBackupRequest,
AzureWorkloadContainer,
AzureWorkloadContainerExtendedInfo,
AzureWorkloadErrorInfo,
AzureWorkloadJob,
AzureWorkloadJobExtendedInfo,
AzureWorkloadJobTaskDetails,
AzureWorkloadPointInTimeRecoveryPoint,
AzureWorkloadPointInTimeRestoreRequest,
AzureWorkloadRecoveryPoint,
AzureWorkloadRestoreRequest,
AzureWorkloadSAPHanaPointInTimeRecoveryPoint,
AzureWorkloadSAPHanaPointInTimeRestoreRequest,
AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest,
AzureWorkloadSAPHanaRecoveryPoint,
AzureWorkloadSAPHanaRestoreRequest,
AzureWorkloadSAPHanaRestoreWithRehydrateRequest,
AzureWorkloadSQLAutoProtectionIntent,
AzureWorkloadSQLPointInTimeRecoveryPoint,
AzureWorkloadSQLPointInTimeRestoreRequest,
AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest,
AzureWorkloadSQLRecoveryPoint,
AzureWorkloadSQLRecoveryPointExtendedInfo,
AzureWorkloadSQLRestoreRequest,
AzureWorkloadSQLRestoreWithRehydrateRequest,
BackupEngineBase,
BackupEngineBaseResource,
BackupEngineExtendedInfo,
BackupRequest,
BackupRequestResource,
BackupResourceConfig,
BackupResourceConfigResource,
BackupResourceEncryptionConfig,
BackupResourceEncryptionConfigResource,
BackupResourceVaultConfig,
BackupResourceVaultConfigResource,
BaseResource,
BEKDetails,
ContainerIdentityInfo,
CrossRegionRestoreRequest,
CrossRegionRestoreRequestResource,
CrrAccessToken,
CrrAccessTokenResource,
CrrJobRequest,
CrrJobRequestResource,
DailyRetentionFormat,
DailyRetentionSchedule,
Day,
DiskExclusionProperties,
DiskInformation,
DistributedNodesInfo,
DpmBackupEngine,
DpmContainer,
DPMContainerExtendedInfo,
DpmErrorInfo,
DpmJob,
DpmJobExtendedInfo,
DpmJobTaskDetails,
DPMProtectedItem,
DPMProtectedItemExtendedInfo,
EncryptionDetails,
ErrorAdditionalInfo,
ErrorDetail,
ExtendedProperties,
GenericContainer,
GenericContainerExtendedInfo,
GenericProtectedItem,
GenericProtectionPolicy,
GenericRecoveryPoint,
IaasVMBackupRequest,
IaaSVMContainer,
IaasVMILRRegistrationRequest,
IaaSVMProtectableItem,
IaasVMRecoveryPoint,
IaasVMRestoreRequest,
IaasVMRestoreWithRehydrationRequest,
ILRRequest,
ILRRequestResource,
InquiryInfo,
InquiryValidation,
InstantRPAdditionalDetails,
Job,
JobResource,
KEKDetails,
KeyAndSecretDetails,
KPIResourceHealthDetails,
LogSchedulePolicy,
LongTermRetentionPolicy,
LongTermSchedulePolicy,
MabContainer,
MabContainerExtendedInfo,
MABContainerHealthDetails,
MabErrorInfo,
MabFileFolderProtectedItem,
MabFileFolderProtectedItemExtendedInfo,
MabJob,
MabJobExtendedInfo,
MabJobTaskDetails,
MabProtectionPolicy,
MonthlyRetentionSchedule,
NewErrorResponse,
NewErrorResponseError,
PointInTimeRange,
PreBackupValidation,
PrivateEndpoint,
PrivateEndpointConnection,
PrivateEndpointConnectionResource,
PrivateLinkServiceConnectionState,
ProtectableContainer,
ProtectableContainerResource,
ProtectedItem,
ProtectedItemResource,
ProtectionContainer,
ProtectionContainerResource,
ProtectionIntent,
ProtectionIntentResource,
ProtectionPolicy,
ProtectionPolicyResource,
RecoveryPoint,
RecoveryPointDiskConfiguration,
RecoveryPointMoveReadinessInfo,
RecoveryPointRehydrationInfo,
RecoveryPointResource,
RecoveryPointTierInformation,
Resource,
ResourceHealthDetails,
RestoreFileSpecs,
RestoreRequest,
RestoreRequestResource,
RetentionDuration,
RetentionPolicy,
SchedulePolicy,
Settings,
SimpleRetentionPolicy,
SimpleSchedulePolicy,
SQLDataDirectory,
SQLDataDirectoryMapping,
SubProtectionPolicy,
TargetAFSRestoreInfo,
TargetRestoreInfo,
VaultJob,
VaultJobErrorInfo,
VaultJobExtendedInfo,
WeeklyRetentionFormat,
WeeklyRetentionSchedule,
WorkloadCrrAccessToken,
WorkloadInquiryDetails,
WorkloadItem,
WorkloadItemResource,
WorkloadProtectableItem,
WorkloadProtectableItemResource,
YearlyRetentionSchedule
} from "../models/mappers";
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";
Loading