From 327e57d971e67185e3b0186c04a191d4f6c2a12a Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 19 Apr 2022 22:14:23 +0000 Subject: [PATCH] CodeGen from PR 18678 in Azure/azure-rest-api-specs Merge af5cadf6bc41658f607f8c89cefd89169ee5f8d0 into bbd44410581ae5aed9ef0dcb3ad8f22a6c0dd670 --- common/config/rush/pnpm-lock.yaml | 17 +- sdk/app/arm-app/CHANGELOG.md | 78 + 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 | 266 +- 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 | 65 +- sdk/app/arm-app/src/models/index.ts | 2382 ++++++------ sdk/app/arm-app/src/models/mappers.ts | 3307 ++++++++++------- sdk/app/arm-app/src/models/parameters.ts | 145 +- .../arm-app/src/operations/containerApps.ts | 97 +- .../operations/containerAppsAuthConfigs.ts | 12 +- .../operations/containerAppsDiagnostics.ts | 477 +++ .../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 | 12 +- .../managedEnvironmentDiagnostics.ts | 117 + .../src/operations/managedEnvironments.ts | 95 +- .../managedEnvironmentsDiagnostics.ts | 73 + sdk/app/arm-app/src/operations/namespaces.ts | 82 + .../src/operationsInterfaces/containerApps.ts | 25 +- .../containerAppsDiagnostics.ts | 85 + .../operationsInterfaces/daprComponents.ts | 17 +- .../arm-app/src/operationsInterfaces/index.ts | 12 +- .../managedEnvironmentDiagnostics.ts | 42 + .../managedEnvironments.ts | 25 +- .../managedEnvironmentsDiagnostics.ts | 27 + .../src/operationsInterfaces/namespaces.ts | 30 + sdk/app/arm-app/tsconfig.json | 10 +- 170 files changed, 4982 insertions(+), 7942 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/containerAppsDiagnostics.ts create mode 100644 sdk/app/arm-app/src/operations/managedEnvironmentDiagnostics.ts create mode 100644 sdk/app/arm-app/src/operations/managedEnvironmentsDiagnostics.ts create mode 100644 sdk/app/arm-app/src/operations/namespaces.ts create mode 100644 sdk/app/arm-app/src/operationsInterfaces/containerAppsDiagnostics.ts create mode 100644 sdk/app/arm-app/src/operationsInterfaces/managedEnvironmentDiagnostics.ts create mode 100644 sdk/app/arm-app/src/operationsInterfaces/managedEnvironmentsDiagnostics.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 f8669113779c..15576c28a231 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -9322,28 +9322,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.22.1 - '@rollup/plugin-commonjs': 21.0.3_rollup@2.70.1 - '@rollup/plugin-json': 4.1.0_rollup@2.70.1 - '@rollup/plugin-multi-entry': 4.1.0_rollup@2.70.1 - '@rollup/plugin-node-resolve': 13.2.0_rollup@2.70.1 + '@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.1 - rollup-plugin-sourcemaps: 0.6.3_rollup@2.70.1 + 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.4 transitivePeerDependencies: - - '@types/node' - debug - encoding - supports-color @@ -17534,7 +17533,7 @@ packages: dev: false file:projects/test-recorder.tgz: - resolution: {integrity: sha512-B93X36qy6MzbmwmJTI9M56ciGzXk7pxYC69kGsF4p6Ume78JsRW/moamW9oUYvzPqI02ADCjlN921XKQC8RijQ==, tarball: file:projects/test-recorder.tgz} + resolution: {integrity: sha512-3p9OFq1/8KPglmW2HeFhw9UDAQ09Uql8+Wkzl6WgGT+VjPd+3zaxprTZRLMNZPx8u+keyJhQVTAxNikKTg5EXQ==, tarball: file:projects/test-recorder.tgz} name: '@rush-temp/test-recorder' version: 0.0.0 dependencies: diff --git a/sdk/app/arm-app/CHANGELOG.md b/sdk/app/arm-app/CHANGELOG.md index 3468066a2951..ff6b9bad706d 100644 --- a/sdk/app/arm-app/CHANGELOG.md +++ b/sdk/app/arm-app/CHANGELOG.md @@ -1,5 +1,83 @@ # Release History +## 1.0.0 (2022-04-19) + +**Features** + + - Added operation group ContainerAppsDiagnostics + - Added operation group ManagedEnvironmentDiagnostics + - Added operation group ManagedEnvironmentsDiagnostics + - 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 ContainerAppsDiagnosticsGetDetectorOptionalParams + - Added Interface ContainerAppsDiagnosticsGetRevisionOptionalParams + - Added Interface ContainerAppsDiagnosticsGetRootOptionalParams + - Added Interface ContainerAppsDiagnosticsListDetectorsNextOptionalParams + - Added Interface ContainerAppsDiagnosticsListDetectorsOptionalParams + - Added Interface ContainerAppsDiagnosticsListRevisionsNextOptionalParams + - Added Interface ContainerAppsDiagnosticsListRevisionsOptionalParams + - Added Interface DaprComponentsListSecretsOptionalParams + - Added Interface DaprSecretsCollection + - Added Interface DiagnosticDataProviderMetadata + - Added Interface DiagnosticDataProviderMetadataPropertyBagItem + - Added Interface DiagnosticDataTableResponseColumn + - Added Interface DiagnosticDataTableResponseObject + - Added Interface DiagnosticRendering + - Added Interface DiagnosticsCollection + - Added Interface DiagnosticsDataApiResponse + - Added Interface DiagnosticsDefinition + - Added Interface DiagnosticsProperties + - Added Interface DiagnosticsStatus + - Added Interface DiagnosticSupportTopic + - Added Interface ManagedEnvironmentDiagnosticsGetDetectorOptionalParams + - Added Interface ManagedEnvironmentDiagnosticsListDetectorsOptionalParams + - Added Interface ManagedEnvironmentsDiagnosticsGetRootOptionalParams + - Added Interface NamespacesCheckNameAvailabilityOptionalParams + - Added Type Alias CheckNameAvailabilityReason + - Added Type Alias ContainerAppsDiagnosticsGetDetectorResponse + - Added Type Alias ContainerAppsDiagnosticsGetRevisionResponse + - Added Type Alias ContainerAppsDiagnosticsGetRootResponse + - Added Type Alias ContainerAppsDiagnosticsListDetectorsNextResponse + - Added Type Alias ContainerAppsDiagnosticsListDetectorsResponse + - Added Type Alias ContainerAppsDiagnosticsListRevisionsNextResponse + - Added Type Alias ContainerAppsDiagnosticsListRevisionsResponse + - Added Type Alias DaprComponentsListSecretsResponse + - Added Type Alias Diagnostics + - Added Type Alias ManagedEnvironmentDiagnosticsGetDetectorResponse + - Added Type Alias ManagedEnvironmentDiagnosticsListDetectorsResponse + - Added Type Alias ManagedEnvironmentsDiagnosticsGetRootResponse + - 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 RegistryCredentials has a new optional parameter identity + - Interface TrafficWeight has a new optional parameter label + - Class ContainerAppsAPIClient has a new parameter containerAppsDiagnostics + - Class ContainerAppsAPIClient has a new parameter managedEnvironmentDiagnostics + - Class ContainerAppsAPIClient has a new parameter managedEnvironmentsDiagnostics + - Class ContainerAppsAPIClient has a new parameter namespaces + - Type Alias ManagedEnvironment has a new parameter daprAIConnectionString + - Type Alias ManagedEnvironment has a new parameter zoneRedundant + - 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..e28dfa98a1ca 100644 --- a/sdk/app/arm-app/_meta.json +++ b/sdk/app/arm-app/_meta.json @@ -1,8 +1,8 @@ { - "commit": "82fdf284eea880a8e027c354911a814999a77178", + "commit": "a1d78d920a93bfdd9eb83c85cdf817e583e0c2bd", "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.3.0", + "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..323853f4e66e 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) @@ -346,6 +356,8 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { // (undocumented) containerAppsAuthConfigs: ContainerAppsAuthConfigs; // (undocumented) + containerAppsDiagnostics: ContainerAppsDiagnostics; + // (undocumented) containerAppsRevisionReplicas: ContainerAppsRevisionReplicas; // (undocumented) containerAppsRevisions: ContainerAppsRevisions; @@ -354,10 +366,16 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { // (undocumented) daprComponents: DaprComponents; // (undocumented) + managedEnvironmentDiagnostics: ManagedEnvironmentDiagnostics; + // (undocumented) managedEnvironments: ManagedEnvironments; // (undocumented) + managedEnvironmentsDiagnostics: ManagedEnvironmentsDiagnostics; + // (undocumented) managedEnvironmentsStorages: ManagedEnvironmentsStorages; // (undocumented) + namespaces: Namespaces; + // (undocumented) operations: Operations; // (undocumented) subscriptionId: string; @@ -425,6 +443,66 @@ export interface ContainerAppsDeleteOptionalParams extends coreClient.OperationO updateIntervalInMs?: number; } +// @public +export interface ContainerAppsDiagnostics { + getDetector(resourceGroupName: string, containerAppName: string, name: string, options?: ContainerAppsDiagnosticsGetDetectorOptionalParams): Promise; + getRevision(resourceGroupName: string, containerAppName: string, name: string, options?: ContainerAppsDiagnosticsGetRevisionOptionalParams): Promise; + getRoot(resourceGroupName: string, name: string, options?: ContainerAppsDiagnosticsGetRootOptionalParams): Promise; + listDetectors(resourceGroupName: string, containerAppName: string, options?: ContainerAppsDiagnosticsListDetectorsOptionalParams): PagedAsyncIterableIterator; + listRevisions(resourceGroupName: string, containerAppName: string, options?: ContainerAppsDiagnosticsListRevisionsOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ContainerAppsDiagnosticsGetDetectorOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerAppsDiagnosticsGetDetectorResponse = Diagnostics; + +// @public +export interface ContainerAppsDiagnosticsGetRevisionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerAppsDiagnosticsGetRevisionResponse = Revision; + +// @public +export interface ContainerAppsDiagnosticsGetRootOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerAppsDiagnosticsGetRootResponse = ContainerApp; + +// @public +export interface ContainerAppsDiagnosticsListDetectorsNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerAppsDiagnosticsListDetectorsNextResponse = DiagnosticsCollection; + +// @public +export interface ContainerAppsDiagnosticsListDetectorsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerAppsDiagnosticsListDetectorsResponse = DiagnosticsCollection; + +// @public +export interface ContainerAppsDiagnosticsListRevisionsNextOptionalParams extends coreClient.OperationOptions { + filter?: string; +} + +// @public +export type ContainerAppsDiagnosticsListRevisionsNextResponse = RevisionCollection; + +// @public +export interface ContainerAppsDiagnosticsListRevisionsOptionalParams extends coreClient.OperationOptions { + filter?: string; +} + +// @public +export type ContainerAppsDiagnosticsListRevisionsResponse = RevisionCollection; + // @public export interface ContainerAppSecret { readonly name?: string; @@ -527,6 +605,7 @@ export type ContainerAppsRevisionsGetRevisionResponse = Revision; // @public export interface ContainerAppsRevisionsListRevisionsNextOptionalParams extends coreClient.OperationOptions { + filter?: string; } // @public @@ -534,6 +613,7 @@ export type ContainerAppsRevisionsListRevisionsNextResponse = RevisionCollection // @public export interface ContainerAppsRevisionsListRevisionsOptionalParams extends coreClient.OperationOptions { + filter?: string; } // @public @@ -591,11 +671,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 +757,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 +798,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 +812,11 @@ export interface DaprMetadata { value?: string; } +// @public +export interface DaprSecretsCollection { + value: Secret[]; +} + // @public export interface DefaultAuthorizationPolicy { allowedApplications?: string[]; @@ -752,6 +844,90 @@ export interface DefaultErrorResponseErrorDetailsItem { readonly target?: string; } +// @public +export interface DiagnosticDataProviderMetadata { + propertyBag?: DiagnosticDataProviderMetadataPropertyBagItem[]; + providerName?: string; +} + +// @public +export interface DiagnosticDataProviderMetadataPropertyBagItem { + name?: string; + value?: string; +} + +// @public +export interface DiagnosticDataTableResponseColumn { + columnName?: string; + columnType?: string; + dataType?: string; +} + +// @public +export interface DiagnosticDataTableResponseObject { + columns?: DiagnosticDataTableResponseColumn[]; + rows?: Record[]; + tableName?: string; +} + +// @public +export interface DiagnosticRendering { + description?: string; + isVisible?: boolean; + title?: string; + type?: number; +} + +// @public +export type Diagnostics = ProxyResource & { + properties?: DiagnosticsProperties; +}; + +// @public +export interface DiagnosticsCollection { + readonly nextLink?: string; + value: Diagnostics[]; +} + +// @public +export interface DiagnosticsDataApiResponse { + renderingProperties?: DiagnosticRendering; + table?: DiagnosticDataTableResponseObject; +} + +// @public +export interface DiagnosticsDefinition { + analysisTypes?: string[]; + readonly author?: string; + readonly category?: string; + readonly description?: string; + readonly id?: string; + readonly name?: string; + readonly score?: number; + supportTopicList?: DiagnosticSupportTopic[]; + readonly type?: string; +} + +// @public +export interface DiagnosticsProperties { + dataProviderMetadata?: DiagnosticDataProviderMetadata; + dataset?: DiagnosticsDataApiResponse[]; + metadata?: DiagnosticsDefinition; + status?: DiagnosticsStatus; +} + +// @public +export interface DiagnosticsStatus { + message?: string; + statusId?: number; +} + +// @public +export interface DiagnosticSupportTopic { + readonly id?: string; + readonly pesId?: string; +} + // @public export type DnsVerificationTestResult = "Passed" | "Failed" | "Skipped"; @@ -793,7 +969,8 @@ export interface GitHub { // @public export interface GithubActionConfiguration { azureCredentials?: AzureCredentials; - dockerfilePath?: string; + contextPath?: string; + image?: string; os?: string; publishType?: string; registryInfo?: RegistryInfo; @@ -916,6 +1093,14 @@ export enum KnownCertificateProvisioningState { Succeeded = "Succeeded" } +// @public +export enum KnownCheckNameAvailabilityReason { + // (undocumented) + AlreadyExists = "AlreadyExists", + // (undocumented) + Invalid = "Invalid" +} + // @public export enum KnownContainerAppProvisioningState { // (undocumented) @@ -1069,30 +1254,46 @@ export interface LoginScopes { export type ManagedEnvironment = TrackedResource & { readonly provisioningState?: EnvironmentProvisioningState; daprAIInstrumentationKey?: string; + daprAIConnectionString?: string; vnetConfiguration?: VnetConfiguration; readonly deploymentErrors?: string; readonly defaultDomain?: string; readonly staticIp?: string; appLogsConfiguration?: AppLogsConfiguration; + zoneRedundant?: boolean; }; // @public -export interface ManagedEnvironmentPatch { - tags?: { - [propertyName: string]: string; - }; +export interface ManagedEnvironmentDiagnostics { + getDetector(resourceGroupName: string, name: string, detectorName: string, options?: ManagedEnvironmentDiagnosticsGetDetectorOptionalParams): Promise; + listDetectors(resourceGroupName: string, name: string, options?: ManagedEnvironmentDiagnosticsListDetectorsOptionalParams): Promise; } +// @public +export interface ManagedEnvironmentDiagnosticsGetDetectorOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedEnvironmentDiagnosticsGetDetectorResponse = Diagnostics; + +// @public +export interface ManagedEnvironmentDiagnosticsListDetectorsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedEnvironmentDiagnosticsListDetectorsResponse = DiagnosticsCollection; + // @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 @@ -1116,6 +1317,18 @@ export interface ManagedEnvironmentsDeleteOptionalParams extends coreClient.Oper updateIntervalInMs?: number; } +// @public +export interface ManagedEnvironmentsDiagnostics { + getRoot(resourceGroupName: string, name: string, options?: ManagedEnvironmentsDiagnosticsGetRootOptionalParams): Promise; +} + +// @public +export interface ManagedEnvironmentsDiagnosticsGetRootOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedEnvironmentsDiagnosticsGetRootResponse = ManagedEnvironment; + // @public export interface ManagedEnvironmentsGetOptionalParams extends coreClient.OperationOptions { } @@ -1201,11 +1414,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 +1431,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; @@ -1300,6 +1524,7 @@ export interface QueueScaleRule { // @public export interface RegistryCredentials { + identity?: string; passwordSecretRef?: string; server?: string; username?: string; @@ -1445,6 +1670,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..50e923cbf77c 100644 --- a/sdk/app/arm-app/src/containerAppsAPIClient.ts +++ b/sdk/app/arm-app/src/containerAppsAPIClient.ts @@ -9,28 +9,36 @@ import * as coreClient from "@azure/core-client"; import * as coreAuth from "@azure/core-auth"; import { + ContainerAppsAuthConfigsImpl, ContainerAppsImpl, ContainerAppsRevisionsImpl, ContainerAppsRevisionReplicasImpl, + DaprComponentsImpl, + ContainerAppsDiagnosticsImpl, + ManagedEnvironmentDiagnosticsImpl, + ManagedEnvironmentsDiagnosticsImpl, + OperationsImpl, ManagedEnvironmentsImpl, CertificatesImpl, - OperationsImpl, - ContainerAppsSourceControlsImpl, - DaprComponentsImpl, - ContainerAppsAuthConfigsImpl, - ManagedEnvironmentsStoragesImpl + NamespacesImpl, + ManagedEnvironmentsStoragesImpl, + ContainerAppsSourceControlsImpl } from "./operations"; import { + ContainerAppsAuthConfigs, ContainerApps, ContainerAppsRevisions, ContainerAppsRevisionReplicas, + DaprComponents, + ContainerAppsDiagnostics, + ManagedEnvironmentDiagnostics, + ManagedEnvironmentsDiagnostics, + Operations, ManagedEnvironments, Certificates, - Operations, - ContainerAppsSourceControls, - DaprComponents, - ContainerAppsAuthConfigs, - ManagedEnvironmentsStorages + Namespaces, + ManagedEnvironmentsStorages, + ContainerAppsSourceControls } from "./operationsInterfaces"; import { ContainerAppsAPIClientOptionalParams } from "./models"; @@ -66,7 +74,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 +89,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 +97,45 @@ 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-05-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.containerAppsDiagnostics = new ContainerAppsDiagnosticsImpl(this); + this.managedEnvironmentDiagnostics = new ManagedEnvironmentDiagnosticsImpl( + this + ); + this.managedEnvironmentsDiagnostics = new ManagedEnvironmentsDiagnosticsImpl( + 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; + containerAppsDiagnostics: ContainerAppsDiagnostics; + managedEnvironmentDiagnostics: ManagedEnvironmentDiagnostics; + managedEnvironmentsDiagnostics: ManagedEnvironmentsDiagnostics; + 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..7dca6862c3e4 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,314 +19,385 @@ 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; +/** 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; +} + +/** 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[]; +} + +/** 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; +} + +/** The configuration settings of the app registration for the Twitter provider. */ +export interface TwitterRegistration { /** - * Ephemeral Storage, e.g. "1Gi" - * NOTE: This property will not be serialized. It can only be populated by the server. + * 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 */ - readonly ephemeralStorage?: string; + consumerKey?: string; + /** + * The app setting name that contains the OAuth 1.0a consumer secret of the Twitter + * application used for sign-in. + */ + consumerSecretSettingName?: string; } -/** 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 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; } -/** 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 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; } -/** 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 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; } -/** 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 registration for the Azure Static Web Apps provider */ +export interface AzureStaticWebAppsRegistration { + /** The Client ID of the app used for login. */ + clientId?: 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 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; } -/** 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 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 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 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 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 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; } -/** 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 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[]; } -/** Container App container Custom scaling rule. */ -export interface CustomScaleRule { +/** 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; /** - * Type of the custom scale rule - * eg: azure-servicebus, redis etc. + * 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. */ - type?: string; - /** Metadata properties to describe custom scale rule. */ - metadata?: { [propertyName: string]: string }; - /** Authentication secrets for the custom scale rule. */ - auth?: ScaleRuleAuth[]; + 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; } -/** 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 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; } -/** 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 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 */ @@ -423,116 +494,10 @@ 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 { - /** Collection of resources. */ - value: ContainerAppSecret[]; -} - -/** Container App Secret. */ -export interface ContainerAppSecret { - /** - * Secret Name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Secret Value. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: string; -} - -/** 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; -} - -/** 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; -} - -/** Container App Revision Replicas collection ARM resource. */ -export interface ReplicaCollection { - /** Collection of resources. */ - value: Replica[]; -} - -/** Collection of Environments */ -export interface ManagedEnvironmentsCollection { - /** Collection of resources. */ - value: ManagedEnvironment[]; - /** - * 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 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; -} - -/** Configuration of application logs */ -export interface AppLogsConfiguration { - /** Logs destination */ - destination?: string; - /** Log Analytics configuration */ - logAnalyticsConfiguration?: LogAnalyticsConfiguration; -} - -/** Log analytics configuration */ -export interface LogAnalyticsConfiguration { - /** Log analytics customer id */ - customerId?: string; - /** Log analytics customer key */ - sharedKey?: string; -} - -/** An environment for hosting container apps */ -export interface ManagedEnvironmentPatch { - /** Application-specific metadata in the form of key-value pairs. */ - tags?: { [propertyName: string]: string }; -} - -/** Collection of Certificates. */ -export interface CertificateCollection { +/** Container App collection ARM resource. */ +export interface ContainerAppCollection { /** Collection of resources. */ - value: Certificate[]; + value: ContainerApp[]; /** * Link to next page of resources. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -540,557 +505,701 @@ export interface CertificateCollection { readonly nextLink?: 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; +/** Managed service identity (system assigned and/or user assigned identities) */ +export interface ManagedServiceIdentity { /** - * Certificate issuer. + * 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 issuer?: string; + readonly principalId?: string; /** - * Certificate issue Date. + * 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 issueDate?: Date; + 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 }; +} + +/** User assigned identity properties */ +export interface UserAssignedIdentity { /** - * Certificate expiration date. + * The principal ID of the assigned identity. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly expirationDate?: Date; + readonly principalId?: string; /** - * Certificate thumbprint. + * The client ID of the assigned identity. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly thumbprint?: string; + readonly clientId?: string; +} + +/** 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[]; /** - * Is the certificate valid?. - * NOTE: This property will not be serialized. It can only be populated by the server. + * 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. */ - readonly valid?: boolean; + 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; +} + +/** Secret definition. */ +export interface Secret { + /** Secret Name. */ + name?: string; + /** Secret Value. */ + value?: string; +} + +/** Container App Ingress configuration. */ +export interface Ingress { /** - * Public key hash. + * Hostname. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly publicKeyHash?: 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; } -/** A certificate to update */ -export interface CertificatePatch { - /** Application-specific metadata in the form of key-value pairs. */ - tags?: { [propertyName: string]: string }; +/** 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; } -/** 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; +/** 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; } -/** Operation detail payload */ -export interface OperationDetail { - /** Name of the operation */ +/** 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; + /** A Managed Identity to use to authenticate with Azure Container Registry. For user-assigned identities, use the full user-assigned identity Resource ID. For system-assigned identities, use 'system' */ + identity?: 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; +} + +/** + * 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[]; +} + +/** 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; + /** 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[]; } -/** 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; +/** 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; } -/** SourceControl collection ARM resource. */ -export interface SourceControlCollection { - /** Collection of resources. */ - value: SourceControl[]; +/** 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; + readonly ephemeralStorage?: string; +} + +/** 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; +} + +/** 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; +} + +/** 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; } -/** 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; +/** 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; } -/** Container App registry information. */ -export interface RegistryInfo { - /** registry server Url. */ - registryUrl?: string; - /** registry username. */ - registryUserName?: string; - /** registry secret. */ - registryPassword?: 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; } -/** Container App credentials. */ -export interface AzureCredentials { - /** Client Id. */ - clientId?: string; - /** Client Secret. */ - clientSecret?: string; - /** Tenant Id. */ - tenantId?: string; - /** Subscription Id. */ - subscriptionId?: 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[]; } -/** 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 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; } -/** 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; +/** 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[]; } -/** AuthConfig collection ARM resource. */ -export interface AuthConfigCollection { - /** Collection of resources. */ - value: AuthConfig[]; - /** - * Link to next page of resources. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; +/** 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 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; +/** Container App container Custom scaling rule. */ +export interface CustomScaleRule { /** - * 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. + * Type of the custom scale rule + * eg: azure-servicebus, redis etc. */ - runtimeVersion?: string; + 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 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[]; +/** 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 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; - }; +/** 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 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; +/** Container App Secrets Collection ARM resource. */ +export interface SecretsCollection { + /** Collection of resources. */ + value: ContainerAppSecret[]; } -/** 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; +/** Container App Secret. */ +export interface ContainerAppSecret { /** - * 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. + * Secret Name. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - clientSecretCertificateSubjectAlternativeName?: string; + readonly name?: 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. + * Secret Value. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - clientSecretCertificateIssuer?: string; + readonly value?: string; } -/** The configuration settings of the Azure Active Directory login flow. */ -export interface AzureActiveDirectoryLogin { +/** Container App Revisions collection ARM resource. */ +export interface RevisionCollection { + /** Collection of resources. */ + value: Revision[]; /** - * Login parameters to send to the OpenID Connect authorization endpoint when - * a user logs in. Each parameter must be in the form "key=value". + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - loginParameters?: string[]; - /** true if the www-authenticate provider should be omitted from the request; otherwise, false. */ - disableWWWAuthenticate?: boolean; + readonly nextLink?: string; } -/** 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; +/** 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 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 Revision Replicas collection ARM resource. */ +export interface ReplicaCollection { + /** Collection of resources. */ + value: Replica[]; } -/** 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[]; +/** 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 Azure Active Directory allowed principals. */ -export interface AllowedPrincipals { - /** The list of the allowed groups. */ - groups?: string[]; - /** The list of the allowed identities. */ - identities?: string[]; +/** 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 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; +/** Dapr component Secrets Collection ARM resource. */ +export interface DaprSecretsCollection { + /** Collection of secrets used by a Dapr component */ + value: Secret[]; } -/** 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; +/** Diagnostics data collection for a resource. */ +export interface DiagnosticsCollection { + /** Collection of diagnostic data. */ + value: Diagnostics[]; + /** + * 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 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[]; +/** Diagnostics resource specific properties */ +export interface DiagnosticsProperties { + /** Metadata of the diagnostics response. */ + metadata?: DiagnosticsDefinition; + /** Set of data collections associated with the response. */ + dataset?: DiagnosticsDataApiResponse[]; + /** Status of the diagnostics response. */ + status?: DiagnosticsStatus; + /** List of data providers' metadata. */ + dataProviderMetadata?: DiagnosticDataProviderMetadata; } -/** 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; +/** Metadata of the diagnostics response */ +export interface DiagnosticsDefinition { + /** + * Unique detector name + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * Display Name of the detector + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Details of the diagnostics info + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly description?: string; + /** + * Authors' names of the detector + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly author?: string; + /** + * Category of the detector + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly category?: string; + /** List of support topics */ + supportTopicList?: DiagnosticSupportTopic[]; + /** List of analysis types */ + analysisTypes?: string[]; + /** + * Authors' names of the detector + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * Authors' names of the detector + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly score?: number; } -/** 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; +/** Support topic information */ +export interface DiagnosticSupportTopic { + /** + * Unique topic identifier + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * PES identifier + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly pesId?: 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; +/** Diagnostics data returned from a detector */ +export interface DiagnosticsDataApiResponse { + /** Table response */ + table?: DiagnosticDataTableResponseObject; + /** Details of the table response */ + renderingProperties?: DiagnosticRendering; } -/** 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[]; +/** Diagnostics data table */ +export interface DiagnosticDataTableResponseObject { + /** Table name */ + tableName?: string; + /** Columns in the table */ + columns?: DiagnosticDataTableResponseColumn[]; + /** Rows in the table */ + rows?: Record[]; } -/** 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; +/** Diagnostics data column */ +export interface DiagnosticDataTableResponseColumn { + /** Column name */ + columnName?: string; + /** Data type of the column */ + dataType?: string; + /** Column type */ + columnType?: 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; +/** Rendering details of a diagnostics table */ +export interface DiagnosticRendering { + /** Rendering type */ + type?: number; + /** Title of the table */ + title?: string; + /** Description of the table */ + description?: string; + /** Flag if the table should be rendered */ + isVisible?: boolean; } -/** 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; +/** Rendering details of a diagnostics table */ +export interface DiagnosticsStatus { + /** Diagnostic message */ + message?: string; + /** Status */ + statusId?: number; } -/** 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; +/** Details of a diagnostics data provider */ +export interface DiagnosticDataProviderMetadata { + /** Name of data provider */ + providerName?: string; + /** Collection of properties */ + propertyBag?: DiagnosticDataProviderMetadataPropertyBagItem[]; } -/** 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; +/** Property details */ +export interface DiagnosticDataProviderMetadataPropertyBagItem { + /** Property name */ + name?: string; + /** Property value */ + value?: string; } -/** 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; +/** 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 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; +/** Configuration of application logs */ +export interface AppLogsConfiguration { + /** Logs destination */ + destination?: string; + /** Log Analytics configuration */ + logAnalyticsConfiguration?: LogAnalyticsConfiguration; } -/** 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; +/** Log analytics configuration */ +export interface LogAnalyticsConfiguration { + /** Log analytics customer id */ + customerId?: string; + /** Log analytics customer key */ + sharedKey?: string; } -/** 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; -} - -/** 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; + readonly nextLink?: 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; +/** 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 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; +/** 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 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; +/** A certificate to update */ +export interface CertificatePatch { + /** Application-specific metadata in the form of key-value pairs. */ + tags?: { [propertyName: string]: string }; } -/** The configuration settings of the paths HTTP requests. */ -export interface HttpSettingsRoutes { - /** The prefix that should precede all the authentication/authorization paths. */ - apiPrefix?: 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 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; +/** 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 +1226,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; +} -/** 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; +/** 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; +} + +/** 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,25 +1411,6 @@ export type Replica = ProxyResource & { containers?: ReplicaContainer[]; }; -/** Container App SourceControl. */ -export type SourceControl = ProxyResource & { - /** - * Current provisioning State of the operation - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly operationState?: SourceControlOperationState; - /** The repo url which will be integrated to ContainerApp. */ - repoUrl?: string; - /** The branch which will trigger the auto deployment */ - branch?: string; - /** - * Container App Revision Template with all possible settings and the - * defaults if user did not provide them. The defaults are populated - * as they were at the creation time - */ - githubActionConfiguration?: GithubActionConfiguration; -}; - /** Dapr Component. */ export type DaprComponent = ProxyResource & { /** Component type */ @@ -1349,18 +1429,10 @@ export type DaprComponent = ProxyResource & { scopes?: 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; +/** Diagnostics data for a resource. */ +export type Diagnostics = ProxyResource & { + /** Diagnostics resource specific properties */ + properties?: DiagnosticsProperties; }; /** Storage resource for managedEnvironment. */ @@ -1369,6 +1441,126 @@ export type ManagedEnvironmentStorage = ProxyResource & { properties?: ManagedEnvironmentStorageProperties; }; +/** Container App SourceControl. */ +export type SourceControl = ProxyResource & { + /** + * Current provisioning State of the operation + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly operationState?: SourceControlOperationState; + /** The repo url which will be integrated to ContainerApp. */ + repoUrl?: string; + /** The branch which will trigger the auto deployment */ + branch?: string; + /** + * Container App Revision Template with all possible settings and the + * defaults if user did not provide them. The defaults are populated + * as they were at the creation time + */ + githubActionConfiguration?: GithubActionConfiguration; +}; + +/** 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[]; +}; + +/** 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; + /** Application Insights connection string used by Dapr to export Service to Service communication telemetry */ + daprAIConnectionString?: 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; + /** Whether or not this Managed Environment is zone-redundant. */ + zoneRedundant?: boolean; +}; + +/** 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 +1701,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", @@ -1623,6 +1795,38 @@ export enum KnownCertificateProvisioningState { */ 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 + * **ReadOnly** \ + * **ReadWrite** + */ +export type AccessMode = string; + /** Known values of {@link SourceControlOperationState} that the service accepts. */ export enum KnownSourceControlOperationState { InProgress = "InProgress", @@ -1642,36 +1846,52 @@ export enum KnownSourceControlOperationState { * **Canceled** */ export type SourceControlOperationState = string; +/** Defines values for UnauthenticatedClientActionV2. */ +export type UnauthenticatedClientActionV2 = + | "RedirectToLoginPage" + | "AllowAnonymous" + | "Return401" + | "Return403"; +/** Defines values for CookieExpirationConvention. */ +export type CookieExpirationConvention = + | "FixedTime" + | "IdentityProviderDerived"; +/** Defines values for ForwardProxyConvention. */ +export type ForwardProxyConvention = "NoProxy" | "Standard" | "Custom"; +/** Defines values for DnsVerificationTestResult. */ +export type DnsVerificationTestResult = "Passed" | "Failed" | "Skipped"; -/** Known values of {@link AccessMode} that the service accepts. */ -export enum KnownAccessMode { - ReadOnly = "ReadOnly", - ReadWrite = "ReadWrite" -} +/** 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 {} -/** - * 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" - | "AllowAnonymous" - | "Return401" - | "Return403"; -/** Defines values for CookieExpirationConvention. */ -export type CookieExpirationConvention = - | "FixedTime" - | "IdentityProviderDerived"; -/** Defines values for ForwardProxyConvention. */ -export type ForwardProxyConvention = "NoProxy" | "Standard" | "Custom"; +/** Contains response data for the listByContainerAppNext operation. */ +export type ContainerAppsAuthConfigsListByContainerAppNextResponse = AuthConfigCollection; /** Optional parameters. */ export interface ContainerAppsListBySubscriptionOptionalParams @@ -1717,10 +1937,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 +1977,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 +2006,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; @@ -1801,109 +2029,119 @@ export interface ContainerAppsRevisionReplicasListReplicasOptionalParams export type ContainerAppsRevisionReplicasListReplicasResponse = ReplicaCollection; /** Optional parameters. */ -export interface ManagedEnvironmentsListBySubscriptionOptionalParams +export interface DaprComponentsListOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listBySubscription operation. */ -export type ManagedEnvironmentsListBySubscriptionResponse = ManagedEnvironmentsCollection; +/** Contains response data for the list operation. */ +export type DaprComponentsListResponse = DaprComponentsCollection; /** Optional parameters. */ -export interface ManagedEnvironmentsListByResourceGroupOptionalParams +export interface DaprComponentsGetOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByResourceGroup operation. */ -export type ManagedEnvironmentsListByResourceGroupResponse = ManagedEnvironmentsCollection; +/** Contains response data for the get operation. */ +export type DaprComponentsGetResponse = DaprComponent; /** Optional parameters. */ -export interface ManagedEnvironmentsGetOptionalParams +export interface DaprComponentsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type ManagedEnvironmentsGetResponse = ManagedEnvironment; +/** Contains response data for the createOrUpdate operation. */ +export type DaprComponentsCreateOrUpdateResponse = DaprComponent; /** Optional parameters. */ -export interface ManagedEnvironmentsCreateOrUpdateOptionalParams - 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; -} +export interface DaprComponentsDeleteOptionalParams + extends coreClient.OperationOptions {} -/** Contains response data for the createOrUpdate operation. */ -export type ManagedEnvironmentsCreateOrUpdateResponse = ManagedEnvironment; +/** Optional parameters. */ +export interface DaprComponentsListSecretsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listSecrets operation. */ +export type DaprComponentsListSecretsResponse = DaprSecretsCollection; /** Optional parameters. */ -export interface ManagedEnvironmentsDeleteOptionalParams - 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; -} +export interface DaprComponentsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type DaprComponentsListNextResponse = DaprComponentsCollection; /** Optional parameters. */ -export interface ManagedEnvironmentsUpdateOptionalParams +export interface ContainerAppsDiagnosticsListDetectorsOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the update operation. */ -export type ManagedEnvironmentsUpdateResponse = ManagedEnvironment; +/** Contains response data for the listDetectors operation. */ +export type ContainerAppsDiagnosticsListDetectorsResponse = DiagnosticsCollection; /** Optional parameters. */ -export interface ManagedEnvironmentsListBySubscriptionNextOptionalParams +export interface ContainerAppsDiagnosticsGetDetectorOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listBySubscriptionNext operation. */ -export type ManagedEnvironmentsListBySubscriptionNextResponse = ManagedEnvironmentsCollection; +/** Contains response data for the getDetector operation. */ +export type ContainerAppsDiagnosticsGetDetectorResponse = Diagnostics; /** Optional parameters. */ -export interface ManagedEnvironmentsListByResourceGroupNextOptionalParams +export interface ContainerAppsDiagnosticsListRevisionsOptionalParams + extends coreClient.OperationOptions { + /** The filter to apply on the operation. */ + filter?: string; +} + +/** Contains response data for the listRevisions operation. */ +export type ContainerAppsDiagnosticsListRevisionsResponse = RevisionCollection; + +/** Optional parameters. */ +export interface ContainerAppsDiagnosticsGetRevisionOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByResourceGroupNext operation. */ -export type ManagedEnvironmentsListByResourceGroupNextResponse = ManagedEnvironmentsCollection; +/** Contains response data for the getRevision operation. */ +export type ContainerAppsDiagnosticsGetRevisionResponse = Revision; /** Optional parameters. */ -export interface CertificatesListOptionalParams +export interface ContainerAppsDiagnosticsGetRootOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the list operation. */ -export type CertificatesListResponse = CertificateCollection; +/** Contains response data for the getRoot operation. */ +export type ContainerAppsDiagnosticsGetRootResponse = ContainerApp; /** Optional parameters. */ -export interface CertificatesGetOptionalParams +export interface ContainerAppsDiagnosticsListDetectorsNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type CertificatesGetResponse = Certificate; +/** Contains response data for the listDetectorsNext operation. */ +export type ContainerAppsDiagnosticsListDetectorsNextResponse = DiagnosticsCollection; /** Optional parameters. */ -export interface CertificatesCreateOrUpdateOptionalParams +export interface ContainerAppsDiagnosticsListRevisionsNextOptionalParams extends coreClient.OperationOptions { - /** Certificate to be created or updated */ - certificateEnvelope?: Certificate; + /** The filter to apply on the operation. */ + filter?: string; } -/** Contains response data for the createOrUpdate operation. */ -export type CertificatesCreateOrUpdateResponse = Certificate; +/** Contains response data for the listRevisionsNext operation. */ +export type ContainerAppsDiagnosticsListRevisionsNextResponse = RevisionCollection; /** Optional parameters. */ -export interface CertificatesDeleteOptionalParams +export interface ManagedEnvironmentDiagnosticsListDetectorsOptionalParams extends coreClient.OperationOptions {} +/** Contains response data for the listDetectors operation. */ +export type ManagedEnvironmentDiagnosticsListDetectorsResponse = DiagnosticsCollection; + /** Optional parameters. */ -export interface CertificatesUpdateOptionalParams +export interface ManagedEnvironmentDiagnosticsGetDetectorOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the update operation. */ -export type CertificatesUpdateResponse = Certificate; +/** Contains response data for the getDetector operation. */ +export type ManagedEnvironmentDiagnosticsGetDetectorResponse = Diagnostics; /** Optional parameters. */ -export interface CertificatesListNextOptionalParams +export interface ManagedEnvironmentsDiagnosticsGetRootOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listNext operation. */ -export type CertificatesListNextResponse = CertificateCollection; +/** Contains response data for the getRoot operation. */ +export type ManagedEnvironmentsDiagnosticsGetRootResponse = ManagedEnvironment; /** Optional parameters. */ export interface OperationsListOptionalParams @@ -1920,21 +2158,28 @@ export interface OperationsListNextOptionalParams export type OperationsListNextResponse = AvailableOperations; /** Optional parameters. */ -export interface ContainerAppsSourceControlsListByContainerAppOptionalParams +export interface ManagedEnvironmentsListBySubscriptionOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByContainerApp operation. */ -export type ContainerAppsSourceControlsListByContainerAppResponse = SourceControlCollection; +/** Contains response data for the listBySubscription operation. */ +export type ManagedEnvironmentsListBySubscriptionResponse = ManagedEnvironmentsCollection; /** Optional parameters. */ -export interface ContainerAppsSourceControlsGetOptionalParams +export interface ManagedEnvironmentsListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type ManagedEnvironmentsListByResourceGroupResponse = ManagedEnvironmentsCollection; + +/** Optional parameters. */ +export interface ManagedEnvironmentsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type ContainerAppsSourceControlsGetResponse = SourceControl; +export type ManagedEnvironmentsGetResponse = ManagedEnvironment; /** Optional parameters. */ -export interface ContainerAppsSourceControlsCreateOrUpdateOptionalParams +export interface ManagedEnvironmentsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -1943,10 +2188,10 @@ export interface ContainerAppsSourceControlsCreateOrUpdateOptionalParams } /** Contains response data for the createOrUpdate operation. */ -export type ContainerAppsSourceControlsCreateOrUpdateResponse = SourceControl; +export type ManagedEnvironmentsCreateOrUpdateResponse = ManagedEnvironment; /** Optional parameters. */ -export interface ContainerAppsSourceControlsDeleteOptionalParams +export interface ManagedEnvironmentsDeleteOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -1955,75 +2200,76 @@ export interface ContainerAppsSourceControlsDeleteOptionalParams } /** Optional parameters. */ -export interface ContainerAppsSourceControlsListByContainerAppNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByContainerAppNext operation. */ -export type ContainerAppsSourceControlsListByContainerAppNextResponse = SourceControlCollection; +export interface ManagedEnvironmentsUpdateOptionalParams + 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 DaprComponentsListOptionalParams +export interface ManagedEnvironmentsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the list operation. */ -export type DaprComponentsListResponse = DaprComponentsCollection; +/** Contains response data for the listBySubscriptionNext operation. */ +export type ManagedEnvironmentsListBySubscriptionNextResponse = ManagedEnvironmentsCollection; /** Optional parameters. */ -export interface DaprComponentsGetOptionalParams +export interface ManagedEnvironmentsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type DaprComponentsGetResponse = DaprComponent; +/** Contains response data for the listByResourceGroupNext operation. */ +export type ManagedEnvironmentsListByResourceGroupNextResponse = ManagedEnvironmentsCollection; /** Optional parameters. */ -export interface DaprComponentsCreateOrUpdateOptionalParams +export interface CertificatesListOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the createOrUpdate operation. */ -export type DaprComponentsCreateOrUpdateResponse = DaprComponent; - -/** Optional parameters. */ -export interface DaprComponentsDeleteOptionalParams - extends coreClient.OperationOptions {} +/** Contains response data for the list operation. */ +export type CertificatesListResponse = CertificateCollection; /** Optional parameters. */ -export interface DaprComponentsListNextOptionalParams +export interface CertificatesGetOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listNext operation. */ -export type DaprComponentsListNextResponse = DaprComponentsCollection; +/** Contains response data for the get operation. */ +export type CertificatesGetResponse = Certificate; /** Optional parameters. */ -export interface ContainerAppsAuthConfigsListByContainerAppOptionalParams - extends coreClient.OperationOptions {} +export interface CertificatesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Certificate to be created or updated */ + certificateEnvelope?: Certificate; +} -/** Contains response data for the listByContainerApp operation. */ -export type ContainerAppsAuthConfigsListByContainerAppResponse = AuthConfigCollection; +/** Contains response data for the createOrUpdate operation. */ +export type CertificatesCreateOrUpdateResponse = Certificate; /** Optional parameters. */ -export interface ContainerAppsAuthConfigsGetOptionalParams +export interface CertificatesDeleteOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type ContainerAppsAuthConfigsGetResponse = AuthConfig; - /** Optional parameters. */ -export interface ContainerAppsAuthConfigsCreateOrUpdateOptionalParams +export interface CertificatesUpdateOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the createOrUpdate operation. */ -export type ContainerAppsAuthConfigsCreateOrUpdateResponse = AuthConfig; +/** Contains response data for the update operation. */ +export type CertificatesUpdateResponse = Certificate; /** Optional parameters. */ -export interface ContainerAppsAuthConfigsDeleteOptionalParams +export interface CertificatesListNextOptionalParams extends coreClient.OperationOptions {} +/** Contains response data for the listNext operation. */ +export type CertificatesListNextResponse = CertificateCollection; + /** Optional parameters. */ -export interface ContainerAppsAuthConfigsListByContainerAppNextOptionalParams +export interface NamespacesCheckNameAvailabilityOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByContainerAppNext operation. */ -export type ContainerAppsAuthConfigsListByContainerAppNextResponse = AuthConfigCollection; +/** Contains response data for the checkNameAvailability operation. */ +export type NamespacesCheckNameAvailabilityResponse = CheckNameAvailabilityResponse; /** Optional parameters. */ export interface ManagedEnvironmentsStoragesListOptionalParams @@ -2050,6 +2296,48 @@ export type ManagedEnvironmentsStoragesCreateOrUpdateResponse = ManagedEnvironme export interface ManagedEnvironmentsStoragesDeleteOptionalParams extends coreClient.OperationOptions {} +/** Optional parameters. */ +export interface ContainerAppsSourceControlsListByContainerAppOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByContainerApp operation. */ +export type ContainerAppsSourceControlsListByContainerAppResponse = SourceControlCollection; + +/** Optional parameters. */ +export interface ContainerAppsSourceControlsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ContainerAppsSourceControlsGetResponse = SourceControl; + +/** Optional parameters. */ +export interface ContainerAppsSourceControlsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type ContainerAppsSourceControlsCreateOrUpdateResponse = SourceControl; + +/** Optional parameters. */ +export interface ContainerAppsSourceControlsDeleteOptionalParams + 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 ContainerAppsSourceControlsListByContainerAppNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByContainerAppNext operation. */ +export type ContainerAppsSourceControlsListByContainerAppNextResponse = SourceControlCollection; + /** 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..f1b7822e94ff 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,94 +279,133 @@ 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" + jwtClaimChecks: { + serializedName: "jwtClaimChecks", + type: { + name: "Composite", + className: "JwtClaimChecks" } }, - weight: { - serializedName: "weight", + allowedAudiences: { + serializedName: "allowedAudiences", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - latestRevision: { - defaultValue: false, - serializedName: "latestRevision", + defaultAuthorizationPolicy: { + serializedName: "defaultAuthorizationPolicy", type: { - name: "Boolean" + name: "Composite", + className: "DefaultAuthorizationPolicy" } } } } }; -export const CustomDomain: coreClient.CompositeMapper = { +export const JwtClaimChecks: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CustomDomain", + className: "JwtClaimChecks", modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String" - } - }, - bindingType: { - serializedName: "bindingType", + allowedGroups: { + serializedName: "allowedGroups", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - certificateId: { - serializedName: "certificateId", - required: true, + allowedClientApplications: { + serializedName: "allowedClientApplications", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const RegistryCredentials: coreClient.CompositeMapper = { +export const DefaultAuthorizationPolicy: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RegistryCredentials", + className: "DefaultAuthorizationPolicy", modelProperties: { - server: { - serializedName: "server", + allowedPrincipals: { + serializedName: "allowedPrincipals", type: { - name: "String" + name: "Composite", + className: "AllowedPrincipals" } }, - username: { - serializedName: "username", + allowedApplications: { + serializedName: "allowedApplications", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const AllowedPrincipals: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AllowedPrincipals", + modelProperties: { + groups: { + serializedName: "groups", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - passwordSecretRef: { - serializedName: "passwordSecretRef", + identities: { + serializedName: "identities", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const Dapr: coreClient.CompositeMapper = { +export const Facebook: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Dapr", + className: "Facebook", modelProperties: { enabled: { serializedName: "enabled", @@ -333,207 +413,299 @@ export const Dapr: coreClient.CompositeMapper = { name: "Boolean" } }, - appId: { - serializedName: "appId", + registration: { + serializedName: "registration", type: { - name: "String" + name: "Composite", + className: "AppRegistration" } }, - appProtocol: { - serializedName: "appProtocol", + graphApiVersion: { + serializedName: "graphApiVersion", type: { name: "String" } }, - appPort: { - serializedName: "appPort", + login: { + serializedName: "login", type: { - name: "Number" + name: "Composite", + className: "LoginScopes" } } } } }; -export const Template: coreClient.CompositeMapper = { +export const AppRegistration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Template", + className: "AppRegistration", modelProperties: { - revisionSuffix: { - serializedName: "revisionSuffix", + appId: { + serializedName: "appId", type: { name: "String" } }, - containers: { - serializedName: "containers", + appSecretSettingName: { + serializedName: "appSecretSettingName", + type: { + name: "String" + } + } + } + } +}; + +export const LoginScopes: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LoginScopes", + modelProperties: { + scopes: { + serializedName: "scopes", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "Container" + name: "String" } } } + } + } + } +}; + +export const GitHub: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GitHub", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } }, - scale: { - serializedName: "scale", + registration: { + serializedName: "registration", type: { name: "Composite", - className: "Scale" + className: "ClientRegistration" } }, - volumes: { - serializedName: "volumes", + login: { + serializedName: "login", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Volume" - } - } + name: "Composite", + className: "LoginScopes" } } } } }; -export const Container: coreClient.CompositeMapper = { +export const ClientRegistration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Container", + className: "ClientRegistration", modelProperties: { - image: { - serializedName: "image", + clientId: { + serializedName: "clientId", type: { name: "String" } }, - name: { - serializedName: "name", + clientSecretSettingName: { + serializedName: "clientSecretSettingName", type: { name: "String" } + } + } + } +}; + +export const Google: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Google", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } }, - command: { - serializedName: "command", + registration: { + serializedName: "registration", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "ClientRegistration" } }, - args: { - serializedName: "args", + login: { + serializedName: "login", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "LoginScopes" } }, - env: { - serializedName: "env", + 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: "EnvironmentVar" + name: "String" } } } + } + } + } +}; + +export const Twitter: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Twitter", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } }, - resources: { - serializedName: "resources", + registration: { + serializedName: "registration", type: { name: "Composite", - className: "ContainerResources" + className: "TwitterRegistration" + } + } + } + } +}; + +export const TwitterRegistration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TwitterRegistration", + modelProperties: { + consumerKey: { + serializedName: "consumerKey", + type: { + name: "String" } }, - probes: { - serializedName: "probes", + consumerSecretSettingName: { + serializedName: "consumerSecretSettingName", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ContainerAppProbe" - } - } + name: "String" + } + } + } + } +}; + +export const Apple: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Apple", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" } }, - volumeMounts: { - serializedName: "volumeMounts", + registration: { + serializedName: "registration", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VolumeMount" - } - } + name: "Composite", + className: "AppleRegistration" + } + }, + login: { + serializedName: "login", + type: { + name: "Composite", + className: "LoginScopes" } } } } }; -export const EnvironmentVar: coreClient.CompositeMapper = { +export const AppleRegistration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "EnvironmentVar", + className: "AppleRegistration", modelProperties: { - name: { - serializedName: "name", + clientId: { + serializedName: "clientId", type: { name: "String" } }, - value: { - serializedName: "value", + clientSecretSettingName: { + serializedName: "clientSecretSettingName", type: { name: "String" } + } + } + } +}; + +export const AzureStaticWebApps: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AzureStaticWebApps", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } }, - secretRef: { - serializedName: "secretRef", + registration: { + serializedName: "registration", type: { - name: "String" + name: "Composite", + className: "AzureStaticWebAppsRegistration" } } } } }; -export const ContainerResources: coreClient.CompositeMapper = { +export const AzureStaticWebAppsRegistration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerResources", + className: "AzureStaticWebAppsRegistration", modelProperties: { - cpu: { - serializedName: "cpu", - type: { - name: "Number" - } - }, - memory: { - serializedName: "memory", - type: { - name: "String" - } - }, - ephemeralStorage: { - serializedName: "ephemeralStorage", - readOnly: true, + clientId: { + serializedName: "clientId", type: { name: "String" } @@ -542,132 +714,79 @@ export const ContainerResources: coreClient.CompositeMapper = { } }; -export const ContainerAppProbe: coreClient.CompositeMapper = { +export const CustomOpenIdConnectProvider: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerAppProbe", + className: "CustomOpenIdConnectProvider", modelProperties: { - failureThreshold: { - serializedName: "failureThreshold", + enabled: { + serializedName: "enabled", type: { - name: "Number" + name: "Boolean" } }, - httpGet: { - serializedName: "httpGet", + registration: { + serializedName: "registration", type: { name: "Composite", - className: "ContainerAppProbeHttpGet" - } - }, - initialDelaySeconds: { - serializedName: "initialDelaySeconds", - type: { - name: "Number" - } - }, - periodSeconds: { - serializedName: "periodSeconds", - type: { - name: "Number" - } - }, - successThreshold: { - serializedName: "successThreshold", - type: { - name: "Number" + className: "OpenIdConnectRegistration" } }, - tcpSocket: { - serializedName: "tcpSocket", + login: { + serializedName: "login", type: { name: "Composite", - className: "ContainerAppProbeTcpSocket" - } - }, - terminationGracePeriodSeconds: { - serializedName: "terminationGracePeriodSeconds", - type: { - name: "Number" - } - }, - timeoutSeconds: { - serializedName: "timeoutSeconds", - type: { - name: "Number" - } - }, - type: { - serializedName: "type", - type: { - name: "String" + className: "OpenIdConnectLogin" } } } } }; -export const ContainerAppProbeHttpGet: coreClient.CompositeMapper = { +export const OpenIdConnectRegistration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerAppProbeHttpGet", + className: "OpenIdConnectRegistration", modelProperties: { - host: { - serializedName: "host", - type: { - name: "String" - } - }, - httpHeaders: { - serializedName: "httpHeaders", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ContainerAppProbeHttpGetHttpHeadersItem" - } - } - } - }, - path: { - serializedName: "path", + clientId: { + serializedName: "clientId", type: { name: "String" } }, - port: { - serializedName: "port", - required: true, + clientCredential: { + serializedName: "clientCredential", type: { - name: "Number" + name: "Composite", + className: "OpenIdConnectClientCredential" } }, - scheme: { - serializedName: "scheme", + openIdConnectConfiguration: { + serializedName: "openIdConnectConfiguration", type: { - name: "String" + name: "Composite", + className: "OpenIdConnectConfig" } } } } }; -export const ContainerAppProbeHttpGetHttpHeadersItem: coreClient.CompositeMapper = { +export const OpenIdConnectClientCredential: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerAppProbeHttpGetHttpHeadersItem", + className: "OpenIdConnectClientCredential", modelProperties: { - name: { - serializedName: "name", - required: true, + method: { + defaultValue: "ClientSecretPost", + isConstant: true, + serializedName: "method", type: { name: "String" } }, - value: { - serializedName: "value", - required: true, + clientSecretSettingName: { + serializedName: "clientSecretSettingName", type: { name: "String" } @@ -676,41 +795,37 @@ export const ContainerAppProbeHttpGetHttpHeadersItem: coreClient.CompositeMapper } }; -export const ContainerAppProbeTcpSocket: coreClient.CompositeMapper = { +export const OpenIdConnectConfig: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerAppProbeTcpSocket", + className: "OpenIdConnectConfig", modelProperties: { - host: { - serializedName: "host", + authorizationEndpoint: { + serializedName: "authorizationEndpoint", type: { name: "String" } }, - port: { - serializedName: "port", - required: true, + tokenEndpoint: { + serializedName: "tokenEndpoint", type: { - name: "Number" + name: "String" } - } - } - } -}; - -export const VolumeMount: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VolumeMount", - modelProperties: { - volumeName: { - serializedName: "volumeName", + }, + issuer: { + serializedName: "issuer", type: { name: "String" } }, - mountPath: { - serializedName: "mountPath", + certificationUri: { + serializedName: "certificationUri", + type: { + name: "String" + } + }, + wellKnownOpenIdConfiguration: { + serializedName: "wellKnownOpenIdConfiguration", type: { name: "String" } @@ -719,31 +834,24 @@ export const VolumeMount: coreClient.CompositeMapper = { } }; -export const Scale: coreClient.CompositeMapper = { +export const OpenIdConnectLogin: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Scale", + className: "OpenIdConnectLogin", modelProperties: { - minReplicas: { - serializedName: "minReplicas", - type: { - name: "Number" - } - }, - maxReplicas: { - serializedName: "maxReplicas", + nameClaimType: { + serializedName: "nameClaimType", type: { - name: "Number" + name: "String" } }, - rules: { - serializedName: "rules", + scopes: { + serializedName: "scopes", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "ScaleRule" + name: "String" } } } @@ -752,88 +860,103 @@ export const Scale: coreClient.CompositeMapper = { } }; -export const ScaleRule: coreClient.CompositeMapper = { +export const Login: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ScaleRule", + className: "Login", modelProperties: { - name: { - serializedName: "name", + routes: { + serializedName: "routes", type: { - name: "String" + name: "Composite", + className: "LoginRoutes" } }, - azureQueue: { - serializedName: "azureQueue", + preserveUrlFragmentsForLogins: { + serializedName: "preserveUrlFragmentsForLogins", type: { - name: "Composite", - className: "QueueScaleRule" + name: "Boolean" } }, - custom: { - serializedName: "custom", + allowedExternalRedirectUrls: { + serializedName: "allowedExternalRedirectUrls", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + cookieExpiration: { + serializedName: "cookieExpiration", type: { name: "Composite", - className: "CustomScaleRule" + className: "CookieExpiration" } }, - http: { - serializedName: "http", + nonce: { + serializedName: "nonce", + type: { + name: "Composite", + className: "Nonce" + } + } + } + } +}; + +export const LoginRoutes: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LoginRoutes", + modelProperties: { + logoutEndpoint: { + serializedName: "logoutEndpoint", type: { - name: "Composite", - className: "HttpScaleRule" + name: "String" } } } } }; -export const QueueScaleRule: coreClient.CompositeMapper = { +export const CookieExpiration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "QueueScaleRule", + className: "CookieExpiration", modelProperties: { - queueName: { - serializedName: "queueName", - type: { - name: "String" - } - }, - queueLength: { - serializedName: "queueLength", + convention: { + serializedName: "convention", type: { - name: "Number" + name: "Enum", + allowedValues: ["FixedTime", "IdentityProviderDerived"] } }, - auth: { - serializedName: "auth", + timeToExpiration: { + serializedName: "timeToExpiration", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ScaleRuleAuth" - } - } + name: "String" } } } } }; -export const ScaleRuleAuth: coreClient.CompositeMapper = { +export const Nonce: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ScaleRuleAuth", + className: "Nonce", modelProperties: { - secretRef: { - serializedName: "secretRef", + validateNonce: { + serializedName: "validateNonce", type: { - name: "String" + name: "Boolean" } }, - triggerParameter: { - serializedName: "triggerParameter", + nonceExpirationInterval: { + serializedName: "nonceExpirationInterval", type: { name: "String" } @@ -842,87 +965,70 @@ export const ScaleRuleAuth: coreClient.CompositeMapper = { } }; -export const CustomScaleRule: coreClient.CompositeMapper = { +export const HttpSettings: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CustomScaleRule", + className: "HttpSettings", modelProperties: { - type: { - serializedName: "type", + requireHttps: { + serializedName: "requireHttps", type: { - name: "String" + name: "Boolean" } }, - metadata: { - serializedName: "metadata", + routes: { + serializedName: "routes", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "Composite", + className: "HttpSettingsRoutes" } }, - auth: { - serializedName: "auth", + forwardProxy: { + serializedName: "forwardProxy", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ScaleRuleAuth" - } - } + name: "Composite", + className: "ForwardProxy" } } } } }; -export const HttpScaleRule: coreClient.CompositeMapper = { +export const HttpSettingsRoutes: coreClient.CompositeMapper = { type: { name: "Composite", - className: "HttpScaleRule", + className: "HttpSettingsRoutes", modelProperties: { - metadata: { - serializedName: "metadata", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - auth: { - serializedName: "auth", + apiPrefix: { + serializedName: "apiPrefix", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ScaleRuleAuth" - } - } + name: "String" } } } } }; -export const Volume: coreClient.CompositeMapper = { +export const ForwardProxy: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Volume", + className: "ForwardProxy", modelProperties: { - name: { - serializedName: "name", + convention: { + serializedName: "convention", type: { - name: "String" + name: "Enum", + allowedValues: ["NoProxy", "Standard", "Custom"] } }, - storageType: { - serializedName: "storageType", + customHostHeaderName: { + serializedName: "customHostHeaderName", type: { name: "String" } }, - storageName: { - serializedName: "storageName", + customProtoHeaderName: { + serializedName: "customProtoHeaderName", type: { name: "String" } @@ -1108,26 +1214,10 @@ export const DefaultErrorResponseErrorDetailsItem: coreClient.CompositeMapper = } }; -export const ContainerAppPatch: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ContainerAppPatch", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - } - } - } -}; - -export const SecretsCollection: coreClient.CompositeMapper = { +export const ContainerAppCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SecretsCollection", + className: "ContainerAppCollection", modelProperties: { value: { serializedName: "value", @@ -1137,149 +1227,150 @@ export const SecretsCollection: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ContainerAppSecret" + className: "ContainerApp" } } } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } } } } }; -export const ContainerAppSecret: coreClient.CompositeMapper = { +export const ManagedServiceIdentity: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerAppSecret", + className: "ManagedServiceIdentity", modelProperties: { - name: { - serializedName: "name", + principalId: { + serializedName: "principalId", readOnly: true, type: { - name: "String" + name: "Uuid" } }, - value: { - serializedName: "value", + tenantId: { + serializedName: "tenantId", readOnly: true, + type: { + name: "Uuid" + } + }, + type: { + serializedName: "type", + required: true, type: { name: "String" } + }, + userAssignedIdentities: { + serializedName: "userAssignedIdentities", + type: { + name: "Dictionary", + value: { + type: { name: "Composite", className: "UserAssignedIdentity" } + } + } } } } }; -export const RevisionCollection: coreClient.CompositeMapper = { +export const UserAssignedIdentity: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RevisionCollection", + className: "UserAssignedIdentity", modelProperties: { - value: { - serializedName: "value", - required: true, + principalId: { + serializedName: "principalId", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Revision" - } - } + name: "Uuid" } }, - nextLink: { - serializedName: "nextLink", + clientId: { + serializedName: "clientId", readOnly: true, type: { - name: "String" + name: "Uuid" } } } } }; -export const ReplicaContainer: coreClient.CompositeMapper = { +export const Configuration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ReplicaContainer", + className: "Configuration", modelProperties: { - name: { - serializedName: "name", + secrets: { + serializedName: "secrets", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Secret" + } + } } }, - containerId: { - serializedName: "containerId", + activeRevisionsMode: { + serializedName: "activeRevisionsMode", type: { name: "String" } }, - ready: { - serializedName: "ready", - type: { - name: "Boolean" - } - }, - started: { - serializedName: "started", + ingress: { + serializedName: "ingress", type: { - name: "Boolean" + name: "Composite", + className: "Ingress" } }, - restartCount: { - serializedName: "restartCount", - type: { - name: "Number" - } - } - } - } -}; - -export const ReplicaCollection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ReplicaCollection", - modelProperties: { - value: { - serializedName: "value", - required: true, + registries: { + serializedName: "registries", type: { name: "Sequence", element: { type: { name: "Composite", - className: "Replica" + className: "RegistryCredentials" } } } + }, + dapr: { + serializedName: "dapr", + type: { + name: "Composite", + className: "Dapr" + } } } } }; -export const ManagedEnvironmentsCollection: coreClient.CompositeMapper = { +export const Secret: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedEnvironmentsCollection", + className: "Secret", modelProperties: { - value: { - serializedName: "value", - required: true, + name: { + serializedName: "name", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ManagedEnvironment" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + value: { + serializedName: "value", type: { name: "String" } @@ -1288,86 +1379,97 @@ export const ManagedEnvironmentsCollection: coreClient.CompositeMapper = { } }; -export const VnetConfiguration: coreClient.CompositeMapper = { +export const Ingress: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VnetConfiguration", + className: "Ingress", modelProperties: { - internal: { - serializedName: "internal", + fqdn: { + serializedName: "fqdn", + readOnly: true, + type: { + name: "String" + } + }, + external: { + defaultValue: false, + serializedName: "external", type: { name: "Boolean" } }, - infrastructureSubnetId: { - serializedName: "infrastructureSubnetId", + targetPort: { + serializedName: "targetPort", type: { - name: "String" + name: "Number" } }, - runtimeSubnetId: { - serializedName: "runtimeSubnetId", + transport: { + serializedName: "transport", type: { name: "String" } }, - dockerBridgeCidr: { - serializedName: "dockerBridgeCidr", + traffic: { + serializedName: "traffic", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TrafficWeight" + } + } } }, - platformReservedCidr: { - serializedName: "platformReservedCidr", + customDomains: { + serializedName: "customDomains", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CustomDomain" + } + } } }, - platformReservedDnsIP: { - serializedName: "platformReservedDnsIP", + allowInsecure: { + serializedName: "allowInsecure", type: { - name: "String" + name: "Boolean" } } } } }; -export const AppLogsConfiguration: coreClient.CompositeMapper = { +export const TrafficWeight: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AppLogsConfiguration", + className: "TrafficWeight", modelProperties: { - destination: { - serializedName: "destination", + revisionName: { + serializedName: "revisionName", type: { name: "String" } }, - logAnalyticsConfiguration: { - serializedName: "logAnalyticsConfiguration", + weight: { + serializedName: "weight", type: { - name: "Composite", - className: "LogAnalyticsConfiguration" + name: "Number" } - } - } - } -}; - -export const LogAnalyticsConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LogAnalyticsConfiguration", - modelProperties: { - customerId: { - serializedName: "customerId", + }, + latestRevision: { + defaultValue: false, + serializedName: "latestRevision", type: { - name: "String" + name: "Boolean" } }, - sharedKey: { - serializedName: "sharedKey", + label: { + serializedName: "label", type: { name: "String" } @@ -1376,43 +1478,27 @@ export const LogAnalyticsConfiguration: coreClient.CompositeMapper = { } }; -export const ManagedEnvironmentPatch: coreClient.CompositeMapper = { +export const CustomDomain: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedEnvironmentPatch", + className: "CustomDomain", modelProperties: { - tags: { - serializedName: "tags", + name: { + serializedName: "name", + required: true, type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" } - } - } - } -}; - -export const CertificateCollection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CertificateCollection", - modelProperties: { - value: { - serializedName: "value", - required: true, + }, + bindingType: { + serializedName: "bindingType", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Certificate" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + certificateId: { + serializedName: "certificateId", + required: true, type: { name: "String" } @@ -1421,185 +1507,223 @@ export const CertificateCollection: coreClient.CompositeMapper = { } }; -export const CertificateProperties: coreClient.CompositeMapper = { +export const RegistryCredentials: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CertificateProperties", + className: "RegistryCredentials", modelProperties: { - provisioningState: { - serializedName: "provisioningState", - readOnly: true, + server: { + serializedName: "server", type: { name: "String" } }, - password: { - serializedName: "password", + username: { + serializedName: "username", type: { name: "String" } }, - subjectName: { - serializedName: "subjectName", - readOnly: true, + passwordSecretRef: { + serializedName: "passwordSecretRef", type: { name: "String" } }, - value: { - serializedName: "value", - type: { - name: "ByteArray" - } - }, - issuer: { - serializedName: "issuer", - readOnly: true, + identity: { + serializedName: "identity", type: { name: "String" } - }, - issueDate: { - serializedName: "issueDate", - readOnly: true, - type: { - name: "DateTime" - } - }, - expirationDate: { - serializedName: "expirationDate", - readOnly: true, + } + } + } +}; + +export const Dapr: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Dapr", + modelProperties: { + enabled: { + serializedName: "enabled", type: { - name: "DateTime" + name: "Boolean" } }, - thumbprint: { - serializedName: "thumbprint", - readOnly: true, + appId: { + serializedName: "appId", type: { name: "String" } }, - valid: { - serializedName: "valid", - readOnly: true, + appProtocol: { + serializedName: "appProtocol", type: { - name: "Boolean" + name: "String" } }, - publicKeyHash: { - serializedName: "publicKeyHash", - readOnly: true, + appPort: { + serializedName: "appPort", type: { - name: "String" + name: "Number" } } } } }; -export const CertificatePatch: coreClient.CompositeMapper = { +export const Template: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CertificatePatch", + className: "Template", modelProperties: { - tags: { - serializedName: "tags", + revisionSuffix: { + serializedName: "revisionSuffix", type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - } - } - } -}; - -export const AvailableOperations: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AvailableOperations", - modelProperties: { - value: { - serializedName: "value", + name: "String" + } + }, + containers: { + serializedName: "containers", type: { name: "Sequence", element: { type: { name: "Composite", - className: "OperationDetail" + className: "Container" } } } }, - nextLink: { - serializedName: "nextLink", + scale: { + serializedName: "scale", type: { - name: "String" + name: "Composite", + className: "Scale" + } + }, + volumes: { + serializedName: "volumes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Volume" + } + } } } } } }; -export const OperationDetail: coreClient.CompositeMapper = { +export const Container: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationDetail", + className: "Container", modelProperties: { + image: { + serializedName: "image", + type: { + name: "String" + } + }, name: { serializedName: "name", type: { name: "String" } }, - isDataAction: { - serializedName: "isDataAction", + command: { + serializedName: "command", type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - display: { - serializedName: "display", + args: { + serializedName: "args", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + env: { + serializedName: "env", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EnvironmentVar" + } + } + } + }, + resources: { + serializedName: "resources", type: { name: "Composite", - className: "OperationDisplay" + className: "ContainerResources" } }, - origin: { - serializedName: "origin", + probes: { + serializedName: "probes", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContainerAppProbe" + } + } + } + }, + volumeMounts: { + serializedName: "volumeMounts", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VolumeMount" + } + } } } } } }; -export const OperationDisplay: coreClient.CompositeMapper = { +export const EnvironmentVar: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationDisplay", + className: "EnvironmentVar", modelProperties: { - provider: { - serializedName: "provider", - type: { - name: "String" - } - }, - resource: { - serializedName: "resource", + name: { + serializedName: "name", type: { name: "String" } }, - operation: { - serializedName: "operation", + value: { + serializedName: "value", type: { name: "String" } }, - description: { - serializedName: "description", + secretRef: { + serializedName: "secretRef", type: { name: "String" } @@ -1608,26 +1732,25 @@ export const OperationDisplay: coreClient.CompositeMapper = { } }; -export const SourceControlCollection: coreClient.CompositeMapper = { +export const ContainerResources: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SourceControlCollection", + className: "ContainerResources", modelProperties: { - value: { - serializedName: "value", - required: true, + cpu: { + serializedName: "cpu", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SourceControl" - } - } + name: "Number" } }, - nextLink: { - serializedName: "nextLink", + memory: { + serializedName: "memory", + type: { + name: "String" + } + }, + ephemeralStorage: { + serializedName: "ephemeralStorage", readOnly: true, type: { name: "String" @@ -1637,51 +1760,63 @@ export const SourceControlCollection: coreClient.CompositeMapper = { } }; -export const GithubActionConfiguration: coreClient.CompositeMapper = { +export const ContainerAppProbe: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GithubActionConfiguration", + className: "ContainerAppProbe", modelProperties: { - registryInfo: { - serializedName: "registryInfo", + failureThreshold: { + serializedName: "failureThreshold", type: { - name: "Composite", - className: "RegistryInfo" + name: "Number" } }, - azureCredentials: { - serializedName: "azureCredentials", + httpGet: { + serializedName: "httpGet", type: { name: "Composite", - className: "AzureCredentials" + className: "ContainerAppProbeHttpGet" } }, - dockerfilePath: { - serializedName: "dockerfilePath", + initialDelaySeconds: { + serializedName: "initialDelaySeconds", type: { - name: "String" + name: "Number" } }, - publishType: { - serializedName: "publishType", + periodSeconds: { + serializedName: "periodSeconds", type: { - name: "String" + name: "Number" } }, - os: { - serializedName: "os", + successThreshold: { + serializedName: "successThreshold", type: { - name: "String" + name: "Number" } }, - runtimeStack: { - serializedName: "runtimeStack", + tcpSocket: { + serializedName: "tcpSocket", type: { - name: "String" + name: "Composite", + className: "ContainerAppProbeTcpSocket" } }, - runtimeVersion: { - serializedName: "runtimeVersion", + terminationGracePeriodSeconds: { + serializedName: "terminationGracePeriodSeconds", + type: { + name: "Number" + } + }, + timeoutSeconds: { + serializedName: "timeoutSeconds", + type: { + name: "Number" + } + }, + type: { + serializedName: "type", type: { name: "String" } @@ -1690,25 +1825,67 @@ export const GithubActionConfiguration: coreClient.CompositeMapper = { } }; -export const RegistryInfo: coreClient.CompositeMapper = { +export const ContainerAppProbeHttpGet: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RegistryInfo", + className: "ContainerAppProbeHttpGet", modelProperties: { - registryUrl: { - serializedName: "registryUrl", + host: { + serializedName: "host", type: { name: "String" } }, - registryUserName: { - serializedName: "registryUserName", + httpHeaders: { + serializedName: "httpHeaders", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContainerAppProbeHttpGetHttpHeadersItem" + } + } + } + }, + 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 = { + type: { + name: "Composite", + className: "ContainerAppProbeHttpGetHttpHeadersItem", + modelProperties: { + name: { + serializedName: "name", + required: true, type: { name: "String" } }, - registryPassword: { - serializedName: "registryPassword", + value: { + serializedName: "value", + required: true, type: { name: "String" } @@ -1717,31 +1894,41 @@ export const RegistryInfo: coreClient.CompositeMapper = { } }; -export const AzureCredentials: coreClient.CompositeMapper = { +export const ContainerAppProbeTcpSocket: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AzureCredentials", + className: "ContainerAppProbeTcpSocket", modelProperties: { - clientId: { - serializedName: "clientId", + host: { + serializedName: "host", type: { name: "String" } }, - clientSecret: { - serializedName: "clientSecret", + port: { + serializedName: "port", + required: true, type: { - name: "String" + name: "Number" } - }, - tenantId: { - serializedName: "tenantId", + } + } + } +}; + +export const VolumeMount: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VolumeMount", + modelProperties: { + volumeName: { + serializedName: "volumeName", type: { name: "String" } }, - subscriptionId: { - serializedName: "subscriptionId", + mountPath: { + serializedName: "mountPath", type: { name: "String" } @@ -1750,39 +1937,43 @@ export const AzureCredentials: coreClient.CompositeMapper = { } }; -export const DaprComponentsCollection: coreClient.CompositeMapper = { +export const Scale: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DaprComponentsCollection", + className: "Scale", modelProperties: { - value: { - serializedName: "value", - required: true, + minReplicas: { + serializedName: "minReplicas", + type: { + name: "Number" + } + }, + maxReplicas: { + serializedName: "maxReplicas", + type: { + name: "Number" + } + }, + rules: { + serializedName: "rules", type: { name: "Sequence", element: { type: { name: "Composite", - className: "DaprComponent" + className: "ScaleRule" } } } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } } } } }; -export const DaprMetadata: coreClient.CompositeMapper = { +export const ScaleRule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DaprMetadata", + className: "ScaleRule", modelProperties: { name: { serializedName: "name", @@ -1790,64 +1981,77 @@ export const DaprMetadata: coreClient.CompositeMapper = { name: "String" } }, - value: { - serializedName: "value", + azureQueue: { + serializedName: "azureQueue", type: { - name: "String" + name: "Composite", + className: "QueueScaleRule" } }, - secretRef: { - serializedName: "secretRef", + custom: { + serializedName: "custom", type: { - name: "String" + name: "Composite", + className: "CustomScaleRule" + } + }, + http: { + serializedName: "http", + type: { + name: "Composite", + className: "HttpScaleRule" } } } } }; -export const AuthConfigCollection: coreClient.CompositeMapper = { +export const QueueScaleRule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AuthConfigCollection", + className: "QueueScaleRule", modelProperties: { - value: { - serializedName: "value", - required: true, + queueName: { + serializedName: "queueName", + type: { + name: "String" + } + }, + queueLength: { + serializedName: "queueLength", + type: { + name: "Number" + } + }, + auth: { + serializedName: "auth", type: { name: "Sequence", element: { type: { name: "Composite", - className: "AuthConfig" + className: "ScaleRuleAuth" } } } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } } } } }; -export const AuthPlatform: coreClient.CompositeMapper = { +export const ScaleRuleAuth: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AuthPlatform", + className: "ScaleRuleAuth", modelProperties: { - enabled: { - serializedName: "enabled", + secretRef: { + serializedName: "secretRef", type: { - name: "Boolean" + name: "String" } }, - runtimeVersion: { - serializedName: "runtimeVersion", + triggerParameter: { + serializedName: "triggerParameter", type: { name: "String" } @@ -1856,36 +2060,32 @@ export const AuthPlatform: coreClient.CompositeMapper = { } }; -export const GlobalValidation: coreClient.CompositeMapper = { +export const CustomScaleRule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GlobalValidation", + className: "CustomScaleRule", modelProperties: { - unauthenticatedClientAction: { - serializedName: "unauthenticatedClientAction", + type: { + serializedName: "type", type: { - name: "Enum", - allowedValues: [ - "RedirectToLoginPage", - "AllowAnonymous", - "Return401", - "Return403" - ] + name: "String" } }, - redirectToProvider: { - serializedName: "redirectToProvider", + metadata: { + serializedName: "metadata", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } } }, - excludedPaths: { - serializedName: "excludedPaths", + auth: { + serializedName: "auth", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "ScaleRuleAuth" } } } @@ -1894,68 +2094,75 @@ export const GlobalValidation: coreClient.CompositeMapper = { } }; -export const IdentityProviders: coreClient.CompositeMapper = { +export const HttpScaleRule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "IdentityProviders", + className: "HttpScaleRule", modelProperties: { - azureActiveDirectory: { - serializedName: "azureActiveDirectory", - type: { - name: "Composite", - className: "AzureActiveDirectory" - } - }, - facebook: { - serializedName: "facebook", - type: { - name: "Composite", - className: "Facebook" - } - }, - gitHub: { - serializedName: "gitHub", + metadata: { + serializedName: "metadata", type: { - name: "Composite", - className: "GitHub" + name: "Dictionary", + value: { type: { name: "String" } } } }, - google: { - serializedName: "google", + auth: { + serializedName: "auth", type: { - name: "Composite", - className: "Google" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScaleRuleAuth" + } + } } - }, - twitter: { - serializedName: "twitter", + } + } + } +}; + +export const Volume: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Volume", + modelProperties: { + name: { + serializedName: "name", type: { - name: "Composite", - className: "Twitter" + name: "String" } }, - apple: { - serializedName: "apple", + storageType: { + serializedName: "storageType", type: { - name: "Composite", - className: "Apple" + name: "String" } }, - azureStaticWebApps: { - serializedName: "azureStaticWebApps", + storageName: { + serializedName: "storageName", type: { - name: "Composite", - className: "AzureStaticWebApps" + name: "String" } - }, - customOpenIdConnectProviders: { - serializedName: "customOpenIdConnectProviders", + } + } + } +}; + +export const SecretsCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SecretsCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, type: { - name: "Dictionary", - value: { + name: "Sequence", + element: { type: { name: "Composite", - className: "CustomOpenIdConnectProvider" + className: "ContainerAppSecret" } } } @@ -1964,203 +2171,189 @@ export const IdentityProviders: coreClient.CompositeMapper = { } }; -export const AzureActiveDirectory: coreClient.CompositeMapper = { +export const ContainerAppSecret: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AzureActiveDirectory", + className: "ContainerAppSecret", modelProperties: { - enabled: { - serializedName: "enabled", - type: { - name: "Boolean" - } - }, - registration: { - serializedName: "registration", + name: { + serializedName: "name", + readOnly: true, type: { - name: "Composite", - className: "AzureActiveDirectoryRegistration" + name: "String" } }, - login: { - serializedName: "login", + value: { + serializedName: "value", + readOnly: true, type: { - name: "Composite", - className: "AzureActiveDirectoryLogin" + name: "String" } - }, - validation: { - serializedName: "validation", + } + } + } +}; + +export const RevisionCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RevisionCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, type: { - name: "Composite", - className: "AzureActiveDirectoryValidation" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Revision" + } + } } }, - isAutoProvisioned: { - serializedName: "isAutoProvisioned", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { - name: "Boolean" + name: "String" } } } } }; -export const AzureActiveDirectoryRegistration: coreClient.CompositeMapper = { +export const ReplicaContainer: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AzureActiveDirectoryRegistration", + className: "ReplicaContainer", modelProperties: { - openIdIssuer: { - serializedName: "openIdIssuer", - type: { - name: "String" - } - }, - clientId: { - serializedName: "clientId", + name: { + serializedName: "name", type: { name: "String" } }, - clientSecretSettingName: { - serializedName: "clientSecretSettingName", + containerId: { + serializedName: "containerId", type: { name: "String" } }, - clientSecretCertificateThumbprint: { - serializedName: "clientSecretCertificateThumbprint", + ready: { + serializedName: "ready", type: { - name: "String" + name: "Boolean" } }, - clientSecretCertificateSubjectAlternativeName: { - serializedName: "clientSecretCertificateSubjectAlternativeName", + started: { + serializedName: "started", type: { - name: "String" + name: "Boolean" } }, - clientSecretCertificateIssuer: { - serializedName: "clientSecretCertificateIssuer", + restartCount: { + serializedName: "restartCount", type: { - name: "String" + name: "Number" } } } } }; -export const AzureActiveDirectoryLogin: coreClient.CompositeMapper = { +export const ReplicaCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AzureActiveDirectoryLogin", + className: "ReplicaCollection", modelProperties: { - loginParameters: { - serializedName: "loginParameters", + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "Replica" } } } - }, - disableWWWAuthenticate: { - serializedName: "disableWWWAuthenticate", - type: { - name: "Boolean" - } } } } }; -export const AzureActiveDirectoryValidation: coreClient.CompositeMapper = { +export const DaprComponentsCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AzureActiveDirectoryValidation", + className: "DaprComponentsCollection", modelProperties: { - jwtClaimChecks: { - serializedName: "jwtClaimChecks", - type: { - name: "Composite", - className: "JwtClaimChecks" - } - }, - allowedAudiences: { - serializedName: "allowedAudiences", + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "DaprComponent" } } } }, - defaultAuthorizationPolicy: { - serializedName: "defaultAuthorizationPolicy", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { - name: "Composite", - className: "DefaultAuthorizationPolicy" + name: "String" } } } } }; -export const JwtClaimChecks: coreClient.CompositeMapper = { +export const DaprMetadata: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JwtClaimChecks", + className: "DaprMetadata", modelProperties: { - allowedGroups: { - serializedName: "allowedGroups", + name: { + serializedName: "name", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } }, - allowedClientApplications: { - serializedName: "allowedClientApplications", + value: { + serializedName: "value", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" + } + }, + secretRef: { + serializedName: "secretRef", + type: { + name: "String" } } } } }; -export const DefaultAuthorizationPolicy: coreClient.CompositeMapper = { +export const DaprSecretsCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DefaultAuthorizationPolicy", + className: "DaprSecretsCollection", modelProperties: { - allowedPrincipals: { - serializedName: "allowedPrincipals", - type: { - name: "Composite", - className: "AllowedPrincipals" - } - }, - allowedApplications: { - serializedName: "allowedApplications", + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "Secret" } } } @@ -2169,155 +2362,173 @@ export const DefaultAuthorizationPolicy: coreClient.CompositeMapper = { } }; -export const AllowedPrincipals: coreClient.CompositeMapper = { +export const DiagnosticsCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AllowedPrincipals", + className: "DiagnosticsCollection", modelProperties: { - groups: { - serializedName: "groups", + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "Diagnostics" } } } }, - identities: { - serializedName: "identities", + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const DiagnosticsProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiagnosticsProperties", + modelProperties: { + metadata: { + serializedName: "metadata", + type: { + name: "Composite", + className: "DiagnosticsDefinition" + } + }, + dataset: { + serializedName: "dataset", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "DiagnosticsDataApiResponse" } } } + }, + status: { + serializedName: "status", + type: { + name: "Composite", + className: "DiagnosticsStatus" + } + }, + dataProviderMetadata: { + serializedName: "dataProviderMetadata", + type: { + name: "Composite", + className: "DiagnosticDataProviderMetadata" + } } } } }; -export const Facebook: coreClient.CompositeMapper = { +export const DiagnosticsDefinition: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Facebook", + className: "DiagnosticsDefinition", modelProperties: { - enabled: { - serializedName: "enabled", + id: { + serializedName: "id", + readOnly: true, type: { - name: "Boolean" + name: "String" } }, - registration: { - serializedName: "registration", + name: { + serializedName: "name", + readOnly: true, type: { - name: "Composite", - className: "AppRegistration" + name: "String" } }, - graphApiVersion: { - serializedName: "graphApiVersion", + description: { + serializedName: "description", + readOnly: true, type: { name: "String" } }, - login: { - serializedName: "login", - type: { - name: "Composite", - className: "LoginScopes" - } - } - } - } -}; - -export const AppRegistration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AppRegistration", - modelProperties: { - appId: { - serializedName: "appId", + author: { + serializedName: "author", + readOnly: true, type: { name: "String" } }, - appSecretSettingName: { - serializedName: "appSecretSettingName", + category: { + serializedName: "category", + readOnly: true, type: { name: "String" } - } - } - } -}; - -export const LoginScopes: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LoginScopes", - modelProperties: { - scopes: { - serializedName: "scopes", + }, + supportTopicList: { + serializedName: "supportTopicList", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "DiagnosticSupportTopic" } } } - } - } - } -}; - -export const GitHub: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GitHub", - modelProperties: { - enabled: { - serializedName: "enabled", + }, + analysisTypes: { + serializedName: "analysisTypes", type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - registration: { - serializedName: "registration", + type: { + serializedName: "type", + readOnly: true, type: { - name: "Composite", - className: "ClientRegistration" + name: "String" } }, - login: { - serializedName: "login", + score: { + serializedName: "score", + readOnly: true, type: { - name: "Composite", - className: "LoginScopes" + name: "Number" } } } } }; -export const ClientRegistration: coreClient.CompositeMapper = { +export const DiagnosticSupportTopic: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ClientRegistration", + className: "DiagnosticSupportTopic", modelProperties: { - clientId: { - serializedName: "clientId", + id: { + serializedName: "id", + readOnly: true, type: { name: "String" } }, - clientSecretSettingName: { - serializedName: "clientSecretSettingName", + pesId: { + serializedName: "pesId", + readOnly: true, type: { name: "String" } @@ -2326,97 +2537,87 @@ export const ClientRegistration: coreClient.CompositeMapper = { } }; -export const Google: coreClient.CompositeMapper = { +export const DiagnosticsDataApiResponse: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Google", + className: "DiagnosticsDataApiResponse", modelProperties: { - enabled: { - serializedName: "enabled", - type: { - name: "Boolean" - } - }, - registration: { - serializedName: "registration", - type: { - name: "Composite", - className: "ClientRegistration" - } - }, - login: { - serializedName: "login", + table: { + serializedName: "table", type: { name: "Composite", - className: "LoginScopes" + className: "DiagnosticDataTableResponseObject" } }, - validation: { - serializedName: "validation", + renderingProperties: { + serializedName: "renderingProperties", type: { name: "Composite", - className: "AllowedAudiencesValidation" + className: "DiagnosticRendering" } } } } }; -export const AllowedAudiencesValidation: coreClient.CompositeMapper = { +export const DiagnosticDataTableResponseObject: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AllowedAudiencesValidation", + className: "DiagnosticDataTableResponseObject", modelProperties: { - allowedAudiences: { - serializedName: "allowedAudiences", + tableName: { + serializedName: "tableName", + type: { + name: "String" + } + }, + columns: { + serializedName: "columns", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "DiagnosticDataTableResponseColumn" } } } - } - } - } -}; - -export const Twitter: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Twitter", - modelProperties: { - enabled: { - serializedName: "enabled", - type: { - name: "Boolean" - } }, - registration: { - serializedName: "registration", + rows: { + serializedName: "rows", type: { - name: "Composite", - className: "TwitterRegistration" + name: "Sequence", + element: { + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } } } } } }; -export const TwitterRegistration: coreClient.CompositeMapper = { +export const DiagnosticDataTableResponseColumn: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TwitterRegistration", + className: "DiagnosticDataTableResponseColumn", modelProperties: { - consumerKey: { - serializedName: "consumerKey", + columnName: { + serializedName: "columnName", type: { name: "String" } }, - consumerSecretSettingName: { - serializedName: "consumerSecretSettingName", + dataType: { + serializedName: "dataType", + type: { + name: "String" + } + }, + columnType: { + serializedName: "columnType", type: { name: "String" } @@ -2425,85 +2626,100 @@ export const TwitterRegistration: coreClient.CompositeMapper = { } }; -export const Apple: coreClient.CompositeMapper = { +export const DiagnosticRendering: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Apple", + className: "DiagnosticRendering", modelProperties: { - enabled: { - serializedName: "enabled", + type: { + serializedName: "type", type: { - name: "Boolean" + name: "Number" } }, - registration: { - serializedName: "registration", + title: { + serializedName: "title", type: { - name: "Composite", - className: "AppleRegistration" + name: "String" } }, - login: { - serializedName: "login", + description: { + serializedName: "description", type: { - name: "Composite", - className: "LoginScopes" + name: "String" + } + }, + isVisible: { + serializedName: "isVisible", + type: { + name: "Boolean" } } } } }; -export const AppleRegistration: coreClient.CompositeMapper = { +export const DiagnosticsStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AppleRegistration", + className: "DiagnosticsStatus", modelProperties: { - clientId: { - serializedName: "clientId", + message: { + serializedName: "message", type: { name: "String" } }, - clientSecretSettingName: { - serializedName: "clientSecretSettingName", + statusId: { + serializedName: "statusId", type: { - name: "String" + name: "Number" } } } } }; -export const AzureStaticWebApps: coreClient.CompositeMapper = { +export const DiagnosticDataProviderMetadata: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AzureStaticWebApps", + className: "DiagnosticDataProviderMetadata", modelProperties: { - enabled: { - serializedName: "enabled", + providerName: { + serializedName: "providerName", type: { - name: "Boolean" + name: "String" } }, - registration: { - serializedName: "registration", + propertyBag: { + serializedName: "propertyBag", type: { - name: "Composite", - className: "AzureStaticWebAppsRegistration" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DiagnosticDataProviderMetadataPropertyBagItem" + } + } } } } } }; -export const AzureStaticWebAppsRegistration: coreClient.CompositeMapper = { +export const DiagnosticDataProviderMetadataPropertyBagItem: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AzureStaticWebAppsRegistration", + className: "DiagnosticDataProviderMetadataPropertyBagItem", modelProperties: { - clientId: { - serializedName: "clientId", + name: { + serializedName: "name", + type: { + name: "String" + } + }, + value: { + serializedName: "value", type: { name: "String" } @@ -2512,118 +2728,86 @@ export const AzureStaticWebAppsRegistration: coreClient.CompositeMapper = { } }; -export const CustomOpenIdConnectProvider: coreClient.CompositeMapper = { +export const VnetConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CustomOpenIdConnectProvider", + className: "VnetConfiguration", modelProperties: { - enabled: { - serializedName: "enabled", + internal: { + serializedName: "internal", type: { name: "Boolean" } }, - registration: { - serializedName: "registration", + infrastructureSubnetId: { + serializedName: "infrastructureSubnetId", type: { - name: "Composite", - className: "OpenIdConnectRegistration" + name: "String" } }, - login: { - serializedName: "login", + runtimeSubnetId: { + serializedName: "runtimeSubnetId", type: { - name: "Composite", - className: "OpenIdConnectLogin" + name: "String" } - } - } - } -}; - -export const OpenIdConnectRegistration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OpenIdConnectRegistration", - modelProperties: { - clientId: { - serializedName: "clientId", + }, + dockerBridgeCidr: { + serializedName: "dockerBridgeCidr", type: { name: "String" } }, - clientCredential: { - serializedName: "clientCredential", + platformReservedCidr: { + serializedName: "platformReservedCidr", type: { - name: "Composite", - className: "OpenIdConnectClientCredential" + name: "String" } }, - openIdConnectConfiguration: { - serializedName: "openIdConnectConfiguration", + platformReservedDnsIP: { + serializedName: "platformReservedDnsIP", type: { - name: "Composite", - className: "OpenIdConnectConfig" + name: "String" } } } } }; -export const OpenIdConnectClientCredential: coreClient.CompositeMapper = { +export const AppLogsConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OpenIdConnectClientCredential", + className: "AppLogsConfiguration", modelProperties: { - method: { - defaultValue: "ClientSecretPost", - isConstant: true, - serializedName: "method", + destination: { + serializedName: "destination", type: { name: "String" } }, - clientSecretSettingName: { - serializedName: "clientSecretSettingName", + logAnalyticsConfiguration: { + serializedName: "logAnalyticsConfiguration", type: { - name: "String" + name: "Composite", + className: "LogAnalyticsConfiguration" } } } } }; -export const OpenIdConnectConfig: coreClient.CompositeMapper = { +export const LogAnalyticsConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OpenIdConnectConfig", + className: "LogAnalyticsConfiguration", modelProperties: { - authorizationEndpoint: { - serializedName: "authorizationEndpoint", - type: { - name: "String" - } - }, - tokenEndpoint: { - serializedName: "tokenEndpoint", - type: { - name: "String" - } - }, - issuer: { - serializedName: "issuer", - type: { - name: "String" - } - }, - certificationUri: { - serializedName: "certificationUri", + customerId: { + serializedName: "customerId", type: { name: "String" } }, - wellKnownOpenIdConfiguration: { - serializedName: "wellKnownOpenIdConfiguration", + sharedKey: { + serializedName: "sharedKey", type: { name: "String" } @@ -2632,86 +2816,92 @@ export const OpenIdConnectConfig: coreClient.CompositeMapper = { } }; -export const OpenIdConnectLogin: coreClient.CompositeMapper = { +export const AvailableOperations: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OpenIdConnectLogin", + className: "AvailableOperations", modelProperties: { - nameClaimType: { - serializedName: "nameClaimType", - type: { - name: "String" - } - }, - scopes: { - serializedName: "scopes", + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "OperationDetail" } } } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } } } } }; -export const Login: coreClient.CompositeMapper = { +export const OperationDetail: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Login", + className: "OperationDetail", modelProperties: { - routes: { - serializedName: "routes", + name: { + serializedName: "name", type: { - name: "Composite", - className: "LoginRoutes" + name: "String" } }, - preserveUrlFragmentsForLogins: { - serializedName: "preserveUrlFragmentsForLogins", + isDataAction: { + serializedName: "isDataAction", type: { name: "Boolean" } }, - allowedExternalRedirectUrls: { - serializedName: "allowedExternalRedirectUrls", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - cookieExpiration: { - serializedName: "cookieExpiration", + display: { + serializedName: "display", type: { name: "Composite", - className: "CookieExpiration" + className: "OperationDisplay" } }, - nonce: { - serializedName: "nonce", + origin: { + serializedName: "origin", type: { - name: "Composite", - className: "Nonce" + name: "String" } } } } }; -export const LoginRoutes: coreClient.CompositeMapper = { +export const OperationDisplay: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LoginRoutes", + className: "OperationDisplay", modelProperties: { - logoutEndpoint: { - serializedName: "logoutEndpoint", + provider: { + serializedName: "provider", + type: { + name: "String" + } + }, + resource: { + serializedName: "resource", + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + type: { + name: "String" + } + }, + description: { + serializedName: "description", type: { name: "String" } @@ -2720,20 +2910,27 @@ export const LoginRoutes: coreClient.CompositeMapper = { } }; -export const CookieExpiration: coreClient.CompositeMapper = { +export const ManagedEnvironmentsCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CookieExpiration", + className: "ManagedEnvironmentsCollection", modelProperties: { - convention: { - serializedName: "convention", + value: { + serializedName: "value", + required: true, type: { - name: "Enum", - allowedValues: ["FixedTime", "IdentityProviderDerived"] + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedEnvironment" + } + } } }, - timeToExpiration: { - serializedName: "timeToExpiration", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String" } @@ -2742,19 +2939,27 @@ export const CookieExpiration: coreClient.CompositeMapper = { } }; -export const Nonce: coreClient.CompositeMapper = { +export const CertificateCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Nonce", + className: "CertificateCollection", modelProperties: { - validateNonce: { - serializedName: "validateNonce", + value: { + serializedName: "value", + required: true, type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Certificate" + } + } } }, - nonceExpirationInterval: { - serializedName: "nonceExpirationInterval", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String" } @@ -2763,42 +2968,112 @@ export const Nonce: coreClient.CompositeMapper = { } }; -export const HttpSettings: coreClient.CompositeMapper = { +export const CertificateProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "HttpSettings", + className: "CertificateProperties", modelProperties: { - requireHttps: { - serializedName: "requireHttps", + provisioningState: { + serializedName: "provisioningState", + readOnly: true, type: { - name: "Boolean" + name: "String" } }, - routes: { - serializedName: "routes", + password: { + serializedName: "password", type: { - name: "Composite", - className: "HttpSettingsRoutes" + name: "String" + } + }, + subjectName: { + serializedName: "subjectName", + readOnly: true, + type: { + name: "String" + } + }, + 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" + } + }, + publicKeyHash: { + serializedName: "publicKeyHash", + readOnly: true, + type: { + name: "String" } - }, - forwardProxy: { - serializedName: "forwardProxy", + } + } + } +}; + +export const CertificatePatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CertificatePatch", + modelProperties: { + 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 +3082,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 +3180,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 +3209,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: "String" + name: "Composite", + className: "AzureCredentials" } }, - managedEnvironmentId: { - serializedName: "properties.managedEnvironmentId", + contextPath: { + serializedName: "contextPath", type: { name: "String" } }, - latestRevisionName: { - serializedName: "properties.latestRevisionName", - readOnly: true, + image: { + serializedName: "image", type: { name: "String" } }, - latestRevisionFqdn: { - serializedName: "properties.latestRevisionFqdn", - readOnly: true, + publishType: { + serializedName: "publishType", type: { name: "String" } }, - customDomainVerificationId: { - serializedName: "properties.customDomainVerificationId", - readOnly: true, + os: { + serializedName: "os", type: { name: "String" } }, - configuration: { - serializedName: "properties.configuration", - type: { - name: "Composite", - className: "Configuration" - } - }, - template: { - serializedName: "properties.template", + runtimeStack: { + serializedName: "runtimeStack", type: { - name: "Composite", - className: "Template" + name: "String" } }, - outboundIPAddresses: { - serializedName: "properties.outboundIPAddresses", - readOnly: true, + runtimeVersion: { + serializedName: "runtimeVersion", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } } } } }; -export const ManagedEnvironment: coreClient.CompositeMapper = { +export const RegistryInfo: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedEnvironment", + className: "RegistryInfo", modelProperties: { - ...TrackedResource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, + registryUrl: { + serializedName: "registryUrl", type: { name: "String" } }, - daprAIInstrumentationKey: { - serializedName: "properties.daprAIInstrumentationKey", + registryUserName: { + serializedName: "registryUserName", type: { name: "String" } }, - vnetConfiguration: { - serializedName: "properties.vnetConfiguration", + registryPassword: { + serializedName: "registryPassword", type: { - name: "Composite", - className: "VnetConfiguration" + name: "String" + } + } + } + } +}; + +export const AzureCredentials: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AzureCredentials", + modelProperties: { + clientId: { + serializedName: "clientId", + type: { + name: "String" } }, - deploymentErrors: { - serializedName: "properties.deploymentErrors", - readOnly: true, + clientSecret: { + serializedName: "clientSecret", type: { name: "String" } }, - defaultDomain: { - serializedName: "properties.defaultDomain", - readOnly: true, + tenantId: { + serializedName: "tenantId", type: { name: "String" } }, - staticIp: { - serializedName: "properties.staticIp", - 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" } } + } }, - appLogsConfiguration: { - serializedName: "properties.appLogsConfiguration", + location: { + serializedName: "location", + required: true, type: { - name: "Composite", - className: "AppLogsConfiguration" + name: "String" } } } } }; -export const Certificate: coreClient.CompositeMapper = { +export const AuthConfig: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Certificate", + className: "AuthConfig", modelProperties: { - ...TrackedResource.type.modelProperties, - properties: { - serializedName: "properties", + ...ProxyResource.type.modelProperties, + platform: { + serializedName: "properties.platform", + type: { + name: "Composite", + className: "AuthPlatform" + } + }, + globalValidation: { + serializedName: "properties.globalValidation", + type: { + name: "Composite", + className: "GlobalValidation" + } + }, + identityProviders: { + serializedName: "properties.identityProviders", + type: { + name: "Composite", + className: "IdentityProviders" + } + }, + login: { + serializedName: "properties.login", type: { name: "Composite", - className: "CertificateProperties" + className: "Login" + } + }, + httpSettings: { + serializedName: "properties.httpSettings", + type: { + name: "Composite", + className: "HttpSettings" } } } @@ -3302,42 +3617,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 +3686,234 @@ export const DaprComponent: coreClient.CompositeMapper = { } }; -export const AuthConfig: coreClient.CompositeMapper = { +export const Diagnostics: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AuthConfig", + className: "Diagnostics", modelProperties: { ...ProxyResource.type.modelProperties, - platform: { - serializedName: "properties.platform", + properties: { + serializedName: "properties", type: { name: "Composite", - className: "AuthPlatform" + className: "DiagnosticsProperties" + } + } + } + } +}; + +export const ManagedEnvironmentStorage: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedEnvironmentStorage", + modelProperties: { + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + 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" + } + }, + daprAIConnectionString: { + serializedName: "properties.daprAIConnectionString", + 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" + } + }, + zoneRedundant: { + serializedName: "properties.zoneRedundant", + type: { + name: "Boolean" } } } } }; -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..e54d70c5e620 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-05-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,36 @@ 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 detectorName: OperationURLParameter = { + parameterPath: "detectorName", + mapper: { + serializedName: "detectorName", + required: true, + type: { + name: "String" + } + } +}; + +export const environmentEnvelope: OperationParameter = { parameterPath: "environmentEnvelope", - mapper: ManagedEnvironmentPatchMapper + mapper: ManagedEnvironmentMapper }; export const managedEnvironmentName: OperationURLParameter = { @@ -197,30 +228,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 +248,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/containerAppsDiagnostics.ts b/sdk/app/arm-app/src/operations/containerAppsDiagnostics.ts new file mode 100644 index 000000000000..a2d22ec72bc3 --- /dev/null +++ b/sdk/app/arm-app/src/operations/containerAppsDiagnostics.ts @@ -0,0 +1,477 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { ContainerAppsDiagnostics } 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 { + Diagnostics, + ContainerAppsDiagnosticsListDetectorsNextOptionalParams, + ContainerAppsDiagnosticsListDetectorsOptionalParams, + Revision, + ContainerAppsDiagnosticsListRevisionsNextOptionalParams, + ContainerAppsDiagnosticsListRevisionsOptionalParams, + ContainerAppsDiagnosticsListDetectorsResponse, + ContainerAppsDiagnosticsGetDetectorOptionalParams, + ContainerAppsDiagnosticsGetDetectorResponse, + ContainerAppsDiagnosticsListRevisionsResponse, + ContainerAppsDiagnosticsGetRevisionOptionalParams, + ContainerAppsDiagnosticsGetRevisionResponse, + ContainerAppsDiagnosticsGetRootOptionalParams, + ContainerAppsDiagnosticsGetRootResponse, + ContainerAppsDiagnosticsListDetectorsNextResponse, + ContainerAppsDiagnosticsListRevisionsNextResponse +} from "../models"; + +/// +/** Class containing ContainerAppsDiagnostics operations. */ +export class ContainerAppsDiagnosticsImpl implements ContainerAppsDiagnostics { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class ContainerAppsDiagnostics class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Get the list of diagnostics for a given Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App for which detector info is needed. + * @param options The options parameters. + */ + public listDetectors( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsDiagnosticsListDetectorsOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listDetectorsPagingAll( + resourceGroupName, + containerAppName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listDetectorsPagingPage( + resourceGroupName, + containerAppName, + options + ); + } + }; + } + + private async *listDetectorsPagingPage( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsDiagnosticsListDetectorsOptionalParams + ): AsyncIterableIterator { + let result = await this._listDetectors( + resourceGroupName, + containerAppName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listDetectorsNext( + resourceGroupName, + containerAppName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listDetectorsPagingAll( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsDiagnosticsListDetectorsOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listDetectorsPagingPage( + resourceGroupName, + containerAppName, + options + )) { + yield* page; + } + } + + /** + * Get the Revisions for a given Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App for which Revisions are needed. + * @param options The options parameters. + */ + public listRevisions( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsDiagnosticsListRevisionsOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listRevisionsPagingAll( + resourceGroupName, + containerAppName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listRevisionsPagingPage( + resourceGroupName, + containerAppName, + options + ); + } + }; + } + + private async *listRevisionsPagingPage( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsDiagnosticsListRevisionsOptionalParams + ): AsyncIterableIterator { + let result = await this._listRevisions( + resourceGroupName, + containerAppName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listRevisionsNext( + resourceGroupName, + containerAppName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listRevisionsPagingAll( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsDiagnosticsListRevisionsOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listRevisionsPagingPage( + resourceGroupName, + containerAppName, + options + )) { + yield* page; + } + } + + /** + * Get the list of diagnostics for a given Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App for which detector info is needed. + * @param options The options parameters. + */ + private _listDetectors( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsDiagnosticsListDetectorsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, options }, + listDetectorsOperationSpec + ); + } + + /** + * Get a diagnostics result of a Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param name Name of the Container App Detector. + * @param options The options parameters. + */ + getDetector( + resourceGroupName: string, + containerAppName: string, + name: string, + options?: ContainerAppsDiagnosticsGetDetectorOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, name, options }, + getDetectorOperationSpec + ); + } + + /** + * Get the Revisions for a given Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App for which Revisions are needed. + * @param options The options parameters. + */ + private _listRevisions( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsDiagnosticsListRevisionsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, options }, + listRevisionsOperationSpec + ); + } + + /** + * Get a revision of a Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param name Name of the Container App Revision. + * @param options The options parameters. + */ + getRevision( + resourceGroupName: string, + containerAppName: string, + name: string, + options?: ContainerAppsDiagnosticsGetRevisionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, name, options }, + getRevisionOperationSpec + ); + } + + /** + * Get the properties of a Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param name Name of the Container App. + * @param options The options parameters. + */ + getRoot( + resourceGroupName: string, + name: string, + options?: ContainerAppsDiagnosticsGetRootOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, name, options }, + getRootOperationSpec + ); + } + + /** + * ListDetectorsNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App for which detector info is needed. + * @param nextLink The nextLink from the previous successful call to the ListDetectors method. + * @param options The options parameters. + */ + private _listDetectorsNext( + resourceGroupName: string, + containerAppName: string, + nextLink: string, + options?: ContainerAppsDiagnosticsListDetectorsNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, nextLink, options }, + listDetectorsNextOperationSpec + ); + } + + /** + * ListRevisionsNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App for which Revisions are needed. + * @param nextLink The nextLink from the previous successful call to the ListRevisions method. + * @param options The options parameters. + */ + private _listRevisionsNext( + resourceGroupName: string, + containerAppName: string, + nextLink: string, + options?: ContainerAppsDiagnosticsListRevisionsNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, nextLink, options }, + listRevisionsNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listDetectorsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/detectors", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DiagnosticsCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getDetectorOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/detectors/{name}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Diagnostics + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName, + Parameters.name + ], + headerParameters: [Parameters.accept], + serializer +}; +const listRevisionsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/detectorproperties/revisionsApi/revisions/", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RevisionCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.filter], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getRevisionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/detectorproperties/revisionsApi/revisions/{name}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Revision + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName, + Parameters.name + ], + headerParameters: [Parameters.accept], + serializer +}; +const getRootOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}/detectorproperties/rootApi/", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ContainerApp + }, + 404: { + isError: true + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name + ], + headerParameters: [Parameters.accept], + serializer +}; +const listDetectorsNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DiagnosticsCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listRevisionsNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RevisionCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.filter], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName, + Parameters.nextLink + ], + 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..ee772b6b9620 100644 --- a/sdk/app/arm-app/src/operations/index.ts +++ b/sdk/app/arm-app/src/operations/index.ts @@ -6,13 +6,17 @@ * 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 "./containerAppsDiagnostics"; +export * from "./managedEnvironmentDiagnostics"; +export * from "./managedEnvironmentsDiagnostics"; +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/managedEnvironmentDiagnostics.ts b/sdk/app/arm-app/src/operations/managedEnvironmentDiagnostics.ts new file mode 100644 index 000000000000..f82ecec0ec48 --- /dev/null +++ b/sdk/app/arm-app/src/operations/managedEnvironmentDiagnostics.ts @@ -0,0 +1,117 @@ +/* + * 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 { ManagedEnvironmentDiagnostics } 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 { + ManagedEnvironmentDiagnosticsListDetectorsOptionalParams, + ManagedEnvironmentDiagnosticsListDetectorsResponse, + ManagedEnvironmentDiagnosticsGetDetectorOptionalParams, + ManagedEnvironmentDiagnosticsGetDetectorResponse +} from "../models"; + +/** Class containing ManagedEnvironmentDiagnostics operations. */ +export class ManagedEnvironmentDiagnosticsImpl + implements ManagedEnvironmentDiagnostics { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class ManagedEnvironmentDiagnostics class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Get the list of diagnostics for a Managed Environment used to host container apps. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param name Name of the Environment. + * @param options The options parameters. + */ + listDetectors( + resourceGroupName: string, + name: string, + options?: ManagedEnvironmentDiagnosticsListDetectorsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, name, options }, + listDetectorsOperationSpec + ); + } + + /** + * Get the diagnostics data for a Managed Environment used to host container apps. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param name Name of the Environment. + * @param detectorName Name of the Managed Environment detector. + * @param options The options parameters. + */ + getDetector( + resourceGroupName: string, + name: string, + detectorName: string, + options?: ManagedEnvironmentDiagnosticsGetDetectorOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, name, detectorName, options }, + getDetectorOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listDetectorsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}/detectors", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DiagnosticsCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name + ], + headerParameters: [Parameters.accept], + serializer +}; +const getDetectorOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}/detectors/{detectorName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Diagnostics + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name, + Parameters.detectorName + ], + headerParameters: [Parameters.accept], + serializer +}; 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/managedEnvironmentsDiagnostics.ts b/sdk/app/arm-app/src/operations/managedEnvironmentsDiagnostics.ts new file mode 100644 index 000000000000..422efec7d3f4 --- /dev/null +++ b/sdk/app/arm-app/src/operations/managedEnvironmentsDiagnostics.ts @@ -0,0 +1,73 @@ +/* + * 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 { ManagedEnvironmentsDiagnostics } 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 { + ManagedEnvironmentsDiagnosticsGetRootOptionalParams, + ManagedEnvironmentsDiagnosticsGetRootResponse +} from "../models"; + +/** Class containing ManagedEnvironmentsDiagnostics operations. */ +export class ManagedEnvironmentsDiagnosticsImpl + implements ManagedEnvironmentsDiagnostics { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class ManagedEnvironmentsDiagnostics class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Get the properties of a Managed Environment used to host container apps. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param name Name of the Environment. + * @param options The options parameters. + */ + getRoot( + resourceGroupName: string, + name: string, + options?: ManagedEnvironmentsDiagnosticsGetRootOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, name, options }, + getRootOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getRootOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}/detectorproperties/rootApi/", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedEnvironment + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name + ], + headerParameters: [Parameters.accept], + serializer +}; 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/containerAppsDiagnostics.ts b/sdk/app/arm-app/src/operationsInterfaces/containerAppsDiagnostics.ts new file mode 100644 index 000000000000..26482e419a20 --- /dev/null +++ b/sdk/app/arm-app/src/operationsInterfaces/containerAppsDiagnostics.ts @@ -0,0 +1,85 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + Diagnostics, + ContainerAppsDiagnosticsListDetectorsOptionalParams, + Revision, + ContainerAppsDiagnosticsListRevisionsOptionalParams, + ContainerAppsDiagnosticsGetDetectorOptionalParams, + ContainerAppsDiagnosticsGetDetectorResponse, + ContainerAppsDiagnosticsGetRevisionOptionalParams, + ContainerAppsDiagnosticsGetRevisionResponse, + ContainerAppsDiagnosticsGetRootOptionalParams, + ContainerAppsDiagnosticsGetRootResponse +} from "../models"; + +/// +/** Interface representing a ContainerAppsDiagnostics. */ +export interface ContainerAppsDiagnostics { + /** + * Get the list of diagnostics for a given Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App for which detector info is needed. + * @param options The options parameters. + */ + listDetectors( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsDiagnosticsListDetectorsOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get the Revisions for a given Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App for which Revisions are needed. + * @param options The options parameters. + */ + listRevisions( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsDiagnosticsListRevisionsOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a diagnostics result of a Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param name Name of the Container App Detector. + * @param options The options parameters. + */ + getDetector( + resourceGroupName: string, + containerAppName: string, + name: string, + options?: ContainerAppsDiagnosticsGetDetectorOptionalParams + ): Promise; + /** + * Get a revision of a Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param name Name of the Container App Revision. + * @param options The options parameters. + */ + getRevision( + resourceGroupName: string, + containerAppName: string, + name: string, + options?: ContainerAppsDiagnosticsGetRevisionOptionalParams + ): Promise; + /** + * Get the properties of a Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param name Name of the Container App. + * @param options The options parameters. + */ + getRoot( + resourceGroupName: string, + name: string, + options?: ContainerAppsDiagnosticsGetRootOptionalParams + ): Promise; +} 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..ee772b6b9620 100644 --- a/sdk/app/arm-app/src/operationsInterfaces/index.ts +++ b/sdk/app/arm-app/src/operationsInterfaces/index.ts @@ -6,13 +6,17 @@ * 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 "./containerAppsDiagnostics"; +export * from "./managedEnvironmentDiagnostics"; +export * from "./managedEnvironmentsDiagnostics"; +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/managedEnvironmentDiagnostics.ts b/sdk/app/arm-app/src/operationsInterfaces/managedEnvironmentDiagnostics.ts new file mode 100644 index 000000000000..017490c13511 --- /dev/null +++ b/sdk/app/arm-app/src/operationsInterfaces/managedEnvironmentDiagnostics.ts @@ -0,0 +1,42 @@ +/* + * 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 { + ManagedEnvironmentDiagnosticsListDetectorsOptionalParams, + ManagedEnvironmentDiagnosticsListDetectorsResponse, + ManagedEnvironmentDiagnosticsGetDetectorOptionalParams, + ManagedEnvironmentDiagnosticsGetDetectorResponse +} from "../models"; + +/** Interface representing a ManagedEnvironmentDiagnostics. */ +export interface ManagedEnvironmentDiagnostics { + /** + * Get the list of diagnostics for a Managed Environment used to host container apps. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param name Name of the Environment. + * @param options The options parameters. + */ + listDetectors( + resourceGroupName: string, + name: string, + options?: ManagedEnvironmentDiagnosticsListDetectorsOptionalParams + ): Promise; + /** + * Get the diagnostics data for a Managed Environment used to host container apps. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param name Name of the Environment. + * @param detectorName Name of the Managed Environment detector. + * @param options The options parameters. + */ + getDetector( + resourceGroupName: string, + name: string, + detectorName: string, + options?: ManagedEnvironmentDiagnosticsGetDetectorOptionalParams + ): Promise; +} 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/managedEnvironmentsDiagnostics.ts b/sdk/app/arm-app/src/operationsInterfaces/managedEnvironmentsDiagnostics.ts new file mode 100644 index 000000000000..e90a10aa1632 --- /dev/null +++ b/sdk/app/arm-app/src/operationsInterfaces/managedEnvironmentsDiagnostics.ts @@ -0,0 +1,27 @@ +/* + * 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 { + ManagedEnvironmentsDiagnosticsGetRootOptionalParams, + ManagedEnvironmentsDiagnosticsGetRootResponse +} from "../models"; + +/** Interface representing a ManagedEnvironmentsDiagnostics. */ +export interface ManagedEnvironmentsDiagnostics { + /** + * Get the properties of a Managed Environment used to host container apps. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param name Name of the Environment. + * @param options The options parameters. + */ + getRoot( + resourceGroupName: string, + name: string, + options?: ManagedEnvironmentsDiagnosticsGetRootOptionalParams + ): 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"