diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/CHANGELOG.md b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/CHANGELOG.md index 7922b6b8c751..6b72b7317d4c 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/CHANGELOG.md +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/CHANGELOG.md @@ -1,15 +1,45 @@ # Release History + +## 10.0.0-beta.1 (2022-06-21) + +**Features** -## 9.0.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed + - Added Interface TieringPolicy + - Added Type Alias AzureVmWorkloadSAPHanaDBInstance + - Added Type Alias AzureVmWorkloadSAPHanaDBInstanceProtectedItem + - Added Type Alias AzureVmWorkloadSAPHanaHSR + - 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 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 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 -### Other Changes +**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) **Breaking Changes** diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/README.md b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/README.md index fdfafbd7c8af..cf39ddcee79f 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/README.md +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/README.md @@ -6,7 +6,7 @@ Open API 2.0 Specs for Azure RecoveryServices Backup service [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/recoveryservicesbackup/arm-recoveryservicesbackup) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-recoveryservicesbackup) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-recoveryservicesbackup) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-recoveryservicesbackup?view=azure-node-preview) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/_meta.json b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/_meta.json index b1dd105a1b86..10a58d33b2c4 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/_meta.json +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/_meta.json @@ -1,8 +1,8 @@ { - "commit": "3f456dba8358994af8251bfae2f911a127092e54", + "commit": "0d7e787aa7da7abcf5b60a26666eede097c541c1", "readme": "specification/recoveryservicesbackup/resource-manager/readme.md", - "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\recoveryservicesbackup\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220408.1 --generate-sample=true", + "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/recoveryservicesbackup/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220425.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.3.0", - "use": "@autorest/typescript@6.0.0-alpha.19.20220408.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.3.2", + "use": "@autorest/typescript@6.0.0-alpha.19.20220425.1" } \ No newline at end of file diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/package.json b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/package.json index c2a1d0ece793..dc6f834d22df 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/package.json +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for RecoveryServicesBackupClient.", - "version": "9.0.1", + "version": "10.0.0-beta.1", "engines": { "node": ">=12.0.0" }, @@ -40,9 +40,11 @@ "uglify-js": "^3.4.9", "rimraf": "^3.0.0", "@azure/identity": "^2.0.1", - "@azure-tools/test-recorder": "^1.0.0", + "@azure-tools/test-recorder": "^2.0.0", + "@azure-tools/test-credential": "^1.0.0", "mocha": "^7.1.1", - "cross-env": "^7.0.2" + "cross-env": "^7.0.2", + "@azure/dev-tool": "^1.0.0" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/recoveryservicesbackup/arm-recoveryservicesbackup", "repository": { @@ -93,7 +95,7 @@ "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node", "unit-test:browser": "echo skipped", "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js", + "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", "integration-test:browser": "echo skipped", "docs": "echo skipped" }, @@ -106,13 +108,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-recoveryservicesbackup?view=azure-node-preview" - } -} + "autoPublish": true +} \ No newline at end of file diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/review/arm-recoveryservicesbackup.api.md b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/review/arm-recoveryservicesbackup.api.md index d2e7c63dfe2e..1ee2d46bbfaa 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/review/arm-recoveryservicesbackup.api.md +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/review/arm-recoveryservicesbackup.api.md @@ -197,25 +197,28 @@ export type AzureIaaSVMJobV2 = Job & { // @public export type AzureIaaSVMProtectedItem = ProtectedItem & { protectedItemType: "AzureIaaSVMProtectedItem" | "Microsoft.ClassicCompute/virtualMachines" | "Microsoft.Compute/virtualMachines"; - friendlyName?: string; - virtualMachineId?: string; + readonly friendlyName?: string; + readonly virtualMachineId?: string; protectionStatus?: string; protectionState?: ProtectionState; - healthStatus?: HealthStatus; + readonly healthStatus?: HealthStatus; healthDetails?: AzureIaaSVMHealthDetails[]; kpisHealths?: { [propertyName: string]: KPIResourceHealthDetails; }; lastBackupStatus?: string; - lastBackupTime?: Date; - protectedItemDataId?: string; + readonly lastBackupTime?: Date; + readonly protectedItemDataId?: string; extendedInfo?: AzureIaaSVMProtectedItemExtendedInfo; extendedProperties?: ExtendedProperties; }; // @public export interface AzureIaaSVMProtectedItemExtendedInfo { + newestRecoveryPointInArchive?: Date; oldestRecoveryPoint?: Date; + oldestRecoveryPointInArchive?: Date; + oldestRecoveryPointInVault?: Date; policyInconsistent?: boolean; recoveryPointCount?: number; } @@ -229,6 +232,9 @@ export type AzureIaaSVMProtectionPolicy = ProtectionPolicy & { instantRPDetails?: InstantRPAdditionalDetails; schedulePolicy?: SchedulePolicyUnion; retentionPolicy?: RetentionPolicyUnion; + tieringPolicy?: { + [propertyName: string]: TieringPolicy; + }; instantRpRetentionRangeInDays?: number; timeZone?: string; policyType?: IaasvmPolicyType; @@ -365,7 +371,7 @@ export type AzureVmWorkloadItemUnion = AzureVmWorkloadItem | AzureVmWorkloadSAPA // @public export type AzureVmWorkloadProtectableItem = WorkloadProtectableItem & { - protectableItemType: "AzureVmWorkloadProtectableItem" | "SAPAseSystem" | "SAPHanaDatabase" | "SAPHanaSystem" | "SQLAvailabilityGroupContainer" | "SQLDataBase" | "SQLInstance"; + protectableItemType: "AzureVmWorkloadProtectableItem" | "SAPAseSystem" | "SAPHanaDatabase" | "SAPHanaSystem" | "SAPHanaDBInstance" | "SAPHanaHSR" | "SQLAvailabilityGroupContainer" | "SQLDataBase" | "SQLInstance"; parentName?: string; parentUniqueName?: string; serverName?: string; @@ -377,16 +383,16 @@ export type AzureVmWorkloadProtectableItem = WorkloadProtectableItem & { }; // @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 type AzureVmWorkloadProtectedItem = ProtectedItem & { - protectedItemType: "AzureVmWorkloadProtectedItem" | "AzureVmWorkloadSAPAseDatabase" | "AzureVmWorkloadSAPHanaDatabase" | "AzureVmWorkloadSQLDatabase"; - friendlyName?: string; + protectedItemType: "AzureVmWorkloadProtectedItem" | "AzureVmWorkloadSAPAseDatabase" | "AzureVmWorkloadSAPHanaDatabase" | "AzureVmWorkloadSAPHanaDBInstance" | "AzureVmWorkloadSQLDatabase"; + readonly friendlyName?: string; serverName?: string; parentName?: string; parentType?: string; - protectionStatus?: string; + readonly protectionStatus?: string; protectionState?: ProtectionState; lastBackupStatus?: LastBackupStatus; lastBackupTime?: Date; @@ -401,14 +407,17 @@ export type AzureVmWorkloadProtectedItem = ProtectedItem & { // @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 type AzureVmWorkloadProtectionPolicy = ProtectionPolicy & { @@ -454,6 +463,21 @@ export type AzureVmWorkloadSAPHanaDatabaseWorkloadItem = AzureVmWorkloadItem & { workloadItemType: "SAPHanaDatabase"; }; +// @public +export type AzureVmWorkloadSAPHanaDBInstance = AzureVmWorkloadProtectableItem & { + protectableItemType: "SAPHanaDBInstance"; +}; + +// @public +export type AzureVmWorkloadSAPHanaDBInstanceProtectedItem = AzureVmWorkloadProtectedItem & { + protectedItemType: "AzureVmWorkloadSAPHanaDBInstance"; +}; + +// @public +export type AzureVmWorkloadSAPHanaHSR = AzureVmWorkloadProtectableItem & { + protectableItemType: "SAPHanaHSR"; +}; + // @public export type AzureVmWorkloadSAPHanaSystemProtectableItem = AzureVmWorkloadProtectableItem & { protectableItemType: "SAPHanaSystem"; @@ -1980,6 +2004,8 @@ export enum KnownBackupItemType { // (undocumented) SAPHanaDatabase = "SAPHanaDatabase", // (undocumented) + SAPHanaDBInstance = "SAPHanaDBInstance", + // (undocumented) Sharepoint = "Sharepoint", // (undocumented) SQLDataBase = "SQLDataBase", @@ -2028,7 +2054,11 @@ export enum KnownBackupType { // (undocumented) Invalid = "Invalid", // (undocumented) - Log = "Log" + Log = "Log", + // (undocumented) + SnapshotCopyOnlyFull = "SnapshotCopyOnlyFull", + // (undocumented) + SnapshotFull = "SnapshotFull" } // @public @@ -2038,14 +2068,14 @@ export enum KnownContainerType { // (undocumented) AzureSqlContainer = "AzureSqlContainer", // (undocumented) - AzureWorkloadContainer = "AzureWorkloadContainer", - // (undocumented) Cluster = "Cluster", // (undocumented) DPMContainer = "DPMContainer", // (undocumented) GenericContainer = "GenericContainer", // (undocumented) + HanaHSRContainer = "HanaHSRContainer", + // (undocumented) IaasVMContainer = "IaasVMContainer", // (undocumented) IaasVMServiceContainer = "IaasVMServiceContainer", @@ -2054,10 +2084,6 @@ export enum KnownContainerType { // (undocumented) MABContainer = "MABContainer", // (undocumented) - MicrosoftClassicComputeVirtualMachines = "Microsoft.ClassicCompute/virtualMachines", - // (undocumented) - MicrosoftComputeVirtualMachines = "Microsoft.Compute/virtualMachines", - // (undocumented) SqlagWorkLoadContainer = "SQLAGWorkLoadContainer", // (undocumented) StorageContainer = "StorageContainer", @@ -2126,6 +2152,8 @@ export enum KnownDataSourceType { // (undocumented) SAPHanaDatabase = "SAPHanaDatabase", // (undocumented) + SAPHanaDBInstance = "SAPHanaDBInstance", + // (undocumented) Sharepoint = "Sharepoint", // (undocumented) SQLDataBase = "SQLDataBase", @@ -2398,7 +2426,11 @@ export enum KnownPolicyType { // (undocumented) Invalid = "Invalid", // (undocumented) - Log = "Log" + Log = "Log", + // (undocumented) + SnapshotCopyOnlyFull = "SnapshotCopyOnlyFull", + // (undocumented) + SnapshotFull = "SnapshotFull" } // @public @@ -2564,7 +2596,11 @@ export enum KnownRestorePointQueryType { // (undocumented) Invalid = "Invalid", // (undocumented) - Log = "Log" + Log = "Log", + // (undocumented) + SnapshotCopyOnlyFull = "SnapshotCopyOnlyFull", + // (undocumented) + SnapshotFull = "SnapshotFull" } // @public @@ -2578,7 +2614,11 @@ export enum KnownRestorePointType { // (undocumented) Invalid = "Invalid", // (undocumented) - Log = "Log" + Log = "Log", + // (undocumented) + SnapshotCopyOnlyFull = "SnapshotCopyOnlyFull", + // (undocumented) + SnapshotFull = "SnapshotFull" } // @public @@ -2685,6 +2725,18 @@ export enum KnownSupportStatus { Supported = "Supported" } +// @public +export enum KnownTieringMode { + // (undocumented) + DoNotTier = "DoNotTier", + // (undocumented) + Invalid = "Invalid", + // (undocumented) + TierAfter = "TierAfter", + // (undocumented) + TierRecommended = "TierRecommended" +} + // @public export enum KnownType { // (undocumented) @@ -2732,6 +2784,8 @@ export enum KnownWorkloadItemType { // (undocumented) SAPHanaDatabase = "SAPHanaDatabase", // (undocumented) + SAPHanaDBInstance = "SAPHanaDBInstance", + // (undocumented) SAPHanaSystem = "SAPHanaSystem", // (undocumented) SQLDataBase = "SQLDataBase", @@ -2760,6 +2814,8 @@ export enum KnownWorkloadType { // (undocumented) SAPHanaDatabase = "SAPHanaDatabase", // (undocumented) + SAPHanaDBInstance = "SAPHanaDBInstance", + // (undocumented) Sharepoint = "Sharepoint", // (undocumented) SQLDataBase = "SQLDataBase", @@ -3241,12 +3297,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; @@ -3259,10 +3318,10 @@ 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[]; sourceResourceId?: string; - workloadType?: DataSourceType; + readonly workloadType?: DataSourceType; } // @public @@ -3862,7 +3921,7 @@ export type ResourceGuardProxiesGetResponse = ResourceGuardProxyBaseResourceList export interface ResourceGuardProxy { delete(vaultName: string, resourceGroupName: string, resourceGuardProxyName: string, options?: ResourceGuardProxyDeleteOptionalParams): Promise; get(vaultName: string, resourceGroupName: string, resourceGuardProxyName: string, options?: ResourceGuardProxyGetOptionalParams): Promise; - put(vaultName: string, resourceGroupName: string, resourceGuardProxyName: string, options?: ResourceGuardProxyPutOptionalParams): Promise; + put(vaultName: string, resourceGroupName: string, resourceGuardProxyName: string, parameters: ResourceGuardProxyBaseResource, options?: ResourceGuardProxyPutOptionalParams): Promise; unlockDelete(vaultName: string, resourceGroupName: string, resourceGuardProxyName: string, parameters: UnlockDeleteRequest, options?: ResourceGuardProxyUnlockDeleteOptionalParams): Promise; } @@ -4083,6 +4142,9 @@ export interface SubProtectionPolicy { policyType?: PolicyType; retentionPolicy?: RetentionPolicyUnion; schedulePolicy?: SchedulePolicyUnion; + tieringPolicy?: { + [propertyName: string]: TieringPolicy; + }; } // @public @@ -4102,6 +4164,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; @@ -4299,7 +4371,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; } diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/index.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/index.ts index bee48345e1e9..50ffc8fe1a0e 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/index.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/index.ts @@ -123,6 +123,7 @@ export type AzureVmWorkloadProtectedItemUnion = | AzureVmWorkloadProtectedItem | AzureVmWorkloadSAPAseDatabaseProtectedItem | AzureVmWorkloadSAPHanaDatabaseProtectedItem + | AzureVmWorkloadSAPHanaDBInstanceProtectedItem | AzureVmWorkloadSQLDatabaseProtectedItem; export type AzureWorkloadRecoveryPointUnion = | AzureWorkloadRecoveryPoint @@ -166,6 +167,8 @@ export type AzureVmWorkloadProtectableItemUnion = | AzureVmWorkloadSAPAseSystemProtectableItem | AzureVmWorkloadSAPHanaDatabaseProtectableItem | AzureVmWorkloadSAPHanaSystemProtectableItem + | AzureVmWorkloadSAPHanaDBInstance + | AzureVmWorkloadSAPHanaHSR | AzureVmWorkloadSQLAvailabilityGroupProtectableItem | AzureVmWorkloadSQLDatabaseProtectableItem | AzureVmWorkloadSQLInstanceProtectableItem; @@ -652,14 +655,21 @@ export interface ProtectedItem { | "AzureVmWorkloadProtectedItem" | "AzureVmWorkloadSAPAseDatabase" | "AzureVmWorkloadSAPHanaDatabase" + | "AzureVmWorkloadSAPHanaDBInstance" | "AzureVmWorkloadSQLDatabase" | "DPMProtectedItem" | "GenericProtectedItem" | "MabFileFolderProtectedItem"; - /** Type of backup management for the backed up item. */ - backupManagementType?: BackupManagementType; - /** Type of workload this item represents. */ - workloadType?: DataSourceType; + /** + * Type of backup management for the backed up item. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly backupManagementType?: BackupManagementType; + /** + * Type of workload this item represents. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly workloadType?: DataSourceType; /** Unique name of container */ containerName?: string; /** ARM ID of the resource to be backed up. */ @@ -961,6 +971,8 @@ export interface WorkloadProtectableItem { | "SAPAseSystem" | "SAPHanaDatabase" | "SAPHanaSystem" + | "SAPHanaDBInstance" + | "SAPHanaHSR" | "SQLAvailabilityGroupContainer" | "SQLDataBase" | "SQLInstance"; @@ -1122,6 +1134,12 @@ export interface SubProtectionPolicy { schedulePolicy?: SchedulePolicyUnion; /** Retention policy with the details on backup copy retention ranges. */ retentionPolicy?: RetentionPolicyUnion; + /** + * Tiering policy to automatically move RPs to another tier. + * Key is Target Tier, defined in RecoveryPointTierType enum. + * Tiering policy specifies the criteria to move RP to the target tier. + */ + tieringPolicy?: { [propertyName: string]: TieringPolicy }; } /** Base class for backup schedule. */ @@ -1140,10 +1158,40 @@ export interface RetentionPolicy { retentionPolicyType: "LongTermRetentionPolicy" | "SimpleRetentionPolicy"; } +/** + * Tiering Policy for a target tier. + * If the policy is not specified for a given target tier, service retains the existing configured tiering policy for that tier + */ +export interface TieringPolicy { + /** + * Tiering Mode to control automatic tiering of recovery points. Supported values are: + * 1. TierRecommended: Tier all recovery points recommended to be tiered + * 2. TierAfter: Tier all recovery points after a fixed period, as specified in duration + durationType below. + * 3. DoNotTier: Do not tier any recovery points + */ + tieringMode?: TieringMode; + /** + * Number of days/weeks/months/years to retain backups in current tier before tiering. + * Used only if TieringMode is set to TierAfter + */ + duration?: number; + /** + * Retention duration type: days/weeks/months/years + * Used only if TieringMode is set to TierAfter + */ + durationType?: RetentionDurationType; +} + /** Additional information on Azure IaaS VM specific backup item. */ export interface AzureIaaSVMProtectedItemExtendedInfo { - /** The oldest backup copy available for this backup item. */ + /** The oldest backup copy available for this backup item across all tiers. */ oldestRecoveryPoint?: Date; + /** The oldest backup copy available for this backup item in vault tier */ + oldestRecoveryPointInVault?: Date; + /** The oldest backup copy available for this backup item in archive tier */ + oldestRecoveryPointInArchive?: Date; + /** The latest backup copy available for this backup item in archive tier */ + newestRecoveryPointInArchive?: Date; /** Number of backup copies available for this backup item. */ recoveryPointCount?: number; /** Specifies if backup policy associated with the backup item is inconsistent. */ @@ -1273,8 +1321,14 @@ export interface AzureStorageJobTaskDetails { /** Additional information on Azure Workload for SQL specific backup item. */ export interface AzureVmWorkloadProtectedItemExtendedInfo { - /** The oldest backup copy available for this backup item. */ + /** The oldest backup copy available for this backup item across all tiers. */ oldestRecoveryPoint?: Date; + /** The oldest backup copy available for this backup item in vault tier */ + oldestRecoveryPointInVault?: Date; + /** The oldest backup copy available for this backup item in archive tier */ + oldestRecoveryPointInArchive?: Date; + /** The latest backup copy available for this backup item in archive tier */ + newestRecoveryPointInArchive?: Date; /** Number of backup copies available for this backup item. */ recoveryPointCount?: number; /** Indicates consistency of policy object and policy applied to this backup item. */ @@ -2313,26 +2367,41 @@ export type AzureIaaSVMProtectedItem = ProtectedItem & { | "AzureIaaSVMProtectedItem" | "Microsoft.ClassicCompute/virtualMachines" | "Microsoft.Compute/virtualMachines"; - /** Friendly name of the VM represented by this backup item. */ - friendlyName?: string; - /** Fully qualified ARM ID of the virtual machine represented by this item. */ - virtualMachineId?: string; + /** + * Friendly name of the VM represented by this backup item. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly friendlyName?: string; + /** + * Fully qualified ARM ID of the virtual machine represented by this item. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly virtualMachineId?: string; /** Backup status of this backup item. */ protectionStatus?: string; /** Backup state of this backup item. */ protectionState?: ProtectionState; - /** Health status of protected item. */ - healthStatus?: HealthStatus; + /** + * Health status of protected item. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly healthStatus?: HealthStatus; /** Health details on this backup item. */ healthDetails?: AzureIaaSVMHealthDetails[]; /** Health details of different KPIs */ kpisHealths?: { [propertyName: string]: KPIResourceHealthDetails }; /** Last backup operation status. */ lastBackupStatus?: string; - /** Timestamp of the last backup operation on this backup item. */ - lastBackupTime?: Date; - /** Data ID of the protected item. */ - protectedItemDataId?: string; + /** + * Timestamp of the last backup operation on this backup item. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastBackupTime?: Date; + /** + * Data ID of the protected item. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly protectedItemDataId?: string; /** Additional information for this backup item. */ extendedInfo?: AzureIaaSVMProtectedItemExtendedInfo; /** Extended Properties for Azure IaasVM Backup. */ @@ -2358,17 +2427,24 @@ export type AzureVmWorkloadProtectedItem = ProtectedItem & { | "AzureVmWorkloadProtectedItem" | "AzureVmWorkloadSAPAseDatabase" | "AzureVmWorkloadSAPHanaDatabase" + | "AzureVmWorkloadSAPHanaDBInstance" | "AzureVmWorkloadSQLDatabase"; - /** Friendly name of the DB represented by this backup item. */ - friendlyName?: string; + /** + * Friendly name of the DB represented by this backup item. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly friendlyName?: string; /** Host/Cluster Name for instance or AG */ serverName?: string; /** Parent name of the DB such as Instance or Availability Group. */ parentName?: string; /** Parent type of protected item, example: for a DB, standalone server or distributed */ parentType?: string; - /** Backup status of this backup item. */ - protectionStatus?: string; + /** + * Backup status of this backup item. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly protectionStatus?: string; /** Backup state of this backup item. */ protectionState?: ProtectionState; /** Last backup operation status. Possible values: Healthy, Unhealthy. */ @@ -2678,6 +2754,12 @@ export type AzureIaaSVMProtectionPolicy = ProtectionPolicy & { schedulePolicy?: SchedulePolicyUnion; /** Retention policy with the details on backup copy retention ranges. */ retentionPolicy?: RetentionPolicyUnion; + /** + * Tiering policy to automatically move RPs to another tier + * Key is Target Tier, defined in RecoveryPointTierType enum. + * Tiering policy specifies the criteria to move RP to the target tier. + */ + tieringPolicy?: { [propertyName: string]: TieringPolicy }; /** Instant RP retention policy range in days */ instantRpRetentionRangeInDays?: number; /** TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". */ @@ -3125,6 +3207,8 @@ export type AzureVmWorkloadProtectableItem = WorkloadProtectableItem & { | "SAPAseSystem" | "SAPHanaDatabase" | "SAPHanaSystem" + | "SAPHanaDBInstance" + | "SAPHanaHSR" | "SQLAvailabilityGroupContainer" | "SQLDataBase" | "SQLInstance"; @@ -3253,6 +3337,12 @@ export type AzureVmWorkloadSAPHanaDatabaseProtectedItem = AzureVmWorkloadProtect protectedItemType: "AzureVmWorkloadSAPHanaDatabase"; }; +/** Azure VM workload-specific protected item representing SAP HANA DBInstance. */ +export type AzureVmWorkloadSAPHanaDBInstanceProtectedItem = AzureVmWorkloadProtectedItem & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + protectedItemType: "AzureVmWorkloadSAPHanaDBInstance"; +}; + /** Azure VM workload-specific protected item representing SQL Database. */ export type AzureVmWorkloadSQLDatabaseProtectedItem = AzureVmWorkloadProtectedItem & { /** Polymorphic discriminator, which specifies the different types this object can be */ @@ -3435,6 +3525,18 @@ export type AzureVmWorkloadSAPHanaSystemProtectableItem = AzureVmWorkloadProtect protectableItemType: "SAPHanaSystem"; }; +/** Azure VM workload-specific protectable item representing SAP HANA Dbinstance. */ +export type AzureVmWorkloadSAPHanaDBInstance = AzureVmWorkloadProtectableItem & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + protectableItemType: "SAPHanaDBInstance"; +}; + +/** Azure VM workload-specific protectable item representing SAP HANA Dbinstance. */ +export type AzureVmWorkloadSAPHanaHSR = AzureVmWorkloadProtectableItem & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + protectableItemType: "SAPHanaHSR"; +}; + /** Azure VM workload-specific protectable item representing SQL Availability Group. */ export type AzureVmWorkloadSQLAvailabilityGroupProtectableItem = AzureVmWorkloadProtectableItem & { /** Polymorphic discriminator, which specifies the different types this object can be */ @@ -3619,7 +3721,8 @@ export enum KnownDataSourceType { SQLDataBase = "SQLDataBase", AzureFileShare = "AzureFileShare", SAPHanaDatabase = "SAPHanaDatabase", - SAPAseDatabase = "SAPAseDatabase" + SAPAseDatabase = "SAPAseDatabase", + SAPHanaDBInstance = "SAPHanaDBInstance" } /** @@ -3641,7 +3744,8 @@ export enum KnownDataSourceType { * **SQLDataBase** \ * **AzureFileShare** \ * **SAPHanaDatabase** \ - * **SAPAseDatabase** + * **SAPAseDatabase** \ + * **SAPHanaDBInstance** */ export type DataSourceType = string; @@ -4017,54 +4121,6 @@ export enum KnownBackupEngineType { */ export type BackupEngineType = string; -/** Known values of {@link ContainerType} that the service accepts. */ -export enum KnownContainerType { - Invalid = "Invalid", - Unknown = "Unknown", - IaasVMContainer = "IaasVMContainer", - IaasVMServiceContainer = "IaasVMServiceContainer", - DPMContainer = "DPMContainer", - AzureBackupServerContainer = "AzureBackupServerContainer", - MABContainer = "MABContainer", - Cluster = "Cluster", - AzureSqlContainer = "AzureSqlContainer", - Windows = "Windows", - VCenter = "VCenter", - VMAppContainer = "VMAppContainer", - SqlagWorkLoadContainer = "SQLAGWorkLoadContainer", - StorageContainer = "StorageContainer", - GenericContainer = "GenericContainer", - MicrosoftClassicComputeVirtualMachines = "Microsoft.ClassicCompute/virtualMachines", - MicrosoftComputeVirtualMachines = "Microsoft.Compute/virtualMachines", - AzureWorkloadContainer = "AzureWorkloadContainer" -} - -/** - * Defines values for ContainerType. \ - * {@link KnownContainerType} can be used interchangeably with ContainerType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Invalid** \ - * **Unknown** \ - * **IaasVMContainer** \ - * **IaasVMServiceContainer** \ - * **DPMContainer** \ - * **AzureBackupServerContainer** \ - * **MABContainer** \ - * **Cluster** \ - * **AzureSqlContainer** \ - * **Windows** \ - * **VCenter** \ - * **VMAppContainer** \ - * **SQLAGWorkLoadContainer** \ - * **StorageContainer** \ - * **GenericContainer** \ - * **Microsoft.ClassicCompute\/virtualMachines** \ - * **Microsoft.Compute\/virtualMachines** \ - * **AzureWorkloadContainer** - */ -export type ContainerType = string; - /** Known values of {@link ProtectionState} that the service accepts. */ export enum KnownProtectionState { Invalid = "Invalid", @@ -4191,7 +4247,8 @@ export enum KnownWorkloadType { SQLDataBase = "SQLDataBase", AzureFileShare = "AzureFileShare", SAPHanaDatabase = "SAPHanaDatabase", - SAPAseDatabase = "SAPAseDatabase" + SAPAseDatabase = "SAPAseDatabase", + SAPHanaDBInstance = "SAPHanaDBInstance" } /** @@ -4213,7 +4270,8 @@ export enum KnownWorkloadType { * **SQLDataBase** \ * **AzureFileShare** \ * **SAPHanaDatabase** \ - * **SAPAseDatabase** + * **SAPAseDatabase** \ + * **SAPHanaDBInstance** */ export type WorkloadType = string; @@ -4224,7 +4282,9 @@ export enum KnownPolicyType { Differential = "Differential", Log = "Log", CopyOnlyFull = "CopyOnlyFull", - Incremental = "Incremental" + Incremental = "Incremental", + SnapshotFull = "SnapshotFull", + SnapshotCopyOnlyFull = "SnapshotCopyOnlyFull" } /** @@ -4237,10 +4297,54 @@ export enum KnownPolicyType { * **Differential** \ * **Log** \ * **CopyOnlyFull** \ - * **Incremental** + * **Incremental** \ + * **SnapshotFull** \ + * **SnapshotCopyOnlyFull** */ export type PolicyType = string; +/** Known values of {@link TieringMode} that the service accepts. */ +export enum KnownTieringMode { + Invalid = "Invalid", + TierRecommended = "TierRecommended", + TierAfter = "TierAfter", + DoNotTier = "DoNotTier" +} + +/** + * Defines values for TieringMode. \ + * {@link KnownTieringMode} can be used interchangeably with TieringMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Invalid** \ + * **TierRecommended** \ + * **TierAfter** \ + * **DoNotTier** + */ +export type TieringMode = string; + +/** Known values of {@link RetentionDurationType} that the service accepts. */ +export enum KnownRetentionDurationType { + Invalid = "Invalid", + Days = "Days", + Weeks = "Weeks", + Months = "Months", + Years = "Years" +} + +/** + * Defines values for RetentionDurationType. \ + * {@link KnownRetentionDurationType} can be used interchangeably with RetentionDurationType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Invalid** \ + * **Days** \ + * **Weeks** \ + * **Months** \ + * **Years** + */ +export type RetentionDurationType = string; + /** Known values of {@link HealthStatus} that the service accepts. */ export enum KnownHealthStatus { Passed = "Passed", @@ -4351,7 +4455,9 @@ export enum KnownRestorePointType { Full = "Full", Log = "Log", Differential = "Differential", - Incremental = "Incremental" + Incremental = "Incremental", + SnapshotFull = "SnapshotFull", + SnapshotCopyOnlyFull = "SnapshotCopyOnlyFull" } /** @@ -4363,7 +4469,9 @@ export enum KnownRestorePointType { * **Full** \ * **Log** \ * **Differential** \ - * **Incremental** + * **Incremental** \ + * **SnapshotFull** \ + * **SnapshotCopyOnlyFull** */ export type RestorePointType = string; @@ -4429,7 +4537,9 @@ export enum KnownRestorePointQueryType { Differential = "Differential", FullAndDifferential = "FullAndDifferential", All = "All", - Incremental = "Incremental" + Incremental = "Incremental", + SnapshotFull = "SnapshotFull", + SnapshotCopyOnlyFull = "SnapshotCopyOnlyFull" } /** @@ -4443,32 +4553,12 @@ export enum KnownRestorePointQueryType { * **Differential** \ * **FullAndDifferential** \ * **All** \ - * **Incremental** + * **Incremental** \ + * **SnapshotFull** \ + * **SnapshotCopyOnlyFull** */ export type RestorePointQueryType = string; -/** Known values of {@link RetentionDurationType} that the service accepts. */ -export enum KnownRetentionDurationType { - Invalid = "Invalid", - Days = "Days", - Weeks = "Weeks", - Months = "Months", - Years = "Years" -} - -/** - * Defines values for RetentionDurationType. \ - * {@link KnownRetentionDurationType} can be used interchangeably with RetentionDurationType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Invalid** \ - * **Days** \ - * **Weeks** \ - * **Months** \ - * **Years** - */ -export type RetentionDurationType = string; - /** Known values of {@link JobStatus} that the service accepts. */ export enum KnownJobStatus { Invalid = "Invalid", @@ -4706,7 +4796,9 @@ export enum KnownBackupType { Differential = "Differential", Log = "Log", CopyOnlyFull = "CopyOnlyFull", - Incremental = "Incremental" + Incremental = "Incremental", + SnapshotFull = "SnapshotFull", + SnapshotCopyOnlyFull = "SnapshotCopyOnlyFull" } /** @@ -4719,7 +4811,9 @@ export enum KnownBackupType { * **Differential** \ * **Log** \ * **CopyOnlyFull** \ - * **Incremental** + * **Incremental** \ + * **SnapshotFull** \ + * **SnapshotCopyOnlyFull** */ export type BackupType = string; @@ -4731,7 +4825,8 @@ export enum KnownWorkloadItemType { SAPHanaSystem = "SAPHanaSystem", SAPHanaDatabase = "SAPHanaDatabase", SAPAseSystem = "SAPAseSystem", - SAPAseDatabase = "SAPAseDatabase" + SAPAseDatabase = "SAPAseDatabase", + SAPHanaDBInstance = "SAPHanaDBInstance" } /** @@ -4745,7 +4840,8 @@ export enum KnownWorkloadItemType { * **SAPHanaSystem** \ * **SAPHanaDatabase** \ * **SAPAseSystem** \ - * **SAPAseDatabase** + * **SAPAseDatabase** \ + * **SAPHanaDBInstance** */ export type WorkloadItemType = string; @@ -4785,6 +4881,50 @@ export enum KnownIntentItemType { */ export type IntentItemType = string; +/** Known values of {@link ContainerType} that the service accepts. */ +export enum KnownContainerType { + Invalid = "Invalid", + Unknown = "Unknown", + IaasVMContainer = "IaasVMContainer", + IaasVMServiceContainer = "IaasVMServiceContainer", + DPMContainer = "DPMContainer", + AzureBackupServerContainer = "AzureBackupServerContainer", + MABContainer = "MABContainer", + Cluster = "Cluster", + AzureSqlContainer = "AzureSqlContainer", + Windows = "Windows", + VCenter = "VCenter", + VMAppContainer = "VMAppContainer", + SqlagWorkLoadContainer = "SQLAGWorkLoadContainer", + StorageContainer = "StorageContainer", + GenericContainer = "GenericContainer", + HanaHSRContainer = "HanaHSRContainer" +} + +/** + * Defines values for ContainerType. \ + * {@link KnownContainerType} can be used interchangeably with ContainerType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Invalid** \ + * **Unknown** \ + * **IaasVMContainer** \ + * **IaasVMServiceContainer** \ + * **DPMContainer** \ + * **AzureBackupServerContainer** \ + * **MABContainer** \ + * **Cluster** \ + * **AzureSqlContainer** \ + * **Windows** \ + * **VCenter** \ + * **VMAppContainer** \ + * **SQLAGWorkLoadContainer** \ + * **StorageContainer** \ + * **GenericContainer** \ + * **HanaHSRContainer** + */ +export type ContainerType = string; + /** Known values of {@link BackupItemType} that the service accepts. */ export enum KnownBackupItemType { Invalid = "Invalid", @@ -4801,7 +4941,8 @@ export enum KnownBackupItemType { SQLDataBase = "SQLDataBase", AzureFileShare = "AzureFileShare", SAPHanaDatabase = "SAPHanaDatabase", - SAPAseDatabase = "SAPAseDatabase" + SAPAseDatabase = "SAPAseDatabase", + SAPHanaDBInstance = "SAPHanaDBInstance" } /** @@ -4823,7 +4964,8 @@ export enum KnownBackupItemType { * **SQLDataBase** \ * **AzureFileShare** \ * **SAPHanaDatabase** \ - * **SAPAseDatabase** + * **SAPAseDatabase** \ + * **SAPHanaDBInstance** */ export type BackupItemType = string; @@ -4891,6 +5033,26 @@ export type HttpStatusCode = | "ServiceUnavailable" | "GatewayTimeout" | "HttpVersionNotSupported"; +/** Defines values for ProtectableContainerType. */ +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"; /** Defines values for RecoveryPointTierType. */ export type RecoveryPointTierType = | "Invalid" diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/mappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/mappers.ts index 9201787fa7fd..b17e037370e9 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/mappers.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/mappers.ts @@ -1189,12 +1189,14 @@ export const ProtectedItem: coreClient.CompositeMapper = { }, backupManagementType: { serializedName: "backupManagementType", + readOnly: true, type: { name: "String" } }, workloadType: { serializedName: "workloadType", + readOnly: true, type: { name: "String" } @@ -1799,7 +1801,27 @@ export const ProtectableContainer: coreClient.CompositeMapper = { serializedName: "protectableContainerType", required: true, type: { - name: "String" + name: "Enum", + allowedValues: [ + "Invalid", + "Unknown", + "IaasVMContainer", + "IaasVMServiceContainer", + "DPMContainer", + "AzureBackupServerContainer", + "MABContainer", + "Cluster", + "AzureSqlContainer", + "Windows", + "VCenter", + "VMAppContainer", + "SQLAGWorkLoadContainer", + "StorageContainer", + "GenericContainer", + "Microsoft.ClassicCompute/virtualMachines", + "Microsoft.Compute/virtualMachines", + "AzureWorkloadContainer" + ] } }, healthStatus: { @@ -1856,7 +1878,27 @@ export const ProtectionContainer: coreClient.CompositeMapper = { serializedName: "containerType", required: true, type: { - name: "String" + name: "Enum", + allowedValues: [ + "Invalid", + "Unknown", + "IaasVMContainer", + "IaasVMServiceContainer", + "DPMContainer", + "AzureBackupServerContainer", + "MABContainer", + "Cluster", + "AzureSqlContainer", + "Windows", + "VCenter", + "VMAppContainer", + "SQLAGWorkLoadContainer", + "StorageContainer", + "GenericContainer", + "Microsoft.ClassicCompute/virtualMachines", + "Microsoft.Compute/virtualMachines", + "AzureWorkloadContainer" + ] } }, protectableObjectType: { @@ -2413,6 +2455,13 @@ export const SubProtectionPolicy: coreClient.CompositeMapper = { name: "Composite", className: "RetentionPolicy" } + }, + tieringPolicy: { + serializedName: "tieringPolicy", + type: { + name: "Dictionary", + value: { type: { name: "Composite", className: "TieringPolicy" } } + } } } } @@ -2460,6 +2509,33 @@ export const RetentionPolicy: coreClient.CompositeMapper = { } }; +export const TieringPolicy: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TieringPolicy", + modelProperties: { + tieringMode: { + serializedName: "tieringMode", + type: { + name: "String" + } + }, + duration: { + serializedName: "duration", + type: { + name: "Number" + } + }, + durationType: { + serializedName: "durationType", + type: { + name: "String" + } + } + } + } +}; + export const AzureIaaSVMProtectedItemExtendedInfo: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2471,6 +2547,24 @@ export const AzureIaaSVMProtectedItemExtendedInfo: coreClient.CompositeMapper = name: "DateTime" } }, + oldestRecoveryPointInVault: { + serializedName: "oldestRecoveryPointInVault", + type: { + name: "DateTime" + } + }, + oldestRecoveryPointInArchive: { + serializedName: "oldestRecoveryPointInArchive", + type: { + name: "DateTime" + } + }, + newestRecoveryPointInArchive: { + serializedName: "newestRecoveryPointInArchive", + type: { + name: "DateTime" + } + }, recoveryPointCount: { serializedName: "recoveryPointCount", type: { @@ -2833,6 +2927,24 @@ export const AzureVmWorkloadProtectedItemExtendedInfo: coreClient.CompositeMappe name: "DateTime" } }, + oldestRecoveryPointInVault: { + serializedName: "oldestRecoveryPointInVault", + type: { + name: "DateTime" + } + }, + oldestRecoveryPointInArchive: { + serializedName: "oldestRecoveryPointInArchive", + type: { + name: "DateTime" + } + }, + newestRecoveryPointInArchive: { + serializedName: "newestRecoveryPointInArchive", + type: { + name: "DateTime" + } + }, recoveryPointCount: { serializedName: "recoveryPointCount", type: { @@ -5865,12 +5977,14 @@ export const AzureIaaSVMProtectedItem: coreClient.CompositeMapper = { ...ProtectedItem.type.modelProperties, friendlyName: { serializedName: "friendlyName", + readOnly: true, type: { name: "String" } }, virtualMachineId: { serializedName: "virtualMachineId", + readOnly: true, type: { name: "String" } @@ -5889,6 +6003,7 @@ export const AzureIaaSVMProtectedItem: coreClient.CompositeMapper = { }, healthStatus: { serializedName: "healthStatus", + readOnly: true, type: { name: "String" } @@ -5922,12 +6037,14 @@ export const AzureIaaSVMProtectedItem: coreClient.CompositeMapper = { }, lastBackupTime: { serializedName: "lastBackupTime", + readOnly: true, type: { name: "DateTime" } }, protectedItemDataId: { serializedName: "protectedItemDataId", + readOnly: true, type: { name: "String" } @@ -5996,6 +6113,7 @@ export const AzureVmWorkloadProtectedItem: coreClient.CompositeMapper = { ...ProtectedItem.type.modelProperties, friendlyName: { serializedName: "friendlyName", + readOnly: true, type: { name: "String" } @@ -6020,6 +6138,7 @@ export const AzureVmWorkloadProtectedItem: coreClient.CompositeMapper = { }, protectionStatus: { serializedName: "protectionStatus", + readOnly: true, type: { name: "String" } @@ -6845,6 +6964,13 @@ export const AzureIaaSVMProtectionPolicy: coreClient.CompositeMapper = { className: "RetentionPolicy" } }, + tieringPolicy: { + serializedName: "tieringPolicy", + type: { + name: "Dictionary", + value: { type: { name: "Composite", className: "TieringPolicy" } } + } + }, instantRpRetentionRangeInDays: { serializedName: "instantRpRetentionRangeInDays", type: { @@ -8441,6 +8567,19 @@ export const AzureVmWorkloadSAPHanaDatabaseProtectedItem: coreClient.CompositeMa } }; +export const AzureVmWorkloadSAPHanaDBInstanceProtectedItem: coreClient.CompositeMapper = { + serializedName: "AzureVmWorkloadSAPHanaDBInstance", + type: { + name: "Composite", + className: "AzureVmWorkloadSAPHanaDBInstanceProtectedItem", + uberParent: "ProtectedItem", + polymorphicDiscriminator: ProtectedItem.type.polymorphicDiscriminator, + modelProperties: { + ...AzureVmWorkloadProtectedItem.type.modelProperties + } + } +}; + export const AzureVmWorkloadSQLDatabaseProtectedItem: coreClient.CompositeMapper = { serializedName: "AzureVmWorkloadSQLDatabase", type: { @@ -8852,6 +8991,34 @@ export const AzureVmWorkloadSAPHanaSystemProtectableItem: coreClient.CompositeMa } }; +export const AzureVmWorkloadSAPHanaDBInstance: coreClient.CompositeMapper = { + serializedName: "SAPHanaDBInstance", + type: { + name: "Composite", + className: "AzureVmWorkloadSAPHanaDBInstance", + uberParent: "WorkloadProtectableItem", + polymorphicDiscriminator: + WorkloadProtectableItem.type.polymorphicDiscriminator, + modelProperties: { + ...AzureVmWorkloadProtectableItem.type.modelProperties + } + } +}; + +export const AzureVmWorkloadSAPHanaHSR: coreClient.CompositeMapper = { + serializedName: "SAPHanaHSR", + type: { + name: "Composite", + className: "AzureVmWorkloadSAPHanaHSR", + uberParent: "WorkloadProtectableItem", + polymorphicDiscriminator: + WorkloadProtectableItem.type.polymorphicDiscriminator, + modelProperties: { + ...AzureVmWorkloadProtectableItem.type.modelProperties + } + } +}; + export const AzureVmWorkloadSQLAvailabilityGroupProtectableItem: coreClient.CompositeMapper = { serializedName: "SQLAvailabilityGroupContainer", type: { @@ -9167,6 +9334,7 @@ export let discriminators = { "ProtectedItem.Microsoft.Compute/virtualMachines": AzureIaaSComputeVMProtectedItem, "ProtectedItem.AzureVmWorkloadSAPAseDatabase": AzureVmWorkloadSAPAseDatabaseProtectedItem, "ProtectedItem.AzureVmWorkloadSAPHanaDatabase": AzureVmWorkloadSAPHanaDatabaseProtectedItem, + "ProtectedItem.AzureVmWorkloadSAPHanaDBInstance": AzureVmWorkloadSAPHanaDBInstanceProtectedItem, "ProtectedItem.AzureVmWorkloadSQLDatabase": AzureVmWorkloadSQLDatabaseProtectedItem, "RecoveryPoint.AzureWorkloadPointInTimeRecoveryPoint": AzureWorkloadPointInTimeRecoveryPoint, "RecoveryPoint.AzureWorkloadSAPHanaRecoveryPoint": AzureWorkloadSAPHanaRecoveryPoint, @@ -9192,6 +9360,8 @@ export let discriminators = { "WorkloadProtectableItem.SAPAseSystem": AzureVmWorkloadSAPAseSystemProtectableItem, "WorkloadProtectableItem.SAPHanaDatabase": AzureVmWorkloadSAPHanaDatabaseProtectableItem, "WorkloadProtectableItem.SAPHanaSystem": AzureVmWorkloadSAPHanaSystemProtectableItem, + "WorkloadProtectableItem.SAPHanaDBInstance": AzureVmWorkloadSAPHanaDBInstance, + "WorkloadProtectableItem.SAPHanaHSR": AzureVmWorkloadSAPHanaHSR, "WorkloadProtectableItem.SQLAvailabilityGroupContainer": AzureVmWorkloadSQLAvailabilityGroupProtectableItem, "WorkloadProtectableItem.SQLDataBase": AzureVmWorkloadSQLDatabaseProtectableItem, "WorkloadProtectableItem.SQLInstance": AzureVmWorkloadSQLInstanceProtectableItem, diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/parameters.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/parameters.ts index 67a4c7d0010c..f28ab53d8d51 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/parameters.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/parameters.ts @@ -32,6 +32,7 @@ import { ILRRequestResource as ILRRequestResourceMapper, SecurityPinBase as SecurityPinBaseMapper, ListRecoveryPointsRecommendedForMoveRequest as ListRecoveryPointsRecommendedForMoveRequestMapper, + ResourceGuardProxyBaseResource as ResourceGuardProxyBaseResourceMapper, UnlockDeleteRequest as UnlockDeleteRequestMapper } from "../models/mappers"; @@ -62,7 +63,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-03-01", + defaultValue: "2022-06-01-preview", isConstant: true, serializedName: "api-version", type: { @@ -381,6 +382,11 @@ export const resourceGuardProxyName: OperationURLParameter = { }; export const parameters20: OperationParameter = { + parameterPath: "parameters", + mapper: ResourceGuardProxyBaseResourceMapper +}; + +export const parameters21: OperationParameter = { parameterPath: "parameters", mapper: UnlockDeleteRequestMapper }; diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/resourceGuardProxy.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/resourceGuardProxy.ts index cc2ed3cd1b18..b74d943cf5fb 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/resourceGuardProxy.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/resourceGuardProxy.ts @@ -14,6 +14,7 @@ import { RecoveryServicesBackupClient } from "../recoveryServicesBackupClient"; import { ResourceGuardProxyGetOptionalParams, ResourceGuardProxyGetResponse, + ResourceGuardProxyBaseResource, ResourceGuardProxyPutOptionalParams, ResourceGuardProxyPutResponse, ResourceGuardProxyDeleteOptionalParams, @@ -61,16 +62,24 @@ export class ResourceGuardProxyImpl implements ResourceGuardProxy { * @param resourceGroupName The name of the resource group where the recovery services vault is * present. * @param resourceGuardProxyName + * @param parameters Request body for operation * @param options The options parameters. */ put( vaultName: string, resourceGroupName: string, resourceGuardProxyName: string, + parameters: ResourceGuardProxyBaseResource, options?: ResourceGuardProxyPutOptionalParams ): Promise { return this.client.sendOperationRequest( - { vaultName, resourceGroupName, resourceGuardProxyName, options }, + { + vaultName, + resourceGroupName, + resourceGuardProxyName, + parameters, + options + }, putOperationSpec ); } @@ -161,6 +170,7 @@ const putOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, + requestBody: Parameters.parameters20, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -169,7 +179,8 @@ const putOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGuardProxyName ], - headerParameters: [Parameters.accept], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; const deleteOperationSpec: coreClient.OperationSpec = { @@ -206,7 +217,7 @@ const unlockDeleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - requestBody: Parameters.parameters20, + requestBody: Parameters.parameters21, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operationsInterfaces/resourceGuardProxy.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operationsInterfaces/resourceGuardProxy.ts index c3fafd6b4752..3a1881319eaa 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operationsInterfaces/resourceGuardProxy.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operationsInterfaces/resourceGuardProxy.ts @@ -9,6 +9,7 @@ import { ResourceGuardProxyGetOptionalParams, ResourceGuardProxyGetResponse, + ResourceGuardProxyBaseResource, ResourceGuardProxyPutOptionalParams, ResourceGuardProxyPutResponse, ResourceGuardProxyDeleteOptionalParams, @@ -40,12 +41,14 @@ export interface ResourceGuardProxy { * @param resourceGroupName The name of the resource group where the recovery services vault is * present. * @param resourceGuardProxyName + * @param parameters Request body for operation * @param options The options parameters. */ put( vaultName: string, resourceGroupName: string, resourceGuardProxyName: string, + parameters: ResourceGuardProxyBaseResource, options?: ResourceGuardProxyPutOptionalParams ): Promise; /** diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/recoveryServicesBackupClient.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/recoveryServicesBackupClient.ts index 6006c2d5c1f1..1af9271beec6 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/recoveryServicesBackupClient.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/recoveryServicesBackupClient.ts @@ -8,6 +8,11 @@ import * as coreClient from "@azure/core-client"; import * as coreRestPipeline from "@azure/core-rest-pipeline"; +import { + PipelineRequest, + PipelineResponse, + SendRequest +} from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; import { LroImpl } from "./lroImpl"; @@ -157,7 +162,7 @@ export class RecoveryServicesBackupClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-recoveryservicesbackup/9.0.1`; + const packageDetails = `azsdk-js-arm-recoveryservicesbackup/10.0.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -204,7 +209,7 @@ export class RecoveryServicesBackupClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-03-01"; + this.apiVersion = options.apiVersion || "2022-06-01-preview"; this.backupResourceStorageConfigsNonCRR = new BackupResourceStorageConfigsNonCRRImpl( this ); @@ -277,6 +282,35 @@ export class RecoveryServicesBackupClient extends coreClient.ServiceClient { ); this.resourceGuardProxies = new ResourceGuardProxiesImpl(this); this.resourceGuardProxy = new ResourceGuardProxyImpl(this); + this.addCustomApiVersionPolicy(options.apiVersion); + } + + /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */ + private addCustomApiVersionPolicy(apiVersion?: string) { + if (!apiVersion) { + return; + } + const apiVersionPolicy = { + name: "CustomApiVersionPolicy", + async sendRequest( + request: PipelineRequest, + next: SendRequest + ): Promise { + const param = request.url.split("?"); + if (param.length > 1) { + const newParams = param[1].split("&").map((item) => { + if (item.indexOf("api-version") > -1) { + return item.replace(/(?<==).*$/, apiVersion); + } else { + return item; + } + }); + request.url = param[0] + "?" + newParams.join("&"); + } + return next(request); + } + }; + this.pipeline.addPolicy(apiVersionPolicy); } /** diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/test/sampleTest.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/test/sampleTest.ts index 7ed89b043e1b..25aeb3ebcc36 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/test/sampleTest.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/test/sampleTest.ts @@ -7,35 +7,30 @@ */ import { - env, - record, - RecorderEnvironmentSetup, - Recorder + Recorder, + RecorderStartOptions, + env } from "@azure-tools/test-recorder"; -import * as assert from "assert"; +import { assert } from "chai"; +import { Context } from "mocha"; -const recorderEnvSetup: RecorderEnvironmentSetup = { - replaceableVariables: { - AZURE_CLIENT_ID: "azure_client_id", - AZURE_CLIENT_SECRET: "azure_client_secret", - AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", - SUBSCRIPTION_ID: "azure_subscription_id" - }, - customizationsOnRecordings: [ - (recording: any): any => - recording.replace( - /"access_token":"[^"]*"/g, - `"access_token":"access_token"` - ) - ], - queryParametersToSkip: [] +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables }; describe("My test", () => { let recorder: Recorder; - beforeEach(async function() { - recorder = record(this, recorderEnvSetup); + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); }); afterEach(async function() { diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/tsconfig.json b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/tsconfig.json index a7e9eaf1a49b..3e6ae96443f3 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/tsconfig.json +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-recoveryservicesbackup": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"