From 3a628794d8a506220c9532f6571ec85f2ca848ba Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 8 Apr 2022 06:13:15 +0000 Subject: [PATCH] CodeGen from PR 18616 in Azure/azure-rest-api-specs Merge 38308a26073f38c456ac74fa03d634babecd0572 into daac0981f39af9fbeffb1e71149f6f3d9b7db831 --- common/config/rush/pnpm-lock.yaml | 19 +- sdk/app/arm-app/CHANGELOG.md | 37 + sdk/app/arm-app/README.md | 13 +- sdk/app/arm-app/_meta.json | 8 +- sdk/app/arm-app/package.json | 32 +- .../node/my_test/recording_sample_test.js | 5 - sdk/app/arm-app/review/arm-app.api.md | 87 +- sdk/app/arm-app/rollup.config.js | 78 +- sdk/app/arm-app/sample.env | 4 - .../certificatesCreateOrUpdateSample.ts | 50 - .../samples-dev/certificatesDeleteSample.ts | 35 - .../samples-dev/certificatesGetSample.ts | 35 - .../samples-dev/certificatesListSample.ts | 36 - .../samples-dev/certificatesUpdateSample.ts | 39 - ...inerAppsAuthConfigsCreateOrUpdateSample.ts | 45 - .../containerAppsAuthConfigsDeleteSample.ts | 35 - .../containerAppsAuthConfigsGetSample.ts | 35 - ...AppsAuthConfigsListByContainerAppSample.ts | 36 - .../containerAppsCreateOrUpdateSample.ts | 90 - .../samples-dev/containerAppsDeleteSample.ts | 33 - .../samples-dev/containerAppsGetSample.ts | 30 - .../containerAppsListByResourceGroupSample.ts | 34 - .../containerAppsListBySubscriptionSample.ts | 31 - ...nerAppsListCustomHostNameAnalysisSample.ts | 41 - .../containerAppsListSecretsSample.ts | 33 - ...nerAppsRevisionReplicasGetReplicaSample.ts | 37 - ...rAppsRevisionReplicasListReplicasSample.ts | 35 - ...inerAppsRevisionsActivateRevisionSample.ts | 35 - ...erAppsRevisionsDeactivateRevisionSample.ts | 35 - ...containerAppsRevisionsGetRevisionSample.ts | 35 - ...ntainerAppsRevisionsListRevisionsSample.ts | 36 - ...ainerAppsRevisionsRestartRevisionSample.ts | 35 - ...rAppsSourceControlsCreateOrUpdateSample.ts | 52 - ...containerAppsSourceControlsDeleteSample.ts | 35 - .../containerAppsSourceControlsGetSample.ts | 35 - ...sSourceControlsListByContainerAppSample.ts | 36 - .../samples-dev/containerAppsUpdateSample.ts | 37 - .../daprComponentsCreateOrUpdateSample.ts | 50 - .../samples-dev/daprComponentsDeleteSample.ts | 35 - .../samples-dev/daprComponentsGetSample.ts | 35 - .../samples-dev/daprComponentsListSample.ts | 36 - ...managedEnvironmentsCreateOrUpdateSample.ts | 40 - .../managedEnvironmentsDeleteSample.ts | 33 - .../managedEnvironmentsGetSample.ts | 30 - ...edEnvironmentsListByResourceGroupSample.ts | 34 - ...gedEnvironmentsListBySubscriptionSample.ts | 31 - ...nvironmentsStoragesCreateOrUpdateSample.ts | 49 - ...managedEnvironmentsStoragesDeleteSample.ts | 35 - .../managedEnvironmentsStoragesGetSample.ts | 35 - .../managedEnvironmentsStoragesListSample.ts | 33 - .../managedEnvironmentsUpdateSample.ts | 40 - .../samples-dev/operationsListSample.ts | 31 - .../samples/v1-beta/javascript/README.md | 134 - .../certificatesCreateOrUpdateSample.js | 46 - .../javascript/certificatesDeleteSample.js | 31 - .../javascript/certificatesGetSample.js | 31 - .../javascript/certificatesListSample.js | 33 - .../javascript/certificatesUpdateSample.js | 39 - ...inerAppsAuthConfigsCreateOrUpdateSample.js | 45 - .../containerAppsAuthConfigsDeleteSample.js | 35 - .../containerAppsAuthConfigsGetSample.js | 35 - ...AppsAuthConfigsListByContainerAppSample.js | 36 - .../containerAppsCreateOrUpdateSample.js | 90 - .../javascript/containerAppsDeleteSample.js | 30 - .../javascript/containerAppsGetSample.js | 30 - .../containerAppsListByResourceGroupSample.js | 32 - .../containerAppsListBySubscriptionSample.js | 31 - ...nerAppsListCustomHostNameAnalysisSample.js | 38 - .../containerAppsListSecretsSample.js | 30 - ...nerAppsRevisionReplicasGetReplicaSample.js | 37 - ...rAppsRevisionReplicasListReplicasSample.js | 35 - ...inerAppsRevisionsActivateRevisionSample.js | 35 - ...erAppsRevisionsDeactivateRevisionSample.js | 35 - ...containerAppsRevisionsGetRevisionSample.js | 35 - ...ntainerAppsRevisionsListRevisionsSample.js | 36 - ...ainerAppsRevisionsRestartRevisionSample.js | 35 - ...rAppsSourceControlsCreateOrUpdateSample.js | 52 - ...containerAppsSourceControlsDeleteSample.js | 35 - .../containerAppsSourceControlsGetSample.js | 35 - ...sSourceControlsListByContainerAppSample.js | 36 - .../javascript/containerAppsUpdateSample.js | 33 - .../daprComponentsCreateOrUpdateSample.js | 50 - .../javascript/daprComponentsDeleteSample.js | 31 - .../javascript/daprComponentsGetSample.js | 31 - .../javascript/daprComponentsListSample.js | 33 - ...managedEnvironmentsCreateOrUpdateSample.js | 40 - .../managedEnvironmentsDeleteSample.js | 30 - .../managedEnvironmentsGetSample.js | 30 - ...edEnvironmentsListByResourceGroupSample.js | 32 - ...gedEnvironmentsListBySubscriptionSample.js | 31 - ...nvironmentsStoragesCreateOrUpdateSample.js | 46 - ...managedEnvironmentsStoragesDeleteSample.js | 31 - .../managedEnvironmentsStoragesGetSample.js | 31 - .../managedEnvironmentsStoragesListSample.js | 30 - .../managedEnvironmentsUpdateSample.js | 37 - .../javascript/operationsListSample.js | 31 - .../samples/v1-beta/javascript/package.json | 32 - .../samples/v1-beta/javascript/sample.env | 4 - .../samples/v1-beta/typescript/README.md | 147 - .../samples/v1-beta/typescript/package.json | 41 - .../samples/v1-beta/typescript/sample.env | 4 - .../src/certificatesCreateOrUpdateSample.ts | 50 - .../src/certificatesDeleteSample.ts | 35 - .../typescript/src/certificatesGetSample.ts | 35 - .../typescript/src/certificatesListSample.ts | 36 - .../src/certificatesUpdateSample.ts | 39 - ...inerAppsAuthConfigsCreateOrUpdateSample.ts | 45 - .../containerAppsAuthConfigsDeleteSample.ts | 35 - .../src/containerAppsAuthConfigsGetSample.ts | 35 - ...AppsAuthConfigsListByContainerAppSample.ts | 36 - .../src/containerAppsCreateOrUpdateSample.ts | 90 - .../src/containerAppsDeleteSample.ts | 33 - .../typescript/src/containerAppsGetSample.ts | 30 - .../containerAppsListByResourceGroupSample.ts | 34 - .../containerAppsListBySubscriptionSample.ts | 31 - ...nerAppsListCustomHostNameAnalysisSample.ts | 41 - .../src/containerAppsListSecretsSample.ts | 33 - ...nerAppsRevisionReplicasGetReplicaSample.ts | 37 - ...rAppsRevisionReplicasListReplicasSample.ts | 35 - ...inerAppsRevisionsActivateRevisionSample.ts | 35 - ...erAppsRevisionsDeactivateRevisionSample.ts | 35 - ...containerAppsRevisionsGetRevisionSample.ts | 35 - ...ntainerAppsRevisionsListRevisionsSample.ts | 36 - ...ainerAppsRevisionsRestartRevisionSample.ts | 35 - ...rAppsSourceControlsCreateOrUpdateSample.ts | 52 - ...containerAppsSourceControlsDeleteSample.ts | 35 - .../containerAppsSourceControlsGetSample.ts | 35 - ...sSourceControlsListByContainerAppSample.ts | 36 - .../src/containerAppsUpdateSample.ts | 37 - .../src/daprComponentsCreateOrUpdateSample.ts | 50 - .../src/daprComponentsDeleteSample.ts | 35 - .../typescript/src/daprComponentsGetSample.ts | 35 - .../src/daprComponentsListSample.ts | 36 - ...managedEnvironmentsCreateOrUpdateSample.ts | 40 - .../src/managedEnvironmentsDeleteSample.ts | 33 - .../src/managedEnvironmentsGetSample.ts | 30 - ...edEnvironmentsListByResourceGroupSample.ts | 34 - ...gedEnvironmentsListBySubscriptionSample.ts | 31 - ...nvironmentsStoragesCreateOrUpdateSample.ts | 49 - ...managedEnvironmentsStoragesDeleteSample.ts | 35 - .../managedEnvironmentsStoragesGetSample.ts | 35 - .../managedEnvironmentsStoragesListSample.ts | 33 - .../src/managedEnvironmentsUpdateSample.ts | 40 - .../typescript/src/operationsListSample.ts | 31 - .../samples/v1-beta/typescript/tsconfig.json | 17 - sdk/app/arm-app/src/containerAppsAPIClient.ts | 49 +- sdk/app/arm-app/src/models/index.ts | 2208 +++++------ sdk/app/arm-app/src/models/mappers.ts | 3234 +++++++++-------- sdk/app/arm-app/src/models/parameters.ts | 134 +- .../arm-app/src/operations/containerApps.ts | 97 +- .../operations/containerAppsAuthConfigs.ts | 12 +- .../containerAppsRevisionReplicas.ts | 2 +- .../src/operations/containerAppsRevisions.ts | 20 +- .../operations/containerAppsSourceControls.ts | 20 +- .../arm-app/src/operations/daprComponents.ts | 44 + sdk/app/arm-app/src/operations/index.ts | 9 +- .../src/operations/managedEnvironments.ts | 95 +- sdk/app/arm-app/src/operations/namespaces.ts | 82 + .../src/operationsInterfaces/containerApps.ts | 25 +- .../operationsInterfaces/daprComponents.ts | 17 +- .../arm-app/src/operationsInterfaces/index.ts | 9 +- .../managedEnvironments.ts | 25 +- .../src/operationsInterfaces/namespaces.ts | 30 + sdk/app/arm-app/tsconfig.json | 10 +- 164 files changed, 3466 insertions(+), 8139 deletions(-) delete mode 100644 sdk/app/arm-app/recordings/node/my_test/recording_sample_test.js delete mode 100644 sdk/app/arm-app/sample.env delete mode 100644 sdk/app/arm-app/samples-dev/certificatesCreateOrUpdateSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/certificatesDeleteSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/certificatesGetSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/certificatesListSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/certificatesUpdateSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/containerAppsAuthConfigsCreateOrUpdateSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/containerAppsAuthConfigsDeleteSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/containerAppsAuthConfigsGetSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/containerAppsAuthConfigsListByContainerAppSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/containerAppsCreateOrUpdateSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/containerAppsDeleteSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/containerAppsGetSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/containerAppsListByResourceGroupSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/containerAppsListBySubscriptionSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/containerAppsListCustomHostNameAnalysisSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/containerAppsListSecretsSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/containerAppsRevisionReplicasGetReplicaSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/containerAppsRevisionReplicasListReplicasSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/containerAppsRevisionsActivateRevisionSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/containerAppsRevisionsDeactivateRevisionSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/containerAppsRevisionsGetRevisionSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/containerAppsRevisionsListRevisionsSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/containerAppsRevisionsRestartRevisionSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/containerAppsSourceControlsCreateOrUpdateSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/containerAppsSourceControlsDeleteSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/containerAppsSourceControlsGetSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/containerAppsSourceControlsListByContainerAppSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/containerAppsUpdateSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/daprComponentsCreateOrUpdateSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/daprComponentsDeleteSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/daprComponentsGetSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/daprComponentsListSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/managedEnvironmentsCreateOrUpdateSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/managedEnvironmentsDeleteSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/managedEnvironmentsGetSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/managedEnvironmentsListByResourceGroupSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/managedEnvironmentsListBySubscriptionSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/managedEnvironmentsStoragesCreateOrUpdateSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/managedEnvironmentsStoragesDeleteSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/managedEnvironmentsStoragesGetSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/managedEnvironmentsStoragesListSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/managedEnvironmentsUpdateSample.ts delete mode 100644 sdk/app/arm-app/samples-dev/operationsListSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/README.md delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/certificatesCreateOrUpdateSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/certificatesDeleteSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/certificatesGetSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/certificatesListSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/certificatesUpdateSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/containerAppsAuthConfigsCreateOrUpdateSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/containerAppsAuthConfigsDeleteSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/containerAppsAuthConfigsGetSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/containerAppsAuthConfigsListByContainerAppSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/containerAppsCreateOrUpdateSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/containerAppsDeleteSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/containerAppsGetSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/containerAppsListByResourceGroupSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/containerAppsListBySubscriptionSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/containerAppsListCustomHostNameAnalysisSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/containerAppsListSecretsSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionReplicasGetReplicaSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionReplicasListReplicasSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsActivateRevisionSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsDeactivateRevisionSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsGetRevisionSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsListRevisionsSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsRestartRevisionSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/containerAppsSourceControlsCreateOrUpdateSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/containerAppsSourceControlsDeleteSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/containerAppsSourceControlsGetSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/containerAppsSourceControlsListByContainerAppSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/containerAppsUpdateSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/daprComponentsCreateOrUpdateSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/daprComponentsDeleteSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/daprComponentsGetSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/daprComponentsListSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsCreateOrUpdateSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsDeleteSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsGetSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsListByResourceGroupSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsListBySubscriptionSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsStoragesCreateOrUpdateSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsStoragesDeleteSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsStoragesGetSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsStoragesListSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsUpdateSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/operationsListSample.js delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/package.json delete mode 100644 sdk/app/arm-app/samples/v1-beta/javascript/sample.env delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/README.md delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/package.json delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/sample.env delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesCreateOrUpdateSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesDeleteSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesGetSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesListSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesUpdateSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsAuthConfigsCreateOrUpdateSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsAuthConfigsDeleteSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsAuthConfigsGetSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsAuthConfigsListByContainerAppSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsCreateOrUpdateSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsDeleteSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsGetSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsListByResourceGroupSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsListBySubscriptionSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsListCustomHostNameAnalysisSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsListSecretsSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionReplicasGetReplicaSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionReplicasListReplicasSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsActivateRevisionSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsDeactivateRevisionSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsGetRevisionSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsListRevisionsSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsRestartRevisionSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsSourceControlsCreateOrUpdateSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsSourceControlsDeleteSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsSourceControlsGetSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsSourceControlsListByContainerAppSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsUpdateSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/daprComponentsCreateOrUpdateSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/daprComponentsDeleteSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/daprComponentsGetSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/daprComponentsListSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsCreateOrUpdateSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsDeleteSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsGetSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsListByResourceGroupSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsListBySubscriptionSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsStoragesCreateOrUpdateSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsStoragesDeleteSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsStoragesGetSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsStoragesListSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsUpdateSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/src/operationsListSample.ts delete mode 100644 sdk/app/arm-app/samples/v1-beta/typescript/tsconfig.json create mode 100644 sdk/app/arm-app/src/operations/namespaces.ts create mode 100644 sdk/app/arm-app/src/operationsInterfaces/namespaces.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index f10690b25978..03f2c967fd7c 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -9238,28 +9238,27 @@ packages: dev: false file:projects/arm-app.tgz: - resolution: {integrity: sha512-LJKyEcLnJ6ZwVZFajPwxStZhrx47ilrjb0bao+zpN2dYbZVG1mefDjM+9/vMCp1+2CFtTZg8wMkvNuk7bzwq1w==, tarball: file:projects/arm-app.tgz} + resolution: {integrity: sha512-FB1MXuuM/aMYCUeqBo8YJxviCy0l2KyrjGjCek2nHsk8aX6vIFRLyCK8gFCjIonFP6jYUguBb59nBwut7Y1srw==, tarball: file:projects/arm-app.tgz} name: '@rush-temp/arm-app' version: 0.0.0 dependencies: '@azure-tools/test-recorder': 1.0.2 '@azure/identity': 2.0.4 '@microsoft/api-extractor': 7.19.4 - '@rollup/plugin-commonjs': 21.0.2_rollup@2.70.0 - '@rollup/plugin-json': 4.1.0_rollup@2.70.0 - '@rollup/plugin-multi-entry': 4.1.0_rollup@2.70.0 - '@rollup/plugin-node-resolve': 13.1.3_rollup@2.70.0 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-json': 4.1.0_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 cross-env: 7.0.3 mkdirp: 1.0.4 mocha: 7.2.0 rimraf: 3.0.2 - rollup: 2.70.0 - rollup-plugin-sourcemaps: 0.6.3_rollup@2.70.0 + rollup: 1.32.1 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.15.2 transitivePeerDependencies: - - '@types/node' - debug - encoding - supports-color @@ -16529,7 +16528,7 @@ packages: dev: false file:projects/schema-registry-avro.tgz: - resolution: {integrity: sha512-ADG9wO8rIljoktGdVnP+v8jdrxc43TL0hQgHi7cSXkrJxFGGB6M8XqcDhuT8hYCLfLkRzCwpwH7VSnsjBDVdpg==, tarball: file:projects/schema-registry-avro.tgz} + resolution: {integrity: sha512-9TumFphoGCJiaHQVfz2Z9AsSbhal4ZtZWx7L9fG19JdfEZKJT5uUykYq81plFNWAReFMs83oFPUO//K+BhRuLQ==, tarball: file:projects/schema-registry-avro.tgz} name: '@rush-temp/schema-registry-avro' version: 0.0.0 dependencies: @@ -17674,7 +17673,7 @@ packages: dev: false file:projects/web-pubsub.tgz: - resolution: {integrity: sha512-7qvVc3+mTZX3L5BoserPH04Nwu7kDUUNR5KCtK+ugSa+uTQ5jM0uPXJ3sxgajKuLX+a63eftQtMg2Zcf9K3HZw==, tarball: file:projects/web-pubsub.tgz} + resolution: {integrity: sha512-vAYE6Sk0Olihti+uB+3ac0P3Y+d/XtBXwF2rq0PblaciuLhY/J/3+Y9dpOYDpgTiTyZuAmm+7DDRAq8AYkSETQ==, tarball: file:projects/web-pubsub.tgz} name: '@rush-temp/web-pubsub' version: 0.0.0 dependencies: diff --git a/sdk/app/arm-app/CHANGELOG.md b/sdk/app/arm-app/CHANGELOG.md index 3468066a2951..2c954f5a892d 100644 --- a/sdk/app/arm-app/CHANGELOG.md +++ b/sdk/app/arm-app/CHANGELOG.md @@ -1,5 +1,42 @@ # Release History +## 1.0.0 (2022-04-08) + +**Features** + + - Added operation group Namespaces + - Added operation ContainerApps.beginUpdate + - Added operation ContainerApps.beginUpdateAndWait + - Added operation DaprComponents.listSecrets + - Added operation ManagedEnvironments.beginUpdate + - Added operation ManagedEnvironments.beginUpdateAndWait + - Added Interface CheckNameAvailabilityRequest + - Added Interface CheckNameAvailabilityResponse + - Added Interface DaprComponentsListSecretsOptionalParams + - Added Interface DaprSecretsCollection + - Added Interface NamespacesCheckNameAvailabilityOptionalParams + - Added Type Alias CheckNameAvailabilityReason + - Added Type Alias DaprComponentsListSecretsResponse + - Added Type Alias NamespacesCheckNameAvailabilityResponse + - Interface ContainerAppsRevisionsListRevisionsNextOptionalParams has a new optional parameter filter + - Interface ContainerAppsRevisionsListRevisionsOptionalParams has a new optional parameter filter + - Interface ContainerAppsUpdateOptionalParams has a new optional parameter resumeFrom + - Interface ContainerAppsUpdateOptionalParams has a new optional parameter updateIntervalInMs + - Interface GithubActionConfiguration has a new optional parameter contextPath + - Interface GithubActionConfiguration has a new optional parameter image + - Interface ManagedEnvironmentsUpdateOptionalParams has a new optional parameter resumeFrom + - Interface ManagedEnvironmentsUpdateOptionalParams has a new optional parameter updateIntervalInMs + - Interface TrafficWeight has a new optional parameter label + - Class ContainerAppsAPIClient has a new parameter namespaces + - Added Enum KnownCheckNameAvailabilityReason + +**Breaking Changes** + + - Removed operation ContainerApps.update + - Removed operation ManagedEnvironments.update + - Interface GithubActionConfiguration no longer has parameter dockerfilePath + + ## 1.0.0-beta.1 (2022-03-23) The package of @azure/arm-app is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart). diff --git a/sdk/app/arm-app/README.md b/sdk/app/arm-app/README.md index 87771438489a..7a26583212b6 100644 --- a/sdk/app/arm-app/README.md +++ b/sdk/app/arm-app/README.md @@ -6,7 +6,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/app/arm-app) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-app) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-app?view=azure-node-preview) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-app) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started @@ -16,8 +16,6 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f - [LTS versions of Node.js](https://nodejs.org/about/releases/) - Latest versions of Safari, Chrome, Edge and Firefox. -See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details. - ### Prerequisites - An [Azure subscription][azure_sub]. @@ -51,17 +49,8 @@ For more information about how to create an Azure AD Application check out [this ```javascript const { ContainerAppsAPIClient } = require("@azure/arm-app"); const { DefaultAzureCredential } = require("@azure/identity"); -// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details. - const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ContainerAppsAPIClient(new DefaultAzureCredential(), subscriptionId); - -// For client-side applications running in the browser, use this code instead: -// const credential = new InteractiveBrowserCredential({ -// tenantId: "", -// clientId: "" -// }); -// const client = new ContainerAppsAPIClient(credential, subscriptionId); ``` diff --git a/sdk/app/arm-app/_meta.json b/sdk/app/arm-app/_meta.json index 8e9ec010d51b..cf45bb198127 100644 --- a/sdk/app/arm-app/_meta.json +++ b/sdk/app/arm-app/_meta.json @@ -1,8 +1,8 @@ { - "commit": "82fdf284eea880a8e027c354911a814999a77178", + "commit": "3d6c003292c5d279871cc285aeaed67e7d7da24a", "readme": "specification/app/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:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\app\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-beta.17 --generate-sample=true", + "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/app/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220105.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.1.3", - "use": "@autorest/typescript@6.0.0-beta.17" + "release_tool": "@azure-tools/js-sdk-release-tools@2.2.6", + "use": "@autorest/typescript@6.0.0-alpha.16.20220105.1" } \ No newline at end of file diff --git a/sdk/app/arm-app/package.json b/sdk/app/arm-app/package.json index 9a15baf65238..c34e446a777f 100644 --- a/sdk/app/arm-app/package.json +++ b/sdk/app/arm-app/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for ContainerAppsAPIClient.", - "version": "1.0.0-beta.1", + "version": "1.0.0", "engines": { "node": ">=12.0.0" }, @@ -29,13 +29,13 @@ "types": "./types/arm-app.d.ts", "devDependencies": { "@microsoft/api-extractor": "^7.18.11", - "@rollup/plugin-commonjs": "^21.0.1", - "@rollup/plugin-json": "^4.1.0", - "@rollup/plugin-multi-entry": "^4.1.0", - "@rollup/plugin-node-resolve": "^13.1.3", + "@rollup/plugin-commonjs": "11.0.2", + "@rollup/plugin-json": "^4.0.0", + "@rollup/plugin-multi-entry": "^3.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", "mkdirp": "^1.0.4", - "rollup": "^2.66.1", - "rollup-plugin-sourcemaps": "^0.6.3", + "rollup": "^1.16.3", + "rollup-plugin-sourcemaps": "^0.4.2", "typescript": "~4.2.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", @@ -98,21 +98,5 @@ "docs": "echo skipped" }, "sideEffects": false, - "//metadata": { - "constantPaths": [ - { - "path": "src/containerAppsAPIClient.ts", - "prefix": "packageDetails" - } - ] - }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-app?view=azure-node-preview" - } + "autoPublish": true } \ No newline at end of file diff --git a/sdk/app/arm-app/recordings/node/my_test/recording_sample_test.js b/sdk/app/arm-app/recordings/node/my_test/recording_sample_test.js deleted file mode 100644 index 0f6ecb857acf..000000000000 --- a/sdk/app/arm-app/recordings/node/my_test/recording_sample_test.js +++ /dev/null @@ -1,5 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "7a6be38bb8cb644d64b4094802301751"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} diff --git a/sdk/app/arm-app/review/arm-app.api.md b/sdk/app/arm-app/review/arm-app.api.md index b0546afd6ffa..15c9c9b42613 100644 --- a/sdk/app/arm-app/review/arm-app.api.md +++ b/sdk/app/arm-app/review/arm-app.api.md @@ -228,6 +228,22 @@ export interface CertificatesUpdateOptionalParams extends coreClient.OperationOp // @public export type CertificatesUpdateResponse = Certificate; +// @public +export type CheckNameAvailabilityReason = string; + +// @public +export interface CheckNameAvailabilityRequest { + name?: string; + type?: string; +} + +// @public +export interface CheckNameAvailabilityResponse { + message?: string; + nameAvailable?: boolean; + reason?: CheckNameAvailabilityReason; +} + // @public export interface ClientRegistration { clientId?: string; @@ -274,13 +290,6 @@ export interface ContainerAppCollection { value: ContainerApp[]; } -// @public -export interface ContainerAppPatch { - tags?: { - [propertyName: string]: string; - }; -} - // @public export interface ContainerAppProbe { failureThreshold?: number; @@ -324,12 +333,13 @@ export interface ContainerApps { beginCreateOrUpdateAndWait(resourceGroupName: string, name: string, containerAppEnvelope: ContainerApp, options?: ContainerAppsCreateOrUpdateOptionalParams): Promise; beginDelete(resourceGroupName: string, name: string, options?: ContainerAppsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, name: string, options?: ContainerAppsDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, name: string, containerAppEnvelope: ContainerApp, options?: ContainerAppsUpdateOptionalParams): Promise, void>>; + beginUpdateAndWait(resourceGroupName: string, name: string, containerAppEnvelope: ContainerApp, options?: ContainerAppsUpdateOptionalParams): Promise; get(resourceGroupName: string, name: string, options?: ContainerAppsGetOptionalParams): Promise; listByResourceGroup(resourceGroupName: string, options?: ContainerAppsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; listBySubscription(options?: ContainerAppsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; listCustomHostNameAnalysis(resourceGroupName: string, containerAppName: string, options?: ContainerAppsListCustomHostNameAnalysisOptionalParams): Promise; listSecrets(resourceGroupName: string, name: string, options?: ContainerAppsListSecretsOptionalParams): Promise; - update(resourceGroupName: string, name: string, containerAppEnvelope: ContainerAppPatch, options?: ContainerAppsUpdateOptionalParams): Promise; } // @public (undocumented) @@ -358,6 +368,8 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { // (undocumented) managedEnvironmentsStorages: ManagedEnvironmentsStorages; // (undocumented) + namespaces: Namespaces; + // (undocumented) operations: Operations; // (undocumented) subscriptionId: string; @@ -527,6 +539,7 @@ export type ContainerAppsRevisionsGetRevisionResponse = Revision; // @public export interface ContainerAppsRevisionsListRevisionsNextOptionalParams extends coreClient.OperationOptions { + filter?: string; } // @public @@ -534,6 +547,7 @@ export type ContainerAppsRevisionsListRevisionsNextResponse = RevisionCollection // @public export interface ContainerAppsRevisionsListRevisionsOptionalParams extends coreClient.OperationOptions { + filter?: string; } // @public @@ -591,11 +605,10 @@ export type ContainerAppsSourceControlsListByContainerAppResponse = SourceContro // @public export interface ContainerAppsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } -// @public -export type ContainerAppsUpdateResponse = ContainerApp; - // @public export interface ContainerResources { cpu?: number; @@ -678,6 +691,7 @@ export interface DaprComponents { delete(resourceGroupName: string, environmentName: string, name: string, options?: DaprComponentsDeleteOptionalParams): Promise; get(resourceGroupName: string, environmentName: string, name: string, options?: DaprComponentsGetOptionalParams): Promise; list(resourceGroupName: string, environmentName: string, options?: DaprComponentsListOptionalParams): PagedAsyncIterableIterator; + listSecrets(resourceGroupName: string, environmentName: string, name: string, options?: DaprComponentsListSecretsOptionalParams): Promise; } // @public @@ -718,6 +732,13 @@ export interface DaprComponentsListOptionalParams extends coreClient.OperationOp // @public export type DaprComponentsListResponse = DaprComponentsCollection; +// @public +export interface DaprComponentsListSecretsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DaprComponentsListSecretsResponse = DaprSecretsCollection; + // @public export interface DaprMetadata { name?: string; @@ -725,6 +746,11 @@ export interface DaprMetadata { value?: string; } +// @public +export interface DaprSecretsCollection { + value: Secret[]; +} + // @public export interface DefaultAuthorizationPolicy { allowedApplications?: string[]; @@ -793,7 +819,8 @@ export interface GitHub { // @public export interface GithubActionConfiguration { azureCredentials?: AzureCredentials; - dockerfilePath?: string; + contextPath?: string; + image?: string; os?: string; publishType?: string; registryInfo?: RegistryInfo; @@ -916,6 +943,14 @@ export enum KnownCertificateProvisioningState { Succeeded = "Succeeded" } +// @public +export enum KnownCheckNameAvailabilityReason { + // (undocumented) + AlreadyExists = "AlreadyExists", + // (undocumented) + Invalid = "Invalid" +} + // @public export enum KnownContainerAppProvisioningState { // (undocumented) @@ -1076,23 +1111,17 @@ export type ManagedEnvironment = TrackedResource & { appLogsConfiguration?: AppLogsConfiguration; }; -// @public -export interface ManagedEnvironmentPatch { - tags?: { - [propertyName: string]: string; - }; -} - // @public export interface ManagedEnvironments { beginCreateOrUpdate(resourceGroupName: string, name: string, environmentEnvelope: ManagedEnvironment, options?: ManagedEnvironmentsCreateOrUpdateOptionalParams): Promise, ManagedEnvironmentsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, name: string, environmentEnvelope: ManagedEnvironment, options?: ManagedEnvironmentsCreateOrUpdateOptionalParams): Promise; beginDelete(resourceGroupName: string, name: string, options?: ManagedEnvironmentsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, name: string, options?: ManagedEnvironmentsDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, name: string, environmentEnvelope: ManagedEnvironment, options?: ManagedEnvironmentsUpdateOptionalParams): Promise, void>>; + beginUpdateAndWait(resourceGroupName: string, name: string, environmentEnvelope: ManagedEnvironment, options?: ManagedEnvironmentsUpdateOptionalParams): Promise; get(resourceGroupName: string, name: string, options?: ManagedEnvironmentsGetOptionalParams): Promise; listByResourceGroup(resourceGroupName: string, options?: ManagedEnvironmentsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; listBySubscription(options?: ManagedEnvironmentsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, name: string, environmentEnvelope: ManagedEnvironmentPatch, options?: ManagedEnvironmentsUpdateOptionalParams): Promise; } // @public @@ -1201,11 +1230,10 @@ export interface ManagedEnvironmentStoragesCollection { // @public export interface ManagedEnvironmentsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } -// @public -export type ManagedEnvironmentsUpdateResponse = ManagedEnvironment; - // @public export interface ManagedServiceIdentity { readonly principalId?: string; @@ -1219,6 +1247,18 @@ export interface ManagedServiceIdentity { // @public export type ManagedServiceIdentityType = string; +// @public +export interface Namespaces { + checkNameAvailability(resourceGroupName: string, managedEnvironmentName: string, checkNameAvailabilityRequest: CheckNameAvailabilityRequest, options?: NamespacesCheckNameAvailabilityOptionalParams): Promise; +} + +// @public +export interface NamespacesCheckNameAvailabilityOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NamespacesCheckNameAvailabilityResponse = CheckNameAvailabilityResponse; + // @public export interface Nonce { nonceExpirationInterval?: string; @@ -1445,6 +1485,7 @@ export type TrackedResource = Resource & { // @public export interface TrafficWeight { + label?: string; latestRevision?: boolean; revisionName?: string; weight?: number; diff --git a/sdk/app/arm-app/rollup.config.js b/sdk/app/arm-app/rollup.config.js index 3f89d7309da5..9be1955eb7f1 100644 --- a/sdk/app/arm-app/rollup.config.js +++ b/sdk/app/arm-app/rollup.config.js @@ -14,14 +14,62 @@ import json from "@rollup/plugin-json"; import nodeBuiltins from "builtin-modules"; +/** + * Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api. + * + * NOTE: this manual configuration is only needed because OpenTelemetry uses an + * __exportStar downleveled helper function to declare its exports which confuses + * rollup's automatic discovery mechanism. + * + * @returns an object reference that can be `...`'d into your cjs() configuration. + */ +export function openTelemetryCommonJs() { + const namedExports = {}; + + for (const key of [ + "@opentelemetry/api", + "@azure/core-tracing/node_modules/@opentelemetry/api" + ]) { + namedExports[key] = [ + "SpanKind", + "TraceFlags", + "getSpan", + "setSpan", + "SpanStatusCode", + "getSpanContext", + "setSpanContext" + ]; + } + + const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"]; + + for (const version of releasedOpenTelemetryVersions) { + namedExports[ + // working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path. + `../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js` + ] = [ + "SpanKind", + "TraceFlags", + "getSpan", + "setSpan", + "StatusCode", + "CanonicalCode", + "getSpanContext", + "setSpanContext" + ]; + } + + return namedExports; +} + // #region Warning Handler /** - * A function that can determine whether a rollup warning should be ignored. If + * A function that can determine whether a rollupwarning should be ignored. If * the function returns `true`, then the warning will not be displayed. */ -function ignoreNiseSinonEval(warning) { +function ignoreNiseSinonEvalWarnings(warning) { return ( warning.code === "EVAL" && warning.id && @@ -30,14 +78,17 @@ function ignoreNiseSinonEval(warning) { ); } -function ignoreChaiCircularDependency(warning) { +function ignoreChaiCircularDependencyWarnings(warning) { return ( warning.code === "CIRCULAR_DEPENDENCY" && warning.importer && warning.importer.includes("node_modules/chai") === true ); } -const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval]; +const warningInhibitors = [ + ignoreChaiCircularDependencyWarnings, + ignoreNiseSinonEvalWarnings +]; /** * Construct a warning handler for the shared rollup configuration @@ -71,7 +122,22 @@ function makeBrowserTestConfig() { nodeResolve({ mainFields: ["module", "browser"] }), - cjs(), + cjs({ + namedExports: { + // Chai's strange internal architecture makes it impossible to statically + // analyze its exports. + chai: [ + "version", + "use", + "util", + "config", + "expect", + "should", + "assert" + ], + ...openTelemetryCommonJs() + } + }), json(), sourcemaps() //viz({ filename: "dist-test/browser-stats.html", sourcemap: true }) @@ -107,7 +173,7 @@ export function makeConfig(pkg, options) { ], output: { file: "dist/index.js", format: "cjs", sourcemap: true }, preserveSymlinks: false, - plugins: [sourcemaps(), nodeResolve()] + plugins: [sourcemaps(), nodeResolve(), cjs()] }; const config = [baseConfig]; diff --git a/sdk/app/arm-app/sample.env b/sdk/app/arm-app/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/app/arm-app/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/app/arm-app/samples-dev/certificatesCreateOrUpdateSample.ts b/sdk/app/arm-app/samples-dev/certificatesCreateOrUpdateSample.ts deleted file mode 100644 index 487eec304763..000000000000 --- a/sdk/app/arm-app/samples-dev/certificatesCreateOrUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - Certificate, - CertificatesCreateOrUpdateOptionalParams, - ContainerAppsAPIClient -} from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Create or Update a Certificate. - * - * @summary Create or Update a Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json - */ -async function createOrUpdateCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const managedEnvironmentName = "testcontainerenv"; - const name = "certificate-firendly-name"; - const certificateEnvelope: Certificate = { - location: "East US", - properties: { - password: "private key password", - value: new Uint8Array() - } - }; - const options: CertificatesCreateOrUpdateOptionalParams = { - certificateEnvelope - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.createOrUpdate( - resourceGroupName, - managedEnvironmentName, - name, - options - ); - console.log(result); -} - -createOrUpdateCertificate().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/certificatesDeleteSample.ts b/sdk/app/arm-app/samples-dev/certificatesDeleteSample.ts deleted file mode 100644 index c872144e3b1b..000000000000 --- a/sdk/app/arm-app/samples-dev/certificatesDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Deletes the specified Certificate. - * - * @summary Deletes the specified Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Delete.json - */ -async function deleteCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const managedEnvironmentName = "testcontainerenv"; - const name = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.delete( - resourceGroupName, - managedEnvironmentName, - name - ); - console.log(result); -} - -deleteCertificate().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/certificatesGetSample.ts b/sdk/app/arm-app/samples-dev/certificatesGetSample.ts deleted file mode 100644 index fb53e9432dcd..000000000000 --- a/sdk/app/arm-app/samples-dev/certificatesGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the specified Certificate. - * - * @summary Get the specified Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Get.json - */ -async function getCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const managedEnvironmentName = "testcontainerenv"; - const name = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.get( - resourceGroupName, - managedEnvironmentName, - name - ); - console.log(result); -} - -getCertificate().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/certificatesListSample.ts b/sdk/app/arm-app/samples-dev/certificatesListSample.ts deleted file mode 100644 index 73c627622c1a..000000000000 --- a/sdk/app/arm-app/samples-dev/certificatesListSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Certificates in a given managed environment. - * - * @summary Get the Certificates in a given managed environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json - */ -async function listCertificatesByManagedEnvironment() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const managedEnvironmentName = "testcontainerenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.certificates.list( - resourceGroupName, - managedEnvironmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listCertificatesByManagedEnvironment().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/certificatesUpdateSample.ts b/sdk/app/arm-app/samples-dev/certificatesUpdateSample.ts deleted file mode 100644 index 95c86c42fe06..000000000000 --- a/sdk/app/arm-app/samples-dev/certificatesUpdateSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { CertificatePatch, ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Patches a certificate. Currently only patching of tags is supported - * - * @summary Patches a certificate. Currently only patching of tags is supported - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_Patch.json - */ -async function patchCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const managedEnvironmentName = "testcontainerenv"; - const name = "certificate-firendly-name"; - const certificateEnvelope: CertificatePatch = { - tags: { tag1: "value1", tag2: "value2" } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.update( - resourceGroupName, - managedEnvironmentName, - name, - certificateEnvelope - ); - console.log(result); -} - -patchCertificate().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsAuthConfigsCreateOrUpdateSample.ts b/sdk/app/arm-app/samples-dev/containerAppsAuthConfigsCreateOrUpdateSample.ts deleted file mode 100644 index 81f7090e87bf..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsAuthConfigsCreateOrUpdateSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AuthConfig, ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Description for Create or update the AuthConfig for a Container App. - * - * @summary Description for Create or update the AuthConfig for a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/AuthConfigs_CreateOrUpdate.json - */ -async function createOrUpdateContainerAppAuthConfig() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const name = "current"; - const authConfigEnvelope: AuthConfig = { - globalValidation: { unauthenticatedClientAction: "AllowAnonymous" }, - identityProviders: { - facebook: { - registration: { appId: "123", appSecretSettingName: "facebook-secret" } - } - }, - platform: { enabled: true } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.createOrUpdate( - resourceGroupName, - containerAppName, - name, - authConfigEnvelope - ); - console.log(result); -} - -createOrUpdateContainerAppAuthConfig().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsAuthConfigsDeleteSample.ts b/sdk/app/arm-app/samples-dev/containerAppsAuthConfigsDeleteSample.ts deleted file mode 100644 index 0554af0821fa..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsAuthConfigsDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Description for Delete a Container App AuthConfig. - * - * @summary Description for Delete a Container App AuthConfig. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/AuthConfigs_Delete.json - */ -async function deleteContainerAppAuthConfig() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const name = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.delete( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -deleteContainerAppAuthConfig().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsAuthConfigsGetSample.ts b/sdk/app/arm-app/samples-dev/containerAppsAuthConfigsGetSample.ts deleted file mode 100644 index 853a1febc1dd..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsAuthConfigsGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a AuthConfig of a Container App. - * - * @summary Get a AuthConfig of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/AuthConfigs_Get.json - */ -async function getContainerAppAuthConfig() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const name = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.get( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -getContainerAppAuthConfig().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsAuthConfigsListByContainerAppSample.ts b/sdk/app/arm-app/samples-dev/containerAppsAuthConfigsListByContainerAppSample.ts deleted file mode 100644 index e3f89107286b..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsAuthConfigsListByContainerAppSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Container App AuthConfigs in a given resource group. - * - * @summary Get the Container App AuthConfigs in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/AuthConfigs_ListByContainer.json - */ -async function listAuthConfigsByContainerApps() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsAuthConfigs.listByContainerApp( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listAuthConfigsByContainerApps().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsCreateOrUpdateSample.ts b/sdk/app/arm-app/samples-dev/containerAppsCreateOrUpdateSample.ts deleted file mode 100644 index cb2523bdfb55..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsCreateOrUpdateSample.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerApp, ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Description for Create or update a Container App. - * - * @summary Description for Create or update a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_CreateOrUpdate.json - */ -async function createOrUpdateContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const name = "testcontainerApp0"; - const containerAppEnvelope: ContainerApp = { - configuration: { - dapr: { appPort: 3000, appProtocol: "http", enabled: true }, - ingress: { - customDomains: [ - { - name: "www.my-name.com", - bindingType: "SniEnabled", - certificateId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com" - }, - { - name: "www.my-other-name.com", - bindingType: "SniEnabled", - certificateId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com" - } - ], - external: true, - targetPort: 3000 - } - }, - location: "East US", - managedEnvironmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - template: { - containers: [ - { - name: "testcontainerApp0", - image: "repo/testcontainerApp0:v1", - probes: [ - { - type: "liveness", - httpGet: { - path: "/health", - httpHeaders: [{ name: "Custom-Header", value: "Awesome" }], - port: 8080 - }, - initialDelaySeconds: 3, - periodSeconds: 3 - } - ] - } - ], - scale: { - maxReplicas: 5, - minReplicas: 1, - rules: [ - { - name: "httpscalingrule", - custom: { type: "http", metadata: { concurrentRequests: "50" } } - } - ] - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginCreateOrUpdateAndWait( - resourceGroupName, - name, - containerAppEnvelope - ); - console.log(result); -} - -createOrUpdateContainerApp().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsDeleteSample.ts b/sdk/app/arm-app/samples-dev/containerAppsDeleteSample.ts deleted file mode 100644 index c6b7ad11da66..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Description for Delete a Container App. - * - * @summary Description for Delete a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Delete.json - */ -async function deleteContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const name = "testWorkerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginDeleteAndWait( - resourceGroupName, - name - ); - console.log(result); -} - -deleteContainerApp().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsGetSample.ts b/sdk/app/arm-app/samples-dev/containerAppsGetSample.ts deleted file mode 100644 index c3ed9ba32bdf..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsGetSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the properties of a Container App. - * - * @summary Get the properties of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Get.json - */ -async function getContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const name = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.get(resourceGroupName, name); - console.log(result); -} - -getContainerApp().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsListByResourceGroupSample.ts b/sdk/app/arm-app/samples-dev/containerAppsListByResourceGroupSample.ts deleted file mode 100644 index ef6d4c259ce4..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsListByResourceGroupSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Container Apps in a given resource group. - * - * @summary Get the Container Apps in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListByResourceGroup.json - */ -async function listContainerAppsByResourceGroup() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerApps.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppsByResourceGroup().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsListBySubscriptionSample.ts b/sdk/app/arm-app/samples-dev/containerAppsListBySubscriptionSample.ts deleted file mode 100644 index 9204c4d3330c..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Container Apps in a given subscription. - * - * @summary Get the Container Apps in a given subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListBySubscription.json - */ -async function listContainerAppsBySubscription() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerApps.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppsBySubscription().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsListCustomHostNameAnalysisSample.ts b/sdk/app/arm-app/samples-dev/containerAppsListCustomHostNameAnalysisSample.ts deleted file mode 100644 index 549bd4a27bf5..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsListCustomHostNameAnalysisSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ContainerAppsListCustomHostNameAnalysisOptionalParams, - ContainerAppsAPIClient -} from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Analyzes a custom hostname for a Container App - * - * @summary Analyzes a custom hostname for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json - */ -async function analyzeCustomHostname() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const customHostname = "my.name.corp"; - const options: ContainerAppsListCustomHostNameAnalysisOptionalParams = { - customHostname - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.listCustomHostNameAnalysis( - resourceGroupName, - containerAppName, - options - ); - console.log(result); -} - -analyzeCustomHostname().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsListSecretsSample.ts b/sdk/app/arm-app/samples-dev/containerAppsListSecretsSample.ts deleted file mode 100644 index 966f520a5e27..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsListSecretsSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to List secrets for a container app - * - * @summary List secrets for a container app - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListSecrets.json - */ -async function listContainerAppsSecrets() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const name = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.listSecrets( - resourceGroupName, - name - ); - console.log(result); -} - -listContainerAppsSecrets().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsRevisionReplicasGetReplicaSample.ts b/sdk/app/arm-app/samples-dev/containerAppsRevisionReplicasGetReplicaSample.ts deleted file mode 100644 index 30ef6ae6b233..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsRevisionReplicasGetReplicaSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a replica for a Container App Revision. - * - * @summary Get a replica for a Container App Revision. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Replicas_Get.json - */ -async function getContainerAppRevisionReplica() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "myapp"; - const revisionName = "myapp--0wlqy09"; - const name = "myapp--0wlqy09-5d9774cff-5wnd8"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisionReplicas.getReplica( - resourceGroupName, - containerAppName, - revisionName, - name - ); - console.log(result); -} - -getContainerAppRevisionReplica().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsRevisionReplicasListReplicasSample.ts b/sdk/app/arm-app/samples-dev/containerAppsRevisionReplicasListReplicasSample.ts deleted file mode 100644 index 844b7bdee308..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsRevisionReplicasListReplicasSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to List replicas for a Container App Revision. - * - * @summary List replicas for a Container App Revision. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Replicas_List.json - */ -async function listContainerAppReplicas() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "myapp"; - const revisionName = "myapp--0wlqy09"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisionReplicas.listReplicas( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -listContainerAppReplicas().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsRevisionsActivateRevisionSample.ts b/sdk/app/arm-app/samples-dev/containerAppsRevisionsActivateRevisionSample.ts deleted file mode 100644 index 38c6a5eb9828..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsRevisionsActivateRevisionSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Activates a revision for a Container App - * - * @summary Activates a revision for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_Activate.json - */ -async function activateContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const name = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.activateRevision( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -activateContainerAppRevision().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsRevisionsDeactivateRevisionSample.ts b/sdk/app/arm-app/samples-dev/containerAppsRevisionsDeactivateRevisionSample.ts deleted file mode 100644 index d413520920df..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsRevisionsDeactivateRevisionSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Deactivates a revision for a Container App - * - * @summary Deactivates a revision for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_Deactivate.json - */ -async function deactivateContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const name = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.deactivateRevision( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -deactivateContainerAppRevision().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsRevisionsGetRevisionSample.ts b/sdk/app/arm-app/samples-dev/containerAppsRevisionsGetRevisionSample.ts deleted file mode 100644 index 2a97703a317e..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsRevisionsGetRevisionSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a revision of a Container App. - * - * @summary Get a revision of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_Get.json - */ -async function getContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const name = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.getRevision( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -getContainerAppRevision().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsRevisionsListRevisionsSample.ts b/sdk/app/arm-app/samples-dev/containerAppsRevisionsListRevisionsSample.ts deleted file mode 100644 index 13ca118da5b4..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsRevisionsListRevisionsSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Revisions for a given Container App. - * - * @summary Get the Revisions for a given Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_List.json - */ -async function listContainerAppRevisions() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsRevisions.listRevisions( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppRevisions().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsRevisionsRestartRevisionSample.ts b/sdk/app/arm-app/samples-dev/containerAppsRevisionsRestartRevisionSample.ts deleted file mode 100644 index aaec1158e232..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsRevisionsRestartRevisionSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Restarts a revision for a Container App - * - * @summary Restarts a revision for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_Restart.json - */ -async function restartContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testStaticSite0"; - const name = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.restartRevision( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -restartContainerAppRevision().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsSourceControlsCreateOrUpdateSample.ts b/sdk/app/arm-app/samples-dev/containerAppsSourceControlsCreateOrUpdateSample.ts deleted file mode 100644 index fb65ad01eb7a..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsSourceControlsCreateOrUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { SourceControl, ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Description for Create or update the SourceControl for a Container App. - * - * @summary Description for Create or update the SourceControl for a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/SourceControls_CreateOrUpdate.json - */ -async function createOrUpdateContainerAppSourceControl() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const name = "current"; - const sourceControlEnvelope: SourceControl = { - branch: "master", - githubActionConfiguration: { - azureCredentials: { - clientId: "", - clientSecret: "", - tenantId: "" - }, - registryInfo: { - registryPassword: "", - registryUrl: "xwang971reg.azurecr.io", - registryUserName: "xwang971reg" - } - }, - repoUrl: "https://github.com/xwang971/ghatest" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.beginCreateOrUpdateAndWait( - resourceGroupName, - containerAppName, - name, - sourceControlEnvelope - ); - console.log(result); -} - -createOrUpdateContainerAppSourceControl().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsSourceControlsDeleteSample.ts b/sdk/app/arm-app/samples-dev/containerAppsSourceControlsDeleteSample.ts deleted file mode 100644 index 85ea0498d6a4..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsSourceControlsDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Description for Delete a Container App SourceControl. - * - * @summary Description for Delete a Container App SourceControl. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/SourceControls_Delete.json - */ -async function deleteContainerAppSourceControl() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const name = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.beginDeleteAndWait( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -deleteContainerAppSourceControl().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsSourceControlsGetSample.ts b/sdk/app/arm-app/samples-dev/containerAppsSourceControlsGetSample.ts deleted file mode 100644 index be593d5790a1..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsSourceControlsGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a SourceControl of a Container App. - * - * @summary Get a SourceControl of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/SourceControls_Get.json - */ -async function getContainerAppSourceControl() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const name = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.get( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -getContainerAppSourceControl().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsSourceControlsListByContainerAppSample.ts b/sdk/app/arm-app/samples-dev/containerAppsSourceControlsListByContainerAppSample.ts deleted file mode 100644 index b4bb6d8b7e93..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsSourceControlsListByContainerAppSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Container App SourceControls in a given resource group. - * - * @summary Get the Container App SourceControls in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/SourceControls_ListByContainer.json - */ -async function listAppSourceControls() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsSourceControls.listByContainerApp( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listAppSourceControls().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsUpdateSample.ts b/sdk/app/arm-app/samples-dev/containerAppsUpdateSample.ts deleted file mode 100644 index 9343d0472dac..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsUpdateSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppPatch, ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Patches a Container App. Currently only patching of tags is supported - * - * @summary Patches a Container App. Currently only patching of tags is supported - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Patch.json - */ -async function patchContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const name = "testcontainerApp0"; - const containerAppEnvelope: ContainerAppPatch = { - tags: { tag1: "value1", tag2: "value2" } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.update( - resourceGroupName, - name, - containerAppEnvelope - ); - console.log(result); -} - -patchContainerApp().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/daprComponentsCreateOrUpdateSample.ts b/sdk/app/arm-app/samples-dev/daprComponentsCreateOrUpdateSample.ts deleted file mode 100644 index dd0318e85e58..000000000000 --- a/sdk/app/arm-app/samples-dev/daprComponentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { DaprComponent, ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Creates or updates a Dapr Component in a Managed Environment. - * - * @summary Creates or updates a Dapr Component in a Managed Environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/DaprComponents_CreateOrUpdate.json - */ -async function createOrUpdateDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const name = "reddog"; - const daprComponentEnvelope: DaprComponent = { - componentType: "state.azure.cosmosdb", - ignoreErrors: false, - initTimeout: "50s", - metadata: [ - { name: "url", value: "" }, - { name: "database", value: "itemsDB" }, - { name: "collection", value: "items" }, - { name: "masterkey", secretRef: "masterkey" } - ], - scopes: ["container-app-1", "container-app-2"], - secrets: [{ name: "masterkey", value: "keyvalue" }], - version: "v1" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.createOrUpdate( - resourceGroupName, - environmentName, - name, - daprComponentEnvelope - ); - console.log(result); -} - -createOrUpdateDaprComponent().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/daprComponentsDeleteSample.ts b/sdk/app/arm-app/samples-dev/daprComponentsDeleteSample.ts deleted file mode 100644 index d91260e74d5b..000000000000 --- a/sdk/app/arm-app/samples-dev/daprComponentsDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Delete a Dapr Component from a Managed Environment. - * - * @summary Delete a Dapr Component from a Managed Environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/DaprComponents_Delete.json - */ -async function deleteDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const name = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.delete( - resourceGroupName, - environmentName, - name - ); - console.log(result); -} - -deleteDaprComponent().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/daprComponentsGetSample.ts b/sdk/app/arm-app/samples-dev/daprComponentsGetSample.ts deleted file mode 100644 index aaeb76f21d85..000000000000 --- a/sdk/app/arm-app/samples-dev/daprComponentsGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a dapr component. - * - * @summary Get a dapr component. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/DaprComponents_Get.json - */ -async function getDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const name = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.get( - resourceGroupName, - environmentName, - name - ); - console.log(result); -} - -getDaprComponent().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/daprComponentsListSample.ts b/sdk/app/arm-app/samples-dev/daprComponentsListSample.ts deleted file mode 100644 index 42c3487bd276..000000000000 --- a/sdk/app/arm-app/samples-dev/daprComponentsListSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Dapr Components for a managed environment. - * - * @summary Get the Dapr Components for a managed environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/DaprComponents_List.json - */ -async function listDaprComponents() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.daprComponents.list( - resourceGroupName, - environmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listDaprComponents().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/managedEnvironmentsCreateOrUpdateSample.ts b/sdk/app/arm-app/samples-dev/managedEnvironmentsCreateOrUpdateSample.ts deleted file mode 100644 index 8030b24e4581..000000000000 --- a/sdk/app/arm-app/samples-dev/managedEnvironmentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ManagedEnvironment, ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Creates or updates a Managed Environment used to host container apps. - * - * @summary Creates or updates a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json - */ -async function createEnvironments() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const name = "testcontainerenv"; - const environmentEnvelope: ManagedEnvironment = { - appLogsConfiguration: { - logAnalyticsConfiguration: { customerId: "string", sharedKey: "string" } - }, - location: "East US" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginCreateOrUpdateAndWait( - resourceGroupName, - name, - environmentEnvelope - ); - console.log(result); -} - -createEnvironments().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/managedEnvironmentsDeleteSample.ts b/sdk/app/arm-app/samples-dev/managedEnvironmentsDeleteSample.ts deleted file mode 100644 index 50c93edba9f4..000000000000 --- a/sdk/app/arm-app/samples-dev/managedEnvironmentsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Delete a Managed Environment if it does not have any container apps. - * - * @summary Delete a Managed Environment if it does not have any container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Delete.json - */ -async function deleteEnvironmentByName() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const name = "examplekenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginDeleteAndWait( - resourceGroupName, - name - ); - console.log(result); -} - -deleteEnvironmentByName().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/managedEnvironmentsGetSample.ts b/sdk/app/arm-app/samples-dev/managedEnvironmentsGetSample.ts deleted file mode 100644 index db4f69523265..000000000000 --- a/sdk/app/arm-app/samples-dev/managedEnvironmentsGetSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the properties of a Managed Environment used to host container apps. - * - * @summary Get the properties of a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Get.json - */ -async function getEnvironmentsByName() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const name = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.get(resourceGroupName, name); - console.log(result); -} - -getEnvironmentsByName().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/managedEnvironmentsListByResourceGroupSample.ts b/sdk/app/arm-app/samples-dev/managedEnvironmentsListByResourceGroupSample.ts deleted file mode 100644 index cf452fab2bf6..000000000000 --- a/sdk/app/arm-app/samples-dev/managedEnvironmentsListByResourceGroupSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get all the Managed Environments in a resource group. - * - * @summary Get all the Managed Environments in a resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json - */ -async function listEnvironmentsByResourceGroup() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listEnvironmentsByResourceGroup().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/managedEnvironmentsListBySubscriptionSample.ts b/sdk/app/arm-app/samples-dev/managedEnvironmentsListBySubscriptionSample.ts deleted file mode 100644 index ccfe7c862995..000000000000 --- a/sdk/app/arm-app/samples-dev/managedEnvironmentsListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get all Managed Environments for a subscription. - * - * @summary Get all Managed Environments for a subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListBySubscription.json - */ -async function listEnvironmentsBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -listEnvironmentsBySubscription().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/managedEnvironmentsStoragesCreateOrUpdateSample.ts b/sdk/app/arm-app/samples-dev/managedEnvironmentsStoragesCreateOrUpdateSample.ts deleted file mode 100644 index 96a53c68f61f..000000000000 --- a/sdk/app/arm-app/samples-dev/managedEnvironmentsStoragesCreateOrUpdateSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ManagedEnvironmentStorage, - ContainerAppsAPIClient -} from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Create or update storage for a managedEnvironment. - * - * @summary Create or update storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json - */ -async function createOrUpdateEnvironmentsStorage() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const envName = "managedEnv"; - const name = "jlaw-demo1"; - const storageEnvelope: ManagedEnvironmentStorage = { - properties: { - azureFile: { - accessMode: "ReadOnly", - accountKey: "key", - accountName: "account1", - shareName: "share1" - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.createOrUpdate( - resourceGroupName, - envName, - name, - storageEnvelope - ); - console.log(result); -} - -createOrUpdateEnvironmentsStorage().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/managedEnvironmentsStoragesDeleteSample.ts b/sdk/app/arm-app/samples-dev/managedEnvironmentsStoragesDeleteSample.ts deleted file mode 100644 index 71a66acd9251..000000000000 --- a/sdk/app/arm-app/samples-dev/managedEnvironmentsStoragesDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Delete storage for a managedEnvironment. - * - * @summary Delete storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_Delete.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const envName = "managedEnv"; - const name = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.delete( - resourceGroupName, - envName, - name - ); - console.log(result); -} - -listEnvironmentsStoragesBySubscription().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/managedEnvironmentsStoragesGetSample.ts b/sdk/app/arm-app/samples-dev/managedEnvironmentsStoragesGetSample.ts deleted file mode 100644 index 76bd4e1c4a4d..000000000000 --- a/sdk/app/arm-app/samples-dev/managedEnvironmentsStoragesGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get storage for a managedEnvironment. - * - * @summary Get storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_Get.json - */ -async function getAEnvironmentsStoragePropertiesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const envName = "managedEnv"; - const name = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.get( - resourceGroupName, - envName, - name - ); - console.log(result); -} - -getAEnvironmentsStoragePropertiesBySubscription().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/managedEnvironmentsStoragesListSample.ts b/sdk/app/arm-app/samples-dev/managedEnvironmentsStoragesListSample.ts deleted file mode 100644 index dbf75cbe839b..000000000000 --- a/sdk/app/arm-app/samples-dev/managedEnvironmentsStoragesListSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get all storages for a managedEnvironment. - * - * @summary Get all storages for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_List.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const envName = "managedEnv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.list( - resourceGroupName, - envName - ); - console.log(result); -} - -listEnvironmentsStoragesBySubscription().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/managedEnvironmentsUpdateSample.ts b/sdk/app/arm-app/samples-dev/managedEnvironmentsUpdateSample.ts deleted file mode 100644 index d3693deee729..000000000000 --- a/sdk/app/arm-app/samples-dev/managedEnvironmentsUpdateSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ManagedEnvironmentPatch, - ContainerAppsAPIClient -} from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Patches a Managed Environment. Only patching of tags is supported currently - * - * @summary Patches a Managed Environment. Only patching of tags is supported currently - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Patch.json - */ -async function patchManagedEnvironment() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const name = "testcontainerenv"; - const environmentEnvelope: ManagedEnvironmentPatch = { - tags: { tag1: "value1", tag2: "value2" } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.update( - resourceGroupName, - name, - environmentEnvelope - ); - console.log(result); -} - -patchManagedEnvironment().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/operationsListSample.ts b/sdk/app/arm-app/samples-dev/operationsListSample.ts deleted file mode 100644 index 62c55bbfb800..000000000000 --- a/sdk/app/arm-app/samples-dev/operationsListSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Lists all of the available RP operations. - * - * @summary Lists all of the available RP operations. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Operations_List.json - */ -async function listAllOperations() { - const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -listAllOperations().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/README.md b/sdk/app/arm-app/samples/v1-beta/javascript/README.md deleted file mode 100644 index 65ba4afc39dc..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/README.md +++ /dev/null @@ -1,134 +0,0 @@ -# client library samples for JavaScript (Beta) - -These sample programs show how to use the JavaScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| ------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [certificatesCreateOrUpdateSample.js][certificatescreateorupdatesample] | Create or Update a Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json | -| [certificatesDeleteSample.js][certificatesdeletesample] | Deletes the specified Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Delete.json | -| [certificatesGetSample.js][certificatesgetsample] | Get the specified Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Get.json | -| [certificatesListSample.js][certificateslistsample] | Get the Certificates in a given managed environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json | -| [certificatesUpdateSample.js][certificatesupdatesample] | Patches a certificate. Currently only patching of tags is supported x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_Patch.json | -| [containerAppsAuthConfigsCreateOrUpdateSample.js][containerappsauthconfigscreateorupdatesample] | Description for Create or update the AuthConfig for a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/AuthConfigs_CreateOrUpdate.json | -| [containerAppsAuthConfigsDeleteSample.js][containerappsauthconfigsdeletesample] | Description for Delete a Container App AuthConfig. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/AuthConfigs_Delete.json | -| [containerAppsAuthConfigsGetSample.js][containerappsauthconfigsgetsample] | Get a AuthConfig of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/AuthConfigs_Get.json | -| [containerAppsAuthConfigsListByContainerAppSample.js][containerappsauthconfigslistbycontainerappsample] | Get the Container App AuthConfigs in a given resource group. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/AuthConfigs_ListByContainer.json | -| [containerAppsCreateOrUpdateSample.js][containerappscreateorupdatesample] | Description for Create or update a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_CreateOrUpdate.json | -| [containerAppsDeleteSample.js][containerappsdeletesample] | Description for Delete a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Delete.json | -| [containerAppsGetSample.js][containerappsgetsample] | Get the properties of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Get.json | -| [containerAppsListByResourceGroupSample.js][containerappslistbyresourcegroupsample] | Get the Container Apps in a given resource group. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListByResourceGroup.json | -| [containerAppsListBySubscriptionSample.js][containerappslistbysubscriptionsample] | Get the Container Apps in a given subscription. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListBySubscription.json | -| [containerAppsListCustomHostNameAnalysisSample.js][containerappslistcustomhostnameanalysissample] | Analyzes a custom hostname for a Container App x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json | -| [containerAppsListSecretsSample.js][containerappslistsecretssample] | List secrets for a container app x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListSecrets.json | -| [containerAppsRevisionReplicasGetReplicaSample.js][containerappsrevisionreplicasgetreplicasample] | Get a replica for a Container App Revision. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Replicas_Get.json | -| [containerAppsRevisionReplicasListReplicasSample.js][containerappsrevisionreplicaslistreplicassample] | List replicas for a Container App Revision. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Replicas_List.json | -| [containerAppsRevisionsActivateRevisionSample.js][containerappsrevisionsactivaterevisionsample] | Activates a revision for a Container App x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_Activate.json | -| [containerAppsRevisionsDeactivateRevisionSample.js][containerappsrevisionsdeactivaterevisionsample] | Deactivates a revision for a Container App x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_Deactivate.json | -| [containerAppsRevisionsGetRevisionSample.js][containerappsrevisionsgetrevisionsample] | Get a revision of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_Get.json | -| [containerAppsRevisionsListRevisionsSample.js][containerappsrevisionslistrevisionssample] | Get the Revisions for a given Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_List.json | -| [containerAppsRevisionsRestartRevisionSample.js][containerappsrevisionsrestartrevisionsample] | Restarts a revision for a Container App x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_Restart.json | -| [containerAppsSourceControlsCreateOrUpdateSample.js][containerappssourcecontrolscreateorupdatesample] | Description for Create or update the SourceControl for a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/SourceControls_CreateOrUpdate.json | -| [containerAppsSourceControlsDeleteSample.js][containerappssourcecontrolsdeletesample] | Description for Delete a Container App SourceControl. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/SourceControls_Delete.json | -| [containerAppsSourceControlsGetSample.js][containerappssourcecontrolsgetsample] | Get a SourceControl of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/SourceControls_Get.json | -| [containerAppsSourceControlsListByContainerAppSample.js][containerappssourcecontrolslistbycontainerappsample] | Get the Container App SourceControls in a given resource group. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/SourceControls_ListByContainer.json | -| [containerAppsUpdateSample.js][containerappsupdatesample] | Patches a Container App. Currently only patching of tags is supported x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Patch.json | -| [daprComponentsCreateOrUpdateSample.js][daprcomponentscreateorupdatesample] | Creates or updates a Dapr Component in a Managed Environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/DaprComponents_CreateOrUpdate.json | -| [daprComponentsDeleteSample.js][daprcomponentsdeletesample] | Delete a Dapr Component from a Managed Environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/DaprComponents_Delete.json | -| [daprComponentsGetSample.js][daprcomponentsgetsample] | Get a dapr component. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/DaprComponents_Get.json | -| [daprComponentsListSample.js][daprcomponentslistsample] | Get the Dapr Components for a managed environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/DaprComponents_List.json | -| [managedEnvironmentsCreateOrUpdateSample.js][managedenvironmentscreateorupdatesample] | Creates or updates a Managed Environment used to host container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json | -| [managedEnvironmentsDeleteSample.js][managedenvironmentsdeletesample] | Delete a Managed Environment if it does not have any container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Delete.json | -| [managedEnvironmentsGetSample.js][managedenvironmentsgetsample] | Get the properties of a Managed Environment used to host container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Get.json | -| [managedEnvironmentsListByResourceGroupSample.js][managedenvironmentslistbyresourcegroupsample] | Get all the Managed Environments in a resource group. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json | -| [managedEnvironmentsListBySubscriptionSample.js][managedenvironmentslistbysubscriptionsample] | Get all Managed Environments for a subscription. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListBySubscription.json | -| [managedEnvironmentsStoragesCreateOrUpdateSample.js][managedenvironmentsstoragescreateorupdatesample] | Create or update storage for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json | -| [managedEnvironmentsStoragesDeleteSample.js][managedenvironmentsstoragesdeletesample] | Delete storage for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_Delete.json | -| [managedEnvironmentsStoragesGetSample.js][managedenvironmentsstoragesgetsample] | Get storage for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_Get.json | -| [managedEnvironmentsStoragesListSample.js][managedenvironmentsstorageslistsample] | Get all storages for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_List.json | -| [managedEnvironmentsUpdateSample.js][managedenvironmentsupdatesample] | Patches a Managed Environment. Only patching of tags is supported currently x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Patch.json | -| [operationsListSample.js][operationslistsample] | Lists all of the available RP operations. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Operations_List.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://nodejs.org/about/releases/). - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -3. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node certificatesCreateOrUpdateSample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx cross-env node certificatesCreateOrUpdateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[certificatescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/certificatesCreateOrUpdateSample.js -[certificatesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/certificatesDeleteSample.js -[certificatesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/certificatesGetSample.js -[certificateslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/certificatesListSample.js -[certificatesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/certificatesUpdateSample.js -[containerappsauthconfigscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsAuthConfigsCreateOrUpdateSample.js -[containerappsauthconfigsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsAuthConfigsDeleteSample.js -[containerappsauthconfigsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsAuthConfigsGetSample.js -[containerappsauthconfigslistbycontainerappsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsAuthConfigsListByContainerAppSample.js -[containerappscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsCreateOrUpdateSample.js -[containerappsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsDeleteSample.js -[containerappsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsGetSample.js -[containerappslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsListByResourceGroupSample.js -[containerappslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsListBySubscriptionSample.js -[containerappslistcustomhostnameanalysissample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsListCustomHostNameAnalysisSample.js -[containerappslistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsListSecretsSample.js -[containerappsrevisionreplicasgetreplicasample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionReplicasGetReplicaSample.js -[containerappsrevisionreplicaslistreplicassample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionReplicasListReplicasSample.js -[containerappsrevisionsactivaterevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsActivateRevisionSample.js -[containerappsrevisionsdeactivaterevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsDeactivateRevisionSample.js -[containerappsrevisionsgetrevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsGetRevisionSample.js -[containerappsrevisionslistrevisionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsListRevisionsSample.js -[containerappsrevisionsrestartrevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsRestartRevisionSample.js -[containerappssourcecontrolscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsSourceControlsCreateOrUpdateSample.js -[containerappssourcecontrolsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsSourceControlsDeleteSample.js -[containerappssourcecontrolsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsSourceControlsGetSample.js -[containerappssourcecontrolslistbycontainerappsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsSourceControlsListByContainerAppSample.js -[containerappsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsUpdateSample.js -[daprcomponentscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/daprComponentsCreateOrUpdateSample.js -[daprcomponentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/daprComponentsDeleteSample.js -[daprcomponentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/daprComponentsGetSample.js -[daprcomponentslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/daprComponentsListSample.js -[managedenvironmentscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsCreateOrUpdateSample.js -[managedenvironmentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsDeleteSample.js -[managedenvironmentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsGetSample.js -[managedenvironmentslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsListByResourceGroupSample.js -[managedenvironmentslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsListBySubscriptionSample.js -[managedenvironmentsstoragescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsStoragesCreateOrUpdateSample.js -[managedenvironmentsstoragesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsStoragesDeleteSample.js -[managedenvironmentsstoragesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsStoragesGetSample.js -[managedenvironmentsstorageslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsStoragesListSample.js -[managedenvironmentsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsUpdateSample.js -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/operationsListSample.js -[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-app?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/app/arm-app/README.md diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/certificatesCreateOrUpdateSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/certificatesCreateOrUpdateSample.js deleted file mode 100644 index ba0e4022d0de..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/certificatesCreateOrUpdateSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Create or Update a Certificate. - * - * @summary Create or Update a Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json - */ -async function createOrUpdateCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const managedEnvironmentName = "testcontainerenv"; - const name = "certificate-firendly-name"; - const certificateEnvelope = { - location: "East US", - properties: { - password: "private key password", - value: new Uint8Array(), - }, - }; - const options = { - certificateEnvelope, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.createOrUpdate( - resourceGroupName, - managedEnvironmentName, - name, - options - ); - console.log(result); -} - -createOrUpdateCertificate().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/certificatesDeleteSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/certificatesDeleteSample.js deleted file mode 100644 index 0fbaecd4d33e..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/certificatesDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Deletes the specified Certificate. - * - * @summary Deletes the specified Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Delete.json - */ -async function deleteCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const managedEnvironmentName = "testcontainerenv"; - const name = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.delete(resourceGroupName, managedEnvironmentName, name); - console.log(result); -} - -deleteCertificate().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/certificatesGetSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/certificatesGetSample.js deleted file mode 100644 index d0e1bc5770a3..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/certificatesGetSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the specified Certificate. - * - * @summary Get the specified Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Get.json - */ -async function getCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const managedEnvironmentName = "testcontainerenv"; - const name = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.get(resourceGroupName, managedEnvironmentName, name); - console.log(result); -} - -getCertificate().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/certificatesListSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/certificatesListSample.js deleted file mode 100644 index 21ae888dd338..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/certificatesListSample.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the Certificates in a given managed environment. - * - * @summary Get the Certificates in a given managed environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json - */ -async function listCertificatesByManagedEnvironment() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const managedEnvironmentName = "testcontainerenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.certificates.list(resourceGroupName, managedEnvironmentName)) { - resArray.push(item); - } - console.log(resArray); -} - -listCertificatesByManagedEnvironment().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/certificatesUpdateSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/certificatesUpdateSample.js deleted file mode 100644 index f5876664122c..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/certificatesUpdateSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Patches a certificate. Currently only patching of tags is supported - * - * @summary Patches a certificate. Currently only patching of tags is supported - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_Patch.json - */ -async function patchCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const managedEnvironmentName = "testcontainerenv"; - const name = "certificate-firendly-name"; - const certificateEnvelope = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.update( - resourceGroupName, - managedEnvironmentName, - name, - certificateEnvelope - ); - console.log(result); -} - -patchCertificate().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsAuthConfigsCreateOrUpdateSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsAuthConfigsCreateOrUpdateSample.js deleted file mode 100644 index d2b098640337..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsAuthConfigsCreateOrUpdateSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Description for Create or update the AuthConfig for a Container App. - * - * @summary Description for Create or update the AuthConfig for a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/AuthConfigs_CreateOrUpdate.json - */ -async function createOrUpdateContainerAppAuthConfig() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const name = "current"; - const authConfigEnvelope = { - globalValidation: { unauthenticatedClientAction: "AllowAnonymous" }, - identityProviders: { - facebook: { - registration: { appId: "123", appSecretSettingName: "facebook-secret" }, - }, - }, - platform: { enabled: true }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.createOrUpdate( - resourceGroupName, - containerAppName, - name, - authConfigEnvelope - ); - console.log(result); -} - -createOrUpdateContainerAppAuthConfig().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsAuthConfigsDeleteSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsAuthConfigsDeleteSample.js deleted file mode 100644 index 6f67fc553f03..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsAuthConfigsDeleteSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Description for Delete a Container App AuthConfig. - * - * @summary Description for Delete a Container App AuthConfig. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/AuthConfigs_Delete.json - */ -async function deleteContainerAppAuthConfig() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const name = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.delete( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -deleteContainerAppAuthConfig().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsAuthConfigsGetSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsAuthConfigsGetSample.js deleted file mode 100644 index 0d4d4a605942..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsAuthConfigsGetSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get a AuthConfig of a Container App. - * - * @summary Get a AuthConfig of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/AuthConfigs_Get.json - */ -async function getContainerAppAuthConfig() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const name = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.get( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -getContainerAppAuthConfig().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsAuthConfigsListByContainerAppSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsAuthConfigsListByContainerAppSample.js deleted file mode 100644 index 5af5c58bdac5..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsAuthConfigsListByContainerAppSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the Container App AuthConfigs in a given resource group. - * - * @summary Get the Container App AuthConfigs in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/AuthConfigs_ListByContainer.json - */ -async function listAuthConfigsByContainerApps() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsAuthConfigs.listByContainerApp( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listAuthConfigsByContainerApps().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsCreateOrUpdateSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsCreateOrUpdateSample.js deleted file mode 100644 index 2486b6202c65..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsCreateOrUpdateSample.js +++ /dev/null @@ -1,90 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Description for Create or update a Container App. - * - * @summary Description for Create or update a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_CreateOrUpdate.json - */ -async function createOrUpdateContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const name = "testcontainerApp0"; - const containerAppEnvelope = { - configuration: { - dapr: { appPort: 3000, appProtocol: "http", enabled: true }, - ingress: { - customDomains: [ - { - name: "www.my-name.com", - bindingType: "SniEnabled", - certificateId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com", - }, - { - name: "www.my-other-name.com", - bindingType: "SniEnabled", - certificateId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com", - }, - ], - external: true, - targetPort: 3000, - }, - }, - location: "East US", - managedEnvironmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - template: { - containers: [ - { - name: "testcontainerApp0", - image: "repo/testcontainerApp0:v1", - probes: [ - { - type: "liveness", - httpGet: { - path: "/health", - httpHeaders: [{ name: "Custom-Header", value: "Awesome" }], - port: 8080, - }, - initialDelaySeconds: 3, - periodSeconds: 3, - }, - ], - }, - ], - scale: { - maxReplicas: 5, - minReplicas: 1, - rules: [ - { - name: "httpscalingrule", - custom: { type: "http", metadata: { concurrentRequests: "50" } }, - }, - ], - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginCreateOrUpdateAndWait( - resourceGroupName, - name, - containerAppEnvelope - ); - console.log(result); -} - -createOrUpdateContainerApp().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsDeleteSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsDeleteSample.js deleted file mode 100644 index 438be2d524c9..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsDeleteSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Description for Delete a Container App. - * - * @summary Description for Delete a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Delete.json - */ -async function deleteContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const name = "testWorkerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginDeleteAndWait(resourceGroupName, name); - console.log(result); -} - -deleteContainerApp().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsGetSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsGetSample.js deleted file mode 100644 index 084ac03b22c0..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsGetSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the properties of a Container App. - * - * @summary Get the properties of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Get.json - */ -async function getContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const name = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.get(resourceGroupName, name); - console.log(result); -} - -getContainerApp().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsListByResourceGroupSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsListByResourceGroupSample.js deleted file mode 100644 index 62a74f53f522..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsListByResourceGroupSample.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the Container Apps in a given resource group. - * - * @summary Get the Container Apps in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListByResourceGroup.json - */ -async function listContainerAppsByResourceGroup() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerApps.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppsByResourceGroup().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsListBySubscriptionSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsListBySubscriptionSample.js deleted file mode 100644 index e02beeba7648..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsListBySubscriptionSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the Container Apps in a given subscription. - * - * @summary Get the Container Apps in a given subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListBySubscription.json - */ -async function listContainerAppsBySubscription() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerApps.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppsBySubscription().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsListCustomHostNameAnalysisSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsListCustomHostNameAnalysisSample.js deleted file mode 100644 index 214d6f0a246d..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsListCustomHostNameAnalysisSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Analyzes a custom hostname for a Container App - * - * @summary Analyzes a custom hostname for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json - */ -async function analyzeCustomHostname() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const customHostname = "my.name.corp"; - const options = { - customHostname, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.listCustomHostNameAnalysis( - resourceGroupName, - containerAppName, - options - ); - console.log(result); -} - -analyzeCustomHostname().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsListSecretsSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsListSecretsSample.js deleted file mode 100644 index 2393fe6a9341..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsListSecretsSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to List secrets for a container app - * - * @summary List secrets for a container app - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListSecrets.json - */ -async function listContainerAppsSecrets() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const name = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.listSecrets(resourceGroupName, name); - console.log(result); -} - -listContainerAppsSecrets().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionReplicasGetReplicaSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionReplicasGetReplicaSample.js deleted file mode 100644 index f9a8af4adcc6..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionReplicasGetReplicaSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get a replica for a Container App Revision. - * - * @summary Get a replica for a Container App Revision. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Replicas_Get.json - */ -async function getContainerAppRevisionReplica() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "myapp"; - const revisionName = "myapp--0wlqy09"; - const name = "myapp--0wlqy09-5d9774cff-5wnd8"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisionReplicas.getReplica( - resourceGroupName, - containerAppName, - revisionName, - name - ); - console.log(result); -} - -getContainerAppRevisionReplica().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionReplicasListReplicasSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionReplicasListReplicasSample.js deleted file mode 100644 index ff795656f3e6..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionReplicasListReplicasSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to List replicas for a Container App Revision. - * - * @summary List replicas for a Container App Revision. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Replicas_List.json - */ -async function listContainerAppReplicas() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "myapp"; - const revisionName = "myapp--0wlqy09"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisionReplicas.listReplicas( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -listContainerAppReplicas().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsActivateRevisionSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsActivateRevisionSample.js deleted file mode 100644 index 00558e0519a3..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsActivateRevisionSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Activates a revision for a Container App - * - * @summary Activates a revision for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_Activate.json - */ -async function activateContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const name = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.activateRevision( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -activateContainerAppRevision().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsDeactivateRevisionSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsDeactivateRevisionSample.js deleted file mode 100644 index f0613ccf6307..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsDeactivateRevisionSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Deactivates a revision for a Container App - * - * @summary Deactivates a revision for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_Deactivate.json - */ -async function deactivateContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const name = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.deactivateRevision( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -deactivateContainerAppRevision().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsGetRevisionSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsGetRevisionSample.js deleted file mode 100644 index eb13d7a823ad..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsGetRevisionSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get a revision of a Container App. - * - * @summary Get a revision of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_Get.json - */ -async function getContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const name = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.getRevision( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -getContainerAppRevision().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsListRevisionsSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsListRevisionsSample.js deleted file mode 100644 index 677600bfd580..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsListRevisionsSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the Revisions for a given Container App. - * - * @summary Get the Revisions for a given Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_List.json - */ -async function listContainerAppRevisions() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsRevisions.listRevisions( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppRevisions().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsRestartRevisionSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsRestartRevisionSample.js deleted file mode 100644 index 32d200bdf205..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsRestartRevisionSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Restarts a revision for a Container App - * - * @summary Restarts a revision for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_Restart.json - */ -async function restartContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testStaticSite0"; - const name = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.restartRevision( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -restartContainerAppRevision().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsSourceControlsCreateOrUpdateSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsSourceControlsCreateOrUpdateSample.js deleted file mode 100644 index 24eb059852c8..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsSourceControlsCreateOrUpdateSample.js +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Description for Create or update the SourceControl for a Container App. - * - * @summary Description for Create or update the SourceControl for a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/SourceControls_CreateOrUpdate.json - */ -async function createOrUpdateContainerAppSourceControl() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const name = "current"; - const sourceControlEnvelope = { - branch: "master", - githubActionConfiguration: { - azureCredentials: { - clientId: "", - clientSecret: "", - tenantId: "", - }, - registryInfo: { - registryPassword: "", - registryUrl: "xwang971reg.azurecr.io", - registryUserName: "xwang971reg", - }, - }, - repoUrl: "https://github.com/xwang971/ghatest", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.beginCreateOrUpdateAndWait( - resourceGroupName, - containerAppName, - name, - sourceControlEnvelope - ); - console.log(result); -} - -createOrUpdateContainerAppSourceControl().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsSourceControlsDeleteSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsSourceControlsDeleteSample.js deleted file mode 100644 index 36d8037d49a5..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsSourceControlsDeleteSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Description for Delete a Container App SourceControl. - * - * @summary Description for Delete a Container App SourceControl. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/SourceControls_Delete.json - */ -async function deleteContainerAppSourceControl() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const name = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.beginDeleteAndWait( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -deleteContainerAppSourceControl().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsSourceControlsGetSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsSourceControlsGetSample.js deleted file mode 100644 index 52e7277017a1..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsSourceControlsGetSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get a SourceControl of a Container App. - * - * @summary Get a SourceControl of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/SourceControls_Get.json - */ -async function getContainerAppSourceControl() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const name = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.get( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -getContainerAppSourceControl().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsSourceControlsListByContainerAppSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsSourceControlsListByContainerAppSample.js deleted file mode 100644 index 12005c154314..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsSourceControlsListByContainerAppSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the Container App SourceControls in a given resource group. - * - * @summary Get the Container App SourceControls in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/SourceControls_ListByContainer.json - */ -async function listAppSourceControls() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsSourceControls.listByContainerApp( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listAppSourceControls().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsUpdateSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsUpdateSample.js deleted file mode 100644 index 5fe32a3e1413..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsUpdateSample.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Patches a Container App. Currently only patching of tags is supported - * - * @summary Patches a Container App. Currently only patching of tags is supported - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Patch.json - */ -async function patchContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const name = "testcontainerApp0"; - const containerAppEnvelope = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.update(resourceGroupName, name, containerAppEnvelope); - console.log(result); -} - -patchContainerApp().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/daprComponentsCreateOrUpdateSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/daprComponentsCreateOrUpdateSample.js deleted file mode 100644 index 67e14853f537..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/daprComponentsCreateOrUpdateSample.js +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Creates or updates a Dapr Component in a Managed Environment. - * - * @summary Creates or updates a Dapr Component in a Managed Environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/DaprComponents_CreateOrUpdate.json - */ -async function createOrUpdateDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const name = "reddog"; - const daprComponentEnvelope = { - componentType: "state.azure.cosmosdb", - ignoreErrors: false, - initTimeout: "50s", - metadata: [ - { name: "url", value: "" }, - { name: "database", value: "itemsDB" }, - { name: "collection", value: "items" }, - { name: "masterkey", secretRef: "masterkey" }, - ], - scopes: ["container-app-1", "container-app-2"], - secrets: [{ name: "masterkey", value: "keyvalue" }], - version: "v1", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.createOrUpdate( - resourceGroupName, - environmentName, - name, - daprComponentEnvelope - ); - console.log(result); -} - -createOrUpdateDaprComponent().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/daprComponentsDeleteSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/daprComponentsDeleteSample.js deleted file mode 100644 index b17b0327f7f4..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/daprComponentsDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Delete a Dapr Component from a Managed Environment. - * - * @summary Delete a Dapr Component from a Managed Environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/DaprComponents_Delete.json - */ -async function deleteDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const name = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.delete(resourceGroupName, environmentName, name); - console.log(result); -} - -deleteDaprComponent().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/daprComponentsGetSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/daprComponentsGetSample.js deleted file mode 100644 index bd96f6b5a42b..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/daprComponentsGetSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get a dapr component. - * - * @summary Get a dapr component. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/DaprComponents_Get.json - */ -async function getDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const name = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.get(resourceGroupName, environmentName, name); - console.log(result); -} - -getDaprComponent().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/daprComponentsListSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/daprComponentsListSample.js deleted file mode 100644 index 09461560ad3a..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/daprComponentsListSample.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the Dapr Components for a managed environment. - * - * @summary Get the Dapr Components for a managed environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/DaprComponents_List.json - */ -async function listDaprComponents() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.daprComponents.list(resourceGroupName, environmentName)) { - resArray.push(item); - } - console.log(resArray); -} - -listDaprComponents().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsCreateOrUpdateSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsCreateOrUpdateSample.js deleted file mode 100644 index ac88f16bac50..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsCreateOrUpdateSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Creates or updates a Managed Environment used to host container apps. - * - * @summary Creates or updates a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json - */ -async function createEnvironments() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const name = "testcontainerenv"; - const environmentEnvelope = { - appLogsConfiguration: { - logAnalyticsConfiguration: { customerId: "string", sharedKey: "string" }, - }, - location: "East US", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginCreateOrUpdateAndWait( - resourceGroupName, - name, - environmentEnvelope - ); - console.log(result); -} - -createEnvironments().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsDeleteSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsDeleteSample.js deleted file mode 100644 index 7b14b36e8094..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsDeleteSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Delete a Managed Environment if it does not have any container apps. - * - * @summary Delete a Managed Environment if it does not have any container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Delete.json - */ -async function deleteEnvironmentByName() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const name = "examplekenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginDeleteAndWait(resourceGroupName, name); - console.log(result); -} - -deleteEnvironmentByName().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsGetSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsGetSample.js deleted file mode 100644 index 64c77ef2cc01..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsGetSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the properties of a Managed Environment used to host container apps. - * - * @summary Get the properties of a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Get.json - */ -async function getEnvironmentsByName() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const name = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.get(resourceGroupName, name); - console.log(result); -} - -getEnvironmentsByName().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsListByResourceGroupSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsListByResourceGroupSample.js deleted file mode 100644 index c7801458ec72..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsListByResourceGroupSample.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get all the Managed Environments in a resource group. - * - * @summary Get all the Managed Environments in a resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json - */ -async function listEnvironmentsByResourceGroup() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -listEnvironmentsByResourceGroup().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsListBySubscriptionSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsListBySubscriptionSample.js deleted file mode 100644 index b13f81c237b0..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsListBySubscriptionSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get all Managed Environments for a subscription. - * - * @summary Get all Managed Environments for a subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListBySubscription.json - */ -async function listEnvironmentsBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -listEnvironmentsBySubscription().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsStoragesCreateOrUpdateSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsStoragesCreateOrUpdateSample.js deleted file mode 100644 index 4fcc05aa216f..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsStoragesCreateOrUpdateSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Create or update storage for a managedEnvironment. - * - * @summary Create or update storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json - */ -async function createOrUpdateEnvironmentsStorage() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const envName = "managedEnv"; - const name = "jlaw-demo1"; - const storageEnvelope = { - properties: { - azureFile: { - accessMode: "ReadOnly", - accountKey: "key", - accountName: "account1", - shareName: "share1", - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.createOrUpdate( - resourceGroupName, - envName, - name, - storageEnvelope - ); - console.log(result); -} - -createOrUpdateEnvironmentsStorage().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsStoragesDeleteSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsStoragesDeleteSample.js deleted file mode 100644 index 74d62824fdb0..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsStoragesDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Delete storage for a managedEnvironment. - * - * @summary Delete storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_Delete.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const envName = "managedEnv"; - const name = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.delete(resourceGroupName, envName, name); - console.log(result); -} - -listEnvironmentsStoragesBySubscription().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsStoragesGetSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsStoragesGetSample.js deleted file mode 100644 index 6b2156c3f1b4..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsStoragesGetSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get storage for a managedEnvironment. - * - * @summary Get storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_Get.json - */ -async function getAEnvironmentsStoragePropertiesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const envName = "managedEnv"; - const name = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.get(resourceGroupName, envName, name); - console.log(result); -} - -getAEnvironmentsStoragePropertiesBySubscription().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsStoragesListSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsStoragesListSample.js deleted file mode 100644 index cf95baf60092..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsStoragesListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get all storages for a managedEnvironment. - * - * @summary Get all storages for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_List.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const envName = "managedEnv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.list(resourceGroupName, envName); - console.log(result); -} - -listEnvironmentsStoragesBySubscription().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsUpdateSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsUpdateSample.js deleted file mode 100644 index 3515e8cb0f5a..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsUpdateSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Patches a Managed Environment. Only patching of tags is supported currently - * - * @summary Patches a Managed Environment. Only patching of tags is supported currently - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Patch.json - */ -async function patchManagedEnvironment() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const name = "testcontainerenv"; - const environmentEnvelope = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.update( - resourceGroupName, - name, - environmentEnvelope - ); - console.log(result); -} - -patchManagedEnvironment().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/operationsListSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/operationsListSample.js deleted file mode 100644 index 191858d4b9ec..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/operationsListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Lists all of the available RP operations. - * - * @summary Lists all of the available RP operations. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Operations_List.json - */ -async function listAllOperations() { - const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -listAllOperations().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/package.json b/sdk/app/arm-app/samples/v1-beta/javascript/package.json deleted file mode 100644 index d34d2209144e..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "@azure-samples/arm-app-js-beta", - "private": true, - "version": "1.0.0", - "description": " client library samples for JavaScript (Beta)", - "engines": { - "node": ">=12.0.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/app/arm-app" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/app/arm-app", - "dependencies": { - "@azure/arm-app": "next", - "dotenv": "latest", - "@azure/identity": "^2.0.1" - } -} diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/sample.env b/sdk/app/arm-app/samples/v1-beta/javascript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/README.md b/sdk/app/arm-app/samples/v1-beta/typescript/README.md deleted file mode 100644 index 200612321d38..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/README.md +++ /dev/null @@ -1,147 +0,0 @@ -# client library samples for TypeScript (Beta) - -These sample programs show how to use the TypeScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| ------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [certificatesCreateOrUpdateSample.ts][certificatescreateorupdatesample] | Create or Update a Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json | -| [certificatesDeleteSample.ts][certificatesdeletesample] | Deletes the specified Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Delete.json | -| [certificatesGetSample.ts][certificatesgetsample] | Get the specified Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Get.json | -| [certificatesListSample.ts][certificateslistsample] | Get the Certificates in a given managed environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json | -| [certificatesUpdateSample.ts][certificatesupdatesample] | Patches a certificate. Currently only patching of tags is supported x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_Patch.json | -| [containerAppsAuthConfigsCreateOrUpdateSample.ts][containerappsauthconfigscreateorupdatesample] | Description for Create or update the AuthConfig for a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/AuthConfigs_CreateOrUpdate.json | -| [containerAppsAuthConfigsDeleteSample.ts][containerappsauthconfigsdeletesample] | Description for Delete a Container App AuthConfig. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/AuthConfigs_Delete.json | -| [containerAppsAuthConfigsGetSample.ts][containerappsauthconfigsgetsample] | Get a AuthConfig of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/AuthConfigs_Get.json | -| [containerAppsAuthConfigsListByContainerAppSample.ts][containerappsauthconfigslistbycontainerappsample] | Get the Container App AuthConfigs in a given resource group. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/AuthConfigs_ListByContainer.json | -| [containerAppsCreateOrUpdateSample.ts][containerappscreateorupdatesample] | Description for Create or update a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_CreateOrUpdate.json | -| [containerAppsDeleteSample.ts][containerappsdeletesample] | Description for Delete a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Delete.json | -| [containerAppsGetSample.ts][containerappsgetsample] | Get the properties of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Get.json | -| [containerAppsListByResourceGroupSample.ts][containerappslistbyresourcegroupsample] | Get the Container Apps in a given resource group. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListByResourceGroup.json | -| [containerAppsListBySubscriptionSample.ts][containerappslistbysubscriptionsample] | Get the Container Apps in a given subscription. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListBySubscription.json | -| [containerAppsListCustomHostNameAnalysisSample.ts][containerappslistcustomhostnameanalysissample] | Analyzes a custom hostname for a Container App x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json | -| [containerAppsListSecretsSample.ts][containerappslistsecretssample] | List secrets for a container app x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListSecrets.json | -| [containerAppsRevisionReplicasGetReplicaSample.ts][containerappsrevisionreplicasgetreplicasample] | Get a replica for a Container App Revision. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Replicas_Get.json | -| [containerAppsRevisionReplicasListReplicasSample.ts][containerappsrevisionreplicaslistreplicassample] | List replicas for a Container App Revision. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Replicas_List.json | -| [containerAppsRevisionsActivateRevisionSample.ts][containerappsrevisionsactivaterevisionsample] | Activates a revision for a Container App x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_Activate.json | -| [containerAppsRevisionsDeactivateRevisionSample.ts][containerappsrevisionsdeactivaterevisionsample] | Deactivates a revision for a Container App x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_Deactivate.json | -| [containerAppsRevisionsGetRevisionSample.ts][containerappsrevisionsgetrevisionsample] | Get a revision of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_Get.json | -| [containerAppsRevisionsListRevisionsSample.ts][containerappsrevisionslistrevisionssample] | Get the Revisions for a given Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_List.json | -| [containerAppsRevisionsRestartRevisionSample.ts][containerappsrevisionsrestartrevisionsample] | Restarts a revision for a Container App x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_Restart.json | -| [containerAppsSourceControlsCreateOrUpdateSample.ts][containerappssourcecontrolscreateorupdatesample] | Description for Create or update the SourceControl for a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/SourceControls_CreateOrUpdate.json | -| [containerAppsSourceControlsDeleteSample.ts][containerappssourcecontrolsdeletesample] | Description for Delete a Container App SourceControl. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/SourceControls_Delete.json | -| [containerAppsSourceControlsGetSample.ts][containerappssourcecontrolsgetsample] | Get a SourceControl of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/SourceControls_Get.json | -| [containerAppsSourceControlsListByContainerAppSample.ts][containerappssourcecontrolslistbycontainerappsample] | Get the Container App SourceControls in a given resource group. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/SourceControls_ListByContainer.json | -| [containerAppsUpdateSample.ts][containerappsupdatesample] | Patches a Container App. Currently only patching of tags is supported x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Patch.json | -| [daprComponentsCreateOrUpdateSample.ts][daprcomponentscreateorupdatesample] | Creates or updates a Dapr Component in a Managed Environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/DaprComponents_CreateOrUpdate.json | -| [daprComponentsDeleteSample.ts][daprcomponentsdeletesample] | Delete a Dapr Component from a Managed Environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/DaprComponents_Delete.json | -| [daprComponentsGetSample.ts][daprcomponentsgetsample] | Get a dapr component. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/DaprComponents_Get.json | -| [daprComponentsListSample.ts][daprcomponentslistsample] | Get the Dapr Components for a managed environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/DaprComponents_List.json | -| [managedEnvironmentsCreateOrUpdateSample.ts][managedenvironmentscreateorupdatesample] | Creates or updates a Managed Environment used to host container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json | -| [managedEnvironmentsDeleteSample.ts][managedenvironmentsdeletesample] | Delete a Managed Environment if it does not have any container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Delete.json | -| [managedEnvironmentsGetSample.ts][managedenvironmentsgetsample] | Get the properties of a Managed Environment used to host container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Get.json | -| [managedEnvironmentsListByResourceGroupSample.ts][managedenvironmentslistbyresourcegroupsample] | Get all the Managed Environments in a resource group. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json | -| [managedEnvironmentsListBySubscriptionSample.ts][managedenvironmentslistbysubscriptionsample] | Get all Managed Environments for a subscription. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListBySubscription.json | -| [managedEnvironmentsStoragesCreateOrUpdateSample.ts][managedenvironmentsstoragescreateorupdatesample] | Create or update storage for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json | -| [managedEnvironmentsStoragesDeleteSample.ts][managedenvironmentsstoragesdeletesample] | Delete storage for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_Delete.json | -| [managedEnvironmentsStoragesGetSample.ts][managedenvironmentsstoragesgetsample] | Get storage for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_Get.json | -| [managedEnvironmentsStoragesListSample.ts][managedenvironmentsstorageslistsample] | Get all storages for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_List.json | -| [managedEnvironmentsUpdateSample.ts][managedenvironmentsupdatesample] | Patches a Managed Environment. Only patching of tags is supported currently x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Patch.json | -| [operationsListSample.ts][operationslistsample] | Lists all of the available RP operations. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Operations_List.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://nodejs.org/about/releases/). - -Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using: - -```bash -npm install -g typescript -``` - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Compile the samples: - -```bash -npm run build -``` - -3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -4. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node dist/certificatesCreateOrUpdateSample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx cross-env node dist/certificatesCreateOrUpdateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[certificatescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesCreateOrUpdateSample.ts -[certificatesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesDeleteSample.ts -[certificatesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesGetSample.ts -[certificateslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesListSample.ts -[certificatesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesUpdateSample.ts -[containerappsauthconfigscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsAuthConfigsCreateOrUpdateSample.ts -[containerappsauthconfigsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsAuthConfigsDeleteSample.ts -[containerappsauthconfigsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsAuthConfigsGetSample.ts -[containerappsauthconfigslistbycontainerappsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsAuthConfigsListByContainerAppSample.ts -[containerappscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsCreateOrUpdateSample.ts -[containerappsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsDeleteSample.ts -[containerappsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsGetSample.ts -[containerappslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsListByResourceGroupSample.ts -[containerappslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsListBySubscriptionSample.ts -[containerappslistcustomhostnameanalysissample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsListCustomHostNameAnalysisSample.ts -[containerappslistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsListSecretsSample.ts -[containerappsrevisionreplicasgetreplicasample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionReplicasGetReplicaSample.ts -[containerappsrevisionreplicaslistreplicassample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionReplicasListReplicasSample.ts -[containerappsrevisionsactivaterevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsActivateRevisionSample.ts -[containerappsrevisionsdeactivaterevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsDeactivateRevisionSample.ts -[containerappsrevisionsgetrevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsGetRevisionSample.ts -[containerappsrevisionslistrevisionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsListRevisionsSample.ts -[containerappsrevisionsrestartrevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsRestartRevisionSample.ts -[containerappssourcecontrolscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsSourceControlsCreateOrUpdateSample.ts -[containerappssourcecontrolsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsSourceControlsDeleteSample.ts -[containerappssourcecontrolsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsSourceControlsGetSample.ts -[containerappssourcecontrolslistbycontainerappsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsSourceControlsListByContainerAppSample.ts -[containerappsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsUpdateSample.ts -[daprcomponentscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/daprComponentsCreateOrUpdateSample.ts -[daprcomponentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/daprComponentsDeleteSample.ts -[daprcomponentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/daprComponentsGetSample.ts -[daprcomponentslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/daprComponentsListSample.ts -[managedenvironmentscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsCreateOrUpdateSample.ts -[managedenvironmentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsDeleteSample.ts -[managedenvironmentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsGetSample.ts -[managedenvironmentslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsListByResourceGroupSample.ts -[managedenvironmentslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsListBySubscriptionSample.ts -[managedenvironmentsstoragescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsStoragesCreateOrUpdateSample.ts -[managedenvironmentsstoragesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsStoragesDeleteSample.ts -[managedenvironmentsstoragesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsStoragesGetSample.ts -[managedenvironmentsstorageslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsStoragesListSample.ts -[managedenvironmentsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsUpdateSample.ts -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/operationsListSample.ts -[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-app?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/app/arm-app/README.md -[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/package.json b/sdk/app/arm-app/samples/v1-beta/typescript/package.json deleted file mode 100644 index c144f4072c7d..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "@azure-samples/arm-app-ts-beta", - "private": true, - "version": "1.0.0", - "description": " client library samples for TypeScript (Beta)", - "engines": { - "node": ">=12.0.0" - }, - "scripts": { - "build": "tsc", - "prebuild": "rimraf dist/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/app/arm-app" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/app/arm-app", - "dependencies": { - "@azure/arm-app": "next", - "dotenv": "latest", - "@azure/identity": "^2.0.1" - }, - "devDependencies": { - "@types/node": "^12.0.0", - "typescript": "~4.4.0", - "rimraf": "latest" - } -} diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/sample.env b/sdk/app/arm-app/samples/v1-beta/typescript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesCreateOrUpdateSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesCreateOrUpdateSample.ts deleted file mode 100644 index 487eec304763..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesCreateOrUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - Certificate, - CertificatesCreateOrUpdateOptionalParams, - ContainerAppsAPIClient -} from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Create or Update a Certificate. - * - * @summary Create or Update a Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json - */ -async function createOrUpdateCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const managedEnvironmentName = "testcontainerenv"; - const name = "certificate-firendly-name"; - const certificateEnvelope: Certificate = { - location: "East US", - properties: { - password: "private key password", - value: new Uint8Array() - } - }; - const options: CertificatesCreateOrUpdateOptionalParams = { - certificateEnvelope - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.createOrUpdate( - resourceGroupName, - managedEnvironmentName, - name, - options - ); - console.log(result); -} - -createOrUpdateCertificate().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesDeleteSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesDeleteSample.ts deleted file mode 100644 index c872144e3b1b..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Deletes the specified Certificate. - * - * @summary Deletes the specified Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Delete.json - */ -async function deleteCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const managedEnvironmentName = "testcontainerenv"; - const name = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.delete( - resourceGroupName, - managedEnvironmentName, - name - ); - console.log(result); -} - -deleteCertificate().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesGetSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesGetSample.ts deleted file mode 100644 index fb53e9432dcd..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the specified Certificate. - * - * @summary Get the specified Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Get.json - */ -async function getCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const managedEnvironmentName = "testcontainerenv"; - const name = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.get( - resourceGroupName, - managedEnvironmentName, - name - ); - console.log(result); -} - -getCertificate().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesListSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesListSample.ts deleted file mode 100644 index 73c627622c1a..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesListSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Certificates in a given managed environment. - * - * @summary Get the Certificates in a given managed environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json - */ -async function listCertificatesByManagedEnvironment() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const managedEnvironmentName = "testcontainerenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.certificates.list( - resourceGroupName, - managedEnvironmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listCertificatesByManagedEnvironment().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesUpdateSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesUpdateSample.ts deleted file mode 100644 index 95c86c42fe06..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesUpdateSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { CertificatePatch, ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Patches a certificate. Currently only patching of tags is supported - * - * @summary Patches a certificate. Currently only patching of tags is supported - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_Patch.json - */ -async function patchCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const managedEnvironmentName = "testcontainerenv"; - const name = "certificate-firendly-name"; - const certificateEnvelope: CertificatePatch = { - tags: { tag1: "value1", tag2: "value2" } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.update( - resourceGroupName, - managedEnvironmentName, - name, - certificateEnvelope - ); - console.log(result); -} - -patchCertificate().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsAuthConfigsCreateOrUpdateSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsAuthConfigsCreateOrUpdateSample.ts deleted file mode 100644 index 81f7090e87bf..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsAuthConfigsCreateOrUpdateSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AuthConfig, ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Description for Create or update the AuthConfig for a Container App. - * - * @summary Description for Create or update the AuthConfig for a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/AuthConfigs_CreateOrUpdate.json - */ -async function createOrUpdateContainerAppAuthConfig() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const name = "current"; - const authConfigEnvelope: AuthConfig = { - globalValidation: { unauthenticatedClientAction: "AllowAnonymous" }, - identityProviders: { - facebook: { - registration: { appId: "123", appSecretSettingName: "facebook-secret" } - } - }, - platform: { enabled: true } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.createOrUpdate( - resourceGroupName, - containerAppName, - name, - authConfigEnvelope - ); - console.log(result); -} - -createOrUpdateContainerAppAuthConfig().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsAuthConfigsDeleteSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsAuthConfigsDeleteSample.ts deleted file mode 100644 index 0554af0821fa..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsAuthConfigsDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Description for Delete a Container App AuthConfig. - * - * @summary Description for Delete a Container App AuthConfig. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/AuthConfigs_Delete.json - */ -async function deleteContainerAppAuthConfig() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const name = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.delete( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -deleteContainerAppAuthConfig().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsAuthConfigsGetSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsAuthConfigsGetSample.ts deleted file mode 100644 index 853a1febc1dd..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsAuthConfigsGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a AuthConfig of a Container App. - * - * @summary Get a AuthConfig of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/AuthConfigs_Get.json - */ -async function getContainerAppAuthConfig() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const name = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.get( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -getContainerAppAuthConfig().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsAuthConfigsListByContainerAppSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsAuthConfigsListByContainerAppSample.ts deleted file mode 100644 index e3f89107286b..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsAuthConfigsListByContainerAppSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Container App AuthConfigs in a given resource group. - * - * @summary Get the Container App AuthConfigs in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/AuthConfigs_ListByContainer.json - */ -async function listAuthConfigsByContainerApps() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsAuthConfigs.listByContainerApp( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listAuthConfigsByContainerApps().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsCreateOrUpdateSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsCreateOrUpdateSample.ts deleted file mode 100644 index cb2523bdfb55..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsCreateOrUpdateSample.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerApp, ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Description for Create or update a Container App. - * - * @summary Description for Create or update a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_CreateOrUpdate.json - */ -async function createOrUpdateContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const name = "testcontainerApp0"; - const containerAppEnvelope: ContainerApp = { - configuration: { - dapr: { appPort: 3000, appProtocol: "http", enabled: true }, - ingress: { - customDomains: [ - { - name: "www.my-name.com", - bindingType: "SniEnabled", - certificateId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com" - }, - { - name: "www.my-other-name.com", - bindingType: "SniEnabled", - certificateId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com" - } - ], - external: true, - targetPort: 3000 - } - }, - location: "East US", - managedEnvironmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - template: { - containers: [ - { - name: "testcontainerApp0", - image: "repo/testcontainerApp0:v1", - probes: [ - { - type: "liveness", - httpGet: { - path: "/health", - httpHeaders: [{ name: "Custom-Header", value: "Awesome" }], - port: 8080 - }, - initialDelaySeconds: 3, - periodSeconds: 3 - } - ] - } - ], - scale: { - maxReplicas: 5, - minReplicas: 1, - rules: [ - { - name: "httpscalingrule", - custom: { type: "http", metadata: { concurrentRequests: "50" } } - } - ] - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginCreateOrUpdateAndWait( - resourceGroupName, - name, - containerAppEnvelope - ); - console.log(result); -} - -createOrUpdateContainerApp().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsDeleteSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsDeleteSample.ts deleted file mode 100644 index c6b7ad11da66..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Description for Delete a Container App. - * - * @summary Description for Delete a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Delete.json - */ -async function deleteContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const name = "testWorkerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginDeleteAndWait( - resourceGroupName, - name - ); - console.log(result); -} - -deleteContainerApp().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsGetSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsGetSample.ts deleted file mode 100644 index c3ed9ba32bdf..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsGetSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the properties of a Container App. - * - * @summary Get the properties of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Get.json - */ -async function getContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const name = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.get(resourceGroupName, name); - console.log(result); -} - -getContainerApp().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsListByResourceGroupSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsListByResourceGroupSample.ts deleted file mode 100644 index ef6d4c259ce4..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsListByResourceGroupSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Container Apps in a given resource group. - * - * @summary Get the Container Apps in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListByResourceGroup.json - */ -async function listContainerAppsByResourceGroup() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerApps.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppsByResourceGroup().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsListBySubscriptionSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsListBySubscriptionSample.ts deleted file mode 100644 index 9204c4d3330c..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Container Apps in a given subscription. - * - * @summary Get the Container Apps in a given subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListBySubscription.json - */ -async function listContainerAppsBySubscription() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerApps.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppsBySubscription().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsListCustomHostNameAnalysisSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsListCustomHostNameAnalysisSample.ts deleted file mode 100644 index 549bd4a27bf5..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsListCustomHostNameAnalysisSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ContainerAppsListCustomHostNameAnalysisOptionalParams, - ContainerAppsAPIClient -} from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Analyzes a custom hostname for a Container App - * - * @summary Analyzes a custom hostname for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json - */ -async function analyzeCustomHostname() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const customHostname = "my.name.corp"; - const options: ContainerAppsListCustomHostNameAnalysisOptionalParams = { - customHostname - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.listCustomHostNameAnalysis( - resourceGroupName, - containerAppName, - options - ); - console.log(result); -} - -analyzeCustomHostname().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsListSecretsSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsListSecretsSample.ts deleted file mode 100644 index 966f520a5e27..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsListSecretsSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to List secrets for a container app - * - * @summary List secrets for a container app - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListSecrets.json - */ -async function listContainerAppsSecrets() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const name = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.listSecrets( - resourceGroupName, - name - ); - console.log(result); -} - -listContainerAppsSecrets().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionReplicasGetReplicaSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionReplicasGetReplicaSample.ts deleted file mode 100644 index 30ef6ae6b233..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionReplicasGetReplicaSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a replica for a Container App Revision. - * - * @summary Get a replica for a Container App Revision. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Replicas_Get.json - */ -async function getContainerAppRevisionReplica() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "myapp"; - const revisionName = "myapp--0wlqy09"; - const name = "myapp--0wlqy09-5d9774cff-5wnd8"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisionReplicas.getReplica( - resourceGroupName, - containerAppName, - revisionName, - name - ); - console.log(result); -} - -getContainerAppRevisionReplica().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionReplicasListReplicasSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionReplicasListReplicasSample.ts deleted file mode 100644 index 844b7bdee308..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionReplicasListReplicasSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to List replicas for a Container App Revision. - * - * @summary List replicas for a Container App Revision. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Replicas_List.json - */ -async function listContainerAppReplicas() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "myapp"; - const revisionName = "myapp--0wlqy09"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisionReplicas.listReplicas( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -listContainerAppReplicas().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsActivateRevisionSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsActivateRevisionSample.ts deleted file mode 100644 index 38c6a5eb9828..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsActivateRevisionSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Activates a revision for a Container App - * - * @summary Activates a revision for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_Activate.json - */ -async function activateContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const name = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.activateRevision( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -activateContainerAppRevision().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsDeactivateRevisionSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsDeactivateRevisionSample.ts deleted file mode 100644 index d413520920df..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsDeactivateRevisionSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Deactivates a revision for a Container App - * - * @summary Deactivates a revision for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_Deactivate.json - */ -async function deactivateContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const name = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.deactivateRevision( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -deactivateContainerAppRevision().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsGetRevisionSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsGetRevisionSample.ts deleted file mode 100644 index 2a97703a317e..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsGetRevisionSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a revision of a Container App. - * - * @summary Get a revision of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_Get.json - */ -async function getContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const name = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.getRevision( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -getContainerAppRevision().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsListRevisionsSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsListRevisionsSample.ts deleted file mode 100644 index 13ca118da5b4..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsListRevisionsSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Revisions for a given Container App. - * - * @summary Get the Revisions for a given Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_List.json - */ -async function listContainerAppRevisions() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsRevisions.listRevisions( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppRevisions().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsRestartRevisionSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsRestartRevisionSample.ts deleted file mode 100644 index aaec1158e232..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsRestartRevisionSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Restarts a revision for a Container App - * - * @summary Restarts a revision for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_Restart.json - */ -async function restartContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testStaticSite0"; - const name = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.restartRevision( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -restartContainerAppRevision().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsSourceControlsCreateOrUpdateSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsSourceControlsCreateOrUpdateSample.ts deleted file mode 100644 index fb65ad01eb7a..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsSourceControlsCreateOrUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { SourceControl, ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Description for Create or update the SourceControl for a Container App. - * - * @summary Description for Create or update the SourceControl for a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/SourceControls_CreateOrUpdate.json - */ -async function createOrUpdateContainerAppSourceControl() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const name = "current"; - const sourceControlEnvelope: SourceControl = { - branch: "master", - githubActionConfiguration: { - azureCredentials: { - clientId: "", - clientSecret: "", - tenantId: "" - }, - registryInfo: { - registryPassword: "", - registryUrl: "xwang971reg.azurecr.io", - registryUserName: "xwang971reg" - } - }, - repoUrl: "https://github.com/xwang971/ghatest" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.beginCreateOrUpdateAndWait( - resourceGroupName, - containerAppName, - name, - sourceControlEnvelope - ); - console.log(result); -} - -createOrUpdateContainerAppSourceControl().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsSourceControlsDeleteSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsSourceControlsDeleteSample.ts deleted file mode 100644 index 85ea0498d6a4..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsSourceControlsDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Description for Delete a Container App SourceControl. - * - * @summary Description for Delete a Container App SourceControl. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/SourceControls_Delete.json - */ -async function deleteContainerAppSourceControl() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const name = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.beginDeleteAndWait( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -deleteContainerAppSourceControl().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsSourceControlsGetSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsSourceControlsGetSample.ts deleted file mode 100644 index be593d5790a1..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsSourceControlsGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a SourceControl of a Container App. - * - * @summary Get a SourceControl of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/SourceControls_Get.json - */ -async function getContainerAppSourceControl() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const name = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.get( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -getContainerAppSourceControl().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsSourceControlsListByContainerAppSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsSourceControlsListByContainerAppSample.ts deleted file mode 100644 index b4bb6d8b7e93..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsSourceControlsListByContainerAppSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Container App SourceControls in a given resource group. - * - * @summary Get the Container App SourceControls in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/SourceControls_ListByContainer.json - */ -async function listAppSourceControls() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsSourceControls.listByContainerApp( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listAppSourceControls().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsUpdateSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsUpdateSample.ts deleted file mode 100644 index 9343d0472dac..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsUpdateSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppPatch, ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Patches a Container App. Currently only patching of tags is supported - * - * @summary Patches a Container App. Currently only patching of tags is supported - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Patch.json - */ -async function patchContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const name = "testcontainerApp0"; - const containerAppEnvelope: ContainerAppPatch = { - tags: { tag1: "value1", tag2: "value2" } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.update( - resourceGroupName, - name, - containerAppEnvelope - ); - console.log(result); -} - -patchContainerApp().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/daprComponentsCreateOrUpdateSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/daprComponentsCreateOrUpdateSample.ts deleted file mode 100644 index dd0318e85e58..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/daprComponentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { DaprComponent, ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Creates or updates a Dapr Component in a Managed Environment. - * - * @summary Creates or updates a Dapr Component in a Managed Environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/DaprComponents_CreateOrUpdate.json - */ -async function createOrUpdateDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const name = "reddog"; - const daprComponentEnvelope: DaprComponent = { - componentType: "state.azure.cosmosdb", - ignoreErrors: false, - initTimeout: "50s", - metadata: [ - { name: "url", value: "" }, - { name: "database", value: "itemsDB" }, - { name: "collection", value: "items" }, - { name: "masterkey", secretRef: "masterkey" } - ], - scopes: ["container-app-1", "container-app-2"], - secrets: [{ name: "masterkey", value: "keyvalue" }], - version: "v1" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.createOrUpdate( - resourceGroupName, - environmentName, - name, - daprComponentEnvelope - ); - console.log(result); -} - -createOrUpdateDaprComponent().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/daprComponentsDeleteSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/daprComponentsDeleteSample.ts deleted file mode 100644 index d91260e74d5b..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/daprComponentsDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Delete a Dapr Component from a Managed Environment. - * - * @summary Delete a Dapr Component from a Managed Environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/DaprComponents_Delete.json - */ -async function deleteDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const name = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.delete( - resourceGroupName, - environmentName, - name - ); - console.log(result); -} - -deleteDaprComponent().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/daprComponentsGetSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/daprComponentsGetSample.ts deleted file mode 100644 index aaeb76f21d85..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/daprComponentsGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a dapr component. - * - * @summary Get a dapr component. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/DaprComponents_Get.json - */ -async function getDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const name = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.get( - resourceGroupName, - environmentName, - name - ); - console.log(result); -} - -getDaprComponent().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/daprComponentsListSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/daprComponentsListSample.ts deleted file mode 100644 index 42c3487bd276..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/daprComponentsListSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Dapr Components for a managed environment. - * - * @summary Get the Dapr Components for a managed environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/DaprComponents_List.json - */ -async function listDaprComponents() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.daprComponents.list( - resourceGroupName, - environmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listDaprComponents().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsCreateOrUpdateSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsCreateOrUpdateSample.ts deleted file mode 100644 index 8030b24e4581..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ManagedEnvironment, ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Creates or updates a Managed Environment used to host container apps. - * - * @summary Creates or updates a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json - */ -async function createEnvironments() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const name = "testcontainerenv"; - const environmentEnvelope: ManagedEnvironment = { - appLogsConfiguration: { - logAnalyticsConfiguration: { customerId: "string", sharedKey: "string" } - }, - location: "East US" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginCreateOrUpdateAndWait( - resourceGroupName, - name, - environmentEnvelope - ); - console.log(result); -} - -createEnvironments().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsDeleteSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsDeleteSample.ts deleted file mode 100644 index 50c93edba9f4..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Delete a Managed Environment if it does not have any container apps. - * - * @summary Delete a Managed Environment if it does not have any container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Delete.json - */ -async function deleteEnvironmentByName() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const name = "examplekenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginDeleteAndWait( - resourceGroupName, - name - ); - console.log(result); -} - -deleteEnvironmentByName().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsGetSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsGetSample.ts deleted file mode 100644 index db4f69523265..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsGetSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the properties of a Managed Environment used to host container apps. - * - * @summary Get the properties of a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Get.json - */ -async function getEnvironmentsByName() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const name = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.get(resourceGroupName, name); - console.log(result); -} - -getEnvironmentsByName().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsListByResourceGroupSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsListByResourceGroupSample.ts deleted file mode 100644 index cf452fab2bf6..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsListByResourceGroupSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get all the Managed Environments in a resource group. - * - * @summary Get all the Managed Environments in a resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json - */ -async function listEnvironmentsByResourceGroup() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listEnvironmentsByResourceGroup().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsListBySubscriptionSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsListBySubscriptionSample.ts deleted file mode 100644 index ccfe7c862995..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get all Managed Environments for a subscription. - * - * @summary Get all Managed Environments for a subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListBySubscription.json - */ -async function listEnvironmentsBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -listEnvironmentsBySubscription().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsStoragesCreateOrUpdateSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsStoragesCreateOrUpdateSample.ts deleted file mode 100644 index 96a53c68f61f..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsStoragesCreateOrUpdateSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ManagedEnvironmentStorage, - ContainerAppsAPIClient -} from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Create or update storage for a managedEnvironment. - * - * @summary Create or update storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json - */ -async function createOrUpdateEnvironmentsStorage() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const envName = "managedEnv"; - const name = "jlaw-demo1"; - const storageEnvelope: ManagedEnvironmentStorage = { - properties: { - azureFile: { - accessMode: "ReadOnly", - accountKey: "key", - accountName: "account1", - shareName: "share1" - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.createOrUpdate( - resourceGroupName, - envName, - name, - storageEnvelope - ); - console.log(result); -} - -createOrUpdateEnvironmentsStorage().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsStoragesDeleteSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsStoragesDeleteSample.ts deleted file mode 100644 index 71a66acd9251..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsStoragesDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Delete storage for a managedEnvironment. - * - * @summary Delete storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_Delete.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const envName = "managedEnv"; - const name = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.delete( - resourceGroupName, - envName, - name - ); - console.log(result); -} - -listEnvironmentsStoragesBySubscription().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsStoragesGetSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsStoragesGetSample.ts deleted file mode 100644 index 76bd4e1c4a4d..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsStoragesGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get storage for a managedEnvironment. - * - * @summary Get storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_Get.json - */ -async function getAEnvironmentsStoragePropertiesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const envName = "managedEnv"; - const name = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.get( - resourceGroupName, - envName, - name - ); - console.log(result); -} - -getAEnvironmentsStoragePropertiesBySubscription().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsStoragesListSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsStoragesListSample.ts deleted file mode 100644 index dbf75cbe839b..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsStoragesListSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get all storages for a managedEnvironment. - * - * @summary Get all storages for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_List.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const envName = "managedEnv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.list( - resourceGroupName, - envName - ); - console.log(result); -} - -listEnvironmentsStoragesBySubscription().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsUpdateSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsUpdateSample.ts deleted file mode 100644 index d3693deee729..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsUpdateSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ManagedEnvironmentPatch, - ContainerAppsAPIClient -} from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Patches a Managed Environment. Only patching of tags is supported currently - * - * @summary Patches a Managed Environment. Only patching of tags is supported currently - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Patch.json - */ -async function patchManagedEnvironment() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const name = "testcontainerenv"; - const environmentEnvelope: ManagedEnvironmentPatch = { - tags: { tag1: "value1", tag2: "value2" } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.update( - resourceGroupName, - name, - environmentEnvelope - ); - console.log(result); -} - -patchManagedEnvironment().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/operationsListSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/operationsListSample.ts deleted file mode 100644 index 62c55bbfb800..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/operationsListSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Lists all of the available RP operations. - * - * @summary Lists all of the available RP operations. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Operations_List.json - */ -async function listAllOperations() { - const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -listAllOperations().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/tsconfig.json b/sdk/app/arm-app/samples/v1-beta/typescript/tsconfig.json deleted file mode 100644 index 416c2dd82e00..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2018", - "module": "commonjs", - "moduleResolution": "node", - "resolveJsonModule": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "alwaysStrict": true, - "outDir": "dist", - "rootDir": "src" - }, - "include": [ - "src/**.ts" - ] -} diff --git a/sdk/app/arm-app/src/containerAppsAPIClient.ts b/sdk/app/arm-app/src/containerAppsAPIClient.ts index c40368293462..d4e501ffc45b 100644 --- a/sdk/app/arm-app/src/containerAppsAPIClient.ts +++ b/sdk/app/arm-app/src/containerAppsAPIClient.ts @@ -9,28 +9,30 @@ import * as coreClient from "@azure/core-client"; import * as coreAuth from "@azure/core-auth"; import { + ContainerAppsAuthConfigsImpl, ContainerAppsImpl, ContainerAppsRevisionsImpl, ContainerAppsRevisionReplicasImpl, + DaprComponentsImpl, + OperationsImpl, ManagedEnvironmentsImpl, CertificatesImpl, - OperationsImpl, - ContainerAppsSourceControlsImpl, - DaprComponentsImpl, - ContainerAppsAuthConfigsImpl, - ManagedEnvironmentsStoragesImpl + NamespacesImpl, + ManagedEnvironmentsStoragesImpl, + ContainerAppsSourceControlsImpl } from "./operations"; import { + ContainerAppsAuthConfigs, ContainerApps, ContainerAppsRevisions, ContainerAppsRevisionReplicas, + DaprComponents, + Operations, ManagedEnvironments, Certificates, - Operations, - ContainerAppsSourceControls, - DaprComponents, - ContainerAppsAuthConfigs, - ManagedEnvironmentsStorages + Namespaces, + ManagedEnvironmentsStorages, + ContainerAppsSourceControls } from "./operationsInterfaces"; import { ContainerAppsAPIClientOptionalParams } from "./models"; @@ -66,7 +68,7 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-app/1.0.0-beta.1`; + const packageDetails = `azsdk-js-arm-app/1.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -81,8 +83,7 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { userAgentOptions: { userAgentPrefix }, - baseUri: - options.endpoint ?? options.baseUri ?? "https://management.azure.com" + baseUri: options.endpoint || "https://management.azure.com" }; super(optionsWithDefaults); // Parameter assignments @@ -90,33 +91,35 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-01-01-preview"; + this.apiVersion = options.apiVersion || "2022-03-01"; + this.containerAppsAuthConfigs = new ContainerAppsAuthConfigsImpl(this); this.containerApps = new ContainerAppsImpl(this); this.containerAppsRevisions = new ContainerAppsRevisionsImpl(this); this.containerAppsRevisionReplicas = new ContainerAppsRevisionReplicasImpl( this ); + this.daprComponents = new DaprComponentsImpl(this); + this.operations = new OperationsImpl(this); this.managedEnvironments = new ManagedEnvironmentsImpl(this); this.certificates = new CertificatesImpl(this); - this.operations = new OperationsImpl(this); - this.containerAppsSourceControls = new ContainerAppsSourceControlsImpl( + this.namespaces = new NamespacesImpl(this); + this.managedEnvironmentsStorages = new ManagedEnvironmentsStoragesImpl( this ); - this.daprComponents = new DaprComponentsImpl(this); - this.containerAppsAuthConfigs = new ContainerAppsAuthConfigsImpl(this); - this.managedEnvironmentsStorages = new ManagedEnvironmentsStoragesImpl( + this.containerAppsSourceControls = new ContainerAppsSourceControlsImpl( this ); } + containerAppsAuthConfigs: ContainerAppsAuthConfigs; containerApps: ContainerApps; containerAppsRevisions: ContainerAppsRevisions; containerAppsRevisionReplicas: ContainerAppsRevisionReplicas; + daprComponents: DaprComponents; + operations: Operations; managedEnvironments: ManagedEnvironments; certificates: Certificates; - operations: Operations; - containerAppsSourceControls: ContainerAppsSourceControls; - daprComponents: DaprComponents; - containerAppsAuthConfigs: ContainerAppsAuthConfigs; + namespaces: Namespaces; managedEnvironmentsStorages: ManagedEnvironmentsStorages; + containerAppsSourceControls: ContainerAppsSourceControls; } diff --git a/sdk/app/arm-app/src/models/index.ts b/sdk/app/arm-app/src/models/index.ts index 35ac2407869e..4d27abe03bea 100644 --- a/sdk/app/arm-app/src/models/index.ts +++ b/sdk/app/arm-app/src/models/index.ts @@ -8,10 +8,10 @@ import * as coreClient from "@azure/core-client"; -/** Container App collection ARM resource. */ -export interface ContainerAppCollection { +/** AuthConfig collection ARM resource. */ +export interface AuthConfigCollection { /** Collection of resources. */ - value: ContainerApp[]; + value: AuthConfig[]; /** * Link to next page of resources. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -19,322 +19,393 @@ export interface ContainerAppCollection { readonly nextLink?: string; } -/** Managed service identity (system assigned and/or user assigned identities) */ -export interface ManagedServiceIdentity { - /** - * The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly principalId?: string; +/** The configuration settings of the platform of ContainerApp Service Authentication/Authorization. */ +export interface AuthPlatform { + /** true if the Authentication / Authorization feature is enabled for the current app; otherwise, false. */ + enabled?: boolean; /** - * The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. + * The RuntimeVersion of the Authentication / Authorization feature in use for the current app. + * The setting in this value can control the behavior of certain features in the Authentication / Authorization module. */ - readonly tenantId?: string; - /** Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). */ - type: ManagedServiceIdentityType; - /** The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. */ - userAssignedIdentities?: { [propertyName: string]: UserAssignedIdentity }; + runtimeVersion?: string; } -/** User assigned identity properties */ -export interface UserAssignedIdentity { +/** The configuration settings that determines the validation flow of users using ContainerApp Service Authentication/Authorization. */ +export interface GlobalValidation { + /** The action to take when an unauthenticated client attempts to access the app. */ + unauthenticatedClientAction?: UnauthenticatedClientActionV2; /** - * The principal ID of the assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. + * The default authentication provider to use when multiple providers are configured. + * This setting is only needed if multiple providers are configured and the unauthenticated client + * action is set to "RedirectToLoginPage". */ - readonly principalId?: string; + redirectToProvider?: string; + /** The paths for which unauthenticated flow would not be redirected to the login page. */ + excludedPaths?: string[]; +} + +/** The configuration settings of each of the identity providers used to configure ContainerApp Service Authentication/Authorization. */ +export interface IdentityProviders { + /** The configuration settings of the Azure Active directory provider. */ + azureActiveDirectory?: AzureActiveDirectory; + /** The configuration settings of the Facebook provider. */ + facebook?: Facebook; + /** The configuration settings of the GitHub provider. */ + gitHub?: GitHub; + /** The configuration settings of the Google provider. */ + google?: Google; + /** The configuration settings of the Twitter provider. */ + twitter?: Twitter; + /** The configuration settings of the Apple provider. */ + apple?: Apple; + /** The configuration settings of the Azure Static Web Apps provider. */ + azureStaticWebApps?: AzureStaticWebApps; /** - * The client ID of the assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. + * The map of the name of the alias of each custom Open ID Connect provider to the + * configuration settings of the custom Open ID Connect provider. */ - readonly clientId?: string; + customOpenIdConnectProviders?: { + [propertyName: string]: CustomOpenIdConnectProvider; + }; } -/** Non versioned Container App configuration properties that define the mutable settings of a Container app */ -export interface Configuration { - /** Collection of secrets used by a Container app */ - secrets?: Secret[]; +/** The configuration settings of the Azure Active directory provider. */ +export interface AzureActiveDirectory { + /** false if the Azure Active Directory provider should not be enabled despite the set registration; otherwise, true. */ + enabled?: boolean; + /** The configuration settings of the Azure Active Directory app registration. */ + registration?: AzureActiveDirectoryRegistration; + /** The configuration settings of the Azure Active Directory login flow. */ + login?: AzureActiveDirectoryLogin; + /** The configuration settings of the Azure Active Directory token validation flow. */ + validation?: AzureActiveDirectoryValidation; /** - * ActiveRevisionsMode controls how active revisions are handled for the Container app: - * Multiple: multiple revisions can be active. If no value if provided, this is the defaultSingle: Only one revision can be active at a time. Revision weights can not be used in this mode + * Gets a value indicating whether the Azure AD configuration was auto-provisioned using 1st party tooling. + * This is an internal flag primarily intended to support the Azure Management Portal. Users should not + * read or write to this property. */ - activeRevisionsMode?: ActiveRevisionsMode; - /** Ingress configurations. */ - ingress?: Ingress; - /** Collection of private container registry credentials for containers used by the Container app */ - registries?: RegistryCredentials[]; - /** Dapr configuration for the Container App. */ - dapr?: Dapr; + isAutoProvisioned?: boolean; } -/** Secret definition. */ -export interface Secret { - /** Secret Name. */ - name?: string; - /** Secret Value. */ - value?: string; +/** The configuration settings of the Azure Active Directory app registration. */ +export interface AzureActiveDirectoryRegistration { + /** + * The OpenID Connect Issuer URI that represents the entity which issues access tokens for this application. + * When using Azure Active Directory, this value is the URI of the directory tenant, e.g. https://login.microsoftonline.com/v2.0/{tenant-guid}/. + * This URI is a case-sensitive identifier for the token issuer. + * More information on OpenID Connect Discovery: http://openid.net/specs/openid-connect-discovery-1_0.html + */ + openIdIssuer?: string; + /** + * The Client ID of this relying party application, known as the client_id. + * This setting is required for enabling OpenID Connection authentication with Azure Active Directory or + * other 3rd party OpenID Connect providers. + * More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html + */ + clientId?: string; + /** The app setting name that contains the client secret of the relying party application. */ + clientSecretSettingName?: string; + /** + * An alternative to the client secret, that is the thumbprint of a certificate used for signing purposes. This property acts as + * a replacement for the Client Secret. It is also optional. + */ + clientSecretCertificateThumbprint?: string; + /** + * An alternative to the client secret thumbprint, that is the subject alternative name of a certificate used for signing purposes. This property acts as + * a replacement for the Client Secret Certificate Thumbprint. It is also optional. + */ + clientSecretCertificateSubjectAlternativeName?: string; + /** + * An alternative to the client secret thumbprint, that is the issuer of a certificate used for signing purposes. This property acts as + * a replacement for the Client Secret Certificate Thumbprint. It is also optional. + */ + clientSecretCertificateIssuer?: string; } -/** Container App Ingress configuration. */ -export interface Ingress { +/** The configuration settings of the Azure Active Directory login flow. */ +export interface AzureActiveDirectoryLogin { /** - * Hostname. - * NOTE: This property will not be serialized. It can only be populated by the server. + * Login parameters to send to the OpenID Connect authorization endpoint when + * a user logs in. Each parameter must be in the form "key=value". */ - readonly fqdn?: string; - /** Bool indicating if app exposes an external http endpoint */ - external?: boolean; - /** Target Port in containers for traffic from ingress */ - targetPort?: number; - /** Ingress transport protocol */ - transport?: IngressTransportMethod; - /** Traffic weights for app's revisions */ - traffic?: TrafficWeight[]; - /** custom domain bindings for Container Apps' hostnames. */ - customDomains?: CustomDomain[]; - /** Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected to HTTPS connections */ - allowInsecure?: boolean; + loginParameters?: string[]; + /** true if the www-authenticate provider should be omitted from the request; otherwise, false. */ + disableWWWAuthenticate?: boolean; } -/** Traffic weight assigned to a revision */ -export interface TrafficWeight { - /** Name of a revision */ - revisionName?: string; - /** Traffic weight assigned to a revision */ - weight?: number; - /** Indicates that the traffic weight belongs to a latest stable revision */ - latestRevision?: boolean; +/** The configuration settings of the Azure Active Directory token validation flow. */ +export interface AzureActiveDirectoryValidation { + /** The configuration settings of the checks that should be made while validating the JWT Claims. */ + jwtClaimChecks?: JwtClaimChecks; + /** The list of audiences that can make successful authentication/authorization requests. */ + allowedAudiences?: string[]; + /** The configuration settings of the default authorization policy. */ + defaultAuthorizationPolicy?: DefaultAuthorizationPolicy; } -/** Custom Domain of a Container App */ -export interface CustomDomain { - /** Hostname. */ - name: string; - /** Custom Domain binding type. */ - bindingType?: BindingType; - /** Resource Id of the Certificate to be bound to this hostname. Must exist in the Managed Environment. */ - certificateId: string; +/** The configuration settings of the checks that should be made while validating the JWT Claims. */ +export interface JwtClaimChecks { + /** The list of the allowed groups. */ + allowedGroups?: string[]; + /** The list of the allowed client applications. */ + allowedClientApplications?: string[]; } -/** Container App Private Registry */ -export interface RegistryCredentials { - /** Container Registry Server */ - server?: string; - /** Container Registry Username */ - username?: string; - /** The name of the Secret that contains the registry login password */ - passwordSecretRef?: string; +/** The configuration settings of the Azure Active Directory default authorization policy. */ +export interface DefaultAuthorizationPolicy { + /** The configuration settings of the Azure Active Directory allowed principals. */ + allowedPrincipals?: AllowedPrincipals; + /** The configuration settings of the Azure Active Directory allowed applications. */ + allowedApplications?: string[]; } -/** Container App Dapr configuration. */ -export interface Dapr { - /** Boolean indicating if the Dapr side car is enabled */ +/** The configuration settings of the Azure Active Directory allowed principals. */ +export interface AllowedPrincipals { + /** The list of the allowed groups. */ + groups?: string[]; + /** The list of the allowed identities. */ + identities?: string[]; +} + +/** The configuration settings of the Facebook provider. */ +export interface Facebook { + /** false if the Facebook provider should not be enabled despite the set registration; otherwise, true. */ enabled?: boolean; - /** Dapr application identifier */ + /** The configuration settings of the app registration for the Facebook provider. */ + registration?: AppRegistration; + /** The version of the Facebook api to be used while logging in. */ + graphApiVersion?: string; + /** The configuration settings of the login flow. */ + login?: LoginScopes; +} + +/** The configuration settings of the app registration for providers that have app ids and app secrets */ +export interface AppRegistration { + /** The App ID of the app used for login. */ appId?: string; - /** Tells Dapr which protocol your application is using. Valid options are http and grpc. Default is http */ - appProtocol?: AppProtocol; - /** Tells Dapr which port your application is listening on */ - appPort?: number; + /** The app setting name that contains the app secret. */ + appSecretSettingName?: string; } -/** - * Container App versioned application definition. - * Defines the desired state of an immutable revision. - * Any changes to this section Will result in a new revision being created - */ -export interface Template { - /** User friendly suffix that is appended to the revision name */ - revisionSuffix?: string; - /** List of container definitions for the Container App. */ - containers?: Container[]; - /** Scaling properties for the Container App. */ - scale?: Scale; - /** List of volume definitions for the Container App. */ - volumes?: Volume[]; +/** The configuration settings of the login flow, including the scopes that should be requested. */ +export interface LoginScopes { + /** A list of the scopes that should be requested while authenticating. */ + scopes?: string[]; } -/** Container App container definition. */ -export interface Container { - /** Container image tag. */ - image?: string; - /** Custom container name. */ - name?: string; - /** Container start command. */ - command?: string[]; - /** Container start command arguments. */ - args?: string[]; - /** Container environment variables. */ - env?: EnvironmentVar[]; - /** Container resource requirements. */ - resources?: ContainerResources; - /** List of probes for the container. */ - probes?: ContainerAppProbe[]; - /** Container volume mounts. */ - volumeMounts?: VolumeMount[]; +/** The configuration settings of the GitHub provider. */ +export interface GitHub { + /** false if the GitHub provider should not be enabled despite the set registration; otherwise, true. */ + enabled?: boolean; + /** The configuration settings of the app registration for the GitHub provider. */ + registration?: ClientRegistration; + /** The configuration settings of the login flow. */ + login?: LoginScopes; } -/** Container App container environment variable. */ -export interface EnvironmentVar { - /** Environment variable name. */ - name?: string; - /** Non-secret environment variable value. */ - value?: string; - /** Name of the Container App secret from which to pull the environment variable value. */ - secretRef?: string; +/** The configuration settings of the app registration for providers that have client ids and client secrets */ +export interface ClientRegistration { + /** The Client ID of the app used for login. */ + clientId?: string; + /** The app setting name that contains the client secret. */ + clientSecretSettingName?: string; } -/** Container App container resource requirements. */ -export interface ContainerResources { - /** Required CPU in cores, e.g. 0.5 */ - cpu?: number; - /** Required memory, e.g. "250Mb" */ - memory?: string; - /** - * Ephemeral Storage, e.g. "1Gi" - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ephemeralStorage?: string; +/** The configuration settings of the Google provider. */ +export interface Google { + /** false if the Google provider should not be enabled despite the set registration; otherwise, true. */ + enabled?: boolean; + /** The configuration settings of the app registration for the Google provider. */ + registration?: ClientRegistration; + /** The configuration settings of the login flow. */ + login?: LoginScopes; + /** The configuration settings of the Azure Active Directory token validation flow. */ + validation?: AllowedAudiencesValidation; } -/** Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. */ -export interface ContainerAppProbe { - /** Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. Maximum value is 10. */ - failureThreshold?: number; - /** HTTPGet specifies the http request to perform. */ - httpGet?: ContainerAppProbeHttpGet; - /** Number of seconds after the container has started before liveness probes are initiated. Minimum value is 1. Maximum value is 60. */ - initialDelaySeconds?: number; - /** How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value is 240. */ - periodSeconds?: number; - /** Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. Maximum value is 10. */ - successThreshold?: number; - /** TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported. */ - tcpSocket?: ContainerAppProbeTcpSocket; - /** Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is an alpha field and requires enabling ProbeTerminationGracePeriod feature gate. Maximum value is 3600 seconds (1 hour) */ - terminationGracePeriodSeconds?: number; - /** Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Maximum value is 240. */ - timeoutSeconds?: number; - /** The type of probe. */ - type?: Type; +/** The configuration settings of the Allowed Audiences validation flow. */ +export interface AllowedAudiencesValidation { + /** The configuration settings of the allowed list of audiences from which to validate the JWT token. */ + allowedAudiences?: string[]; } -/** HTTPGet specifies the http request to perform. */ -export interface ContainerAppProbeHttpGet { - /** Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. */ - host?: string; - /** Custom headers to set in the request. HTTP allows repeated headers. */ - httpHeaders?: ContainerAppProbeHttpGetHttpHeadersItem[]; - /** Path to access on the HTTP server. */ - path?: string; - /** Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. */ - port: number; - /** Scheme to use for connecting to the host. Defaults to HTTP. */ - scheme?: string; +/** The configuration settings of the Twitter provider. */ +export interface Twitter { + /** false if the Twitter provider should not be enabled despite the set registration; otherwise, true. */ + enabled?: boolean; + /** The configuration settings of the app registration for the Twitter provider. */ + registration?: TwitterRegistration; } -/** HTTPHeader describes a custom header to be used in HTTP probes */ -export interface ContainerAppProbeHttpGetHttpHeadersItem { - /** The header field name */ - name: string; - /** The header field value */ - value: string; +/** The configuration settings of the app registration for the Twitter provider. */ +export interface TwitterRegistration { + /** + * The OAuth 1.0a consumer key of the Twitter application used for sign-in. + * This setting is required for enabling Twitter Sign-In. + * Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in + */ + consumerKey?: string; + /** + * The app setting name that contains the OAuth 1.0a consumer secret of the Twitter + * application used for sign-in. + */ + consumerSecretSettingName?: string; } -/** TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported. */ -export interface ContainerAppProbeTcpSocket { - /** Optional: Host name to connect to, defaults to the pod IP. */ - host?: string; - /** Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. */ - port: number; +/** The configuration settings of the Apple provider. */ +export interface Apple { + /** false if the Apple provider should not be enabled despite the set registration; otherwise, true. */ + enabled?: boolean; + /** The configuration settings of the Apple registration. */ + registration?: AppleRegistration; + /** The configuration settings of the login flow. */ + login?: LoginScopes; } -/** Volume mount for the Container App. */ -export interface VolumeMount { - /** This must match the Name of a Volume. */ - volumeName?: string; - /** Path within the container at which the volume should be mounted.Must not contain ':'. */ - mountPath?: string; +/** The configuration settings of the registration for the Apple provider */ +export interface AppleRegistration { + /** The Client ID of the app used for login. */ + clientId?: string; + /** The app setting name that contains the client secret. */ + clientSecretSettingName?: string; } -/** Container App scaling configurations. */ -export interface Scale { - /** Optional. Minimum number of container replicas. */ - minReplicas?: number; - /** Optional. Maximum number of container replicas. Defaults to 10 if not set. */ - maxReplicas?: number; - /** Scaling rules. */ - rules?: ScaleRule[]; +/** The configuration settings of the Azure Static Web Apps provider. */ +export interface AzureStaticWebApps { + /** false if the Azure Static Web Apps provider should not be enabled despite the set registration; otherwise, true. */ + enabled?: boolean; + /** The configuration settings of the Azure Static Web Apps registration. */ + registration?: AzureStaticWebAppsRegistration; } -/** Container App container scaling rule. */ -export interface ScaleRule { - /** Scale Rule Name */ - name?: string; - /** Azure Queue based scaling. */ - azureQueue?: QueueScaleRule; - /** Custom scale rule. */ - custom?: CustomScaleRule; - /** HTTP requests based scaling. */ - http?: HttpScaleRule; +/** The configuration settings of the registration for the Azure Static Web Apps provider */ +export interface AzureStaticWebAppsRegistration { + /** The Client ID of the app used for login. */ + clientId?: string; } -/** Container App container Azure Queue based scaling rule. */ -export interface QueueScaleRule { - /** Queue name. */ - queueName?: string; - /** Queue length. */ - queueLength?: number; - /** Authentication secrets for the queue scale rule. */ - auth?: ScaleRuleAuth[]; +/** The configuration settings of the custom Open ID Connect provider. */ +export interface CustomOpenIdConnectProvider { + /** false if the custom Open ID provider provider should not be enabled; otherwise, true. */ + enabled?: boolean; + /** The configuration settings of the app registration for the custom Open ID Connect provider. */ + registration?: OpenIdConnectRegistration; + /** The configuration settings of the login flow of the custom Open ID Connect provider. */ + login?: OpenIdConnectLogin; } -/** Auth Secrets for Container App Scale Rule */ -export interface ScaleRuleAuth { - /** Name of the Container App secret from which to pull the auth params. */ - secretRef?: string; - /** Trigger Parameter that uses the secret */ - triggerParameter?: string; +/** The configuration settings of the app registration for the custom Open ID Connect provider. */ +export interface OpenIdConnectRegistration { + /** The client id of the custom Open ID Connect provider. */ + clientId?: string; + /** The authentication credentials of the custom Open ID Connect provider. */ + clientCredential?: OpenIdConnectClientCredential; + /** The configuration settings of the endpoints used for the custom Open ID Connect provider. */ + openIdConnectConfiguration?: OpenIdConnectConfig; } -/** Container App container Custom scaling rule. */ -export interface CustomScaleRule { - /** - * Type of the custom scale rule - * eg: azure-servicebus, redis etc. - */ - type?: string; - /** Metadata properties to describe custom scale rule. */ - metadata?: { [propertyName: string]: string }; - /** Authentication secrets for the custom scale rule. */ - auth?: ScaleRuleAuth[]; +/** The authentication client credentials of the custom Open ID Connect provider. */ +export interface OpenIdConnectClientCredential { + /** The method that should be used to authenticate the user. */ + method?: "ClientSecretPost"; + /** The app setting that contains the client secret for the custom Open ID Connect provider. */ + clientSecretSettingName?: string; } -/** Container App container Custom scaling rule. */ -export interface HttpScaleRule { - /** Metadata properties to describe http scale rule. */ - metadata?: { [propertyName: string]: string }; - /** Authentication secrets for the custom scale rule. */ - auth?: ScaleRuleAuth[]; +/** The configuration settings of the endpoints used for the custom Open ID Connect provider. */ +export interface OpenIdConnectConfig { + /** The endpoint to be used to make an authorization request. */ + authorizationEndpoint?: string; + /** The endpoint to be used to request a token. */ + tokenEndpoint?: string; + /** The endpoint that issues the token. */ + issuer?: string; + /** The endpoint that provides the keys necessary to validate the token. */ + certificationUri?: string; + /** The endpoint that contains all the configuration endpoints for the provider. */ + wellKnownOpenIdConfiguration?: string; } -/** Volume definitions for the Container App. */ -export interface Volume { - /** Volume name. */ - name?: string; - /** Storage type for the volume. If not provided, use EmptyDir. */ - storageType?: StorageType; - /** Name of storage resource. No need to provide for EmptyDir. */ - storageName?: string; +/** The configuration settings of the login flow of the custom Open ID Connect provider. */ +export interface OpenIdConnectLogin { + /** The name of the claim that contains the users name. */ + nameClaimType?: string; + /** A list of the scopes that should be requested while authenticating. */ + scopes?: string[]; } -/** Common fields that are returned in the response for all Azure Resource Manager resources */ -export interface Resource { - /** - * 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. - */ +/** The configuration settings of the login flow of users using ContainerApp Service Authentication/Authorization. */ +export interface Login { + /** The routes that specify the endpoints used for login and logout requests. */ + routes?: LoginRoutes; + /** true if the fragments from the request are preserved after the login request is made; otherwise, false. */ + preserveUrlFragmentsForLogins?: boolean; + /** + * External URLs that can be redirected to as part of logging in or logging out of the app. Note that the query string part of the URL is ignored. + * This is an advanced setting typically only needed by Windows Store application backends. + * Note that URLs within the current domain are always implicitly allowed. + */ + allowedExternalRedirectUrls?: string[]; + /** The configuration settings of the session cookie's expiration. */ + cookieExpiration?: CookieExpiration; + /** The configuration settings of the nonce used in the login flow. */ + nonce?: Nonce; +} + +/** The routes that specify the endpoints used for login and logout requests. */ +export interface LoginRoutes { + /** The endpoint at which a logout request should be made. */ + logoutEndpoint?: string; +} + +/** The configuration settings of the session cookie's expiration. */ +export interface CookieExpiration { + /** The convention used when determining the session cookie's expiration. */ + convention?: CookieExpirationConvention; + /** The time after the request is made when the session cookie should expire. */ + timeToExpiration?: string; +} + +/** The configuration settings of the nonce used in the login flow. */ +export interface Nonce { + /** false if the nonce should not be validated while completing the login flow; otherwise, true. */ + validateNonce?: boolean; + /** The time after the request is made when the nonce should expire. */ + nonceExpirationInterval?: string; +} + +/** The configuration settings of the HTTP requests for authentication and authorization requests made against ContainerApp Service Authentication/Authorization. */ +export interface HttpSettings { + /** false if the authentication/authorization responses not having the HTTPS scheme are permissible; otherwise, true. */ + requireHttps?: boolean; + /** The configuration settings of the paths HTTP requests. */ + routes?: HttpSettingsRoutes; + /** The configuration settings of a forward proxy used to make the requests. */ + forwardProxy?: ForwardProxy; +} + +/** The configuration settings of the paths HTTP requests. */ +export interface HttpSettingsRoutes { + /** The prefix that should precede all the authentication/authorization paths. */ + apiPrefix?: string; +} + +/** The configuration settings of a forward proxy used to make the requests. */ +export interface ForwardProxy { + /** The convention used to determine the url of the request made. */ + convention?: ForwardProxyConvention; + /** The name of the header containing the host of the request. */ + customHostHeaderName?: string; + /** The name of the header containing the scheme of the request. */ + customProtoHeaderName?: string; +} + +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface Resource { + /** + * 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 @@ -423,674 +494,566 @@ export interface DefaultErrorResponseErrorDetailsItem { readonly target?: string; } -/** Container App Patch. */ -export interface ContainerAppPatch { - /** Application-specific metadata in the form of key-value pairs. */ - tags?: { [propertyName: string]: string }; -} - -/** Container App Secrets Collection ARM resource. */ -export interface SecretsCollection { +/** Container App collection ARM resource. */ +export interface ContainerAppCollection { /** Collection of resources. */ - value: ContainerAppSecret[]; + value: ContainerApp[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } -/** Container App Secret. */ -export interface ContainerAppSecret { +/** Managed service identity (system assigned and/or user assigned identities) */ +export interface ManagedServiceIdentity { /** - * Secret Name. + * The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly principalId?: string; /** - * Secret Value. + * The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: string; + readonly tenantId?: string; + /** Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). */ + type: ManagedServiceIdentityType; + /** The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. */ + userAssignedIdentities?: { [propertyName: string]: UserAssignedIdentity }; } -/** Container App Revisions collection ARM resource. */ -export interface RevisionCollection { - /** Collection of resources. */ - value: Revision[]; +/** User assigned identity properties */ +export interface UserAssignedIdentity { /** - * Link to next page of resources. + * The principal ID of the assigned identity. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; + readonly principalId?: string; + /** + * The client ID of the assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly clientId?: string; } -/** Container object under Container App Revision Replica. */ -export interface ReplicaContainer { - /** The Name of the Container */ - name?: string; - /** The Id of the Container */ - containerId?: string; - /** The container ready status */ - ready?: boolean; - /** The container start status */ - started?: boolean; - /** The container restart count */ - restartCount?: number; +/** Non versioned Container App configuration properties that define the mutable settings of a Container app */ +export interface Configuration { + /** Collection of secrets used by a Container app */ + secrets?: Secret[]; + /** + * ActiveRevisionsMode controls how active revisions are handled for the Container app: + * Multiple: multiple revisions can be active.Single: Only one revision can be active at a time. Revision weights can not be used in this mode. If no value if provided, this is the default. + */ + activeRevisionsMode?: ActiveRevisionsMode; + /** Ingress configurations. */ + ingress?: Ingress; + /** Collection of private container registry credentials for containers used by the Container app */ + registries?: RegistryCredentials[]; + /** Dapr configuration for the Container App. */ + dapr?: Dapr; } -/** Container App Revision Replicas collection ARM resource. */ -export interface ReplicaCollection { - /** Collection of resources. */ - value: Replica[]; +/** Secret definition. */ +export interface Secret { + /** Secret Name. */ + name?: string; + /** Secret Value. */ + value?: string; } -/** Collection of Environments */ -export interface ManagedEnvironmentsCollection { - /** Collection of resources. */ - value: ManagedEnvironment[]; +/** Container App Ingress configuration. */ +export interface Ingress { /** - * Link to next page of resources. + * Hostname. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; -} - -/** Configuration properties for apps environment to join a Virtual Network */ -export interface VnetConfiguration { - /** Boolean indicating the environment only has an internal load balancer. These environments do not have a public static IP resource, must provide ControlPlaneSubnetResourceId and AppSubnetResourceId if enabling this property */ - internal?: boolean; - /** Resource ID of a subnet for infrastructure components. This subnet must be in the same VNET as the subnet defined in runtimeSubnetId. Must not overlap with any other provided IP ranges. */ - infrastructureSubnetId?: string; - /** Resource ID of a subnet that Container App containers are injected into. This subnet must be in the same VNET as the subnet defined in infrastructureSubnetId. Must not overlap with any other provided IP ranges. */ - runtimeSubnetId?: string; - /** CIDR notation IP range assigned to the Docker bridge, network. Must not overlap with any other provided IP ranges. */ - dockerBridgeCidr?: string; - /** IP range in CIDR notation that can be reserved for environment infrastructure IP addresses. Must not overlap with any other provided IP ranges. */ - platformReservedCidr?: string; - /** An IP address from the IP range defined by platformReservedCidr that will be reserved for the internal DNS server. */ - platformReservedDnsIP?: string; + readonly fqdn?: string; + /** Bool indicating if app exposes an external http endpoint */ + external?: boolean; + /** Target Port in containers for traffic from ingress */ + targetPort?: number; + /** Ingress transport protocol */ + transport?: IngressTransportMethod; + /** Traffic weights for app's revisions */ + traffic?: TrafficWeight[]; + /** custom domain bindings for Container Apps' hostnames. */ + customDomains?: CustomDomain[]; + /** Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected to HTTPS connections */ + allowInsecure?: boolean; } -/** Configuration of application logs */ -export interface AppLogsConfiguration { - /** Logs destination */ - destination?: string; - /** Log Analytics configuration */ - logAnalyticsConfiguration?: LogAnalyticsConfiguration; +/** Traffic weight assigned to a revision */ +export interface TrafficWeight { + /** Name of a revision */ + revisionName?: string; + /** Traffic weight assigned to a revision */ + weight?: number; + /** Indicates that the traffic weight belongs to a latest stable revision */ + latestRevision?: boolean; + /** Associates a traffic label with a revision */ + label?: string; } -/** Log analytics configuration */ -export interface LogAnalyticsConfiguration { - /** Log analytics customer id */ - customerId?: string; - /** Log analytics customer key */ - sharedKey?: string; +/** Custom Domain of a Container App */ +export interface CustomDomain { + /** Hostname. */ + name: string; + /** Custom Domain binding type. */ + bindingType?: BindingType; + /** Resource Id of the Certificate to be bound to this hostname. Must exist in the Managed Environment. */ + certificateId: string; } -/** An environment for hosting container apps */ -export interface ManagedEnvironmentPatch { - /** Application-specific metadata in the form of key-value pairs. */ - tags?: { [propertyName: string]: string }; +/** Container App Private Registry */ +export interface RegistryCredentials { + /** Container Registry Server */ + server?: string; + /** Container Registry Username */ + username?: string; + /** The name of the Secret that contains the registry login password */ + passwordSecretRef?: string; } -/** Collection of Certificates. */ -export interface CertificateCollection { - /** Collection of resources. */ - value: Certificate[]; - /** - * Link to next page of resources. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; +/** Container App Dapr configuration. */ +export interface Dapr { + /** Boolean indicating if the Dapr side car is enabled */ + enabled?: boolean; + /** Dapr application identifier */ + appId?: string; + /** Tells Dapr which protocol your application is using. Valid options are http and grpc. Default is http */ + appProtocol?: AppProtocol; + /** Tells Dapr which port your application is listening on */ + appPort?: number; } -/** Certificate resource specific properties */ -export interface CertificateProperties { - /** - * Provisioning state of the certificate. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: CertificateProvisioningState; - /** Certificate password. */ - password?: string; - /** - * Subject name of the certificate. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly subjectName?: string; - /** PFX or PEM blob */ - value?: Uint8Array; - /** - * Certificate issuer. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly issuer?: string; - /** - * Certificate issue Date. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly issueDate?: Date; - /** - * Certificate expiration date. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly expirationDate?: Date; - /** - * Certificate thumbprint. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly thumbprint?: string; - /** - * Is the certificate valid?. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly valid?: boolean; - /** - * Public key hash. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly publicKeyHash?: string; -} - -/** A certificate to update */ -export interface CertificatePatch { - /** Application-specific metadata in the form of key-value pairs. */ - tags?: { [propertyName: string]: string }; -} - -/** Available operations of the service */ -export interface AvailableOperations { - /** Collection of available operation details */ - value?: OperationDetail[]; - /** - * URL client should use to fetch the next page (per server side paging). - * It's null for now, added for future use. - */ - nextLink?: string; +/** + * Container App versioned application definition. + * Defines the desired state of an immutable revision. + * Any changes to this section Will result in a new revision being created + */ +export interface Template { + /** User friendly suffix that is appended to the revision name */ + revisionSuffix?: string; + /** List of container definitions for the Container App. */ + containers?: Container[]; + /** Scaling properties for the Container App. */ + scale?: Scale; + /** List of volume definitions for the Container App. */ + volumes?: Volume[]; } -/** Operation detail payload */ -export interface OperationDetail { - /** Name of the operation */ +/** Container App container definition. */ +export interface Container { + /** Container image tag. */ + image?: string; + /** Custom container name. */ name?: string; - /** Indicates whether the operation is a data action */ - isDataAction?: boolean; - /** Display of the operation */ - display?: OperationDisplay; - /** Origin of the operation */ - origin?: string; -} - -/** Operation display payload */ -export interface OperationDisplay { - /** Resource provider of the operation */ - provider?: string; - /** Resource of the operation */ - resource?: string; - /** Localized friendly name for the operation */ - operation?: string; - /** Localized friendly description for the operation */ - description?: string; -} - -/** SourceControl collection ARM resource. */ -export interface SourceControlCollection { - /** Collection of resources. */ - value: SourceControl[]; - /** - * Link to next page of resources. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Configuration properties that define the mutable settings of a Container App SourceControl */ -export interface GithubActionConfiguration { - /** Registry configurations. */ - registryInfo?: RegistryInfo; - /** AzureCredentials configurations. */ - azureCredentials?: AzureCredentials; - /** Docker file path */ - dockerfilePath?: string; - /** Code or Image */ - publishType?: string; - /** Operation system */ - os?: string; - /** Runtime stack */ - runtimeStack?: string; - /** Runtime Version */ - runtimeVersion?: string; -} - -/** Container App registry information. */ -export interface RegistryInfo { - /** registry server Url. */ - registryUrl?: string; - /** registry username. */ - registryUserName?: string; - /** registry secret. */ - registryPassword?: string; -} - -/** Container App credentials. */ -export interface AzureCredentials { - /** Client Id. */ - clientId?: string; - /** Client Secret. */ - clientSecret?: string; - /** Tenant Id. */ - tenantId?: string; - /** Subscription Id. */ - subscriptionId?: string; -} - -/** Dapr Components ARM resource. */ -export interface DaprComponentsCollection { - /** Collection of resources. */ - value: DaprComponent[]; - /** - * Link to next page of resources. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** Container start command. */ + command?: string[]; + /** Container start command arguments. */ + args?: string[]; + /** Container environment variables. */ + env?: EnvironmentVar[]; + /** Container resource requirements. */ + resources?: ContainerResources; + /** List of probes for the container. */ + probes?: ContainerAppProbe[]; + /** Container volume mounts. */ + volumeMounts?: VolumeMount[]; } -/** Dapr component metadata. */ -export interface DaprMetadata { - /** Metadata property name. */ +/** Container App container environment variable. */ +export interface EnvironmentVar { + /** Environment variable name. */ name?: string; - /** Metadata property value. */ + /** Non-secret environment variable value. */ value?: string; - /** Name of the Dapr Component secret from which to pull the metadata property value. */ + /** Name of the Container App secret from which to pull the environment variable value. */ secretRef?: string; } -/** AuthConfig collection ARM resource. */ -export interface AuthConfigCollection { - /** Collection of resources. */ - value: AuthConfig[]; +/** Container App container resource requirements. */ +export interface ContainerResources { + /** Required CPU in cores, e.g. 0.5 */ + cpu?: number; + /** Required memory, e.g. "250Mb" */ + memory?: string; /** - * Link to next page of resources. + * Ephemeral Storage, e.g. "1Gi" * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; -} - -/** The configuration settings of the platform of ContainerApp Service Authentication/Authorization. */ -export interface AuthPlatform { - /** true if the Authentication / Authorization feature is enabled for the current app; otherwise, false. */ - enabled?: boolean; - /** - * The RuntimeVersion of the Authentication / Authorization feature in use for the current app. - * The setting in this value can control the behavior of certain features in the Authentication / Authorization module. - */ - runtimeVersion?: string; -} - -/** The configuration settings that determines the validation flow of users using ContainerApp Service Authentication/Authorization. */ -export interface GlobalValidation { - /** The action to take when an unauthenticated client attempts to access the app. */ - unauthenticatedClientAction?: UnauthenticatedClientActionV2; - /** - * The default authentication provider to use when multiple providers are configured. - * This setting is only needed if multiple providers are configured and the unauthenticated client - * action is set to "RedirectToLoginPage". - */ - redirectToProvider?: string; - /** The paths for which unauthenticated flow would not be redirected to the login page. */ - excludedPaths?: string[]; -} - -/** The configuration settings of each of the identity providers used to configure ContainerApp Service Authentication/Authorization. */ -export interface IdentityProviders { - /** The configuration settings of the Azure Active directory provider. */ - azureActiveDirectory?: AzureActiveDirectory; - /** The configuration settings of the Facebook provider. */ - facebook?: Facebook; - /** The configuration settings of the GitHub provider. */ - gitHub?: GitHub; - /** The configuration settings of the Google provider. */ - google?: Google; - /** The configuration settings of the Twitter provider. */ - twitter?: Twitter; - /** The configuration settings of the Apple provider. */ - apple?: Apple; - /** The configuration settings of the Azure Static Web Apps provider. */ - azureStaticWebApps?: AzureStaticWebApps; - /** - * The map of the name of the alias of each custom Open ID Connect provider to the - * configuration settings of the custom Open ID Connect provider. - */ - customOpenIdConnectProviders?: { - [propertyName: string]: CustomOpenIdConnectProvider; - }; -} - -/** The configuration settings of the Azure Active directory provider. */ -export interface AzureActiveDirectory { - /** false if the Azure Active Directory provider should not be enabled despite the set registration; otherwise, true. */ - enabled?: boolean; - /** The configuration settings of the Azure Active Directory app registration. */ - registration?: AzureActiveDirectoryRegistration; - /** The configuration settings of the Azure Active Directory login flow. */ - login?: AzureActiveDirectoryLogin; - /** The configuration settings of the Azure Active Directory token validation flow. */ - validation?: AzureActiveDirectoryValidation; - /** - * Gets a value indicating whether the Azure AD configuration was auto-provisioned using 1st party tooling. - * This is an internal flag primarily intended to support the Azure Management Portal. Users should not - * read or write to this property. - */ - isAutoProvisioned?: boolean; -} - -/** The configuration settings of the Azure Active Directory app registration. */ -export interface AzureActiveDirectoryRegistration { - /** - * The OpenID Connect Issuer URI that represents the entity which issues access tokens for this application. - * When using Azure Active Directory, this value is the URI of the directory tenant, e.g. https://login.microsoftonline.com/v2.0/{tenant-guid}/. - * This URI is a case-sensitive identifier for the token issuer. - * More information on OpenID Connect Discovery: http://openid.net/specs/openid-connect-discovery-1_0.html - */ - openIdIssuer?: string; - /** - * The Client ID of this relying party application, known as the client_id. - * This setting is required for enabling OpenID Connection authentication with Azure Active Directory or - * other 3rd party OpenID Connect providers. - * More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html - */ - clientId?: string; - /** The app setting name that contains the client secret of the relying party application. */ - clientSecretSettingName?: string; - /** - * An alternative to the client secret, that is the thumbprint of a certificate used for signing purposes. This property acts as - * a replacement for the Client Secret. It is also optional. - */ - clientSecretCertificateThumbprint?: string; - /** - * An alternative to the client secret thumbprint, that is the subject alternative name of a certificate used for signing purposes. This property acts as - * a replacement for the Client Secret Certificate Thumbprint. It is also optional. - */ - clientSecretCertificateSubjectAlternativeName?: string; - /** - * An alternative to the client secret thumbprint, that is the issuer of a certificate used for signing purposes. This property acts as - * a replacement for the Client Secret Certificate Thumbprint. It is also optional. - */ - clientSecretCertificateIssuer?: string; + readonly ephemeralStorage?: string; } -/** The configuration settings of the Azure Active Directory login flow. */ -export interface AzureActiveDirectoryLogin { - /** - * Login parameters to send to the OpenID Connect authorization endpoint when - * a user logs in. Each parameter must be in the form "key=value". - */ - loginParameters?: string[]; - /** true if the www-authenticate provider should be omitted from the request; otherwise, false. */ - disableWWWAuthenticate?: boolean; +/** Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. */ +export interface ContainerAppProbe { + /** Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. Maximum value is 10. */ + failureThreshold?: number; + /** HTTPGet specifies the http request to perform. */ + httpGet?: ContainerAppProbeHttpGet; + /** Number of seconds after the container has started before liveness probes are initiated. Minimum value is 1. Maximum value is 60. */ + initialDelaySeconds?: number; + /** How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value is 240. */ + periodSeconds?: number; + /** Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. Maximum value is 10. */ + successThreshold?: number; + /** TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported. */ + tcpSocket?: ContainerAppProbeTcpSocket; + /** Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is an alpha field and requires enabling ProbeTerminationGracePeriod feature gate. Maximum value is 3600 seconds (1 hour) */ + terminationGracePeriodSeconds?: number; + /** Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Maximum value is 240. */ + timeoutSeconds?: number; + /** The type of probe. */ + type?: Type; } -/** The configuration settings of the Azure Active Directory token validation flow. */ -export interface AzureActiveDirectoryValidation { - /** The configuration settings of the checks that should be made while validating the JWT Claims. */ - jwtClaimChecks?: JwtClaimChecks; - /** The list of audiences that can make successful authentication/authorization requests. */ - allowedAudiences?: string[]; - /** The configuration settings of the default authorization policy. */ - defaultAuthorizationPolicy?: DefaultAuthorizationPolicy; +/** HTTPGet specifies the http request to perform. */ +export interface ContainerAppProbeHttpGet { + /** Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. */ + host?: string; + /** Custom headers to set in the request. HTTP allows repeated headers. */ + httpHeaders?: ContainerAppProbeHttpGetHttpHeadersItem[]; + /** Path to access on the HTTP server. */ + path?: string; + /** Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. */ + port: number; + /** Scheme to use for connecting to the host. Defaults to HTTP. */ + scheme?: string; } -/** The configuration settings of the checks that should be made while validating the JWT Claims. */ -export interface JwtClaimChecks { - /** The list of the allowed groups. */ - allowedGroups?: string[]; - /** The list of the allowed client applications. */ - allowedClientApplications?: string[]; +/** HTTPHeader describes a custom header to be used in HTTP probes */ +export interface ContainerAppProbeHttpGetHttpHeadersItem { + /** The header field name */ + name: string; + /** The header field value */ + value: string; } -/** The configuration settings of the Azure Active Directory default authorization policy. */ -export interface DefaultAuthorizationPolicy { - /** The configuration settings of the Azure Active Directory allowed principals. */ - allowedPrincipals?: AllowedPrincipals; - /** The configuration settings of the Azure Active Directory allowed applications. */ - allowedApplications?: string[]; +/** TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported. */ +export interface ContainerAppProbeTcpSocket { + /** Optional: Host name to connect to, defaults to the pod IP. */ + host?: string; + /** Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. */ + port: number; } -/** The configuration settings of the Azure Active Directory allowed principals. */ -export interface AllowedPrincipals { - /** The list of the allowed groups. */ - groups?: string[]; - /** The list of the allowed identities. */ - identities?: string[]; +/** Volume mount for the Container App. */ +export interface VolumeMount { + /** This must match the Name of a Volume. */ + volumeName?: string; + /** Path within the container at which the volume should be mounted.Must not contain ':'. */ + mountPath?: string; } -/** The configuration settings of the Facebook provider. */ -export interface Facebook { - /** false if the Facebook provider should not be enabled despite the set registration; otherwise, true. */ - enabled?: boolean; - /** The configuration settings of the app registration for the Facebook provider. */ - registration?: AppRegistration; - /** The version of the Facebook api to be used while logging in. */ - graphApiVersion?: string; - /** The configuration settings of the login flow. */ - login?: LoginScopes; +/** Container App scaling configurations. */ +export interface Scale { + /** Optional. Minimum number of container replicas. */ + minReplicas?: number; + /** Optional. Maximum number of container replicas. Defaults to 10 if not set. */ + maxReplicas?: number; + /** Scaling rules. */ + rules?: ScaleRule[]; } -/** The configuration settings of the app registration for providers that have app ids and app secrets */ -export interface AppRegistration { - /** The App ID of the app used for login. */ - appId?: string; - /** The app setting name that contains the app secret. */ - appSecretSettingName?: string; +/** Container App container scaling rule. */ +export interface ScaleRule { + /** Scale Rule Name */ + name?: string; + /** Azure Queue based scaling. */ + azureQueue?: QueueScaleRule; + /** Custom scale rule. */ + custom?: CustomScaleRule; + /** HTTP requests based scaling. */ + http?: HttpScaleRule; } -/** The configuration settings of the login flow, including the scopes that should be requested. */ -export interface LoginScopes { - /** A list of the scopes that should be requested while authenticating. */ - scopes?: string[]; +/** Container App container Azure Queue based scaling rule. */ +export interface QueueScaleRule { + /** Queue name. */ + queueName?: string; + /** Queue length. */ + queueLength?: number; + /** Authentication secrets for the queue scale rule. */ + auth?: ScaleRuleAuth[]; } -/** The configuration settings of the GitHub provider. */ -export interface GitHub { - /** false if the GitHub provider should not be enabled despite the set registration; otherwise, true. */ - enabled?: boolean; - /** The configuration settings of the app registration for the GitHub provider. */ - registration?: ClientRegistration; - /** The configuration settings of the login flow. */ - login?: LoginScopes; +/** Auth Secrets for Container App Scale Rule */ +export interface ScaleRuleAuth { + /** Name of the Container App secret from which to pull the auth params. */ + secretRef?: string; + /** Trigger Parameter that uses the secret */ + triggerParameter?: string; } -/** The configuration settings of the app registration for providers that have client ids and client secrets */ -export interface ClientRegistration { - /** The Client ID of the app used for login. */ - clientId?: string; - /** The app setting name that contains the client secret. */ - clientSecretSettingName?: string; +/** Container App container Custom scaling rule. */ +export interface CustomScaleRule { + /** + * Type of the custom scale rule + * eg: azure-servicebus, redis etc. + */ + type?: string; + /** Metadata properties to describe custom scale rule. */ + metadata?: { [propertyName: string]: string }; + /** Authentication secrets for the custom scale rule. */ + auth?: ScaleRuleAuth[]; } -/** The configuration settings of the Google provider. */ -export interface Google { - /** false if the Google provider should not be enabled despite the set registration; otherwise, true. */ - enabled?: boolean; - /** The configuration settings of the app registration for the Google provider. */ - registration?: ClientRegistration; - /** The configuration settings of the login flow. */ - login?: LoginScopes; - /** The configuration settings of the Azure Active Directory token validation flow. */ - validation?: AllowedAudiencesValidation; +/** Container App container Custom scaling rule. */ +export interface HttpScaleRule { + /** Metadata properties to describe http scale rule. */ + metadata?: { [propertyName: string]: string }; + /** Authentication secrets for the custom scale rule. */ + auth?: ScaleRuleAuth[]; } -/** The configuration settings of the Allowed Audiences validation flow. */ -export interface AllowedAudiencesValidation { - /** The configuration settings of the allowed list of audiences from which to validate the JWT token. */ - allowedAudiences?: string[]; +/** Volume definitions for the Container App. */ +export interface Volume { + /** Volume name. */ + name?: string; + /** Storage type for the volume. If not provided, use EmptyDir. */ + storageType?: StorageType; + /** Name of storage resource. No need to provide for EmptyDir. */ + storageName?: string; } -/** The configuration settings of the Twitter provider. */ -export interface Twitter { - /** false if the Twitter provider should not be enabled despite the set registration; otherwise, true. */ - enabled?: boolean; - /** The configuration settings of the app registration for the Twitter provider. */ - registration?: TwitterRegistration; +/** Container App Secrets Collection ARM resource. */ +export interface SecretsCollection { + /** Collection of resources. */ + value: ContainerAppSecret[]; } -/** The configuration settings of the app registration for the Twitter provider. */ -export interface TwitterRegistration { +/** Container App Secret. */ +export interface ContainerAppSecret { /** - * The OAuth 1.0a consumer key of the Twitter application used for sign-in. - * This setting is required for enabling Twitter Sign-In. - * Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in + * Secret Name. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - consumerKey?: string; + readonly name?: string; /** - * The app setting name that contains the OAuth 1.0a consumer secret of the Twitter - * application used for sign-in. + * Secret Value. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - consumerSecretSettingName?: string; + readonly value?: string; } -/** The configuration settings of the Apple provider. */ -export interface Apple { - /** false if the Apple provider should not be enabled despite the set registration; otherwise, true. */ - enabled?: boolean; - /** The configuration settings of the Apple registration. */ - registration?: AppleRegistration; - /** The configuration settings of the login flow. */ - login?: LoginScopes; +/** Container App Revisions collection ARM resource. */ +export interface RevisionCollection { + /** Collection of resources. */ + value: Revision[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } -/** The configuration settings of the registration for the Apple provider */ -export interface AppleRegistration { - /** The Client ID of the app used for login. */ - clientId?: string; - /** The app setting name that contains the client secret. */ - clientSecretSettingName?: string; +/** Container object under Container App Revision Replica. */ +export interface ReplicaContainer { + /** The Name of the Container */ + name?: string; + /** The Id of the Container */ + containerId?: string; + /** The container ready status */ + ready?: boolean; + /** The container start status */ + started?: boolean; + /** The container restart count */ + restartCount?: number; } -/** The configuration settings of the Azure Static Web Apps provider. */ -export interface AzureStaticWebApps { - /** false if the Azure Static Web Apps provider should not be enabled despite the set registration; otherwise, true. */ - enabled?: boolean; - /** The configuration settings of the Azure Static Web Apps registration. */ - registration?: AzureStaticWebAppsRegistration; +/** Container App Revision Replicas collection ARM resource. */ +export interface ReplicaCollection { + /** Collection of resources. */ + value: Replica[]; } -/** The configuration settings of the registration for the Azure Static Web Apps provider */ -export interface AzureStaticWebAppsRegistration { - /** The Client ID of the app used for login. */ - clientId?: string; +/** Dapr Components ARM resource. */ +export interface DaprComponentsCollection { + /** Collection of resources. */ + value: DaprComponent[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } -/** The configuration settings of the custom Open ID Connect provider. */ -export interface CustomOpenIdConnectProvider { - /** false if the custom Open ID provider provider should not be enabled; otherwise, true. */ - enabled?: boolean; - /** The configuration settings of the app registration for the custom Open ID Connect provider. */ - registration?: OpenIdConnectRegistration; - /** The configuration settings of the login flow of the custom Open ID Connect provider. */ - login?: OpenIdConnectLogin; +/** Dapr component metadata. */ +export interface DaprMetadata { + /** Metadata property name. */ + name?: string; + /** Metadata property value. */ + value?: string; + /** Name of the Dapr Component secret from which to pull the metadata property value. */ + secretRef?: string; } -/** The configuration settings of the app registration for the custom Open ID Connect provider. */ -export interface OpenIdConnectRegistration { - /** The client id of the custom Open ID Connect provider. */ - clientId?: string; - /** The authentication credentials of the custom Open ID Connect provider. */ - clientCredential?: OpenIdConnectClientCredential; - /** The configuration settings of the endpoints used for the custom Open ID Connect provider. */ - openIdConnectConfiguration?: OpenIdConnectConfig; +/** Dapr component Secrets Collection ARM resource. */ +export interface DaprSecretsCollection { + /** Collection of secrets used by a Dapr component */ + value: Secret[]; } -/** The authentication client credentials of the custom Open ID Connect provider. */ -export interface OpenIdConnectClientCredential { - /** The method that should be used to authenticate the user. */ - method?: "ClientSecretPost"; - /** The app setting that contains the client secret for the custom Open ID Connect provider. */ - clientSecretSettingName?: string; +/** Available operations of the service */ +export interface AvailableOperations { + /** Collection of available operation details */ + value?: OperationDetail[]; + /** + * URL client should use to fetch the next page (per server side paging). + * It's null for now, added for future use. + */ + nextLink?: string; } - -/** The configuration settings of the endpoints used for the custom Open ID Connect provider. */ -export interface OpenIdConnectConfig { - /** The endpoint to be used to make an authorization request. */ - authorizationEndpoint?: string; - /** The endpoint to be used to request a token. */ - tokenEndpoint?: string; - /** The endpoint that issues the token. */ - issuer?: string; - /** The endpoint that provides the keys necessary to validate the token. */ - certificationUri?: string; - /** The endpoint that contains all the configuration endpoints for the provider. */ - wellKnownOpenIdConfiguration?: string; + +/** Operation detail payload */ +export interface OperationDetail { + /** Name of the operation */ + name?: string; + /** Indicates whether the operation is a data action */ + isDataAction?: boolean; + /** Display of the operation */ + display?: OperationDisplay; + /** Origin of the operation */ + origin?: string; } -/** The configuration settings of the login flow of the custom Open ID Connect provider. */ -export interface OpenIdConnectLogin { - /** The name of the claim that contains the users name. */ - nameClaimType?: string; - /** A list of the scopes that should be requested while authenticating. */ - scopes?: string[]; +/** Operation display payload */ +export interface OperationDisplay { + /** Resource provider of the operation */ + provider?: string; + /** Resource of the operation */ + resource?: string; + /** Localized friendly name for the operation */ + operation?: string; + /** Localized friendly description for the operation */ + description?: string; } -/** The configuration settings of the login flow of users using ContainerApp Service Authentication/Authorization. */ -export interface Login { - /** The routes that specify the endpoints used for login and logout requests. */ - routes?: LoginRoutes; - /** true if the fragments from the request are preserved after the login request is made; otherwise, false. */ - preserveUrlFragmentsForLogins?: boolean; +/** Collection of Environments */ +export interface ManagedEnvironmentsCollection { + /** Collection of resources. */ + value: ManagedEnvironment[]; /** - * External URLs that can be redirected to as part of logging in or logging out of the app. Note that the query string part of the URL is ignored. - * This is an advanced setting typically only needed by Windows Store application backends. - * Note that URLs within the current domain are always implicitly allowed. + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - allowedExternalRedirectUrls?: string[]; - /** The configuration settings of the session cookie's expiration. */ - cookieExpiration?: CookieExpiration; - /** The configuration settings of the nonce used in the login flow. */ - nonce?: Nonce; + readonly nextLink?: string; } -/** The routes that specify the endpoints used for login and logout requests. */ -export interface LoginRoutes { - /** The endpoint at which a logout request should be made. */ - logoutEndpoint?: string; +/** Configuration properties for apps environment to join a Virtual Network */ +export interface VnetConfiguration { + /** Boolean indicating the environment only has an internal load balancer. These environments do not have a public static IP resource, must provide ControlPlaneSubnetResourceId and AppSubnetResourceId if enabling this property */ + internal?: boolean; + /** Resource ID of a subnet for infrastructure components. This subnet must be in the same VNET as the subnet defined in runtimeSubnetId. Must not overlap with any other provided IP ranges. */ + infrastructureSubnetId?: string; + /** Resource ID of a subnet that Container App containers are injected into. This subnet must be in the same VNET as the subnet defined in infrastructureSubnetId. Must not overlap with any other provided IP ranges. */ + runtimeSubnetId?: string; + /** CIDR notation IP range assigned to the Docker bridge, network. Must not overlap with any other provided IP ranges. */ + dockerBridgeCidr?: string; + /** IP range in CIDR notation that can be reserved for environment infrastructure IP addresses. Must not overlap with any other provided IP ranges. */ + platformReservedCidr?: string; + /** An IP address from the IP range defined by platformReservedCidr that will be reserved for the internal DNS server. */ + platformReservedDnsIP?: string; } -/** The configuration settings of the session cookie's expiration. */ -export interface CookieExpiration { - /** The convention used when determining the session cookie's expiration. */ - convention?: CookieExpirationConvention; - /** The time after the request is made when the session cookie should expire. */ - timeToExpiration?: string; +/** Configuration of application logs */ +export interface AppLogsConfiguration { + /** Logs destination */ + destination?: string; + /** Log Analytics configuration */ + logAnalyticsConfiguration?: LogAnalyticsConfiguration; } -/** The configuration settings of the nonce used in the login flow. */ -export interface Nonce { - /** false if the nonce should not be validated while completing the login flow; otherwise, true. */ - validateNonce?: boolean; - /** The time after the request is made when the nonce should expire. */ - nonceExpirationInterval?: string; +/** Log analytics configuration */ +export interface LogAnalyticsConfiguration { + /** Log analytics customer id */ + customerId?: string; + /** Log analytics customer key */ + sharedKey?: string; } -/** The configuration settings of the HTTP requests for authentication and authorization requests made against ContainerApp Service Authentication/Authorization. */ -export interface HttpSettings { - /** false if the authentication/authorization responses not having the HTTPS scheme are permissible; otherwise, true. */ - requireHttps?: boolean; - /** The configuration settings of the paths HTTP requests. */ - routes?: HttpSettingsRoutes; - /** The configuration settings of a forward proxy used to make the requests. */ - forwardProxy?: ForwardProxy; +/** Collection of Certificates. */ +export interface CertificateCollection { + /** Collection of resources. */ + value: Certificate[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } -/** The configuration settings of the paths HTTP requests. */ -export interface HttpSettingsRoutes { - /** The prefix that should precede all the authentication/authorization paths. */ - apiPrefix?: string; +/** Certificate resource specific properties */ +export interface CertificateProperties { + /** + * Provisioning state of the certificate. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: CertificateProvisioningState; + /** Certificate password. */ + password?: string; + /** + * Subject name of the certificate. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly subjectName?: string; + /** PFX or PEM blob */ + value?: Uint8Array; + /** + * Certificate issuer. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly issuer?: string; + /** + * Certificate issue Date. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly issueDate?: Date; + /** + * Certificate expiration date. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly expirationDate?: Date; + /** + * Certificate thumbprint. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly thumbprint?: string; + /** + * Is the certificate valid?. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly valid?: boolean; + /** + * Public key hash. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly publicKeyHash?: string; } -/** The configuration settings of a forward proxy used to make the requests. */ -export interface ForwardProxy { - /** The convention used to determine the url of the request made. */ - convention?: ForwardProxyConvention; - /** The name of the header containing the host of the request. */ - customHostHeaderName?: string; - /** The name of the header containing the scheme of the request. */ - customProtoHeaderName?: string; +/** A certificate to update */ +export interface CertificatePatch { + /** Application-specific metadata in the form of key-value pairs. */ + tags?: { [propertyName: string]: string }; +} + +/** The check availability request body. */ +export interface CheckNameAvailabilityRequest { + /** The name of the resource for which availability needs to be checked. */ + name?: string; + /** The resource type. */ + type?: string; +} + +/** The check availability result. */ +export interface CheckNameAvailabilityResponse { + /** Indicates if the resource name is available. */ + nameAvailable?: boolean; + /** The reason why the given name is not available. */ + reason?: CheckNameAvailabilityReason; + /** Detailed reason why the given name is available. */ + message?: string; } /** Collection of Storage for Environments */ @@ -1117,92 +1080,82 @@ export interface AzureFileProperties { shareName?: string; } -/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ -export type TrackedResource = Resource & { - /** Resource tags. */ - tags?: { [propertyName: string]: string }; - /** The geo-location where the resource lives */ - location: string; -}; - -/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ -export type ProxyResource = Resource & {}; - -/** Container App. */ -export type ContainerApp = TrackedResource & { - /** managed identities for the Container App to interact with other Azure services without maintaining any secrets or credentials in code. */ - identity?: ManagedServiceIdentity; - /** - * Provisioning state of the Container App. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ContainerAppProvisioningState; - /** Resource ID of the Container App's environment. */ - managedEnvironmentId?: string; - /** - * Name of the latest revision of the Container App. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly latestRevisionName?: string; - /** - * Fully Qualified Domain Name of the latest revision of the Container App. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly latestRevisionFqdn?: string; - /** - * Id used to verify domain name ownership - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly customDomainVerificationId?: string; - /** Non versioned Container App configuration properties. */ - configuration?: Configuration; - /** Container App versioned application definition. */ - template?: Template; +/** SourceControl collection ARM resource. */ +export interface SourceControlCollection { + /** Collection of resources. */ + value: SourceControl[]; /** - * Outbound IP Addresses for container app. + * Link to next page of resources. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly outboundIPAddresses?: string[]; -}; + readonly nextLink?: string; +} + +/** Configuration properties that define the mutable settings of a Container App SourceControl */ +export interface GithubActionConfiguration { + /** Registry configurations. */ + registryInfo?: RegistryInfo; + /** AzureCredentials configurations. */ + azureCredentials?: AzureCredentials; + /** Context path */ + contextPath?: string; + /** Image name */ + image?: string; + /** Code or Image */ + publishType?: string; + /** Operation system */ + os?: string; + /** Runtime stack */ + runtimeStack?: string; + /** Runtime version */ + runtimeVersion?: string; +} + +/** Container App registry information. */ +export interface RegistryInfo { + /** registry server Url. */ + registryUrl?: string; + /** registry username. */ + registryUserName?: string; + /** registry secret. */ + registryPassword?: string; +} + +/** Container App credentials. */ +export interface AzureCredentials { + /** Client Id. */ + clientId?: string; + /** Client Secret. */ + clientSecret?: string; + /** Tenant Id. */ + tenantId?: string; + /** Subscription Id. */ + subscriptionId?: string; +} -/** An environment for hosting container apps */ -export type ManagedEnvironment = TrackedResource & { - /** - * Provisioning state of the Environment. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: EnvironmentProvisioningState; - /** Azure Monitor instrumentation key used by Dapr to export Service to Service communication telemetry */ - daprAIInstrumentationKey?: string; - /** Vnet configuration for the environment */ - vnetConfiguration?: VnetConfiguration; - /** - * Any errors that occurred during deployment or deployment validation - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly deploymentErrors?: string; - /** - * Default Domain Name for the cluster - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly defaultDomain?: string; - /** - * Static IP of the Environment - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly staticIp?: string; - /** - * Cluster configuration which enables the log daemon to export - * app logs to a destination. Currently only "log-analytics" is - * supported - */ - appLogsConfiguration?: AppLogsConfiguration; +/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ +export type ProxyResource = Resource & {}; + +/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ +export type TrackedResource = Resource & { + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** The geo-location where the resource lives */ + location: string; }; -/** Certificate used for Custom Domain bindings of Container Apps in a Managed Environment */ -export type Certificate = TrackedResource & { - /** Certificate resource specific properties */ - properties?: CertificateProperties; +/** Configuration settings for the Azure ContainerApp Service Authentication / Authorization feature. */ +export type AuthConfig = ProxyResource & { + /** The configuration settings of the platform of ContainerApp Service Authentication/Authorization. */ + platform?: AuthPlatform; + /** The configuration settings that determines the validation flow of users using Service Authentication/Authorization. */ + globalValidation?: GlobalValidation; + /** The configuration settings of each of the identity providers used to configure ContainerApp Service Authentication/Authorization. */ + identityProviders?: IdentityProviders; + /** The configuration settings of the login flow of users using ContainerApp Service Authentication/Authorization. */ + login?: Login; + /** The configuration settings of the HTTP requests for authentication and authorization requests made against ContainerApp Service Authentication/Authorization. */ + httpSettings?: HttpSettings; }; /** Custom domain analysis. */ @@ -1312,6 +1265,30 @@ export type Replica = ProxyResource & { containers?: ReplicaContainer[]; }; +/** Dapr Component. */ +export type DaprComponent = ProxyResource & { + /** Component type */ + componentType?: string; + /** Component version */ + version?: string; + /** Boolean describing if the component errors are ignores */ + ignoreErrors?: boolean; + /** Initialization timeout */ + initTimeout?: string; + /** Collection of secrets used by a Dapr component */ + secrets?: Secret[]; + /** Component metadata */ + metadata?: DaprMetadata[]; + /** Names of container apps that can use this Dapr component */ + scopes?: string[]; +}; + +/** Storage resource for managedEnvironment. */ +export type ManagedEnvironmentStorage = ProxyResource & { + /** Storage properties */ + properties?: ManagedEnvironmentStorageProperties; +}; + /** Container App SourceControl. */ export type SourceControl = ProxyResource & { /** @@ -1331,44 +1308,103 @@ export type SourceControl = ProxyResource & { githubActionConfiguration?: GithubActionConfiguration; }; -/** Dapr Component. */ -export type DaprComponent = ProxyResource & { - /** Component type */ - componentType?: string; - /** Component version */ - version?: string; - /** Boolean describing if the component errors are ignores */ - ignoreErrors?: boolean; - /** Initialization timeout */ - initTimeout?: string; - /** Collection of secrets used by a Dapr component */ - secrets?: Secret[]; - /** Component metadata */ - metadata?: DaprMetadata[]; - /** Names of container apps that can use this Dapr component */ - scopes?: string[]; +/** Container App. */ +export type ContainerApp = TrackedResource & { + /** managed identities for the Container App to interact with other Azure services without maintaining any secrets or credentials in code. */ + identity?: ManagedServiceIdentity; + /** + * Provisioning state of the Container App. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ContainerAppProvisioningState; + /** Resource ID of the Container App's environment. */ + managedEnvironmentId?: string; + /** + * Name of the latest revision of the Container App. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly latestRevisionName?: string; + /** + * Fully Qualified Domain Name of the latest revision of the Container App. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly latestRevisionFqdn?: string; + /** + * Id used to verify domain name ownership + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly customDomainVerificationId?: string; + /** Non versioned Container App configuration properties. */ + configuration?: Configuration; + /** Container App versioned application definition. */ + template?: Template; + /** + * Outbound IP Addresses for container app. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly outboundIPAddresses?: string[]; }; -/** Configuration settings for the Azure ContainerApp Service Authentication / Authorization feature. */ -export type AuthConfig = ProxyResource & { - /** The configuration settings of the platform of ContainerApp Service Authentication/Authorization. */ - platform?: AuthPlatform; - /** The configuration settings that determines the validation flow of users using Service Authentication/Authorization. */ - globalValidation?: GlobalValidation; - /** The configuration settings of each of the identity providers used to configure ContainerApp Service Authentication/Authorization. */ - identityProviders?: IdentityProviders; - /** The configuration settings of the login flow of users using ContainerApp Service Authentication/Authorization. */ - login?: Login; - /** The configuration settings of the HTTP requests for authentication and authorization requests made against ContainerApp Service Authentication/Authorization. */ - httpSettings?: HttpSettings; +/** An environment for hosting container apps */ +export type ManagedEnvironment = TrackedResource & { + /** + * Provisioning state of the Environment. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: EnvironmentProvisioningState; + /** Azure Monitor instrumentation key used by Dapr to export Service to Service communication telemetry */ + daprAIInstrumentationKey?: string; + /** Vnet configuration for the environment */ + vnetConfiguration?: VnetConfiguration; + /** + * Any errors that occurred during deployment or deployment validation + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly deploymentErrors?: string; + /** + * Default Domain Name for the cluster + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly defaultDomain?: string; + /** + * Static IP of the Environment + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly staticIp?: string; + /** + * Cluster configuration which enables the log daemon to export + * app logs to a destination. Currently only "log-analytics" is + * supported + */ + appLogsConfiguration?: AppLogsConfiguration; }; -/** Storage resource for managedEnvironment. */ -export type ManagedEnvironmentStorage = ProxyResource & { - /** Storage properties */ - properties?: ManagedEnvironmentStorageProperties; +/** Certificate used for Custom Domain bindings of Container Apps in a Managed Environment */ +export type Certificate = TrackedResource & { + /** Certificate resource specific properties */ + properties?: CertificateProperties; }; +/** Known values of {@link CreatedByType} that the service accepts. */ +export enum KnownCreatedByType { + User = "User", + Application = "Application", + ManagedIdentity = "ManagedIdentity", + Key = "Key" +} + +/** + * Defines values for CreatedByType. \ + * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **User** \ + * **Application** \ + * **ManagedIdentity** \ + * **Key** + */ +export type CreatedByType = string; + /** Known values of {@link ManagedServiceIdentityType} that the service accepts. */ export enum KnownManagedServiceIdentityType { None = "None", @@ -1509,26 +1545,6 @@ export enum KnownStorageType { */ export type StorageType = string; -/** Known values of {@link CreatedByType} that the service accepts. */ -export enum KnownCreatedByType { - User = "User", - Application = "Application", - ManagedIdentity = "ManagedIdentity", - Key = "Key" -} - -/** - * Defines values for CreatedByType. \ - * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **User** \ - * **Application** \ - * **ManagedIdentity** \ - * **Key** - */ -export type CreatedByType = string; - /** Known values of {@link RevisionHealthState} that the service accepts. */ export enum KnownRevisionHealthState { Healthy = "Healthy", @@ -1611,17 +1627,49 @@ export enum KnownCertificateProvisioningState { } /** - * Defines values for CertificateProvisioningState. \ - * {@link KnownCertificateProvisioningState} can be used interchangeably with CertificateProvisioningState, + * Defines values for CertificateProvisioningState. \ + * {@link KnownCertificateProvisioningState} can be used interchangeably with CertificateProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Failed** \ + * **Canceled** \ + * **DeleteFailed** \ + * **Pending** + */ +export type CertificateProvisioningState = string; + +/** Known values of {@link CheckNameAvailabilityReason} that the service accepts. */ +export enum KnownCheckNameAvailabilityReason { + Invalid = "Invalid", + AlreadyExists = "AlreadyExists" +} + +/** + * Defines values for CheckNameAvailabilityReason. \ + * {@link KnownCheckNameAvailabilityReason} can be used interchangeably with CheckNameAvailabilityReason, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Invalid** \ + * **AlreadyExists** + */ +export type CheckNameAvailabilityReason = string; + +/** Known values of {@link AccessMode} that the service accepts. */ +export enum KnownAccessMode { + ReadOnly = "ReadOnly", + ReadWrite = "ReadWrite" +} + +/** + * Defines values for AccessMode. \ + * {@link KnownAccessMode} can be used interchangeably with AccessMode, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Succeeded** \ - * **Failed** \ - * **Canceled** \ - * **DeleteFailed** \ - * **Pending** + * **ReadOnly** \ + * **ReadWrite** */ -export type CertificateProvisioningState = string; +export type AccessMode = string; /** Known values of {@link SourceControlOperationState} that the service accepts. */ export enum KnownSourceControlOperationState { @@ -1642,24 +1690,6 @@ export enum KnownSourceControlOperationState { * **Canceled** */ export type SourceControlOperationState = string; - -/** Known values of {@link AccessMode} that the service accepts. */ -export enum KnownAccessMode { - ReadOnly = "ReadOnly", - ReadWrite = "ReadWrite" -} - -/** - * Defines values for AccessMode. \ - * {@link KnownAccessMode} can be used interchangeably with AccessMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **ReadOnly** \ - * **ReadWrite** - */ -export type AccessMode = string; -/** Defines values for DnsVerificationTestResult. */ -export type DnsVerificationTestResult = "Passed" | "Failed" | "Skipped"; /** Defines values for UnauthenticatedClientActionV2. */ export type UnauthenticatedClientActionV2 = | "RedirectToLoginPage" @@ -1672,6 +1702,40 @@ export type CookieExpirationConvention = | "IdentityProviderDerived"; /** Defines values for ForwardProxyConvention. */ export type ForwardProxyConvention = "NoProxy" | "Standard" | "Custom"; +/** Defines values for DnsVerificationTestResult. */ +export type DnsVerificationTestResult = "Passed" | "Failed" | "Skipped"; + +/** Optional parameters. */ +export interface ContainerAppsAuthConfigsListByContainerAppOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByContainerApp operation. */ +export type ContainerAppsAuthConfigsListByContainerAppResponse = AuthConfigCollection; + +/** Optional parameters. */ +export interface ContainerAppsAuthConfigsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ContainerAppsAuthConfigsGetResponse = AuthConfig; + +/** Optional parameters. */ +export interface ContainerAppsAuthConfigsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type ContainerAppsAuthConfigsCreateOrUpdateResponse = AuthConfig; + +/** Optional parameters. */ +export interface ContainerAppsAuthConfigsDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface ContainerAppsAuthConfigsListByContainerAppNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByContainerAppNext operation. */ +export type ContainerAppsAuthConfigsListByContainerAppNextResponse = AuthConfigCollection; /** Optional parameters. */ export interface ContainerAppsListBySubscriptionOptionalParams @@ -1717,10 +1781,12 @@ export interface ContainerAppsDeleteOptionalParams /** Optional parameters. */ export interface ContainerAppsUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type ContainerAppsUpdateResponse = ContainerApp; + 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 ContainerAppsListCustomHostNameAnalysisOptionalParams @@ -1755,7 +1821,10 @@ export type ContainerAppsListByResourceGroupNextResponse = ContainerAppCollectio /** Optional parameters. */ export interface ContainerAppsRevisionsListRevisionsOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { + /** The filter to apply on the operation. */ + filter?: string; +} /** Contains response data for the listRevisions operation. */ export type ContainerAppsRevisionsListRevisionsResponse = RevisionCollection; @@ -1781,7 +1850,10 @@ export interface ContainerAppsRevisionsRestartRevisionOptionalParams /** Optional parameters. */ export interface ContainerAppsRevisionsListRevisionsNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { + /** The filter to apply on the operation. */ + filter?: string; +} /** Contains response data for the listRevisionsNext operation. */ export type ContainerAppsRevisionsListRevisionsNextResponse = RevisionCollection; @@ -1800,6 +1872,59 @@ export interface ContainerAppsRevisionReplicasListReplicasOptionalParams /** Contains response data for the listReplicas operation. */ export type ContainerAppsRevisionReplicasListReplicasResponse = ReplicaCollection; +/** Optional parameters. */ +export interface DaprComponentsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type DaprComponentsListResponse = DaprComponentsCollection; + +/** Optional parameters. */ +export interface DaprComponentsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type DaprComponentsGetResponse = DaprComponent; + +/** Optional parameters. */ +export interface DaprComponentsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type DaprComponentsCreateOrUpdateResponse = DaprComponent; + +/** Optional parameters. */ +export interface DaprComponentsDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface DaprComponentsListSecretsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listSecrets operation. */ +export type DaprComponentsListSecretsResponse = DaprSecretsCollection; + +/** Optional parameters. */ +export interface DaprComponentsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type DaprComponentsListNextResponse = DaprComponentsCollection; + +/** Optional parameters. */ +export interface OperationsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type OperationsListResponse = AvailableOperations; + +/** Optional parameters. */ +export interface OperationsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type OperationsListNextResponse = AvailableOperations; + /** Optional parameters. */ export interface ManagedEnvironmentsListBySubscriptionOptionalParams extends coreClient.OperationOptions {} @@ -1844,10 +1969,12 @@ export interface ManagedEnvironmentsDeleteOptionalParams /** Optional parameters. */ export interface ManagedEnvironmentsUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type ManagedEnvironmentsUpdateResponse = ManagedEnvironment; + 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 ManagedEnvironmentsListBySubscriptionNextOptionalParams @@ -1906,18 +2033,36 @@ export interface CertificatesListNextOptionalParams export type CertificatesListNextResponse = CertificateCollection; /** Optional parameters. */ -export interface OperationsListOptionalParams +export interface NamespacesCheckNameAvailabilityOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the checkNameAvailability operation. */ +export type NamespacesCheckNameAvailabilityResponse = CheckNameAvailabilityResponse; + +/** Optional parameters. */ +export interface ManagedEnvironmentsStoragesListOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the list operation. */ -export type OperationsListResponse = AvailableOperations; +export type ManagedEnvironmentsStoragesListResponse = ManagedEnvironmentStoragesCollection; /** Optional parameters. */ -export interface OperationsListNextOptionalParams +export interface ManagedEnvironmentsStoragesGetOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listNext operation. */ -export type OperationsListNextResponse = AvailableOperations; +/** Contains response data for the get operation. */ +export type ManagedEnvironmentsStoragesGetResponse = ManagedEnvironmentStorage; + +/** Optional parameters. */ +export interface ManagedEnvironmentsStoragesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type ManagedEnvironmentsStoragesCreateOrUpdateResponse = ManagedEnvironmentStorage; + +/** Optional parameters. */ +export interface ManagedEnvironmentsStoragesDeleteOptionalParams + extends coreClient.OperationOptions {} /** Optional parameters. */ export interface ContainerAppsSourceControlsListByContainerAppOptionalParams @@ -1961,95 +2106,6 @@ export interface ContainerAppsSourceControlsListByContainerAppNextOptionalParams /** Contains response data for the listByContainerAppNext operation. */ export type ContainerAppsSourceControlsListByContainerAppNextResponse = SourceControlCollection; -/** Optional parameters. */ -export interface DaprComponentsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type DaprComponentsListResponse = DaprComponentsCollection; - -/** Optional parameters. */ -export interface DaprComponentsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type DaprComponentsGetResponse = DaprComponent; - -/** Optional parameters. */ -export interface DaprComponentsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type DaprComponentsCreateOrUpdateResponse = DaprComponent; - -/** Optional parameters. */ -export interface DaprComponentsDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface DaprComponentsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type DaprComponentsListNextResponse = DaprComponentsCollection; - -/** Optional parameters. */ -export interface ContainerAppsAuthConfigsListByContainerAppOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByContainerApp operation. */ -export type ContainerAppsAuthConfigsListByContainerAppResponse = AuthConfigCollection; - -/** Optional parameters. */ -export interface ContainerAppsAuthConfigsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ContainerAppsAuthConfigsGetResponse = AuthConfig; - -/** Optional parameters. */ -export interface ContainerAppsAuthConfigsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type ContainerAppsAuthConfigsCreateOrUpdateResponse = AuthConfig; - -/** Optional parameters. */ -export interface ContainerAppsAuthConfigsDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface ContainerAppsAuthConfigsListByContainerAppNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByContainerAppNext operation. */ -export type ContainerAppsAuthConfigsListByContainerAppNextResponse = AuthConfigCollection; - -/** Optional parameters. */ -export interface ManagedEnvironmentsStoragesListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ManagedEnvironmentsStoragesListResponse = ManagedEnvironmentStoragesCollection; - -/** Optional parameters. */ -export interface ManagedEnvironmentsStoragesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ManagedEnvironmentsStoragesGetResponse = ManagedEnvironmentStorage; - -/** Optional parameters. */ -export interface ManagedEnvironmentsStoragesCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type ManagedEnvironmentsStoragesCreateOrUpdateResponse = ManagedEnvironmentStorage; - -/** Optional parameters. */ -export interface ManagedEnvironmentsStoragesDeleteOptionalParams - extends coreClient.OperationOptions {} - /** Optional parameters. */ export interface ContainerAppsAPIClientOptionalParams extends coreClient.ServiceClientOptions { diff --git a/sdk/app/arm-app/src/models/mappers.ts b/sdk/app/arm-app/src/models/mappers.ts index 59fdb769f365..6336e9bd4a78 100644 --- a/sdk/app/arm-app/src/models/mappers.ts +++ b/sdk/app/arm-app/src/models/mappers.ts @@ -8,10 +8,10 @@ import * as coreClient from "@azure/core-client"; -export const ContainerAppCollection: coreClient.CompositeMapper = { +export const AuthConfigCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerAppCollection", + className: "AuthConfigCollection", modelProperties: { value: { serializedName: "value", @@ -21,7 +21,7 @@ export const ContainerAppCollection: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ContainerApp" + className: "AuthConfig" } } } @@ -37,199 +37,240 @@ export const ContainerAppCollection: coreClient.CompositeMapper = { } }; -export const ManagedServiceIdentity: coreClient.CompositeMapper = { +export const AuthPlatform: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedServiceIdentity", + className: "AuthPlatform", modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, - type: { - name: "Uuid" - } - }, - tenantId: { - serializedName: "tenantId", - readOnly: true, + enabled: { + serializedName: "enabled", type: { - name: "Uuid" + name: "Boolean" } }, - type: { - serializedName: "type", - required: true, + runtimeVersion: { + serializedName: "runtimeVersion", type: { name: "String" } - }, - userAssignedIdentities: { - serializedName: "userAssignedIdentities", - type: { - name: "Dictionary", - value: { - type: { name: "Composite", className: "UserAssignedIdentity" } - } - } } } } }; -export const UserAssignedIdentity: coreClient.CompositeMapper = { +export const GlobalValidation: coreClient.CompositeMapper = { type: { name: "Composite", - className: "UserAssignedIdentity", + className: "GlobalValidation", modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, + unauthenticatedClientAction: { + serializedName: "unauthenticatedClientAction", type: { - name: "Uuid" + name: "Enum", + allowedValues: [ + "RedirectToLoginPage", + "AllowAnonymous", + "Return401", + "Return403" + ] } }, - clientId: { - serializedName: "clientId", - readOnly: true, + redirectToProvider: { + serializedName: "redirectToProvider", type: { - name: "Uuid" + name: "String" + } + }, + excludedPaths: { + serializedName: "excludedPaths", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const Configuration: coreClient.CompositeMapper = { +export const IdentityProviders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Configuration", + className: "IdentityProviders", modelProperties: { - secrets: { - serializedName: "secrets", + azureActiveDirectory: { + serializedName: "azureActiveDirectory", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Secret" - } - } + name: "Composite", + className: "AzureActiveDirectory" } }, - activeRevisionsMode: { - serializedName: "activeRevisionsMode", + facebook: { + serializedName: "facebook", type: { - name: "String" + name: "Composite", + className: "Facebook" } }, - ingress: { - serializedName: "ingress", + gitHub: { + serializedName: "gitHub", type: { name: "Composite", - className: "Ingress" + className: "GitHub" } }, - registries: { - serializedName: "registries", + google: { + serializedName: "google", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RegistryCredentials" - } - } + name: "Composite", + className: "Google" } }, - dapr: { - serializedName: "dapr", + twitter: { + serializedName: "twitter", type: { name: "Composite", - className: "Dapr" + className: "Twitter" + } + }, + apple: { + serializedName: "apple", + type: { + name: "Composite", + className: "Apple" + } + }, + azureStaticWebApps: { + serializedName: "azureStaticWebApps", + type: { + name: "Composite", + className: "AzureStaticWebApps" + } + }, + customOpenIdConnectProviders: { + serializedName: "customOpenIdConnectProviders", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "CustomOpenIdConnectProvider" + } + } } } } } }; -export const Secret: coreClient.CompositeMapper = { +export const AzureActiveDirectory: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Secret", + className: "AzureActiveDirectory", modelProperties: { - name: { - serializedName: "name", + enabled: { + serializedName: "enabled", type: { - name: "String" + name: "Boolean" } }, - value: { - serializedName: "value", + registration: { + serializedName: "registration", type: { - name: "String" + name: "Composite", + className: "AzureActiveDirectoryRegistration" + } + }, + login: { + serializedName: "login", + type: { + name: "Composite", + className: "AzureActiveDirectoryLogin" + } + }, + validation: { + serializedName: "validation", + type: { + name: "Composite", + className: "AzureActiveDirectoryValidation" + } + }, + isAutoProvisioned: { + serializedName: "isAutoProvisioned", + type: { + name: "Boolean" } } } } }; -export const Ingress: coreClient.CompositeMapper = { +export const AzureActiveDirectoryRegistration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Ingress", + className: "AzureActiveDirectoryRegistration", modelProperties: { - fqdn: { - serializedName: "fqdn", - readOnly: true, + openIdIssuer: { + serializedName: "openIdIssuer", type: { name: "String" } }, - external: { - defaultValue: false, - serializedName: "external", + clientId: { + serializedName: "clientId", type: { - name: "Boolean" + name: "String" } }, - targetPort: { - serializedName: "targetPort", + clientSecretSettingName: { + serializedName: "clientSecretSettingName", type: { - name: "Number" + name: "String" } }, - transport: { - serializedName: "transport", + clientSecretCertificateThumbprint: { + serializedName: "clientSecretCertificateThumbprint", type: { name: "String" } }, - traffic: { - serializedName: "traffic", + clientSecretCertificateSubjectAlternativeName: { + serializedName: "clientSecretCertificateSubjectAlternativeName", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TrafficWeight" - } - } + name: "String" } }, - customDomains: { - serializedName: "customDomains", + clientSecretCertificateIssuer: { + serializedName: "clientSecretCertificateIssuer", + type: { + name: "String" + } + } + } + } +}; + +export const AzureActiveDirectoryLogin: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AzureActiveDirectoryLogin", + modelProperties: { + loginParameters: { + serializedName: "loginParameters", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "CustomDomain" + name: "String" } } } }, - allowInsecure: { - serializedName: "allowInsecure", + disableWWWAuthenticate: { + serializedName: "disableWWWAuthenticate", type: { name: "Boolean" } @@ -238,161 +279,63 @@ export const Ingress: coreClient.CompositeMapper = { } }; -export const TrafficWeight: coreClient.CompositeMapper = { +export const AzureActiveDirectoryValidation: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TrafficWeight", + className: "AzureActiveDirectoryValidation", modelProperties: { - revisionName: { - serializedName: "revisionName", - type: { - name: "String" - } - }, - weight: { - serializedName: "weight", - type: { - name: "Number" - } - }, - latestRevision: { - defaultValue: false, - serializedName: "latestRevision", - type: { - name: "Boolean" - } - } - } - } -}; - -export const CustomDomain: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CustomDomain", - modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String" - } - }, - bindingType: { - serializedName: "bindingType", - type: { - name: "String" - } - }, - certificateId: { - serializedName: "certificateId", - required: true, - type: { - name: "String" - } - } - } - } -}; - -export const RegistryCredentials: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RegistryCredentials", - modelProperties: { - server: { - serializedName: "server", - type: { - name: "String" - } - }, - username: { - serializedName: "username", - type: { - name: "String" - } - }, - passwordSecretRef: { - serializedName: "passwordSecretRef", - type: { - name: "String" - } - } - } - } -}; - -export const Dapr: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Dapr", - modelProperties: { - enabled: { - serializedName: "enabled", - type: { - name: "Boolean" - } - }, - appId: { - serializedName: "appId", + jwtClaimChecks: { + serializedName: "jwtClaimChecks", type: { - name: "String" + name: "Composite", + className: "JwtClaimChecks" } }, - appProtocol: { - serializedName: "appProtocol", + allowedAudiences: { + serializedName: "allowedAudiences", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - appPort: { - serializedName: "appPort", + defaultAuthorizationPolicy: { + serializedName: "defaultAuthorizationPolicy", type: { - name: "Number" + name: "Composite", + className: "DefaultAuthorizationPolicy" } } } } }; -export const Template: coreClient.CompositeMapper = { +export const JwtClaimChecks: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Template", + className: "JwtClaimChecks", modelProperties: { - revisionSuffix: { - serializedName: "revisionSuffix", - type: { - name: "String" - } - }, - containers: { - serializedName: "containers", + allowedGroups: { + serializedName: "allowedGroups", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "Container" + name: "String" } } } }, - scale: { - serializedName: "scale", - type: { - name: "Composite", - className: "Scale" - } - }, - volumes: { - serializedName: "volumes", + allowedClientApplications: { + serializedName: "allowedClientApplications", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "Volume" + name: "String" } } } @@ -401,25 +344,20 @@ export const Template: coreClient.CompositeMapper = { } }; -export const Container: coreClient.CompositeMapper = { +export const DefaultAuthorizationPolicy: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Container", + className: "DefaultAuthorizationPolicy", modelProperties: { - image: { - serializedName: "image", - type: { - name: "String" - } - }, - name: { - serializedName: "name", + allowedPrincipals: { + serializedName: "allowedPrincipals", type: { - name: "String" + name: "Composite", + className: "AllowedPrincipals" } }, - command: { - serializedName: "command", + allowedApplications: { + serializedName: "allowedApplications", type: { name: "Sequence", element: { @@ -428,9 +366,18 @@ export const Container: coreClient.CompositeMapper = { } } } - }, - args: { - serializedName: "args", + } + } + } +}; + +export const AllowedPrincipals: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AllowedPrincipals", + modelProperties: { + groups: { + serializedName: "groups", type: { name: "Sequence", element: { @@ -440,45 +387,13 @@ export const Container: coreClient.CompositeMapper = { } } }, - env: { - serializedName: "env", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EnvironmentVar" - } - } - } - }, - resources: { - serializedName: "resources", - type: { - name: "Composite", - className: "ContainerResources" - } - }, - probes: { - serializedName: "probes", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ContainerAppProbe" - } - } - } - }, - volumeMounts: { - serializedName: "volumeMounts", + identities: { + serializedName: "identities", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "VolumeMount" + name: "String" } } } @@ -487,118 +402,54 @@ export const Container: coreClient.CompositeMapper = { } }; -export const EnvironmentVar: coreClient.CompositeMapper = { +export const Facebook: coreClient.CompositeMapper = { type: { name: "Composite", - className: "EnvironmentVar", + className: "Facebook", modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - value: { - serializedName: "value", + enabled: { + serializedName: "enabled", type: { - name: "String" + name: "Boolean" } }, - secretRef: { - serializedName: "secretRef", - type: { - name: "String" - } - } - } - } -}; - -export const ContainerResources: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ContainerResources", - modelProperties: { - cpu: { - serializedName: "cpu", + registration: { + serializedName: "registration", type: { - name: "Number" + name: "Composite", + className: "AppRegistration" } }, - memory: { - serializedName: "memory", + graphApiVersion: { + serializedName: "graphApiVersion", type: { name: "String" } }, - ephemeralStorage: { - serializedName: "ephemeralStorage", - readOnly: true, + login: { + serializedName: "login", type: { - name: "String" + name: "Composite", + className: "LoginScopes" } } } } }; -export const ContainerAppProbe: coreClient.CompositeMapper = { +export const AppRegistration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerAppProbe", + className: "AppRegistration", modelProperties: { - failureThreshold: { - serializedName: "failureThreshold", - type: { - name: "Number" - } - }, - httpGet: { - serializedName: "httpGet", - type: { - name: "Composite", - className: "ContainerAppProbeHttpGet" - } - }, - initialDelaySeconds: { - serializedName: "initialDelaySeconds", - type: { - name: "Number" - } - }, - periodSeconds: { - serializedName: "periodSeconds", - type: { - name: "Number" - } - }, - successThreshold: { - serializedName: "successThreshold", - type: { - name: "Number" - } - }, - tcpSocket: { - serializedName: "tcpSocket", - type: { - name: "Composite", - className: "ContainerAppProbeTcpSocket" - } - }, - terminationGracePeriodSeconds: { - serializedName: "terminationGracePeriodSeconds", - type: { - name: "Number" - } - }, - timeoutSeconds: { - serializedName: "timeoutSeconds", + appId: { + serializedName: "appId", type: { - name: "Number" + name: "String" } }, - type: { - serializedName: "type", + appSecretSettingName: { + serializedName: "appSecretSettingName", type: { name: "String" } @@ -607,110 +458,68 @@ export const ContainerAppProbe: coreClient.CompositeMapper = { } }; -export const ContainerAppProbeHttpGet: coreClient.CompositeMapper = { +export const LoginScopes: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerAppProbeHttpGet", + className: "LoginScopes", modelProperties: { - host: { - serializedName: "host", - type: { - name: "String" - } - }, - httpHeaders: { - serializedName: "httpHeaders", + scopes: { + serializedName: "scopes", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "ContainerAppProbeHttpGetHttpHeadersItem" + name: "String" } } } - }, - path: { - serializedName: "path", - type: { - name: "String" - } - }, - port: { - serializedName: "port", - required: true, - type: { - name: "Number" - } - }, - scheme: { - serializedName: "scheme", - type: { - name: "String" - } } } } }; -export const ContainerAppProbeHttpGetHttpHeadersItem: coreClient.CompositeMapper = { +export const GitHub: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerAppProbeHttpGetHttpHeadersItem", + className: "GitHub", modelProperties: { - name: { - serializedName: "name", - required: true, + enabled: { + serializedName: "enabled", type: { - name: "String" + name: "Boolean" } }, - value: { - serializedName: "value", - required: true, - type: { - name: "String" - } - } - } - } -}; - -export const ContainerAppProbeTcpSocket: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ContainerAppProbeTcpSocket", - modelProperties: { - host: { - serializedName: "host", + registration: { + serializedName: "registration", type: { - name: "String" + name: "Composite", + className: "ClientRegistration" } }, - port: { - serializedName: "port", - required: true, + login: { + serializedName: "login", type: { - name: "Number" + name: "Composite", + className: "LoginScopes" } } } } }; -export const VolumeMount: coreClient.CompositeMapper = { +export const ClientRegistration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VolumeMount", + className: "ClientRegistration", modelProperties: { - volumeName: { - serializedName: "volumeName", + clientId: { + serializedName: "clientId", type: { name: "String" } }, - mountPath: { - serializedName: "mountPath", + clientSecretSettingName: { + serializedName: "clientSecretSettingName", type: { name: "String" } @@ -719,31 +528,54 @@ export const VolumeMount: coreClient.CompositeMapper = { } }; -export const Scale: coreClient.CompositeMapper = { +export const Google: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Scale", + className: "Google", modelProperties: { - minReplicas: { - serializedName: "minReplicas", + enabled: { + serializedName: "enabled", type: { - name: "Number" + name: "Boolean" } }, - maxReplicas: { - serializedName: "maxReplicas", + registration: { + serializedName: "registration", type: { - name: "Number" + name: "Composite", + className: "ClientRegistration" } }, - rules: { - serializedName: "rules", + login: { + serializedName: "login", + type: { + name: "Composite", + className: "LoginScopes" + } + }, + validation: { + serializedName: "validation", + type: { + name: "Composite", + className: "AllowedAudiencesValidation" + } + } + } + } +}; + +export const AllowedAudiencesValidation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AllowedAudiencesValidation", + modelProperties: { + allowedAudiences: { + serializedName: "allowedAudiences", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "ScaleRule" + name: "String" } } } @@ -752,88 +584,91 @@ export const Scale: coreClient.CompositeMapper = { } }; -export const ScaleRule: coreClient.CompositeMapper = { +export const Twitter: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ScaleRule", + className: "Twitter", modelProperties: { - name: { - serializedName: "name", + enabled: { + serializedName: "enabled", type: { - name: "String" + name: "Boolean" } }, - azureQueue: { - serializedName: "azureQueue", + registration: { + serializedName: "registration", type: { name: "Composite", - className: "QueueScaleRule" + className: "TwitterRegistration" } - }, - custom: { - serializedName: "custom", + } + } + } +}; + +export const TwitterRegistration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TwitterRegistration", + modelProperties: { + consumerKey: { + serializedName: "consumerKey", type: { - name: "Composite", - className: "CustomScaleRule" + name: "String" } }, - http: { - serializedName: "http", + consumerSecretSettingName: { + serializedName: "consumerSecretSettingName", type: { - name: "Composite", - className: "HttpScaleRule" + name: "String" } } } } }; -export const QueueScaleRule: coreClient.CompositeMapper = { +export const Apple: coreClient.CompositeMapper = { type: { name: "Composite", - className: "QueueScaleRule", + className: "Apple", modelProperties: { - queueName: { - serializedName: "queueName", + enabled: { + serializedName: "enabled", type: { - name: "String" + name: "Boolean" } }, - queueLength: { - serializedName: "queueLength", + registration: { + serializedName: "registration", type: { - name: "Number" + name: "Composite", + className: "AppleRegistration" } }, - auth: { - serializedName: "auth", + login: { + serializedName: "login", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ScaleRuleAuth" - } - } + name: "Composite", + className: "LoginScopes" } } } } }; -export const ScaleRuleAuth: coreClient.CompositeMapper = { +export const AppleRegistration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ScaleRuleAuth", + className: "AppleRegistration", modelProperties: { - secretRef: { - serializedName: "secretRef", + clientId: { + serializedName: "clientId", type: { name: "String" } }, - triggerParameter: { - serializedName: "triggerParameter", + clientSecretSettingName: { + serializedName: "clientSecretSettingName", type: { name: "String" } @@ -842,264 +677,243 @@ export const ScaleRuleAuth: coreClient.CompositeMapper = { } }; -export const CustomScaleRule: coreClient.CompositeMapper = { +export const AzureStaticWebApps: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CustomScaleRule", + className: "AzureStaticWebApps", modelProperties: { - type: { - serializedName: "type", + enabled: { + serializedName: "enabled", type: { - name: "String" + name: "Boolean" } }, - metadata: { - serializedName: "metadata", + registration: { + serializedName: "registration", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "Composite", + className: "AzureStaticWebAppsRegistration" } - }, - auth: { - serializedName: "auth", + } + } + } +}; + +export const AzureStaticWebAppsRegistration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AzureStaticWebAppsRegistration", + modelProperties: { + clientId: { + serializedName: "clientId", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ScaleRuleAuth" - } - } + name: "String" } } } } }; -export const HttpScaleRule: coreClient.CompositeMapper = { +export const CustomOpenIdConnectProvider: coreClient.CompositeMapper = { type: { name: "Composite", - className: "HttpScaleRule", + className: "CustomOpenIdConnectProvider", modelProperties: { - metadata: { - serializedName: "metadata", + enabled: { + serializedName: "enabled", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "Boolean" } }, - auth: { - serializedName: "auth", + registration: { + serializedName: "registration", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ScaleRuleAuth" - } - } + name: "Composite", + className: "OpenIdConnectRegistration" + } + }, + login: { + serializedName: "login", + type: { + name: "Composite", + className: "OpenIdConnectLogin" } } } } }; -export const Volume: coreClient.CompositeMapper = { +export const OpenIdConnectRegistration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Volume", + className: "OpenIdConnectRegistration", modelProperties: { - name: { - serializedName: "name", + clientId: { + serializedName: "clientId", type: { name: "String" } }, - storageType: { - serializedName: "storageType", + clientCredential: { + serializedName: "clientCredential", type: { - name: "String" + name: "Composite", + className: "OpenIdConnectClientCredential" } }, - storageName: { - serializedName: "storageName", + openIdConnectConfiguration: { + serializedName: "openIdConnectConfiguration", type: { - name: "String" + name: "Composite", + className: "OpenIdConnectConfig" } } } } }; -export const Resource: coreClient.CompositeMapper = { +export const OpenIdConnectClientCredential: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Resource", + className: "OpenIdConnectClientCredential", modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, + method: { + defaultValue: "ClientSecretPost", + isConstant: true, + serializedName: "method", type: { name: "String" } }, - type: { - serializedName: "type", - readOnly: true, + clientSecretSettingName: { + serializedName: "clientSecretSettingName", type: { name: "String" } - }, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } } } } }; -export const SystemData: coreClient.CompositeMapper = { +export const OpenIdConnectConfig: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SystemData", + className: "OpenIdConnectConfig", modelProperties: { - createdBy: { - serializedName: "createdBy", + authorizationEndpoint: { + serializedName: "authorizationEndpoint", type: { name: "String" } }, - createdByType: { - serializedName: "createdByType", + tokenEndpoint: { + serializedName: "tokenEndpoint", type: { name: "String" } }, - createdAt: { - serializedName: "createdAt", - type: { - name: "DateTime" - } - }, - lastModifiedBy: { - serializedName: "lastModifiedBy", + issuer: { + serializedName: "issuer", type: { name: "String" } }, - lastModifiedByType: { - serializedName: "lastModifiedByType", + certificationUri: { + serializedName: "certificationUri", type: { name: "String" } }, - lastModifiedAt: { - serializedName: "lastModifiedAt", + wellKnownOpenIdConfiguration: { + serializedName: "wellKnownOpenIdConfiguration", type: { - name: "DateTime" + name: "String" } } } } }; -export const DefaultErrorResponse: coreClient.CompositeMapper = { +export const OpenIdConnectLogin: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DefaultErrorResponse", + className: "OpenIdConnectLogin", modelProperties: { - error: { - serializedName: "error", + nameClaimType: { + serializedName: "nameClaimType", type: { - name: "Composite", - className: "DefaultErrorResponseError" + name: "String" + } + }, + scopes: { + serializedName: "scopes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const DefaultErrorResponseError: coreClient.CompositeMapper = { +export const Login: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DefaultErrorResponseError", + className: "Login", modelProperties: { - code: { - serializedName: "code", - readOnly: true, - type: { - name: "String" - } - }, - message: { - serializedName: "message", - readOnly: true, + routes: { + serializedName: "routes", type: { - name: "String" + name: "Composite", + className: "LoginRoutes" } }, - target: { - serializedName: "target", - readOnly: true, + preserveUrlFragmentsForLogins: { + serializedName: "preserveUrlFragmentsForLogins", type: { - name: "String" + name: "Boolean" } }, - details: { - serializedName: "details", + allowedExternalRedirectUrls: { + serializedName: "allowedExternalRedirectUrls", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "DefaultErrorResponseErrorDetailsItem" + name: "String" } } } }, - innererror: { - serializedName: "innererror", - readOnly: true, + cookieExpiration: { + serializedName: "cookieExpiration", type: { - name: "String" + name: "Composite", + className: "CookieExpiration" + } + }, + nonce: { + serializedName: "nonce", + type: { + name: "Composite", + className: "Nonce" } } } } }; -export const DefaultErrorResponseErrorDetailsItem: coreClient.CompositeMapper = { +export const LoginRoutes: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DefaultErrorResponseErrorDetailsItem", + className: "LoginRoutes", modelProperties: { - code: { - serializedName: "code", - readOnly: true, - type: { - name: "String" - } - }, - message: { - serializedName: "message", - readOnly: true, - type: { - name: "String" - } - }, - target: { - serializedName: "target", - readOnly: true, + logoutEndpoint: { + serializedName: "logoutEndpoint", type: { name: "String" } @@ -1108,88 +922,85 @@ export const DefaultErrorResponseErrorDetailsItem: coreClient.CompositeMapper = } }; -export const ContainerAppPatch: coreClient.CompositeMapper = { +export const CookieExpiration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerAppPatch", + className: "CookieExpiration", modelProperties: { - tags: { - serializedName: "tags", + convention: { + serializedName: "convention", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "Enum", + allowedValues: ["FixedTime", "IdentityProviderDerived"] + } + }, + timeToExpiration: { + serializedName: "timeToExpiration", + type: { + name: "String" } } } } }; -export const SecretsCollection: coreClient.CompositeMapper = { +export const Nonce: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SecretsCollection", + className: "Nonce", modelProperties: { - value: { - serializedName: "value", - required: true, + validateNonce: { + serializedName: "validateNonce", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ContainerAppSecret" - } - } + name: "Boolean" + } + }, + nonceExpirationInterval: { + serializedName: "nonceExpirationInterval", + type: { + name: "String" } } } } }; -export const ContainerAppSecret: coreClient.CompositeMapper = { +export const HttpSettings: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerAppSecret", + className: "HttpSettings", modelProperties: { - name: { - serializedName: "name", - readOnly: true, + requireHttps: { + serializedName: "requireHttps", type: { - name: "String" + name: "Boolean" } }, - value: { - serializedName: "value", - readOnly: true, + routes: { + serializedName: "routes", type: { - name: "String" + name: "Composite", + className: "HttpSettingsRoutes" + } + }, + forwardProxy: { + serializedName: "forwardProxy", + type: { + name: "Composite", + className: "ForwardProxy" } } } } }; -export const RevisionCollection: coreClient.CompositeMapper = { +export const HttpSettingsRoutes: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RevisionCollection", + className: "HttpSettingsRoutes", modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Revision" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + apiPrefix: { + serializedName: "apiPrefix", type: { name: "String" } @@ -1198,176 +1009,173 @@ export const RevisionCollection: coreClient.CompositeMapper = { } }; -export const ReplicaContainer: coreClient.CompositeMapper = { +export const ForwardProxy: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ReplicaContainer", + className: "ForwardProxy", modelProperties: { - name: { - serializedName: "name", + convention: { + serializedName: "convention", type: { - name: "String" + name: "Enum", + allowedValues: ["NoProxy", "Standard", "Custom"] } }, - containerId: { - serializedName: "containerId", + customHostHeaderName: { + serializedName: "customHostHeaderName", type: { name: "String" } }, - ready: { - serializedName: "ready", - type: { - name: "Boolean" - } - }, - started: { - serializedName: "started", - type: { - name: "Boolean" - } - }, - restartCount: { - serializedName: "restartCount", + customProtoHeaderName: { + serializedName: "customProtoHeaderName", type: { - name: "Number" + name: "String" } } } } }; -export const ReplicaCollection: coreClient.CompositeMapper = { +export const Resource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ReplicaCollection", + className: "Resource", modelProperties: { - value: { - serializedName: "value", - required: true, + id: { + serializedName: "id", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Replica" - } - } + name: "String" } - } - } - } -}; - -export const ManagedEnvironmentsCollection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedEnvironmentsCollection", - modelProperties: { - value: { - serializedName: "value", - required: true, + }, + name: { + serializedName: "name", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ManagedEnvironment" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", + type: { + serializedName: "type", readOnly: true, type: { name: "String" } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } } } } }; -export const VnetConfiguration: coreClient.CompositeMapper = { +export const SystemData: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VnetConfiguration", + className: "SystemData", modelProperties: { - internal: { - serializedName: "internal", + createdBy: { + serializedName: "createdBy", type: { - name: "Boolean" + name: "String" } }, - infrastructureSubnetId: { - serializedName: "infrastructureSubnetId", + createdByType: { + serializedName: "createdByType", type: { name: "String" } }, - runtimeSubnetId: { - serializedName: "runtimeSubnetId", + createdAt: { + serializedName: "createdAt", type: { - name: "String" + name: "DateTime" } }, - dockerBridgeCidr: { - serializedName: "dockerBridgeCidr", + lastModifiedBy: { + serializedName: "lastModifiedBy", type: { name: "String" } }, - platformReservedCidr: { - serializedName: "platformReservedCidr", + lastModifiedByType: { + serializedName: "lastModifiedByType", type: { name: "String" } }, - platformReservedDnsIP: { - serializedName: "platformReservedDnsIP", + lastModifiedAt: { + serializedName: "lastModifiedAt", type: { - name: "String" + name: "DateTime" } } } } }; -export const AppLogsConfiguration: coreClient.CompositeMapper = { +export const DefaultErrorResponse: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AppLogsConfiguration", + className: "DefaultErrorResponse", modelProperties: { - destination: { - serializedName: "destination", - type: { - name: "String" - } - }, - logAnalyticsConfiguration: { - serializedName: "logAnalyticsConfiguration", + error: { + serializedName: "error", type: { name: "Composite", - className: "LogAnalyticsConfiguration" + className: "DefaultErrorResponseError" } } } } }; -export const LogAnalyticsConfiguration: coreClient.CompositeMapper = { +export const DefaultErrorResponseError: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LogAnalyticsConfiguration", + className: "DefaultErrorResponseError", modelProperties: { - customerId: { - serializedName: "customerId", + code: { + serializedName: "code", + readOnly: true, type: { name: "String" } }, - sharedKey: { - serializedName: "sharedKey", + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String" + } + }, + details: { + serializedName: "details", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DefaultErrorResponseErrorDetailsItem" + } + } + } + }, + innererror: { + serializedName: "innererror", + readOnly: true, type: { name: "String" } @@ -1376,26 +1184,40 @@ export const LogAnalyticsConfiguration: coreClient.CompositeMapper = { } }; -export const ManagedEnvironmentPatch: coreClient.CompositeMapper = { +export const DefaultErrorResponseErrorDetailsItem: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedEnvironmentPatch", + className: "DefaultErrorResponseErrorDetailsItem", modelProperties: { - tags: { - serializedName: "tags", + code: { + serializedName: "code", + readOnly: true, type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" + } + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String" } } } } }; -export const CertificateCollection: coreClient.CompositeMapper = { +export const ContainerAppCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CertificateCollection", + className: "ContainerAppCollection", modelProperties: { value: { serializedName: "value", @@ -1405,7 +1227,7 @@ export const CertificateCollection: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Certificate" + className: "ContainerApp" } } } @@ -1421,118 +1243,134 @@ export const CertificateCollection: coreClient.CompositeMapper = { } }; -export const CertificateProperties: coreClient.CompositeMapper = { +export const ManagedServiceIdentity: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CertificateProperties", + className: "ManagedServiceIdentity", modelProperties: { - provisioningState: { - serializedName: "provisioningState", + principalId: { + serializedName: "principalId", readOnly: true, type: { - name: "String" + name: "Uuid" } }, - password: { - serializedName: "password", + tenantId: { + serializedName: "tenantId", + readOnly: true, type: { - name: "String" + name: "Uuid" } }, - subjectName: { - serializedName: "subjectName", - readOnly: true, + type: { + serializedName: "type", + required: true, type: { name: "String" } }, - value: { - serializedName: "value", + userAssignedIdentities: { + serializedName: "userAssignedIdentities", type: { - name: "ByteArray" + name: "Dictionary", + value: { + type: { name: "Composite", className: "UserAssignedIdentity" } + } } - }, - issuer: { - serializedName: "issuer", + } + } + } +}; + +export const UserAssignedIdentity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UserAssignedIdentity", + modelProperties: { + principalId: { + serializedName: "principalId", readOnly: true, type: { - name: "String" + name: "Uuid" } }, - issueDate: { - serializedName: "issueDate", + clientId: { + serializedName: "clientId", readOnly: true, type: { - name: "DateTime" + name: "Uuid" } - }, - expirationDate: { - serializedName: "expirationDate", - readOnly: true, + } + } + } +}; + +export const Configuration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Configuration", + modelProperties: { + secrets: { + serializedName: "secrets", type: { - name: "DateTime" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Secret" + } + } } }, - thumbprint: { - serializedName: "thumbprint", - readOnly: true, + activeRevisionsMode: { + serializedName: "activeRevisionsMode", type: { name: "String" } }, - valid: { - serializedName: "valid", - readOnly: true, + ingress: { + serializedName: "ingress", type: { - name: "Boolean" + name: "Composite", + className: "Ingress" } }, - publicKeyHash: { - serializedName: "publicKeyHash", - readOnly: true, + registries: { + serializedName: "registries", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RegistryCredentials" + } + } } - } - } - } -}; - -export const CertificatePatch: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CertificatePatch", - modelProperties: { - tags: { - serializedName: "tags", + }, + dapr: { + serializedName: "dapr", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "Composite", + className: "Dapr" } } } } }; -export const AvailableOperations: coreClient.CompositeMapper = { +export const Secret: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AvailableOperations", + className: "Secret", modelProperties: { - value: { - serializedName: "value", + name: { + serializedName: "name", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OperationDetail" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", + value: { + serializedName: "value", type: { name: "String" } @@ -1541,65 +1379,97 @@ export const AvailableOperations: coreClient.CompositeMapper = { } }; -export const OperationDetail: coreClient.CompositeMapper = { +export const Ingress: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationDetail", + className: "Ingress", modelProperties: { - name: { - serializedName: "name", + fqdn: { + serializedName: "fqdn", + readOnly: true, type: { name: "String" } }, - isDataAction: { - serializedName: "isDataAction", + external: { + defaultValue: false, + serializedName: "external", type: { name: "Boolean" } }, - display: { - serializedName: "display", + targetPort: { + serializedName: "targetPort", type: { - name: "Composite", - className: "OperationDisplay" + name: "Number" } }, - origin: { - serializedName: "origin", + transport: { + serializedName: "transport", type: { name: "String" } + }, + traffic: { + serializedName: "traffic", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TrafficWeight" + } + } + } + }, + customDomains: { + serializedName: "customDomains", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CustomDomain" + } + } + } + }, + allowInsecure: { + serializedName: "allowInsecure", + type: { + name: "Boolean" + } } } } }; -export const OperationDisplay: coreClient.CompositeMapper = { +export const TrafficWeight: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationDisplay", + className: "TrafficWeight", modelProperties: { - provider: { - serializedName: "provider", + revisionName: { + serializedName: "revisionName", type: { name: "String" } }, - resource: { - serializedName: "resource", + weight: { + serializedName: "weight", type: { - name: "String" + name: "Number" } }, - operation: { - serializedName: "operation", + latestRevision: { + defaultValue: false, + serializedName: "latestRevision", type: { - name: "String" + name: "Boolean" } }, - description: { - serializedName: "description", + label: { + serializedName: "label", type: { name: "String" } @@ -1608,27 +1478,27 @@ export const OperationDisplay: coreClient.CompositeMapper = { } }; -export const SourceControlCollection: coreClient.CompositeMapper = { +export const CustomDomain: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SourceControlCollection", + className: "CustomDomain", modelProperties: { - value: { - serializedName: "value", + name: { + serializedName: "name", required: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SourceControl" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + bindingType: { + serializedName: "bindingType", + type: { + name: "String" + } + }, + certificateId: { + serializedName: "certificateId", + required: true, type: { name: "String" } @@ -1637,152 +1507,202 @@ export const SourceControlCollection: coreClient.CompositeMapper = { } }; -export const GithubActionConfiguration: coreClient.CompositeMapper = { +export const RegistryCredentials: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GithubActionConfiguration", + className: "RegistryCredentials", modelProperties: { - registryInfo: { - serializedName: "registryInfo", + server: { + serializedName: "server", type: { - name: "Composite", - className: "RegistryInfo" + name: "String" } }, - azureCredentials: { - serializedName: "azureCredentials", + username: { + serializedName: "username", type: { - name: "Composite", - className: "AzureCredentials" + name: "String" } }, - dockerfilePath: { - serializedName: "dockerfilePath", + passwordSecretRef: { + serializedName: "passwordSecretRef", type: { name: "String" } - }, - publishType: { - serializedName: "publishType", + } + } + } +}; + +export const Dapr: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Dapr", + modelProperties: { + enabled: { + serializedName: "enabled", type: { - name: "String" + name: "Boolean" } }, - os: { - serializedName: "os", + appId: { + serializedName: "appId", type: { name: "String" } }, - runtimeStack: { - serializedName: "runtimeStack", + appProtocol: { + serializedName: "appProtocol", type: { name: "String" } }, - runtimeVersion: { - serializedName: "runtimeVersion", + appPort: { + serializedName: "appPort", type: { - name: "String" + name: "Number" } } } } }; -export const RegistryInfo: coreClient.CompositeMapper = { +export const Template: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RegistryInfo", + className: "Template", modelProperties: { - registryUrl: { - serializedName: "registryUrl", + revisionSuffix: { + serializedName: "revisionSuffix", type: { name: "String" } }, - registryUserName: { - serializedName: "registryUserName", + containers: { + serializedName: "containers", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Container" + } + } } }, - registryPassword: { - serializedName: "registryPassword", + scale: { + serializedName: "scale", type: { - name: "String" + name: "Composite", + className: "Scale" + } + }, + volumes: { + serializedName: "volumes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Volume" + } + } } } } } }; -export const AzureCredentials: coreClient.CompositeMapper = { +export const Container: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AzureCredentials", + className: "Container", modelProperties: { - clientId: { - serializedName: "clientId", + image: { + serializedName: "image", type: { name: "String" } }, - clientSecret: { - serializedName: "clientSecret", + name: { + serializedName: "name", type: { name: "String" } }, - tenantId: { - serializedName: "tenantId", + command: { + serializedName: "command", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - subscriptionId: { - serializedName: "subscriptionId", + args: { + serializedName: "args", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } - } - } - } -}; - -export const DaprComponentsCollection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DaprComponentsCollection", - modelProperties: { - value: { - serializedName: "value", - required: true, + }, + env: { + serializedName: "env", type: { name: "Sequence", element: { type: { name: "Composite", - className: "DaprComponent" + className: "EnvironmentVar" } } } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + resources: { + serializedName: "resources", type: { - name: "String" + name: "Composite", + className: "ContainerResources" + } + }, + probes: { + serializedName: "probes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContainerAppProbe" + } + } + } + }, + volumeMounts: { + serializedName: "volumeMounts", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VolumeMount" + } + } } } } } }; -export const DaprMetadata: coreClient.CompositeMapper = { +export const EnvironmentVar: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DaprMetadata", + className: "EnvironmentVar", modelProperties: { name: { serializedName: "name", @@ -1806,48 +1726,26 @@ export const DaprMetadata: coreClient.CompositeMapper = { } }; -export const AuthConfigCollection: coreClient.CompositeMapper = { +export const ContainerResources: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AuthConfigCollection", + className: "ContainerResources", modelProperties: { - value: { - serializedName: "value", - required: true, + cpu: { + serializedName: "cpu", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AuthConfig" - } - } + name: "Number" } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + memory: { + serializedName: "memory", type: { name: "String" } - } - } - } -}; - -export const AuthPlatform: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AuthPlatform", - modelProperties: { - enabled: { - serializedName: "enabled", - type: { - name: "Boolean" - } }, - runtimeVersion: { - serializedName: "runtimeVersion", + ephemeralStorage: { + serializedName: "ephemeralStorage", + readOnly: true, type: { name: "String" } @@ -1856,193 +1754,175 @@ export const AuthPlatform: coreClient.CompositeMapper = { } }; -export const GlobalValidation: coreClient.CompositeMapper = { +export const ContainerAppProbe: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GlobalValidation", + className: "ContainerAppProbe", modelProperties: { - unauthenticatedClientAction: { - serializedName: "unauthenticatedClientAction", - type: { - name: "Enum", - allowedValues: [ - "RedirectToLoginPage", - "AllowAnonymous", - "Return401", - "Return403" - ] - } - }, - redirectToProvider: { - serializedName: "redirectToProvider", + failureThreshold: { + serializedName: "failureThreshold", type: { - name: "String" + name: "Number" } }, - excludedPaths: { - serializedName: "excludedPaths", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const IdentityProviders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IdentityProviders", - modelProperties: { - azureActiveDirectory: { - serializedName: "azureActiveDirectory", + httpGet: { + serializedName: "httpGet", type: { name: "Composite", - className: "AzureActiveDirectory" + className: "ContainerAppProbeHttpGet" } }, - facebook: { - serializedName: "facebook", + initialDelaySeconds: { + serializedName: "initialDelaySeconds", type: { - name: "Composite", - className: "Facebook" + name: "Number" } }, - gitHub: { - serializedName: "gitHub", + periodSeconds: { + serializedName: "periodSeconds", type: { - name: "Composite", - className: "GitHub" + name: "Number" } }, - google: { - serializedName: "google", + successThreshold: { + serializedName: "successThreshold", type: { - name: "Composite", - className: "Google" + name: "Number" } }, - twitter: { - serializedName: "twitter", + tcpSocket: { + serializedName: "tcpSocket", type: { name: "Composite", - className: "Twitter" + className: "ContainerAppProbeTcpSocket" } }, - apple: { - serializedName: "apple", + terminationGracePeriodSeconds: { + serializedName: "terminationGracePeriodSeconds", type: { - name: "Composite", - className: "Apple" + name: "Number" } }, - azureStaticWebApps: { - serializedName: "azureStaticWebApps", + timeoutSeconds: { + serializedName: "timeoutSeconds", type: { - name: "Composite", - className: "AzureStaticWebApps" + name: "Number" } }, - customOpenIdConnectProviders: { - serializedName: "customOpenIdConnectProviders", + type: { + serializedName: "type", type: { - name: "Dictionary", - value: { - type: { - name: "Composite", - className: "CustomOpenIdConnectProvider" - } - } + name: "String" } } } } }; -export const AzureActiveDirectory: coreClient.CompositeMapper = { +export const ContainerAppProbeHttpGet: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AzureActiveDirectory", + className: "ContainerAppProbeHttpGet", modelProperties: { - enabled: { - serializedName: "enabled", + host: { + serializedName: "host", type: { - name: "Boolean" + name: "String" } }, - registration: { - serializedName: "registration", + httpHeaders: { + serializedName: "httpHeaders", type: { - name: "Composite", - className: "AzureActiveDirectoryRegistration" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContainerAppProbeHttpGetHttpHeadersItem" + } + } } }, - login: { - serializedName: "login", + path: { + serializedName: "path", type: { - name: "Composite", - className: "AzureActiveDirectoryLogin" + name: "String" } }, - validation: { - serializedName: "validation", + port: { + serializedName: "port", + required: true, type: { - name: "Composite", - className: "AzureActiveDirectoryValidation" + name: "Number" } }, - isAutoProvisioned: { - serializedName: "isAutoProvisioned", + scheme: { + serializedName: "scheme", type: { - name: "Boolean" + name: "String" } } } } }; -export const AzureActiveDirectoryRegistration: coreClient.CompositeMapper = { +export const ContainerAppProbeHttpGetHttpHeadersItem: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AzureActiveDirectoryRegistration", + className: "ContainerAppProbeHttpGetHttpHeadersItem", modelProperties: { - openIdIssuer: { - serializedName: "openIdIssuer", + name: { + serializedName: "name", + required: true, type: { name: "String" } }, - clientId: { - serializedName: "clientId", + value: { + serializedName: "value", + required: true, type: { name: "String" } - }, - clientSecretSettingName: { - serializedName: "clientSecretSettingName", + } + } + } +}; + +export const ContainerAppProbeTcpSocket: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerAppProbeTcpSocket", + modelProperties: { + host: { + serializedName: "host", type: { name: "String" } }, - clientSecretCertificateThumbprint: { - serializedName: "clientSecretCertificateThumbprint", + port: { + serializedName: "port", + required: true, type: { - name: "String" + name: "Number" } - }, - clientSecretCertificateSubjectAlternativeName: { - serializedName: "clientSecretCertificateSubjectAlternativeName", + } + } + } +}; + +export const VolumeMount: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VolumeMount", + modelProperties: { + volumeName: { + serializedName: "volumeName", type: { name: "String" } }, - clientSecretCertificateIssuer: { - serializedName: "clientSecretCertificateIssuer", + mountPath: { + serializedName: "mountPath", type: { name: "String" } @@ -2051,89 +1931,100 @@ export const AzureActiveDirectoryRegistration: coreClient.CompositeMapper = { } }; -export const AzureActiveDirectoryLogin: coreClient.CompositeMapper = { +export const Scale: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AzureActiveDirectoryLogin", + className: "Scale", modelProperties: { - loginParameters: { - serializedName: "loginParameters", + minReplicas: { + serializedName: "minReplicas", + type: { + name: "Number" + } + }, + maxReplicas: { + serializedName: "maxReplicas", + type: { + name: "Number" + } + }, + rules: { + serializedName: "rules", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "ScaleRule" } } } - }, - disableWWWAuthenticate: { - serializedName: "disableWWWAuthenticate", - type: { - name: "Boolean" - } } } } }; -export const AzureActiveDirectoryValidation: coreClient.CompositeMapper = { +export const ScaleRule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AzureActiveDirectoryValidation", + className: "ScaleRule", modelProperties: { - jwtClaimChecks: { - serializedName: "jwtClaimChecks", + name: { + serializedName: "name", + type: { + name: "String" + } + }, + azureQueue: { + serializedName: "azureQueue", type: { name: "Composite", - className: "JwtClaimChecks" + className: "QueueScaleRule" } }, - allowedAudiences: { - serializedName: "allowedAudiences", + custom: { + serializedName: "custom", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "CustomScaleRule" } }, - defaultAuthorizationPolicy: { - serializedName: "defaultAuthorizationPolicy", + http: { + serializedName: "http", type: { name: "Composite", - className: "DefaultAuthorizationPolicy" + className: "HttpScaleRule" } } } } }; -export const JwtClaimChecks: coreClient.CompositeMapper = { +export const QueueScaleRule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JwtClaimChecks", + className: "QueueScaleRule", modelProperties: { - allowedGroups: { - serializedName: "allowedGroups", + queueName: { + serializedName: "queueName", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } }, - allowedClientApplications: { - serializedName: "allowedClientApplications", + queueLength: { + serializedName: "queueLength", + type: { + name: "Number" + } + }, + auth: { + serializedName: "auth", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "ScaleRuleAuth" } } } @@ -2142,56 +2033,53 @@ export const JwtClaimChecks: coreClient.CompositeMapper = { } }; -export const DefaultAuthorizationPolicy: coreClient.CompositeMapper = { +export const ScaleRuleAuth: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DefaultAuthorizationPolicy", + className: "ScaleRuleAuth", modelProperties: { - allowedPrincipals: { - serializedName: "allowedPrincipals", + secretRef: { + serializedName: "secretRef", type: { - name: "Composite", - className: "AllowedPrincipals" + name: "String" } }, - allowedApplications: { - serializedName: "allowedApplications", + triggerParameter: { + serializedName: "triggerParameter", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } } } } }; -export const AllowedPrincipals: coreClient.CompositeMapper = { +export const CustomScaleRule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AllowedPrincipals", + className: "CustomScaleRule", modelProperties: { - groups: { - serializedName: "groups", + type: { + serializedName: "type", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } }, - identities: { - serializedName: "identities", + metadata: { + serializedName: "metadata", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + auth: { + serializedName: "auth", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "ScaleRuleAuth" } } } @@ -2200,54 +2088,53 @@ export const AllowedPrincipals: coreClient.CompositeMapper = { } }; -export const Facebook: coreClient.CompositeMapper = { +export const HttpScaleRule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Facebook", + className: "HttpScaleRule", modelProperties: { - enabled: { - serializedName: "enabled", - type: { - name: "Boolean" - } - }, - registration: { - serializedName: "registration", - type: { - name: "Composite", - className: "AppRegistration" - } - }, - graphApiVersion: { - serializedName: "graphApiVersion", + metadata: { + serializedName: "metadata", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } } }, - login: { - serializedName: "login", + auth: { + serializedName: "auth", type: { - name: "Composite", - className: "LoginScopes" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScaleRuleAuth" + } + } } } } } }; -export const AppRegistration: coreClient.CompositeMapper = { +export const Volume: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AppRegistration", + className: "Volume", modelProperties: { - appId: { - serializedName: "appId", + name: { + serializedName: "name", type: { name: "String" } }, - appSecretSettingName: { - serializedName: "appSecretSettingName", + storageType: { + serializedName: "storageType", + type: { + name: "String" + } + }, + storageName: { + serializedName: "storageName", type: { name: "String" } @@ -2256,18 +2143,20 @@ export const AppRegistration: coreClient.CompositeMapper = { } }; -export const LoginScopes: coreClient.CompositeMapper = { +export const SecretsCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LoginScopes", + className: "SecretsCollection", modelProperties: { - scopes: { - serializedName: "scopes", + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "ContainerAppSecret" } } } @@ -2276,48 +2165,50 @@ export const LoginScopes: coreClient.CompositeMapper = { } }; -export const GitHub: coreClient.CompositeMapper = { +export const ContainerAppSecret: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GitHub", + className: "ContainerAppSecret", modelProperties: { - enabled: { - serializedName: "enabled", - type: { - name: "Boolean" - } - }, - registration: { - serializedName: "registration", + name: { + serializedName: "name", + readOnly: true, type: { - name: "Composite", - className: "ClientRegistration" + name: "String" } }, - login: { - serializedName: "login", + value: { + serializedName: "value", + readOnly: true, type: { - name: "Composite", - className: "LoginScopes" + name: "String" } } } } }; -export const ClientRegistration: coreClient.CompositeMapper = { +export const RevisionCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ClientRegistration", + className: "RevisionCollection", modelProperties: { - clientId: { - serializedName: "clientId", + value: { + serializedName: "value", + required: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Revision" + } + } } }, - clientSecretSettingName: { - serializedName: "clientSecretSettingName", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String" } @@ -2326,54 +2217,59 @@ export const ClientRegistration: coreClient.CompositeMapper = { } }; -export const Google: coreClient.CompositeMapper = { +export const ReplicaContainer: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Google", + className: "ReplicaContainer", modelProperties: { - enabled: { - serializedName: "enabled", + name: { + serializedName: "name", type: { - name: "Boolean" + name: "String" } }, - registration: { - serializedName: "registration", + containerId: { + serializedName: "containerId", type: { - name: "Composite", - className: "ClientRegistration" + name: "String" } }, - login: { - serializedName: "login", + ready: { + serializedName: "ready", type: { - name: "Composite", - className: "LoginScopes" + name: "Boolean" } }, - validation: { - serializedName: "validation", + started: { + serializedName: "started", type: { - name: "Composite", - className: "AllowedAudiencesValidation" + name: "Boolean" + } + }, + restartCount: { + serializedName: "restartCount", + type: { + name: "Number" } } } } }; -export const AllowedAudiencesValidation: coreClient.CompositeMapper = { +export const ReplicaCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AllowedAudiencesValidation", + className: "ReplicaCollection", modelProperties: { - allowedAudiences: { - serializedName: "allowedAudiences", + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "Replica" } } } @@ -2382,128 +2278,103 @@ export const AllowedAudiencesValidation: coreClient.CompositeMapper = { } }; -export const Twitter: coreClient.CompositeMapper = { +export const DaprComponentsCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Twitter", + className: "DaprComponentsCollection", modelProperties: { - enabled: { - serializedName: "enabled", + value: { + serializedName: "value", + required: true, type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DaprComponent" + } + } } }, - registration: { - serializedName: "registration", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { - name: "Composite", - className: "TwitterRegistration" + name: "String" } } } } }; -export const TwitterRegistration: coreClient.CompositeMapper = { +export const DaprMetadata: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TwitterRegistration", + className: "DaprMetadata", modelProperties: { - consumerKey: { - serializedName: "consumerKey", + name: { + serializedName: "name", type: { name: "String" } }, - consumerSecretSettingName: { - serializedName: "consumerSecretSettingName", + value: { + serializedName: "value", type: { name: "String" } - } - } - } -}; - -export const Apple: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Apple", - modelProperties: { - enabled: { - serializedName: "enabled", - type: { - name: "Boolean" - } - }, - registration: { - serializedName: "registration", - type: { - name: "Composite", - className: "AppleRegistration" - } }, - login: { - serializedName: "login", + secretRef: { + serializedName: "secretRef", type: { - name: "Composite", - className: "LoginScopes" + name: "String" } } } } }; -export const AppleRegistration: coreClient.CompositeMapper = { +export const DaprSecretsCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AppleRegistration", + className: "DaprSecretsCollection", modelProperties: { - clientId: { - serializedName: "clientId", - type: { - name: "String" - } - }, - clientSecretSettingName: { - serializedName: "clientSecretSettingName", + value: { + serializedName: "value", + required: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Secret" + } + } } } } } }; -export const AzureStaticWebApps: coreClient.CompositeMapper = { +export const AvailableOperations: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AzureStaticWebApps", + className: "AvailableOperations", modelProperties: { - enabled: { - serializedName: "enabled", + value: { + serializedName: "value", type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OperationDetail" + } + } } }, - registration: { - serializedName: "registration", - type: { - name: "Composite", - className: "AzureStaticWebAppsRegistration" - } - } - } - } -}; - -export const AzureStaticWebAppsRegistration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureStaticWebAppsRegistration", - modelProperties: { - clientId: { - serializedName: "clientId", + nextLink: { + serializedName: "nextLink", type: { name: "String" } @@ -2512,79 +2383,94 @@ export const AzureStaticWebAppsRegistration: coreClient.CompositeMapper = { } }; -export const CustomOpenIdConnectProvider: coreClient.CompositeMapper = { +export const OperationDetail: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CustomOpenIdConnectProvider", + className: "OperationDetail", modelProperties: { - enabled: { - serializedName: "enabled", + name: { + serializedName: "name", + type: { + name: "String" + } + }, + isDataAction: { + serializedName: "isDataAction", type: { name: "Boolean" } }, - registration: { - serializedName: "registration", + display: { + serializedName: "display", type: { name: "Composite", - className: "OpenIdConnectRegistration" + className: "OperationDisplay" } }, - login: { - serializedName: "login", + origin: { + serializedName: "origin", type: { - name: "Composite", - className: "OpenIdConnectLogin" + name: "String" } } } } }; -export const OpenIdConnectRegistration: coreClient.CompositeMapper = { +export const OperationDisplay: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OpenIdConnectRegistration", + className: "OperationDisplay", modelProperties: { - clientId: { - serializedName: "clientId", + provider: { + serializedName: "provider", type: { name: "String" } }, - clientCredential: { - serializedName: "clientCredential", + resource: { + serializedName: "resource", type: { - name: "Composite", - className: "OpenIdConnectClientCredential" + name: "String" } }, - openIdConnectConfiguration: { - serializedName: "openIdConnectConfiguration", + operation: { + serializedName: "operation", type: { - name: "Composite", - className: "OpenIdConnectConfig" + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" } } } } }; -export const OpenIdConnectClientCredential: coreClient.CompositeMapper = { +export const ManagedEnvironmentsCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OpenIdConnectClientCredential", + className: "ManagedEnvironmentsCollection", modelProperties: { - method: { - defaultValue: "ClientSecretPost", - isConstant: true, - serializedName: "method", + value: { + serializedName: "value", + required: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedEnvironment" + } + } } }, - clientSecretSettingName: { - serializedName: "clientSecretSettingName", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String" } @@ -2593,37 +2479,43 @@ export const OpenIdConnectClientCredential: coreClient.CompositeMapper = { } }; -export const OpenIdConnectConfig: coreClient.CompositeMapper = { +export const VnetConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OpenIdConnectConfig", + className: "VnetConfiguration", modelProperties: { - authorizationEndpoint: { - serializedName: "authorizationEndpoint", + internal: { + serializedName: "internal", + type: { + name: "Boolean" + } + }, + infrastructureSubnetId: { + serializedName: "infrastructureSubnetId", type: { name: "String" } }, - tokenEndpoint: { - serializedName: "tokenEndpoint", + runtimeSubnetId: { + serializedName: "runtimeSubnetId", type: { name: "String" } }, - issuer: { - serializedName: "issuer", + dockerBridgeCidr: { + serializedName: "dockerBridgeCidr", type: { name: "String" } }, - certificationUri: { - serializedName: "certificationUri", + platformReservedCidr: { + serializedName: "platformReservedCidr", type: { name: "String" } }, - wellKnownOpenIdConfiguration: { - serializedName: "wellKnownOpenIdConfiguration", + platformReservedDnsIP: { + serializedName: "platformReservedDnsIP", type: { name: "String" } @@ -2632,129 +2524,147 @@ export const OpenIdConnectConfig: coreClient.CompositeMapper = { } }; -export const OpenIdConnectLogin: coreClient.CompositeMapper = { +export const AppLogsConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OpenIdConnectLogin", + className: "AppLogsConfiguration", modelProperties: { - nameClaimType: { - serializedName: "nameClaimType", + destination: { + serializedName: "destination", type: { name: "String" } }, - scopes: { - serializedName: "scopes", + logAnalyticsConfiguration: { + serializedName: "logAnalyticsConfiguration", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "LogAnalyticsConfiguration" } } } } }; -export const Login: coreClient.CompositeMapper = { +export const LogAnalyticsConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Login", + className: "LogAnalyticsConfiguration", modelProperties: { - routes: { - serializedName: "routes", + customerId: { + serializedName: "customerId", type: { - name: "Composite", - className: "LoginRoutes" + name: "String" } }, - preserveUrlFragmentsForLogins: { - serializedName: "preserveUrlFragmentsForLogins", + sharedKey: { + serializedName: "sharedKey", type: { - name: "Boolean" + name: "String" } - }, - allowedExternalRedirectUrls: { - serializedName: "allowedExternalRedirectUrls", + } + } + } +}; + +export const CertificateCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CertificateCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "Certificate" } } } }, - cookieExpiration: { - serializedName: "cookieExpiration", - type: { - name: "Composite", - className: "CookieExpiration" - } - }, - nonce: { - serializedName: "nonce", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { - name: "Composite", - className: "Nonce" + name: "String" } } } } }; -export const LoginRoutes: coreClient.CompositeMapper = { +export const CertificateProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LoginRoutes", + className: "CertificateProperties", modelProperties: { - logoutEndpoint: { - serializedName: "logoutEndpoint", + provisioningState: { + serializedName: "provisioningState", + readOnly: true, type: { name: "String" } - } - } - } -}; - -export const CookieExpiration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CookieExpiration", - modelProperties: { - convention: { - serializedName: "convention", + }, + password: { + serializedName: "password", type: { - name: "Enum", - allowedValues: ["FixedTime", "IdentityProviderDerived"] + name: "String" } }, - timeToExpiration: { - serializedName: "timeToExpiration", + subjectName: { + serializedName: "subjectName", + readOnly: true, type: { name: "String" } - } - } - } -}; - -export const Nonce: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Nonce", - modelProperties: { - validateNonce: { - serializedName: "validateNonce", + }, + value: { + serializedName: "value", + type: { + name: "ByteArray" + } + }, + issuer: { + serializedName: "issuer", + readOnly: true, + type: { + name: "String" + } + }, + issueDate: { + serializedName: "issueDate", + readOnly: true, + type: { + name: "DateTime" + } + }, + expirationDate: { + serializedName: "expirationDate", + readOnly: true, + type: { + name: "DateTime" + } + }, + thumbprint: { + serializedName: "thumbprint", + readOnly: true, + type: { + name: "String" + } + }, + valid: { + serializedName: "valid", + readOnly: true, type: { name: "Boolean" } }, - nonceExpirationInterval: { - serializedName: "nonceExpirationInterval", + publicKeyHash: { + serializedName: "publicKeyHash", + readOnly: true, type: { name: "String" } @@ -2763,42 +2673,35 @@ export const Nonce: coreClient.CompositeMapper = { } }; -export const HttpSettings: coreClient.CompositeMapper = { +export const CertificatePatch: coreClient.CompositeMapper = { type: { name: "Composite", - className: "HttpSettings", + className: "CertificatePatch", modelProperties: { - requireHttps: { - serializedName: "requireHttps", - type: { - name: "Boolean" - } - }, - routes: { - serializedName: "routes", - type: { - name: "Composite", - className: "HttpSettingsRoutes" - } - }, - forwardProxy: { - serializedName: "forwardProxy", + tags: { + serializedName: "tags", type: { - name: "Composite", - className: "ForwardProxy" + name: "Dictionary", + value: { type: { name: "String" } } } } } } }; -export const HttpSettingsRoutes: coreClient.CompositeMapper = { +export const CheckNameAvailabilityRequest: coreClient.CompositeMapper = { type: { name: "Composite", - className: "HttpSettingsRoutes", + className: "CheckNameAvailabilityRequest", modelProperties: { - apiPrefix: { - serializedName: "apiPrefix", + name: { + serializedName: "name", + type: { + name: "String" + } + }, + type: { + serializedName: "type", type: { name: "String" } @@ -2807,26 +2710,25 @@ export const HttpSettingsRoutes: coreClient.CompositeMapper = { } }; -export const ForwardProxy: coreClient.CompositeMapper = { +export const CheckNameAvailabilityResponse: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ForwardProxy", + className: "CheckNameAvailabilityResponse", modelProperties: { - convention: { - serializedName: "convention", + nameAvailable: { + serializedName: "nameAvailable", type: { - name: "Enum", - allowedValues: ["NoProxy", "Standard", "Custom"] + name: "Boolean" } }, - customHostHeaderName: { - serializedName: "customHostHeaderName", + reason: { + serializedName: "reason", type: { name: "String" } }, - customProtoHeaderName: { - serializedName: "customProtoHeaderName", + message: { + serializedName: "message", type: { name: "String" } @@ -2906,22 +2808,27 @@ export const AzureFileProperties: coreClient.CompositeMapper = { } }; -export const TrackedResource: coreClient.CompositeMapper = { +export const SourceControlCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TrackedResource", + className: "SourceControlCollection", modelProperties: { - ...Resource.type.modelProperties, - tags: { - serializedName: "tags", + value: { + serializedName: "value", + required: true, type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SourceControl" + } + } } }, - location: { - serializedName: "location", - required: true, + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String" } @@ -2930,162 +2837,198 @@ export const TrackedResource: coreClient.CompositeMapper = { } }; -export const ProxyResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProxyResource", - modelProperties: { - ...Resource.type.modelProperties - } - } -}; - -export const ContainerApp: coreClient.CompositeMapper = { +export const GithubActionConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerApp", + className: "GithubActionConfiguration", modelProperties: { - ...TrackedResource.type.modelProperties, - identity: { - serializedName: "identity", + registryInfo: { + serializedName: "registryInfo", type: { name: "Composite", - className: "ManagedServiceIdentity" + className: "RegistryInfo" } }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, + azureCredentials: { + serializedName: "azureCredentials", + type: { + name: "Composite", + className: "AzureCredentials" + } + }, + contextPath: { + serializedName: "contextPath", type: { name: "String" } }, - managedEnvironmentId: { - serializedName: "properties.managedEnvironmentId", + image: { + serializedName: "image", type: { name: "String" } }, - latestRevisionName: { - serializedName: "properties.latestRevisionName", - readOnly: true, + publishType: { + serializedName: "publishType", type: { name: "String" } }, - latestRevisionFqdn: { - serializedName: "properties.latestRevisionFqdn", - readOnly: true, + os: { + serializedName: "os", type: { name: "String" } }, - customDomainVerificationId: { - serializedName: "properties.customDomainVerificationId", - readOnly: true, + runtimeStack: { + serializedName: "runtimeStack", type: { name: "String" } }, - configuration: { - serializedName: "properties.configuration", + runtimeVersion: { + serializedName: "runtimeVersion", type: { - name: "Composite", - className: "Configuration" + name: "String" + } + } + } + } +}; + +export const RegistryInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RegistryInfo", + modelProperties: { + registryUrl: { + serializedName: "registryUrl", + type: { + name: "String" } }, - template: { - serializedName: "properties.template", + registryUserName: { + serializedName: "registryUserName", type: { - name: "Composite", - className: "Template" + name: "String" } }, - outboundIPAddresses: { - serializedName: "properties.outboundIPAddresses", - readOnly: true, + registryPassword: { + serializedName: "registryPassword", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } } } } }; -export const ManagedEnvironment: coreClient.CompositeMapper = { +export const AzureCredentials: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedEnvironment", + className: "AzureCredentials", modelProperties: { - ...TrackedResource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, + clientId: { + serializedName: "clientId", type: { name: "String" } }, - daprAIInstrumentationKey: { - serializedName: "properties.daprAIInstrumentationKey", + clientSecret: { + serializedName: "clientSecret", type: { name: "String" } }, - vnetConfiguration: { - serializedName: "properties.vnetConfiguration", + tenantId: { + serializedName: "tenantId", type: { - name: "Composite", - className: "VnetConfiguration" + name: "String" } }, - deploymentErrors: { - serializedName: "properties.deploymentErrors", - readOnly: true, + subscriptionId: { + serializedName: "subscriptionId", + type: { + name: "String" + } + } + } + } +}; + +export const ProxyResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + +export const TrackedResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + location: { + serializedName: "location", + required: true, type: { name: "String" } + } + } + } +}; + +export const AuthConfig: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AuthConfig", + modelProperties: { + ...ProxyResource.type.modelProperties, + platform: { + serializedName: "properties.platform", + type: { + name: "Composite", + className: "AuthPlatform" + } }, - defaultDomain: { - serializedName: "properties.defaultDomain", - readOnly: true, + globalValidation: { + serializedName: "properties.globalValidation", type: { - name: "String" + name: "Composite", + className: "GlobalValidation" } }, - staticIp: { - serializedName: "properties.staticIp", - readOnly: true, + identityProviders: { + serializedName: "properties.identityProviders", type: { - name: "String" + name: "Composite", + className: "IdentityProviders" } }, - appLogsConfiguration: { - serializedName: "properties.appLogsConfiguration", + login: { + serializedName: "properties.login", type: { name: "Composite", - className: "AppLogsConfiguration" + className: "Login" } - } - } - } -}; - -export const Certificate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Certificate", - modelProperties: { - ...TrackedResource.type.modelProperties, - properties: { - serializedName: "properties", + }, + httpSettings: { + serializedName: "properties.httpSettings", type: { name: "Composite", - className: "CertificateProperties" + className: "HttpSettings" } } } @@ -3302,42 +3245,6 @@ export const Replica: coreClient.CompositeMapper = { } }; -export const SourceControl: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SourceControl", - modelProperties: { - ...ProxyResource.type.modelProperties, - operationState: { - serializedName: "properties.operationState", - readOnly: true, - type: { - name: "String" - } - }, - repoUrl: { - serializedName: "properties.repoUrl", - type: { - name: "String" - } - }, - branch: { - serializedName: "properties.branch", - type: { - name: "String" - } - }, - githubActionConfiguration: { - serializedName: "properties.githubActionConfiguration", - type: { - name: "Composite", - className: "GithubActionConfiguration" - } - } - } - } -}; - export const DaprComponent: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3407,62 +3314,205 @@ export const DaprComponent: coreClient.CompositeMapper = { } }; -export const AuthConfig: coreClient.CompositeMapper = { +export const ManagedEnvironmentStorage: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AuthConfig", + className: "ManagedEnvironmentStorage", modelProperties: { ...ProxyResource.type.modelProperties, - platform: { - serializedName: "properties.platform", + properties: { + serializedName: "properties", type: { name: "Composite", - className: "AuthPlatform" + className: "ManagedEnvironmentStorageProperties" + } + } + } + } +}; + +export const SourceControl: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SourceControl", + modelProperties: { + ...ProxyResource.type.modelProperties, + operationState: { + serializedName: "properties.operationState", + readOnly: true, + type: { + name: "String" } }, - globalValidation: { - serializedName: "properties.globalValidation", + repoUrl: { + serializedName: "properties.repoUrl", + type: { + name: "String" + } + }, + branch: { + serializedName: "properties.branch", + type: { + name: "String" + } + }, + githubActionConfiguration: { + serializedName: "properties.githubActionConfiguration", type: { name: "Composite", - className: "GlobalValidation" + className: "GithubActionConfiguration" + } + } + } + } +}; + +export const ContainerApp: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerApp", + modelProperties: { + ...TrackedResource.type.modelProperties, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ManagedServiceIdentity" } }, - identityProviders: { - serializedName: "properties.identityProviders", + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + managedEnvironmentId: { + serializedName: "properties.managedEnvironmentId", + type: { + name: "String" + } + }, + latestRevisionName: { + serializedName: "properties.latestRevisionName", + readOnly: true, + type: { + name: "String" + } + }, + latestRevisionFqdn: { + serializedName: "properties.latestRevisionFqdn", + readOnly: true, + type: { + name: "String" + } + }, + customDomainVerificationId: { + serializedName: "properties.customDomainVerificationId", + readOnly: true, + type: { + name: "String" + } + }, + configuration: { + serializedName: "properties.configuration", type: { name: "Composite", - className: "IdentityProviders" + className: "Configuration" } }, - login: { - serializedName: "properties.login", + template: { + serializedName: "properties.template", type: { name: "Composite", - className: "Login" + className: "Template" } }, - httpSettings: { - serializedName: "properties.httpSettings", + outboundIPAddresses: { + serializedName: "properties.outboundIPAddresses", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const ManagedEnvironment: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedEnvironment", + modelProperties: { + ...TrackedResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + daprAIInstrumentationKey: { + serializedName: "properties.daprAIInstrumentationKey", + type: { + name: "String" + } + }, + vnetConfiguration: { + serializedName: "properties.vnetConfiguration", type: { name: "Composite", - className: "HttpSettings" + className: "VnetConfiguration" + } + }, + deploymentErrors: { + serializedName: "properties.deploymentErrors", + readOnly: true, + type: { + name: "String" + } + }, + defaultDomain: { + serializedName: "properties.defaultDomain", + readOnly: true, + type: { + name: "String" + } + }, + staticIp: { + serializedName: "properties.staticIp", + readOnly: true, + type: { + name: "String" + } + }, + appLogsConfiguration: { + serializedName: "properties.appLogsConfiguration", + type: { + name: "Composite", + className: "AppLogsConfiguration" } } } } }; -export const ManagedEnvironmentStorage: coreClient.CompositeMapper = { +export const Certificate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedEnvironmentStorage", + className: "Certificate", modelProperties: { - ...ProxyResource.type.modelProperties, + ...TrackedResource.type.modelProperties, properties: { serializedName: "properties", type: { name: "Composite", - className: "ManagedEnvironmentStorageProperties" + className: "CertificateProperties" } } } diff --git a/sdk/app/arm-app/src/models/parameters.ts b/sdk/app/arm-app/src/models/parameters.ts index a6906ce53457..495b58b4bf49 100644 --- a/sdk/app/arm-app/src/models/parameters.ts +++ b/sdk/app/arm-app/src/models/parameters.ts @@ -12,16 +12,15 @@ import { OperationQueryParameter } from "@azure/core-client"; import { + AuthConfig as AuthConfigMapper, ContainerApp as ContainerAppMapper, - ContainerAppPatch as ContainerAppPatchMapper, + DaprComponent as DaprComponentMapper, ManagedEnvironment as ManagedEnvironmentMapper, - ManagedEnvironmentPatch as ManagedEnvironmentPatchMapper, Certificate as CertificateMapper, CertificatePatch as CertificatePatchMapper, - SourceControl as SourceControlMapper, - DaprComponent as DaprComponentMapper, - AuthConfig as AuthConfigMapper, - ManagedEnvironmentStorage as ManagedEnvironmentStorageMapper + CheckNameAvailabilityRequest as CheckNameAvailabilityRequestMapper, + ManagedEnvironmentStorage as ManagedEnvironmentStorageMapper, + SourceControl as SourceControlMapper } from "../models/mappers"; export const accept: OperationParameter = { @@ -62,18 +61,6 @@ export const subscriptionId: OperationURLParameter = { } }; -export const apiVersion: OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - defaultValue: "2022-01-01-preview", - isConstant: true, - serializedName: "api-version", - type: { - name: "String" - } - } -}; - export const resourceGroupName: OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { @@ -89,6 +76,29 @@ export const resourceGroupName: OperationURLParameter = { } }; +export const containerAppName: OperationURLParameter = { + parameterPath: "containerAppName", + mapper: { + serializedName: "containerAppName", + required: true, + type: { + name: "String" + } + } +}; + +export const apiVersion: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2022-03-01", + isConstant: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; + export const name: OperationURLParameter = { parameterPath: "name", mapper: { @@ -112,25 +122,26 @@ export const contentType: OperationParameter = { } }; -export const containerAppEnvelope: OperationParameter = { - parameterPath: "containerAppEnvelope", - mapper: ContainerAppMapper -}; - -export const containerAppEnvelope1: OperationParameter = { - parameterPath: "containerAppEnvelope", - mapper: ContainerAppPatchMapper +export const authConfigEnvelope: OperationParameter = { + parameterPath: "authConfigEnvelope", + mapper: AuthConfigMapper }; -export const containerAppName: OperationURLParameter = { - parameterPath: "containerAppName", +export const nextLink: OperationURLParameter = { + parameterPath: "nextLink", mapper: { - serializedName: "containerAppName", + serializedName: "nextLink", required: true, type: { name: "String" } - } + }, + skipEncoding: true +}; + +export const containerAppEnvelope: OperationParameter = { + parameterPath: "containerAppEnvelope", + mapper: ContainerAppMapper }; export const customHostname: OperationQueryParameter = { @@ -143,16 +154,14 @@ export const customHostname: OperationQueryParameter = { } }; -export const nextLink: OperationURLParameter = { - parameterPath: "nextLink", +export const filter: OperationQueryParameter = { + parameterPath: ["options", "filter"], mapper: { - serializedName: "nextLink", - required: true, + serializedName: "$filter", type: { name: "String" } - }, - skipEncoding: true + } }; export const revisionName: OperationURLParameter = { @@ -166,14 +175,25 @@ export const revisionName: OperationURLParameter = { } }; -export const environmentEnvelope: OperationParameter = { - parameterPath: "environmentEnvelope", - mapper: ManagedEnvironmentMapper +export const environmentName: OperationURLParameter = { + parameterPath: "environmentName", + mapper: { + serializedName: "environmentName", + required: true, + type: { + name: "String" + } + } +}; + +export const daprComponentEnvelope: OperationParameter = { + parameterPath: "daprComponentEnvelope", + mapper: DaprComponentMapper }; -export const environmentEnvelope1: OperationParameter = { +export const environmentEnvelope: OperationParameter = { parameterPath: "environmentEnvelope", - mapper: ManagedEnvironmentPatchMapper + mapper: ManagedEnvironmentMapper }; export const managedEnvironmentName: OperationURLParameter = { @@ -197,30 +217,9 @@ export const certificateEnvelope1: OperationParameter = { mapper: CertificatePatchMapper }; -export const sourceControlEnvelope: OperationParameter = { - parameterPath: "sourceControlEnvelope", - mapper: SourceControlMapper -}; - -export const environmentName: OperationURLParameter = { - parameterPath: "environmentName", - mapper: { - serializedName: "environmentName", - required: true, - type: { - name: "String" - } - } -}; - -export const daprComponentEnvelope: OperationParameter = { - parameterPath: "daprComponentEnvelope", - mapper: DaprComponentMapper -}; - -export const authConfigEnvelope: OperationParameter = { - parameterPath: "authConfigEnvelope", - mapper: AuthConfigMapper +export const checkNameAvailabilityRequest: OperationParameter = { + parameterPath: "checkNameAvailabilityRequest", + mapper: CheckNameAvailabilityRequestMapper }; export const envName: OperationURLParameter = { @@ -238,3 +237,8 @@ export const storageEnvelope: OperationParameter = { parameterPath: "storageEnvelope", mapper: ManagedEnvironmentStorageMapper }; + +export const sourceControlEnvelope: OperationParameter = { + parameterPath: "sourceControlEnvelope", + mapper: SourceControlMapper +}; diff --git a/sdk/app/arm-app/src/operations/containerApps.ts b/sdk/app/arm-app/src/operations/containerApps.ts index 5dd86d9c6702..16bf4d2a2546 100644 --- a/sdk/app/arm-app/src/operations/containerApps.ts +++ b/sdk/app/arm-app/src/operations/containerApps.ts @@ -27,9 +27,7 @@ import { ContainerAppsCreateOrUpdateOptionalParams, ContainerAppsCreateOrUpdateResponse, ContainerAppsDeleteOptionalParams, - ContainerAppPatch, ContainerAppsUpdateOptionalParams, - ContainerAppsUpdateResponse, ContainerAppsListCustomHostNameAnalysisOptionalParams, ContainerAppsListCustomHostNameAnalysisResponse, ContainerAppsListSecretsOptionalParams, @@ -253,12 +251,10 @@ export class ContainerAppsImpl implements ContainerApps { { resourceGroupName, name, containerAppEnvelope, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); - await poller.poll(); - return poller; } /** @@ -338,12 +334,10 @@ export class ContainerAppsImpl implements ContainerApps { { resourceGroupName, name, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); - await poller.poll(); - return poller; } /** @@ -362,22 +356,88 @@ export class ContainerAppsImpl implements ContainerApps { } /** - * Patches a Container App. Currently only patching of tags is supported + * Patches a Container App using JSON Merge Patch * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param name Name of the Container App. - * @param containerAppEnvelope Properties of a container app that need to be updated + * @param containerAppEnvelope Properties of a Container App that need to be updated * @param options The options parameters. */ - update( + async beginUpdate( resourceGroupName: string, name: string, - containerAppEnvelope: ContainerAppPatch, + containerAppEnvelope: ContainerApp, options?: ContainerAppsUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( + ): 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, name, containerAppEnvelope, options }, updateOperationSpec ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + } + + /** + * Patches a Container App using JSON Merge Patch + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param name Name of the Container App. + * @param containerAppEnvelope Properties of a Container App that need to be updated + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + name: string, + containerAppEnvelope: ContainerApp, + options?: ContainerAppsUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + name, + containerAppEnvelope, + options + ); + return poller.pollUntilDone(); } /** @@ -572,14 +632,15 @@ const updateOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}", httpMethod: "PATCH", responses: { - 200: { - bodyMapper: Mappers.ContainerApp - }, + 200: {}, + 201: {}, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.DefaultErrorResponse } }, - requestBody: Parameters.containerAppEnvelope1, + requestBody: Parameters.containerAppEnvelope, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/app/arm-app/src/operations/containerAppsAuthConfigs.ts b/sdk/app/arm-app/src/operations/containerAppsAuthConfigs.ts index f93d931aa6b8..8865a3c23e4c 100644 --- a/sdk/app/arm-app/src/operations/containerAppsAuthConfigs.ts +++ b/sdk/app/arm-app/src/operations/containerAppsAuthConfigs.ts @@ -252,8 +252,8 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.name, - Parameters.containerAppName + Parameters.containerAppName, + Parameters.name ], headerParameters: [Parameters.accept], serializer @@ -276,8 +276,8 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.name, - Parameters.containerAppName + Parameters.containerAppName, + Parameters.name ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -299,8 +299,8 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.name, - Parameters.containerAppName + Parameters.containerAppName, + Parameters.name ], headerParameters: [Parameters.accept], serializer diff --git a/sdk/app/arm-app/src/operations/containerAppsRevisionReplicas.ts b/sdk/app/arm-app/src/operations/containerAppsRevisionReplicas.ts index efb4bfc2191a..9f2ab76d1eea 100644 --- a/sdk/app/arm-app/src/operations/containerAppsRevisionReplicas.ts +++ b/sdk/app/arm-app/src/operations/containerAppsRevisionReplicas.ts @@ -91,8 +91,8 @@ const getReplicaOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.name, Parameters.containerAppName, + Parameters.name, Parameters.revisionName ], headerParameters: [Parameters.accept], diff --git a/sdk/app/arm-app/src/operations/containerAppsRevisions.ts b/sdk/app/arm-app/src/operations/containerAppsRevisions.ts index a84edd6c1fea..9747f370d169 100644 --- a/sdk/app/arm-app/src/operations/containerAppsRevisions.ts +++ b/sdk/app/arm-app/src/operations/containerAppsRevisions.ts @@ -236,7 +236,7 @@ const listRevisionsOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion, Parameters.filter], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -263,8 +263,8 @@ const getRevisionOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.name, - Parameters.containerAppName + Parameters.containerAppName, + Parameters.name ], headerParameters: [Parameters.accept], serializer @@ -284,8 +284,8 @@ const activateRevisionOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.name, - Parameters.containerAppName + Parameters.containerAppName, + Parameters.name ], headerParameters: [Parameters.accept], serializer @@ -305,8 +305,8 @@ const deactivateRevisionOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.name, - Parameters.containerAppName + Parameters.containerAppName, + Parameters.name ], headerParameters: [Parameters.accept], serializer @@ -326,8 +326,8 @@ const restartRevisionOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.name, - Parameters.containerAppName + Parameters.containerAppName, + Parameters.name ], headerParameters: [Parameters.accept], serializer @@ -343,7 +343,7 @@ const listRevisionsNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion, Parameters.filter], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/app/arm-app/src/operations/containerAppsSourceControls.ts b/sdk/app/arm-app/src/operations/containerAppsSourceControls.ts index 9861d0ebaa04..e21de0799c15 100644 --- a/sdk/app/arm-app/src/operations/containerAppsSourceControls.ts +++ b/sdk/app/arm-app/src/operations/containerAppsSourceControls.ts @@ -218,12 +218,10 @@ export class ContainerAppsSourceControlsImpl }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); - await poller.poll(); - return poller; } /** @@ -308,12 +306,10 @@ export class ContainerAppsSourceControlsImpl { resourceGroupName, containerAppName, name, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); - await poller.poll(); - return poller; } /** @@ -399,8 +395,8 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.name, - Parameters.containerAppName + Parameters.containerAppName, + Parameters.name ], headerParameters: [Parameters.accept], serializer @@ -432,8 +428,8 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.name, - Parameters.containerAppName + Parameters.containerAppName, + Parameters.name ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -457,8 +453,8 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.name, - Parameters.containerAppName + Parameters.containerAppName, + Parameters.name ], headerParameters: [Parameters.accept], serializer diff --git a/sdk/app/arm-app/src/operations/daprComponents.ts b/sdk/app/arm-app/src/operations/daprComponents.ts index 679e1501ec99..194ea51964db 100644 --- a/sdk/app/arm-app/src/operations/daprComponents.ts +++ b/sdk/app/arm-app/src/operations/daprComponents.ts @@ -22,6 +22,8 @@ import { DaprComponentsCreateOrUpdateOptionalParams, DaprComponentsCreateOrUpdateResponse, DaprComponentsDeleteOptionalParams, + DaprComponentsListSecretsOptionalParams, + DaprComponentsListSecretsResponse, DaprComponentsListNextResponse } from "../models"; @@ -183,6 +185,25 @@ export class DaprComponentsImpl implements DaprComponents { ); } + /** + * List secrets for a dapr component + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Dapr Component. + * @param options The options parameters. + */ + listSecrets( + resourceGroupName: string, + environmentName: string, + name: string, + options?: DaprComponentsListSecretsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, name, options }, + listSecretsOperationSpec + ); + } + /** * ListNext * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -297,6 +318,29 @@ const deleteOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const listSecretsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{name}/listSecrets", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.DaprSecretsCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name, + Parameters.environmentName + ], + headerParameters: [Parameters.accept], + serializer +}; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", diff --git a/sdk/app/arm-app/src/operations/index.ts b/sdk/app/arm-app/src/operations/index.ts index 5dc5208b4575..6b480d5a26e4 100644 --- a/sdk/app/arm-app/src/operations/index.ts +++ b/sdk/app/arm-app/src/operations/index.ts @@ -6,13 +6,14 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +export * from "./containerAppsAuthConfigs"; export * from "./containerApps"; export * from "./containerAppsRevisions"; export * from "./containerAppsRevisionReplicas"; +export * from "./daprComponents"; +export * from "./operations"; export * from "./managedEnvironments"; export * from "./certificates"; -export * from "./operations"; -export * from "./containerAppsSourceControls"; -export * from "./daprComponents"; -export * from "./containerAppsAuthConfigs"; +export * from "./namespaces"; export * from "./managedEnvironmentsStorages"; +export * from "./containerAppsSourceControls"; diff --git a/sdk/app/arm-app/src/operations/managedEnvironments.ts b/sdk/app/arm-app/src/operations/managedEnvironments.ts index e1340d924ede..85d245fdd0e7 100644 --- a/sdk/app/arm-app/src/operations/managedEnvironments.ts +++ b/sdk/app/arm-app/src/operations/managedEnvironments.ts @@ -27,9 +27,7 @@ import { ManagedEnvironmentsCreateOrUpdateOptionalParams, ManagedEnvironmentsCreateOrUpdateResponse, ManagedEnvironmentsDeleteOptionalParams, - ManagedEnvironmentPatch, ManagedEnvironmentsUpdateOptionalParams, - ManagedEnvironmentsUpdateResponse, ManagedEnvironmentsListBySubscriptionNextResponse, ManagedEnvironmentsListByResourceGroupNextResponse } from "../models"; @@ -249,12 +247,10 @@ export class ManagedEnvironmentsImpl implements ManagedEnvironments { { resourceGroupName, name, environmentEnvelope, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); - await poller.poll(); - return poller; } /** @@ -334,12 +330,10 @@ export class ManagedEnvironmentsImpl implements ManagedEnvironments { { resourceGroupName, name, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); - await poller.poll(); - return poller; } /** @@ -358,22 +352,88 @@ export class ManagedEnvironmentsImpl implements ManagedEnvironments { } /** - * Patches a Managed Environment. Only patching of tags is supported currently + * Patches a Managed Environment using JSON Merge Patch * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param name Name of the Environment. * @param environmentEnvelope Configuration details of the Environment. * @param options The options parameters. */ - update( + async beginUpdate( resourceGroupName: string, name: string, - environmentEnvelope: ManagedEnvironmentPatch, + environmentEnvelope: ManagedEnvironment, options?: ManagedEnvironmentsUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( + ): 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, name, environmentEnvelope, options }, updateOperationSpec ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + } + + /** + * Patches a Managed Environment using JSON Merge Patch + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param name Name of the Environment. + * @param environmentEnvelope Configuration details of the Environment. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + name: string, + environmentEnvelope: ManagedEnvironment, + options?: ManagedEnvironmentsUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + name, + environmentEnvelope, + options + ); + return poller.pollUntilDone(); } /** @@ -532,14 +592,15 @@ const updateOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}", httpMethod: "PATCH", responses: { - 200: { - bodyMapper: Mappers.ManagedEnvironment - }, + 200: {}, + 201: {}, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.DefaultErrorResponse } }, - requestBody: Parameters.environmentEnvelope1, + requestBody: Parameters.environmentEnvelope, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/app/arm-app/src/operations/namespaces.ts b/sdk/app/arm-app/src/operations/namespaces.ts new file mode 100644 index 000000000000..7b5a6018c737 --- /dev/null +++ b/sdk/app/arm-app/src/operations/namespaces.ts @@ -0,0 +1,82 @@ +/* + * 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 { Namespaces } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; +import { + CheckNameAvailabilityRequest, + NamespacesCheckNameAvailabilityOptionalParams, + NamespacesCheckNameAvailabilityResponse +} from "../models"; + +/** Class containing Namespaces operations. */ +export class NamespacesImpl implements Namespaces { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class Namespaces class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Checks if resource name is available. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param managedEnvironmentName Name of the Managed Environment. + * @param checkNameAvailabilityRequest The check name availability request. + * @param options The options parameters. + */ + checkNameAvailability( + resourceGroupName: string, + managedEnvironmentName: string, + checkNameAvailabilityRequest: CheckNameAvailabilityRequest, + options?: NamespacesCheckNameAvailabilityOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedEnvironmentName, + checkNameAvailabilityRequest, + options + }, + checkNameAvailabilityOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/checkNameAvailability", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.CheckNameAvailabilityResponse + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + requestBody: Parameters.checkNameAvailabilityRequest, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.managedEnvironmentName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; diff --git a/sdk/app/arm-app/src/operationsInterfaces/containerApps.ts b/sdk/app/arm-app/src/operationsInterfaces/containerApps.ts index 982f3d283d74..4c8dd0798ac9 100644 --- a/sdk/app/arm-app/src/operationsInterfaces/containerApps.ts +++ b/sdk/app/arm-app/src/operationsInterfaces/containerApps.ts @@ -17,9 +17,7 @@ import { ContainerAppsCreateOrUpdateOptionalParams, ContainerAppsCreateOrUpdateResponse, ContainerAppsDeleteOptionalParams, - ContainerAppPatch, ContainerAppsUpdateOptionalParams, - ContainerAppsUpdateResponse, ContainerAppsListCustomHostNameAnalysisOptionalParams, ContainerAppsListCustomHostNameAnalysisResponse, ContainerAppsListSecretsOptionalParams, @@ -110,18 +108,31 @@ export interface ContainerApps { options?: ContainerAppsDeleteOptionalParams ): Promise; /** - * Patches a Container App. Currently only patching of tags is supported + * Patches a Container App using JSON Merge Patch * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param name Name of the Container App. - * @param containerAppEnvelope Properties of a container app that need to be updated + * @param containerAppEnvelope Properties of a Container App that need to be updated * @param options The options parameters. */ - update( + beginUpdate( resourceGroupName: string, name: string, - containerAppEnvelope: ContainerAppPatch, + containerAppEnvelope: ContainerApp, + options?: ContainerAppsUpdateOptionalParams + ): Promise, void>>; + /** + * Patches a Container App using JSON Merge Patch + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param name Name of the Container App. + * @param containerAppEnvelope Properties of a Container App that need to be updated + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + name: string, + containerAppEnvelope: ContainerApp, options?: ContainerAppsUpdateOptionalParams - ): Promise; + ): Promise; /** * Analyzes a custom hostname for a Container App * @param resourceGroupName The name of the resource group. The name is case insensitive. diff --git a/sdk/app/arm-app/src/operationsInterfaces/daprComponents.ts b/sdk/app/arm-app/src/operationsInterfaces/daprComponents.ts index 61ee0547987b..22a02c8c18fc 100644 --- a/sdk/app/arm-app/src/operationsInterfaces/daprComponents.ts +++ b/sdk/app/arm-app/src/operationsInterfaces/daprComponents.ts @@ -14,7 +14,9 @@ import { DaprComponentsGetResponse, DaprComponentsCreateOrUpdateOptionalParams, DaprComponentsCreateOrUpdateResponse, - DaprComponentsDeleteOptionalParams + DaprComponentsDeleteOptionalParams, + DaprComponentsListSecretsOptionalParams, + DaprComponentsListSecretsResponse } from "../models"; /// @@ -72,4 +74,17 @@ export interface DaprComponents { name: string, options?: DaprComponentsDeleteOptionalParams ): Promise; + /** + * List secrets for a dapr component + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Dapr Component. + * @param options The options parameters. + */ + listSecrets( + resourceGroupName: string, + environmentName: string, + name: string, + options?: DaprComponentsListSecretsOptionalParams + ): Promise; } diff --git a/sdk/app/arm-app/src/operationsInterfaces/index.ts b/sdk/app/arm-app/src/operationsInterfaces/index.ts index 5dc5208b4575..6b480d5a26e4 100644 --- a/sdk/app/arm-app/src/operationsInterfaces/index.ts +++ b/sdk/app/arm-app/src/operationsInterfaces/index.ts @@ -6,13 +6,14 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +export * from "./containerAppsAuthConfigs"; export * from "./containerApps"; export * from "./containerAppsRevisions"; export * from "./containerAppsRevisionReplicas"; +export * from "./daprComponents"; +export * from "./operations"; export * from "./managedEnvironments"; export * from "./certificates"; -export * from "./operations"; -export * from "./containerAppsSourceControls"; -export * from "./daprComponents"; -export * from "./containerAppsAuthConfigs"; +export * from "./namespaces"; export * from "./managedEnvironmentsStorages"; +export * from "./containerAppsSourceControls"; diff --git a/sdk/app/arm-app/src/operationsInterfaces/managedEnvironments.ts b/sdk/app/arm-app/src/operationsInterfaces/managedEnvironments.ts index 8d6ee3e2f59a..78dcc5e114ee 100644 --- a/sdk/app/arm-app/src/operationsInterfaces/managedEnvironments.ts +++ b/sdk/app/arm-app/src/operationsInterfaces/managedEnvironments.ts @@ -17,9 +17,7 @@ import { ManagedEnvironmentsCreateOrUpdateOptionalParams, ManagedEnvironmentsCreateOrUpdateResponse, ManagedEnvironmentsDeleteOptionalParams, - ManagedEnvironmentPatch, - ManagedEnvironmentsUpdateOptionalParams, - ManagedEnvironmentsUpdateResponse + ManagedEnvironmentsUpdateOptionalParams } from "../models"; /// @@ -106,16 +104,29 @@ export interface ManagedEnvironments { options?: ManagedEnvironmentsDeleteOptionalParams ): Promise; /** - * Patches a Managed Environment. Only patching of tags is supported currently + * Patches a Managed Environment using JSON Merge Patch * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param name Name of the Environment. * @param environmentEnvelope Configuration details of the Environment. * @param options The options parameters. */ - update( + beginUpdate( resourceGroupName: string, name: string, - environmentEnvelope: ManagedEnvironmentPatch, + environmentEnvelope: ManagedEnvironment, options?: ManagedEnvironmentsUpdateOptionalParams - ): Promise; + ): Promise, void>>; + /** + * Patches a Managed Environment using JSON Merge Patch + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param name Name of the Environment. + * @param environmentEnvelope Configuration details of the Environment. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + name: string, + environmentEnvelope: ManagedEnvironment, + options?: ManagedEnvironmentsUpdateOptionalParams + ): Promise; } diff --git a/sdk/app/arm-app/src/operationsInterfaces/namespaces.ts b/sdk/app/arm-app/src/operationsInterfaces/namespaces.ts new file mode 100644 index 000000000000..c11437a1b4b8 --- /dev/null +++ b/sdk/app/arm-app/src/operationsInterfaces/namespaces.ts @@ -0,0 +1,30 @@ +/* + * 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 { + CheckNameAvailabilityRequest, + NamespacesCheckNameAvailabilityOptionalParams, + NamespacesCheckNameAvailabilityResponse +} from "../models"; + +/** Interface representing a Namespaces. */ +export interface Namespaces { + /** + * Checks if resource name is available. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param managedEnvironmentName Name of the Managed Environment. + * @param checkNameAvailabilityRequest The check name availability request. + * @param options The options parameters. + */ + checkNameAvailability( + resourceGroupName: string, + managedEnvironmentName: string, + checkNameAvailabilityRequest: CheckNameAvailabilityRequest, + options?: NamespacesCheckNameAvailabilityOptionalParams + ): Promise; +} diff --git a/sdk/app/arm-app/tsconfig.json b/sdk/app/arm-app/tsconfig.json index e17400c98311..3e6ae96443f3 100644 --- a/sdk/app/arm-app/tsconfig.json +++ b/sdk/app/arm-app/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-app": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"