From c7d85026914a93630f785785116b4d721617c581 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 20 Apr 2022 10:29:12 +0000 Subject: [PATCH] CodeGen from PR 18749 in Azure/azure-rest-api-specs Merge 00bd7a219bd974b6eaf2cd54d6caad4ea3496e40 into b5d8eef5bf187dc99f1c18e8323b19e0c37a7124 --- .../arm-recoveryservicesbackup/CHANGELOG.md | 16 +++ .../arm-recoveryservicesbackup/_meta.json | 7 +- .../arm-recoveryservicesbackup/package.json | 20 +-- .../review/arm-recoveryservicesbackup.api.md | 38 +++++- .../src/models/index.ts | 120 ++++++++++++++---- .../src/models/mappers.ts | 81 +++++++++++- .../src/recoveryServicesBackupClient.ts | 2 +- .../arm-recoveryservicesbackup/tsconfig.json | 7 +- sdk/recoveryservicesbackup/ci.mgmt.yml | 7 +- 9 files changed, 237 insertions(+), 61 deletions(-) diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/CHANGELOG.md b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/CHANGELOG.md index 9a8e424cd02a..0ce153d34a32 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/CHANGELOG.md +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/CHANGELOG.md @@ -1,5 +1,21 @@ # Release History +## 8.2.0 (2022-04-20) + +**Features** + + - Added Interface TieringPolicy + - 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 + + ## 8.1.0 (2022-02-14) **Features** diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/_meta.json b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/_meta.json index 47cfc8f9d56c..864f1a2eb8a9 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/_meta.json +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/_meta.json @@ -1,7 +1,8 @@ { - "commit": "7c98de7664d4565c088350015ccd0cfc102eab49", + "commit": "2c0a44990d70847538e78ba71d263aafaa61d020", "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:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/recoveryservicesbackup/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220128.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.16.20220105.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "use": "@autorest/typescript@6.0.0-alpha.16.20220128.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.3.0", + "use": "@autorest/typescript@6.0.0-alpha.16.20220105.1" } \ No newline at end of file diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/package.json b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/package.json index 3fa09afbafcf..6df4e52345a7 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": "8.1.0", + "version": "8.2.0", "engines": { "node": ">=12.0.0" }, @@ -98,21 +98,5 @@ "docs": "echo skipped" }, "sideEffects": false, - "//metadata": { - "constantPaths": [ - { - "path": "src/recoveryServicesBackupClient.ts", - "prefix": "packageDetails" - } - ] - }, - "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 fd8808e3e403..44c33bc848b8 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/review/arm-recoveryservicesbackup.api.md +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/review/arm-recoveryservicesbackup.api.md @@ -215,7 +215,10 @@ export type AzureIaaSVMProtectedItem = ProtectedItem & { // @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; @@ -401,7 +407,10 @@ export type AzureVmWorkloadProtectedItem = ProtectedItem & { // @public export interface AzureVmWorkloadProtectedItemExtendedInfo { + newestRecoveryPointInArchive?: Date; oldestRecoveryPoint?: Date; + oldestRecoveryPointInArchive?: Date; + oldestRecoveryPointInVault?: Date; policyState?: string; recoveryModel?: string; recoveryPointCount?: number; @@ -1670,7 +1679,7 @@ export type IaasVMBackupRequest = BackupRequest & { // @public export type IaaSVMContainer = ProtectionContainer & { - containerType: "IaaSVMContainer" | "Microsoft.ClassicCompute/virtualMachines" | "Microsoft.Compute/virtualMachines"; + containerType: "IaasVMContainer" | "Microsoft.ClassicCompute/virtualMachines" | "Microsoft.Compute/virtualMachines"; virtualMachineId?: string; virtualMachineVersion?: string; resourceGroup?: string; @@ -2685,6 +2694,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) @@ -3350,7 +3371,7 @@ export type ProtectedItemUnion = ProtectedItem | AzureFileshareProtectedItem | A // @public export interface ProtectionContainer { backupManagementType?: BackupManagementType; - containerType: "DPMContainer" | "AzureBackupServerContainer" | "IaaSVMContainer" | "Microsoft.ClassicCompute/virtualMachines" | "Microsoft.Compute/virtualMachines" | "AzureWorkloadContainer" | "SQLAGWorkLoadContainer" | "AzureSqlContainer" | "StorageContainer" | "VMAppContainer" | "GenericContainer" | "Windows"; + containerType: "DPMContainer" | "AzureBackupServerContainer" | "IaasVMContainer" | "Microsoft.ClassicCompute/virtualMachines" | "Microsoft.Compute/virtualMachines" | "AzureWorkloadContainer" | "SQLAGWorkLoadContainer" | "AzureSqlContainer" | "StorageContainer" | "VMAppContainer" | "GenericContainer" | "Windows"; friendlyName?: string; healthStatus?: string; protectableObjectType?: string; @@ -4083,6 +4104,9 @@ export interface SubProtectionPolicy { policyType?: PolicyType; retentionPolicy?: RetentionPolicyUnion; schedulePolicy?: SchedulePolicyUnion; + tieringPolicy?: { + [propertyName: string]: TieringPolicy; + }; } // @public @@ -4102,6 +4126,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; diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/index.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/index.ts index 28625af42dc6..f843f580fa10 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/index.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/index.ts @@ -889,7 +889,7 @@ export interface ProtectionContainer { containerType: | "DPMContainer" | "AzureBackupServerContainer" - | "IaaSVMContainer" + | "IaasVMContainer" | "Microsoft.ClassicCompute/virtualMachines" | "Microsoft.Compute/virtualMachines" | "AzureWorkloadContainer" @@ -1122,6 +1122,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 +1146,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 +1309,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. */ @@ -2678,6 +2720,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". */ @@ -2933,7 +2981,7 @@ export type DpmContainer = ProtectionContainer & { export type IaaSVMContainer = ProtectionContainer & { /** Polymorphic discriminator, which specifies the different types this object can be */ containerType: - | "IaaSVMContainer" + | "IaasVMContainer" | "Microsoft.ClassicCompute/virtualMachines" | "Microsoft.Compute/virtualMachines"; /** Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. */ @@ -4241,6 +4289,48 @@ export enum KnownPolicyType { */ 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", @@ -4447,28 +4537,6 @@ export enum KnownRestorePointQueryType { */ 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", diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/mappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/mappers.ts index 191d7773b857..eb5dd0999ac7 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/mappers.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/mappers.ts @@ -2413,6 +2413,13 @@ export const SubProtectionPolicy: coreClient.CompositeMapper = { name: "Composite", className: "RetentionPolicy" } + }, + tieringPolicy: { + serializedName: "tieringPolicy", + type: { + name: "Dictionary", + value: { type: { name: "Composite", className: "TieringPolicy" } } + } } } } @@ -2460,6 +2467,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 +2505,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 +2885,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: { @@ -6845,6 +6915,13 @@ export const AzureIaaSVMProtectionPolicy: coreClient.CompositeMapper = { className: "RetentionPolicy" } }, + tieringPolicy: { + serializedName: "tieringPolicy", + type: { + name: "Dictionary", + value: { type: { name: "Composite", className: "TieringPolicy" } } + } + }, instantRpRetentionRangeInDays: { serializedName: "instantRpRetentionRangeInDays", type: { @@ -7625,7 +7702,7 @@ export const DpmContainer: coreClient.CompositeMapper = { }; export const IaaSVMContainer: coreClient.CompositeMapper = { - serializedName: "IaaSVMContainer", + serializedName: "IaasVMContainer", type: { name: "Composite", className: "IaaSVMContainer", @@ -9141,7 +9218,7 @@ export let discriminators = { "ProtectableContainer.StorageContainer": AzureStorageProtectableContainer, "ProtectableContainer.VMAppContainer": AzureVMAppContainerProtectableContainer, "ProtectionContainer.DPMContainer": DpmContainer, - "ProtectionContainer.IaaSVMContainer": IaaSVMContainer, + "ProtectionContainer.IaasVMContainer": IaaSVMContainer, "ProtectionContainer.AzureWorkloadContainer": AzureWorkloadContainer, "ProtectionContainer.AzureSqlContainer": AzureSqlContainer, "ProtectionContainer.StorageContainer": AzureStorageContainer, diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/recoveryServicesBackupClient.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/recoveryServicesBackupClient.ts index 50fb5f421455..cda39b477aa4 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/recoveryServicesBackupClient.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/recoveryServicesBackupClient.ts @@ -156,7 +156,7 @@ export class RecoveryServicesBackupClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-recoveryservicesbackup/8.1.0`; + const packageDetails = `azsdk-js-arm-recoveryservicesbackup/8.2.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/tsconfig.json b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/tsconfig.json index fe1a6e163f0b..3e6ae96443f3 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/tsconfig.json +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/tsconfig.json @@ -15,12 +15,7 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-recoveryservicesbackup": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", diff --git a/sdk/recoveryservicesbackup/ci.mgmt.yml b/sdk/recoveryservicesbackup/ci.mgmt.yml index 645466edcf9b..ac18b19cccc8 100644 --- a/sdk/recoveryservicesbackup/ci.mgmt.yml +++ b/sdk/recoveryservicesbackup/ci.mgmt.yml @@ -1,5 +1,5 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. - + trigger: branches: include: @@ -10,6 +10,7 @@ trigger: include: - sdk/recoveryservicesbackup/ci.mgmt.yml - sdk/recoveryservicesbackup/arm-recoveryservicesbackup/ + - sdk/recoveryservicesbackup/arm-recoveryservicesbackup pr: branches: include: @@ -23,11 +24,11 @@ pr: include: - sdk/recoveryservicesbackup/ci.mgmt.yml - sdk/recoveryservicesbackup/arm-recoveryservicesbackup/ - + - sdk/recoveryservicesbackup/arm-recoveryservicesbackup extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: ServiceDirectory: recoveryservicesbackup Artifacts: - name: azure-arm-recoveryservicesbackup - safeName: azurearmrecoveryservicesbackup \ No newline at end of file + safeName: azurearmrecoveryservicesbackup