From a4182267c36a2eeb2eac7b9975379801c1c8f0b8 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 20 Dec 2024 19:03:36 +0000 Subject: [PATCH] CodeGen from PR 31905 in Azure/azure-rest-api-specs Merge eb156471ae216a28785fb4cd0145a84cc1810418 into 12492edbcf4c2d43d153da544ffbf1ffe7cbd20b --- common/config/rush/pnpm-lock.yaml | 29 +-- .../arm-recoveryservicesbackup/CHANGELOG.md | 28 ++- .../arm-recoveryservicesbackup/README.md | 1 - .../arm-recoveryservicesbackup/_meta.json | 8 +- .../arm-recoveryservicesbackup/package.json | 66 +++---- .../review/arm-recoveryservicesbackup.api.md | 14 ++ .../arm-recoveryservicesbackup/sample.env | 5 +- .../src/models/index.ts | 63 +++++-- .../src/models/mappers.ts | 176 +++++++++++++----- .../src/models/parameters.ts | 2 +- .../src/recoveryServicesBackupClient.ts | 4 +- .../test/sampleTest.ts | 43 +++++ .../arm-recoveryservicesbackup/tsconfig.json | 12 +- 13 files changed, 298 insertions(+), 153 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 09387f856d63..dd9172257f3d 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -1305,10 +1305,6 @@ packages: resolution: {integrity: sha512-6QmZ9aGdiz+9u7jPhQEg2zY/Tn8hwJrmjAMuHlWpnqE2kHvSDnKCE3BiNLZsENfi/IeLKBuW0QIdZ5UhbSSA0A==} engines: {node: '>=14.0.0'} - '@azure/arm-recoveryservices@5.4.0': - resolution: {integrity: sha512-+BsxHcFzJH28hMAsyI+bbAYVw79d12WagttmFvoidXXq76/5KpNCA2NWTGSV0AlJ+QaCF6+7I7P91PRYnJsr+w==} - engines: {node: '>=14.0.0'} - '@azure/communication-common@2.3.1': resolution: {integrity: sha512-6ZQt20iMZbyckQn4m1TDwiDv3Fzyt1h4lnQ1szBBns2x3VQY9XHbnskPtvUdwK/HT+c/1PoUwof3toy1AIznbQ==} engines: {node: '>=18.0.0'} @@ -3267,7 +3263,7 @@ packages: version: 0.0.0 '@rush-temp/arm-recoveryservicesbackup@file:projects/arm-recoveryservicesbackup.tgz': - resolution: {integrity: sha512-76IF5KI/OCOCdLaKuMR+C5gCzNfBLMzBCfgQ4d5cW9DovTXxhRzO9sXzKfwmgnL1+VUyvCo3GxhzTYm6ncwd7A==, tarball: file:projects/arm-recoveryservicesbackup.tgz} + resolution: {integrity: sha512-RTsnrMkBj9Ltm/kxlkj97IUfr5DHvc8xpEQB5qm4Za2S/wh/Nwc4V0p4plf2f3lYMw4dtX7+LLxx9+b7gnh9pw==, tarball: file:projects/arm-recoveryservicesbackup.tgz} version: 0.0.0 '@rush-temp/arm-recoveryservicesdatareplication@file:projects/arm-recoveryservicesdatareplication.tgz': @@ -3591,7 +3587,7 @@ packages: version: 0.0.0 '@rush-temp/confidential-ledger@file:projects/confidential-ledger.tgz': - resolution: {integrity: sha512-Gh04SARYLYKqfJcMhnzqQ4aoQcWNw+tokGGhULmwQhutUaYCVjx69T3fzYTkEeXjWx/289eFK3zBD8TMA3p7+g==, tarball: file:projects/confidential-ledger.tgz} + resolution: {integrity: sha512-SJzc0t6IU+ncIo/2rsSt6PQzH5KpCAMYcFLxYBb4OripIcE4U5gKmotJfB7koFj1/r0T/9eZqpeD+1OTT0dJQQ==, tarball: file:projects/confidential-ledger.tgz} version: 0.0.0 '@rush-temp/container-registry@file:projects/container-registry.tgz': @@ -8332,18 +8328,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@azure/arm-recoveryservices@5.4.0': - dependencies: - '@azure/abort-controller': 1.1.0 - '@azure/core-auth': 1.9.0 - '@azure/core-client': 1.9.2 - '@azure/core-lro': 2.7.2 - '@azure/core-paging': 1.6.2 - '@azure/core-rest-pipeline': 1.18.1 - tslib: 2.8.1 - transitivePeerDependencies: - - supports-color - '@azure/communication-common@2.3.1': dependencies: '@azure/abort-controller': 1.1.0 @@ -14286,18 +14270,17 @@ snapshots: dependencies: '@azure-tools/test-credential': 1.3.1 '@azure-tools/test-recorder': 3.5.2 - '@azure/abort-controller': 1.1.0 - '@azure/arm-recoveryservices': 5.4.0 '@azure/core-lro': 2.7.2 '@types/chai': 4.3.20 '@types/mocha': 10.0.10 '@types/node': 18.19.68 chai: 4.5.0 dotenv: 16.4.7 - mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) + mocha: 10.8.2 + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) tslib: 2.8.1 - typescript: 5.7.2 + tsx: 4.19.2 + typescript: 5.6.3 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/CHANGELOG.md b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/CHANGELOG.md index 96a0fb5c8177..36cc3e298505 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/CHANGELOG.md +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/CHANGELOG.md @@ -1,15 +1,25 @@ # Release History - -## 13.1.1 (Unreleased) - + +## 13.2.0 (2024-12-20) + ### Features Added -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Interface AzureFileShareRecoveryPoint has a new optional parameter recoveryPointTierDetails + - Interface AzureStorageContainer has a new optional parameter operationType + - Interface BackupEngineBaseResourceList has a new optional parameter nextLink + - Interface JobResourceList has a new optional parameter nextLink + - Interface ProtectableContainerResourceList has a new optional parameter nextLink + - Interface ProtectedItemResourceList has a new optional parameter nextLink + - Interface ProtectionContainerResourceList has a new optional parameter nextLink + - Interface ProtectionIntentResourceList has a new optional parameter nextLink + - Interface ProtectionPolicyResourceList has a new optional parameter nextLink + - Interface RecoveryPointResourceList has a new optional parameter nextLink + - Interface ResourceGuardProxyBaseResourceList has a new optional parameter nextLink + - Interface WorkloadItemResourceList has a new optional parameter nextLink + - Interface WorkloadProtectableItemResourceList has a new optional parameter nextLink + - Enum KnownOperationType has a new value Rehydrate + + ## 13.1.0 (2024-05-08) ### Features Added diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/README.md b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/README.md index 5fe6649da6b0..0a014f209a36 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/README.md +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/README.md @@ -44,7 +44,6 @@ npm install @azure/identity ``` You will also need to **register a new AAD application and grant access to Azure Recovery Services Backup** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). -Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`. For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/_meta.json b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/_meta.json index 8713457ed6d2..19968980aa8b 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/_meta.json +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/_meta.json @@ -1,8 +1,8 @@ { - "commit": "dd1b1d0a58a10c4a34f55231c7035c80dd09b746", + "commit": "65bef86e83769912b8c6a6155a13d6fe14b10b24", "readme": "specification/recoveryservicesbackup/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.7 --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.21 --generate-sample=true", + "autorest_command": "autorest --version=3.9.7 --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.12", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.7", - "use": "@autorest/typescript@6.0.21" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.16", + "use": "@autorest/typescript@^6.0.12" } \ No newline at end of file diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/package.json b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/package.json index d4ae83478bb5..5522b1101ebc 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/package.json +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/package.json @@ -3,16 +3,16 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for RecoveryServicesBackupClient.", - "version": "13.1.1", + "version": "13.2.0", "engines": { "node": ">=18.0.0" }, "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-auth": "^1.6.0", - "@azure/core-client": "^1.7.0", "@azure/core-lro": "^2.5.4", + "@azure/abort-controller": "^2.1.2", "@azure/core-paging": "^1.2.0", + "@azure/core-client": "^1.7.0", + "@azure/core-auth": "^1.6.0", "@azure/core-rest-pipeline": "^1.14.0", "tslib": "^2.2.0" }, @@ -28,19 +28,19 @@ "module": "./dist-esm/src/index.js", "types": "./types/arm-recoveryservicesbackup.d.ts", "devDependencies": { - "@azure-tools/test-credential": "^1.1.0", - "@azure-tools/test-recorder": "^3.0.0", - "@azure/arm-recoveryservices": "^5.2.0", + "typescript": "~5.6.2", + "dotenv": "^16.0.0", "@azure/dev-tool": "^1.0.0", - "@azure/identity": "^4.0.1", - "@types/chai": "^4.2.8", + "@azure/identity": "^4.2.1", + "@azure-tools/test-recorder": "^3.0.0", + "@azure-tools/test-credential": "^1.1.0", + "mocha": "^10.0.0", "@types/mocha": "^10.0.0", - "@types/node": "^18.0.0", + "tsx": "^4.7.1", + "@types/chai": "^4.2.8", "chai": "^4.2.0", - "dotenv": "^16.0.0", - "mocha": "^11.0.2", - "ts-node": "^10.0.0", - "typescript": "~5.7.2" + "@types/node": "^18.0.0", + "ts-node": "^10.0.0" }, "repository": { "type": "git", @@ -68,28 +68,28 @@ ], "scripts": { "build": "npm run clean && tsc && dev-tool run bundle && npm run minify && dev-tool run vendored mkdirp ./review && npm run extract-api", - "build:browser": "echo skipped", + "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", + "prepack": "npm run build", + "pack": "npm pack 2>&1", + "extract-api": "dev-tool run extract-api", + "lint": "echo skipped", + "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "build:node": "echo skipped", - "build:samples": "echo skipped.", + "build:browser": "echo skipped", "build:test": "echo skipped", + "build:samples": "echo skipped.", "check-format": "echo skipped", - "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "execute:samples": "echo skipped", - "extract-api": "dev-tool run extract-api", "format": "echo skipped", - "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "integration-test:browser": "echo skipped", - "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", - "lint": "echo skipped", - "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", - "pack": "npm pack 2>&1", - "prepack": "npm run build", "test": "npm run integration-test", - "test:browser": "echo skipped", "test:node": "echo skipped", + "test:browser": "echo skipped", "unit-test": "npm run unit-test:node && npm run unit-test:browser", - "unit-test:browser": "echo skipped", "unit-test:node": "dev-tool run vendored 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": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:browser": "echo skipped", "update-snippets": "echo skipped" }, "sideEffects": false, @@ -102,13 +102,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 a552e48bdee7..fe45ecddfa20 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/review/arm-recoveryservicesbackup.api.md +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/review/arm-recoveryservicesbackup.api.md @@ -88,6 +88,7 @@ export interface AzureFileShareRecoveryPoint extends RecoveryPoint { objectType: "AzureFileShareRecoveryPoint"; recoveryPointProperties?: RecoveryPointProperties; recoveryPointSizeInGB?: number; + recoveryPointTierDetails?: RecoveryPointTierInformation[]; recoveryPointTime?: Date; recoveryPointType?: string; } @@ -296,6 +297,7 @@ export interface AzureSqlProtectionPolicy extends ProtectionPolicy { export interface AzureStorageContainer extends ProtectionContainer { acquireStorageAccountLock?: AcquireStorageAccountLock; containerType: "StorageContainer"; + operationType?: OperationType; protectedItemCount?: number; resourceGroup?: string; sourceResourceId?: string; @@ -775,6 +777,7 @@ export interface BackupEngineBaseResource extends Resource { // @public export interface BackupEngineBaseResourceList extends ResourceList { + nextLink?: string; value?: BackupEngineBaseResource[]; } @@ -2039,6 +2042,7 @@ export interface JobResource extends Resource { // @public export interface JobResourceList extends ResourceList { + nextLink?: string; value?: JobResource[]; } @@ -2357,6 +2361,7 @@ export enum KnownOperationStatusValues { export enum KnownOperationType { Invalid = "Invalid", Register = "Register", + Rehydrate = "Rehydrate", Reregister = "Reregister" } @@ -3088,6 +3093,7 @@ export interface ProtectableContainerResource extends Resource { // @public export interface ProtectableContainerResourceList extends ResourceList { + nextLink?: string; value?: ProtectableContainerResource[]; } @@ -3187,6 +3193,7 @@ export interface ProtectedItemResource extends Resource { // @public export interface ProtectedItemResourceList extends ResourceList { + nextLink?: string; value?: ProtectedItemResource[]; } @@ -3262,6 +3269,7 @@ export interface ProtectionContainerResource extends Resource { // @public export interface ProtectionContainerResourceList extends ResourceList { + nextLink?: string; value?: ProtectionContainerResource[]; } @@ -3362,6 +3370,7 @@ export interface ProtectionIntentResource extends Resource { // @public export interface ProtectionIntentResourceList extends ResourceList { + nextLink?: string; value?: ProtectionIntentResource[]; } @@ -3450,6 +3459,7 @@ export interface ProtectionPolicyResource extends Resource { // @public export interface ProtectionPolicyResourceList extends ResourceList { + nextLink?: string; value?: ProtectionPolicyResource[]; } @@ -3509,6 +3519,7 @@ export interface RecoveryPointResource extends Resource { // @public export interface RecoveryPointResourceList extends ResourceList { + nextLink?: string; value?: RecoveryPointResource[]; } @@ -3782,6 +3793,7 @@ export interface ResourceGuardProxyBaseResource extends Resource { // @public export interface ResourceGuardProxyBaseResourceList extends ResourceList { + nextLink?: string; value?: ResourceGuardProxyBaseResource[]; } @@ -4298,6 +4310,7 @@ export interface WorkloadItemResource extends Resource { // @public export interface WorkloadItemResourceList extends ResourceList { + nextLink?: string; value?: WorkloadItemResource[]; } @@ -4323,6 +4336,7 @@ export interface WorkloadProtectableItemResource extends Resource { // @public export interface WorkloadProtectableItemResourceList extends ResourceList { + nextLink?: string; value?: WorkloadProtectableItemResource[]; } diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/sample.env b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/sample.env index 672847a3fea0..508439fc7d62 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/sample.env +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/sample.env @@ -1,4 +1 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/index.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/index.ts index 6b7c59c60c45..47a42bfb2c1c 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/index.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/index.ts @@ -1163,6 +1163,16 @@ export interface RecoveryPointProperties { isSoftDeleted?: boolean; } +/** Recovery point tier information. */ +export interface RecoveryPointTierInformation { + /** Recovery point tier type. */ + type?: RecoveryPointTierType; + /** Recovery point tier status. */ + status?: RecoveryPointTierStatus; + /** Recovery point tier status. */ + extendedInfo?: { [propertyName: string]: string }; +} + /** Restore file specs like file path, type and target folder path info. */ export interface RestoreFileSpecs { /** Source File/Folder path */ @@ -1495,16 +1505,6 @@ export interface PointInTimeRange { endTime?: Date; } -/** Recovery point tier information. */ -export interface RecoveryPointTierInformation { - /** Recovery point tier type. */ - type?: RecoveryPointTierType; - /** Recovery point tier status. */ - status?: RecoveryPointTierStatus; - /** Recovery point tier status. */ - extendedInfo?: { [propertyName: string]: string }; -} - export interface RecoveryPointMoveReadinessInfo { isReadyForMove?: boolean; additionalInfo?: string; @@ -2372,66 +2372,88 @@ export interface AzureWorkloadContainerAutoProtectionIntent export interface ProtectionIntentResourceList extends ResourceList { /** List of resources. */ value?: ProtectionIntentResource[]; + /** The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. */ + nextLink?: string; } /** List of RecoveryPoint resources */ export interface RecoveryPointResourceList extends ResourceList { /** List of resources. */ value?: RecoveryPointResource[]; + /** The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. */ + nextLink?: string; } /** List of ProtectionPolicy resources */ export interface ProtectionPolicyResourceList extends ResourceList { /** List of resources. */ value?: ProtectionPolicyResource[]; + /** The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. */ + nextLink?: string; } /** List of Job resources */ export interface JobResourceList extends ResourceList { /** List of resources. */ value?: JobResource[]; + /** The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. */ + nextLink?: string; } /** List of ProtectedItem resources */ export interface ProtectedItemResourceList extends ResourceList { /** List of resources. */ value?: ProtectedItemResource[]; + /** The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. */ + nextLink?: string; } /** List of BackupEngineBase resources */ export interface BackupEngineBaseResourceList extends ResourceList { /** List of resources. */ value?: BackupEngineBaseResource[]; + /** The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. */ + nextLink?: string; } /** List of ProtectableContainer resources */ export interface ProtectableContainerResourceList extends ResourceList { /** List of resources. */ value?: ProtectableContainerResource[]; + /** The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. */ + nextLink?: string; } /** List of WorkloadItem resources */ export interface WorkloadItemResourceList extends ResourceList { /** List of resources. */ value?: WorkloadItemResource[]; + /** The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. */ + nextLink?: string; } /** List of WorkloadProtectableItem resources */ export interface WorkloadProtectableItemResourceList extends ResourceList { /** List of resources. */ value?: WorkloadProtectableItemResource[]; + /** The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. */ + nextLink?: string; } /** List of ProtectionContainer resources */ export interface ProtectionContainerResourceList extends ResourceList { /** List of resources. */ value?: ProtectionContainerResource[]; + /** The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. */ + nextLink?: string; } /** List of ResourceGuardProxyBase resources */ export interface ResourceGuardProxyBaseResourceList extends ResourceList { /** List of resources. */ value?: ResourceGuardProxyBaseResource[]; + /** The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. */ + nextLink?: string; } export interface BackupResourceEncryptionConfigExtended @@ -2682,6 +2704,8 @@ export interface AzureFileShareRecoveryPoint extends RecoveryPoint { recoveryPointSizeInGB?: number; /** Properties of Recovery Point */ recoveryPointProperties?: RecoveryPointProperties; + /** Recovery point tier information. */ + recoveryPointTierDetails?: RecoveryPointTierInformation[]; } /** Workload specific recovery point, specifically encapsulates full/diff recovery point */ @@ -3262,6 +3286,8 @@ export interface AzureStorageContainer extends ProtectionContainer { protectedItemCount?: number; /** Whether storage account lock is to be acquired for this container or not. */ acquireStorageAccountLock?: AcquireStorageAccountLock; + /** Re-Do Operation */ + operationType?: OperationType; } /** Base class for generic container of backup items */ @@ -3502,6 +3528,10 @@ export interface TieringCostSavingInfo extends TieringCostInfo { /** Azure IaaS VM workload-specific Health Details. */ export interface AzureIaaSVMHealthDetails extends ResourceHealthDetails {} +/** RecoveryPoint Tier Information V2 */ +export interface RecoveryPointTierInformationV2 + extends RecoveryPointTierInformation {} + /** Log policy schedule. */ export interface LogSchedulePolicy extends SchedulePolicy { /** Polymorphic discriminator, which specifies the different types this object can be */ @@ -3568,10 +3598,6 @@ export interface SimpleRetentionPolicy extends RetentionPolicy { retentionDuration?: RetentionDuration; } -/** RecoveryPoint Tier Information V2 */ -export interface RecoveryPointTierInformationV2 - extends RecoveryPointTierInformation {} - /** Azure Recovery Services Vault specific protection intent item. */ export interface AzureWorkloadAutoProtectionIntent extends AzureRecoveryServiceVaultProtectionIntent { @@ -5393,6 +5419,8 @@ export enum KnownOperationType { Register = "Register", /** Reregister */ Reregister = "Reregister", + /** Rehydrate */ + Rehydrate = "Rehydrate", } /** @@ -5402,7 +5430,8 @@ export enum KnownOperationType { * ### Known values supported by the service * **Invalid** \ * **Register** \ - * **Reregister** + * **Reregister** \ + * **Rehydrate** */ export type OperationType = string; @@ -5753,8 +5782,6 @@ export type RecoveryPointTierType = | "InstantRP" | "HardenedRP" | "ArchivedRP"; -/** Defines values for JobSupportedAction. */ -export type JobSupportedAction = "Invalid" | "Cancellable" | "Retriable"; /** Defines values for RecoveryPointTierStatus. */ export type RecoveryPointTierStatus = | "Invalid" @@ -5762,6 +5789,8 @@ export type RecoveryPointTierStatus = | "Disabled" | "Deleted" | "Rehydrated"; +/** Defines values for JobSupportedAction. */ +export type JobSupportedAction = "Invalid" | "Cancellable" | "Retriable"; /** Defines values for DayOfWeek. */ export type DayOfWeek = | "Sunday" diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/mappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/mappers.ts index 6b3d9d02002b..49f84f1c6f2b 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/mappers.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/mappers.ts @@ -2523,6 +2523,42 @@ export const RecoveryPointProperties: coreClient.CompositeMapper = { }, }; +export const RecoveryPointTierInformation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RecoveryPointTierInformation", + modelProperties: { + type: { + serializedName: "type", + type: { + name: "Enum", + allowedValues: ["Invalid", "InstantRP", "HardenedRP", "ArchivedRP"], + }, + }, + status: { + serializedName: "status", + type: { + name: "Enum", + allowedValues: [ + "Invalid", + "Valid", + "Disabled", + "Deleted", + "Rehydrated", + ], + }, + }, + extendedInfo: { + serializedName: "extendedInfo", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + }, + }, +}; + export const RestoreFileSpecs: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3397,42 +3433,6 @@ export const PointInTimeRange: coreClient.CompositeMapper = { }, }; -export const RecoveryPointTierInformation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RecoveryPointTierInformation", - modelProperties: { - type: { - serializedName: "type", - type: { - name: "Enum", - allowedValues: ["Invalid", "InstantRP", "HardenedRP", "ArchivedRP"], - }, - }, - status: { - serializedName: "status", - type: { - name: "Enum", - allowedValues: [ - "Invalid", - "Valid", - "Disabled", - "Deleted", - "Rehydrated", - ], - }, - }, - extendedInfo: { - serializedName: "extendedInfo", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - }, - }, -}; - export const RecoveryPointMoveReadinessInfo: coreClient.CompositeMapper = { type: { name: "Composite", @@ -5924,6 +5924,12 @@ export const ProtectionIntentResourceList: coreClient.CompositeMapper = { }, }, }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, }, }, }; @@ -5946,6 +5952,12 @@ export const RecoveryPointResourceList: coreClient.CompositeMapper = { }, }, }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, }, }, }; @@ -5968,6 +5980,12 @@ export const ProtectionPolicyResourceList: coreClient.CompositeMapper = { }, }, }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, }, }, }; @@ -5990,6 +6008,12 @@ export const JobResourceList: coreClient.CompositeMapper = { }, }, }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, }, }, }; @@ -6012,6 +6036,12 @@ export const ProtectedItemResourceList: coreClient.CompositeMapper = { }, }, }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, }, }, }; @@ -6034,6 +6064,12 @@ export const BackupEngineBaseResourceList: coreClient.CompositeMapper = { }, }, }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, }, }, }; @@ -6056,6 +6092,12 @@ export const ProtectableContainerResourceList: coreClient.CompositeMapper = { }, }, }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, }, }, }; @@ -6078,6 +6120,12 @@ export const WorkloadItemResourceList: coreClient.CompositeMapper = { }, }, }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, }, }, }; @@ -6100,6 +6148,12 @@ export const WorkloadProtectableItemResourceList: coreClient.CompositeMapper = { }, }, }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, }, }, }; @@ -6122,6 +6176,12 @@ export const ProtectionContainerResourceList: coreClient.CompositeMapper = { }, }, }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, }, }, }; @@ -6144,6 +6204,12 @@ export const ResourceGuardProxyBaseResourceList: coreClient.CompositeMapper = { }, }, }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, }, }, }; @@ -6786,6 +6852,18 @@ export const AzureFileShareRecoveryPoint: coreClient.CompositeMapper = { className: "RecoveryPointProperties", }, }, + recoveryPointTierDetails: { + serializedName: "recoveryPointTierDetails", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RecoveryPointTierInformation", + }, + }, + }, + }, }, }, }; @@ -8387,6 +8465,12 @@ export const AzureStorageContainer: coreClient.CompositeMapper = { name: "String", }, }, + operationType: { + serializedName: "operationType", + type: { + name: "String", + }, + }, }, }, }; @@ -8980,6 +9064,16 @@ export const AzureIaaSVMHealthDetails: coreClient.CompositeMapper = { }, }; +export const RecoveryPointTierInformationV2: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RecoveryPointTierInformationV2", + modelProperties: { + ...RecoveryPointTierInformation.type.modelProperties, + }, + }, +}; + export const LogSchedulePolicy: coreClient.CompositeMapper = { serializedName: "LogSchedulePolicy", type: { @@ -9176,16 +9270,6 @@ export const SimpleRetentionPolicy: coreClient.CompositeMapper = { }, }; -export const RecoveryPointTierInformationV2: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RecoveryPointTierInformationV2", - modelProperties: { - ...RecoveryPointTierInformation.type.modelProperties, - }, - }, -}; - export const AzureWorkloadAutoProtectionIntent: coreClient.CompositeMapper = { serializedName: "AzureWorkloadAutoProtectionIntent", type: { diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/parameters.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/parameters.ts index 1d6f85927a3e..82ef58aa9f55 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/parameters.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/parameters.ts @@ -64,7 +64,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2024-04-01", + defaultValue: "2024-10-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 bd9563dba5e0..c361a0c7d720 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/recoveryServicesBackupClient.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/recoveryServicesBackupClient.ts @@ -174,7 +174,7 @@ export class RecoveryServicesBackupClient extends coreClient.ServiceClient { credential: credentials, }; - const packageDetails = `azsdk-js-arm-recoveryservicesbackup/13.1.1`; + const packageDetails = `azsdk-js-arm-recoveryservicesbackup/13.2.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -228,7 +228,7 @@ export class RecoveryServicesBackupClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2024-04-01"; + this.apiVersion = options.apiVersion || "2024-10-01"; this.backupResourceStorageConfigsNonCRR = new BackupResourceStorageConfigsNonCRRImpl(this); this.protectionIntentOperations = new ProtectionIntentOperationsImpl(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..d64be981b694 --- /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..b35d05ad6e9d 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" + "src/**/*.ts", + "test/**/*.ts" ], "exclude": [ "node_modules"