From 479795a165253d6c8683118ed372405235c90ed4 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 18 Sep 2023 16:23:13 +0000 Subject: [PATCH] CodeGen from PR 24632 in Azure/azure-rest-api-specs Merge f0a494476ff4dcf778043e565412beb7d432056d into def187e2e78d7173d8fdd7f77740dd9719e1dfbf --- common/config/rush/pnpm-lock.yaml | 143 ++++++++- .../arm-confidentialledger/CHANGELOG.md | 35 ++- .../arm-confidentialledger/_meta.json | 8 +- .../arm-confidentialledger/package.json | 24 +- .../review/arm-confidentialledger.api.md | 98 +++++- .../src/confidentialLedgerClient.ts | 2 +- .../src/models/index.ts | 127 +++++++- .../src/models/mappers.ts | 174 +++++++++++ .../src/models/parameters.ts | 28 +- .../src/operations/ledger.ts | 259 +++++++++++++++ .../src/operations/managedCCFOperations.ts | 295 +++++++++++++++++- .../src/operationsInterfaces/ledger.ts | 67 +++- .../managedCCFOperations.ts | 80 ++++- .../arm-confidentialledger/test/sampleTest.ts | 43 +++ .../arm-confidentialledger/tsconfig.json | 10 +- 15 files changed, 1328 insertions(+), 65 deletions(-) create mode 100644 sdk/confidentialledger/arm-confidentialledger/test/sampleTest.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 39307bde93d4..4835e8794576 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -1903,6 +1903,18 @@ packages: resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} dev: false + /@isaacs/cliui@8.0.2: + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + dependencies: + string-width: 5.1.2 + string-width-cjs: /string-width@4.2.3 + strip-ansi: 7.1.0 + strip-ansi-cjs: /strip-ansi@6.0.1 + wrap-ansi: 8.1.0 + wrap-ansi-cjs: /wrap-ansi@7.0.0 + dev: false + /@istanbuljs/load-nyc-config@1.1.0: resolution: {integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==} engines: {node: '>=8'} @@ -2327,6 +2339,13 @@ packages: '@opentelemetry/core': 1.17.0(@opentelemetry/api@1.6.0) dev: false + /@pkgjs/parseargs@0.11.0: + resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} + engines: {node: '>=14'} + requiresBuild: true + dev: false + optional: true + /@protobufjs/aspromise@1.1.2: resolution: {integrity: sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==} dev: false @@ -3397,6 +3416,11 @@ packages: engines: {node: '>=8'} dev: false + /ansi-regex@6.0.1: + resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==} + engines: {node: '>=12'} + dev: false + /ansi-styles@3.2.1: resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} engines: {node: '>=4'} @@ -3411,6 +3435,11 @@ packages: color-convert: 2.0.1 dev: false + /ansi-styles@6.2.1: + resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} + engines: {node: '>=12'} + dev: false + /anymatch@3.1.3: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} engines: {node: '>= 8'} @@ -4449,7 +4478,11 @@ packages: dependencies: semver: 7.5.4 shelljs: 0.8.5 - typescript: 5.3.0-dev.20230914 + typescript: 5.3.0-dev.20230918 + dev: false + + /eastasianwidth@0.2.0: + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} dev: false /ecdsa-sig-formatter@1.0.11: @@ -4478,6 +4511,10 @@ packages: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} dev: false + /emoji-regex@9.2.2: + resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + dev: false + /encodeurl@1.0.2: resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==} engines: {node: '>= 0.8'} @@ -5230,6 +5267,14 @@ packages: signal-exit: 3.0.7 dev: false + /foreground-child@3.1.1: + resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==} + engines: {node: '>=14'} + dependencies: + cross-spawn: 7.0.3 + signal-exit: 4.1.0 + dev: false + /form-data@4.0.0: resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} engines: {node: '>= 6'} @@ -5410,13 +5455,25 @@ packages: resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==} dev: false + /glob@10.3.4: + resolution: {integrity: sha512-6LFElP3A+i/Q8XQKEvZjkEWEOTgAIALR9AO2rwT8bgPhDd1anmqDJDZ6lLddI4ehxxxR1S5RIqKe1uapMQfYaQ==} + engines: {node: '>=16 || 14 >=14.17'} + hasBin: true + dependencies: + foreground-child: 3.1.1 + jackspeak: 2.3.3 + minimatch: 9.0.3 + minipass: 7.0.3 + path-scurry: 1.10.1 + dev: false + /glob@7.1.3: resolution: {integrity: sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==} dependencies: fs.realpath: 1.0.0 inflight: 1.0.6 inherits: 2.0.4 - minimatch: 3.0.4 + minimatch: 3.1.2 once: 1.4.0 path-is-absolute: 1.0.1 dev: false @@ -6111,6 +6168,15 @@ packages: istanbul-lib-report: 3.0.1 dev: false + /jackspeak@2.3.3: + resolution: {integrity: sha512-R2bUw+kVZFS/h1AZqBKrSgDmdmjApzgY0AlCPumopFiAlbUxE2gf+SCuBzQ0cP5hHmUmFYF5yw55T97Th5Kstg==} + engines: {node: '>=14'} + dependencies: + '@isaacs/cliui': 8.0.2 + optionalDependencies: + '@pkgjs/parseargs': 0.11.0 + dev: false + /jju@1.4.0: resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==} dev: false @@ -6636,6 +6702,11 @@ packages: get-func-name: 2.0.0 dev: false + /lru-cache@10.0.1: + resolution: {integrity: sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==} + engines: {node: 14 || >=16.14} + dev: false + /lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} dependencies: @@ -6885,6 +6956,13 @@ packages: brace-expansion: 2.0.1 dev: false + /minimatch@9.0.3: + resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} + engines: {node: '>=16 || 14 >=14.17'} + dependencies: + brace-expansion: 2.0.1 + dev: false + /minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} dev: false @@ -6894,6 +6972,11 @@ packages: engines: {node: '>=8'} dev: false + /minipass@7.0.3: + resolution: {integrity: sha512-LhbbwCfz3vsb12j/WkWQPZfKTsgqIe1Nf/ti1pKjYESGLHIVjWU96G9/ljLH4F9mWNVhlQOm0VySdAWzf05dpg==} + engines: {node: '>=16 || 14 >=14.17'} + dev: false + /mitt@3.0.0: resolution: {integrity: sha512-7dX2/10ITVyqh4aOSVI9gdape+t9l2/8QxHrFmUXu4EEUpdlxl6RudZUPZoc+zuY2hk1j7XxVroIVIan/pD/SQ==} dev: false @@ -7574,6 +7657,14 @@ packages: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} dev: false + /path-scurry@1.10.1: + resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==} + engines: {node: '>=16 || 14 >=14.17'} + dependencies: + lru-cache: 10.0.1 + minipass: 7.0.3 + dev: false + /path-scurry@1.6.3: resolution: {integrity: sha512-RAmB+n30SlN+HnNx6EbcpoDy9nwdpcGPnEKrJnu6GZoDWBdIjo1UQMVtW2ybtC7LC2oKLcMq8y5g8WnKLiod9g==} engines: {node: '>=16 || 14 >=14.17'} @@ -8162,6 +8253,14 @@ packages: glob: 7.2.3 dev: false + /rimraf@5.0.1: + resolution: {integrity: sha512-OfFZdwtd3lZ+XZzYP/6gTACubwFcHdLRqS9UX3UwpU2dnGQYkPFISRwvM3w9IiB2w7bW5qGo/uAwE4SmXXSKvg==} + engines: {node: '>=14'} + hasBin: true + dependencies: + glob: 10.3.4 + dev: false + /rollup-plugin-polyfill-node@0.12.0(rollup@2.79.1): resolution: {integrity: sha512-PWEVfDxLEKt8JX1nZ0NkUAgXpkZMTb85rO/Ru9AQ69wYW8VUCfDgP4CGRXXWYni5wDF0vIeR1UoF3Jmw/Lt3Ug==} peerDependencies: @@ -8420,6 +8519,11 @@ packages: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} dev: false + /signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + dev: false + /simple-concat@1.0.1: resolution: {integrity: sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==} dev: false @@ -8613,6 +8717,15 @@ packages: strip-ansi: 6.0.1 dev: false + /string-width@5.1.2: + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} + dependencies: + eastasianwidth: 0.2.0 + emoji-regex: 9.2.2 + strip-ansi: 7.1.0 + dev: false + /string.prototype.padend@3.1.5: resolution: {integrity: sha512-DOB27b/2UTTD+4myKUFh+/fXWcu/UDyASIXfg+7VzoCNNGOfWvoyU/x5pvVHr++ztyt/oSYI1BcWBBG/hmlNjA==} engines: {node: '>= 0.4'} @@ -8684,6 +8797,13 @@ packages: ansi-regex: 5.0.1 dev: false + /strip-ansi@7.1.0: + resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} + engines: {node: '>=12'} + dependencies: + ansi-regex: 6.0.1 + dev: false + /strip-bom@3.0.0: resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} engines: {node: '>=4'} @@ -9090,8 +9210,8 @@ packages: hasBin: true dev: false - /typescript@5.3.0-dev.20230914: - resolution: {integrity: sha512-fLOsSwW/WYEdqhxDb4iaJ2IkPmxMM6di8p++ey3SlOTaK0sdczIYVl9tlCxkajWOp0UnvBfO6Bxe+g9xxZMypw==} + /typescript@5.3.0-dev.20230918: + resolution: {integrity: sha512-n0gvj+RwjGVYi2fyz/7Bd2lCrh/uRROVyQtgUwXXG2p6tyCUw8UE+7lOdr2dp3hVn6Uo4EliGLfajoWNqhFmuw==} engines: {node: '>=14.17'} hasBin: true dev: false @@ -9369,6 +9489,15 @@ packages: strip-ansi: 6.0.1 dev: false + /wrap-ansi@8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} + dependencies: + ansi-styles: 6.2.1 + string-width: 5.1.2 + strip-ansi: 7.1.0 + dev: false + /wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} dev: false @@ -11527,7 +11656,7 @@ packages: dev: false file:projects/arm-confidentialledger.tgz: - resolution: {integrity: sha512-+vp2KbaCecnQ7McRzF4s3Xf70r6pR0ty/WQMCbArqB/8KiAQ/RzD8cRAlheCI9RP7/ddpKQmMfBYUrZHXUMvMw==, tarball: file:projects/arm-confidentialledger.tgz} + resolution: {integrity: sha512-nRuQRlkOyYTJHv+1L77dvdkgFGGjJoQH3DL9fFJbIApY8lh6oHt6QPM5JtA6+VnTLF7ndXK+FS7P2d+3Jjk4ug==, tarball: file:projects/arm-confidentialledger.tgz} name: '@rush-temp/arm-confidentialledger' version: 0.0.0 dependencies: @@ -11544,7 +11673,7 @@ packages: dotenv: 16.3.1 mkdirp: 2.1.6 mocha: 7.2.0 - rimraf: 3.0.2 + rimraf: 5.0.1 rollup: 2.79.1 rollup-plugin-sourcemaps: 0.6.3(@types/node@14.18.59)(rollup@2.79.1) ts-node: 10.9.1(@types/node@14.18.59)(typescript@5.0.4) @@ -13599,7 +13728,7 @@ packages: dev: false file:projects/arm-kubernetesconfiguration.tgz: - resolution: {integrity: sha512-Vtd6acIs4TSRXgwwGhhiuYro9mKCC8pdZgZ61I/Wyvn7oeMJkT3VWBgL/eTX8pcpjElQYtChUNVhYVDc3dgZeQ==, tarball: file:projects/arm-kubernetesconfiguration.tgz} + resolution: {integrity: sha512-0F6suOdAKZ5oj9aoGm3/LPN5GWfCHChasc31cvDK7yJ95M5OlG8jI5ivMYj0dqLo+0a/pNzhIJ1GLtELbk1wzw==, tarball: file:projects/arm-kubernetesconfiguration.tgz} name: '@rush-temp/arm-kubernetesconfiguration' version: 0.0.0 dependencies: diff --git a/sdk/confidentialledger/arm-confidentialledger/CHANGELOG.md b/sdk/confidentialledger/arm-confidentialledger/CHANGELOG.md index 2db1b8d0394d..3b4a95235b4b 100644 --- a/sdk/confidentialledger/arm-confidentialledger/CHANGELOG.md +++ b/sdk/confidentialledger/arm-confidentialledger/CHANGELOG.md @@ -1,23 +1,26 @@ # Release History - -## 1.3.0-beta.2 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 1.3.0-beta.1 (2023-04-19) + +## 1.3.0-beta.2 (2023-09-18) **Features** - Added operation group ManagedCCFOperations + - Added operation Ledger.beginBackup + - Added operation Ledger.beginBackupAndWait + - Added operation Ledger.beginRestore + - Added operation Ledger.beginRestoreAndWait - Added Interface CertificateTags + - Added Interface ConfidentialLedgerBackup + - Added Interface ConfidentialLedgerBackupResponse + - Added Interface ConfidentialLedgerRestore + - Added Interface ConfidentialLedgerRestoreResponse - Added Interface DeploymentType + - Added Interface LedgerBackupOptionalParams + - Added Interface LedgerRestoreOptionalParams - Added Interface ManagedCCF + - Added Interface ManagedCCFBackup + - Added Interface ManagedCCFBackupOptionalParams + - Added Interface ManagedCCFBackupResponse - Added Interface ManagedCCFCreateOptionalParams - Added Interface ManagedCCFDeleteOptionalParams - Added Interface ManagedCCFGetOptionalParams @@ -27,16 +30,24 @@ - Added Interface ManagedCCFListBySubscriptionNextOptionalParams - Added Interface ManagedCCFListBySubscriptionOptionalParams - Added Interface ManagedCCFProperties + - Added Interface ManagedCCFRestore + - Added Interface ManagedCCFRestoreOptionalParams + - Added Interface ManagedCCFRestoreResponse - Added Interface ManagedCCFUpdateOptionalParams - Added Interface MemberIdentityCertificate - Added Interface TrackedResource - Added Type Alias LanguageRuntime + - Added Type Alias LedgerBackupResponse + - Added Type Alias LedgerRestoreResponse + - Added Type Alias ManagedCCFBackupOperationResponse - Added Type Alias ManagedCCFCreateResponse - Added Type Alias ManagedCCFGetResponse - Added Type Alias ManagedCCFListByResourceGroupNextResponse - Added Type Alias ManagedCCFListByResourceGroupResponse - Added Type Alias ManagedCCFListBySubscriptionNextResponse - Added Type Alias ManagedCCFListBySubscriptionResponse + - Added Type Alias ManagedCCFRestoreOperationResponse + - Added Type Alias ManagedCCFUpdateResponse - Added Type Alias RunningState - Interface LedgerProperties has a new optional parameter runningState - Added Enum KnownLanguageRuntime diff --git a/sdk/confidentialledger/arm-confidentialledger/_meta.json b/sdk/confidentialledger/arm-confidentialledger/_meta.json index 2608349fc342..8f5840a7eb15 100644 --- a/sdk/confidentialledger/arm-confidentialledger/_meta.json +++ b/sdk/confidentialledger/arm-confidentialledger/_meta.json @@ -1,8 +1,8 @@ { - "commit": "536b9a8ae0f41df1f1479b1a42c8d656cbf0c8d6", + "commit": "fc583022806af7935b167a9a0c08c5b6ca6f7d51", "readme": "specification/confidentialledger/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\\confidentialledger\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.10 --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/confidentialledger/resource-manager/readme.md --use=@autorest/typescript@^6.0.4", "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.10" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.2", + "use": "@autorest/typescript@^6.0.4" } \ No newline at end of file diff --git a/sdk/confidentialledger/arm-confidentialledger/package.json b/sdk/confidentialledger/arm-confidentialledger/package.json index 6e8e5e13ff86..36e22ff8579f 100644 --- a/sdk/confidentialledger/arm-confidentialledger/package.json +++ b/sdk/confidentialledger/arm-confidentialledger/package.json @@ -8,12 +8,12 @@ "node": ">=14.0.0" }, "dependencies": { - "@azure/core-lro": "^2.5.0", + "@azure/core-lro": "^2.5.4", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", "@azure/core-client": "^1.7.0", "@azure/core-auth": "^1.3.0", - "@azure/core-rest-pipeline": "^1.8.0", + "@azure/core-rest-pipeline": "^1.12.0", "tslib": "^2.2.0" }, "keywords": [ @@ -38,7 +38,7 @@ "rollup-plugin-sourcemaps": "^0.6.3", "typescript": "~5.0.0", "uglify-js": "^3.4.9", - "rimraf": "^3.0.0", + "rimraf": "^5.0.0", "dotenv": "^16.0.0", "@azure/identity": "^2.0.1", "@azure-tools/test-recorder": "^3.0.0", @@ -48,8 +48,8 @@ "chai": "^4.2.0", "cross-env": "^7.0.2", "@types/node": "^14.0.0", - "@azure/dev-tool": "^1.0.0", - "ts-node": "^10.0.0" + "ts-node": "^10.0.0", + "@azure/dev-tool": "^1.0.0" }, "repository": { "type": "git", @@ -84,7 +84,7 @@ "extract-api": "api-extractor run --local", "lint": "echo skipped", "audit": "echo skipped", - "clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log", + "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "build:node": "echo skipped", "build:browser": "echo skipped", "build:test": "echo skipped", @@ -112,13 +112,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/confidentialledger/arm-confidentialledger", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-confidentialledger?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/confidentialledger/arm-confidentialledger" +} \ No newline at end of file diff --git a/sdk/confidentialledger/arm-confidentialledger/review/arm-confidentialledger.api.md b/sdk/confidentialledger/arm-confidentialledger/review/arm-confidentialledger.api.md index e7bba8cd1299..3bf1ee85e44b 100644 --- a/sdk/confidentialledger/arm-confidentialledger/review/arm-confidentialledger.api.md +++ b/sdk/confidentialledger/arm-confidentialledger/review/arm-confidentialledger.api.md @@ -58,6 +58,17 @@ export interface ConfidentialLedger extends TrackedResource { properties?: LedgerProperties; } +// @public +export interface ConfidentialLedgerBackup { + restoreRegion?: string; + uri: string; +} + +// @public +export interface ConfidentialLedgerBackupResponse { + readonly message?: string; +} + // @public (undocumented) export class ConfidentialLedgerClient extends coreClient.ServiceClient { // (undocumented) @@ -89,6 +100,18 @@ export interface ConfidentialLedgerList { value?: ConfidentialLedger[]; } +// @public +export interface ConfidentialLedgerRestore { + fileShareName: string; + restoreRegion: string; + uri: string; +} + +// @public +export interface ConfidentialLedgerRestoreResponse { + readonly message?: string; +} + // @public export type CreatedByType = string; @@ -180,10 +203,14 @@ export type LanguageRuntime = string; // @public export interface Ledger { + beginBackup(resourceGroupName: string, ledgerName: string, confidentialLedger: ConfidentialLedgerBackup, options?: LedgerBackupOptionalParams): Promise, LedgerBackupResponse>>; + beginBackupAndWait(resourceGroupName: string, ledgerName: string, confidentialLedger: ConfidentialLedgerBackup, options?: LedgerBackupOptionalParams): Promise; beginCreate(resourceGroupName: string, ledgerName: string, confidentialLedger: ConfidentialLedger, options?: LedgerCreateOptionalParams): Promise, LedgerCreateResponse>>; beginCreateAndWait(resourceGroupName: string, ledgerName: string, confidentialLedger: ConfidentialLedger, options?: LedgerCreateOptionalParams): Promise; beginDelete(resourceGroupName: string, ledgerName: string, options?: LedgerDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, ledgerName: string, options?: LedgerDeleteOptionalParams): Promise; + beginRestore(resourceGroupName: string, ledgerName: string, confidentialLedger: ConfidentialLedgerRestore, options?: LedgerRestoreOptionalParams): Promise, LedgerRestoreResponse>>; + beginRestoreAndWait(resourceGroupName: string, ledgerName: string, confidentialLedger: ConfidentialLedgerRestore, options?: LedgerRestoreOptionalParams): Promise; beginUpdate(resourceGroupName: string, ledgerName: string, confidentialLedger: ConfidentialLedger, options?: LedgerUpdateOptionalParams): Promise, LedgerUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, ledgerName: string, confidentialLedger: ConfidentialLedger, options?: LedgerUpdateOptionalParams): Promise; get(resourceGroupName: string, ledgerName: string, options?: LedgerGetOptionalParams): Promise; @@ -191,6 +218,15 @@ export interface Ledger { listBySubscription(options?: LedgerListBySubscriptionOptionalParams): PagedAsyncIterableIterator; } +// @public +export interface LedgerBackupOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type LedgerBackupResponse = ConfidentialLedgerBackupResponse; + // @public export interface LedgerCreateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -256,6 +292,15 @@ export interface LedgerProperties { runningState?: RunningState; } +// @public +export interface LedgerRestoreOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type LedgerRestoreResponse = ConfidentialLedgerRestoreResponse; + // @public export type LedgerRoleName = string; @@ -276,6 +321,26 @@ export interface ManagedCCF extends TrackedResource { properties?: ManagedCCFProperties; } +// @public +export interface ManagedCCFBackup { + restoreRegion?: string; + uri: string; +} + +// @public +export type ManagedCCFBackupOperationResponse = ManagedCCFBackupResponse; + +// @public +export interface ManagedCCFBackupOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface ManagedCCFBackupResponse { + readonly message?: string; +} + // @public export interface ManagedCCFCreateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -336,12 +401,16 @@ export type ManagedCCFListBySubscriptionResponse = ManagedCCFList; // @public export interface ManagedCCFOperations { + beginBackup(resourceGroupName: string, appName: string, managedCCF: ManagedCCFBackup, options?: ManagedCCFBackupOptionalParams): Promise, ManagedCCFBackupOperationResponse>>; + beginBackupAndWait(resourceGroupName: string, appName: string, managedCCF: ManagedCCFBackup, options?: ManagedCCFBackupOptionalParams): Promise; beginCreate(resourceGroupName: string, appName: string, managedCCF: ManagedCCF, options?: ManagedCCFCreateOptionalParams): Promise, ManagedCCFCreateResponse>>; beginCreateAndWait(resourceGroupName: string, appName: string, managedCCF: ManagedCCF, options?: ManagedCCFCreateOptionalParams): Promise; beginDelete(resourceGroupName: string, appName: string, options?: ManagedCCFDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, appName: string, options?: ManagedCCFDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, appName: string, managedCCF: ManagedCCF, options?: ManagedCCFUpdateOptionalParams): Promise, void>>; - beginUpdateAndWait(resourceGroupName: string, appName: string, managedCCF: ManagedCCF, options?: ManagedCCFUpdateOptionalParams): Promise; + beginRestore(resourceGroupName: string, appName: string, managedCCF: ManagedCCFRestore, options?: ManagedCCFRestoreOptionalParams): Promise, ManagedCCFRestoreOperationResponse>>; + beginRestoreAndWait(resourceGroupName: string, appName: string, managedCCF: ManagedCCFRestore, options?: ManagedCCFRestoreOptionalParams): Promise; + beginUpdate(resourceGroupName: string, appName: string, managedCCF: ManagedCCF, options?: ManagedCCFUpdateOptionalParams): Promise, ManagedCCFUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, appName: string, managedCCF: ManagedCCF, options?: ManagedCCFUpdateOptionalParams): Promise; get(resourceGroupName: string, appName: string, options?: ManagedCCFGetOptionalParams): Promise; listByResourceGroup(resourceGroupName: string, options?: ManagedCCFListByResourceGroupOptionalParams): PagedAsyncIterableIterator; listBySubscription(options?: ManagedCCFListBySubscriptionOptionalParams): PagedAsyncIterableIterator; @@ -356,6 +425,28 @@ export interface ManagedCCFProperties { memberIdentityCertificates?: MemberIdentityCertificate[]; nodeCount?: number; readonly provisioningState?: ProvisioningState; + runningState?: RunningState; +} + +// @public +export interface ManagedCCFRestore { + fileShareName: string; + restoreRegion: string; + uri: string; +} + +// @public +export type ManagedCCFRestoreOperationResponse = ManagedCCFRestoreResponse; + +// @public +export interface ManagedCCFRestoreOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface ManagedCCFRestoreResponse { + readonly message?: string; } // @public @@ -364,6 +455,9 @@ export interface ManagedCCFUpdateOptionalParams extends coreClient.OperationOpti updateIntervalInMs?: number; } +// @public +export type ManagedCCFUpdateResponse = ManagedCCF; + // @public export interface MemberIdentityCertificate { certificate?: string; diff --git a/sdk/confidentialledger/arm-confidentialledger/src/confidentialLedgerClient.ts b/sdk/confidentialledger/arm-confidentialledger/src/confidentialLedgerClient.ts index 172069e12599..d2b47857e2b5 100644 --- a/sdk/confidentialledger/arm-confidentialledger/src/confidentialLedgerClient.ts +++ b/sdk/confidentialledger/arm-confidentialledger/src/confidentialLedgerClient.ts @@ -118,7 +118,7 @@ export class ConfidentialLedgerClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2023-01-26-preview"; + this.apiVersion = options.apiVersion || "2023-06-28-preview"; this.operations = new OperationsImpl(this); this.ledger = new LedgerImpl(this); this.managedCCFOperations = new ManagedCCFOperationsImpl(this); diff --git a/sdk/confidentialledger/arm-confidentialledger/src/models/index.ts b/sdk/confidentialledger/arm-confidentialledger/src/models/index.ts index 348e026296b5..fc337df1dc83 100644 --- a/sdk/confidentialledger/arm-confidentialledger/src/models/index.ts +++ b/sdk/confidentialledger/arm-confidentialledger/src/models/index.ts @@ -214,6 +214,42 @@ export interface ConfidentialLedgerList { nextLink?: string; } +/** Object representing Backup properties of a Confidential Ledger Resource. */ +export interface ConfidentialLedgerBackup { + /** The region where the backup of the ledger will eventually be restored to. */ + restoreRegion?: string; + /** SAS URI used to access the backup Fileshare. */ + uri: string; +} + +/** Object representing the backup response of a Confidential Ledger Resource. */ +export interface ConfidentialLedgerBackupResponse { + /** + * Response body stating if the ledger is being backed up. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; +} + +/** Object representing Restore properties of a Confidential Ledger Resource. */ +export interface ConfidentialLedgerRestore { + /** Fileshare where the ledger backup is stored. */ + fileShareName: string; + /** The region the ledger is being restored to. */ + restoreRegion: string; + /** SAS URI used to access the backup fileshare. */ + uri: string; +} + +/** Object representing the backup response of a Confidential Ledger Resource. */ +export interface ConfidentialLedgerRestoreResponse { + /** + * Response body stating if the ledger is being restored. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; +} + /** Additional Managed CCF properties. */ export interface ManagedCCFProperties { /** @@ -235,8 +271,10 @@ export interface ManagedCCFProperties { memberIdentityCertificates?: MemberIdentityCertificate[]; /** Deployment Type of Managed CCF */ deploymentType?: DeploymentType; + /** Object representing RunningState for Managed CCF. */ + runningState?: RunningState; /** - * Provisioning state of Ledger Resource + * Provisioning state of Managed CCF Resource * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: ProvisioningState; @@ -270,6 +308,42 @@ export interface ManagedCCFList { nextLink?: string; } +/** Object representing Backup properties of a Managed CCF Resource. */ +export interface ManagedCCFBackup { + /** The region where the backup of the managed CCF resource will eventually be restored to. */ + restoreRegion?: string; + /** SAS URI used to access the backup Fileshare. */ + uri: string; +} + +/** Object representing the backup response of a Managed CCF Resource. */ +export interface ManagedCCFBackupResponse { + /** + * Response body stating if the managed CCF resource is being backed up. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; +} + +/** Object representing Restore properties of Managed CCF Resource. */ +export interface ManagedCCFRestore { + /** Fileshare where the managed CCF resource backup is stored. */ + fileShareName: string; + /** The region the managed CCF resource is being restored to. */ + restoreRegion: string; + /** SAS URI used to access the backup Fileshare. */ + uri: string; +} + +/** Object representing the restore response of a Managed CCF Resource. */ +export interface ManagedCCFRestoreResponse { + /** + * Response body stating if the managed CCF resource is being restored. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; +} + /** Tags for Managed CCF Certificates */ export interface CertificateTags { /** Additional tags for Managed CCF Certificates */ @@ -538,6 +612,30 @@ export interface LedgerListBySubscriptionOptionalParams /** Contains response data for the listBySubscription operation. */ export type LedgerListBySubscriptionResponse = ConfidentialLedgerList; +/** Optional parameters. */ +export interface LedgerBackupOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the backup operation. */ +export type LedgerBackupResponse = ConfidentialLedgerBackupResponse; + +/** Optional parameters. */ +export interface LedgerRestoreOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the restore operation. */ +export type LedgerRestoreResponse = ConfidentialLedgerRestoreResponse; + /** Optional parameters. */ export interface LedgerListByResourceGroupNextOptionalParams extends coreClient.OperationOptions {} @@ -589,6 +687,9 @@ export interface ManagedCCFUpdateOptionalParams resumeFrom?: string; } +/** Contains response data for the update operation. */ +export type ManagedCCFUpdateResponse = ManagedCCF; + /** Optional parameters. */ export interface ManagedCCFListByResourceGroupOptionalParams extends coreClient.OperationOptions { @@ -609,6 +710,30 @@ export interface ManagedCCFListBySubscriptionOptionalParams /** Contains response data for the listBySubscription operation. */ export type ManagedCCFListBySubscriptionResponse = ManagedCCFList; +/** Optional parameters. */ +export interface ManagedCCFBackupOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the backup operation. */ +export type ManagedCCFBackupOperationResponse = ManagedCCFBackupResponse; + +/** Optional parameters. */ +export interface ManagedCCFRestoreOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the restore operation. */ +export type ManagedCCFRestoreOperationResponse = ManagedCCFRestoreResponse; + /** Optional parameters. */ export interface ManagedCCFListByResourceGroupNextOptionalParams extends coreClient.OperationOptions {} diff --git a/sdk/confidentialledger/arm-confidentialledger/src/models/mappers.ts b/sdk/confidentialledger/arm-confidentialledger/src/models/mappers.ts index 153c4c4abed1..0690cdca1ae7 100644 --- a/sdk/confidentialledger/arm-confidentialledger/src/models/mappers.ts +++ b/sdk/confidentialledger/arm-confidentialledger/src/models/mappers.ts @@ -479,6 +479,90 @@ export const ConfidentialLedgerList: coreClient.CompositeMapper = { } }; +export const ConfidentialLedgerBackup: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConfidentialLedgerBackup", + modelProperties: { + restoreRegion: { + serializedName: "restoreRegion", + type: { + name: "String" + } + }, + uri: { + serializedName: "uri", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ConfidentialLedgerBackupResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConfidentialLedgerBackupResponse", + modelProperties: { + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ConfidentialLedgerRestore: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConfidentialLedgerRestore", + modelProperties: { + fileShareName: { + serializedName: "fileShareName", + required: true, + type: { + name: "String" + } + }, + restoreRegion: { + serializedName: "restoreRegion", + required: true, + type: { + name: "String" + } + }, + uri: { + serializedName: "uri", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ConfidentialLedgerRestoreResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConfidentialLedgerRestoreResponse", + modelProperties: { + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + export const ManagedCCFProperties: coreClient.CompositeMapper = { type: { name: "Composite", @@ -524,6 +608,12 @@ export const ManagedCCFProperties: coreClient.CompositeMapper = { className: "DeploymentType" } }, + runningState: { + serializedName: "runningState", + type: { + name: "String" + } + }, provisioningState: { serializedName: "provisioningState", readOnly: true, @@ -617,6 +707,90 @@ export const ManagedCCFList: coreClient.CompositeMapper = { } }; +export const ManagedCCFBackup: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedCCFBackup", + modelProperties: { + restoreRegion: { + serializedName: "restoreRegion", + type: { + name: "String" + } + }, + uri: { + serializedName: "uri", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ManagedCCFBackupResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedCCFBackupResponse", + modelProperties: { + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ManagedCCFRestore: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedCCFRestore", + modelProperties: { + fileShareName: { + serializedName: "fileShareName", + required: true, + type: { + name: "String" + } + }, + restoreRegion: { + serializedName: "restoreRegion", + required: true, + type: { + name: "String" + } + }, + uri: { + serializedName: "uri", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ManagedCCFRestoreResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedCCFRestoreResponse", + modelProperties: { + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + export const CertificateTags: coreClient.CompositeMapper = { type: { name: "Composite", diff --git a/sdk/confidentialledger/arm-confidentialledger/src/models/parameters.ts b/sdk/confidentialledger/arm-confidentialledger/src/models/parameters.ts index c5e868499cc2..d16c78604d15 100644 --- a/sdk/confidentialledger/arm-confidentialledger/src/models/parameters.ts +++ b/sdk/confidentialledger/arm-confidentialledger/src/models/parameters.ts @@ -14,7 +14,11 @@ import { import { CheckNameAvailabilityRequest as CheckNameAvailabilityRequestMapper, ConfidentialLedger as ConfidentialLedgerMapper, - ManagedCCF as ManagedCCFMapper + ConfidentialLedgerBackup as ConfidentialLedgerBackupMapper, + ConfidentialLedgerRestore as ConfidentialLedgerRestoreMapper, + ManagedCCF as ManagedCCFMapper, + ManagedCCFBackup as ManagedCCFBackupMapper, + ManagedCCFRestore as ManagedCCFRestoreMapper } from "../models/mappers"; export const accept: OperationParameter = { @@ -44,7 +48,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2023-01-26-preview", + defaultValue: "2023-06-28-preview", isConstant: true, serializedName: "api-version", type: { @@ -140,6 +144,16 @@ export const filter: OperationQueryParameter = { } }; +export const confidentialLedger1: OperationParameter = { + parameterPath: "confidentialLedger", + mapper: ConfidentialLedgerBackupMapper +}; + +export const confidentialLedger2: OperationParameter = { + parameterPath: "confidentialLedger", + mapper: ConfidentialLedgerRestoreMapper +}; + export const appName: OperationURLParameter = { parameterPath: "appName", mapper: { @@ -158,3 +172,13 @@ export const managedCCF: OperationParameter = { parameterPath: "managedCCF", mapper: ManagedCCFMapper }; + +export const managedCCF1: OperationParameter = { + parameterPath: "managedCCF", + mapper: ManagedCCFBackupMapper +}; + +export const managedCCF2: OperationParameter = { + parameterPath: "managedCCF", + mapper: ManagedCCFRestoreMapper +}; diff --git a/sdk/confidentialledger/arm-confidentialledger/src/operations/ledger.ts b/sdk/confidentialledger/arm-confidentialledger/src/operations/ledger.ts index 646edfc2845f..e08ab58c7663 100644 --- a/sdk/confidentialledger/arm-confidentialledger/src/operations/ledger.ts +++ b/sdk/confidentialledger/arm-confidentialledger/src/operations/ledger.ts @@ -34,6 +34,12 @@ import { LedgerCreateResponse, LedgerUpdateOptionalParams, LedgerUpdateResponse, + ConfidentialLedgerBackup, + LedgerBackupOptionalParams, + LedgerBackupResponse, + ConfidentialLedgerRestore, + LedgerRestoreOptionalParams, + LedgerRestoreResponse, LedgerListByResourceGroupNextResponse, LedgerListBySubscriptionNextResponse } from "../models"; @@ -486,6 +492,193 @@ export class LedgerImpl implements Ledger { ); } + /** + * Backs up a Confidential Ledger Resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ledgerName Name of the Confidential Ledger + * @param confidentialLedger Confidential Ledger Backup Request Body + * @param options The options parameters. + */ + async beginBackup( + resourceGroupName: string, + ledgerName: string, + confidentialLedger: ConfidentialLedgerBackup, + options?: LedgerBackupOptionalParams + ): Promise< + SimplePollerLike, LedgerBackupResponse> + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, ledgerName, confidentialLedger, options }, + spec: backupOperationSpec + }); + const poller = await createHttpPoller< + LedgerBackupResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Backs up a Confidential Ledger Resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ledgerName Name of the Confidential Ledger + * @param confidentialLedger Confidential Ledger Backup Request Body + * @param options The options parameters. + */ + async beginBackupAndWait( + resourceGroupName: string, + ledgerName: string, + confidentialLedger: ConfidentialLedgerBackup, + options?: LedgerBackupOptionalParams + ): Promise { + const poller = await this.beginBackup( + resourceGroupName, + ledgerName, + confidentialLedger, + options + ); + return poller.pollUntilDone(); + } + + /** + * Restores a Confidential Ledger Resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ledgerName Name of the Confidential Ledger + * @param confidentialLedger Confidential Ledger Restore Request Body + * @param options The options parameters. + */ + async beginRestore( + resourceGroupName: string, + ledgerName: string, + confidentialLedger: ConfidentialLedgerRestore, + options?: LedgerRestoreOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + LedgerRestoreResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, ledgerName, confidentialLedger, options }, + spec: restoreOperationSpec + }); + const poller = await createHttpPoller< + LedgerRestoreResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Restores a Confidential Ledger Resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ledgerName Name of the Confidential Ledger + * @param confidentialLedger Confidential Ledger Restore Request Body + * @param options The options parameters. + */ + async beginRestoreAndWait( + resourceGroupName: string, + ledgerName: string, + confidentialLedger: ConfidentialLedgerRestore, + options?: LedgerRestoreOptionalParams + ): Promise { + const poller = await this.beginRestore( + resourceGroupName, + ledgerName, + confidentialLedger, + options + ); + return poller.pollUntilDone(); + } + /** * ListByResourceGroupNext * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -670,6 +863,72 @@ const listBySubscriptionOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const backupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/ledgers/{ledgerName}/backup", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ConfidentialLedgerBackupResponse + }, + 201: { + bodyMapper: Mappers.ConfidentialLedgerBackupResponse + }, + 202: { + bodyMapper: Mappers.ConfidentialLedgerBackupResponse + }, + 204: { + bodyMapper: Mappers.ConfidentialLedgerBackupResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.confidentialLedger1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.ledgerName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const restoreOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/ledgers/{ledgerName}/restore", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ConfidentialLedgerRestoreResponse + }, + 201: { + bodyMapper: Mappers.ConfidentialLedgerRestoreResponse + }, + 202: { + bodyMapper: Mappers.ConfidentialLedgerRestoreResponse + }, + 204: { + bodyMapper: Mappers.ConfidentialLedgerRestoreResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.confidentialLedger2, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.ledgerName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", diff --git a/sdk/confidentialledger/arm-confidentialledger/src/operations/managedCCFOperations.ts b/sdk/confidentialledger/arm-confidentialledger/src/operations/managedCCFOperations.ts index b2ca96adc15e..5247074e823e 100644 --- a/sdk/confidentialledger/arm-confidentialledger/src/operations/managedCCFOperations.ts +++ b/sdk/confidentialledger/arm-confidentialledger/src/operations/managedCCFOperations.ts @@ -33,6 +33,13 @@ import { ManagedCCFCreateOptionalParams, ManagedCCFCreateResponse, ManagedCCFUpdateOptionalParams, + ManagedCCFUpdateResponse, + ManagedCCFBackup, + ManagedCCFBackupOptionalParams, + ManagedCCFBackupOperationResponse, + ManagedCCFRestore, + ManagedCCFRestoreOptionalParams, + ManagedCCFRestoreOperationResponse, ManagedCCFListByResourceGroupNextResponse, ManagedCCFListBySubscriptionNextResponse } from "../models"; @@ -376,11 +383,16 @@ export class ManagedCCFOperationsImpl implements ManagedCCFOperations { appName: string, managedCCF: ManagedCCF, options?: ManagedCCFUpdateOptionalParams - ): Promise, void>> { + ): Promise< + SimplePollerLike< + OperationState, + ManagedCCFUpdateResponse + > + > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( @@ -421,7 +433,10 @@ export class ManagedCCFOperationsImpl implements ManagedCCFOperations { args: { resourceGroupName, appName, managedCCF, options }, spec: updateOperationSpec }); - const poller = await createHttpPoller>(lro, { + const poller = await createHttpPoller< + ManagedCCFUpdateResponse, + OperationState + >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); @@ -441,7 +456,7 @@ export class ManagedCCFOperationsImpl implements ManagedCCFOperations { appName: string, managedCCF: ManagedCCF, options?: ManagedCCFUpdateOptionalParams - ): Promise { + ): Promise { const poller = await this.beginUpdate( resourceGroupName, appName, @@ -479,6 +494,196 @@ export class ManagedCCFOperationsImpl implements ManagedCCFOperations { ); } + /** + * Backs up a Managed CCF Resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF + * @param managedCCF Managed CCF Backup Request Body + * @param options The options parameters. + */ + async beginBackup( + resourceGroupName: string, + appName: string, + managedCCF: ManagedCCFBackup, + options?: ManagedCCFBackupOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ManagedCCFBackupOperationResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, appName, managedCCF, options }, + spec: backupOperationSpec + }); + const poller = await createHttpPoller< + ManagedCCFBackupOperationResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Backs up a Managed CCF Resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF + * @param managedCCF Managed CCF Backup Request Body + * @param options The options parameters. + */ + async beginBackupAndWait( + resourceGroupName: string, + appName: string, + managedCCF: ManagedCCFBackup, + options?: ManagedCCFBackupOptionalParams + ): Promise { + const poller = await this.beginBackup( + resourceGroupName, + appName, + managedCCF, + options + ); + return poller.pollUntilDone(); + } + + /** + * Restores a Managed CCF Resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF + * @param managedCCF Managed CCF Restore Request Body + * @param options The options parameters. + */ + async beginRestore( + resourceGroupName: string, + appName: string, + managedCCF: ManagedCCFRestore, + options?: ManagedCCFRestoreOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ManagedCCFRestoreOperationResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, appName, managedCCF, options }, + spec: restoreOperationSpec + }); + const poller = await createHttpPoller< + ManagedCCFRestoreOperationResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Restores a Managed CCF Resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF + * @param managedCCF Managed CCF Restore Request Body + * @param options The options parameters. + */ + async beginRestoreAndWait( + resourceGroupName: string, + appName: string, + managedCCF: ManagedCCFRestore, + options?: ManagedCCFRestoreOptionalParams + ): Promise { + const poller = await this.beginRestore( + resourceGroupName, + appName, + managedCCF, + options + ); + return poller.pollUntilDone(); + } + /** * ListByResourceGroupNext * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -597,10 +802,18 @@ const updateOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/managedCCFs/{appName}", httpMethod: "PATCH", responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, + 200: { + bodyMapper: Mappers.ManagedCCF + }, + 201: { + bodyMapper: Mappers.ManagedCCF + }, + 202: { + bodyMapper: Mappers.ManagedCCF + }, + 204: { + bodyMapper: Mappers.ManagedCCF + }, default: { bodyMapper: Mappers.ErrorResponse } @@ -655,6 +868,72 @@ const listBySubscriptionOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const backupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/managedCCFs/{appName}/backup", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ManagedCCFBackupResponse + }, + 201: { + bodyMapper: Mappers.ManagedCCFBackupResponse + }, + 202: { + bodyMapper: Mappers.ManagedCCFBackupResponse + }, + 204: { + bodyMapper: Mappers.ManagedCCFBackupResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.managedCCF1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.appName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const restoreOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/managedCCFs/{appName}/restore", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ManagedCCFRestoreResponse + }, + 201: { + bodyMapper: Mappers.ManagedCCFRestoreResponse + }, + 202: { + bodyMapper: Mappers.ManagedCCFRestoreResponse + }, + 204: { + bodyMapper: Mappers.ManagedCCFRestoreResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.managedCCF2, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.appName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", diff --git a/sdk/confidentialledger/arm-confidentialledger/src/operationsInterfaces/ledger.ts b/sdk/confidentialledger/arm-confidentialledger/src/operationsInterfaces/ledger.ts index e7078b004574..f749e991eadf 100644 --- a/sdk/confidentialledger/arm-confidentialledger/src/operationsInterfaces/ledger.ts +++ b/sdk/confidentialledger/arm-confidentialledger/src/operationsInterfaces/ledger.ts @@ -18,7 +18,13 @@ import { LedgerCreateOptionalParams, LedgerCreateResponse, LedgerUpdateOptionalParams, - LedgerUpdateResponse + LedgerUpdateResponse, + ConfidentialLedgerBackup, + LedgerBackupOptionalParams, + LedgerBackupResponse, + ConfidentialLedgerRestore, + LedgerRestoreOptionalParams, + LedgerRestoreResponse } from "../models"; /// @@ -129,4 +135,63 @@ export interface Ledger { confidentialLedger: ConfidentialLedger, options?: LedgerUpdateOptionalParams ): Promise; + /** + * Backs up a Confidential Ledger Resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ledgerName Name of the Confidential Ledger + * @param confidentialLedger Confidential Ledger Backup Request Body + * @param options The options parameters. + */ + beginBackup( + resourceGroupName: string, + ledgerName: string, + confidentialLedger: ConfidentialLedgerBackup, + options?: LedgerBackupOptionalParams + ): Promise< + SimplePollerLike, LedgerBackupResponse> + >; + /** + * Backs up a Confidential Ledger Resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ledgerName Name of the Confidential Ledger + * @param confidentialLedger Confidential Ledger Backup Request Body + * @param options The options parameters. + */ + beginBackupAndWait( + resourceGroupName: string, + ledgerName: string, + confidentialLedger: ConfidentialLedgerBackup, + options?: LedgerBackupOptionalParams + ): Promise; + /** + * Restores a Confidential Ledger Resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ledgerName Name of the Confidential Ledger + * @param confidentialLedger Confidential Ledger Restore Request Body + * @param options The options parameters. + */ + beginRestore( + resourceGroupName: string, + ledgerName: string, + confidentialLedger: ConfidentialLedgerRestore, + options?: LedgerRestoreOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + LedgerRestoreResponse + > + >; + /** + * Restores a Confidential Ledger Resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ledgerName Name of the Confidential Ledger + * @param confidentialLedger Confidential Ledger Restore Request Body + * @param options The options parameters. + */ + beginRestoreAndWait( + resourceGroupName: string, + ledgerName: string, + confidentialLedger: ConfidentialLedgerRestore, + options?: LedgerRestoreOptionalParams + ): Promise; } diff --git a/sdk/confidentialledger/arm-confidentialledger/src/operationsInterfaces/managedCCFOperations.ts b/sdk/confidentialledger/arm-confidentialledger/src/operationsInterfaces/managedCCFOperations.ts index a2da92855da3..eeb05e32ef44 100644 --- a/sdk/confidentialledger/arm-confidentialledger/src/operationsInterfaces/managedCCFOperations.ts +++ b/sdk/confidentialledger/arm-confidentialledger/src/operationsInterfaces/managedCCFOperations.ts @@ -17,7 +17,14 @@ import { ManagedCCFDeleteOptionalParams, ManagedCCFCreateOptionalParams, ManagedCCFCreateResponse, - ManagedCCFUpdateOptionalParams + ManagedCCFUpdateOptionalParams, + ManagedCCFUpdateResponse, + ManagedCCFBackup, + ManagedCCFBackupOptionalParams, + ManagedCCFBackupOperationResponse, + ManagedCCFRestore, + ManagedCCFRestoreOptionalParams, + ManagedCCFRestoreOperationResponse } from "../models"; /// @@ -115,7 +122,12 @@ export interface ManagedCCFOperations { appName: string, managedCCF: ManagedCCF, options?: ManagedCCFUpdateOptionalParams - ): Promise, void>>; + ): Promise< + SimplePollerLike< + OperationState, + ManagedCCFUpdateResponse + > + >; /** * Updates properties of Managed CCF * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -128,5 +140,67 @@ export interface ManagedCCFOperations { appName: string, managedCCF: ManagedCCF, options?: ManagedCCFUpdateOptionalParams - ): Promise; + ): Promise; + /** + * Backs up a Managed CCF Resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF + * @param managedCCF Managed CCF Backup Request Body + * @param options The options parameters. + */ + beginBackup( + resourceGroupName: string, + appName: string, + managedCCF: ManagedCCFBackup, + options?: ManagedCCFBackupOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ManagedCCFBackupOperationResponse + > + >; + /** + * Backs up a Managed CCF Resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF + * @param managedCCF Managed CCF Backup Request Body + * @param options The options parameters. + */ + beginBackupAndWait( + resourceGroupName: string, + appName: string, + managedCCF: ManagedCCFBackup, + options?: ManagedCCFBackupOptionalParams + ): Promise; + /** + * Restores a Managed CCF Resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF + * @param managedCCF Managed CCF Restore Request Body + * @param options The options parameters. + */ + beginRestore( + resourceGroupName: string, + appName: string, + managedCCF: ManagedCCFRestore, + options?: ManagedCCFRestoreOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ManagedCCFRestoreOperationResponse + > + >; + /** + * Restores a Managed CCF Resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF + * @param managedCCF Managed CCF Restore Request Body + * @param options The options parameters. + */ + beginRestoreAndWait( + resourceGroupName: string, + appName: string, + managedCCF: ManagedCCFRestore, + options?: ManagedCCFRestoreOptionalParams + ): Promise; } diff --git a/sdk/confidentialledger/arm-confidentialledger/test/sampleTest.ts b/sdk/confidentialledger/arm-confidentialledger/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/confidentialledger/arm-confidentialledger/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/confidentialledger/arm-confidentialledger/tsconfig.json b/sdk/confidentialledger/arm-confidentialledger/tsconfig.json index 125d598a0eb4..3e6ae96443f3 100644 --- a/sdk/confidentialledger/arm-confidentialledger/tsconfig.json +++ b/sdk/confidentialledger/arm-confidentialledger/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-confidentialledger": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"