* recoveryservicesbackup

* update files

* update files
This commit is contained in:
kazrael2119 2023-01-19 15:29:20 +08:00 коммит произвёл GitHub
Родитель e03f1c5775
Коммит d6c48b72f0
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
248 изменённых файлов: 4593 добавлений и 1579 удалений

Просмотреть файл

@ -13478,7 +13478,7 @@ packages:
dev: false
file:projects/arm-recoveryservicesbackup.tgz:
resolution: {integrity: sha512-ujbREIL2OAvAl4obLe3bLdX5pWVhmoIotgheSrxKlwDSXlt1gfgiOPSpHziRnuORPeetdSjiSbRXLRrZIzSl2w==, tarball: file:projects/arm-recoveryservicesbackup.tgz}
resolution: {integrity: sha512-Drz5AU6HJ2F5sKCHSOwOYm22MmKSLWNgWOj7tWFVGG/EoF3YDGzUxCeFXZ0zJK9Lykclr7hI6IWZR2c44UQIVQ==, tarball: file:projects/arm-recoveryservicesbackup.tgz}
name: '@rush-temp/arm-recoveryservicesbackup'
version: 0.0.0
dependencies:
@ -13492,6 +13492,7 @@ packages:
'@types/node': 14.18.36
chai: 4.3.7
cross-env: 7.0.3
dotenv: 8.6.0
mkdirp: 1.0.4
mocha: 7.2.0
rimraf: 3.0.2

Просмотреть файл

@ -1,9 +1,10 @@
# Release History
## 10.0.0 (2022-12-05)
## 10.0.0 (2023-01-18)
**Features**
- Added operation group DeletedProtectionContainers
- Added Interface AzureBackupGoalFeatureSupportRequest
- Added Interface AzureBackupServerContainer
- Added Interface AzureBackupServerEngine
@ -48,6 +49,9 @@
- Added Interface AzureVmWorkloadSAPHanaDatabaseProtectableItem
- Added Interface AzureVmWorkloadSAPHanaDatabaseProtectedItem
- Added Interface AzureVmWorkloadSAPHanaDatabaseWorkloadItem
- Added Interface AzureVmWorkloadSAPHanaDBInstance
- Added Interface AzureVmWorkloadSAPHanaDBInstanceProtectedItem
- Added Interface AzureVmWorkloadSAPHanaHSR
- Added Interface AzureVmWorkloadSAPHanaSystemProtectableItem
- Added Interface AzureVmWorkloadSAPHanaSystemWorkloadItem
- Added Interface AzureVmWorkloadSQLAvailabilityGroupProtectableItem
@ -86,6 +90,8 @@
- Added Interface BackupResourceEncryptionConfigExtendedResource
- Added Interface BackupResourceEncryptionConfigResource
- Added Interface BackupResourceVaultConfigResource
- Added Interface DeletedProtectionContainersListNextOptionalParams
- Added Interface DeletedProtectionContainersListOptionalParams
- Added Interface DpmBackupEngine
- Added Interface DpmContainer
- Added Interface DpmJob
@ -130,6 +136,7 @@
- Added Interface ProtectionIntentResourceList
- Added Interface ProtectionPolicyResource
- Added Interface ProtectionPolicyResourceList
- Added Interface RecoveryPointProperties
- Added Interface RecoveryPointResource
- Added Interface RecoveryPointResourceList
- Added Interface RecoveryPointTierInformationV2
@ -139,6 +146,7 @@
- Added Interface SimpleRetentionPolicy
- Added Interface SimpleSchedulePolicy
- Added Interface SimpleSchedulePolicyV2
- Added Interface TieringPolicy
- Added Interface ValidateIaasVMRestoreOperationRequest
- Added Interface ValidateRestoreOperationRequest
- Added Interface VaultJob
@ -146,6 +154,35 @@
- Added Interface WorkloadItemResourceList
- Added Interface WorkloadProtectableItemResource
- Added Interface WorkloadProtectableItemResourceList
- Added Type Alias DeletedProtectionContainersListNextResponse
- Added Type Alias DeletedProtectionContainersListResponse
- Added Type Alias ProtectableContainerType
- Added Type Alias TieringMode
- Interface AzureIaaSVMProtectedItemExtendedInfo has a new optional parameter newestRecoveryPointInArchive
- Interface AzureIaaSVMProtectedItemExtendedInfo has a new optional parameter oldestRecoveryPointInArchive
- Interface AzureIaaSVMProtectedItemExtendedInfo has a new optional parameter oldestRecoveryPointInVault
- Interface AzureVmWorkloadProtectedItemExtendedInfo has a new optional parameter newestRecoveryPointInArchive
- Interface AzureVmWorkloadProtectedItemExtendedInfo has a new optional parameter oldestRecoveryPointInArchive
- Interface AzureVmWorkloadProtectedItemExtendedInfo has a new optional parameter oldestRecoveryPointInVault
- Interface ProtectedItem has a new optional parameter softDeleteRetentionPeriod
- Interface SubProtectionPolicy has a new optional parameter tieringPolicy
- Added Enum KnownTieringMode
- Enum KnownBackupItemType has a new value SAPHanaDBInstance
- Enum KnownBackupType has a new value SnapshotCopyOnlyFull
- Enum KnownBackupType has a new value SnapshotFull
- Enum KnownContainerType has a new value HanaHSRContainer
- Enum KnownDataSourceType has a new value SAPHanaDBInstance
- Enum KnownPolicyType has a new value SnapshotCopyOnlyFull
- Enum KnownPolicyType has a new value SnapshotFull
- Enum KnownProtectedItemState has a new value BackupsSuspended
- Enum KnownProtectionState has a new value BackupsSuspended
- Enum KnownRestorePointQueryType has a new value SnapshotCopyOnlyFull
- Enum KnownRestorePointQueryType has a new value SnapshotFull
- Enum KnownRestorePointType has a new value SnapshotCopyOnlyFull
- Enum KnownRestorePointType has a new value SnapshotFull
- Enum KnownWorkloadItemType has a new value SAPHanaDBInstance
- Enum KnownWorkloadType has a new value SAPHanaDBInstance
- Added function getContinuationToken
- Interface BackupEnginesListNextOptionalParams no longer has parameter filter
- Interface BackupEnginesListNextOptionalParams no longer has parameter skipToken
- Interface BackupJobsListNextOptionalParams no longer has parameter filter
@ -162,10 +199,16 @@
- Interface BackupWorkloadItemsListNextOptionalParams no longer has parameter skipToken
- Interface ProtectableContainersListNextOptionalParams no longer has parameter filter
- Interface RecoveryPointsListNextOptionalParams no longer has parameter filter
- Type of parameter protectedItemType of interface ProtectedItem is changed from "AzureFileShareProtectedItem" | "AzureIaaSVMProtectedItem" | "Microsoft.ClassicCompute/virtualMachines" | "Microsoft.Compute/virtualMachines" | "Microsoft.Sql/servers/databases" | "AzureVmWorkloadProtectedItem" | "AzureVmWorkloadSAPAseDatabase" | "AzureVmWorkloadSAPHanaDatabase" | "AzureVmWorkloadSQLDatabase" | "DPMProtectedItem" | "GenericProtectedItem" | "MabFileFolderProtectedItem" to "AzureFileShareProtectedItem" | "AzureIaaSVMProtectedItem" | "Microsoft.ClassicCompute/virtualMachines" | "Microsoft.Compute/virtualMachines" | "Microsoft.Sql/servers/databases" | "AzureVmWorkloadProtectedItem" | "AzureVmWorkloadSAPAseDatabase" | "AzureVmWorkloadSAPHanaDatabase" | "AzureVmWorkloadSAPHanaDBInstance" | "AzureVmWorkloadSQLDatabase" | "DPMProtectedItem" | "GenericProtectedItem" | "MabFileFolderProtectedItem"
- Type of parameter protectableItemType of interface WorkloadProtectableItem is changed from "AzureFileShare" | "IaaSVMProtectableItem" | "Microsoft.ClassicCompute/virtualMachines" | "Microsoft.Compute/virtualMachines" | "AzureVmWorkloadProtectableItem" | "SAPAseSystem" | "SAPHanaDatabase" | "SAPHanaSystem" | "SQLAvailabilityGroupContainer" | "SQLDataBase" | "SQLInstance" to "AzureFileShare" | "IaaSVMProtectableItem" | "Microsoft.ClassicCompute/virtualMachines" | "Microsoft.Compute/virtualMachines" | "AzureVmWorkloadProtectableItem" | "SAPAseSystem" | "SAPHanaDatabase" | "SAPHanaSystem" | "SAPHanaDBInstance" | "SAPHanaHSR" | "SQLAvailabilityGroupContainer" | "SQLDataBase" | "SQLInstance"
**Breaking Changes**
- Operation ResourceGuardProxy.put has a new signature
- Enum KnownContainerType no longer has value AzureWorkloadContainer
- Enum KnownContainerType no longer has value MicrosoftClassicComputeVirtualMachines
- Enum KnownContainerType no longer has value MicrosoftComputeVirtualMachines
## 9.0.0 (2022-05-16)

Просмотреть файл

@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2022 Microsoft
Copyright (c) 2023 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

Просмотреть файл

@ -1,8 +1,8 @@
{
"commit": "81562c6c057a510ddde50ff40720d254bd5f6dbf",
"commit": "0e20dd2e4e2a40e83840c30cce2efc4847fd9cb9",
"readme": "specification/recoveryservicesbackup/resource-manager/readme.md",
"autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\recoveryservicesbackup\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.4 --generate-sample=true",
"autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=F:\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\recoveryservicesbackup\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.7 --generate-sample=true",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/js-sdk-release-tools@2.5.2",
"use": "@autorest/typescript@6.0.0-rc.4"
"release_tool": "@azure-tools/js-sdk-release-tools@2.5.4",
"use": "@autorest/typescript@6.0.0-rc.7"
}

Просмотреть файл

@ -39,6 +39,7 @@
"typescript": "~4.8.0",
"uglify-js": "^3.4.9",
"rimraf": "^3.0.0",
"dotenv": "^8.2.0",
"@azure/identity": "^2.0.1",
"@azure-tools/test-recorder": "^2.0.0",
"@azure-tools/test-credential": "^1.0.0",
@ -49,7 +50,6 @@
"@types/node": "^14.0.0",
"@azure/dev-tool": "^1.0.0"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/recoveryservicesbackup/arm-recoveryservicesbackup",
"repository": {
"type": "git",
"url": "https://github.com/Azure/azure-sdk-for-js.git"
@ -111,6 +111,7 @@
]
},
"autoPublish": true,
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/recoveryservicesbackup/arm-recoveryservicesbackup",
"//sampleConfiguration": {
"productName": "",
"productSlugs": [

Просмотреть файл

@ -85,6 +85,7 @@ export interface AzureFileShareProvisionILRRequest extends ILRRequest {
export interface AzureFileShareRecoveryPoint extends RecoveryPoint {
fileShareSnapshotUri?: string;
objectType: "AzureFileShareRecoveryPoint";
recoveryPointProperties?: RecoveryPointProperties;
recoveryPointSizeInGB?: number;
recoveryPointTime?: Date;
recoveryPointType?: string;
@ -199,24 +200,27 @@ export interface AzureIaaSVMJobV2 extends Job {
export interface AzureIaaSVMProtectedItem extends ProtectedItem {
extendedInfo?: AzureIaaSVMProtectedItemExtendedInfo;
extendedProperties?: ExtendedProperties;
friendlyName?: string;
readonly friendlyName?: string;
healthDetails?: AzureIaaSVMHealthDetails[];
healthStatus?: HealthStatus;
readonly healthStatus?: HealthStatus;
kpisHealths?: {
[propertyName: string]: KPIResourceHealthDetails;
};
lastBackupStatus?: string;
lastBackupTime?: Date;
protectedItemDataId?: string;
readonly lastBackupTime?: Date;
readonly protectedItemDataId?: string;
protectedItemType: "AzureIaaSVMProtectedItem" | "Microsoft.ClassicCompute/virtualMachines" | "Microsoft.Compute/virtualMachines";
protectionState?: ProtectionState;
protectionStatus?: string;
virtualMachineId?: string;
readonly virtualMachineId?: string;
}
// @public
export interface AzureIaaSVMProtectedItemExtendedInfo {
newestRecoveryPointInArchive?: Date;
oldestRecoveryPoint?: Date;
oldestRecoveryPointInArchive?: Date;
oldestRecoveryPointInVault?: Date;
policyInconsistent?: boolean;
recoveryPointCount?: number;
}
@ -230,9 +234,13 @@ export interface AzureIaaSVMProtectionPolicy extends ProtectionPolicy {
// (undocumented)
instantRPDetails?: InstantRPAdditionalDetails;
instantRpRetentionRangeInDays?: number;
// (undocumented)
policyType?: IaasvmPolicyType;
retentionPolicy?: RetentionPolicyUnion;
schedulePolicy?: SchedulePolicyUnion;
tieringPolicy?: {
[propertyName: string]: TieringPolicy;
};
timeZone?: string;
}
@ -372,19 +380,19 @@ export interface AzureVmWorkloadProtectableItem extends WorkloadProtectableItem
parentName?: string;
parentUniqueName?: string;
prebackupvalidation?: PreBackupValidation;
protectableItemType: "AzureVmWorkloadProtectableItem" | "SAPAseSystem" | "SAPHanaDatabase" | "SAPHanaSystem" | "SQLAvailabilityGroupContainer" | "SQLDataBase" | "SQLInstance";
protectableItemType: "AzureVmWorkloadProtectableItem" | "SAPAseSystem" | "SAPHanaDatabase" | "SAPHanaSystem" | "SAPHanaDBInstance" | "SAPHanaHSR" | "SQLAvailabilityGroupContainer" | "SQLDataBase" | "SQLInstance";
serverName?: string;
subinquireditemcount?: number;
subprotectableitemcount?: number;
}
// @public (undocumented)
export type AzureVmWorkloadProtectableItemUnion = AzureVmWorkloadProtectableItem | AzureVmWorkloadSAPAseSystemProtectableItem | AzureVmWorkloadSAPHanaDatabaseProtectableItem | AzureVmWorkloadSAPHanaSystemProtectableItem | AzureVmWorkloadSQLAvailabilityGroupProtectableItem | AzureVmWorkloadSQLDatabaseProtectableItem | AzureVmWorkloadSQLInstanceProtectableItem;
export type AzureVmWorkloadProtectableItemUnion = AzureVmWorkloadProtectableItem | AzureVmWorkloadSAPAseSystemProtectableItem | AzureVmWorkloadSAPHanaDatabaseProtectableItem | AzureVmWorkloadSAPHanaSystemProtectableItem | AzureVmWorkloadSAPHanaDBInstance | AzureVmWorkloadSAPHanaHSR | AzureVmWorkloadSQLAvailabilityGroupProtectableItem | AzureVmWorkloadSQLDatabaseProtectableItem | AzureVmWorkloadSQLInstanceProtectableItem;
// @public
export interface AzureVmWorkloadProtectedItem extends ProtectedItem {
extendedInfo?: AzureVmWorkloadProtectedItemExtendedInfo;
friendlyName?: string;
readonly friendlyName?: string;
kpisHealths?: {
[propertyName: string]: KPIResourceHealthDetails;
};
@ -395,22 +403,25 @@ export interface AzureVmWorkloadProtectedItem extends ProtectedItem {
parentType?: string;
protectedItemDataSourceId?: string;
protectedItemHealthStatus?: ProtectedItemHealthStatus;
protectedItemType: "AzureVmWorkloadProtectedItem" | "AzureVmWorkloadSAPAseDatabase" | "AzureVmWorkloadSAPHanaDatabase" | "AzureVmWorkloadSQLDatabase";
protectedItemType: "AzureVmWorkloadProtectedItem" | "AzureVmWorkloadSAPAseDatabase" | "AzureVmWorkloadSAPHanaDatabase" | "AzureVmWorkloadSAPHanaDBInstance" | "AzureVmWorkloadSQLDatabase";
protectionState?: ProtectionState;
protectionStatus?: string;
readonly protectionStatus?: string;
serverName?: string;
}
// @public
export interface AzureVmWorkloadProtectedItemExtendedInfo {
newestRecoveryPointInArchive?: Date;
oldestRecoveryPoint?: Date;
oldestRecoveryPointInArchive?: Date;
oldestRecoveryPointInVault?: Date;
policyState?: string;
recoveryModel?: string;
recoveryPointCount?: number;
}
// @public (undocumented)
export type AzureVmWorkloadProtectedItemUnion = AzureVmWorkloadProtectedItem | AzureVmWorkloadSAPAseDatabaseProtectedItem | AzureVmWorkloadSAPHanaDatabaseProtectedItem | AzureVmWorkloadSQLDatabaseProtectedItem;
export type AzureVmWorkloadProtectedItemUnion = AzureVmWorkloadProtectedItem | AzureVmWorkloadSAPAseDatabaseProtectedItem | AzureVmWorkloadSAPHanaDatabaseProtectedItem | AzureVmWorkloadSAPHanaDBInstanceProtectedItem | AzureVmWorkloadSQLDatabaseProtectedItem;
// @public
export interface AzureVmWorkloadProtectionPolicy extends ProtectionPolicy {
@ -456,6 +467,21 @@ export interface AzureVmWorkloadSAPHanaDatabaseWorkloadItem extends AzureVmWorkl
workloadItemType: "SAPHanaDatabase";
}
// @public
export interface AzureVmWorkloadSAPHanaDBInstance extends AzureVmWorkloadProtectableItem {
protectableItemType: "SAPHanaDBInstance";
}
// @public
export interface AzureVmWorkloadSAPHanaDBInstanceProtectedItem extends AzureVmWorkloadProtectedItem {
protectedItemType: "AzureVmWorkloadSAPHanaDBInstance";
}
// @public
export interface AzureVmWorkloadSAPHanaHSR extends AzureVmWorkloadProtectableItem {
protectableItemType: "SAPHanaHSR";
}
// @public
export interface AzureVmWorkloadSAPHanaSystemProtectableItem extends AzureVmWorkloadProtectableItem {
protectableItemType: "SAPHanaSystem";
@ -593,6 +619,7 @@ export interface AzureWorkloadRecoveryPoint extends RecoveryPoint {
recoveryPointMoveReadinessInfo?: {
[propertyName: string]: RecoveryPointMoveReadinessInfo;
};
recoveryPointProperties?: RecoveryPointProperties;
recoveryPointTierDetails?: RecoveryPointTierInformationV2[];
recoveryPointTimeInUTC?: Date;
type?: RestorePointType;
@ -1385,6 +1412,26 @@ export type DayOfWeek = "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursda
// @public
export type DedupState = string;
// @public
export interface DeletedProtectionContainers {
list(resourceGroupName: string, vaultName: string, options?: DeletedProtectionContainersListOptionalParams): PagedAsyncIterableIterator<ProtectionContainerResource>;
}
// @public
export interface DeletedProtectionContainersListNextOptionalParams extends coreClient.OperationOptions {
}
// @public
export type DeletedProtectionContainersListNextResponse = ProtectionContainerResourceList;
// @public
export interface DeletedProtectionContainersListOptionalParams extends coreClient.OperationOptions {
filter?: string;
}
// @public
export type DeletedProtectionContainersListResponse = ProtectionContainerResourceList;
// @public (undocumented)
export interface DiskExclusionProperties {
diskLunList?: number[];
@ -1618,6 +1665,7 @@ export interface GenericRecoveryPoint extends RecoveryPoint {
friendlyName?: string;
objectType: "GenericRecoveryPoint";
recoveryPointAdditionalInfo?: string;
recoveryPointProperties?: RecoveryPointProperties;
recoveryPointTime?: Date;
recoveryPointType?: string;
}
@ -1707,6 +1755,7 @@ export interface IaasVMRecoveryPoint extends RecoveryPoint {
recoveryPointMoveReadinessInfo?: {
[propertyName: string]: RecoveryPointMoveReadinessInfo;
};
recoveryPointProperties?: RecoveryPointProperties;
recoveryPointTierDetails?: RecoveryPointTierInformationV2[];
recoveryPointTime?: Date;
recoveryPointType?: string;
@ -1953,6 +2002,7 @@ export enum KnownBackupItemType {
Invalid = "Invalid",
SAPAseDatabase = "SAPAseDatabase",
SAPHanaDatabase = "SAPHanaDatabase",
SAPHanaDBInstance = "SAPHanaDBInstance",
Sharepoint = "Sharepoint",
SQLDataBase = "SQLDataBase",
Sqldb = "SQLDB",
@ -1981,23 +2031,23 @@ export enum KnownBackupType {
Full = "Full",
Incremental = "Incremental",
Invalid = "Invalid",
Log = "Log"
Log = "Log",
SnapshotCopyOnlyFull = "SnapshotCopyOnlyFull",
SnapshotFull = "SnapshotFull"
}
// @public
export enum KnownContainerType {
AzureBackupServerContainer = "AzureBackupServerContainer",
AzureSqlContainer = "AzureSqlContainer",
AzureWorkloadContainer = "AzureWorkloadContainer",
Cluster = "Cluster",
DPMContainer = "DPMContainer",
GenericContainer = "GenericContainer",
HanaHSRContainer = "HanaHSRContainer",
IaasVMContainer = "IaasVMContainer",
IaasVMServiceContainer = "IaasVMServiceContainer",
Invalid = "Invalid",
MABContainer = "MABContainer",
MicrosoftClassicComputeVirtualMachines = "Microsoft.ClassicCompute/virtualMachines",
MicrosoftComputeVirtualMachines = "Microsoft.Compute/virtualMachines",
SqlagWorkLoadContainer = "SQLAGWorkLoadContainer",
StorageContainer = "StorageContainer",
Unknown = "Unknown",
@ -2040,6 +2090,7 @@ export enum KnownDataSourceType {
Invalid = "Invalid",
SAPAseDatabase = "SAPAseDatabase",
SAPHanaDatabase = "SAPHanaDatabase",
SAPHanaDBInstance = "SAPHanaDBInstance",
Sharepoint = "Sharepoint",
SQLDataBase = "SQLDataBase",
Sqldb = "SQLDB",
@ -2214,7 +2265,9 @@ export enum KnownPolicyType {
Full = "Full",
Incremental = "Incremental",
Invalid = "Invalid",
Log = "Log"
Log = "Log",
SnapshotCopyOnlyFull = "SnapshotCopyOnlyFull",
SnapshotFull = "SnapshotFull"
}
// @public
@ -2236,6 +2289,7 @@ export enum KnownProtectedItemHealthStatus {
// @public
export enum KnownProtectedItemState {
BackupsSuspended = "BackupsSuspended",
Invalid = "Invalid",
IRPending = "IRPending",
Protected = "Protected",
@ -2256,6 +2310,7 @@ export enum KnownProtectionIntentItemType {
// @public
export enum KnownProtectionState {
BackupsSuspended = "BackupsSuspended",
Invalid = "Invalid",
IRPending = "IRPending",
Protected = "Protected",
@ -2321,7 +2376,9 @@ export enum KnownRestorePointQueryType {
FullAndDifferential = "FullAndDifferential",
Incremental = "Incremental",
Invalid = "Invalid",
Log = "Log"
Log = "Log",
SnapshotCopyOnlyFull = "SnapshotCopyOnlyFull",
SnapshotFull = "SnapshotFull"
}
// @public
@ -2330,7 +2387,9 @@ export enum KnownRestorePointType {
Full = "Full",
Incremental = "Incremental",
Invalid = "Invalid",
Log = "Log"
Log = "Log",
SnapshotCopyOnlyFull = "SnapshotCopyOnlyFull",
SnapshotFull = "SnapshotFull"
}
// @public
@ -2403,6 +2462,14 @@ export enum KnownSupportStatus {
Supported = "Supported"
}
// @public
export enum KnownTieringMode {
DoNotTier = "DoNotTier",
Invalid = "Invalid",
TierAfter = "TierAfter",
TierRecommended = "TierRecommended"
}
// @public
export enum KnownType {
BackupProtectedItemCountSummary = "BackupProtectedItemCountSummary",
@ -2433,6 +2500,7 @@ export enum KnownWorkloadItemType {
SAPAseDatabase = "SAPAseDatabase",
SAPAseSystem = "SAPAseSystem",
SAPHanaDatabase = "SAPHanaDatabase",
SAPHanaDBInstance = "SAPHanaDBInstance",
SAPHanaSystem = "SAPHanaSystem",
SQLDataBase = "SQLDataBase",
SQLInstance = "SQLInstance"
@ -2449,6 +2517,7 @@ export enum KnownWorkloadType {
Invalid = "Invalid",
SAPAseDatabase = "SAPAseDatabase",
SAPHanaDatabase = "SAPHanaDatabase",
SAPHanaDBInstance = "SAPHanaDBInstance",
Sharepoint = "Sharepoint",
SQLDataBase = "SQLDataBase",
Sqldb = "SQLDB",
@ -2921,12 +2990,15 @@ export interface ProtectableContainersListOptionalParams extends coreClient.Oper
// @public
export type ProtectableContainersListResponse = ProtectableContainerResourceList;
// @public
export type ProtectableContainerType = "Invalid" | "Unknown" | "IaasVMContainer" | "IaasVMServiceContainer" | "DPMContainer" | "AzureBackupServerContainer" | "MABContainer" | "Cluster" | "AzureSqlContainer" | "Windows" | "VCenter" | "VMAppContainer" | "SQLAGWorkLoadContainer" | "StorageContainer" | "GenericContainer" | "Microsoft.ClassicCompute/virtualMachines" | "Microsoft.Compute/virtualMachines" | "AzureWorkloadContainer";
// @public (undocumented)
export type ProtectableContainerUnion = ProtectableContainer | AzureStorageProtectableContainer | AzureVMAppContainerProtectableContainer;
// @public
export interface ProtectedItem {
backupManagementType?: BackupManagementType;
readonly backupManagementType?: BackupManagementType;
backupSetName?: string;
containerName?: string;
createMode?: CreateMode;
@ -2939,10 +3011,11 @@ export interface ProtectedItem {
lastRecoveryPoint?: Date;
policyId?: string;
policyName?: string;
protectedItemType: "AzureFileShareProtectedItem" | "AzureIaaSVMProtectedItem" | "Microsoft.ClassicCompute/virtualMachines" | "Microsoft.Compute/virtualMachines" | "Microsoft.Sql/servers/databases" | "AzureVmWorkloadProtectedItem" | "AzureVmWorkloadSAPAseDatabase" | "AzureVmWorkloadSAPHanaDatabase" | "AzureVmWorkloadSQLDatabase" | "DPMProtectedItem" | "GenericProtectedItem" | "MabFileFolderProtectedItem";
protectedItemType: "AzureFileShareProtectedItem" | "AzureIaaSVMProtectedItem" | "Microsoft.ClassicCompute/virtualMachines" | "Microsoft.Compute/virtualMachines" | "Microsoft.Sql/servers/databases" | "AzureVmWorkloadProtectedItem" | "AzureVmWorkloadSAPAseDatabase" | "AzureVmWorkloadSAPHanaDatabase" | "AzureVmWorkloadSAPHanaDBInstance" | "AzureVmWorkloadSQLDatabase" | "DPMProtectedItem" | "GenericProtectedItem" | "MabFileFolderProtectedItem";
resourceGuardOperationRequests?: string[];
softDeleteRetentionPeriod?: number;
sourceResourceId?: string;
workloadType?: DataSourceType;
readonly workloadType?: DataSourceType;
}
// @public
@ -3287,6 +3360,12 @@ export interface RecoveryPointMoveReadinessInfo {
isReadyForMove?: boolean;
}
// @public
export interface RecoveryPointProperties {
expiryTime?: string;
ruleName?: string;
}
// @public
export interface RecoveryPointRehydrationInfo {
rehydrationPriority?: RehydrationPriority;
@ -3420,6 +3499,8 @@ export class RecoveryServicesBackupClient extends coreClient.ServiceClient {
// (undocumented)
bMSPrepareDataMoveOperationResult: BMSPrepareDataMoveOperationResult;
// (undocumented)
deletedProtectionContainers: DeletedProtectionContainers;
// (undocumented)
exportJobsOperationResults: ExportJobsOperationResults;
// (undocumented)
featureSupport: FeatureSupport;
@ -3763,6 +3844,9 @@ export interface SubProtectionPolicy {
policyType?: PolicyType;
retentionPolicy?: RetentionPolicyUnion;
schedulePolicy?: SchedulePolicyUnion;
tieringPolicy?: {
[propertyName: string]: TieringPolicy;
};
}
// @public
@ -3782,6 +3866,16 @@ export interface TargetRestoreInfo {
targetDirectoryForFileRestore?: string;
}
// @public
export type TieringMode = string;
// @public
export interface TieringPolicy {
duration?: number;
durationType?: RetentionDurationType;
tieringMode?: TieringMode;
}
// @public
export interface TokenInformation {
expiryTimeInUtcTicks?: number;
@ -3979,7 +4073,7 @@ export type WorkloadItemUnion = WorkloadItem | AzureVmWorkloadItemUnion;
export interface WorkloadProtectableItem {
backupManagementType?: string;
friendlyName?: string;
protectableItemType: "AzureFileShare" | "IaaSVMProtectableItem" | "Microsoft.ClassicCompute/virtualMachines" | "Microsoft.Compute/virtualMachines" | "AzureVmWorkloadProtectableItem" | "SAPAseSystem" | "SAPHanaDatabase" | "SAPHanaSystem" | "SQLAvailabilityGroupContainer" | "SQLDataBase" | "SQLInstance";
protectableItemType: "AzureFileShare" | "IaaSVMProtectableItem" | "Microsoft.ClassicCompute/virtualMachines" | "Microsoft.Compute/virtualMachines" | "AzureVmWorkloadProtectableItem" | "SAPAseSystem" | "SAPHanaDatabase" | "SAPHanaSystem" | "SAPHanaDBInstance" | "SAPHanaHSR" | "SQLAvailabilityGroupContainer" | "SQLDataBase" | "SQLInstance";
protectionState?: ProtectionStatus;
workloadType?: string;
}

Просмотреть файл

@ -10,17 +10,23 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Returns backup management server registered to Recovery Services Vault.
*
* @summary Returns backup management server registered to Recovery Services Vault.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Dpm/BackupEngines_Get.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Dpm/BackupEngines_Get.json
*/
async function getDpmOrAzureBackupServerOrLajollaBackupEngineDetails() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "testVault";
const resourceGroupName = "testRG";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "testRG";
const backupEngineName = "testServer";
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
@ -32,4 +38,8 @@ async function getDpmOrAzureBackupServerOrLajollaBackupEngineDetails() {
console.log(result);
}
getDpmOrAzureBackupServerOrLajollaBackupEngineDetails().catch(console.error);
async function main() {
getDpmOrAzureBackupServerOrLajollaBackupEngineDetails();
}
main().catch(console.error);

Просмотреть файл

@ -10,17 +10,23 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers.
*
* @summary Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Dpm/BackupEngines_List.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Dpm/BackupEngines_List.json
*/
async function listDpmOrAzureBackupServerOrLajollaBackupEngines() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "testVault";
const resourceGroupName = "testRG";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "testRG";
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
const resArray = new Array();
@ -33,4 +39,8 @@ async function listDpmOrAzureBackupServerOrLajollaBackupEngines() {
console.log(resArray);
}
listDpmOrAzureBackupServerOrLajollaBackupEngines().catch(console.error);
async function main() {
listDpmOrAzureBackupServerOrLajollaBackupEngines();
}
main().catch(console.error);

Просмотреть файл

@ -13,17 +13,23 @@ import {
RecoveryServicesBackupClient
} from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Provides a pageable list of jobs.
*
* @summary Provides a pageable list of jobs.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/ListJobs.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/ListJobs.json
*/
async function listAllJobs() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
const resArray = new Array();
@ -33,18 +39,19 @@ async function listAllJobs() {
console.log(resArray);
}
listAllJobs().catch(console.error);
/**
* This sample demonstrates how to Provides a pageable list of jobs.
*
* @summary Provides a pageable list of jobs.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/ListJobsWithAllSupportedFilters.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/ListJobsWithAllSupportedFilters.json
*/
async function listJobsWithFilters() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const filter =
"startTime eq '2016-01-01 00:00:00 AM' and endTime eq '2017-11-29 00:00:00 AM' and operation eq 'Backup' and backupManagementType eq 'AzureIaasVM' and status eq 'InProgress'";
const options: BackupJobsListOptionalParams = { filter };
@ -61,18 +68,19 @@ async function listJobsWithFilters() {
console.log(resArray);
}
listJobsWithFilters().catch(console.error);
/**
* This sample demonstrates how to Provides a pageable list of jobs.
*
* @summary Provides a pageable list of jobs.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/ListJobsWithStartTimeAndEndTimeFilters.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/ListJobsWithStartTimeAndEndTimeFilters.json
*/
async function listJobsWithTimeFilter() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const filter =
"startTime eq '2016-01-01 00:00:00 AM' and endTime eq '2017-11-29 00:00:00 AM'";
const options: BackupJobsListOptionalParams = { filter };
@ -89,4 +97,10 @@ async function listJobsWithTimeFilter() {
console.log(resArray);
}
listJobsWithTimeFilter().catch(console.error);
async function main() {
listAllJobs();
listJobsWithFilters();
listJobsWithTimeFilter();
}
main().catch(console.error);

Просмотреть файл

@ -10,6 +10,9 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Provides the status of the delete operations such as deleting backed up item. Once the operation has started, the
@ -21,12 +24,16 @@ part of the Location header of the operation response.
status code in the response would be Accepted. It will continue to be in this state till it reaches completion. On
successful completion, the status code will be OK. This method expects OperationID as an argument. OperationID is
part of the Location header of the operation response.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/ProtectedItem_Delete_OperationResult.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/ProtectedItem_Delete_OperationResult.json
*/
async function getResultForProtectedItemDeleteOperation() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "PySDKBackupTestRsVault";
const resourceGroupName = "PythonSDKBackupTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] ||
"PythonSDKBackupTestRg";
const operationId = "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
@ -38,4 +45,8 @@ async function getResultForProtectedItemDeleteOperation() {
console.log(result);
}
getResultForProtectedItemDeleteOperation().catch(console.error);
async function main() {
getResultForProtectedItemDeleteOperation();
}
main().catch(console.error);

Просмотреть файл

@ -10,6 +10,9 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Fetches the status of an operation such as triggering a backup, restore. The status can be in progress, completed
@ -19,12 +22,16 @@ create jobs. This method returns the list of jobs when the operation is complete
* @summary Fetches the status of an operation such as triggering a backup, restore. The status can be in progress, completed
or failed. You can refer to the OperationStatus enum for all the possible states of an operation. Some operations
create jobs. This method returns the list of jobs when the operation is complete.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/ProtectedItem_Delete_OperationStatus.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/ProtectedItem_Delete_OperationStatus.json
*/
async function getProtectedItemDeleteOperationStatus() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "PySDKBackupTestRsVault";
const resourceGroupName = "PythonSDKBackupTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] ||
"PythonSDKBackupTestRg";
const operationId = "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
@ -36,4 +43,8 @@ async function getProtectedItemDeleteOperationStatus() {
console.log(result);
}
getProtectedItemDeleteOperationStatus().catch(console.error);
async function main() {
getProtectedItemDeleteOperationStatus();
}
main().catch(console.error);

Просмотреть файл

@ -13,6 +13,9 @@ import {
RecoveryServicesBackupClient
} from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch
@ -20,12 +23,15 @@ scoped results.
*
* @summary Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch
scoped results.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/BackupPolicies_List.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/BackupPolicies_List.json
*/
async function listProtectionPoliciesWithBackupManagementTypeFilterAsAzureIaasVM() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const filter = "backupManagementType eq 'AzureIaasVM'";
const options: BackupPoliciesListOptionalParams = { filter };
const credential = new DefaultAzureCredential();
@ -41,22 +47,21 @@ async function listProtectionPoliciesWithBackupManagementTypeFilterAsAzureIaasVM
console.log(resArray);
}
listProtectionPoliciesWithBackupManagementTypeFilterAsAzureIaasVM().catch(
console.error
);
/**
* This sample demonstrates how to Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch
scoped results.
*
* @summary Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch
scoped results.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/V2Policy/v2-List-Policies.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/V2Policy/v2-List-Policies.json
*/
async function listProtectionPoliciesWithBackupManagementTypeFilterAsAzureIaasVMWithBothV1AndV2Policies() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const filter = "backupManagementType eq 'AzureIaasVM'";
const options: BackupPoliciesListOptionalParams = { filter };
const credential = new DefaultAzureCredential();
@ -72,22 +77,21 @@ async function listProtectionPoliciesWithBackupManagementTypeFilterAsAzureIaasVM
console.log(resArray);
}
listProtectionPoliciesWithBackupManagementTypeFilterAsAzureIaasVMWithBothV1AndV2Policies().catch(
console.error
);
/**
* This sample demonstrates how to Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch
scoped results.
*
* @summary Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch
scoped results.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureWorkload/BackupPolicies_List.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureWorkload/BackupPolicies_List.json
*/
async function listProtectionPoliciesWithBackupManagementTypeFilterAsAzureWorkload() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const filter = "backupManagementType eq 'AzureWorkload'";
const options: BackupPoliciesListOptionalParams = { filter };
const credential = new DefaultAzureCredential();
@ -103,6 +107,10 @@ async function listProtectionPoliciesWithBackupManagementTypeFilterAsAzureWorklo
console.log(resArray);
}
listProtectionPoliciesWithBackupManagementTypeFilterAsAzureWorkload().catch(
console.error
);
async function main() {
listProtectionPoliciesWithBackupManagementTypeFilterAsAzureIaasVM();
listProtectionPoliciesWithBackupManagementTypeFilterAsAzureIaasVMWithBothV1AndV2Policies();
listProtectionPoliciesWithBackupManagementTypeFilterAsAzureWorkload();
}
main().catch(console.error);

Просмотреть файл

@ -13,6 +13,9 @@ import {
RecoveryServicesBackupClient
} from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Provides a pageable list of protectable objects within your subscription according to the query filter and the
@ -20,12 +23,15 @@ pagination parameters.
*
* @summary Provides a pageable list of protectable objects within your subscription according to the query filter and the
pagination parameters.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/BackupProtectableItems_List.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/BackupProtectableItems_List.json
*/
async function listProtectableItemsWithBackupManagementTypeFilterAsAzureIaasVM() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const filter = "backupManagementType eq 'AzureIaasVM'";
const options: BackupProtectableItemsListOptionalParams = { filter };
const credential = new DefaultAzureCredential();
@ -41,6 +47,8 @@ async function listProtectableItemsWithBackupManagementTypeFilterAsAzureIaasVM()
console.log(resArray);
}
listProtectableItemsWithBackupManagementTypeFilterAsAzureIaasVM().catch(
console.error
);
async function main() {
listProtectableItemsWithBackupManagementTypeFilterAsAzureIaasVM();
}
main().catch(console.error);

Просмотреть файл

@ -13,17 +13,23 @@ import {
RecoveryServicesBackupClient
} from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Provides a pageable list of all items that are backed up within a vault.
*
* @summary Provides a pageable list of all items that are backed up within a vault.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/BackupProtectedItems_List.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/BackupProtectedItems_List.json
*/
async function listProtectedItemsWithBackupManagementTypeFilterAsAzureIaasVM() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const filter = "backupManagementType eq 'AzureIaasVM' and itemType eq 'VM'";
const options: BackupProtectedItemsListOptionalParams = { filter };
const credential = new DefaultAzureCredential();
@ -39,6 +45,8 @@ async function listProtectedItemsWithBackupManagementTypeFilterAsAzureIaasVM() {
console.log(resArray);
}
listProtectedItemsWithBackupManagementTypeFilterAsAzureIaasVM().catch(
console.error
);
async function main() {
listProtectedItemsWithBackupManagementTypeFilterAsAzureIaasVM();
}
main().catch(console.error);

Просмотреть файл

@ -13,17 +13,23 @@ import {
RecoveryServicesBackupClient
} from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Lists the containers registered to Recovery Services Vault.
*
* @summary Lists the containers registered to Recovery Services Vault.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureStorage/ProtectionContainers_List.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureStorage/ProtectionContainers_List.json
*/
async function listBackupProtectionContainers() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "testVault";
const resourceGroupName = "testRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "testRg";
const filter = "backupManagementType eq 'AzureWorkload'";
const options: BackupProtectionContainersListOptionalParams = { filter };
const credential = new DefaultAzureCredential();
@ -39,4 +45,8 @@ async function listBackupProtectionContainers() {
console.log(resArray);
}
listBackupProtectionContainers().catch(console.error);
async function main() {
listBackupProtectionContainers();
}
main().catch(console.error);

Просмотреть файл

@ -10,17 +10,23 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Provides a pageable list of all intents that are present within a vault.
*
* @summary Provides a pageable list of all intents that are present within a vault.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureWorkload/BackupProtectionIntent_List.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureWorkload/BackupProtectionIntent_List.json
*/
async function listProtectionIntentWithBackupManagementTypeFilter() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "myVault";
const resourceGroupName = "myRG";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "myRG";
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
const resArray = new Array();
@ -33,4 +39,8 @@ async function listProtectionIntentWithBackupManagementTypeFilter() {
console.log(resArray);
}
listProtectionIntentWithBackupManagementTypeFilter().catch(console.error);
async function main() {
listProtectionIntentWithBackupManagementTypeFilter();
}
main().catch(console.error);

Просмотреть файл

@ -10,17 +10,23 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Fetches Vault Encryption config.
*
* @summary Fetches Vault Encryption config.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/BackupResourceEncryptionConfig_Get.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/BackupResourceEncryptionConfig_Get.json
*/
async function getVaultEncryptionConfiguration() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "rishTestVault";
const resourceGroupName = "rishgrp";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "rishgrp";
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
const result = await client.backupResourceEncryptionConfigs.get(
@ -30,4 +36,8 @@ async function getVaultEncryptionConfiguration() {
console.log(result);
}
getVaultEncryptionConfiguration().catch(console.error);
async function main() {
getVaultEncryptionConfiguration();
}
main().catch(console.error);

Просмотреть файл

@ -13,17 +13,23 @@ import {
RecoveryServicesBackupClient
} from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Updates Vault encryption config.
*
* @summary Updates Vault encryption config.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/BackupResourceEncryptionConfig_Put.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/BackupResourceEncryptionConfig_Put.json
*/
async function updateVaultEncryptionConfiguration() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "source-rsv";
const resourceGroupName = "test-rg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "test-rg";
const parameters: BackupResourceEncryptionConfigResource = {
properties: {
encryptionAtRestType: "CustomerManaged",
@ -43,4 +49,8 @@ async function updateVaultEncryptionConfiguration() {
console.log(result);
}
updateVaultEncryptionConfiguration().catch(console.error);
async function main() {
updateVaultEncryptionConfiguration();
}
main().catch(console.error);

Просмотреть файл

@ -10,17 +10,24 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Fetches resource storage config.
*
* @summary Fetches resource storage config.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/BackupStorageConfig_Get.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/BackupStorageConfig_Get.json
*/
async function getVaultStorageConfiguration() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "PySDKBackupTestRsVault";
const resourceGroupName = "PythonSDKBackupTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] ||
"PythonSDKBackupTestRg";
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
const result = await client.backupResourceStorageConfigsNonCRR.get(
@ -30,4 +37,8 @@ async function getVaultStorageConfiguration() {
console.log(result);
}
getVaultStorageConfiguration().catch(console.error);
async function main() {
getVaultStorageConfiguration();
}
main().catch(console.error);

Просмотреть файл

@ -13,17 +13,24 @@ import {
RecoveryServicesBackupClient
} from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Updates vault storage model type.
*
* @summary Updates vault storage model type.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/BackupStorageConfig_Patch.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/BackupStorageConfig_Patch.json
*/
async function updateVaultStorageConfiguration() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "PySDKBackupTestRsVault";
const resourceGroupName = "PythonSDKBackupTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] ||
"PythonSDKBackupTestRg";
const parameters: BackupResourceConfigResource = {
properties: {
storageType: "LocallyRedundant",
@ -40,4 +47,8 @@ async function updateVaultStorageConfiguration() {
console.log(result);
}
updateVaultStorageConfiguration().catch(console.error);
async function main() {
updateVaultStorageConfiguration();
}
main().catch(console.error);

Просмотреть файл

@ -13,17 +13,24 @@ import {
RecoveryServicesBackupClient
} from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Updates vault storage model type.
*
* @summary Updates vault storage model type.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/BackupStorageConfig_Put.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/BackupStorageConfig_Put.json
*/
async function updateVaultStorageConfiguration() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "PySDKBackupTestRsVault";
const resourceGroupName = "PythonSDKBackupTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] ||
"PythonSDKBackupTestRg";
const parameters: BackupResourceConfigResource = {
properties: {
storageType: "LocallyRedundant",
@ -40,4 +47,8 @@ async function updateVaultStorageConfiguration() {
console.log(result);
}
updateVaultStorageConfiguration().catch(console.error);
async function main() {
updateVaultStorageConfiguration();
}
main().catch(console.error);

Просмотреть файл

@ -10,17 +10,23 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Fetches resource vault config.
*
* @summary Fetches resource vault config.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/BackupResourceVaultConfigs_Get.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/BackupResourceVaultConfigs_Get.json
*/
async function getVaultSecurityConfig() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "SwaggerTest";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
const result = await client.backupResourceVaultConfigs.get(
@ -30,4 +36,8 @@ async function getVaultSecurityConfig() {
console.log(result);
}
getVaultSecurityConfig().catch(console.error);
async function main() {
getVaultSecurityConfig();
}
main().catch(console.error);

Просмотреть файл

@ -13,17 +13,23 @@ import {
RecoveryServicesBackupClient
} from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Updates vault security config.
*
* @summary Updates vault security config.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/BackupResourceVaultConfigs_Put.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/BackupResourceVaultConfigs_Put.json
*/
async function updateVaultSecurityConfig() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "SwaggerTest";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const parameters: BackupResourceVaultConfigResource = {
properties: {
enhancedSecurityState: "Enabled",
@ -40,4 +46,8 @@ async function updateVaultSecurityConfig() {
console.log(result);
}
updateVaultSecurityConfig().catch(console.error);
async function main() {
updateVaultSecurityConfig();
}
main().catch(console.error);

Просмотреть файл

@ -13,17 +13,23 @@ import {
RecoveryServicesBackupClient
} from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Updates vault security config.
*
* @summary Updates vault security config.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/BackupResourceVaultConfigs_Patch.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/BackupResourceVaultConfigs_Patch.json
*/
async function updateVaultSecurityConfig() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "SwaggerTest";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const parameters: BackupResourceVaultConfigResource = {
properties: { enhancedSecurityState: "Enabled" }
};
@ -37,4 +43,8 @@ async function updateVaultSecurityConfig() {
console.log(result);
}
updateVaultSecurityConfig().catch(console.error);
async function main() {
updateVaultSecurityConfig();
}
main().catch(console.error);

Просмотреть файл

@ -13,15 +13,20 @@ import {
RecoveryServicesBackupClient
} from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Get the container backup status
*
* @summary Get the container backup status
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/GetBackupStatus.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/GetBackupStatus.json
*/
async function getAzureVirtualMachineBackupStatus() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const azureRegion = "southeastasia";
const parameters: BackupStatusRequest = {
resourceId:
@ -34,4 +39,8 @@ async function getAzureVirtualMachineBackupStatus() {
console.log(result);
}
getAzureVirtualMachineBackupStatus().catch(console.error);
async function main() {
getAzureVirtualMachineBackupStatus();
}
main().catch(console.error);

Просмотреть файл

@ -13,17 +13,23 @@ import {
RecoveryServicesBackupClient
} from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Fetches the backup management usage summaries of the vault.
*
* @summary Fetches the backup management usage summaries of the vault.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/BackupProtectionContainers_UsageSummary_Get.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/BackupProtectionContainers_UsageSummary_Get.json
*/
async function getProtectedContainersUsagesSummary() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "testVault";
const resourceGroupName = "testRG";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "testRG";
const filter = "type eq 'BackupProtectionContainerCountSummary'";
const options: BackupUsageSummariesListOptionalParams = { filter };
const credential = new DefaultAzureCredential();
@ -39,18 +45,19 @@ async function getProtectedContainersUsagesSummary() {
console.log(resArray);
}
getProtectedContainersUsagesSummary().catch(console.error);
/**
* This sample demonstrates how to Fetches the backup management usage summaries of the vault.
*
* @summary Fetches the backup management usage summaries of the vault.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/BackupProtectedItem_UsageSummary_Get.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/BackupProtectedItem_UsageSummary_Get.json
*/
async function getProtectedItemsUsagesSummary() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "testVault";
const resourceGroupName = "testRG";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "testRG";
const filter = "type eq 'BackupProtectedItemCountSummary'";
const options: BackupUsageSummariesListOptionalParams = { filter };
const credential = new DefaultAzureCredential();
@ -66,4 +73,9 @@ async function getProtectedItemsUsagesSummary() {
console.log(resArray);
}
getProtectedItemsUsagesSummary().catch(console.error);
async function main() {
getProtectedContainersUsagesSummary();
getProtectedItemsUsagesSummary();
}
main().catch(console.error);

Просмотреть файл

@ -13,6 +13,9 @@ import {
RecoveryServicesBackupClient
} from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Provides a pageable list of workload item of a specific container according to the query filter and the pagination
@ -20,12 +23,15 @@ parameters.
*
* @summary Provides a pageable list of workload item of a specific container according to the query filter and the pagination
parameters.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureWorkload/BackupWorkloadItems_List.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureWorkload/BackupWorkloadItems_List.json
*/
async function listWorkloadItemsInContainer() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "suchandr-seacan-rsv";
const resourceGroupName = "testRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "testRg";
const fabricName = "Azure";
const containerName = "VMAppContainer;Compute;bvtdtestag;sqlserver-1";
const filter = "backupManagementType eq 'AzureWorkload'";
@ -45,4 +51,8 @@ async function listWorkloadItemsInContainer() {
console.log(resArray);
}
listWorkloadItemsInContainer().catch(console.error);
async function main() {
listWorkloadItemsInContainer();
}
main().catch(console.error);

Просмотреть файл

@ -13,6 +13,9 @@ import {
RecoveryServicesBackupClient
} from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Triggers backup for specified backed up item. This is an asynchronous operation. To know the status of the
@ -20,12 +23,15 @@ operation, call GetProtectedItemOperationResult API.
*
* @summary Triggers backup for specified backed up item. This is an asynchronous operation. To know the status of the
operation, call GetProtectedItemOperationResult API.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/TriggerBackup_Post.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/TriggerBackup_Post.json
*/
async function triggerBackup() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "linuxRsVault";
const resourceGroupName = "linuxRsVaultRG";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "linuxRsVaultRG";
const fabricName = "Azure";
const containerName = "IaasVMContainer;iaasvmcontainerv2;testrg;v1win2012r";
const protectedItemName = "VM;iaasvmcontainerv2;testrg;v1win2012r";
@ -45,4 +51,8 @@ async function triggerBackup() {
console.log(result);
}
triggerBackup().catch(console.error);
async function main() {
triggerBackup();
}
main().catch(console.error);

Просмотреть файл

@ -10,17 +10,23 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Fetches Operation Result for Prepare Data Move
*
* @summary Fetches Operation Result for Prepare Data Move
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/BackupDataMove/PrepareDataMoveOperationResult_Get.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/BackupDataMove/PrepareDataMoveOperationResult_Get.json
*/
async function getOperationResultForPrepareDataMove() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "source-rsv";
const resourceGroupName = "sourceRG";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "sourceRG";
const operationId = "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
@ -32,4 +38,8 @@ async function getOperationResultForPrepareDataMove() {
console.log(result);
}
getOperationResultForPrepareDataMove().catch(console.error);
async function main() {
getOperationResultForPrepareDataMove();
}
main().catch(console.error);

Просмотреть файл

@ -13,17 +13,23 @@ import {
RecoveryServicesBackupClient
} from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Prepares source vault for Data Move operation
*
* @summary Prepares source vault for Data Move operation
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/BackupDataMove/PrepareDataMove_Post.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/BackupDataMove/PrepareDataMove_Post.json
*/
async function prepareDataMove() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "source-rsv";
const resourceGroupName = "sourceRG";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "sourceRG";
const parameters: PrepareDataMoveRequest = {
dataMoveLevel: "Vault",
targetRegion: "USGov Virginia",
@ -40,4 +46,8 @@ async function prepareDataMove() {
console.log(result);
}
prepareDataMove().catch(console.error);
async function main() {
prepareDataMove();
}
main().catch(console.error);

Просмотреть файл

@ -13,17 +13,23 @@ import {
RecoveryServicesBackupClient
} from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Triggers Data Move Operation on target vault
*
* @summary Triggers Data Move Operation on target vault
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/BackupDataMove/TriggerDataMove_Post.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/BackupDataMove/TriggerDataMove_Post.json
*/
async function triggerDataMove() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "target-rsv";
const resourceGroupName = "targetRG";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "targetRG";
const parameters: TriggerDataMoveRequest = {
correlationId:
"MTg2OTcyMzM4NzYyMjc1NDY3Nzs1YmUzYmVmNi04YjJiLTRhOTItOTllYi01NTM0MDllYjk2NjE=",
@ -42,4 +48,8 @@ async function triggerDataMove() {
console.log(result);
}
triggerDataMove().catch(console.error);
async function main() {
triggerDataMove();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,52 @@
/*
* 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.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
DeletedProtectionContainersListOptionalParams,
RecoveryServicesBackupClient
} from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Lists the soft deleted containers registered to Recovery Services Vault.
*
* @summary Lists the soft deleted containers registered to Recovery Services Vault.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureStorage/SoftDeletedContainers_List.json
*/
async function listBackupProtectionContainers() {
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "testRg";
const vaultName = "testVault";
const filter = "backupManagementType eq 'AzureWorkload'";
const options: DeletedProtectionContainersListOptionalParams = { filter };
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.deletedProtectionContainers.list(
resourceGroupName,
vaultName,
options
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
listBackupProtectionContainers();
}
main().catch(console.error);

Просмотреть файл

@ -10,6 +10,9 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Gets the operation result of operation triggered by Export Jobs API. If the operation is successful, then it also
@ -17,12 +20,15 @@ contains URL of a Blob and a SAS key to access the same. The blob contains expor
*
* @summary Gets the operation result of operation triggered by Export Jobs API. If the operation is successful, then it also
contains URL of a Blob and a SAS key to access the same. The blob contains exported jobs in JSON serialized format.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/ExportJobsOperationResult.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/ExportJobsOperationResult.json
*/
async function exportJobsOperationResults() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const operationId = "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
@ -34,4 +40,8 @@ async function exportJobsOperationResults() {
console.log(result);
}
exportJobsOperationResults().catch(console.error);
async function main() {
exportJobsOperationResults();
}
main().catch(console.error);

Просмотреть файл

@ -13,15 +13,20 @@ import {
RecoveryServicesBackupClient
} from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to It will validate if given feature with resource properties is supported in service
*
* @summary It will validate if given feature with resource properties is supported in service
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/BackupFeature_Validate.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/BackupFeature_Validate.json
*/
async function checkAzureVMBackupFeatureSupport() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const azureRegion = "southeastasia";
const parameters: AzureVMResourceFeatureSupportRequest = {
featureType: "AzureVMResourceBackup",
@ -34,4 +39,8 @@ async function checkAzureVMBackupFeatureSupport() {
console.log(result);
}
checkAzureVMBackupFeatureSupport().catch(console.error);
async function main() {
checkAzureVMBackupFeatureSupport();
}
main().catch(console.error);

Просмотреть файл

@ -10,17 +10,23 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Fetches operation status for data move operation on vault
*
* @summary Fetches operation status for data move operation on vault
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/BackupDataMove/BackupDataMoveOperationStatus_Get.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/BackupDataMove/BackupDataMoveOperationStatus_Get.json
*/
async function getOperationStatus() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "source-rsv";
const resourceGroupName = "sourceRG";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "sourceRG";
const operationId = "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
@ -32,4 +38,8 @@ async function getOperationStatus() {
console.log(result);
}
getOperationStatus().catch(console.error);
async function main() {
getOperationStatus();
}
main().catch(console.error);

Просмотреть файл

@ -13,6 +13,9 @@ import {
RecoveryServicesBackupClient
} from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Provisions a script which invokes an iSCSI connection to the backup data. Executing this script opens a file
@ -22,12 +25,16 @@ provisioning, call GetProtectedItemOperationResult API.
* @summary Provisions a script which invokes an iSCSI connection to the backup data. Executing this script opens a file
explorer displaying all the recoverable files and folders. This is an asynchronous operation. To know the status of
provisioning, call GetProtectedItemOperationResult API.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/Provision_Ilr.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/Provision_Ilr.json
*/
async function provisionInstantItemLevelRecoveryForAzureVM() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "PySDKBackupTestRsVault";
const resourceGroupName = "PythonSDKBackupTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] ||
"PythonSDKBackupTestRg";
const fabricName = "Azure";
const containerName =
"iaasvmcontainer;iaasvmcontainerv2;pysdktestrg;pysdktestv2vm1";
@ -57,4 +64,8 @@ async function provisionInstantItemLevelRecoveryForAzureVM() {
console.log(result);
}
provisionInstantItemLevelRecoveryForAzureVM().catch(console.error);
async function main() {
provisionInstantItemLevelRecoveryForAzureVM();
}
main().catch(console.error);

Просмотреть файл

@ -10,6 +10,9 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Revokes an iSCSI connection which can be used to download a script. Executing this script opens a file explorer
@ -17,12 +20,16 @@ displaying all recoverable files and folders. This is an asynchronous operation.
*
* @summary Revokes an iSCSI connection which can be used to download a script. Executing this script opens a file explorer
displaying all recoverable files and folders. This is an asynchronous operation.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/Revoke_Ilr.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/Revoke_Ilr.json
*/
async function revokeInstantItemLevelRecoveryForAzureVM() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "PySDKBackupTestRsVault";
const resourceGroupName = "PythonSDKBackupTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] ||
"PythonSDKBackupTestRg";
const fabricName = "Azure";
const containerName =
"iaasvmcontainer;iaasvmcontainerv2;pysdktestrg;pysdktestv2vm1";
@ -41,4 +48,8 @@ async function revokeInstantItemLevelRecoveryForAzureVM() {
console.log(result);
}
revokeInstantItemLevelRecoveryForAzureVM().catch(console.error);
async function main() {
revokeInstantItemLevelRecoveryForAzureVM();
}
main().catch(console.error);

Просмотреть файл

@ -10,6 +10,9 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Cancels a job. This is an asynchronous operation. To know the status of the cancellation, call
@ -17,12 +20,15 @@ GetCancelOperationResult API.
*
* @summary Cancels a job. This is an asynchronous operation. To know the status of the cancellation, call
GetCancelOperationResult API.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/TriggerCancelJob.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/TriggerCancelJob.json
*/
async function cancelJob() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const jobName = "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
@ -34,4 +40,8 @@ async function cancelJob() {
console.log(result);
}
cancelJob().catch(console.error);
async function main() {
cancelJob();
}
main().catch(console.error);

Просмотреть файл

@ -10,17 +10,23 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Gets extended information associated with the job.
*
* @summary Gets extended information associated with the job.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/GetJobDetails.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/GetJobDetails.json
*/
async function getJobDetails() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const jobName = "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
@ -32,4 +38,8 @@ async function getJobDetails() {
console.log(result);
}
getJobDetails().catch(console.error);
async function main() {
getJobDetails();
}
main().catch(console.error);

Просмотреть файл

@ -10,17 +10,23 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Fetches the result of any operation.
*
* @summary Fetches the result of any operation.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/CancelJobOperationResult.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/CancelJobOperationResult.json
*/
async function cancelJobOperationResult() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const jobName = "00000000-0000-0000-0000-000000000000";
const operationId = "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
@ -34,4 +40,8 @@ async function cancelJobOperationResult() {
console.log(result);
}
cancelJobOperationResult().catch(console.error);
async function main() {
cancelJobOperationResult();
}
main().catch(console.error);

Просмотреть файл

@ -10,21 +10,31 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Triggers export of jobs specified by filters and returns an OperationID to track.
*
* @summary Triggers export of jobs specified by filters and returns an OperationID to track.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/TriggerExportJobs.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/TriggerExportJobs.json
*/
async function exportJobs() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
const result = await client.jobs.export(vaultName, resourceGroupName);
console.log(result);
}
exportJobs().catch(console.error);
async function main() {
exportJobs();
}
main().catch(console.error);

Просмотреть файл

@ -13,17 +13,23 @@ import {
RecoveryServicesBackupClient
} from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Move recovery point from one datastore to another store.
*
* @summary Move recovery point from one datastore to another store.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/TriggerRecoveryPointMove_Post.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/TriggerRecoveryPointMove_Post.json
*/
async function triggerRpMoveOperation() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "testVault";
const resourceGroupName = "netsdktestrg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "netsdktestrg";
const fabricName = "Azure";
const containerName =
"IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1";
@ -48,4 +54,8 @@ async function triggerRpMoveOperation() {
console.log(result);
}
triggerRpMoveOperation().catch(console.error);
async function main() {
triggerRpMoveOperation();
}
main().catch(console.error);

Просмотреть файл

@ -13,17 +13,23 @@ import {
RecoveryServicesBackupClient
} from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Validate operation for specified backed up item. This is a synchronous operation.
*
* @summary Validate operation for specified backed up item. This is a synchronous operation.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/ValidateOperation_RestoreDisk.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/ValidateOperation_RestoreDisk.json
*/
async function validateOperation() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "testVault";
const resourceGroupName = "testRG";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "testRG";
const parameters: ValidateIaasVMRestoreOperationRequest = {
objectType: "ValidateIaasVMRestoreOperationRequest",
restoreRequest: {
@ -55,18 +61,19 @@ async function validateOperation() {
console.log(result);
}
validateOperation().catch(console.error);
/**
* This sample demonstrates how to Validate operation for specified backed up item. This is a synchronous operation.
*
* @summary Validate operation for specified backed up item. This is a synchronous operation.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/ValidateOperation_RestoreDisk_IdentityBasedRestoreDetails.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/ValidateOperation_RestoreDisk_IdentityBasedRestoreDetails.json
*/
async function validateOperationWithIdentityBasedRestoreDetails() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "testVault";
const resourceGroupName = "testRG";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "testRG";
const parameters: ValidateIaasVMRestoreOperationRequest = {
objectType: "ValidateIaasVMRestoreOperationRequest",
restoreRequest: {
@ -100,4 +107,9 @@ async function validateOperationWithIdentityBasedRestoreDetails() {
console.log(result);
}
validateOperationWithIdentityBasedRestoreDetails().catch(console.error);
async function main() {
validateOperation();
validateOperationWithIdentityBasedRestoreDetails();
}
main().catch(console.error);

Просмотреть файл

@ -10,15 +10,20 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Returns the list of available operations.
*
* @summary Returns the list of available operations.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/ListOperations.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/ListOperations.json
*/
async function listOperations() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
const resArray = new Array();
@ -28,4 +33,8 @@ async function listOperations() {
console.log(resArray);
}
listOperations().catch(console.error);
async function main() {
listOperations();
}
main().catch(console.error);

Просмотреть файл

@ -10,17 +10,23 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Delete Private Endpoint requests. This call is made by Backup Admin.
*
* @summary Delete Private Endpoint requests. This call is made by Backup Admin.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/PrivateEndpointConnection/DeletePrivateEndpointConnection.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/PrivateEndpointConnection/DeletePrivateEndpointConnection.json
*/
async function deletePrivateEndpointConnection() {
const subscriptionId = "04cf684a-d41f-4550-9f70-7708a3a2283b";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"04cf684a-d41f-4550-9f70-7708a3a2283b";
const vaultName = "gaallavaultbvtd2msi";
const resourceGroupName = "gaallaRG";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "gaallaRG";
const privateEndpointConnectionName =
"gaallatestpe2.5704c932-249a-490b-a142-1396838cd3b";
const credential = new DefaultAzureCredential();
@ -33,4 +39,8 @@ async function deletePrivateEndpointConnection() {
console.log(result);
}
deletePrivateEndpointConnection().catch(console.error);
async function main() {
deletePrivateEndpointConnection();
}
main().catch(console.error);

Просмотреть файл

@ -10,17 +10,23 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Get Private Endpoint Connection. This call is made by Backup Admin.
*
* @summary Get Private Endpoint Connection. This call is made by Backup Admin.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/PrivateEndpointConnection/GetPrivateEndpointConnection.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/PrivateEndpointConnection/GetPrivateEndpointConnection.json
*/
async function getPrivateEndpointConnection() {
const subscriptionId = "04cf684a-d41f-4550-9f70-7708a3a2283b";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"04cf684a-d41f-4550-9f70-7708a3a2283b";
const vaultName = "gaallavaultbvtd2msi";
const resourceGroupName = "gaallaRG";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "gaallaRG";
const privateEndpointConnectionName =
"gaallatestpe2.5704c932-249a-490b-a142-1396838cd3b";
const credential = new DefaultAzureCredential();
@ -33,4 +39,8 @@ async function getPrivateEndpointConnection() {
console.log(result);
}
getPrivateEndpointConnection().catch(console.error);
async function main() {
getPrivateEndpointConnection();
}
main().catch(console.error);

Просмотреть файл

@ -13,17 +13,23 @@ import {
RecoveryServicesBackupClient
} from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Approve or Reject Private Endpoint requests. This call is made by Backup Admin.
*
* @summary Approve or Reject Private Endpoint requests. This call is made by Backup Admin.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/PrivateEndpointConnection/PutPrivateEndpointConnection.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/PrivateEndpointConnection/PutPrivateEndpointConnection.json
*/
async function updatePrivateEndpointConnection() {
const subscriptionId = "04cf684a-d41f-4550-9f70-7708a3a2283b";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"04cf684a-d41f-4550-9f70-7708a3a2283b";
const vaultName = "gaallavaultbvtd2msi";
const resourceGroupName = "gaallaRG";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "gaallaRG";
const privateEndpointConnectionName =
"gaallatestpe2.5704c932-249a-490b-a142-1396838cd3b";
const parameters: PrivateEndpointConnectionResource = {
@ -50,4 +56,8 @@ async function updatePrivateEndpointConnection() {
console.log(result);
}
updatePrivateEndpointConnection().catch(console.error);
async function main() {
updatePrivateEndpointConnection();
}
main().catch(console.error);

Просмотреть файл

@ -10,17 +10,23 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Gets the operation status for a private endpoint connection.
*
* @summary Gets the operation status for a private endpoint connection.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/PrivateEndpointConnection/GetPrivateEndpointConnectionOperationStatus.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/PrivateEndpointConnection/GetPrivateEndpointConnectionOperationStatus.json
*/
async function getOperationStatus() {
const subscriptionId = "04cf684a-d41f-4550-9f70-7708a3a2283b";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"04cf684a-d41f-4550-9f70-7708a3a2283b";
const vaultName = "gaallavaultbvtd2msi";
const resourceGroupName = "gaallaRG";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "gaallaRG";
const privateEndpointConnectionName =
"gaallatestpe2.5704c932-249a-490b-a142-1396838cd3b";
const operationId = "0f48183b-0a44-4dca-aec1-bba5daab888a";
@ -35,4 +41,8 @@ async function getOperationStatus() {
console.log(result);
}
getOperationStatus().catch(console.error);
async function main() {
getOperationStatus();
}
main().catch(console.error);

Просмотреть файл

@ -13,17 +13,23 @@ import {
RecoveryServicesBackupClient
} from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Lists the containers that can be registered to Recovery Services Vault.
*
* @summary Lists the containers that can be registered to Recovery Services Vault.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureStorage/ProtectableContainers_List.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureStorage/ProtectableContainers_List.json
*/
async function listProtectableItemsWithBackupManagementTypeFilterAsAzureStorage() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "testvault";
const resourceGroupName = "testRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "testRg";
const fabricName = "Azure";
const filter =
"backupManagementType eq 'AzureStorage' and workloadType eq 'AzureFileShare'";
@ -42,6 +48,8 @@ async function listProtectableItemsWithBackupManagementTypeFilterAsAzureStorage(
console.log(resArray);
}
listProtectableItemsWithBackupManagementTypeFilterAsAzureStorage().catch(
console.error
);
async function main() {
listProtectableItemsWithBackupManagementTypeFilterAsAzureStorage();
}
main().catch(console.error);

Просмотреть файл

@ -10,17 +10,23 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Fetches the result of any operation on the backup item.
*
* @summary Fetches the result of any operation on the backup item.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/ProtectedItemOperationResults.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/ProtectedItemOperationResults.json
*/
async function getOperationResultsOfProtectedVM() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const fabricName = "Azure";
const containerName =
"IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1";
@ -39,4 +45,8 @@ async function getOperationResultsOfProtectedVM() {
console.log(result);
}
getOperationResultsOfProtectedVM().catch(console.error);
async function main() {
getOperationResultsOfProtectedVM();
}
main().catch(console.error);

Просмотреть файл

@ -10,6 +10,9 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Fetches the status of an operation such as triggering a backup, restore. The status can be in progress, completed
@ -19,12 +22,15 @@ create jobs. This method returns the list of jobs associated with the operation.
* @summary Fetches the status of an operation such as triggering a backup, restore. The status can be in progress, completed
or failed. You can refer to the OperationStatus enum for all the possible states of the operation. Some operations
create jobs. This method returns the list of jobs associated with the operation.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/ProtectedItemOperationStatus.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/ProtectedItemOperationStatus.json
*/
async function getOperationStatusOfProtectedVM() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const fabricName = "Azure";
const containerName =
"IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1";
@ -43,4 +49,8 @@ async function getOperationStatusOfProtectedVM() {
console.log(result);
}
getOperationStatusOfProtectedVM().catch(console.error);
async function main() {
getOperationStatusOfProtectedVM();
}
main().catch(console.error);

Просмотреть файл

@ -13,6 +13,9 @@ import {
RecoveryServicesBackupClient
} from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Enables backup of an item or to modifies the backup policy information of an already backed up item. This is an
@ -20,12 +23,15 @@ asynchronous operation. To know the status of the operation, call the GetItemOpe
*
* @summary Enables backup of an item or to modifies the backup policy information of an already backed up item. This is an
asynchronous operation. To know the status of the operation, call the GetItemOperationResult API.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/ConfigureProtection.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/ConfigureProtection.json
*/
async function enableProtectionOnAzureIaasVM() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const fabricName = "Azure";
const containerName =
"IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1";
@ -52,20 +58,21 @@ async function enableProtectionOnAzureIaasVM() {
console.log(result);
}
enableProtectionOnAzureIaasVM().catch(console.error);
/**
* This sample demonstrates how to Enables backup of an item or to modifies the backup policy information of an already backed up item. This is an
asynchronous operation. To know the status of the operation, call the GetItemOperationResult API.
*
* @summary Enables backup of an item or to modifies the backup policy information of an already backed up item. This is an
asynchronous operation. To know the status of the operation, call the GetItemOperationResult API.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/StopProtection.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/StopProtection.json
*/
async function stopProtectionWithRetainDataOnAzureIaasVM() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const fabricName = "Azure";
const containerName =
"IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1";
@ -91,4 +98,9 @@ async function stopProtectionWithRetainDataOnAzureIaasVM() {
console.log(result);
}
stopProtectionWithRetainDataOnAzureIaasVM().catch(console.error);
async function main() {
enableProtectionOnAzureIaasVM();
stopProtectionWithRetainDataOnAzureIaasVM();
}
main().catch(console.error);

Просмотреть файл

@ -10,6 +10,9 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Used to disable backup of an item within a container. This is an asynchronous operation. To know the status of the
@ -17,12 +20,16 @@ request, call the GetItemOperationResult API.
*
* @summary Used to disable backup of an item within a container. This is an asynchronous operation. To know the status of the
request, call the GetItemOperationResult API.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/ProtectedItem_Delete.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/ProtectedItem_Delete.json
*/
async function deleteProtectionFromAzureVirtualMachine() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "PySDKBackupTestRsVault";
const resourceGroupName = "PythonSDKBackupTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] ||
"PythonSDKBackupTestRg";
const fabricName = "Azure";
const containerName =
"iaasvmcontainer;iaasvmcontainerv2;pysdktestrg;pysdktestv2vm1";
@ -39,4 +46,8 @@ async function deleteProtectionFromAzureVirtualMachine() {
console.log(result);
}
deleteProtectionFromAzureVirtualMachine().catch(console.error);
async function main() {
deleteProtectionFromAzureVirtualMachine();
}
main().catch(console.error);

Просмотреть файл

@ -10,6 +10,9 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Provides the details of the backed up item. This is an asynchronous operation. To know the status of the operation,
@ -17,12 +20,16 @@ call the GetItemOperationResult API.
*
* @summary Provides the details of the backed up item. This is an asynchronous operation. To know the status of the operation,
call the GetItemOperationResult API.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/ClassicCompute_ProtectedItem_Get.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/ClassicCompute_ProtectedItem_Get.json
*/
async function getProtectedClassicVirtualMachineDetails() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "PySDKBackupTestRsVault";
const resourceGroupName = "PythonSDKBackupTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] ||
"PythonSDKBackupTestRg";
const fabricName = "Azure";
const containerName = "iaasvmcontainer;iaasvmcontainer;iaasvm-rg;iaasvm-1";
const protectedItemName = "vm;iaasvmcontainer;iaasvm-rg;iaasvm-1";
@ -38,20 +45,22 @@ async function getProtectedClassicVirtualMachineDetails() {
console.log(result);
}
getProtectedClassicVirtualMachineDetails().catch(console.error);
/**
* This sample demonstrates how to Provides the details of the backed up item. This is an asynchronous operation. To know the status of the operation,
call the GetItemOperationResult API.
*
* @summary Provides the details of the backed up item. This is an asynchronous operation. To know the status of the operation,
call the GetItemOperationResult API.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/Compute_ProtectedItem_Get.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/Compute_ProtectedItem_Get.json
*/
async function getProtectedVirtualMachineDetails() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "PySDKBackupTestRsVault";
const resourceGroupName = "PythonSDKBackupTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] ||
"PythonSDKBackupTestRg";
const fabricName = "Azure";
const containerName = "iaasvmcontainer;iaasvmcontainerv2;iaasvm-rg;iaasvm-1";
const protectedItemName = "vm;iaasvmcontainerv2;iaasvm-rg;iaasvm-1";
@ -67,4 +76,9 @@ async function getProtectedVirtualMachineDetails() {
console.log(result);
}
getProtectedVirtualMachineDetails().catch(console.error);
async function main() {
getProtectedClassicVirtualMachineDetails();
getProtectedVirtualMachineDetails();
}
main().catch(console.error);

Просмотреть файл

@ -10,17 +10,23 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Fetches the result of any operation on the container.
*
* @summary Fetches the result of any operation on the container.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureStorage/ProtectionContainers_Inquire_Result.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureStorage/ProtectionContainers_Inquire_Result.json
*/
async function getAzureStorageProtectionContainerOperationResult() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "testvault";
const resourceGroupName = "test-rg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "test-rg";
const fabricName = "Azure";
const containerName = "VMAppContainer;Compute;testRG;testSQL";
const operationId = "00000000-0000-0000-0000-000000000000";
@ -36,4 +42,8 @@ async function getAzureStorageProtectionContainerOperationResult() {
console.log(result);
}
getAzureStorageProtectionContainerOperationResult().catch(console.error);
async function main() {
getAzureStorageProtectionContainerOperationResult();
}
main().catch(console.error);

Просмотреть файл

@ -10,17 +10,23 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Provides the result of the refresh operation triggered by the BeginRefresh operation.
*
* @summary Provides the result of the refresh operation triggered by the BeginRefresh operation.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/RefreshContainers_OperationResults.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/RefreshContainers_OperationResults.json
*/
async function azureVMDiscoveryOperationResult() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const fabricName = "Azure";
const operationId = "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
@ -34,4 +40,8 @@ async function azureVMDiscoveryOperationResult() {
console.log(result);
}
azureVMDiscoveryOperationResult().catch(console.error);
async function main() {
azureVMDiscoveryOperationResult();
}
main().catch(console.error);

Просмотреть файл

@ -10,17 +10,23 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Gets details of the specific container registered to your Recovery Services Vault.
*
* @summary Gets details of the specific container registered to your Recovery Services Vault.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureWorkload/ProtectionContainers_Get.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureWorkload/ProtectionContainers_Get.json
*/
async function getProtectionContainerDetails() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "testVault";
const resourceGroupName = "testRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "testRg";
const fabricName = "Azure";
const containerName = "VMAppContainer;Compute;testRG;testSQL";
const credential = new DefaultAzureCredential();
@ -34,4 +40,8 @@ async function getProtectionContainerDetails() {
console.log(result);
}
getProtectionContainerDetails().catch(console.error);
async function main() {
getProtectionContainerDetails();
}
main().catch(console.error);

Просмотреть файл

@ -10,17 +10,23 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to This is an async operation and the results should be tracked using location header or Azure-async-url.
*
* @summary This is an async operation and the results should be tracked using location header or Azure-async-url.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureStorage/ProtectionContainers_Inquire.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureStorage/ProtectionContainers_Inquire.json
*/
async function inquireAzureStorageProtectionContainers() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "testvault";
const resourceGroupName = "test-rg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "test-rg";
const fabricName = "Azure";
const containerName = "storagecontainer;Storage;test-rg;teststorage";
const credential = new DefaultAzureCredential();
@ -34,4 +40,8 @@ async function inquireAzureStorageProtectionContainers() {
console.log(result);
}
inquireAzureStorageProtectionContainers().catch(console.error);
async function main() {
inquireAzureStorageProtectionContainers();
}
main().catch(console.error);

Просмотреть файл

@ -10,6 +10,9 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Discovers all the containers in the subscription that can be backed up to Recovery Services Vault. This is an
@ -17,12 +20,15 @@ asynchronous operation. To know the status of the operation, call GetRefreshOper
*
* @summary Discovers all the containers in the subscription that can be backed up to Recovery Services Vault. This is an
asynchronous operation. To know the status of the operation, call GetRefreshOperationResult API.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/RefreshContainers.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/RefreshContainers.json
*/
async function triggerAzureVMDiscovery() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const fabricName = "Azure";
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
@ -34,4 +40,8 @@ async function triggerAzureVMDiscovery() {
console.log(result);
}
triggerAzureVMDiscovery().catch(console.error);
async function main() {
triggerAzureVMDiscovery();
}
main().catch(console.error);

Просмотреть файл

@ -13,6 +13,9 @@ import {
RecoveryServicesBackupClient
} from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Registers the container with Recovery Services vault.
@ -22,12 +25,15 @@ the operation.
* @summary Registers the container with Recovery Services vault.
This is an asynchronous operation. To track the operation status, use location header to call get latest status of
the operation.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureStorage/ProtectionContainers_Register.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureStorage/ProtectionContainers_Register.json
*/
async function registerAzureStorageProtectionContainers() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "swaggertestvault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const fabricName = "Azure";
const containerName = "StorageContainer;Storage;SwaggerTestRg;swaggertestsa";
const parameters: ProtectionContainerResource = {
@ -52,4 +58,8 @@ async function registerAzureStorageProtectionContainers() {
console.log(result);
}
registerAzureStorageProtectionContainers().catch(console.error);
async function main() {
registerAzureStorageProtectionContainers();
}
main().catch(console.error);

Просмотреть файл

@ -10,6 +10,9 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Unregisters the given container from your Recovery Services Vault. This is an asynchronous operation. To determine
@ -17,12 +20,15 @@ whether the backend service has finished processing the request, call Get Contai
*
* @summary Unregisters the given container from your Recovery Services Vault. This is an asynchronous operation. To determine
whether the backend service has finished processing the request, call Get Container Operation Result API.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureWorkload/ProtectionContainers_Unregister.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureWorkload/ProtectionContainers_Unregister.json
*/
async function unregisterProtectionContainer() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "testVault";
const resourceGroupName = "testRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "testRg";
const fabricName = "Azure";
const containerName = "storagecontainer;Storage;test-rg;teststorage";
const credential = new DefaultAzureCredential();
@ -36,4 +42,8 @@ async function unregisterProtectionContainer() {
console.log(result);
}
unregisterProtectionContainer().catch(console.error);
async function main() {
unregisterProtectionContainer();
}
main().catch(console.error);

Просмотреть файл

@ -13,17 +13,23 @@ import {
RecoveryServicesBackupClient
} from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Create Intent for Enabling backup of an item. This is a synchronous operation.
*
* @summary Create Intent for Enabling backup of an item. This is a synchronous operation.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/ProtectionIntent_CreateOrUpdate.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/ProtectionIntent_CreateOrUpdate.json
*/
async function createOrUpdateAzureVMProtectionIntent() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "myVault";
const resourceGroupName = "myRG";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "myRG";
const fabricName = "Azure";
const intentObjectName = "vm;iaasvmcontainerv2;chamsrgtest;chamscandel";
const parameters: ProtectionIntentResource = {
@ -47,4 +53,8 @@ async function createOrUpdateAzureVMProtectionIntent() {
console.log(result);
}
createOrUpdateAzureVMProtectionIntent().catch(console.error);
async function main() {
createOrUpdateAzureVMProtectionIntent();
}
main().catch(console.error);

Просмотреть файл

@ -10,17 +10,23 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Used to remove intent from an item
*
* @summary Used to remove intent from an item
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureWorkload/BackupProtectionIntent_Delete.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureWorkload/BackupProtectionIntent_Delete.json
*/
async function deleteProtectionIntentFromItem() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "myVault";
const resourceGroupName = "myRG";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "myRG";
const fabricName = "Azure";
const intentObjectName = "249D9B07-D2EF-4202-AA64-65F35418564E";
const credential = new DefaultAzureCredential();
@ -34,4 +40,8 @@ async function deleteProtectionIntentFromItem() {
console.log(result);
}
deleteProtectionIntentFromItem().catch(console.error);
async function main() {
deleteProtectionIntentFromItem();
}
main().catch(console.error);

Просмотреть файл

@ -10,6 +10,9 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Provides the details of the protection intent up item. This is an asynchronous operation. To know the status of the operation,
@ -17,12 +20,15 @@ call the GetItemOperationResult API.
*
* @summary Provides the details of the protection intent up item. This is an asynchronous operation. To know the status of the operation,
call the GetItemOperationResult API.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureWorkload/BackupProtectionIntent_Get.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureWorkload/BackupProtectionIntent_Get.json
*/
async function getProtectionIntentForAnItem() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "myVault";
const resourceGroupName = "myRG";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "myRG";
const fabricName = "Azure";
const intentObjectName = "249D9B07-D2EF-4202-AA64-65F35418564E";
const credential = new DefaultAzureCredential();
@ -36,4 +42,8 @@ async function getProtectionIntentForAnItem() {
console.log(result);
}
getProtectionIntentForAnItem().catch(console.error);
async function main() {
getProtectionIntentForAnItem();
}
main().catch(console.error);

Просмотреть файл

@ -13,6 +13,9 @@ import {
RecoveryServicesBackupClient
} from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to It will validate followings
@ -24,10 +27,12 @@ import { DefaultAzureCredential } from "@azure/identity";
1. Vault capacity
2. VM is already protected
3. Any VM related configuration passed in properties.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/ProtectionIntent_Validate.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/ProtectionIntent_Validate.json
*/
async function validateEnableProtectionOnAzureVM() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const azureRegion = "southeastasia";
const parameters: PreValidateEnableBackupRequest = {
properties: "",
@ -46,4 +51,8 @@ async function validateEnableProtectionOnAzureVM() {
console.log(result);
}
validateEnableProtectionOnAzureVM().catch(console.error);
async function main() {
validateEnableProtectionOnAzureVM();
}
main().catch(console.error);

Просмотреть файл

@ -13,6 +13,9 @@ import {
RecoveryServicesBackupClient
} from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can be fetched
@ -20,12 +23,15 @@ using GetPolicyOperationResult API.
*
* @summary Creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can be fetched
using GetPolicyOperationResult API.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureStorage/ProtectionPolicies_CreateOrUpdate_Daily.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureStorage/ProtectionPolicies_CreateOrUpdate_Daily.json
*/
async function createOrUpdateDailyAzureStorageProtectionPolicy() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "swaggertestvault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const policyName = "dailyPolicy2";
const parameters: ProtectionPolicyResource = {
properties: {
@ -83,20 +89,21 @@ async function createOrUpdateDailyAzureStorageProtectionPolicy() {
console.log(result);
}
createOrUpdateDailyAzureStorageProtectionPolicy().catch(console.error);
/**
* This sample demonstrates how to Creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can be fetched
using GetPolicyOperationResult API.
*
* @summary Creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can be fetched
using GetPolicyOperationResult API.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/V2Policy/IaaS_v2_hourly.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/V2Policy/IaaS_v2_hourly.json
*/
async function createOrUpdateEnhancedAzureVMProtectionPolicyWithHourlyBackup() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const policyName = "v2-daily-sample";
const parameters: ProtectionPolicyResource = {
properties: {
@ -159,22 +166,21 @@ async function createOrUpdateEnhancedAzureVMProtectionPolicyWithHourlyBackup() {
console.log(result);
}
createOrUpdateEnhancedAzureVMProtectionPolicyWithHourlyBackup().catch(
console.error
);
/**
* This sample demonstrates how to Creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can be fetched
using GetPolicyOperationResult API.
*
* @summary Creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can be fetched
using GetPolicyOperationResult API.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/V2Policy/IaaS_v2_daily.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/V2Policy/IaaS_v2_daily.json
*/
async function createOrUpdateEnhancedAzureVMProtectionPolicyWithDailyBackup() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const policyName = "v2-daily-sample";
const parameters: ProtectionPolicyResource = {
properties: {
@ -233,22 +239,21 @@ async function createOrUpdateEnhancedAzureVMProtectionPolicyWithDailyBackup() {
console.log(result);
}
createOrUpdateEnhancedAzureVMProtectionPolicyWithDailyBackup().catch(
console.error
);
/**
* This sample demonstrates how to Creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can be fetched
using GetPolicyOperationResult API.
*
* @summary Creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can be fetched
using GetPolicyOperationResult API.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/ProtectionPolicies_CreateOrUpdate_Complex.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/ProtectionPolicies_CreateOrUpdate_Complex.json
*/
async function createOrUpdateFullAzureVMProtectionPolicy() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const policyName = "testPolicy1";
const parameters: ProtectionPolicyResource = {
properties: {
@ -300,20 +305,21 @@ async function createOrUpdateFullAzureVMProtectionPolicy() {
console.log(result);
}
createOrUpdateFullAzureVMProtectionPolicy().catch(console.error);
/**
* This sample demonstrates how to Creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can be fetched
using GetPolicyOperationResult API.
*
* @summary Creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can be fetched
using GetPolicyOperationResult API.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureWorkload/ProtectionPolicies_CreateOrUpdate_Complex.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureWorkload/ProtectionPolicies_CreateOrUpdate_Complex.json
*/
async function createOrUpdateFullAzureWorkloadProtectionPolicy() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const policyName = "testPolicy1";
const parameters: ProtectionPolicyResource = {
properties: {
@ -395,20 +401,21 @@ async function createOrUpdateFullAzureWorkloadProtectionPolicy() {
console.log(result);
}
createOrUpdateFullAzureWorkloadProtectionPolicy().catch(console.error);
/**
* This sample demonstrates how to Creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can be fetched
using GetPolicyOperationResult API.
*
* @summary Creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can be fetched
using GetPolicyOperationResult API.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureStorage/ProtectionPolicies_CreateOrUpdate_Hourly.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureStorage/ProtectionPolicies_CreateOrUpdate_Hourly.json
*/
async function createOrUpdateHourlyAzureStorageProtectionPolicy() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "swaggertestvault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const policyName = "newPolicy2";
const parameters: ProtectionPolicyResource = {
properties: {
@ -470,20 +477,21 @@ async function createOrUpdateHourlyAzureStorageProtectionPolicy() {
console.log(result);
}
createOrUpdateHourlyAzureStorageProtectionPolicy().catch(console.error);
/**
* This sample demonstrates how to Creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can be fetched
using GetPolicyOperationResult API.
*
* @summary Creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can be fetched
using GetPolicyOperationResult API.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/ProtectionPolicies_CreateOrUpdate_Simple.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/ProtectionPolicies_CreateOrUpdate_Simple.json
*/
async function createOrUpdateSimpleAzureVMProtectionPolicy() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const policyName = "testPolicy1";
const parameters: ProtectionPolicyResource = {
properties: {
@ -514,4 +522,14 @@ async function createOrUpdateSimpleAzureVMProtectionPolicy() {
console.log(result);
}
createOrUpdateSimpleAzureVMProtectionPolicy().catch(console.error);
async function main() {
createOrUpdateDailyAzureStorageProtectionPolicy();
createOrUpdateEnhancedAzureVMProtectionPolicyWithHourlyBackup();
createOrUpdateEnhancedAzureVMProtectionPolicyWithDailyBackup();
createOrUpdateFullAzureVMProtectionPolicy();
createOrUpdateFullAzureWorkloadProtectionPolicy();
createOrUpdateHourlyAzureStorageProtectionPolicy();
createOrUpdateSimpleAzureVMProtectionPolicy();
}
main().catch(console.error);

Просмотреть файл

@ -10,6 +10,9 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Deletes specified backup policy from your Recovery Services Vault. This is an asynchronous operation. Status of the
@ -17,12 +20,15 @@ operation can be fetched using GetProtectionPolicyOperationResult API.
*
* @summary Deletes specified backup policy from your Recovery Services Vault. This is an asynchronous operation. Status of the
operation can be fetched using GetProtectionPolicyOperationResult API.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/ProtectionPolicies_Delete.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/ProtectionPolicies_Delete.json
*/
async function deleteAzureVMProtectionPolicy() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const policyName = "testPolicy1";
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
@ -34,4 +40,8 @@ async function deleteAzureVMProtectionPolicy() {
console.log(result);
}
deleteAzureVMProtectionPolicy().catch(console.error);
async function main() {
deleteAzureVMProtectionPolicy();
}
main().catch(console.error);

Просмотреть файл

@ -10,6 +10,9 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Provides the details of the backup policies associated to Recovery Services Vault. This is an asynchronous
@ -17,12 +20,15 @@ operation. Status of the operation can be fetched using GetPolicyOperationResult
*
* @summary Provides the details of the backup policies associated to Recovery Services Vault. This is an asynchronous
operation. Status of the operation can be fetched using GetPolicyOperationResult API.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/V2Policy/v2-Get-Policy.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/V2Policy/v2-Get-Policy.json
*/
async function getAzureIaasVMEnhancedProtectionPolicyDetails() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const policyName = "v2-daily-sample";
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
@ -34,20 +40,21 @@ async function getAzureIaasVMEnhancedProtectionPolicyDetails() {
console.log(result);
}
getAzureIaasVMEnhancedProtectionPolicyDetails().catch(console.error);
/**
* This sample demonstrates how to Provides the details of the backup policies associated to Recovery Services Vault. This is an asynchronous
operation. Status of the operation can be fetched using GetPolicyOperationResult API.
*
* @summary Provides the details of the backup policies associated to Recovery Services Vault. This is an asynchronous
operation. Status of the operation can be fetched using GetPolicyOperationResult API.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/ProtectionPolicies_Get.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/ProtectionPolicies_Get.json
*/
async function getAzureIaasVMProtectionPolicyDetails() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const policyName = "testPolicy1";
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
@ -59,4 +66,9 @@ async function getAzureIaasVMProtectionPolicyDetails() {
console.log(result);
}
getAzureIaasVMProtectionPolicyDetails().catch(console.error);
async function main() {
getAzureIaasVMEnhancedProtectionPolicyDetails();
getAzureIaasVMProtectionPolicyDetails();
}
main().catch(console.error);

Просмотреть файл

@ -10,17 +10,23 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Provides the result of an operation.
*
* @summary Provides the result of an operation.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/ProtectionPolicyOperationResults_Get.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/ProtectionPolicyOperationResults_Get.json
*/
async function getProtectionPolicyOperationResults() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const policyName = "testPolicy1";
const operationId = "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
@ -34,4 +40,8 @@ async function getProtectionPolicyOperationResults() {
console.log(result);
}
getProtectionPolicyOperationResults().catch(console.error);
async function main() {
getProtectionPolicyOperationResults();
}
main().catch(console.error);

Просмотреть файл

@ -10,6 +10,9 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Provides the status of the asynchronous operations like backup, restore. The status can be in progress, completed
@ -19,12 +22,15 @@ create jobs. This method returns the list of jobs associated with operation.
* @summary Provides the status of the asynchronous operations like backup, restore. The status can be in progress, completed
or failed. You can refer to the Operation Status enum for all the possible states of an operation. Some operations
create jobs. This method returns the list of jobs associated with operation.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/ProtectionPolicyOperationStatuses_Get.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/ProtectionPolicyOperationStatuses_Get.json
*/
async function getProtectionPolicyOperationStatus() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const policyName = "testPolicy1";
const operationId = "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
@ -38,4 +44,8 @@ async function getProtectionPolicyOperationStatus() {
console.log(result);
}
getProtectionPolicyOperationStatus().catch(console.error);
async function main() {
getProtectionPolicyOperationStatus();
}
main().catch(console.error);

Просмотреть файл

@ -10,6 +10,9 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Provides the information of the backed up data identified using RecoveryPointID. This is an asynchronous operation.
@ -17,12 +20,15 @@ To know the status of the operation, call the GetProtectedItemOperationResult AP
*
* @summary Provides the information of the backed up data identified using RecoveryPointID. This is an asynchronous operation.
To know the status of the operation, call the GetProtectedItemOperationResult API.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/RecoveryPoints_Get.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/RecoveryPoints_Get.json
*/
async function getAzureVMRecoveryPointDetails() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "rshvault";
const resourceGroupName = "rshhtestmdvmrg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "rshhtestmdvmrg";
const fabricName = "Azure";
const containerName =
"IaasVMContainer;iaasvmcontainerv2;rshhtestmdvmrg;rshmdvmsmall";
@ -41,4 +47,8 @@ async function getAzureVMRecoveryPointDetails() {
console.log(result);
}
getAzureVMRecoveryPointDetails().catch(console.error);
async function main() {
getAzureVMRecoveryPointDetails();
}
main().catch(console.error);

Просмотреть файл

@ -10,17 +10,23 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Lists the backup copies for the backed up item.
*
* @summary Lists the backup copies for the backed up item.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/RecoveryPoints_List.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/RecoveryPoints_List.json
*/
async function getProtectedAzureVMRecoveryPoints() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "rshvault";
const resourceGroupName = "rshhtestmdvmrg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "rshhtestmdvmrg";
const fabricName = "Azure";
const containerName =
"IaasVMContainer;iaasvmcontainerv2;rshhtestmdvmrg;rshmdvmsmall";
@ -40,4 +46,8 @@ async function getProtectedAzureVMRecoveryPoints() {
console.log(resArray);
}
getProtectedAzureVMRecoveryPoints().catch(console.error);
async function main() {
getProtectedAzureVMRecoveryPoints();
}
main().catch(console.error);

Просмотреть файл

@ -13,17 +13,23 @@ import {
RecoveryServicesBackupClient
} from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Lists the recovery points recommended for move to another tier
*
* @summary Lists the recovery points recommended for move to another tier
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/RecoveryPointsRecommendedForMove_List.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/RecoveryPointsRecommendedForMove_List.json
*/
async function getProtectedAzureVMRecoveryPointsRecommendedForMove() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "rshvault";
const resourceGroupName = "rshhtestmdvmrg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "rshhtestmdvmrg";
const fabricName = "Azure";
const containerName =
"IaasVMContainer;iaasvmcontainerv2;rshhtestmdvmrg;rshmdvmsmall";
@ -48,4 +54,8 @@ async function getProtectedAzureVMRecoveryPointsRecommendedForMove() {
console.log(resArray);
}
getProtectedAzureVMRecoveryPointsRecommendedForMove().catch(console.error);
async function main() {
getProtectedAzureVMRecoveryPointsRecommendedForMove();
}
main().catch(console.error);

Просмотреть файл

@ -10,17 +10,24 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to List the ResourceGuardProxies under vault
*
* @summary List the ResourceGuardProxies under vault
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/ResourceGuardProxyCRUD/ListResourceGuardProxy.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/ResourceGuardProxyCRUD/ListResourceGuardProxy.json
*/
async function getVaultGuardProxies() {
const subscriptionId = "0b352192-dcac-4cc7-992e-a96190ccc68c";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"0b352192-dcac-4cc7-992e-a96190ccc68c";
const vaultName = "sampleVault";
const resourceGroupName = "SampleResourceGroup";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] ||
"SampleResourceGroup";
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
const resArray = new Array();
@ -33,4 +40,8 @@ async function getVaultGuardProxies() {
console.log(resArray);
}
getVaultGuardProxies().catch(console.error);
async function main() {
getVaultGuardProxies();
}
main().catch(console.error);

Просмотреть файл

@ -10,17 +10,24 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Delete ResourceGuardProxy under vault
*
* @summary Delete ResourceGuardProxy under vault
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/ResourceGuardProxyCRUD/DeleteResourceGuardProxy.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/ResourceGuardProxyCRUD/DeleteResourceGuardProxy.json
*/
async function deleteResourceGuardProxy() {
const subscriptionId = "0b352192-dcac-4cc7-992e-a96190ccc68c";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"0b352192-dcac-4cc7-992e-a96190ccc68c";
const vaultName = "sampleVault";
const resourceGroupName = "SampleResourceGroup";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] ||
"SampleResourceGroup";
const resourceGuardProxyName = "swaggerExample";
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
@ -32,4 +39,8 @@ async function deleteResourceGuardProxy() {
console.log(result);
}
deleteResourceGuardProxy().catch(console.error);
async function main() {
deleteResourceGuardProxy();
}
main().catch(console.error);

Просмотреть файл

@ -10,17 +10,24 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Returns ResourceGuardProxy under vault and with the name referenced in request
*
* @summary Returns ResourceGuardProxy under vault and with the name referenced in request
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/ResourceGuardProxyCRUD/GetResourceGuardProxy.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/ResourceGuardProxyCRUD/GetResourceGuardProxy.json
*/
async function getResourceGuardProxy() {
const subscriptionId = "0b352192-dcac-4cc7-992e-a96190ccc68c";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"0b352192-dcac-4cc7-992e-a96190ccc68c";
const vaultName = "sampleVault";
const resourceGroupName = "SampleResourceGroup";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] ||
"SampleResourceGroup";
const resourceGuardProxyName = "swaggerExample";
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
@ -32,4 +39,8 @@ async function getResourceGuardProxy() {
console.log(result);
}
getResourceGuardProxy().catch(console.error);
async function main() {
getResourceGuardProxy();
}
main().catch(console.error);

Просмотреть файл

@ -13,6 +13,9 @@ import {
RecoveryServicesBackupClient
} from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Add or Update ResourceGuardProxy under vault
@ -20,17 +23,18 @@ Secures vault critical operations
*
* @summary Add or Update ResourceGuardProxy under vault
Secures vault critical operations
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/ResourceGuardProxyCRUD/PutResourceGuardProxy.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/ResourceGuardProxyCRUD/PutResourceGuardProxy.json
*/
async function createResourceGuardProxy() {
const subscriptionId = "0b352192-dcac-4cc7-992e-a96190ccc68c";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"0b352192-dcac-4cc7-992e-a96190ccc68c";
const vaultName = "sampleVault";
const resourceGroupName = "SampleResourceGroup";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] ||
"SampleResourceGroup";
const resourceGuardProxyName = "swaggerExample";
const parameters: ResourceGuardProxyBaseResource = {
type: "Microsoft.RecoveryServices/vaults/backupResourceGuardProxies",
id:
"/subscriptions/0b352192-dcac-4cc7-992e-a96190ccc68c/resourceGroups/SampleResourceGroup/providers/Microsoft.RecoveryServicesBVTD2/vaults/sampleVault/backupResourceGuardProxies/swaggerExample",
properties: {
resourceGuardResourceId:
"/subscriptions/c999d45b-944f-418c-a0d8-c3fcfd1802c8/resourceGroups/vaultguardRGNew/providers/Microsoft.DataProtection/resourceGuards/VaultGuardTestNew"
@ -47,4 +51,8 @@ async function createResourceGuardProxy() {
console.log(result);
}
createResourceGuardProxy().catch(console.error);
async function main() {
createResourceGuardProxy();
}
main().catch(console.error);

Просмотреть файл

@ -13,17 +13,24 @@ import {
RecoveryServicesBackupClient
} from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Secures delete ResourceGuardProxy operations.
*
* @summary Secures delete ResourceGuardProxy operations.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/ResourceGuardProxyCRUD/UnlockDeleteResourceGuardProxy.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/ResourceGuardProxyCRUD/UnlockDeleteResourceGuardProxy.json
*/
async function unlockDeleteResourceGuardProxy() {
const subscriptionId = "0b352192-dcac-4cc7-992e-a96190ccc68c";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"0b352192-dcac-4cc7-992e-a96190ccc68c";
const vaultName = "sampleVault";
const resourceGroupName = "SampleResourceGroup";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] ||
"SampleResourceGroup";
const resourceGuardProxyName = "swaggerExample";
const parameters: UnlockDeleteRequest = {
resourceGuardOperationRequests: [
@ -43,4 +50,8 @@ async function unlockDeleteResourceGuardProxy() {
console.log(result);
}
unlockDeleteResourceGuardProxy().catch(console.error);
async function main() {
unlockDeleteResourceGuardProxy();
}
main().catch(console.error);

Просмотреть файл

@ -13,6 +13,9 @@ import {
RecoveryServicesBackupClient
} from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Restores the specified backed up data. This is an asynchronous operation. To know the status of this API call, use
@ -20,12 +23,15 @@ GetProtectedItemOperationResult API.
*
* @summary Restores the specified backed up data. This is an asynchronous operation. To know the status of this API call, use
GetProtectedItemOperationResult API.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreRequest.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreRequest.json
*/
async function restoreDisksWithIaasVMRestoreRequest() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "testVault";
const resourceGroupName = "netsdktestrg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "netsdktestrg";
const fabricName = "Azure";
const containerName =
"IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1";
@ -65,20 +71,21 @@ async function restoreDisksWithIaasVMRestoreRequest() {
console.log(result);
}
restoreDisksWithIaasVMRestoreRequest().catch(console.error);
/**
* This sample demonstrates how to Restores the specified backed up data. This is an asynchronous operation. To know the status of this API call, use
GetProtectedItemOperationResult API.
*
* @summary Restores the specified backed up data. This is an asynchronous operation. To know the status of this API call, use
GetProtectedItemOperationResult API.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreRequest_IdentityBasedRestoreDetails.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreRequest_IdentityBasedRestoreDetails.json
*/
async function restoreDisksWithIaasVMRestoreRequestWithIdentityBasedRestoreDetails() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "testVault";
const resourceGroupName = "netsdktestrg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "netsdktestrg";
const fabricName = "Azure";
const containerName =
"IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1";
@ -120,22 +127,21 @@ async function restoreDisksWithIaasVMRestoreRequestWithIdentityBasedRestoreDetai
console.log(result);
}
restoreDisksWithIaasVMRestoreRequestWithIdentityBasedRestoreDetails().catch(
console.error
);
/**
* This sample demonstrates how to Restores the specified backed up data. This is an asynchronous operation. To know the status of this API call, use
GetProtectedItemOperationResult API.
*
* @summary Restores the specified backed up data. This is an asynchronous operation. To know the status of this API call, use
GetProtectedItemOperationResult API.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreWithRehydrationRequest.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreWithRehydrationRequest.json
*/
async function restoreDisksWithIaasVMRestoreWithRehydrationRequest() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "testVault";
const resourceGroupName = "netsdktestrg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "netsdktestrg";
const fabricName = "Azure";
const containerName =
"IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1";
@ -174,20 +180,21 @@ async function restoreDisksWithIaasVMRestoreWithRehydrationRequest() {
console.log(result);
}
restoreDisksWithIaasVMRestoreWithRehydrationRequest().catch(console.error);
/**
* This sample demonstrates how to Restores the specified backed up data. This is an asynchronous operation. To know the status of this API call, use
GetProtectedItemOperationResult API.
*
* @summary Restores the specified backed up data. This is an asynchronous operation. To know the status of this API call, use
GetProtectedItemOperationResult API.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreRequest.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreRequest.json
*/
async function restoreToNewAzureIaasVMWithIaasVMRestoreRequest() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "testVault";
const resourceGroupName = "netsdktestrg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "netsdktestrg";
const fabricName = "Azure";
const containerName =
"IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1";
@ -231,20 +238,21 @@ async function restoreToNewAzureIaasVMWithIaasVMRestoreRequest() {
console.log(result);
}
restoreToNewAzureIaasVMWithIaasVMRestoreRequest().catch(console.error);
/**
* This sample demonstrates how to Restores the specified backed up data. This is an asynchronous operation. To know the status of this API call, use
GetProtectedItemOperationResult API.
*
* @summary Restores the specified backed up data. This is an asynchronous operation. To know the status of this API call, use
GetProtectedItemOperationResult API.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreRequest_IdentityBasedRestoreDetails.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreRequest_IdentityBasedRestoreDetails.json
*/
async function restoreToNewAzureIaasVMWithIaasVMRestoreRequestWithIdentityBasedRestoreDetails() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "testVault";
const resourceGroupName = "netsdktestrg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "netsdktestrg";
const fabricName = "Azure";
const containerName =
"IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1";
@ -290,22 +298,21 @@ async function restoreToNewAzureIaasVMWithIaasVMRestoreRequestWithIdentityBasedR
console.log(result);
}
restoreToNewAzureIaasVMWithIaasVMRestoreRequestWithIdentityBasedRestoreDetails().catch(
console.error
);
/**
* This sample demonstrates how to Restores the specified backed up data. This is an asynchronous operation. To know the status of this API call, use
GetProtectedItemOperationResult API.
*
* @summary Restores the specified backed up data. This is an asynchronous operation. To know the status of this API call, use
GetProtectedItemOperationResult API.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreWithRehydrationRequest.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreWithRehydrationRequest.json
*/
async function restoreToNewAzureIaasVMWithIaasVMRestoreWithRehydrationRequest() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "testVault";
const resourceGroupName = "netsdktestrg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "netsdktestrg";
const fabricName = "Azure";
const containerName =
"IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1";
@ -352,6 +359,13 @@ async function restoreToNewAzureIaasVMWithIaasVMRestoreWithRehydrationRequest()
console.log(result);
}
restoreToNewAzureIaasVMWithIaasVMRestoreWithRehydrationRequest().catch(
console.error
);
async function main() {
restoreDisksWithIaasVMRestoreRequest();
restoreDisksWithIaasVMRestoreRequestWithIdentityBasedRestoreDetails();
restoreDisksWithIaasVMRestoreWithRehydrationRequest();
restoreToNewAzureIaasVMWithIaasVMRestoreRequest();
restoreToNewAzureIaasVMWithIaasVMRestoreRequestWithIdentityBasedRestoreDetails();
restoreToNewAzureIaasVMWithIaasVMRestoreWithRehydrationRequest();
}
main().catch(console.error);

Просмотреть файл

@ -10,21 +10,31 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Get the security PIN.
*
* @summary Get the security PIN.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/BackupSecurityPin_Get.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/BackupSecurityPin_Get.json
*/
async function getVaultSecurityPin() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "SwaggerTest";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
const result = await client.securityPINs.get(vaultName, resourceGroupName);
console.log(result);
}
getVaultSecurityPin().catch(console.error);
async function main() {
getVaultSecurityPin();
}
main().catch(console.error);

Просмотреть файл

@ -10,17 +10,23 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Fetches the result of a triggered validate operation.
*
* @summary Fetches the result of a triggered validate operation.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/ValidateOperationResults.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/ValidateOperationResults.json
*/
async function getOperationResultsOfValidateOperation() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const operationId = "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
@ -32,4 +38,8 @@ async function getOperationResultsOfValidateOperation() {
console.log(result);
}
getOperationResultsOfValidateOperation().catch(console.error);
async function main() {
getOperationResultsOfValidateOperation();
}
main().catch(console.error);

Просмотреть файл

@ -10,6 +10,9 @@
// Licensed under the MIT License.
import { RecoveryServicesBackupClient } from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Fetches the status of a triggered validate operation. The status can be in progress, completed
@ -19,12 +22,15 @@ If operation has completed, this method returns the list of errors obtained whil
* @summary Fetches the status of a triggered validate operation. The status can be in progress, completed
or failed. You can refer to the OperationStatus enum for all the possible states of the operation.
If operation has completed, this method returns the list of errors obtained while validating the operation.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/ValidateOperationStatus.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/ValidateOperationStatus.json
*/
async function getOperationStatusOfValidateOperation() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const operationId = "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
@ -36,4 +42,8 @@ async function getOperationStatusOfValidateOperation() {
console.log(result);
}
getOperationStatusOfValidateOperation().catch(console.error);
async function main() {
getOperationStatusOfValidateOperation();
}
main().catch(console.error);

Просмотреть файл

@ -13,17 +13,23 @@ import {
RecoveryServicesBackupClient
} from "@azure/arm-recoveryservicesbackup";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Validate operation for specified backed up item in the form of an asynchronous operation. Returns tracking headers which can be tracked using GetValidateOperationResult API.
*
* @summary Validate operation for specified backed up item in the form of an asynchronous operation. Returns tracking headers which can be tracked using GetValidateOperationResult API.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/TriggerValidateOperation_RestoreDisk.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/TriggerValidateOperation_RestoreDisk.json
*/
async function triggerValidateOperation() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const vaultName = "testVault";
const resourceGroupName = "testRG";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "testRG";
const parameters: ValidateIaasVMRestoreOperationRequest = {
objectType: "ValidateIaasVMRestoreOperationRequest",
restoreRequest: {
@ -55,4 +61,8 @@ async function triggerValidateOperation() {
console.log(result);
}
triggerValidateOperation().catch(console.error);
async function main() {
triggerValidateOperation();
}
main().catch(console.error);

Просмотреть файл

@ -4,82 +4,83 @@ These sample programs show how to use the JavaScript client libraries for in som
| **File Name** | **Description** |
| ------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [backupEnginesGetSample.js][backupenginesgetsample] | Returns backup management server registered to Recovery Services Vault. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Dpm/BackupEngines_Get.json |
| [backupEnginesListSample.js][backupengineslistsample] | Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Dpm/BackupEngines_List.json |
| [backupJobsListSample.js][backupjobslistsample] | Provides a pageable list of jobs. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/ListJobs.json |
| [backupOperationResultsGetSample.js][backupoperationresultsgetsample] | Provides the status of the delete operations such as deleting backed up item. Once the operation has started, the status code in the response would be Accepted. It will continue to be in this state till it reaches completion. On successful completion, the status code will be OK. This method expects OperationID as an argument. OperationID is part of the Location header of the operation response. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/ProtectedItem_Delete_OperationResult.json |
| [backupOperationStatusesGetSample.js][backupoperationstatusesgetsample] | Fetches the status of an operation such as triggering a backup, restore. The status can be in progress, completed or failed. You can refer to the OperationStatus enum for all the possible states of an operation. Some operations create jobs. This method returns the list of jobs when the operation is complete. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/ProtectedItem_Delete_OperationStatus.json |
| [backupPoliciesListSample.js][backuppolicieslistsample] | Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch scoped results. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/BackupPolicies_List.json |
| [backupProtectableItemsListSample.js][backupprotectableitemslistsample] | Provides a pageable list of protectable objects within your subscription according to the query filter and the pagination parameters. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/BackupProtectableItems_List.json |
| [backupProtectedItemsListSample.js][backupprotecteditemslistsample] | Provides a pageable list of all items that are backed up within a vault. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/BackupProtectedItems_List.json |
| [backupProtectionContainersListSample.js][backupprotectioncontainerslistsample] | Lists the containers registered to Recovery Services Vault. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureStorage/ProtectionContainers_List.json |
| [backupProtectionIntentListSample.js][backupprotectionintentlistsample] | Provides a pageable list of all intents that are present within a vault. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureWorkload/BackupProtectionIntent_List.json |
| [backupResourceEncryptionConfigsGetSample.js][backupresourceencryptionconfigsgetsample] | Fetches Vault Encryption config. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/BackupResourceEncryptionConfig_Get.json |
| [backupResourceEncryptionConfigsUpdateSample.js][backupresourceencryptionconfigsupdatesample] | Updates Vault encryption config. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/BackupResourceEncryptionConfig_Put.json |
| [backupResourceStorageConfigsNonCrrGetSample.js][backupresourcestorageconfigsnoncrrgetsample] | Fetches resource storage config. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/BackupStorageConfig_Get.json |
| [backupResourceStorageConfigsNonCrrPatchSample.js][backupresourcestorageconfigsnoncrrpatchsample] | Updates vault storage model type. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/BackupStorageConfig_Patch.json |
| [backupResourceStorageConfigsNonCrrUpdateSample.js][backupresourcestorageconfigsnoncrrupdatesample] | Updates vault storage model type. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/BackupStorageConfig_Put.json |
| [backupResourceVaultConfigsGetSample.js][backupresourcevaultconfigsgetsample] | Fetches resource vault config. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/BackupResourceVaultConfigs_Get.json |
| [backupResourceVaultConfigsPutSample.js][backupresourcevaultconfigsputsample] | Updates vault security config. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/BackupResourceVaultConfigs_Put.json |
| [backupResourceVaultConfigsUpdateSample.js][backupresourcevaultconfigsupdatesample] | Updates vault security config. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/BackupResourceVaultConfigs_Patch.json |
| [backupStatusGetSample.js][backupstatusgetsample] | Get the container backup status x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/GetBackupStatus.json |
| [backupUsageSummariesListSample.js][backupusagesummarieslistsample] | Fetches the backup management usage summaries of the vault. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/BackupProtectionContainers_UsageSummary_Get.json |
| [backupWorkloadItemsListSample.js][backupworkloaditemslistsample] | Provides a pageable list of workload item of a specific container according to the query filter and the pagination parameters. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureWorkload/BackupWorkloadItems_List.json |
| [backupsTriggerSample.js][backupstriggersample] | Triggers backup for specified backed up item. This is an asynchronous operation. To know the status of the operation, call GetProtectedItemOperationResult API. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/TriggerBackup_Post.json |
| [bmsPrepareDataMoveOperationResultGetSample.js][bmspreparedatamoveoperationresultgetsample] | Fetches Operation Result for Prepare Data Move x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/BackupDataMove/PrepareDataMoveOperationResult_Get.json |
| [bmsPrepareDataMoveSample.js][bmspreparedatamovesample] | Prepares source vault for Data Move operation x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/BackupDataMove/PrepareDataMove_Post.json |
| [bmsTriggerDataMoveSample.js][bmstriggerdatamovesample] | Triggers Data Move Operation on target vault x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/BackupDataMove/TriggerDataMove_Post.json |
| [exportJobsOperationResultsGetSample.js][exportjobsoperationresultsgetsample] | Gets the operation result of operation triggered by Export Jobs API. If the operation is successful, then it also contains URL of a Blob and a SAS key to access the same. The blob contains exported jobs in JSON serialized format. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/ExportJobsOperationResult.json |
| [featureSupportValidateSample.js][featuresupportvalidatesample] | It will validate if given feature with resource properties is supported in service x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/BackupFeature_Validate.json |
| [getOperationStatusSample.js][getoperationstatussample] | Fetches operation status for data move operation on vault x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/BackupDataMove/BackupDataMoveOperationStatus_Get.json |
| [itemLevelRecoveryConnectionsProvisionSample.js][itemlevelrecoveryconnectionsprovisionsample] | Provisions a script which invokes an iSCSI connection to the backup data. Executing this script opens a file explorer displaying all the recoverable files and folders. This is an asynchronous operation. To know the status of provisioning, call GetProtectedItemOperationResult API. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/Provision_Ilr.json |
| [itemLevelRecoveryConnectionsRevokeSample.js][itemlevelrecoveryconnectionsrevokesample] | Revokes an iSCSI connection which can be used to download a script. Executing this script opens a file explorer displaying all recoverable files and folders. This is an asynchronous operation. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/Revoke_Ilr.json |
| [jobCancellationsTriggerSample.js][jobcancellationstriggersample] | Cancels a job. This is an asynchronous operation. To know the status of the cancellation, call GetCancelOperationResult API. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/TriggerCancelJob.json |
| [jobDetailsGetSample.js][jobdetailsgetsample] | Gets extended information associated with the job. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/GetJobDetails.json |
| [jobOperationResultsGetSample.js][joboperationresultsgetsample] | Fetches the result of any operation. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/CancelJobOperationResult.json |
| [jobsExportSample.js][jobsexportsample] | Triggers export of jobs specified by filters and returns an OperationID to track. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/TriggerExportJobs.json |
| [moveRecoveryPointSample.js][moverecoverypointsample] | Move recovery point from one datastore to another store. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/TriggerRecoveryPointMove_Post.json |
| [operationValidateSample.js][operationvalidatesample] | Validate operation for specified backed up item. This is a synchronous operation. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/ValidateOperation_RestoreDisk.json |
| [operationsListSample.js][operationslistsample] | Returns the list of available operations. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/ListOperations.json |
| [privateEndpointConnectionDeleteSample.js][privateendpointconnectiondeletesample] | Delete Private Endpoint requests. This call is made by Backup Admin. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/PrivateEndpointConnection/DeletePrivateEndpointConnection.json |
| [privateEndpointConnectionGetSample.js][privateendpointconnectiongetsample] | Get Private Endpoint Connection. This call is made by Backup Admin. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/PrivateEndpointConnection/GetPrivateEndpointConnection.json |
| [privateEndpointConnectionPutSample.js][privateendpointconnectionputsample] | Approve or Reject Private Endpoint requests. This call is made by Backup Admin. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/PrivateEndpointConnection/PutPrivateEndpointConnection.json |
| [privateEndpointGetOperationStatusSample.js][privateendpointgetoperationstatussample] | Gets the operation status for a private endpoint connection. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/PrivateEndpointConnection/GetPrivateEndpointConnectionOperationStatus.json |
| [protectableContainersListSample.js][protectablecontainerslistsample] | Lists the containers that can be registered to Recovery Services Vault. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureStorage/ProtectableContainers_List.json |
| [protectedItemOperationResultsGetSample.js][protecteditemoperationresultsgetsample] | Fetches the result of any operation on the backup item. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/ProtectedItemOperationResults.json |
| [protectedItemOperationStatusesGetSample.js][protecteditemoperationstatusesgetsample] | Fetches the status of an operation such as triggering a backup, restore. The status can be in progress, completed or failed. You can refer to the OperationStatus enum for all the possible states of the operation. Some operations create jobs. This method returns the list of jobs associated with the operation. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/ProtectedItemOperationStatus.json |
| [protectedItemsCreateOrUpdateSample.js][protecteditemscreateorupdatesample] | Enables backup of an item or to modifies the backup policy information of an already backed up item. This is an asynchronous operation. To know the status of the operation, call the GetItemOperationResult API. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/ConfigureProtection.json |
| [protectedItemsDeleteSample.js][protecteditemsdeletesample] | Used to disable backup of an item within a container. This is an asynchronous operation. To know the status of the request, call the GetItemOperationResult API. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/ProtectedItem_Delete.json |
| [protectedItemsGetSample.js][protecteditemsgetsample] | Provides the details of the backed up item. This is an asynchronous operation. To know the status of the operation, call the GetItemOperationResult API. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/ClassicCompute_ProtectedItem_Get.json |
| [protectionContainerOperationResultsGetSample.js][protectioncontaineroperationresultsgetsample] | Fetches the result of any operation on the container. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureStorage/ProtectionContainers_Inquire_Result.json |
| [protectionContainerRefreshOperationResultsGetSample.js][protectioncontainerrefreshoperationresultsgetsample] | Provides the result of the refresh operation triggered by the BeginRefresh operation. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/RefreshContainers_OperationResults.json |
| [protectionContainersGetSample.js][protectioncontainersgetsample] | Gets details of the specific container registered to your Recovery Services Vault. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureWorkload/ProtectionContainers_Get.json |
| [protectionContainersInquireSample.js][protectioncontainersinquiresample] | This is an async operation and the results should be tracked using location header or Azure-async-url. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureStorage/ProtectionContainers_Inquire.json |
| [protectionContainersRefreshSample.js][protectioncontainersrefreshsample] | Discovers all the containers in the subscription that can be backed up to Recovery Services Vault. This is an asynchronous operation. To know the status of the operation, call GetRefreshOperationResult API. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/RefreshContainers.json |
| [protectionContainersRegisterSample.js][protectioncontainersregistersample] | Registers the container with Recovery Services vault. This is an asynchronous operation. To track the operation status, use location header to call get latest status of the operation. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureStorage/ProtectionContainers_Register.json |
| [protectionContainersUnregisterSample.js][protectioncontainersunregistersample] | Unregisters the given container from your Recovery Services Vault. This is an asynchronous operation. To determine whether the backend service has finished processing the request, call Get Container Operation Result API. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureWorkload/ProtectionContainers_Unregister.json |
| [protectionIntentCreateOrUpdateSample.js][protectionintentcreateorupdatesample] | Create Intent for Enabling backup of an item. This is a synchronous operation. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/ProtectionIntent_CreateOrUpdate.json |
| [protectionIntentDeleteSample.js][protectionintentdeletesample] | Used to remove intent from an item x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureWorkload/BackupProtectionIntent_Delete.json |
| [protectionIntentGetSample.js][protectionintentgetsample] | Provides the details of the protection intent up item. This is an asynchronous operation. To know the status of the operation, call the GetItemOperationResult API. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureWorkload/BackupProtectionIntent_Get.json |
| [protectionIntentValidateSample.js][protectionintentvalidatesample] | It will validate followings 1. Vault capacity 2. VM is already protected 3. Any VM related configuration passed in properties. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/ProtectionIntent_Validate.json |
| [protectionPoliciesCreateOrUpdateSample.js][protectionpoliciescreateorupdatesample] | Creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can be fetched using GetPolicyOperationResult API. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureStorage/ProtectionPolicies_CreateOrUpdate_Daily.json |
| [protectionPoliciesDeleteSample.js][protectionpoliciesdeletesample] | Deletes specified backup policy from your Recovery Services Vault. This is an asynchronous operation. Status of the operation can be fetched using GetProtectionPolicyOperationResult API. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/ProtectionPolicies_Delete.json |
| [protectionPoliciesGetSample.js][protectionpoliciesgetsample] | Provides the details of the backup policies associated to Recovery Services Vault. This is an asynchronous operation. Status of the operation can be fetched using GetPolicyOperationResult API. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/V2Policy/v2-Get-Policy.json |
| [protectionPolicyOperationResultsGetSample.js][protectionpolicyoperationresultsgetsample] | Provides the result of an operation. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/ProtectionPolicyOperationResults_Get.json |
| [protectionPolicyOperationStatusesGetSample.js][protectionpolicyoperationstatusesgetsample] | Provides the status of the asynchronous operations like backup, restore. The status can be in progress, completed or failed. You can refer to the Operation Status enum for all the possible states of an operation. Some operations create jobs. This method returns the list of jobs associated with operation. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/ProtectionPolicyOperationStatuses_Get.json |
| [recoveryPointsGetSample.js][recoverypointsgetsample] | Provides the information of the backed up data identified using RecoveryPointID. This is an asynchronous operation. To know the status of the operation, call the GetProtectedItemOperationResult API. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/RecoveryPoints_Get.json |
| [recoveryPointsListSample.js][recoverypointslistsample] | Lists the backup copies for the backed up item. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/RecoveryPoints_List.json |
| [recoveryPointsRecommendedForMoveListSample.js][recoverypointsrecommendedformovelistsample] | Lists the recovery points recommended for move to another tier x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/RecoveryPointsRecommendedForMove_List.json |
| [resourceGuardProxiesGetSample.js][resourceguardproxiesgetsample] | List the ResourceGuardProxies under vault x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/ResourceGuardProxyCRUD/ListResourceGuardProxy.json |
| [resourceGuardProxyDeleteSample.js][resourceguardproxydeletesample] | Delete ResourceGuardProxy under vault x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/ResourceGuardProxyCRUD/DeleteResourceGuardProxy.json |
| [resourceGuardProxyGetSample.js][resourceguardproxygetsample] | Returns ResourceGuardProxy under vault and with the name referenced in request x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/ResourceGuardProxyCRUD/GetResourceGuardProxy.json |
| [resourceGuardProxyPutSample.js][resourceguardproxyputsample] | Add or Update ResourceGuardProxy under vault Secures vault critical operations x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/ResourceGuardProxyCRUD/PutResourceGuardProxy.json |
| [resourceGuardProxyUnlockDeleteSample.js][resourceguardproxyunlockdeletesample] | Secures delete ResourceGuardProxy operations. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/ResourceGuardProxyCRUD/UnlockDeleteResourceGuardProxy.json |
| [restoresTriggerSample.js][restorestriggersample] | Restores the specified backed up data. This is an asynchronous operation. To know the status of this API call, use GetProtectedItemOperationResult API. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreRequest.json |
| [securityPiNsGetSample.js][securitypinsgetsample] | Get the security PIN. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/BackupSecurityPin_Get.json |
| [validateOperationResultsGetSample.js][validateoperationresultsgetsample] | Fetches the result of a triggered validate operation. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/ValidateOperationResults.json |
| [validateOperationStatusesGetSample.js][validateoperationstatusesgetsample] | Fetches the status of a triggered validate operation. The status can be in progress, completed or failed. You can refer to the OperationStatus enum for all the possible states of the operation. If operation has completed, this method returns the list of errors obtained while validating the operation. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/ValidateOperationStatus.json |
| [validateOperationTriggerSample.js][validateoperationtriggersample] | Validate operation for specified backed up item in the form of an asynchronous operation. Returns tracking headers which can be tracked using GetValidateOperationResult API. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/TriggerValidateOperation_RestoreDisk.json |
| [backupEnginesGetSample.js][backupenginesgetsample] | Returns backup management server registered to Recovery Services Vault. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Dpm/BackupEngines_Get.json |
| [backupEnginesListSample.js][backupengineslistsample] | Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Dpm/BackupEngines_List.json |
| [backupJobsListSample.js][backupjobslistsample] | Provides a pageable list of jobs. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/ListJobs.json |
| [backupOperationResultsGetSample.js][backupoperationresultsgetsample] | Provides the status of the delete operations such as deleting backed up item. Once the operation has started, the status code in the response would be Accepted. It will continue to be in this state till it reaches completion. On successful completion, the status code will be OK. This method expects OperationID as an argument. OperationID is part of the Location header of the operation response. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/ProtectedItem_Delete_OperationResult.json |
| [backupOperationStatusesGetSample.js][backupoperationstatusesgetsample] | Fetches the status of an operation such as triggering a backup, restore. The status can be in progress, completed or failed. You can refer to the OperationStatus enum for all the possible states of an operation. Some operations create jobs. This method returns the list of jobs when the operation is complete. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/ProtectedItem_Delete_OperationStatus.json |
| [backupPoliciesListSample.js][backuppolicieslistsample] | Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch scoped results. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/BackupPolicies_List.json |
| [backupProtectableItemsListSample.js][backupprotectableitemslistsample] | Provides a pageable list of protectable objects within your subscription according to the query filter and the pagination parameters. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/BackupProtectableItems_List.json |
| [backupProtectedItemsListSample.js][backupprotecteditemslistsample] | Provides a pageable list of all items that are backed up within a vault. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/BackupProtectedItems_List.json |
| [backupProtectionContainersListSample.js][backupprotectioncontainerslistsample] | Lists the containers registered to Recovery Services Vault. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureStorage/ProtectionContainers_List.json |
| [backupProtectionIntentListSample.js][backupprotectionintentlistsample] | Provides a pageable list of all intents that are present within a vault. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureWorkload/BackupProtectionIntent_List.json |
| [backupResourceEncryptionConfigsGetSample.js][backupresourceencryptionconfigsgetsample] | Fetches Vault Encryption config. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/BackupResourceEncryptionConfig_Get.json |
| [backupResourceEncryptionConfigsUpdateSample.js][backupresourceencryptionconfigsupdatesample] | Updates Vault encryption config. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/BackupResourceEncryptionConfig_Put.json |
| [backupResourceStorageConfigsNonCrrGetSample.js][backupresourcestorageconfigsnoncrrgetsample] | Fetches resource storage config. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/BackupStorageConfig_Get.json |
| [backupResourceStorageConfigsNonCrrPatchSample.js][backupresourcestorageconfigsnoncrrpatchsample] | Updates vault storage model type. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/BackupStorageConfig_Patch.json |
| [backupResourceStorageConfigsNonCrrUpdateSample.js][backupresourcestorageconfigsnoncrrupdatesample] | Updates vault storage model type. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/BackupStorageConfig_Put.json |
| [backupResourceVaultConfigsGetSample.js][backupresourcevaultconfigsgetsample] | Fetches resource vault config. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/BackupResourceVaultConfigs_Get.json |
| [backupResourceVaultConfigsPutSample.js][backupresourcevaultconfigsputsample] | Updates vault security config. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/BackupResourceVaultConfigs_Put.json |
| [backupResourceVaultConfigsUpdateSample.js][backupresourcevaultconfigsupdatesample] | Updates vault security config. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/BackupResourceVaultConfigs_Patch.json |
| [backupStatusGetSample.js][backupstatusgetsample] | Get the container backup status x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/GetBackupStatus.json |
| [backupUsageSummariesListSample.js][backupusagesummarieslistsample] | Fetches the backup management usage summaries of the vault. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/BackupProtectionContainers_UsageSummary_Get.json |
| [backupWorkloadItemsListSample.js][backupworkloaditemslistsample] | Provides a pageable list of workload item of a specific container according to the query filter and the pagination parameters. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureWorkload/BackupWorkloadItems_List.json |
| [backupsTriggerSample.js][backupstriggersample] | Triggers backup for specified backed up item. This is an asynchronous operation. To know the status of the operation, call GetProtectedItemOperationResult API. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/TriggerBackup_Post.json |
| [bmsPrepareDataMoveOperationResultGetSample.js][bmspreparedatamoveoperationresultgetsample] | Fetches Operation Result for Prepare Data Move x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/BackupDataMove/PrepareDataMoveOperationResult_Get.json |
| [bmsPrepareDataMoveSample.js][bmspreparedatamovesample] | Prepares source vault for Data Move operation x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/BackupDataMove/PrepareDataMove_Post.json |
| [bmsTriggerDataMoveSample.js][bmstriggerdatamovesample] | Triggers Data Move Operation on target vault x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/BackupDataMove/TriggerDataMove_Post.json |
| [deletedProtectionContainersListSample.js][deletedprotectioncontainerslistsample] | Lists the soft deleted containers registered to Recovery Services Vault. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureStorage/SoftDeletedContainers_List.json |
| [exportJobsOperationResultsGetSample.js][exportjobsoperationresultsgetsample] | Gets the operation result of operation triggered by Export Jobs API. If the operation is successful, then it also contains URL of a Blob and a SAS key to access the same. The blob contains exported jobs in JSON serialized format. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/ExportJobsOperationResult.json |
| [featureSupportValidateSample.js][featuresupportvalidatesample] | It will validate if given feature with resource properties is supported in service x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/BackupFeature_Validate.json |
| [getOperationStatusSample.js][getoperationstatussample] | Fetches operation status for data move operation on vault x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/BackupDataMove/BackupDataMoveOperationStatus_Get.json |
| [itemLevelRecoveryConnectionsProvisionSample.js][itemlevelrecoveryconnectionsprovisionsample] | Provisions a script which invokes an iSCSI connection to the backup data. Executing this script opens a file explorer displaying all the recoverable files and folders. This is an asynchronous operation. To know the status of provisioning, call GetProtectedItemOperationResult API. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/Provision_Ilr.json |
| [itemLevelRecoveryConnectionsRevokeSample.js][itemlevelrecoveryconnectionsrevokesample] | Revokes an iSCSI connection which can be used to download a script. Executing this script opens a file explorer displaying all recoverable files and folders. This is an asynchronous operation. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/Revoke_Ilr.json |
| [jobCancellationsTriggerSample.js][jobcancellationstriggersample] | Cancels a job. This is an asynchronous operation. To know the status of the cancellation, call GetCancelOperationResult API. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/TriggerCancelJob.json |
| [jobDetailsGetSample.js][jobdetailsgetsample] | Gets extended information associated with the job. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/GetJobDetails.json |
| [jobOperationResultsGetSample.js][joboperationresultsgetsample] | Fetches the result of any operation. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/CancelJobOperationResult.json |
| [jobsExportSample.js][jobsexportsample] | Triggers export of jobs specified by filters and returns an OperationID to track. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/TriggerExportJobs.json |
| [moveRecoveryPointSample.js][moverecoverypointsample] | Move recovery point from one datastore to another store. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/TriggerRecoveryPointMove_Post.json |
| [operationValidateSample.js][operationvalidatesample] | Validate operation for specified backed up item. This is a synchronous operation. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/ValidateOperation_RestoreDisk.json |
| [operationsListSample.js][operationslistsample] | Returns the list of available operations. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/ListOperations.json |
| [privateEndpointConnectionDeleteSample.js][privateendpointconnectiondeletesample] | Delete Private Endpoint requests. This call is made by Backup Admin. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/PrivateEndpointConnection/DeletePrivateEndpointConnection.json |
| [privateEndpointConnectionGetSample.js][privateendpointconnectiongetsample] | Get Private Endpoint Connection. This call is made by Backup Admin. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/PrivateEndpointConnection/GetPrivateEndpointConnection.json |
| [privateEndpointConnectionPutSample.js][privateendpointconnectionputsample] | Approve or Reject Private Endpoint requests. This call is made by Backup Admin. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/PrivateEndpointConnection/PutPrivateEndpointConnection.json |
| [privateEndpointGetOperationStatusSample.js][privateendpointgetoperationstatussample] | Gets the operation status for a private endpoint connection. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/PrivateEndpointConnection/GetPrivateEndpointConnectionOperationStatus.json |
| [protectableContainersListSample.js][protectablecontainerslistsample] | Lists the containers that can be registered to Recovery Services Vault. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureStorage/ProtectableContainers_List.json |
| [protectedItemOperationResultsGetSample.js][protecteditemoperationresultsgetsample] | Fetches the result of any operation on the backup item. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/ProtectedItemOperationResults.json |
| [protectedItemOperationStatusesGetSample.js][protecteditemoperationstatusesgetsample] | Fetches the status of an operation such as triggering a backup, restore. The status can be in progress, completed or failed. You can refer to the OperationStatus enum for all the possible states of the operation. Some operations create jobs. This method returns the list of jobs associated with the operation. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/ProtectedItemOperationStatus.json |
| [protectedItemsCreateOrUpdateSample.js][protecteditemscreateorupdatesample] | Enables backup of an item or to modifies the backup policy information of an already backed up item. This is an asynchronous operation. To know the status of the operation, call the GetItemOperationResult API. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/ConfigureProtection.json |
| [protectedItemsDeleteSample.js][protecteditemsdeletesample] | Used to disable backup of an item within a container. This is an asynchronous operation. To know the status of the request, call the GetItemOperationResult API. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/ProtectedItem_Delete.json |
| [protectedItemsGetSample.js][protecteditemsgetsample] | Provides the details of the backed up item. This is an asynchronous operation. To know the status of the operation, call the GetItemOperationResult API. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/ClassicCompute_ProtectedItem_Get.json |
| [protectionContainerOperationResultsGetSample.js][protectioncontaineroperationresultsgetsample] | Fetches the result of any operation on the container. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureStorage/ProtectionContainers_Inquire_Result.json |
| [protectionContainerRefreshOperationResultsGetSample.js][protectioncontainerrefreshoperationresultsgetsample] | Provides the result of the refresh operation triggered by the BeginRefresh operation. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/RefreshContainers_OperationResults.json |
| [protectionContainersGetSample.js][protectioncontainersgetsample] | Gets details of the specific container registered to your Recovery Services Vault. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureWorkload/ProtectionContainers_Get.json |
| [protectionContainersInquireSample.js][protectioncontainersinquiresample] | This is an async operation and the results should be tracked using location header or Azure-async-url. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureStorage/ProtectionContainers_Inquire.json |
| [protectionContainersRefreshSample.js][protectioncontainersrefreshsample] | Discovers all the containers in the subscription that can be backed up to Recovery Services Vault. This is an asynchronous operation. To know the status of the operation, call GetRefreshOperationResult API. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/RefreshContainers.json |
| [protectionContainersRegisterSample.js][protectioncontainersregistersample] | Registers the container with Recovery Services vault. This is an asynchronous operation. To track the operation status, use location header to call get latest status of the operation. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureStorage/ProtectionContainers_Register.json |
| [protectionContainersUnregisterSample.js][protectioncontainersunregistersample] | Unregisters the given container from your Recovery Services Vault. This is an asynchronous operation. To determine whether the backend service has finished processing the request, call Get Container Operation Result API. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureWorkload/ProtectionContainers_Unregister.json |
| [protectionIntentCreateOrUpdateSample.js][protectionintentcreateorupdatesample] | Create Intent for Enabling backup of an item. This is a synchronous operation. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/ProtectionIntent_CreateOrUpdate.json |
| [protectionIntentDeleteSample.js][protectionintentdeletesample] | Used to remove intent from an item x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureWorkload/BackupProtectionIntent_Delete.json |
| [protectionIntentGetSample.js][protectionintentgetsample] | Provides the details of the protection intent up item. This is an asynchronous operation. To know the status of the operation, call the GetItemOperationResult API. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureWorkload/BackupProtectionIntent_Get.json |
| [protectionIntentValidateSample.js][protectionintentvalidatesample] | It will validate followings 1. Vault capacity 2. VM is already protected 3. Any VM related configuration passed in properties. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/ProtectionIntent_Validate.json |
| [protectionPoliciesCreateOrUpdateSample.js][protectionpoliciescreateorupdatesample] | Creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can be fetched using GetPolicyOperationResult API. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureStorage/ProtectionPolicies_CreateOrUpdate_Daily.json |
| [protectionPoliciesDeleteSample.js][protectionpoliciesdeletesample] | Deletes specified backup policy from your Recovery Services Vault. This is an asynchronous operation. Status of the operation can be fetched using GetProtectionPolicyOperationResult API. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/ProtectionPolicies_Delete.json |
| [protectionPoliciesGetSample.js][protectionpoliciesgetsample] | Provides the details of the backup policies associated to Recovery Services Vault. This is an asynchronous operation. Status of the operation can be fetched using GetPolicyOperationResult API. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/V2Policy/v2-Get-Policy.json |
| [protectionPolicyOperationResultsGetSample.js][protectionpolicyoperationresultsgetsample] | Provides the result of an operation. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/ProtectionPolicyOperationResults_Get.json |
| [protectionPolicyOperationStatusesGetSample.js][protectionpolicyoperationstatusesgetsample] | Provides the status of the asynchronous operations like backup, restore. The status can be in progress, completed or failed. You can refer to the Operation Status enum for all the possible states of an operation. Some operations create jobs. This method returns the list of jobs associated with operation. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/ProtectionPolicyOperationStatuses_Get.json |
| [recoveryPointsGetSample.js][recoverypointsgetsample] | Provides the information of the backed up data identified using RecoveryPointID. This is an asynchronous operation. To know the status of the operation, call the GetProtectedItemOperationResult API. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/RecoveryPoints_Get.json |
| [recoveryPointsListSample.js][recoverypointslistsample] | Lists the backup copies for the backed up item. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/RecoveryPoints_List.json |
| [recoveryPointsRecommendedForMoveListSample.js][recoverypointsrecommendedformovelistsample] | Lists the recovery points recommended for move to another tier x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/RecoveryPointsRecommendedForMove_List.json |
| [resourceGuardProxiesGetSample.js][resourceguardproxiesgetsample] | List the ResourceGuardProxies under vault x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/ResourceGuardProxyCRUD/ListResourceGuardProxy.json |
| [resourceGuardProxyDeleteSample.js][resourceguardproxydeletesample] | Delete ResourceGuardProxy under vault x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/ResourceGuardProxyCRUD/DeleteResourceGuardProxy.json |
| [resourceGuardProxyGetSample.js][resourceguardproxygetsample] | Returns ResourceGuardProxy under vault and with the name referenced in request x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/ResourceGuardProxyCRUD/GetResourceGuardProxy.json |
| [resourceGuardProxyPutSample.js][resourceguardproxyputsample] | Add or Update ResourceGuardProxy under vault Secures vault critical operations x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/ResourceGuardProxyCRUD/PutResourceGuardProxy.json |
| [resourceGuardProxyUnlockDeleteSample.js][resourceguardproxyunlockdeletesample] | Secures delete ResourceGuardProxy operations. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/ResourceGuardProxyCRUD/UnlockDeleteResourceGuardProxy.json |
| [restoresTriggerSample.js][restorestriggersample] | Restores the specified backed up data. This is an asynchronous operation. To know the status of this API call, use GetProtectedItemOperationResult API. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreRequest.json |
| [securityPiNsGetSample.js][securitypinsgetsample] | Get the security PIN. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/BackupSecurityPin_Get.json |
| [validateOperationResultsGetSample.js][validateoperationresultsgetsample] | Fetches the result of a triggered validate operation. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/ValidateOperationResults.json |
| [validateOperationStatusesGetSample.js][validateoperationstatusesgetsample] | Fetches the status of a triggered validate operation. The status can be in progress, completed or failed. You can refer to the OperationStatus enum for all the possible states of the operation. If operation has completed, this method returns the list of errors obtained while validating the operation. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/ValidateOperationStatus.json |
| [validateOperationTriggerSample.js][validateoperationtriggersample] | Validate operation for specified backed up item in the form of an asynchronous operation. Returns tracking headers which can be tracked using GetValidateOperationResult API. x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/TriggerValidateOperation_RestoreDisk.json |
## Prerequisites
@ -112,7 +113,7 @@ node backupEnginesGetSample.js
Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform):
```bash
npx cross-env node backupEnginesGetSample.js
npx cross-env RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID="<recoveryservicesbackup subscription id>" RECOVERYSERVICESBACKUP_RESOURCE_GROUP="<recoveryservicesbackup resource group>" node backupEnginesGetSample.js
```
## Next Steps
@ -144,6 +145,7 @@ Take a look at our [API Documentation][apiref] for more information about the AP
[bmspreparedatamoveoperationresultgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/samples/v10/javascript/bmsPrepareDataMoveOperationResultGetSample.js
[bmspreparedatamovesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/samples/v10/javascript/bmsPrepareDataMoveSample.js
[bmstriggerdatamovesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/samples/v10/javascript/bmsTriggerDataMoveSample.js
[deletedprotectioncontainerslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/samples/v10/javascript/deletedProtectionContainersListSample.js
[exportjobsoperationresultsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/samples/v10/javascript/exportJobsOperationResultsGetSample.js
[featuresupportvalidatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/samples/v10/javascript/featureSupportValidateSample.js
[getoperationstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/samples/v10/javascript/getOperationStatusSample.js

Просмотреть файл

@ -10,17 +10,19 @@
// Licensed under the MIT License.
const { RecoveryServicesBackupClient } = require("@azure/arm-recoveryservicesbackup");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Returns backup management server registered to Recovery Services Vault.
*
* @summary Returns backup management server registered to Recovery Services Vault.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Dpm/BackupEngines_Get.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Dpm/BackupEngines_Get.json
*/
async function getDpmOrAzureBackupServerOrLajollaBackupEngineDetails() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const vaultName = "testVault";
const resourceGroupName = "testRG";
const resourceGroupName = process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "testRG";
const backupEngineName = "testServer";
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
@ -28,4 +30,8 @@ async function getDpmOrAzureBackupServerOrLajollaBackupEngineDetails() {
console.log(result);
}
getDpmOrAzureBackupServerOrLajollaBackupEngineDetails().catch(console.error);
async function main() {
getDpmOrAzureBackupServerOrLajollaBackupEngineDetails();
}
main().catch(console.error);

Просмотреть файл

@ -10,17 +10,19 @@
// Licensed under the MIT License.
const { RecoveryServicesBackupClient } = require("@azure/arm-recoveryservicesbackup");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers.
*
* @summary Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Dpm/BackupEngines_List.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Dpm/BackupEngines_List.json
*/
async function listDpmOrAzureBackupServerOrLajollaBackupEngines() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const vaultName = "testVault";
const resourceGroupName = "testRG";
const resourceGroupName = process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "testRG";
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
const resArray = new Array();
@ -30,4 +32,8 @@ async function listDpmOrAzureBackupServerOrLajollaBackupEngines() {
console.log(resArray);
}
listDpmOrAzureBackupServerOrLajollaBackupEngines().catch(console.error);
async function main() {
listDpmOrAzureBackupServerOrLajollaBackupEngines();
}
main().catch(console.error);

Просмотреть файл

@ -10,17 +10,19 @@
// Licensed under the MIT License.
const { RecoveryServicesBackupClient } = require("@azure/arm-recoveryservicesbackup");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Provides a pageable list of jobs.
*
* @summary Provides a pageable list of jobs.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/ListJobs.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/ListJobs.json
*/
async function listAllJobs() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName = process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
const resArray = new Array();
@ -30,18 +32,17 @@ async function listAllJobs() {
console.log(resArray);
}
listAllJobs().catch(console.error);
/**
* This sample demonstrates how to Provides a pageable list of jobs.
*
* @summary Provides a pageable list of jobs.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/ListJobsWithAllSupportedFilters.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/ListJobsWithAllSupportedFilters.json
*/
async function listJobsWithFilters() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName = process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const filter =
"startTime eq '2016-01-01 00:00:00 AM' and endTime eq '2017-11-29 00:00:00 AM' and operation eq 'Backup' and backupManagementType eq 'AzureIaasVM' and status eq 'InProgress'";
const options = { filter };
@ -54,18 +55,17 @@ async function listJobsWithFilters() {
console.log(resArray);
}
listJobsWithFilters().catch(console.error);
/**
* This sample demonstrates how to Provides a pageable list of jobs.
*
* @summary Provides a pageable list of jobs.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/ListJobsWithStartTimeAndEndTimeFilters.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/ListJobsWithStartTimeAndEndTimeFilters.json
*/
async function listJobsWithTimeFilter() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName = process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const filter = "startTime eq '2016-01-01 00:00:00 AM' and endTime eq '2017-11-29 00:00:00 AM'";
const options = { filter };
const credential = new DefaultAzureCredential();
@ -77,4 +77,10 @@ async function listJobsWithTimeFilter() {
console.log(resArray);
}
listJobsWithTimeFilter().catch(console.error);
async function main() {
listAllJobs();
listJobsWithFilters();
listJobsWithTimeFilter();
}
main().catch(console.error);

Просмотреть файл

@ -10,6 +10,7 @@
// Licensed under the MIT License.
const { RecoveryServicesBackupClient } = require("@azure/arm-recoveryservicesbackup");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Provides the status of the delete operations such as deleting backed up item. Once the operation has started, the
@ -21,12 +22,14 @@ part of the Location header of the operation response.
status code in the response would be Accepted. It will continue to be in this state till it reaches completion. On
successful completion, the status code will be OK. This method expects OperationID as an argument. OperationID is
part of the Location header of the operation response.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/ProtectedItem_Delete_OperationResult.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/ProtectedItem_Delete_OperationResult.json
*/
async function getResultForProtectedItemDeleteOperation() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const vaultName = "PySDKBackupTestRsVault";
const resourceGroupName = "PythonSDKBackupTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "PythonSDKBackupTestRg";
const operationId = "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
@ -34,4 +37,8 @@ async function getResultForProtectedItemDeleteOperation() {
console.log(result);
}
getResultForProtectedItemDeleteOperation().catch(console.error);
async function main() {
getResultForProtectedItemDeleteOperation();
}
main().catch(console.error);

Просмотреть файл

@ -10,6 +10,7 @@
// Licensed under the MIT License.
const { RecoveryServicesBackupClient } = require("@azure/arm-recoveryservicesbackup");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Fetches the status of an operation such as triggering a backup, restore. The status can be in progress, completed
@ -19,12 +20,14 @@ create jobs. This method returns the list of jobs when the operation is complete
* @summary Fetches the status of an operation such as triggering a backup, restore. The status can be in progress, completed
or failed. You can refer to the OperationStatus enum for all the possible states of an operation. Some operations
create jobs. This method returns the list of jobs when the operation is complete.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/ProtectedItem_Delete_OperationStatus.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/ProtectedItem_Delete_OperationStatus.json
*/
async function getProtectedItemDeleteOperationStatus() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const vaultName = "PySDKBackupTestRsVault";
const resourceGroupName = "PythonSDKBackupTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "PythonSDKBackupTestRg";
const operationId = "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
@ -36,4 +39,8 @@ async function getProtectedItemDeleteOperationStatus() {
console.log(result);
}
getProtectedItemDeleteOperationStatus().catch(console.error);
async function main() {
getProtectedItemDeleteOperationStatus();
}
main().catch(console.error);

Просмотреть файл

@ -10,6 +10,7 @@
// Licensed under the MIT License.
const { RecoveryServicesBackupClient } = require("@azure/arm-recoveryservicesbackup");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch
@ -17,12 +18,13 @@ scoped results.
*
* @summary Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch
scoped results.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/BackupPolicies_List.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/BackupPolicies_List.json
*/
async function listProtectionPoliciesWithBackupManagementTypeFilterAsAzureIaasVM() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName = process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const filter = "backupManagementType eq 'AzureIaasVM'";
const options = { filter };
const credential = new DefaultAzureCredential();
@ -34,20 +36,19 @@ async function listProtectionPoliciesWithBackupManagementTypeFilterAsAzureIaasVM
console.log(resArray);
}
listProtectionPoliciesWithBackupManagementTypeFilterAsAzureIaasVM().catch(console.error);
/**
* This sample demonstrates how to Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch
scoped results.
*
* @summary Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch
scoped results.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/V2Policy/v2-List-Policies.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/V2Policy/v2-List-Policies.json
*/
async function listProtectionPoliciesWithBackupManagementTypeFilterAsAzureIaasVMWithBothV1AndV2Policies() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName = process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const filter = "backupManagementType eq 'AzureIaasVM'";
const options = { filter };
const credential = new DefaultAzureCredential();
@ -59,22 +60,19 @@ async function listProtectionPoliciesWithBackupManagementTypeFilterAsAzureIaasVM
console.log(resArray);
}
listProtectionPoliciesWithBackupManagementTypeFilterAsAzureIaasVMWithBothV1AndV2Policies().catch(
console.error
);
/**
* This sample demonstrates how to Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch
scoped results.
*
* @summary Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch
scoped results.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureWorkload/BackupPolicies_List.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureWorkload/BackupPolicies_List.json
*/
async function listProtectionPoliciesWithBackupManagementTypeFilterAsAzureWorkload() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName = process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const filter = "backupManagementType eq 'AzureWorkload'";
const options = { filter };
const credential = new DefaultAzureCredential();
@ -86,4 +84,10 @@ async function listProtectionPoliciesWithBackupManagementTypeFilterAsAzureWorklo
console.log(resArray);
}
listProtectionPoliciesWithBackupManagementTypeFilterAsAzureWorkload().catch(console.error);
async function main() {
listProtectionPoliciesWithBackupManagementTypeFilterAsAzureIaasVM();
listProtectionPoliciesWithBackupManagementTypeFilterAsAzureIaasVMWithBothV1AndV2Policies();
listProtectionPoliciesWithBackupManagementTypeFilterAsAzureWorkload();
}
main().catch(console.error);

Просмотреть файл

@ -10,6 +10,7 @@
// Licensed under the MIT License.
const { RecoveryServicesBackupClient } = require("@azure/arm-recoveryservicesbackup");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Provides a pageable list of protectable objects within your subscription according to the query filter and the
@ -17,12 +18,13 @@ pagination parameters.
*
* @summary Provides a pageable list of protectable objects within your subscription according to the query filter and the
pagination parameters.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/BackupProtectableItems_List.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/BackupProtectableItems_List.json
*/
async function listProtectableItemsWithBackupManagementTypeFilterAsAzureIaasVM() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName = process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const filter = "backupManagementType eq 'AzureIaasVM'";
const options = { filter };
const credential = new DefaultAzureCredential();
@ -38,4 +40,8 @@ async function listProtectableItemsWithBackupManagementTypeFilterAsAzureIaasVM()
console.log(resArray);
}
listProtectableItemsWithBackupManagementTypeFilterAsAzureIaasVM().catch(console.error);
async function main() {
listProtectableItemsWithBackupManagementTypeFilterAsAzureIaasVM();
}
main().catch(console.error);

Просмотреть файл

@ -10,17 +10,19 @@
// Licensed under the MIT License.
const { RecoveryServicesBackupClient } = require("@azure/arm-recoveryservicesbackup");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Provides a pageable list of all items that are backed up within a vault.
*
* @summary Provides a pageable list of all items that are backed up within a vault.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureIaasVm/BackupProtectedItems_List.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureIaasVm/BackupProtectedItems_List.json
*/
async function listProtectedItemsWithBackupManagementTypeFilterAsAzureIaasVM() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName = process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const filter = "backupManagementType eq 'AzureIaasVM' and itemType eq 'VM'";
const options = { filter };
const credential = new DefaultAzureCredential();
@ -32,4 +34,8 @@ async function listProtectedItemsWithBackupManagementTypeFilterAsAzureIaasVM() {
console.log(resArray);
}
listProtectedItemsWithBackupManagementTypeFilterAsAzureIaasVM().catch(console.error);
async function main() {
listProtectedItemsWithBackupManagementTypeFilterAsAzureIaasVM();
}
main().catch(console.error);

Просмотреть файл

@ -10,17 +10,19 @@
// Licensed under the MIT License.
const { RecoveryServicesBackupClient } = require("@azure/arm-recoveryservicesbackup");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Lists the containers registered to Recovery Services Vault.
*
* @summary Lists the containers registered to Recovery Services Vault.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureStorage/ProtectionContainers_List.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureStorage/ProtectionContainers_List.json
*/
async function listBackupProtectionContainers() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const vaultName = "testVault";
const resourceGroupName = "testRg";
const resourceGroupName = process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "testRg";
const filter = "backupManagementType eq 'AzureWorkload'";
const options = { filter };
const credential = new DefaultAzureCredential();
@ -36,4 +38,8 @@ async function listBackupProtectionContainers() {
console.log(resArray);
}
listBackupProtectionContainers().catch(console.error);
async function main() {
listBackupProtectionContainers();
}
main().catch(console.error);

Просмотреть файл

@ -10,17 +10,19 @@
// Licensed under the MIT License.
const { RecoveryServicesBackupClient } = require("@azure/arm-recoveryservicesbackup");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Provides a pageable list of all intents that are present within a vault.
*
* @summary Provides a pageable list of all intents that are present within a vault.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/AzureWorkload/BackupProtectionIntent_List.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/AzureWorkload/BackupProtectionIntent_List.json
*/
async function listProtectionIntentWithBackupManagementTypeFilter() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const vaultName = "myVault";
const resourceGroupName = "myRG";
const resourceGroupName = process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "myRG";
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
const resArray = new Array();
@ -30,4 +32,8 @@ async function listProtectionIntentWithBackupManagementTypeFilter() {
console.log(resArray);
}
listProtectionIntentWithBackupManagementTypeFilter().catch(console.error);
async function main() {
listProtectionIntentWithBackupManagementTypeFilter();
}
main().catch(console.error);

Просмотреть файл

@ -10,21 +10,27 @@
// Licensed under the MIT License.
const { RecoveryServicesBackupClient } = require("@azure/arm-recoveryservicesbackup");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Fetches Vault Encryption config.
*
* @summary Fetches Vault Encryption config.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/BackupResourceEncryptionConfig_Get.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/BackupResourceEncryptionConfig_Get.json
*/
async function getVaultEncryptionConfiguration() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const vaultName = "rishTestVault";
const resourceGroupName = "rishgrp";
const resourceGroupName = process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "rishgrp";
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
const result = await client.backupResourceEncryptionConfigs.get(vaultName, resourceGroupName);
console.log(result);
}
getVaultEncryptionConfiguration().catch(console.error);
async function main() {
getVaultEncryptionConfiguration();
}
main().catch(console.error);

Просмотреть файл

@ -10,17 +10,19 @@
// Licensed under the MIT License.
const { RecoveryServicesBackupClient } = require("@azure/arm-recoveryservicesbackup");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Updates Vault encryption config.
*
* @summary Updates Vault encryption config.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/BackupResourceEncryptionConfig_Put.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/BackupResourceEncryptionConfig_Put.json
*/
async function updateVaultEncryptionConfiguration() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const vaultName = "source-rsv";
const resourceGroupName = "test-rg";
const resourceGroupName = process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "test-rg";
const parameters = {
properties: {
encryptionAtRestType: "CustomerManaged",
@ -39,4 +41,8 @@ async function updateVaultEncryptionConfiguration() {
console.log(result);
}
updateVaultEncryptionConfiguration().catch(console.error);
async function main() {
updateVaultEncryptionConfiguration();
}
main().catch(console.error);

Просмотреть файл

@ -10,21 +10,28 @@
// Licensed under the MIT License.
const { RecoveryServicesBackupClient } = require("@azure/arm-recoveryservicesbackup");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Fetches resource storage config.
*
* @summary Fetches resource storage config.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/BackupStorageConfig_Get.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/BackupStorageConfig_Get.json
*/
async function getVaultStorageConfiguration() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const vaultName = "PySDKBackupTestRsVault";
const resourceGroupName = "PythonSDKBackupTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "PythonSDKBackupTestRg";
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
const result = await client.backupResourceStorageConfigsNonCRR.get(vaultName, resourceGroupName);
console.log(result);
}
getVaultStorageConfiguration().catch(console.error);
async function main() {
getVaultStorageConfiguration();
}
main().catch(console.error);

Просмотреть файл

@ -10,17 +10,20 @@
// Licensed under the MIT License.
const { RecoveryServicesBackupClient } = require("@azure/arm-recoveryservicesbackup");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Updates vault storage model type.
*
* @summary Updates vault storage model type.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/BackupStorageConfig_Patch.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/BackupStorageConfig_Patch.json
*/
async function updateVaultStorageConfiguration() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const vaultName = "PySDKBackupTestRsVault";
const resourceGroupName = "PythonSDKBackupTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "PythonSDKBackupTestRg";
const parameters = {
properties: {
storageType: "LocallyRedundant",
@ -37,4 +40,8 @@ async function updateVaultStorageConfiguration() {
console.log(result);
}
updateVaultStorageConfiguration().catch(console.error);
async function main() {
updateVaultStorageConfiguration();
}
main().catch(console.error);

Просмотреть файл

@ -10,17 +10,20 @@
// Licensed under the MIT License.
const { RecoveryServicesBackupClient } = require("@azure/arm-recoveryservicesbackup");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Updates vault storage model type.
*
* @summary Updates vault storage model type.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/BackupStorageConfig_Put.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/BackupStorageConfig_Put.json
*/
async function updateVaultStorageConfiguration() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const vaultName = "PySDKBackupTestRsVault";
const resourceGroupName = "PythonSDKBackupTestRg";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "PythonSDKBackupTestRg";
const parameters = {
properties: {
storageType: "LocallyRedundant",
@ -37,4 +40,8 @@ async function updateVaultStorageConfiguration() {
console.log(result);
}
updateVaultStorageConfiguration().catch(console.error);
async function main() {
updateVaultStorageConfiguration();
}
main().catch(console.error);

Просмотреть файл

@ -10,21 +10,27 @@
// Licensed under the MIT License.
const { RecoveryServicesBackupClient } = require("@azure/arm-recoveryservicesbackup");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Fetches resource vault config.
*
* @summary Fetches resource vault config.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-03-01/examples/Common/BackupResourceVaultConfigs_Get.json
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/examples/Common/BackupResourceVaultConfigs_Get.json
*/
async function getVaultSecurityConfig() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const vaultName = "SwaggerTest";
const resourceGroupName = "SwaggerTestRg";
const resourceGroupName = process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
const result = await client.backupResourceVaultConfigs.get(vaultName, resourceGroupName);
console.log(result);
}
getVaultSecurityConfig().catch(console.error);
async function main() {
getVaultSecurityConfig();
}
main().catch(console.error);

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше