From 4564fffe5ac80435830d4c668c076c101147e359 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 24 Oct 2022 20:38:40 +0000 Subject: [PATCH] CodeGen from PR 20647 in Azure/azure-rest-api-specs Merge a0e2ee5b6d5c284bb865e1a69abd78fbb3adad60 into 979a6eb0751db347a75bbf909b69cafcab1a147e --- common/config/rush/pnpm-lock.yaml | 56 +- .../arm-confidentialledger/CHANGELOG.md | 44 +- .../arm-confidentialledger/README.md | 2 +- .../arm-confidentialledger/_meta.json | 8 +- .../arm-confidentialledger/package.json | 16 +- .../review/arm-confidentialledger.api.md | 155 ++++ .../src/confidentialLedgerClient.ts | 58 +- .../src/models/index.ts | 228 ++++++ .../src/models/mappers.ts | 297 ++++++++ .../src/models/parameters.ts | 29 +- .../src/operations/index.ts | 1 + .../src/operations/ledger.ts | 20 +- .../src/operations/managedCCFOperations.ts | 662 ++++++++++++++++++ .../src/operationsInterfaces/index.ts | 1 + .../src/operationsInterfaces/ledger.ts | 16 +- .../managedCCFOperations.ts | 132 ++++ .../arm-confidentialledger/tsconfig.json | 10 +- 17 files changed, 1630 insertions(+), 105 deletions(-) create mode 100644 sdk/confidentialledger/arm-confidentialledger/src/operations/managedCCFOperations.ts create mode 100644 sdk/confidentialledger/arm-confidentialledger/src/operationsInterfaces/managedCCFOperations.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 7fbb4358e973..d0ab3caceab8 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -2196,7 +2196,7 @@ packages: resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} dependencies: '@types/connect': 3.4.35 - '@types/node': 14.18.32 + '@types/node': 18.11.4 dev: false /@types/chai-as-promised/7.1.5: @@ -2218,7 +2218,7 @@ packages: /@types/connect/3.4.35: resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} dependencies: - '@types/node': 14.18.32 + '@types/node': 18.11.4 dev: false /@types/cookie/0.4.1: @@ -2253,7 +2253,7 @@ packages: /@types/express-serve-static-core/4.17.31: resolution: {integrity: sha512-DxMhY+NAsTwMMFHBTtJFNp5qiHKJ7TeqOo23zVEM9alT1Ml27Q3xcTH0xwxn7Q0BbMcVEJOs/7aQtUWupUQN3Q==} dependencies: - '@types/node': 14.18.32 + '@types/node': 18.11.4 '@types/qs': 6.9.7 '@types/range-parser': 1.2.4 dev: false @@ -2270,20 +2270,20 @@ packages: /@types/fs-extra/8.1.2: resolution: {integrity: sha512-SvSrYXfWSc7R4eqnOzbQF4TZmfpNSM9FrSWLU3EUnWBuyZqNBOrv1B1JA3byUDPUl9z4Ab3jeZG2eDdySlgNMg==} dependencies: - '@types/node': 14.18.32 + '@types/node': 18.11.4 dev: false /@types/fs-extra/9.0.13: resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==} dependencies: - '@types/node': 14.18.32 + '@types/node': 18.11.4 dev: false /@types/glob/7.2.0: resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} dependencies: '@types/minimatch': 5.1.2 - '@types/node': 14.18.32 + '@types/node': 18.11.4 dev: false /@types/inquirer/8.2.4: @@ -2295,7 +2295,7 @@ packages: /@types/is-buffer/2.0.0: resolution: {integrity: sha512-0f7N/e3BAz32qDYvgB4d2cqv1DqUwvGxHkXsrucICn8la1Vb6Yl6Eg8mPScGwUiqHJeE7diXlzaK+QMA9m4Gxw==} dependencies: - '@types/node': 14.18.32 + '@types/node': 18.11.4 dev: false /@types/json-schema/7.0.11: @@ -2309,13 +2309,13 @@ packages: /@types/jsonwebtoken/8.5.9: resolution: {integrity: sha512-272FMnFGzAVMGtu9tkr29hRL6bZj4Zs1KZNeHLnKqAvp06tAIcarTMwOh8/8bz4FmKRcMxZhZNeUAQsNLoiPhg==} dependencies: - '@types/node': 14.18.32 + '@types/node': 18.11.4 dev: false /@types/jws/3.2.4: resolution: {integrity: sha512-aqtH4dPw1wUjFZaeMD1ak/pf8iXlu/odFe+trJrvw0g1sTh93i+SCykg0Ek8C6B7rVK3oBORbfZAsKO7P10etg==} dependencies: - '@types/node': 14.18.32 + '@types/node': 18.11.4 dev: false /@types/md5/2.3.2: @@ -2351,13 +2351,13 @@ packages: /@types/mock-fs/4.13.1: resolution: {integrity: sha512-m6nFAJ3lBSnqbvDZioawRvpLXSaPyn52Srf7OfzjubYbYX8MTUdIgDxQl0wEapm4m/pNYSd9TXocpQ0TvZFlYA==} dependencies: - '@types/node': 14.18.32 + '@types/node': 18.11.4 dev: false /@types/mock-require/2.0.1: resolution: {integrity: sha512-O7U5DVGboY/Crueb5/huUCIRjKtRVRaLmRDbZJBlDQgJn966z3aiFDN+6AtYviu2ExwMkl34LjT/IiC0OPtKuQ==} dependencies: - '@types/node': 14.18.32 + '@types/node': 18.11.4 dev: false /@types/ms/0.7.31: @@ -2375,7 +2375,7 @@ packages: /@types/node-fetch/2.6.2: resolution: {integrity: sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==} dependencies: - '@types/node': 14.18.32 + '@types/node': 18.11.4 form-data: 3.0.1 dev: false @@ -2430,7 +2430,7 @@ packages: /@types/resolve/1.17.1: resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} dependencies: - '@types/node': 14.18.32 + '@types/node': 18.11.4 dev: false /@types/semaphore/1.1.1: @@ -2441,7 +2441,7 @@ packages: resolution: {integrity: sha512-z5xyF6uh8CbjAu9760KDKsH2FcDxZ2tFCsA4HIMWE6IkiYMXfVoa+4f9KX+FN0ZLsaMw1WNG2ETLA6N+/YA+cg==} dependencies: '@types/mime': 3.0.1 - '@types/node': 14.18.32 + '@types/node': 18.11.4 dev: false /@types/sinon/10.0.13: @@ -2463,13 +2463,13 @@ packages: /@types/stoppable/1.1.1: resolution: {integrity: sha512-b8N+fCADRIYYrGZOcmOR8ZNBOqhktWTB/bMUl5LvGtT201QKJZOOH5UsFyI3qtteM6ZAJbJqZoBcLqqxKIwjhw==} dependencies: - '@types/node': 14.18.32 + '@types/node': 18.11.4 dev: false /@types/through/0.0.30: resolution: {integrity: sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==} dependencies: - '@types/node': 14.18.32 + '@types/node': 18.11.4 dev: false /@types/tough-cookie/4.0.2: @@ -2483,13 +2483,13 @@ packages: /@types/tunnel/0.0.1: resolution: {integrity: sha512-AOqu6bQu5MSWwYvehMXLukFHnupHrpZ8nvgae5Ggie9UwzDR1CCwoXgSSWNZJuyOlCdfdsWMA5F2LlmvyoTv8A==} dependencies: - '@types/node': 14.18.32 + '@types/node': 18.11.4 dev: false /@types/tunnel/0.0.3: resolution: {integrity: sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==} dependencies: - '@types/node': 14.18.32 + '@types/node': 18.11.4 dev: false /@types/underscore/1.11.4: @@ -2507,19 +2507,19 @@ packages: /@types/ws/7.4.7: resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} dependencies: - '@types/node': 14.18.32 + '@types/node': 18.11.4 dev: false /@types/ws/8.5.3: resolution: {integrity: sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==} dependencies: - '@types/node': 14.18.32 + '@types/node': 18.11.4 dev: false /@types/xml2js/0.4.11: resolution: {integrity: sha512-JdigeAKmCyoJUiQljjr7tQG3if9NkqGUgwEUqBvV0N7LM4HyQk7UXCnusRa1lnvXAEYJ8mw8GtZWioagNztOwA==} dependencies: - '@types/node': 14.18.32 + '@types/node': 18.11.4 dev: false /@types/yargs-parser/21.0.0: @@ -2536,7 +2536,7 @@ packages: resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==} requiresBuild: true dependencies: - '@types/node': 14.18.32 + '@types/node': 18.11.4 dev: false optional: true @@ -3611,7 +3611,7 @@ packages: resolution: {integrity: sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==} deprecated: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) dependencies: - ms: 2.1.1 + ms: 2.1.3 dev: false /debug/3.2.7: @@ -3832,7 +3832,7 @@ packages: dependencies: semver: 7.3.8 shelljs: 0.8.5 - typescript: 4.6.4 + typescript: 4.8.4 dev: false /ecdsa-sig-formatter/1.0.11: @@ -3883,7 +3883,7 @@ packages: dependencies: '@types/cookie': 0.4.1 '@types/cors': 2.8.12 - '@types/node': 14.18.32 + '@types/node': 18.11.4 accepts: 1.3.8 base64id: 2.0.0 cookie: 0.4.2 @@ -4898,7 +4898,7 @@ packages: 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 @@ -10958,7 +10958,7 @@ packages: dev: false file:projects/arm-confidentialledger.tgz: - resolution: {integrity: sha512-NpjwjFOcGTTUduMnHeOC5tJWEVUqK1etKBMvjNki4v77KgcxdM/w9V5Gd4m+jgxHmFTK5ki6UTCnWknQyxxj2A==, tarball: file:projects/arm-confidentialledger.tgz} + resolution: {integrity: sha512-mgoBNTIZr1deLHThJwzYyKgY2/bHUti61urUMxugVKBtj8HrmFXWMErfVba7z6JvRCiwWG6VllggPvg5Y+gL9g==, tarball: file:projects/arm-confidentialledger.tgz} name: '@rush-temp/arm-confidentialledger' version: 0.0.0 dependencies: @@ -10977,7 +10977,7 @@ packages: rollup: 2.79.1 rollup-plugin-sourcemaps: 0.6.3_rollup@2.79.1 tslib: 2.4.0 - typescript: 4.2.4 + typescript: 4.6.4 uglify-js: 3.17.4 transitivePeerDependencies: - '@types/node' diff --git a/sdk/confidentialledger/arm-confidentialledger/CHANGELOG.md b/sdk/confidentialledger/arm-confidentialledger/CHANGELOG.md index b6a406aae7d8..9250af169b15 100644 --- a/sdk/confidentialledger/arm-confidentialledger/CHANGELOG.md +++ b/sdk/confidentialledger/arm-confidentialledger/CHANGELOG.md @@ -1,15 +1,39 @@ # Release History + +## 1.2.0-beta.1 (2022-10-24) + +**Features** -## 1.1.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added operation group ManagedCCFOperations + - Added Interface CertificateTags + - Added Interface DeploymentType + - Added Interface ErrorDetailAutoGenerated + - Added Interface ErrorResponseAutoGenerated + - Added Interface ManagedCCF + - Added Interface ManagedCCFCreateOptionalParams + - Added Interface ManagedCCFDeleteOptionalParams + - Added Interface ManagedCCFGetOptionalParams + - Added Interface ManagedCCFList + - Added Interface ManagedCCFListByResourceGroupNextOptionalParams + - Added Interface ManagedCCFListByResourceGroupOptionalParams + - Added Interface ManagedCCFListBySubscriptionNextOptionalParams + - Added Interface ManagedCCFListBySubscriptionOptionalParams + - Added Interface ManagedCCFProperties + - Added Interface ManagedCCFUpdateOptionalParams + - Added Interface MemberIdentityCertificate + - Added Interface ResourceAutoGenerated + - Added Interface TrackedResource + - Added Type Alias LanguageRuntime + - Added Type Alias ManagedCCFCreateResponse + - Added Type Alias ManagedCCFGetResponse + - Added Type Alias ManagedCCFListByResourceGroupNextResponse + - Added Type Alias ManagedCCFListByResourceGroupResponse + - Added Type Alias ManagedCCFListBySubscriptionNextResponse + - Added Type Alias ManagedCCFListBySubscriptionResponse + - Class ConfidentialLedgerClient has a new parameter managedCCFOperations + - Added Enum KnownLanguageRuntime + + ## 1.1.0 (2022-07-05) **Features** diff --git a/sdk/confidentialledger/arm-confidentialledger/README.md b/sdk/confidentialledger/arm-confidentialledger/README.md index f30526cc93c2..58330e3f12f0 100644 --- a/sdk/confidentialledger/arm-confidentialledger/README.md +++ b/sdk/confidentialledger/arm-confidentialledger/README.md @@ -6,7 +6,7 @@ Microsoft Azure Confidential Compute Ledger Control Plane REST API version 2020- [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/confidentialledger/arm-confidentialledger) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-confidentialledger) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-confidentialledger) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-confidentialledger?view=azure-node-preview) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started diff --git a/sdk/confidentialledger/arm-confidentialledger/_meta.json b/sdk/confidentialledger/arm-confidentialledger/_meta.json index 8ea33c47384c..7a4d3e19525f 100644 --- a/sdk/confidentialledger/arm-confidentialledger/_meta.json +++ b/sdk/confidentialledger/arm-confidentialledger/_meta.json @@ -1,8 +1,8 @@ { - "commit": "ac155b972d0619a6e5bf665a863fb05ee7eeb30f", + "commit": "8bd9d53251a98716652366f48899ead714d5f72d", "readme": "specification/confidentialledger/resource-manager/readme.md", - "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\confidentialledger\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.1 --generate-sample=true --azure-arm=true", + "autorest_command": "autorest --version=3.8.4 --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.0-rc.2", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.3.2", - "use": "@autorest/typescript@6.0.0-rc.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.4.4", + "use": "@autorest/typescript@6.0.0-rc.2" } \ No newline at end of file diff --git a/sdk/confidentialledger/arm-confidentialledger/package.json b/sdk/confidentialledger/arm-confidentialledger/package.json index 9b120f859260..8d0f7cd91661 100644 --- a/sdk/confidentialledger/arm-confidentialledger/package.json +++ b/sdk/confidentialledger/arm-confidentialledger/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for ConfidentialLedgerClient.", - "version": "1.1.1", + "version": "1.2.0-beta.1", "engines": { "node": ">=14.0.0" }, @@ -36,7 +36,7 @@ "mkdirp": "^1.0.4", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", - "typescript": "~4.2.0", + "typescript": "~4.6.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", "@azure/identity": "^2.0.1", @@ -109,13 +109,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-confidentialledger?view=azure-node-preview" - } -} + "autoPublish": true +} \ 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 9d2f17265b3b..1755804db326 100644 --- a/sdk/confidentialledger/arm-confidentialledger/review/arm-confidentialledger.api.md +++ b/sdk/confidentialledger/arm-confidentialledger/review/arm-confidentialledger.api.md @@ -23,6 +23,13 @@ export interface CertBasedSecurityPrincipal { ledgerRoleName?: LedgerRoleName; } +// @public +export interface CertificateTags { + tags?: { + [propertyName: string]: string; + }; +} + // @public export type CheckNameAvailabilityOperationResponse = CheckNameAvailabilityResponse; @@ -62,6 +69,8 @@ export class ConfidentialLedgerClient extends coreClient.ServiceClient { // (undocumented) ledger: Ledger; // (undocumented) + managedCCFOperations: ManagedCCFOperations; + // (undocumented) operations: Operations; // (undocumented) subscriptionId: string; @@ -83,6 +92,12 @@ export interface ConfidentialLedgerList { // @public export type CreatedByType = string; +// @public +export interface DeploymentType { + appSourceUri?: string; + languageRuntime?: LanguageRuntime; +} + // @public export interface ErrorAdditionalInfo { readonly info?: Record; @@ -98,11 +113,25 @@ export interface ErrorDetail { readonly target?: string; } +// @public +export interface ErrorDetailAutoGenerated { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetailAutoGenerated[]; + readonly message?: string; + readonly target?: string; +} + // @public export interface ErrorResponse { error?: ErrorDetail; } +// @public +export interface ErrorResponseAutoGenerated { + error?: ErrorDetailAutoGenerated; +} + // @public export enum KnownCheckNameAvailabilityReason { AlreadyExists = "AlreadyExists", @@ -117,6 +146,12 @@ export enum KnownCreatedByType { User = "User" } +// @public +export enum KnownLanguageRuntime { + CPP = "CPP", + JS = "JS" +} + // @public export enum KnownLedgerRoleName { Administrator = "Administrator", @@ -142,6 +177,9 @@ export enum KnownProvisioningState { Updating = "Updating" } +// @public +export type LanguageRuntime = string; + // @public export interface Ledger { beginCreate(resourceGroupName: string, ledgerName: string, confidentialLedger: ConfidentialLedger, options?: LedgerCreateOptionalParams): Promise, LedgerCreateResponse>>; @@ -236,6 +274,107 @@ export interface LedgerUpdateOptionalParams extends coreClient.OperationOptions // @public export type LedgerUpdateResponse = ConfidentialLedger; +// @public +export interface ManagedCCF extends TrackedResource { + properties?: ManagedCCFProperties; +} + +// @public +export interface ManagedCCFCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ManagedCCFCreateResponse = ManagedCCF; + +// @public +export interface ManagedCCFDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface ManagedCCFGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedCCFGetResponse = ManagedCCF; + +// @public +export interface ManagedCCFList { + nextLink?: string; + value?: ManagedCCF[]; +} + +// @public +export interface ManagedCCFListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { + filter?: string; +} + +// @public +export type ManagedCCFListByResourceGroupNextResponse = ManagedCCFList; + +// @public +export interface ManagedCCFListByResourceGroupOptionalParams extends coreClient.OperationOptions { + filter?: string; +} + +// @public +export type ManagedCCFListByResourceGroupResponse = ManagedCCFList; + +// @public +export interface ManagedCCFListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { + filter?: string; +} + +// @public +export type ManagedCCFListBySubscriptionNextResponse = ManagedCCFList; + +// @public +export interface ManagedCCFListBySubscriptionOptionalParams extends coreClient.OperationOptions { + filter?: string; +} + +// @public +export type ManagedCCFListBySubscriptionResponse = ManagedCCFList; + +// @public +export interface ManagedCCFOperations { + 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; + get(resourceGroupName: string, appName: string, options?: ManagedCCFGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: ManagedCCFListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: ManagedCCFListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ManagedCCFProperties { + readonly appName?: string; + readonly appUri?: string; + deploymentType?: DeploymentType; + readonly identityServiceUri?: string; + memberIdentityCertificates?: MemberIdentityCertificate[]; + readonly provisioningState?: ProvisioningState; +} + +// @public +export interface ManagedCCFUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface MemberIdentityCertificate { + certificate?: string; + encryptionkey?: string; + tags?: any; +} + // @public export interface Operations { list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; @@ -266,6 +405,14 @@ export interface Resource { readonly type?: string; } +// @public +export interface ResourceAutoGenerated { + readonly id?: string; + readonly name?: string; + readonly systemData?: SystemData; + readonly type?: string; +} + // @public export interface ResourceLocation { location?: string; @@ -309,6 +456,14 @@ export interface Tags { }; } +// @public +export interface TrackedResource extends ResourceAutoGenerated { + location: string; + tags?: { + [propertyName: string]: string; + }; +} + // (No @packageDocumentation comment for this package) ``` diff --git a/sdk/confidentialledger/arm-confidentialledger/src/confidentialLedgerClient.ts b/sdk/confidentialledger/arm-confidentialledger/src/confidentialLedgerClient.ts index 179ef352fd53..531429d9a523 100644 --- a/sdk/confidentialledger/arm-confidentialledger/src/confidentialLedgerClient.ts +++ b/sdk/confidentialledger/arm-confidentialledger/src/confidentialLedgerClient.ts @@ -14,8 +14,16 @@ import { SendRequest } from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; -import { OperationsImpl, LedgerImpl } from "./operations"; -import { Operations, Ledger } from "./operationsInterfaces"; +import { + OperationsImpl, + LedgerImpl, + ManagedCCFOperationsImpl +} from "./operations"; +import { + Operations, + Ledger, + ManagedCCFOperations +} from "./operationsInterfaces"; import * as Parameters from "./models/parameters"; import * as Mappers from "./models/mappers"; import { @@ -33,8 +41,7 @@ export class ConfidentialLedgerClient extends coreClient.ServiceClient { /** * Initializes a new instance of the ConfidentialLedgerClient class. * @param credentials Subscription credentials which uniquely identify client subscription. - * @param subscriptionId The Azure subscription ID. This is a GUID-formatted string (e.g. - * 00000000-0000-0000-0000-000000000000) + * @param subscriptionId The ID of the target subscription. * @param options The parameter options */ constructor( @@ -58,7 +65,7 @@ export class ConfidentialLedgerClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-confidentialledger/1.1.1`; + const packageDetails = `azsdk-js-arm-confidentialledger/1.2.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -78,36 +85,44 @@ export class ConfidentialLedgerClient extends coreClient.ServiceClient { }; super(optionsWithDefaults); + let bearerTokenAuthenticationPolicyFound: boolean = false; if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); - const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( + bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( (pipelinePolicy) => pipelinePolicy.name === coreRestPipeline.bearerTokenAuthenticationPolicyName ); - if (!bearerTokenAuthenticationPolicyFound) { - this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName - }); - this.pipeline.addPolicy( - coreRestPipeline.bearerTokenAuthenticationPolicy({ - scopes: `${optionsWithDefaults.baseUri}/.default`, - challengeCallbacks: { - authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge - } - }) - ); - } + } + if ( + !options || + !options.pipeline || + options.pipeline.getOrderedPolicies().length == 0 || + !bearerTokenAuthenticationPolicyFound + ) { + this.pipeline.removePolicy({ + name: coreRestPipeline.bearerTokenAuthenticationPolicyName + }); + this.pipeline.addPolicy( + coreRestPipeline.bearerTokenAuthenticationPolicy({ + credential: credentials, + scopes: `${optionsWithDefaults.credentialScopes}`, + challengeCallbacks: { + authorizeRequestOnChallenge: + coreClient.authorizeRequestOnClaimChallenge + } + }) + ); } // Parameter assignments this.subscriptionId = subscriptionId; // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-05-13"; + this.apiVersion = options.apiVersion || "2022-09-08-preview"; this.operations = new OperationsImpl(this); this.ledger = new LedgerImpl(this); + this.managedCCFOperations = new ManagedCCFOperationsImpl(this); this.addCustomApiVersionPolicy(options.apiVersion); } @@ -156,6 +171,7 @@ export class ConfidentialLedgerClient extends coreClient.ServiceClient { operations: Operations; ledger: Ledger; + managedCCFOperations: ManagedCCFOperations; } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); diff --git a/sdk/confidentialledger/arm-confidentialledger/src/models/index.ts b/sdk/confidentialledger/arm-confidentialledger/src/models/index.ts index d3736a0950bc..29e5e8284402 100644 --- a/sdk/confidentialledger/arm-confidentialledger/src/models/index.ts +++ b/sdk/confidentialledger/arm-confidentialledger/src/models/index.ts @@ -224,12 +224,145 @@ export interface ConfidentialLedgerList { nextLink?: string; } +/** Additional Managed CCF properties. */ +export interface ManagedCCFProperties { + /** + * Unique name for the Managed CCF. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly appName?: string; + /** + * Endpoint for calling Managed CCF Service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly appUri?: string; + /** + * Endpoint for accessing network identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly identityServiceUri?: string; + /** List of member identity certificates for Managed CCF */ + memberIdentityCertificates?: MemberIdentityCertificate[]; + /** Deployment Type of Managed CCF */ + deploymentType?: DeploymentType; + /** + * Provisioning state of Ledger Resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** Object representing MemberIdentityCertificate for Managed CCF. */ +export interface MemberIdentityCertificate { + /** Member Identity Certificate */ + certificate?: string; + /** Member Identity Certificate Encryption Key */ + encryptionkey?: string; + /** Anything */ + tags?: any; +} + +/** Object representing DeploymentType for Managed CCF. */ +export interface DeploymentType { + /** Unique name for the Managed CCF. */ + languageRuntime?: LanguageRuntime; + /** Source Uri containing ManagedCCF code */ + appSourceUri?: string; +} + +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface ResourceAutoGenerated { + /** + * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; +} + +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ +export interface ErrorResponseAutoGenerated { + /** The error object. */ + error?: ErrorDetailAutoGenerated; +} + +/** The error detail. */ +export interface ErrorDetailAutoGenerated { + /** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * The error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * The error target. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; + /** + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly details?: ErrorDetailAutoGenerated[]; + /** + * The error additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** Object that includes an array of Managed CCF and a possible link for next set. */ +export interface ManagedCCFList { + /** List of Managed CCF */ + value?: ManagedCCF[]; + /** The URL the client should use to fetch the next page (per server side paging). */ + nextLink?: string; +} + +/** Tags for Managed CCF Certificates */ +export interface CertificateTags { + /** Additional tags for Managed CCF Certificates */ + tags?: { [propertyName: string]: string }; +} + /** Confidential Ledger. Contains the properties of Confidential Ledger Resource. */ export interface ConfidentialLedger extends Resource, ResourceLocation, Tags { /** Properties of Confidential Ledger Resource. */ properties?: LedgerProperties; } +/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ +export interface TrackedResource extends ResourceAutoGenerated { + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** The geo-location where the resource lives */ + location: string; +} + +/** Managed CCF. Contains the properties of Managed CCF Resource. */ +export interface ManagedCCF extends TrackedResource { + /** Properties of Managed CCF Resource. */ + properties?: ManagedCCFProperties; +} + /** Known values of {@link CheckNameAvailabilityReason} that the service accepts. */ export enum KnownCheckNameAvailabilityReason { /** Invalid */ @@ -347,6 +480,24 @@ export enum KnownCreatedByType { */ export type CreatedByType = string; +/** Known values of {@link LanguageRuntime} that the service accepts. */ +export enum KnownLanguageRuntime { + /** CPP */ + CPP = "CPP", + /** JS */ + JS = "JS" +} + +/** + * Defines values for LanguageRuntime. \ + * {@link KnownLanguageRuntime} can be used interchangeably with LanguageRuntime, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **CPP** \ + * **JS** + */ +export type LanguageRuntime = string; + /** Optional parameters. */ export interface OperationsListOptionalParams extends coreClient.OperationOptions {} @@ -447,6 +598,83 @@ export interface LedgerListBySubscriptionNextOptionalParams /** Contains response data for the listBySubscriptionNext operation. */ export type LedgerListBySubscriptionNextResponse = ConfidentialLedgerList; +/** Optional parameters. */ +export interface ManagedCCFGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ManagedCCFGetResponse = ManagedCCF; + +/** Optional parameters. */ +export interface ManagedCCFDeleteOptionalParams + 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; +} + +/** Optional parameters. */ +export interface ManagedCCFCreateOptionalParams + 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 create operation. */ +export type ManagedCCFCreateResponse = ManagedCCF; + +/** Optional parameters. */ +export interface ManagedCCFUpdateOptionalParams + 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; +} + +/** Optional parameters. */ +export interface ManagedCCFListByResourceGroupOptionalParams + extends coreClient.OperationOptions { + /** The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public' */ + filter?: string; +} + +/** Contains response data for the listByResourceGroup operation. */ +export type ManagedCCFListByResourceGroupResponse = ManagedCCFList; + +/** Optional parameters. */ +export interface ManagedCCFListBySubscriptionOptionalParams + extends coreClient.OperationOptions { + /** The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public' */ + filter?: string; +} + +/** Contains response data for the listBySubscription operation. */ +export type ManagedCCFListBySubscriptionResponse = ManagedCCFList; + +/** Optional parameters. */ +export interface ManagedCCFListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions { + /** The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public' */ + filter?: string; +} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type ManagedCCFListByResourceGroupNextResponse = ManagedCCFList; + +/** Optional parameters. */ +export interface ManagedCCFListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions { + /** The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public' */ + filter?: string; +} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type ManagedCCFListBySubscriptionNextResponse = ManagedCCFList; + /** Optional parameters. */ export interface ConfidentialLedgerClientOptionalParams extends coreClient.ServiceClientOptions { diff --git a/sdk/confidentialledger/arm-confidentialledger/src/models/mappers.ts b/sdk/confidentialledger/arm-confidentialledger/src/models/mappers.ts index 1793484fb218..269c6afd6b5f 100644 --- a/sdk/confidentialledger/arm-confidentialledger/src/models/mappers.ts +++ b/sdk/confidentialledger/arm-confidentialledger/src/models/mappers.ts @@ -504,6 +504,262 @@ export const ConfidentialLedgerList: coreClient.CompositeMapper = { } }; +export const ManagedCCFProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedCCFProperties", + modelProperties: { + appName: { + serializedName: "appName", + readOnly: true, + type: { + name: "String" + } + }, + appUri: { + serializedName: "appUri", + readOnly: true, + type: { + name: "String" + } + }, + identityServiceUri: { + serializedName: "identityServiceUri", + readOnly: true, + type: { + name: "String" + } + }, + memberIdentityCertificates: { + serializedName: "memberIdentityCertificates", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MemberIdentityCertificate" + } + } + } + }, + deploymentType: { + serializedName: "deploymentType", + type: { + name: "Composite", + className: "DeploymentType" + } + }, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const MemberIdentityCertificate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MemberIdentityCertificate", + modelProperties: { + certificate: { + serializedName: "certificate", + type: { + name: "String" + } + }, + encryptionkey: { + serializedName: "encryptionkey", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "any" + } + } + } + } +}; + +export const DeploymentType: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DeploymentType", + modelProperties: { + languageRuntime: { + serializedName: "languageRuntime", + type: { + name: "String" + } + }, + appSourceUri: { + serializedName: "appSourceUri", + type: { + name: "String" + } + } + } + } +}; + +export const ResourceAutoGenerated: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceAutoGenerated", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + } + } + } +}; + +export const ErrorResponseAutoGenerated: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorResponseAutoGenerated", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetailAutoGenerated" + } + } + } + } +}; + +export const ErrorDetailAutoGenerated: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorDetailAutoGenerated", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String" + } + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String" + } + }, + details: { + serializedName: "details", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorDetailAutoGenerated" + } + } + } + }, + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } + } + } + } + } + } +}; + +export const ManagedCCFList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedCCFList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedCCF" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const CertificateTags: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CertificateTags", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + export const ConfidentialLedger: coreClient.CompositeMapper = { type: { name: "Composite", @@ -522,3 +778,44 @@ export const ConfidentialLedger: coreClient.CompositeMapper = { } } }; + +export const TrackedResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...ResourceAutoGenerated.type.modelProperties, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + location: { + serializedName: "location", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ManagedCCF: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedCCF", + modelProperties: { + ...TrackedResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ManagedCCFProperties" + } + } + } + } +}; diff --git a/sdk/confidentialledger/arm-confidentialledger/src/models/parameters.ts b/sdk/confidentialledger/arm-confidentialledger/src/models/parameters.ts index 4ffa6f786f43..872841add947 100644 --- a/sdk/confidentialledger/arm-confidentialledger/src/models/parameters.ts +++ b/sdk/confidentialledger/arm-confidentialledger/src/models/parameters.ts @@ -13,7 +13,8 @@ import { } from "@azure/core-client"; import { CheckNameAvailabilityRequest as CheckNameAvailabilityRequestMapper, - ConfidentialLedger as ConfidentialLedgerMapper + ConfidentialLedger as ConfidentialLedgerMapper, + ManagedCCF as ManagedCCFMapper } from "../models/mappers"; export const accept: OperationParameter = { @@ -43,7 +44,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-05-13", + defaultValue: "2022-09-08-preview", isConstant: true, serializedName: "api-version", type: { @@ -84,6 +85,9 @@ export const nameAvailabilityRequest: OperationParameter = { export const subscriptionId: OperationURLParameter = { parameterPath: "subscriptionId", mapper: { + constraints: { + MinLength: 1 + }, serializedName: "subscriptionId", required: true, type: { @@ -97,7 +101,7 @@ export const resourceGroupName: OperationURLParameter = { mapper: { constraints: { MaxLength: 90, - MinLength: 3 + MinLength: 1 }, serializedName: "resourceGroupName", required: true, @@ -135,3 +139,22 @@ export const filter: OperationQueryParameter = { } } }; + +export const appName: OperationURLParameter = { + parameterPath: "appName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9]") + }, + serializedName: "appName", + required: true, + type: { + name: "String" + } + } +}; + +export const managedCCF: OperationParameter = { + parameterPath: "managedCCF", + mapper: ManagedCCFMapper +}; diff --git a/sdk/confidentialledger/arm-confidentialledger/src/operations/index.ts b/sdk/confidentialledger/arm-confidentialledger/src/operations/index.ts index 55550f1acb43..62062ecc15d3 100644 --- a/sdk/confidentialledger/arm-confidentialledger/src/operations/index.ts +++ b/sdk/confidentialledger/arm-confidentialledger/src/operations/index.ts @@ -8,3 +8,4 @@ export * from "./operations"; export * from "./ledger"; +export * from "./managedCCFOperations"; diff --git a/sdk/confidentialledger/arm-confidentialledger/src/operations/ledger.ts b/sdk/confidentialledger/arm-confidentialledger/src/operations/ledger.ts index df4e2fd7b016..8b6eecf39433 100644 --- a/sdk/confidentialledger/arm-confidentialledger/src/operations/ledger.ts +++ b/sdk/confidentialledger/arm-confidentialledger/src/operations/ledger.ts @@ -48,7 +48,7 @@ export class LedgerImpl implements Ledger { /** * Retrieves the properties of all Confidential Ledgers. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ public listByResourceGroup( @@ -143,7 +143,7 @@ export class LedgerImpl implements Ledger { /** * Retrieves the properties of a Confidential Ledger. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger * @param options The options parameters. */ @@ -160,7 +160,7 @@ export class LedgerImpl implements Ledger { /** * Deletes an existing Confidential Ledger. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger * @param options The options parameters. */ @@ -223,7 +223,7 @@ export class LedgerImpl implements Ledger { /** * Deletes an existing Confidential Ledger. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger * @param options The options parameters. */ @@ -242,7 +242,7 @@ export class LedgerImpl implements Ledger { /** * Creates a Confidential Ledger with the specified ledger parameters. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger * @param confidentialLedger Confidential Ledger Create Request Body * @param options The options parameters. @@ -310,7 +310,7 @@ export class LedgerImpl implements Ledger { /** * Creates a Confidential Ledger with the specified ledger parameters. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger * @param confidentialLedger Confidential Ledger Create Request Body * @param options The options parameters. @@ -332,7 +332,7 @@ export class LedgerImpl implements Ledger { /** * Updates properties of Confidential Ledger - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger * @param confidentialLedger Confidential Ledger request body for Updating Ledger * @param options The options parameters. @@ -399,7 +399,7 @@ export class LedgerImpl implements Ledger { /** * Updates properties of Confidential Ledger - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger * @param confidentialLedger Confidential Ledger request body for Updating Ledger * @param options The options parameters. @@ -421,7 +421,7 @@ export class LedgerImpl implements Ledger { /** * Retrieves the properties of all Confidential Ledgers. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ private _listByResourceGroup( @@ -449,7 +449,7 @@ export class LedgerImpl implements Ledger { /** * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. * @param options The options parameters. */ diff --git a/sdk/confidentialledger/arm-confidentialledger/src/operations/managedCCFOperations.ts b/sdk/confidentialledger/arm-confidentialledger/src/operations/managedCCFOperations.ts new file mode 100644 index 000000000000..e28ef78ac618 --- /dev/null +++ b/sdk/confidentialledger/arm-confidentialledger/src/operations/managedCCFOperations.ts @@ -0,0 +1,662 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { ManagedCCFOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ConfidentialLedgerClient } from "../confidentialLedgerClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + ManagedCCF, + ManagedCCFListByResourceGroupNextOptionalParams, + ManagedCCFListByResourceGroupOptionalParams, + ManagedCCFListBySubscriptionNextOptionalParams, + ManagedCCFListBySubscriptionOptionalParams, + ManagedCCFGetOptionalParams, + ManagedCCFGetResponse, + ManagedCCFDeleteOptionalParams, + ManagedCCFCreateOptionalParams, + ManagedCCFCreateResponse, + ManagedCCFUpdateOptionalParams, + ManagedCCFListByResourceGroupResponse, + ManagedCCFListBySubscriptionResponse, + ManagedCCFListByResourceGroupNextResponse, + ManagedCCFListBySubscriptionNextResponse +} from "../models"; + +/// +/** Class containing ManagedCCFOperations operations. */ +export class ManagedCCFOperationsImpl implements ManagedCCFOperations { + private readonly client: ConfidentialLedgerClient; + + /** + * Initialize a new instance of the class ManagedCCFOperations class. + * @param client Reference to the service client + */ + constructor(client: ConfidentialLedgerClient) { + this.client = client; + } + + /** + * Retrieves the properties of all Managed CCF apps. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: ManagedCCFListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: ManagedCCFListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: ManagedCCFListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Retrieves the properties of all Managed CCF. + * @param options The options parameters. + */ + public listBySubscription( + options?: ManagedCCFListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listBySubscriptionPagingPage(options); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: ManagedCCFListBySubscriptionOptionalParams + ): AsyncIterableIterator { + let result = await this._listBySubscription(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listBySubscriptionPagingAll( + options?: ManagedCCFListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Retrieves the properties of a Managed CCF app. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF + * @param options The options parameters. + */ + get( + resourceGroupName: string, + appName: string, + options?: ManagedCCFGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, appName, options }, + getOperationSpec + ); + } + + /** + * Deletes an existing Managed CCF. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + appName: string, + options?: ManagedCCFDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = 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 = new LroImpl( + sendOperation, + { resourceGroupName, appName, options }, + deleteOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Deletes an existing Managed CCF. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + appName: string, + options?: ManagedCCFDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete(resourceGroupName, appName, options); + return poller.pollUntilDone(); + } + + /** + * Creates a Managed CCF with the specified Managed CCF parameters. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF + * @param managedCCF Managed CCF Create Request Body + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + appName: string, + managedCCF: ManagedCCF, + options?: ManagedCCFCreateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ManagedCCFCreateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = 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 = new LroImpl( + sendOperation, + { resourceGroupName, appName, managedCCF, options }, + createOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Creates a Managed CCF with the specified Managed CCF parameters. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF + * @param managedCCF Managed CCF Create Request Body + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + appName: string, + managedCCF: ManagedCCF, + options?: ManagedCCFCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + appName, + managedCCF, + options + ); + return poller.pollUntilDone(); + } + + /** + * Updates properties of Managed CCF + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF + * @param managedCCF Request body for Updating Managed CCF App + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + appName: string, + managedCCF: ManagedCCF, + options?: ManagedCCFUpdateOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = 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 = new LroImpl( + sendOperation, + { resourceGroupName, appName, managedCCF, options }, + updateOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Updates properties of Managed CCF + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF + * @param managedCCF Request body for Updating Managed CCF App + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + appName: string, + managedCCF: ManagedCCF, + options?: ManagedCCFUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + appName, + managedCCF, + options + ); + return poller.pollUntilDone(); + } + + /** + * Retrieves the properties of all Managed CCF apps. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: ManagedCCFListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * Retrieves the properties of all Managed CCF. + * @param options The options parameters. + */ + private _listBySubscription( + options?: ManagedCCFListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: ManagedCCFListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: ManagedCCFListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/managedCCFs/{appName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedCCF + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.appName + ], + headerParameters: [Parameters.accept], + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/managedCCFs/{appName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.appName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/managedCCFs/{appName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ManagedCCF + }, + 201: { + bodyMapper: Mappers.ManagedCCF + }, + 202: { + bodyMapper: Mappers.ManagedCCF + }, + 204: { + bodyMapper: Mappers.ManagedCCF + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated + } + }, + requestBody: Parameters.managedCCF, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.appName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/managedCCFs/{appName}", + httpMethod: "PATCH", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated + } + }, + requestBody: Parameters.managedCCF, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.appName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/managedCCFs", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedCCFList + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated + } + }, + queryParameters: [Parameters.apiVersion, Parameters.filter], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ConfidentialLedger/managedCCFs/", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedCCFList + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated + } + }, + queryParameters: [Parameters.apiVersion, Parameters.filter], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedCCFList + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated + } + }, + queryParameters: [Parameters.apiVersion, Parameters.filter], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedCCFList + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated + } + }, + queryParameters: [Parameters.apiVersion, Parameters.filter], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/confidentialledger/arm-confidentialledger/src/operationsInterfaces/index.ts b/sdk/confidentialledger/arm-confidentialledger/src/operationsInterfaces/index.ts index 55550f1acb43..62062ecc15d3 100644 --- a/sdk/confidentialledger/arm-confidentialledger/src/operationsInterfaces/index.ts +++ b/sdk/confidentialledger/arm-confidentialledger/src/operationsInterfaces/index.ts @@ -8,3 +8,4 @@ export * from "./operations"; export * from "./ledger"; +export * from "./managedCCFOperations"; diff --git a/sdk/confidentialledger/arm-confidentialledger/src/operationsInterfaces/ledger.ts b/sdk/confidentialledger/arm-confidentialledger/src/operationsInterfaces/ledger.ts index 249212c68f9f..7b586b90367e 100644 --- a/sdk/confidentialledger/arm-confidentialledger/src/operationsInterfaces/ledger.ts +++ b/sdk/confidentialledger/arm-confidentialledger/src/operationsInterfaces/ledger.ts @@ -26,7 +26,7 @@ import { export interface Ledger { /** * Retrieves the properties of all Confidential Ledgers. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ listByResourceGroup( @@ -42,7 +42,7 @@ export interface Ledger { ): PagedAsyncIterableIterator; /** * Retrieves the properties of a Confidential Ledger. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger * @param options The options parameters. */ @@ -53,7 +53,7 @@ export interface Ledger { ): Promise; /** * Deletes an existing Confidential Ledger. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger * @param options The options parameters. */ @@ -64,7 +64,7 @@ export interface Ledger { ): Promise, void>>; /** * Deletes an existing Confidential Ledger. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger * @param options The options parameters. */ @@ -75,7 +75,7 @@ export interface Ledger { ): Promise; /** * Creates a Confidential Ledger with the specified ledger parameters. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger * @param confidentialLedger Confidential Ledger Create Request Body * @param options The options parameters. @@ -90,7 +90,7 @@ export interface Ledger { >; /** * Creates a Confidential Ledger with the specified ledger parameters. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger * @param confidentialLedger Confidential Ledger Create Request Body * @param options The options parameters. @@ -103,7 +103,7 @@ export interface Ledger { ): Promise; /** * Updates properties of Confidential Ledger - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger * @param confidentialLedger Confidential Ledger request body for Updating Ledger * @param options The options parameters. @@ -118,7 +118,7 @@ export interface Ledger { >; /** * Updates properties of Confidential Ledger - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger * @param confidentialLedger Confidential Ledger request body for Updating Ledger * @param options The options parameters. diff --git a/sdk/confidentialledger/arm-confidentialledger/src/operationsInterfaces/managedCCFOperations.ts b/sdk/confidentialledger/arm-confidentialledger/src/operationsInterfaces/managedCCFOperations.ts new file mode 100644 index 000000000000..e43e10b589b4 --- /dev/null +++ b/sdk/confidentialledger/arm-confidentialledger/src/operationsInterfaces/managedCCFOperations.ts @@ -0,0 +1,132 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + ManagedCCF, + ManagedCCFListByResourceGroupOptionalParams, + ManagedCCFListBySubscriptionOptionalParams, + ManagedCCFGetOptionalParams, + ManagedCCFGetResponse, + ManagedCCFDeleteOptionalParams, + ManagedCCFCreateOptionalParams, + ManagedCCFCreateResponse, + ManagedCCFUpdateOptionalParams +} from "../models"; + +/// +/** Interface representing a ManagedCCFOperations. */ +export interface ManagedCCFOperations { + /** + * Retrieves the properties of all Managed CCF apps. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: ManagedCCFListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Retrieves the properties of all Managed CCF. + * @param options The options parameters. + */ + listBySubscription( + options?: ManagedCCFListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Retrieves the properties of a Managed CCF app. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF + * @param options The options parameters. + */ + get( + resourceGroupName: string, + appName: string, + options?: ManagedCCFGetOptionalParams + ): Promise; + /** + * Deletes an existing Managed CCF. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + appName: string, + options?: ManagedCCFDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes an existing Managed CCF. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + appName: string, + options?: ManagedCCFDeleteOptionalParams + ): Promise; + /** + * Creates a Managed CCF with the specified Managed CCF parameters. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF + * @param managedCCF Managed CCF Create Request Body + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + appName: string, + managedCCF: ManagedCCF, + options?: ManagedCCFCreateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ManagedCCFCreateResponse + > + >; + /** + * Creates a Managed CCF with the specified Managed CCF parameters. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF + * @param managedCCF Managed CCF Create Request Body + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + appName: string, + managedCCF: ManagedCCF, + options?: ManagedCCFCreateOptionalParams + ): Promise; + /** + * Updates properties of Managed CCF + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF + * @param managedCCF Request body for Updating Managed CCF App + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + appName: string, + managedCCF: ManagedCCF, + options?: ManagedCCFUpdateOptionalParams + ): Promise, void>>; + /** + * Updates properties of Managed CCF + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF + * @param managedCCF Request body for Updating Managed CCF App + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + appName: string, + managedCCF: ManagedCCF, + options?: ManagedCCFUpdateOptionalParams + ): Promise; +} 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"