From 430022831ac82287a66d11d7570d8a48e270f318 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 31 May 2023 10:27:36 +0000 Subject: [PATCH] CodeGen from PR 24210 in Azure/azure-rest-api-specs Merge 35fde2bfec81598a849f6a9194dc08994c8872d4 into d4138083c1b04e801f5ec64d7e27076cdef39dee --- common/config/rush/pnpm-lock.yaml | 16 ++- .../arm-recoveryservicesbackup/CHANGELOG.md | 27 ++-- .../arm-recoveryservicesbackup/_meta.json | 8 +- .../arm-recoveryservicesbackup/package.json | 19 +-- .../review/arm-recoveryservicesbackup.api.md | 27 +++- .../src/models/index.ts | 71 ++++++++--- .../src/models/mappers.ts | 117 ++++++++++++------ .../src/models/parameters.ts | 2 +- .../src/recoveryServicesBackupClient.ts | 4 +- .../test/sampleTest.ts | 43 +++++++ .../arm-recoveryservicesbackup/tsconfig.json | 10 +- 11 files changed, 241 insertions(+), 103 deletions(-) create mode 100644 sdk/recoveryservicesbackup/arm-recoveryservicesbackup/test/sampleTest.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 2155651cedcb..f70fdff31012 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -3855,7 +3855,7 @@ packages: dependencies: semver: 7.5.1 shelljs: 0.8.5 - typescript: 5.2.0-dev.20230530 + typescript: 5.2.0-dev.20230531 dev: false /ecdsa-sig-formatter/1.0.11: @@ -8416,14 +8416,20 @@ packages: hasBin: true dev: false + /typescript/4.8.4: + resolution: {integrity: sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==} + engines: {node: '>=4.2.0'} + hasBin: true + dev: false + /typescript/5.0.4: resolution: {integrity: sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==} engines: {node: '>=12.20'} hasBin: true dev: false - /typescript/5.2.0-dev.20230530: - resolution: {integrity: sha512-bIoMajCZWzLB+pWwncaba/hZc6dRnw7x8T/fenOnP9gYQB/gc4xdm48AXp5SH5I/PvvSeZ/dXkUMtc8s8BiDZw==} + /typescript/5.2.0-dev.20230531: + resolution: {integrity: sha512-srFqtcpU2ZMiHj6PXzT4MHXVgASaQmOk0n6gj0T/zt7IW2o4FdKJCnnf/u7tGisG5m/Wk5qjhT++Vij5Cj+GRA==} engines: {node: '>=14.17'} hasBin: true dev: false @@ -13901,7 +13907,7 @@ packages: dev: false file:projects/arm-recoveryservicesbackup.tgz: - resolution: {integrity: sha512-QI8BpZ4AD0+9hQVbh8Alwjh1HJATPwkTLbXLbKC3N3zrCY1RVkB3+IFEuohes/LVjmHZBh5Iv3plTqu27Qppug==, tarball: file:projects/arm-recoveryservicesbackup.tgz} + resolution: {integrity: sha512-CUycR8CUYxnVUmL3lmzfd41L12u8avC4z9srRXQiKLZhYN0LZ0vy1NH9V29HLTNGt7nQMh0EnYvU6z27Oroe8g==, tarball: file:projects/arm-recoveryservicesbackup.tgz} name: '@rush-temp/arm-recoveryservicesbackup' version: 0.0.0 dependencies: @@ -13922,7 +13928,7 @@ packages: rollup: 2.79.1 rollup-plugin-sourcemaps: 0.6.3_6vxqa4pl2c5hli7lcaemfsm5je tslib: 2.5.2 - typescript: 5.0.4 + typescript: 4.8.4 uglify-js: 3.17.4 transitivePeerDependencies: - supports-color diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/CHANGELOG.md b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/CHANGELOG.md index 27071178c437..2ac57b2c2dde 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/CHANGELOG.md +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/CHANGELOG.md @@ -1,15 +1,26 @@ # Release History + +## 11.0.0 (2023-05-31) + +**Features** -## 10.1.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed + - Added Interface AzureVmWorkloadSAPHanaHSRProtectableItem + - Added Type Alias VaultSubResourceType + - Interface AzureVmWorkloadProtectableItem has a new optional parameter isProtectable + - Interface AzureVmWorkloadProtectedItem has a new optional parameter nodesList + - Interface AzureVmWorkloadSQLAvailabilityGroupProtectableItem has a new optional parameter nodesList + - Interface DistributedNodesInfo has a new optional parameter sourceResourceId + - Interface PrivateEndpointConnection has a new optional parameter groupIds + - Interface PrivateLinkServiceConnectionState has a new optional parameter actionsRequired + - Added Enum KnownVaultSubResourceType -### Other Changes +**Breaking Changes** + - Interface PrivateLinkServiceConnectionState no longer has parameter actionRequired + - Type of parameter protectableItemType of interface AzureVmWorkloadProtectableItem is changed from "AzureVmWorkloadProtectableItem" | "SAPAseSystem" | "SAPHanaDatabase" | "SAPHanaSystem" | "SAPHanaDBInstance" | "SAPHanaHSR" | "SQLAvailabilityGroupContainer" | "SQLDataBase" | "SQLInstance" to "AzureVmWorkloadProtectableItem" | "SAPAseSystem" | "SAPHanaDatabase" | "SAPHanaSystem" | "SAPHanaDBInstance" | "HanaHSRContainer" | "SQLAvailabilityGroupContainer" | "SQLDataBase" | "SQLInstance" + - Type of parameter protectableItemType of interface WorkloadProtectableItem is changed from "AzureFileShare" | "IaaSVMProtectableItem" | "Microsoft.ClassicCompute/virtualMachines" | "Microsoft.Compute/virtualMachines" | "AzureVmWorkloadProtectableItem" | "SAPAseSystem" | "SAPHanaDatabase" | "SAPHanaSystem" | "SAPHanaDBInstance" | "SAPHanaHSR" | "SQLAvailabilityGroupContainer" | "SQLDataBase" | "SQLInstance" to "AzureFileShare" | "IaaSVMProtectableItem" | "Microsoft.ClassicCompute/virtualMachines" | "Microsoft.Compute/virtualMachines" | "AzureVmWorkloadProtectableItem" | "SAPAseSystem" | "SAPHanaDatabase" | "SAPHanaSystem" | "SAPHanaDBInstance" | "HanaHSRContainer" | "SQLAvailabilityGroupContainer" | "SQLDataBase" | "SQLInstance" + + ## 10.1.0 (2023-03-10) **Features** diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/_meta.json b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/_meta.json index 01e3867d7224..9745fe13bbf2 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/_meta.json +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/_meta.json @@ -1,8 +1,8 @@ { - "commit": "4f4044394791773e6e7e82a9bd90d3935caaca1b", + "commit": "60ad0f7b085daac62ab067e9f5f3d6adf0fd801c", "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.9 --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=/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-rc.10", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.6.2", - "use": "@autorest/typescript@6.0.0-rc.9" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.0", + "use": "@autorest/typescript@6.0.0-rc.10" } \ No newline at end of file diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/package.json b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/package.json index a8b96e31b5c5..ecafc5e26b04 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": "10.1.1", + "version": "11.0.0", "engines": { "node": ">=14.0.0" }, @@ -36,7 +36,7 @@ "mkdirp": "^2.1.2", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", - "typescript": "~5.0.0", + "typescript": "~4.8.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", "dotenv": "^16.0.0", @@ -48,8 +48,7 @@ "chai": "^4.2.0", "cross-env": "^7.0.2", "@types/node": "^14.0.0", - "@azure/dev-tool": "^1.0.0", - "@azure/arm-recoveryservices": "^5.2.0" + "@azure/dev-tool": "^1.0.0" }, "repository": { "type": "git", @@ -112,13 +111,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/recoveryservicesbackup/arm-recoveryservicesbackup", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-recoveryservicesbackup?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/recoveryservicesbackup/arm-recoveryservicesbackup" +} \ 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 04ca9974b8e0..7562f5db1353 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/review/arm-recoveryservicesbackup.api.md +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/review/arm-recoveryservicesbackup.api.md @@ -377,17 +377,18 @@ export type AzureVmWorkloadItemUnion = AzureVmWorkloadItem | AzureVmWorkloadSAPA export interface AzureVmWorkloadProtectableItem extends WorkloadProtectableItem { isAutoProtectable?: boolean; isAutoProtected?: boolean; + isProtectable?: boolean; parentName?: string; parentUniqueName?: string; prebackupvalidation?: PreBackupValidation; - protectableItemType: "AzureVmWorkloadProtectableItem" | "SAPAseSystem" | "SAPHanaDatabase" | "SAPHanaSystem" | "SAPHanaDBInstance" | "SAPHanaHSR" | "SQLAvailabilityGroupContainer" | "SQLDataBase" | "SQLInstance"; + protectableItemType: "AzureVmWorkloadProtectableItem" | "SAPAseSystem" | "SAPHanaDatabase" | "SAPHanaSystem" | "SAPHanaDBInstance" | "HanaHSRContainer" | "SQLAvailabilityGroupContainer" | "SQLDataBase" | "SQLInstance"; serverName?: string; subinquireditemcount?: number; subprotectableitemcount?: number; } // @public (undocumented) -export type AzureVmWorkloadProtectableItemUnion = AzureVmWorkloadProtectableItem | AzureVmWorkloadSAPAseSystemProtectableItem | AzureVmWorkloadSAPHanaDatabaseProtectableItem | AzureVmWorkloadSAPHanaSystemProtectableItem | AzureVmWorkloadSAPHanaDBInstance | AzureVmWorkloadSAPHanaHSR | AzureVmWorkloadSQLAvailabilityGroupProtectableItem | AzureVmWorkloadSQLDatabaseProtectableItem | AzureVmWorkloadSQLInstanceProtectableItem; +export type AzureVmWorkloadProtectableItemUnion = AzureVmWorkloadProtectableItem | AzureVmWorkloadSAPAseSystemProtectableItem | AzureVmWorkloadSAPHanaDatabaseProtectableItem | AzureVmWorkloadSAPHanaSystemProtectableItem | AzureVmWorkloadSAPHanaDBInstance | AzureVmWorkloadSAPHanaHSRProtectableItem | AzureVmWorkloadSQLAvailabilityGroupProtectableItem | AzureVmWorkloadSQLDatabaseProtectableItem | AzureVmWorkloadSQLInstanceProtectableItem; // @public export interface AzureVmWorkloadProtectedItem extends ProtectedItem { @@ -399,6 +400,7 @@ export interface AzureVmWorkloadProtectedItem extends ProtectedItem { lastBackupErrorDetail?: ErrorDetail; lastBackupStatus?: LastBackupStatus; lastBackupTime?: Date; + nodesList?: DistributedNodesInfo[]; parentName?: string; parentType?: string; protectedItemDataSourceId?: string; @@ -478,8 +480,8 @@ export interface AzureVmWorkloadSAPHanaDBInstanceProtectedItem extends AzureVmWo } // @public -export interface AzureVmWorkloadSAPHanaHSR extends AzureVmWorkloadProtectableItem { - protectableItemType: "SAPHanaHSR"; +export interface AzureVmWorkloadSAPHanaHSRProtectableItem extends AzureVmWorkloadProtectableItem { + protectableItemType: "HanaHSRContainer"; } // @public @@ -494,6 +496,7 @@ export interface AzureVmWorkloadSAPHanaSystemWorkloadItem extends AzureVmWorkloa // @public export interface AzureVmWorkloadSQLAvailabilityGroupProtectableItem extends AzureVmWorkloadProtectableItem { + nodesList?: DistributedNodesInfo[]; protectableItemType: "SQLAvailabilityGroupContainer"; } @@ -1451,6 +1454,7 @@ export interface DiskInformation { export interface DistributedNodesInfo { errorDetail?: ErrorDetail; nodeName?: string; + sourceResourceId?: string; status?: string; } @@ -2506,6 +2510,13 @@ export enum KnownValidationStatus { Succeeded = "Succeeded" } +// @public +export enum KnownVaultSubResourceType { + AzureBackup = "AzureBackup", + AzureBackupSecondary = "AzureBackup_secondary", + AzureSiteRecovery = "AzureSiteRecovery" +} + // @public export enum KnownWorkloadItemType { Invalid = "Invalid", @@ -2900,6 +2911,7 @@ export interface PrivateEndpoint { // @public export interface PrivateEndpointConnection { + groupIds?: VaultSubResourceType[]; privateEndpoint?: PrivateEndpoint; privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; provisioningState?: ProvisioningState; @@ -2958,7 +2970,7 @@ export interface PrivateEndpointOperations { // @public export interface PrivateLinkServiceConnectionState { - actionRequired?: string; + actionsRequired?: string; description?: string; status?: PrivateEndpointConnectionStatus; } @@ -4041,6 +4053,9 @@ export interface VaultStorageConfigOperationResultResponse { // @public (undocumented) export type VaultStorageConfigOperationResultResponseUnion = VaultStorageConfigOperationResultResponse | PrepareDataMoveResponse; +// @public +export type VaultSubResourceType = string; + // @public export interface WeeklyRetentionFormat { daysOfTheWeek?: DayOfWeek[]; @@ -4100,7 +4115,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" | "SAPHanaDBInstance" | "SAPHanaHSR" | "SQLAvailabilityGroupContainer" | "SQLDataBase" | "SQLInstance"; + protectableItemType: "AzureFileShare" | "IaaSVMProtectableItem" | "Microsoft.ClassicCompute/virtualMachines" | "Microsoft.Compute/virtualMachines" | "AzureVmWorkloadProtectableItem" | "SAPAseSystem" | "SAPHanaDatabase" | "SAPHanaSystem" | "SAPHanaDBInstance" | "HanaHSRContainer" | "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 599628f304d7..e7c554abe59f 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/index.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/index.ts @@ -168,7 +168,7 @@ export type AzureVmWorkloadProtectableItemUnion = | AzureVmWorkloadSAPHanaDatabaseProtectableItem | AzureVmWorkloadSAPHanaSystemProtectableItem | AzureVmWorkloadSAPHanaDBInstance - | AzureVmWorkloadSAPHanaHSR + | AzureVmWorkloadSAPHanaHSRProtectableItem | AzureVmWorkloadSQLAvailabilityGroupProtectableItem | AzureVmWorkloadSQLDatabaseProtectableItem | AzureVmWorkloadSQLInstanceProtectableItem; @@ -513,6 +513,8 @@ export interface PrivateEndpointConnection { provisioningState?: ProvisioningState; /** Gets or sets private endpoint associated with the private endpoint connection */ privateEndpoint?: PrivateEndpoint; + /** Group Ids for the Private Endpoint */ + groupIds?: VaultSubResourceType[]; /** Gets or sets private link service connection state */ privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; } @@ -530,7 +532,7 @@ export interface PrivateLinkServiceConnectionState { /** Gets or sets description */ description?: string; /** Gets or sets actions required */ - actionRequired?: string; + actionsRequired?: string; } /** An error response from the Container Instance service. */ @@ -974,7 +976,7 @@ export interface WorkloadProtectableItem { | "SAPHanaDatabase" | "SAPHanaSystem" | "SAPHanaDBInstance" - | "SAPHanaHSR" + | "HanaHSRContainer" | "SQLAvailabilityGroupContainer" | "SQLDataBase" | "SQLInstance"; @@ -1349,6 +1351,21 @@ export interface AzureVmWorkloadProtectedItemExtendedInfo { recoveryModel?: string; } +/** This is used to represent the various nodes of the distributed container. */ +export interface DistributedNodesInfo { + /** Name of the node under a distributed container. */ + nodeName?: string; + /** + * Status of this Node. + * Failed | Succeeded + */ + status?: string; + /** Error Details if the Status is non-success. */ + errorDetail?: ErrorDetail; + /** ARM resource id of the node */ + sourceResourceId?: string; +} + /** Azure storage specific error information */ export interface AzureWorkloadErrorInfo { /** Error code. */ @@ -1914,19 +1931,6 @@ export interface InquiryValidation { readonly additionalDetail?: string; } -/** This is used to represent the various nodes of the distributed container. */ -export interface DistributedNodesInfo { - /** Name of the node under a distributed container. */ - nodeName?: string; - /** - * Status of this Node. - * Failed | Succeeded - */ - status?: string; - /** Error Details if the Status is non-success. */ - errorDetail?: ErrorDetail; -} - /** Pre-backup validation for Azure VM Workload provider. */ export interface PreBackupValidation { /** Status of protectable item, i.e. InProgress,Succeeded,Failed */ @@ -2508,6 +2512,8 @@ export interface AzureVmWorkloadProtectedItem extends ProtectedItem { extendedInfo?: AzureVmWorkloadProtectedItemExtendedInfo; /** Health details of different KPIs */ kpisHealths?: { [propertyName: string]: KPIResourceHealthDetails }; + /** List of the nodes in case of distributed container. */ + nodesList?: DistributedNodesInfo[]; } /** Additional information on Backup engine specific backup item. */ @@ -3280,7 +3286,7 @@ export interface AzureVmWorkloadProtectableItem | "SAPHanaDatabase" | "SAPHanaSystem" | "SAPHanaDBInstance" - | "SAPHanaHSR" + | "HanaHSRContainer" | "SQLAvailabilityGroupContainer" | "SQLDataBase" | "SQLInstance"; @@ -3303,6 +3309,8 @@ export interface AzureVmWorkloadProtectableItem subprotectableitemcount?: number; /** Pre-backup validation for protectable objects */ prebackupvalidation?: PreBackupValidation; + /** Indicates if item is protectable */ + isProtectable?: boolean; } /** Azure IaaS VM workload-specific Health Details. */ @@ -3633,11 +3641,11 @@ export interface AzureVmWorkloadSAPHanaDBInstance protectableItemType: "SAPHanaDBInstance"; } -/** Azure VM workload-specific protectable item representing SAP HANA Dbinstance. */ -export interface AzureVmWorkloadSAPHanaHSR +/** Azure VM workload-specific protectable item representing HANA HSR. */ +export interface AzureVmWorkloadSAPHanaHSRProtectableItem extends AzureVmWorkloadProtectableItem { /** Polymorphic discriminator, which specifies the different types this object can be */ - protectableItemType: "SAPHanaHSR"; + protectableItemType: "HanaHSRContainer"; } /** Azure VM workload-specific protectable item representing SQL Availability Group. */ @@ -3645,6 +3653,8 @@ export interface AzureVmWorkloadSQLAvailabilityGroupProtectableItem extends AzureVmWorkloadProtectableItem { /** Polymorphic discriminator, which specifies the different types this object can be */ protectableItemType: "SQLAvailabilityGroupContainer"; + /** List of the nodes in case of distributed container. */ + nodesList?: DistributedNodesInfo[]; } /** Azure VM workload-specific protectable item representing SQL Database. */ @@ -4230,6 +4240,27 @@ export enum KnownProvisioningState { */ export type ProvisioningState = string; +/** Known values of {@link VaultSubResourceType} that the service accepts. */ +export enum KnownVaultSubResourceType { + /** AzureBackup */ + AzureBackup = "AzureBackup", + /** AzureBackupSecondary */ + AzureBackupSecondary = "AzureBackup_secondary", + /** AzureSiteRecovery */ + AzureSiteRecovery = "AzureSiteRecovery" +} + +/** + * Defines values for VaultSubResourceType. \ + * {@link KnownVaultSubResourceType} can be used interchangeably with VaultSubResourceType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AzureBackup** \ + * **AzureBackup_secondary** \ + * **AzureSiteRecovery** + */ +export type VaultSubResourceType = string; + /** Known values of {@link PrivateEndpointConnectionStatus} that the service accepts. */ export enum KnownPrivateEndpointConnectionStatus { /** Pending */ diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/mappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/mappers.ts index 64e597009710..f8ca09f88860 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/mappers.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/mappers.ts @@ -828,6 +828,17 @@ export const PrivateEndpointConnection: coreClient.CompositeMapper = { className: "PrivateEndpoint" } }, + groupIds: { + serializedName: "groupIds", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, privateLinkServiceConnectionState: { serializedName: "privateLinkServiceConnectionState", type: { @@ -871,8 +882,8 @@ export const PrivateLinkServiceConnectionState: coreClient.CompositeMapper = { name: "String" } }, - actionRequired: { - serializedName: "actionRequired", + actionsRequired: { + serializedName: "actionsRequired", type: { name: "String" } @@ -3000,6 +3011,40 @@ export const AzureVmWorkloadProtectedItemExtendedInfo: coreClient.CompositeMappe } }; +export const DistributedNodesInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DistributedNodesInfo", + modelProperties: { + nodeName: { + serializedName: "nodeName", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + errorDetail: { + serializedName: "errorDetail", + type: { + name: "Composite", + className: "ErrorDetail" + } + }, + sourceResourceId: { + serializedName: "sourceResourceId", + type: { + name: "String" + } + } + } + } +}; + export const AzureWorkloadErrorInfo: coreClient.CompositeMapper = { type: { name: "Composite", @@ -4685,34 +4730,6 @@ export const InquiryValidation: coreClient.CompositeMapper = { } }; -export const DistributedNodesInfo: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DistributedNodesInfo", - modelProperties: { - nodeName: { - serializedName: "nodeName", - type: { - name: "String" - } - }, - status: { - serializedName: "status", - type: { - name: "String" - } - }, - errorDetail: { - serializedName: "errorDetail", - type: { - name: "Composite", - className: "ErrorDetail" - } - } - } - } -}; - export const PreBackupValidation: coreClient.CompositeMapper = { type: { name: "Composite", @@ -6296,6 +6313,18 @@ export const AzureVmWorkloadProtectedItem: coreClient.CompositeMapper = { type: { name: "Composite", className: "KPIResourceHealthDetails" } } } + }, + nodesList: { + serializedName: "nodesList", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DistributedNodesInfo" + } + } + } } } } @@ -8440,6 +8469,12 @@ export const AzureVmWorkloadProtectableItem: coreClient.CompositeMapper = { name: "Composite", className: "PreBackupValidation" } + }, + isProtectable: { + serializedName: "isProtectable", + type: { + name: "Boolean" + } } } } @@ -9178,11 +9213,11 @@ export const AzureVmWorkloadSAPHanaDBInstance: coreClient.CompositeMapper = { } }; -export const AzureVmWorkloadSAPHanaHSR: coreClient.CompositeMapper = { - serializedName: "SAPHanaHSR", +export const AzureVmWorkloadSAPHanaHSRProtectableItem: coreClient.CompositeMapper = { + serializedName: "HanaHSRContainer", type: { name: "Composite", - className: "AzureVmWorkloadSAPHanaHSR", + className: "AzureVmWorkloadSAPHanaHSRProtectableItem", uberParent: "AzureVmWorkloadProtectableItem", polymorphicDiscriminator: AzureVmWorkloadProtectableItem.type.polymorphicDiscriminator, @@ -9201,7 +9236,19 @@ export const AzureVmWorkloadSQLAvailabilityGroupProtectableItem: coreClient.Comp polymorphicDiscriminator: AzureVmWorkloadProtectableItem.type.polymorphicDiscriminator, modelProperties: { - ...AzureVmWorkloadProtectableItem.type.modelProperties + ...AzureVmWorkloadProtectableItem.type.modelProperties, + nodesList: { + serializedName: "nodesList", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DistributedNodesInfo" + } + } + } + } } } }; @@ -9542,7 +9589,7 @@ export let discriminators = { "AzureVmWorkloadProtectableItem.SAPHanaDatabase": AzureVmWorkloadSAPHanaDatabaseProtectableItem, "AzureVmWorkloadProtectableItem.SAPHanaSystem": AzureVmWorkloadSAPHanaSystemProtectableItem, "AzureVmWorkloadProtectableItem.SAPHanaDBInstance": AzureVmWorkloadSAPHanaDBInstance, - "AzureVmWorkloadProtectableItem.SAPHanaHSR": AzureVmWorkloadSAPHanaHSR, + "AzureVmWorkloadProtectableItem.HanaHSRContainer": AzureVmWorkloadSAPHanaHSRProtectableItem, "AzureVmWorkloadProtectableItem.SQLAvailabilityGroupContainer": AzureVmWorkloadSQLAvailabilityGroupProtectableItem, "AzureVmWorkloadProtectableItem.SQLDataBase": AzureVmWorkloadSQLDatabaseProtectableItem, "AzureVmWorkloadProtectableItem.SQLInstance": AzureVmWorkloadSQLInstanceProtectableItem, diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/parameters.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/parameters.ts index 20f56c8be745..1b3b73496e03 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/parameters.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/parameters.ts @@ -63,7 +63,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2023-02-01", + defaultValue: "2023-04-01", isConstant: true, serializedName: "api-version", type: { diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/recoveryServicesBackupClient.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/recoveryServicesBackupClient.ts index ba8b326f1adb..89fedab880d2 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/recoveryServicesBackupClient.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/recoveryServicesBackupClient.ts @@ -168,7 +168,7 @@ export class RecoveryServicesBackupClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-recoveryservicesbackup/10.1.1`; + const packageDetails = `azsdk-js-arm-recoveryservicesbackup/11.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -221,7 +221,7 @@ export class RecoveryServicesBackupClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2023-02-01"; + this.apiVersion = options.apiVersion || "2023-04-01"; this.backupResourceStorageConfigsNonCRR = new BackupResourceStorageConfigsNonCRRImpl( this ); diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/test/sampleTest.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * 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. + */ + +import { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +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(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); 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"