From ebabc2662c697b4a30b6f1018b01e4739592c471 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 9 Aug 2023 05:44:59 +0000 Subject: [PATCH] CodeGen from PR 25051 in Azure/azure-rest-api-specs Merge dc9181f8efdbbf048112aeba25c07b48547945e5 into ca162308f1010bfb85b9c85021e863e7bd397a1f --- .../arm-appcontainers/CHANGELOG.md | 260 +-- sdk/appcontainers/arm-appcontainers/README.md | 2 +- .../arm-appcontainers/_meta.json | 8 +- .../arm-appcontainers/assets.json | 6 - .../arm-appcontainers/package.json | 16 +- .../review/arm-appcontainers.api.md | 145 +- .../availableWorkloadProfilesGetSample.ts | 41 - .../samples-dev/billingMetersGetSample.ts | 38 - .../certificatesCreateOrUpdateSample.ts | 60 - .../samples-dev/certificatesDeleteSample.ts | 45 - .../samples-dev/certificatesGetSample.ts | 45 - .../samples-dev/certificatesListSample.ts | 46 - .../samples-dev/certificatesUpdateSample.ts | 52 - ...onmentsCertificatesCreateOrUpdateSample.ts | 60 - ...tedEnvironmentsCertificatesDeleteSample.ts | 45 - ...nectedEnvironmentsCertificatesGetSample.ts | 45 - ...ectedEnvironmentsCertificatesListSample.ts | 46 - ...tedEnvironmentsCertificatesUpdateSample.ts | 52 - ...EnvironmentsCheckNameAvailabilitySample.ts | 51 - ...nnectedEnvironmentsCreateOrUpdateSample.ts | 58 - ...mentsDaprComponentsCreateOrUpdateSample.ts | 63 - ...dEnvironmentsDaprComponentsDeleteSample.ts | 45 - ...ctedEnvironmentsDaprComponentsGetSample.ts | 45 - ...tedEnvironmentsDaprComponentsListSample.ts | 46 - ...ronmentsDaprComponentsListSecretsSample.ts | 45 - .../connectedEnvironmentsDeleteSample.ts | 43 - .../connectedEnvironmentsGetSample.ts | 43 - ...edEnvironmentsListByResourceGroupSample.ts | 44 - ...tedEnvironmentsListBySubscriptionSample.ts | 40 - ...nvironmentsStoragesCreateOrUpdateSample.ts | 59 - ...nnectedEnvironmentsStoragesDeleteSample.ts | 45 - .../connectedEnvironmentsStoragesGetSample.ts | 45 - ...connectedEnvironmentsStoragesListSample.ts | 43 - .../connectedEnvironmentsUpdateSample.ts | 43 - ...inerAppsAuthConfigsCreateOrUpdateSample.ts | 55 - .../containerAppsAuthConfigsDeleteSample.ts | 45 - .../containerAppsAuthConfigsGetSample.ts | 45 - ...AppsAuthConfigsListByContainerAppSample.ts | 46 - .../containerAppsCreateOrUpdateSample.ts | 281 --- .../samples-dev/containerAppsDeleteSample.ts | 42 - ...ntainerAppsDiagnosticsGetDetectorSample.ts | 45 - ...ntainerAppsDiagnosticsGetRevisionSample.ts | 44 - .../containerAppsDiagnosticsGetRootSample.ts | 42 - ...ainerAppsDiagnosticsListDetectorsSample.ts | 46 - ...ainerAppsDiagnosticsListRevisionsSample.ts | 45 - .../containerAppsGetAuthTokenSample.ts | 42 - .../samples-dev/containerAppsGetSample.ts | 42 - .../containerAppsListByResourceGroupSample.ts | 43 - .../containerAppsListBySubscriptionSample.ts | 40 - ...nerAppsListCustomHostNameAnalysisSample.ts | 50 - .../containerAppsListSecretsSample.ts | 42 - ...nerAppsRevisionReplicasGetReplicaSample.ts | 47 - ...rAppsRevisionReplicasListReplicasSample.ts | 45 - ...inerAppsRevisionsActivateRevisionSample.ts | 44 - ...erAppsRevisionsDeactivateRevisionSample.ts | 44 - ...containerAppsRevisionsGetRevisionSample.ts | 44 - ...ntainerAppsRevisionsListRevisionsSample.ts | 45 - ...ainerAppsRevisionsRestartRevisionSample.ts | 44 - ...rAppsSourceControlsCreateOrUpdateSample.ts | 67 - ...containerAppsSourceControlsDeleteSample.ts | 45 - .../containerAppsSourceControlsGetSample.ts | 45 - ...sSourceControlsListByContainerAppSample.ts | 46 - .../samples-dev/containerAppsUpdateSample.ts | 138 -- .../daprComponentsCreateOrUpdateSample.ts | 103 -- .../samples-dev/daprComponentsDeleteSample.ts | 45 - .../samples-dev/daprComponentsGetSample.ts | 70 - .../samples-dev/daprComponentsListSample.ts | 46 - .../daprComponentsListSecretsSample.ts | 45 - .../samples-dev/jobsCreateOrUpdateSample.ts | 83 - .../samples-dev/jobsDeleteSample.ts | 42 - .../samples-dev/jobsExecutionsListSample.ts | 45 - .../samples-dev/jobsGetSample.ts | 39 - .../jobsListByResourceGroupSample.ts | 41 - .../jobsListBySubscriptionSample.ts | 40 - .../samples-dev/jobsListSecretsSample.ts | 39 - .../samples-dev/jobsStartSample.ts | 64 - .../samples-dev/jobsStopExecutionSample.ts | 44 - .../jobsStopMultipleExecutionsSample.ts | 53 - .../samples-dev/jobsUpdateSample.ts | 85 - ...managedCertificatesCreateOrUpdateSample.ts | 60 - .../managedCertificatesDeleteSample.ts | 45 - .../managedCertificatesGetSample.ts | 45 - .../managedCertificatesListSample.ts | 46 - .../managedCertificatesUpdateSample.ts | 52 - ...EnvironmentDiagnosticsGetDetectorSample.ts | 45 - ...vironmentDiagnosticsListDetectorsSample.ts | 43 - ...managedEnvironmentsCreateOrUpdateSample.ts | 150 -- .../managedEnvironmentsDeleteSample.ts | 43 - ...gedEnvironmentsDiagnosticsGetRootSample.ts | 43 - .../managedEnvironmentsGetAuthTokenSample.ts | 42 - .../managedEnvironmentsGetSample.ts | 43 - ...edEnvironmentsListByResourceGroupSample.ts | 44 - ...gedEnvironmentsListBySubscriptionSample.ts | 40 - ...ronmentsListWorkloadProfileStatesSample.ts | 46 - ...nvironmentsStoragesCreateOrUpdateSample.ts | 59 - ...managedEnvironmentsStoragesDeleteSample.ts | 45 - .../managedEnvironmentsStoragesGetSample.ts | 45 - .../managedEnvironmentsStoragesListSample.ts | 43 - .../managedEnvironmentsUpdateSample.ts | 51 - .../namespacesCheckNameAvailabilitySample.ts | 79 - .../samples-dev/operationsListSample.ts | 40 - .../samples/v2-beta/javascript/README.md | 238 --- .../availableWorkloadProfilesGetSample.js | 38 - .../javascript/billingMetersGetSample.js | 35 - .../certificatesCreateOrUpdateSample.js | 52 - .../javascript/certificatesDeleteSample.js | 41 - .../javascript/certificatesGetSample.js | 37 - .../javascript/certificatesListSample.js | 39 - .../javascript/certificatesUpdateSample.js | 45 - ...onmentsCertificatesCreateOrUpdateSample.js | 52 - ...tedEnvironmentsCertificatesDeleteSample.js | 41 - ...nectedEnvironmentsCertificatesGetSample.js | 41 - ...ectedEnvironmentsCertificatesListSample.js | 42 - ...tedEnvironmentsCertificatesUpdateSample.js | 45 - ...EnvironmentsCheckNameAvailabilitySample.js | 44 - ...nnectedEnvironmentsCreateOrUpdateSample.js | 51 - ...mentsDaprComponentsCreateOrUpdateSample.js | 56 - ...dEnvironmentsDaprComponentsDeleteSample.js | 41 - ...ctedEnvironmentsDaprComponentsGetSample.js | 41 - ...tedEnvironmentsDaprComponentsListSample.js | 42 - ...ronmentsDaprComponentsListSecretsSample.js | 41 - .../connectedEnvironmentsDeleteSample.js | 39 - .../connectedEnvironmentsGetSample.js | 39 - ...edEnvironmentsListByResourceGroupSample.js | 38 - ...tedEnvironmentsListBySubscriptionSample.js | 37 - ...nvironmentsStoragesCreateOrUpdateSample.js | 52 - ...nnectedEnvironmentsStoragesDeleteSample.js | 41 - .../connectedEnvironmentsStoragesGetSample.js | 41 - ...connectedEnvironmentsStoragesListSample.js | 39 - .../connectedEnvironmentsUpdateSample.js | 39 - ...inerAppsAuthConfigsCreateOrUpdateSample.js | 51 - .../containerAppsAuthConfigsDeleteSample.js | 41 - .../containerAppsAuthConfigsGetSample.js | 41 - ...AppsAuthConfigsListByContainerAppSample.js | 42 - .../containerAppsCreateOrUpdateSample.js | 272 --- .../javascript/containerAppsDeleteSample.js | 36 - ...ntainerAppsDiagnosticsGetDetectorSample.js | 42 - ...ntainerAppsDiagnosticsGetRevisionSample.js | 41 - .../containerAppsDiagnosticsGetRootSample.js | 36 - ...ainerAppsDiagnosticsListDetectorsSample.js | 43 - ...ainerAppsDiagnosticsListRevisionsSample.js | 42 - .../containerAppsGetAuthTokenSample.js | 36 - .../javascript/containerAppsGetSample.js | 36 - .../containerAppsListByResourceGroupSample.js | 38 - .../containerAppsListBySubscriptionSample.js | 37 - ...nerAppsListCustomHostNameAnalysisSample.js | 44 - .../containerAppsListSecretsSample.js | 36 - ...nerAppsRevisionReplicasGetReplicaSample.js | 43 - ...rAppsRevisionReplicasListReplicasSample.js | 41 - ...inerAppsRevisionsActivateRevisionSample.js | 41 - ...erAppsRevisionsDeactivateRevisionSample.js | 41 - ...containerAppsRevisionsGetRevisionSample.js | 41 - ...ntainerAppsRevisionsListRevisionsSample.js | 42 - ...ainerAppsRevisionsRestartRevisionSample.js | 41 - ...rAppsSourceControlsCreateOrUpdateSample.js | 60 - ...containerAppsSourceControlsDeleteSample.js | 41 - .../containerAppsSourceControlsGetSample.js | 41 - ...sSourceControlsListByContainerAppSample.js | 42 - .../javascript/containerAppsUpdateSample.js | 133 -- .../daprComponentsCreateOrUpdateSample.js | 94 - .../javascript/daprComponentsDeleteSample.js | 41 - .../javascript/daprComponentsGetSample.js | 56 - .../javascript/daprComponentsListSample.js | 39 - .../daprComponentsListSecretsSample.js | 41 - .../javascript/jobsCreateOrUpdateSample.js | 80 - .../v2-beta/javascript/jobsDeleteSample.js | 36 - .../javascript/jobsExecutionsListSample.js | 39 - .../v2-beta/javascript/jobsGetSample.js | 36 - .../jobsListByResourceGroupSample.js | 38 - .../jobsListBySubscriptionSample.js | 37 - .../javascript/jobsListSecretsSample.js | 36 - .../v2-beta/javascript/jobsStartSample.js | 54 - .../javascript/jobsStopExecutionSample.js | 41 - .../jobsStopMultipleExecutionsSample.js | 47 - .../v2-beta/javascript/jobsUpdateSample.js | 75 - ...managedCertificatesCreateOrUpdateSample.js | 52 - .../managedCertificatesDeleteSample.js | 41 - .../managedCertificatesGetSample.js | 41 - .../managedCertificatesListSample.js | 39 - .../managedCertificatesUpdateSample.js | 45 - ...EnvironmentDiagnosticsGetDetectorSample.js | 42 - ...vironmentDiagnosticsListDetectorsSample.js | 40 - ...managedEnvironmentsCreateOrUpdateSample.js | 141 -- .../managedEnvironmentsDeleteSample.js | 39 - ...gedEnvironmentsDiagnosticsGetRootSample.js | 39 - .../managedEnvironmentsGetAuthTokenSample.js | 36 - .../managedEnvironmentsGetSample.js | 36 - ...edEnvironmentsListByResourceGroupSample.js | 38 - ...gedEnvironmentsListBySubscriptionSample.js | 37 - ...ronmentsListWorkloadProfileStatesSample.js | 42 - ...nvironmentsStoragesCreateOrUpdateSample.js | 52 - ...managedEnvironmentsStoragesDeleteSample.js | 41 - .../managedEnvironmentsStoragesGetSample.js | 41 - .../managedEnvironmentsStoragesListSample.js | 36 - .../managedEnvironmentsUpdateSample.js | 44 - .../namespacesCheckNameAvailabilitySample.js | 70 - .../javascript/operationsListSample.js | 37 - .../samples/v2-beta/javascript/package.json | 32 - .../samples/v2-beta/javascript/sample.env | 4 - .../samples/v2-beta/typescript/README.md | 251 --- .../samples/v2-beta/typescript/package.json | 41 - .../samples/v2-beta/typescript/sample.env | 4 - .../src/availableWorkloadProfilesGetSample.ts | 41 - .../typescript/src/billingMetersGetSample.ts | 38 - .../src/certificatesCreateOrUpdateSample.ts | 60 - .../src/certificatesDeleteSample.ts | 45 - .../typescript/src/certificatesGetSample.ts | 45 - .../typescript/src/certificatesListSample.ts | 46 - .../src/certificatesUpdateSample.ts | 52 - ...onmentsCertificatesCreateOrUpdateSample.ts | 60 - ...tedEnvironmentsCertificatesDeleteSample.ts | 45 - ...nectedEnvironmentsCertificatesGetSample.ts | 45 - ...ectedEnvironmentsCertificatesListSample.ts | 46 - ...tedEnvironmentsCertificatesUpdateSample.ts | 52 - ...EnvironmentsCheckNameAvailabilitySample.ts | 51 - ...nnectedEnvironmentsCreateOrUpdateSample.ts | 58 - ...mentsDaprComponentsCreateOrUpdateSample.ts | 63 - ...dEnvironmentsDaprComponentsDeleteSample.ts | 45 - ...ctedEnvironmentsDaprComponentsGetSample.ts | 45 - ...tedEnvironmentsDaprComponentsListSample.ts | 46 - ...ronmentsDaprComponentsListSecretsSample.ts | 45 - .../src/connectedEnvironmentsDeleteSample.ts | 43 - .../src/connectedEnvironmentsGetSample.ts | 43 - ...edEnvironmentsListByResourceGroupSample.ts | 44 - ...tedEnvironmentsListBySubscriptionSample.ts | 40 - ...nvironmentsStoragesCreateOrUpdateSample.ts | 59 - ...nnectedEnvironmentsStoragesDeleteSample.ts | 45 - .../connectedEnvironmentsStoragesGetSample.ts | 45 - ...connectedEnvironmentsStoragesListSample.ts | 43 - .../src/connectedEnvironmentsUpdateSample.ts | 43 - ...inerAppsAuthConfigsCreateOrUpdateSample.ts | 55 - .../containerAppsAuthConfigsDeleteSample.ts | 45 - .../src/containerAppsAuthConfigsGetSample.ts | 45 - ...AppsAuthConfigsListByContainerAppSample.ts | 46 - .../src/containerAppsCreateOrUpdateSample.ts | 281 --- .../src/containerAppsDeleteSample.ts | 42 - ...ntainerAppsDiagnosticsGetDetectorSample.ts | 45 - ...ntainerAppsDiagnosticsGetRevisionSample.ts | 44 - .../containerAppsDiagnosticsGetRootSample.ts | 42 - ...ainerAppsDiagnosticsListDetectorsSample.ts | 46 - ...ainerAppsDiagnosticsListRevisionsSample.ts | 45 - .../src/containerAppsGetAuthTokenSample.ts | 42 - .../typescript/src/containerAppsGetSample.ts | 42 - .../containerAppsListByResourceGroupSample.ts | 43 - .../containerAppsListBySubscriptionSample.ts | 40 - ...nerAppsListCustomHostNameAnalysisSample.ts | 50 - .../src/containerAppsListSecretsSample.ts | 42 - ...nerAppsRevisionReplicasGetReplicaSample.ts | 47 - ...rAppsRevisionReplicasListReplicasSample.ts | 45 - ...inerAppsRevisionsActivateRevisionSample.ts | 44 - ...erAppsRevisionsDeactivateRevisionSample.ts | 44 - ...containerAppsRevisionsGetRevisionSample.ts | 44 - ...ntainerAppsRevisionsListRevisionsSample.ts | 45 - ...ainerAppsRevisionsRestartRevisionSample.ts | 44 - ...rAppsSourceControlsCreateOrUpdateSample.ts | 67 - ...containerAppsSourceControlsDeleteSample.ts | 45 - .../containerAppsSourceControlsGetSample.ts | 45 - ...sSourceControlsListByContainerAppSample.ts | 46 - .../src/containerAppsUpdateSample.ts | 138 -- .../src/daprComponentsCreateOrUpdateSample.ts | 103 -- .../src/daprComponentsDeleteSample.ts | 45 - .../typescript/src/daprComponentsGetSample.ts | 70 - .../src/daprComponentsListSample.ts | 46 - .../src/daprComponentsListSecretsSample.ts | 45 - .../src/jobsCreateOrUpdateSample.ts | 83 - .../typescript/src/jobsDeleteSample.ts | 42 - .../src/jobsExecutionsListSample.ts | 45 - .../v2-beta/typescript/src/jobsGetSample.ts | 39 - .../src/jobsListByResourceGroupSample.ts | 41 - .../src/jobsListBySubscriptionSample.ts | 40 - .../typescript/src/jobsListSecretsSample.ts | 39 - .../v2-beta/typescript/src/jobsStartSample.ts | 64 - .../typescript/src/jobsStopExecutionSample.ts | 44 - .../src/jobsStopMultipleExecutionsSample.ts | 53 - .../typescript/src/jobsUpdateSample.ts | 85 - ...managedCertificatesCreateOrUpdateSample.ts | 60 - .../src/managedCertificatesDeleteSample.ts | 45 - .../src/managedCertificatesGetSample.ts | 45 - .../src/managedCertificatesListSample.ts | 46 - .../src/managedCertificatesUpdateSample.ts | 52 - ...EnvironmentDiagnosticsGetDetectorSample.ts | 45 - ...vironmentDiagnosticsListDetectorsSample.ts | 43 - ...managedEnvironmentsCreateOrUpdateSample.ts | 150 -- .../src/managedEnvironmentsDeleteSample.ts | 43 - ...gedEnvironmentsDiagnosticsGetRootSample.ts | 43 - .../managedEnvironmentsGetAuthTokenSample.ts | 42 - .../src/managedEnvironmentsGetSample.ts | 43 - ...edEnvironmentsListByResourceGroupSample.ts | 44 - ...gedEnvironmentsListBySubscriptionSample.ts | 40 - ...ronmentsListWorkloadProfileStatesSample.ts | 46 - ...nvironmentsStoragesCreateOrUpdateSample.ts | 59 - ...managedEnvironmentsStoragesDeleteSample.ts | 45 - .../managedEnvironmentsStoragesGetSample.ts | 45 - .../managedEnvironmentsStoragesListSample.ts | 43 - .../src/managedEnvironmentsUpdateSample.ts | 51 - .../namespacesCheckNameAvailabilitySample.ts | 79 - .../typescript/src/operationsListSample.ts | 40 - .../samples/v2-beta/typescript/tsconfig.json | 17 - .../src/containerAppsAPIClient.ts | 73 +- .../arm-appcontainers/src/models/index.ts | 1063 ++++++----- .../arm-appcontainers/src/models/mappers.ts | 1577 ++++++++++------- .../src/models/parameters.ts | 97 +- .../src/operations/containerApps.ts | 248 +++ .../arm-appcontainers/src/operations/index.ts | 4 +- .../arm-appcontainers/src/operations/jobs.ts | 60 +- .../src/operations/jobsExecutions.ts | 6 +- .../src/operationsInterfaces/containerApps.ts | 60 +- .../src/operationsInterfaces/index.ts | 4 +- .../src/operationsInterfaces/jobs.ts | 38 +- .../operationsInterfaces/jobsExecutions.ts | 2 +- .../test/appcontainers_examples.spec.ts | 124 -- .../arm-appcontainers/test/sampleTest.ts | 43 + .../arm-appcontainers/tsconfig.json | 10 +- 313 files changed, 2285 insertions(+), 16707 deletions(-) delete mode 100644 sdk/appcontainers/arm-appcontainers/assets.json delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/availableWorkloadProfilesGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/billingMetersGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/certificatesCreateOrUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/certificatesDeleteSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/certificatesGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/certificatesListSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/certificatesUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesCreateOrUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesDeleteSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesListSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCheckNameAvailabilitySample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCreateOrUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsDeleteSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsListSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsListSecretsSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDeleteSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsListByResourceGroupSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsListBySubscriptionSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesCreateOrUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesDeleteSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesListSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsCreateOrUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsDeleteSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsListByContainerAppSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsCreateOrUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDeleteSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetDetectorSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetRevisionSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetRootSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsListDetectorsSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsListRevisionsSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsGetAuthTokenSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListByResourceGroupSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListBySubscriptionSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListCustomHostNameAnalysisSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListSecretsSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionReplicasGetReplicaSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionReplicasListReplicasSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsActivateRevisionSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsDeactivateRevisionSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsGetRevisionSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsListRevisionsSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsRestartRevisionSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsCreateOrUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsDeleteSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsListByContainerAppSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsCreateOrUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsDeleteSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsListSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsListSecretsSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/jobsCreateOrUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/jobsDeleteSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/jobsExecutionsListSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/jobsGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/jobsListByResourceGroupSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/jobsListBySubscriptionSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/jobsListSecretsSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/jobsStartSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/jobsStopExecutionSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/jobsStopMultipleExecutionsSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/jobsUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesCreateOrUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesDeleteSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesListSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentDiagnosticsGetDetectorSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentDiagnosticsListDetectorsSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsCreateOrUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsDeleteSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsDiagnosticsGetRootSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsGetAuthTokenSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListByResourceGroupSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListBySubscriptionSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListWorkloadProfileStatesSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesCreateOrUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesDeleteSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesListSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/namespacesCheckNameAvailabilitySample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/operationsListSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/README.md delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/availableWorkloadProfilesGetSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/billingMetersGetSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesCreateOrUpdateSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesDeleteSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesGetSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesListSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesUpdateSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesCreateOrUpdateSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesDeleteSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesGetSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesListSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesUpdateSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCheckNameAvailabilitySample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCreateOrUpdateSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsDeleteSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsGetSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsListSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsListSecretsSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDeleteSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsGetSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsListByResourceGroupSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsListBySubscriptionSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsStoragesCreateOrUpdateSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsStoragesDeleteSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsStoragesGetSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsStoragesListSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsUpdateSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsAuthConfigsCreateOrUpdateSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsAuthConfigsDeleteSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsAuthConfigsGetSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsAuthConfigsListByContainerAppSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsCreateOrUpdateSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDeleteSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsGetDetectorSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsGetRevisionSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsGetRootSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsListDetectorsSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsListRevisionsSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsGetAuthTokenSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsGetSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsListByResourceGroupSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsListBySubscriptionSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsListCustomHostNameAnalysisSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsListSecretsSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionReplicasGetReplicaSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionReplicasListReplicasSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionsActivateRevisionSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionsDeactivateRevisionSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionsGetRevisionSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionsListRevisionsSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionsRestartRevisionSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsSourceControlsCreateOrUpdateSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsSourceControlsDeleteSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsSourceControlsGetSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsSourceControlsListByContainerAppSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsUpdateSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsCreateOrUpdateSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsDeleteSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsGetSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsListSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsListSecretsSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsCreateOrUpdateSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsDeleteSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsExecutionsListSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsGetSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsListByResourceGroupSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsListBySubscriptionSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsListSecretsSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsStartSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsStopExecutionSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsStopMultipleExecutionsSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsUpdateSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedCertificatesCreateOrUpdateSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedCertificatesDeleteSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedCertificatesGetSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedCertificatesListSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedCertificatesUpdateSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentDiagnosticsGetDetectorSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentDiagnosticsListDetectorsSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsCreateOrUpdateSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsDeleteSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsDiagnosticsGetRootSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsGetAuthTokenSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsGetSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsListByResourceGroupSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsListBySubscriptionSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsListWorkloadProfileStatesSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsStoragesCreateOrUpdateSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsStoragesDeleteSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsStoragesGetSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsStoragesListSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsUpdateSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/namespacesCheckNameAvailabilitySample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/operationsListSample.js delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/package.json delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/sample.env delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/README.md delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/package.json delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/sample.env delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/availableWorkloadProfilesGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/billingMetersGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesCreateOrUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesDeleteSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesListSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesCreateOrUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesDeleteSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesListSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCheckNameAvailabilitySample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCreateOrUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsDeleteSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsListSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsListSecretsSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDeleteSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsListByResourceGroupSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsListBySubscriptionSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsStoragesCreateOrUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsStoragesDeleteSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsStoragesGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsStoragesListSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsAuthConfigsCreateOrUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsAuthConfigsDeleteSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsAuthConfigsGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsAuthConfigsListByContainerAppSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsCreateOrUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDeleteSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsGetDetectorSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsGetRevisionSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsGetRootSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsListDetectorsSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsListRevisionsSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsGetAuthTokenSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsListByResourceGroupSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsListBySubscriptionSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsListCustomHostNameAnalysisSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsListSecretsSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionReplicasGetReplicaSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionReplicasListReplicasSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionsActivateRevisionSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionsDeactivateRevisionSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionsGetRevisionSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionsListRevisionsSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionsRestartRevisionSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsSourceControlsCreateOrUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsSourceControlsDeleteSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsSourceControlsGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsSourceControlsListByContainerAppSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsCreateOrUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsDeleteSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsListSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsListSecretsSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsCreateOrUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsDeleteSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsExecutionsListSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsListByResourceGroupSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsListBySubscriptionSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsListSecretsSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsStartSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsStopExecutionSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsStopMultipleExecutionsSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedCertificatesCreateOrUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedCertificatesDeleteSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedCertificatesGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedCertificatesListSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedCertificatesUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentDiagnosticsGetDetectorSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentDiagnosticsListDetectorsSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsCreateOrUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsDeleteSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsDiagnosticsGetRootSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsGetAuthTokenSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsListByResourceGroupSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsListBySubscriptionSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsListWorkloadProfileStatesSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsStoragesCreateOrUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsStoragesDeleteSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsStoragesGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsStoragesListSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/namespacesCheckNameAvailabilitySample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/operationsListSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/tsconfig.json delete mode 100644 sdk/appcontainers/arm-appcontainers/test/appcontainers_examples.spec.ts create mode 100644 sdk/appcontainers/arm-appcontainers/test/sampleTest.ts diff --git a/sdk/appcontainers/arm-appcontainers/CHANGELOG.md b/sdk/appcontainers/arm-appcontainers/CHANGELOG.md index eca600ca0f46..2e530344065f 100644 --- a/sdk/appcontainers/arm-appcontainers/CHANGELOG.md +++ b/sdk/appcontainers/arm-appcontainers/CHANGELOG.md @@ -1,16 +1,6 @@ # Release History - -## 2.0.0-beta.4 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 2.0.0-beta.3 (2023-05-12) + +## 2.0.0 (2023-08-09) **Features** @@ -26,6 +16,10 @@ - Added operation group ManagedCertificates - Added operation group ManagedEnvironmentDiagnostics - Added operation group ManagedEnvironmentsDiagnostics + - Added operation ContainerApps.beginStart + - Added operation ContainerApps.beginStartAndWait + - Added operation ContainerApps.beginStop + - Added operation ContainerApps.beginStopAndWait - Added operation ContainerApps.getAuthToken - Added operation ManagedEnvironments.getAuthToken - Added operation ManagedEnvironments.listWorkloadProfileStates @@ -81,6 +75,10 @@ - Added Interface ContainerAppsDiagnosticsListRevisionsNextOptionalParams - Added Interface ContainerAppsDiagnosticsListRevisionsOptionalParams - Added Interface ContainerAppsGetAuthTokenOptionalParams + - Added Interface ContainerAppsStartHeaders + - Added Interface ContainerAppsStartOptionalParams + - Added Interface ContainerAppsStopHeaders + - Added Interface ContainerAppsStopOptionalParams - Added Interface ContainerAppsUpdateHeaders - Added Interface CorsPolicy - Added Interface CustomDomainConfiguration @@ -110,15 +108,19 @@ - Added Interface IpSecurityRestrictionRule - Added Interface Job - Added Interface JobConfiguration + - Added Interface JobConfigurationEventTriggerConfig - Added Interface JobConfigurationManualTriggerConfig - Added Interface JobConfigurationScheduleTriggerConfig - Added Interface JobExecution - Added Interface JobExecutionBase - Added Interface JobExecutionContainer - Added Interface JobExecutionNamesCollection + - Added Interface JobExecutionOptionalParams - Added Interface JobExecutionTemplate - Added Interface JobPatchProperties - Added Interface JobPatchPropertiesProperties + - Added Interface JobScale + - Added Interface JobScaleRule - Added Interface JobsCollection - Added Interface JobsCreateOrUpdateOptionalParams - Added Interface JobsDeleteHeaders @@ -154,11 +156,15 @@ - Added Interface ManagedCertificatesUpdateOptionalParams - Added Interface ManagedEnvironmentDiagnosticsGetDetectorOptionalParams - Added Interface ManagedEnvironmentDiagnosticsListDetectorsOptionalParams + - Added Interface ManagedEnvironmentPropertiesPeerAuthentication - Added Interface ManagedEnvironmentsDiagnosticsGetRootOptionalParams - Added Interface ManagedEnvironmentsGetAuthTokenOptionalParams - Added Interface ManagedEnvironmentsListWorkloadProfileStatesNextOptionalParams - Added Interface ManagedEnvironmentsListWorkloadProfileStatesOptionalParams + - Added Interface Mtls - Added Interface SecretVolumeItem + - Added Interface Service + - Added Interface ServiceBind - Added Interface TcpScaleRule - Added Interface WorkloadProfile - Added Interface WorkloadProfileStates @@ -192,6 +198,8 @@ - Added Type Alias ConnectedEnvironmentsStoragesGetResponse - Added Type Alias ConnectedEnvironmentsStoragesListResponse - Added Type Alias ConnectedEnvironmentsUpdateResponse + - Added Type Alias ContainerAppContainerRunningState + - Added Type Alias ContainerAppReplicaRunningState - Added Type Alias ContainerAppsDiagnosticsGetDetectorResponse - Added Type Alias ContainerAppsDiagnosticsGetRevisionResponse - Added Type Alias ContainerAppsDiagnosticsGetRootResponse @@ -200,9 +208,12 @@ - Added Type Alias ContainerAppsDiagnosticsListRevisionsNextResponse - Added Type Alias ContainerAppsDiagnosticsListRevisionsResponse - Added Type Alias ContainerAppsGetAuthTokenResponse + - Added Type Alias ContainerAppsStartResponse + - Added Type Alias ContainerAppsStopResponse - Added Type Alias ContainerAppsUpdateResponse - Added Type Alias ExtendedLocationTypes - Added Type Alias IngressClientCertificateMode + - Added Type Alias JobExecutionResponse - Added Type Alias JobExecutionRunningState - Added Type Alias JobProvisioningState - Added Type Alias JobsCreateOrUpdateResponse @@ -231,9 +242,12 @@ - Added Type Alias ManagedEnvironmentsListWorkloadProfileStatesNextResponse - Added Type Alias ManagedEnvironmentsListWorkloadProfileStatesResponse - Added Type Alias ManagedEnvironmentsUpdateResponse + - Added Type Alias RevisionRunningState - Added Type Alias TriggerType + - Interface AzureCredentials has a new optional parameter kind - Interface CertificateProperties has a new optional parameter subjectAlternativeNames - Interface Configuration has a new optional parameter maxInactiveRevisions + - Interface Configuration has a new optional parameter service - Interface ContainerApp has a new optional parameter environmentId - Interface ContainerApp has a new optional parameter eventStreamEndpoint - Interface ContainerApp has a new optional parameter extendedLocation @@ -248,6 +262,7 @@ - Interface Dapr has a new optional parameter httpReadBufferSize - Interface Dapr has a new optional parameter logLevel - Interface DaprComponent has a new optional parameter secretStoreComponent + - Interface GithubActionConfiguration has a new optional parameter githubPersonalAccessToken - Interface Ingress has a new optional parameter clientCertificateMode - Interface Ingress has a new optional parameter corsPolicy - Interface Ingress has a new optional parameter exposedPort @@ -259,243 +274,52 @@ - Interface ManagedEnvironment has a new optional parameter infrastructureResourceGroup - Interface ManagedEnvironment has a new optional parameter kedaConfiguration - Interface ManagedEnvironment has a new optional parameter kind + - Interface ManagedEnvironment has a new optional parameter peerAuthentication - Interface ManagedEnvironment has a new optional parameter workloadProfiles + - Interface Replica has a new optional parameter initContainers + - Interface Replica has a new optional parameter runningState + - Interface Replica has a new optional parameter runningStateDetails - Interface ReplicaContainer has a new optional parameter execEndpoint - Interface ReplicaContainer has a new optional parameter logStreamEndpoint + - Interface ReplicaContainer has a new optional parameter runningState + - Interface ReplicaContainer has a new optional parameter runningStateDetails - Interface Revision has a new optional parameter lastActiveTime + - Interface Revision has a new optional parameter runningState - Interface ScaleRule has a new optional parameter tcp - Interface Secret has a new optional parameter identity - Interface Secret has a new optional parameter keyVaultUrl - Interface Template has a new optional parameter initContainers + - Interface Template has a new optional parameter serviceBinds + - Interface Template has a new optional parameter terminationGracePeriodSeconds + - Interface Volume has a new optional parameter mountOptions - Interface Volume has a new optional parameter secrets + - Interface VolumeMount has a new optional parameter subPath - Added Enum KnownAction - Added Enum KnownAffinity - Added Enum KnownApplicability - Added Enum KnownConnectedEnvironmentProvisioningState + - Added Enum KnownContainerAppContainerRunningState + - Added Enum KnownContainerAppReplicaRunningState - Added Enum KnownExtendedLocationTypes - Added Enum KnownIngressClientCertificateMode - Added Enum KnownJobExecutionRunningState - Added Enum KnownJobProvisioningState - Added Enum KnownLogLevel - Added Enum KnownManagedCertificateDomainControlValidation + - Added Enum KnownRevisionRunningState - Added Enum KnownTriggerType - Enum KnownContainerAppProvisioningState has a new value Deleting - Enum KnownIngressTransportMethod has a new value Tcp - Enum KnownStorageType has a new value Secret - Added function getContinuationToken - - Interface ContainerAppsRevisionsListRevisionsNextOptionalParams no longer has parameter filter **Breaking Changes** + - Interface ContainerAppsRevisionsListRevisionsNextOptionalParams no longer has parameter filter - Interface VnetConfiguration no longer has parameter runtimeSubnetId - Type of parameter customDomainVerificationFailureInfo of interface CustomHostnameAnalysisResult is changed from DefaultErrorResponse to CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo - Type of parameter value of interface DaprSecretsCollection is changed from Secret[] to DaprSecret[] - -## 2.0.0-beta.2 (2022-11-15) - - Bugs Fixed - -## 2.0.0-beta.1 (2022-10-12) - -**Features** - - - Added operation group AvailableWorkloadProfiles - - Added operation group BillingMeters - - Added operation group ConnectedEnvironments - - Added operation group ConnectedEnvironmentsCertificates - - Added operation group ConnectedEnvironmentsDaprComponents - - Added operation group ConnectedEnvironmentsStorages - - Added operation group ContainerAppsDiagnostics - - Added operation group ManagedEnvironmentDiagnostics - - Added operation group ManagedEnvironmentsDiagnostics - - Added operation ContainerApps.getAuthToken - - Added operation ManagedEnvironments.getAuthToken - - Added operation ManagedEnvironments.listWorkloadProfileStates - - Added Interface AvailableWorkloadProfile - - Added Interface AvailableWorkloadProfileProperties - - Added Interface AvailableWorkloadProfilesCollection - - Added Interface AvailableWorkloadProfilesGetNextOptionalParams - - Added Interface AvailableWorkloadProfilesGetOptionalParams - - Added Interface BaseContainer - - Added Interface BillingMeter - - Added Interface BillingMeterCollection - - Added Interface BillingMeterProperties - - Added Interface BillingMetersGetOptionalParams - - Added Interface ConnectedEnvironment - - Added Interface ConnectedEnvironmentCollection - - Added Interface ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams - - Added Interface ConnectedEnvironmentsCertificatesDeleteOptionalParams - - Added Interface ConnectedEnvironmentsCertificatesGetOptionalParams - - Added Interface ConnectedEnvironmentsCertificatesListNextOptionalParams - - Added Interface ConnectedEnvironmentsCertificatesListOptionalParams - - Added Interface ConnectedEnvironmentsCertificatesUpdateOptionalParams - - Added Interface ConnectedEnvironmentsCheckNameAvailabilityOptionalParams - - Added Interface ConnectedEnvironmentsCreateOrUpdateOptionalParams - - Added Interface ConnectedEnvironmentsDaprComponentsCreateOrUpdateOptionalParams - - Added Interface ConnectedEnvironmentsDaprComponentsDeleteOptionalParams - - Added Interface ConnectedEnvironmentsDaprComponentsGetOptionalParams - - Added Interface ConnectedEnvironmentsDaprComponentsListNextOptionalParams - - Added Interface ConnectedEnvironmentsDaprComponentsListOptionalParams - - Added Interface ConnectedEnvironmentsDaprComponentsListSecretsOptionalParams - - Added Interface ConnectedEnvironmentsDeleteOptionalParams - - Added Interface ConnectedEnvironmentsGetOptionalParams - - Added Interface ConnectedEnvironmentsListByResourceGroupNextOptionalParams - - Added Interface ConnectedEnvironmentsListByResourceGroupOptionalParams - - Added Interface ConnectedEnvironmentsListBySubscriptionNextOptionalParams - - Added Interface ConnectedEnvironmentsListBySubscriptionOptionalParams - - Added Interface ConnectedEnvironmentsStoragesCreateOrUpdateOptionalParams - - Added Interface ConnectedEnvironmentsStoragesDeleteOptionalParams - - Added Interface ConnectedEnvironmentsStoragesGetOptionalParams - - Added Interface ConnectedEnvironmentsStoragesListOptionalParams - - Added Interface ConnectedEnvironmentStorage - - Added Interface ConnectedEnvironmentStorageProperties - - Added Interface ConnectedEnvironmentStoragesCollection - - Added Interface ConnectedEnvironmentsUpdateOptionalParams - - Added Interface ContainerAppAuthToken - - Added Interface ContainerAppsDiagnosticsGetDetectorOptionalParams - - Added Interface ContainerAppsDiagnosticsGetRevisionOptionalParams - - Added Interface ContainerAppsDiagnosticsGetRootOptionalParams - - Added Interface ContainerAppsDiagnosticsListDetectorsNextOptionalParams - - Added Interface ContainerAppsDiagnosticsListDetectorsOptionalParams - - Added Interface ContainerAppsDiagnosticsListRevisionsNextOptionalParams - - Added Interface ContainerAppsDiagnosticsListRevisionsOptionalParams - - Added Interface ContainerAppsGetAuthTokenOptionalParams - - Added Interface CustomDomainConfiguration - - Added Interface CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo - - Added Interface CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem - - Added Interface DaprSecret - - Added Interface DiagnosticDataProviderMetadata - - Added Interface DiagnosticDataProviderMetadataPropertyBagItem - - Added Interface DiagnosticDataTableResponseColumn - - Added Interface DiagnosticDataTableResponseObject - - Added Interface DiagnosticRendering - - Added Interface Diagnostics - - Added Interface DiagnosticsCollection - - Added Interface DiagnosticsDataApiResponse - - Added Interface DiagnosticsDefinition - - Added Interface DiagnosticsProperties - - Added Interface DiagnosticsStatus - - Added Interface DiagnosticSupportTopic - - Added Interface EnvironmentAuthToken - - Added Interface EnvironmentSkuProperties - - Added Interface ErrorAdditionalInfo - - Added Interface ErrorDetail - - Added Interface ErrorResponse - - Added Interface ExtendedLocation - - Added Interface InitContainer - - Added Interface IpSecurityRestrictionRule - - Added Interface ManagedEnvironmentDiagnosticsGetDetectorOptionalParams - - Added Interface ManagedEnvironmentDiagnosticsListDetectorsOptionalParams - - Added Interface ManagedEnvironmentOutboundSettings - - Added Interface ManagedEnvironmentsDiagnosticsGetRootOptionalParams - - Added Interface ManagedEnvironmentsGetAuthTokenOptionalParams - - Added Interface ManagedEnvironmentsListWorkloadProfileStatesNextOptionalParams - - Added Interface ManagedEnvironmentsListWorkloadProfileStatesOptionalParams - - Added Interface TcpScaleRule - - Added Interface WorkloadProfile - - Added Interface WorkloadProfileStates - - Added Interface WorkloadProfileStatesCollection - - Added Interface WorkloadProfileStatesProperties - - Added Type Alias Action - - Added Type Alias Applicability - - Added Type Alias AvailableWorkloadProfilesGetNextResponse - - Added Type Alias AvailableWorkloadProfilesGetResponse - - Added Type Alias BillingMetersGetResponse - - Added Type Alias Category - - Added Type Alias ConnectedEnvironmentProvisioningState - - Added Type Alias ConnectedEnvironmentsCertificatesCreateOrUpdateResponse - - Added Type Alias ConnectedEnvironmentsCertificatesGetResponse - - Added Type Alias ConnectedEnvironmentsCertificatesListNextResponse - - Added Type Alias ConnectedEnvironmentsCertificatesListResponse - - Added Type Alias ConnectedEnvironmentsCertificatesUpdateResponse - - Added Type Alias ConnectedEnvironmentsCheckNameAvailabilityResponse - - Added Type Alias ConnectedEnvironmentsCreateOrUpdateResponse - - Added Type Alias ConnectedEnvironmentsDaprComponentsCreateOrUpdateResponse - - Added Type Alias ConnectedEnvironmentsDaprComponentsGetResponse - - Added Type Alias ConnectedEnvironmentsDaprComponentsListNextResponse - - Added Type Alias ConnectedEnvironmentsDaprComponentsListResponse - - Added Type Alias ConnectedEnvironmentsDaprComponentsListSecretsResponse - - Added Type Alias ConnectedEnvironmentsGetResponse - - Added Type Alias ConnectedEnvironmentsListByResourceGroupNextResponse - - Added Type Alias ConnectedEnvironmentsListByResourceGroupResponse - - Added Type Alias ConnectedEnvironmentsListBySubscriptionNextResponse - - Added Type Alias ConnectedEnvironmentsListBySubscriptionResponse - - Added Type Alias ConnectedEnvironmentsStoragesCreateOrUpdateResponse - - Added Type Alias ConnectedEnvironmentsStoragesGetResponse - - Added Type Alias ConnectedEnvironmentsStoragesListResponse - - Added Type Alias ConnectedEnvironmentsUpdateResponse - - 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 ContainerAppsGetAuthTokenResponse - - Added Type Alias ExtendedLocationTypes - - Added Type Alias LogLevel - - Added Type Alias ManagedEnvironmentDiagnosticsGetDetectorResponse - - Added Type Alias ManagedEnvironmentDiagnosticsListDetectorsResponse - - Added Type Alias ManagedEnvironmentOutBoundType - - Added Type Alias ManagedEnvironmentsDiagnosticsGetRootResponse - - Added Type Alias ManagedEnvironmentsGetAuthTokenResponse - - Added Type Alias ManagedEnvironmentsListWorkloadProfileStatesNextResponse - - Added Type Alias ManagedEnvironmentsListWorkloadProfileStatesResponse - - Added Type Alias SkuName - - Interface CertificateProperties has a new optional parameter subjectAlternativeNames - - Interface Configuration has a new optional parameter maxInactiveRevisions - - Interface ContainerApp has a new optional parameter environmentId - - Interface ContainerApp has a new optional parameter eventStreamEndpoint - - Interface ContainerApp has a new optional parameter extendedLocation - - Interface ContainerApp has a new optional parameter workloadProfileType - - Interface CustomHostnameAnalysisResult has a new optional parameter conflictWithEnvironmentCustomDomain - - Interface Dapr has a new optional parameter enableApiLogging - - Interface Dapr has a new optional parameter httpMaxRequestSize - - Interface Dapr has a new optional parameter httpReadBufferSize - - Interface Dapr has a new optional parameter logLevel - - Interface DaprComponent has a new optional parameter secretStoreComponent - - Interface Ingress has a new optional parameter exposedPort - - Interface Ingress has a new optional parameter ipSecurityRestrictions - - Interface ManagedEnvironment has a new optional parameter customDomainConfiguration - - Interface ManagedEnvironment has a new optional parameter eventStreamEndpoint - - Interface ManagedEnvironment has a new optional parameter sku - - Interface ManagedEnvironment has a new optional parameter workloadProfiles - - Interface ReplicaContainer has a new optional parameter execEndpoint - - Interface ReplicaContainer has a new optional parameter logStreamEndpoint - - Interface Revision has a new optional parameter lastActiveTime - - Interface ScaleRule has a new optional parameter tcp - - Interface Template has a new optional parameter initContainers - - Interface VnetConfiguration has a new optional parameter outboundSettings - - Class ContainerAppsAPIClient has a new parameter availableWorkloadProfiles - - Class ContainerAppsAPIClient has a new parameter billingMeters - - Class ContainerAppsAPIClient has a new parameter connectedEnvironments - - Class ContainerAppsAPIClient has a new parameter connectedEnvironmentsCertificates - - Class ContainerAppsAPIClient has a new parameter connectedEnvironmentsDaprComponents - - Class ContainerAppsAPIClient has a new parameter connectedEnvironmentsStorages - - Class ContainerAppsAPIClient has a new parameter containerAppsDiagnostics - - Class ContainerAppsAPIClient has a new parameter managedEnvironmentDiagnostics - - Class ContainerAppsAPIClient has a new parameter managedEnvironmentsDiagnostics - - Added Enum KnownAction - - Added Enum KnownApplicability - - Added Enum KnownCategory - - Added Enum KnownConnectedEnvironmentProvisioningState - - Added Enum KnownExtendedLocationTypes - - Added Enum KnownLogLevel - - Added Enum KnownManagedEnvironmentOutBoundType - - Added Enum KnownSkuName - - Enum KnownContainerAppProvisioningState has a new value Deleting - - Enum KnownIngressTransportMethod has a new value Tcp - -**Breaking Changes** - - - Interface Container no longer has parameter args - - Interface Container no longer has parameter command - - Interface Container no longer has parameter env - - Interface Container no longer has parameter image - - Interface Container no longer has parameter name - - Interface Container no longer has parameter resources - - Interface Container no longer has parameter volumeMounts - ## 1.1.2 (2022-10-08) **Bugs Fixed** diff --git a/sdk/appcontainers/arm-appcontainers/README.md b/sdk/appcontainers/arm-appcontainers/README.md index 075cd14fefc2..1272651c6c63 100644 --- a/sdk/appcontainers/arm-appcontainers/README.md +++ b/sdk/appcontainers/arm-appcontainers/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/appcontainers/arm-appcontainers) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-appcontainers) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-appcontainers?view=azure-node-preview) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-appcontainers) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started diff --git a/sdk/appcontainers/arm-appcontainers/_meta.json b/sdk/appcontainers/arm-appcontainers/_meta.json index 39e4a36c9bb0..bbcf15bf313b 100644 --- a/sdk/appcontainers/arm-appcontainers/_meta.json +++ b/sdk/appcontainers/arm-appcontainers/_meta.json @@ -1,8 +1,8 @@ { - "commit": "c7daa3d35baaaabece0dbc6f731eadbe426973b9", + "commit": "88a43428e25662d9b8c1d6db4014ca21bc6b568b", "readme": "specification/app/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\app\\resource-manager\\readme.md --use=@autorest/typescript@6.0.1 --generate-sample=true", + "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/app/resource-manager/readme.md --use=@autorest/typescript@^6.0.4", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.6.2", - "use": "@autorest/typescript@6.0.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.1", + "use": "@autorest/typescript@^6.0.4" } \ No newline at end of file diff --git a/sdk/appcontainers/arm-appcontainers/assets.json b/sdk/appcontainers/arm-appcontainers/assets.json deleted file mode 100644 index 12680793840c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/assets.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "AssetsRepo": "Azure/azure-sdk-assets", - "AssetsRepoPrefixPath": "js", - "TagPrefix": "js/appcontainers/arm-appcontainers", - "Tag": "js/appcontainers/arm-appcontainers_7d4c58c2dc" -} diff --git a/sdk/appcontainers/arm-appcontainers/package.json b/sdk/appcontainers/arm-appcontainers/package.json index 60fa15d44316..00d165193fc5 100644 --- a/sdk/appcontainers/arm-appcontainers/package.json +++ b/sdk/appcontainers/arm-appcontainers/package.json @@ -3,12 +3,12 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for ContainerAppsAPIClient.", - "version": "2.0.0-beta.4", + "version": "2.0.0", "engines": { "node": ">=14.0.0" }, "dependencies": { - "@azure/core-lro": "^2.5.0", + "@azure/core-lro": "^2.5.4", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", "@azure/core-client": "^1.7.0", @@ -111,13 +111,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appcontainers/arm-appcontainers", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-appcontainers?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appcontainers/arm-appcontainers" +} \ No newline at end of file diff --git a/sdk/appcontainers/arm-appcontainers/review/arm-appcontainers.api.md b/sdk/appcontainers/arm-appcontainers/review/arm-appcontainers.api.md index f5237442ba13..2ea96683e2b7 100644 --- a/sdk/appcontainers/arm-appcontainers/review/arm-appcontainers.api.md +++ b/sdk/appcontainers/arm-appcontainers/review/arm-appcontainers.api.md @@ -167,6 +167,7 @@ export interface AzureActiveDirectoryValidation { export interface AzureCredentials { clientId?: string; clientSecret?: string; + kind?: string; subscriptionId?: string; tenantId?: string; } @@ -349,6 +350,7 @@ export interface Configuration { maxInactiveRevisions?: number; registries?: RegistryCredentials[]; secrets?: Secret[]; + service?: Service; } // @public @@ -635,6 +637,9 @@ export interface ContainerAppCollection { value: ContainerApp[]; } +// @public +export type ContainerAppContainerRunningState = string; + // @public export interface ContainerAppJobExecutions { readonly nextLink?: string; @@ -678,12 +683,19 @@ export interface ContainerAppProbeTcpSocket { // @public export type ContainerAppProvisioningState = string; +// @public +export type ContainerAppReplicaRunningState = string; + // @public export interface ContainerApps { beginCreateOrUpdate(resourceGroupName: string, containerAppName: string, containerAppEnvelope: ContainerApp, options?: ContainerAppsCreateOrUpdateOptionalParams): Promise, ContainerAppsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, containerAppName: string, containerAppEnvelope: ContainerApp, options?: ContainerAppsCreateOrUpdateOptionalParams): Promise; beginDelete(resourceGroupName: string, containerAppName: string, options?: ContainerAppsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, containerAppName: string, options?: ContainerAppsDeleteOptionalParams): Promise; + beginStart(resourceGroupName: string, containerAppName: string, options?: ContainerAppsStartOptionalParams): Promise, ContainerAppsStartResponse>>; + beginStartAndWait(resourceGroupName: string, containerAppName: string, options?: ContainerAppsStartOptionalParams): Promise; + beginStop(resourceGroupName: string, containerAppName: string, options?: ContainerAppsStopOptionalParams): Promise, ContainerAppsStopResponse>>; + beginStopAndWait(resourceGroupName: string, containerAppName: string, options?: ContainerAppsStopOptionalParams): Promise; beginUpdate(resourceGroupName: string, containerAppName: string, containerAppEnvelope: ContainerApp, options?: ContainerAppsUpdateOptionalParams): Promise, ContainerAppsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, containerAppName: string, containerAppEnvelope: ContainerApp, options?: ContainerAppsUpdateOptionalParams): Promise; get(resourceGroupName: string, containerAppName: string, options?: ContainerAppsGetOptionalParams): Promise; @@ -729,6 +741,7 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { containerAppsSourceControls: ContainerAppsSourceControls; // (undocumented) daprComponents: DaprComponents; + jobExecution(resourceGroupName: string, jobName: string, jobExecutionName: string, options?: JobExecutionOptionalParams): Promise; // (undocumented) jobs: Jobs; // (undocumented) @@ -1052,6 +1065,36 @@ export interface ContainerAppsSourceControlsListByContainerAppOptionalParams ext // @public export type ContainerAppsSourceControlsListByContainerAppResponse = SourceControlCollection; +// @public +export interface ContainerAppsStartHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface ContainerAppsStartOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ContainerAppsStartResponse = ContainerApp; + +// @public +export interface ContainerAppsStopHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface ContainerAppsStopOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ContainerAppsStopResponse = ContainerApp; + // @public export interface ContainerAppsUpdateHeaders { // (undocumented) @@ -1453,6 +1496,7 @@ export interface GitHub { export interface GithubActionConfiguration { azureCredentials?: AzureCredentials; contextPath?: string; + githubPersonalAccessToken?: string; image?: string; os?: string; publishType?: string; @@ -1563,6 +1607,7 @@ export interface Job extends TrackedResource { // @public export interface JobConfiguration { + eventTriggerConfig?: JobConfigurationEventTriggerConfig; manualTriggerConfig?: JobConfigurationManualTriggerConfig; registries?: RegistryCredentials[]; replicaRetryLimit?: number; @@ -1572,6 +1617,13 @@ export interface JobConfiguration { triggerType: TriggerType; } +// @public +export interface JobConfigurationEventTriggerConfig { + parallelism?: number; + replicaCompletionCount?: number; + scale?: JobScale; +} + // @public export interface JobConfigurationManualTriggerConfig { parallelism?: number; @@ -1617,6 +1669,13 @@ export interface JobExecutionNamesCollection { value: JobExecutionBase[]; } +// @public +export interface JobExecutionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type JobExecutionResponse = JobExecution; + // @public export type JobExecutionRunningState = string; @@ -1654,12 +1713,12 @@ export interface Jobs { beginCreateOrUpdateAndWait(resourceGroupName: string, jobName: string, jobEnvelope: Job, options?: JobsCreateOrUpdateOptionalParams): Promise; beginDelete(resourceGroupName: string, jobName: string, options?: JobsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, jobName: string, options?: JobsDeleteOptionalParams): Promise; - beginStart(resourceGroupName: string, jobName: string, template: JobExecutionTemplate, options?: JobsStartOptionalParams): Promise, JobsStartResponse>>; - beginStartAndWait(resourceGroupName: string, jobName: string, template: JobExecutionTemplate, options?: JobsStartOptionalParams): Promise; + beginStart(resourceGroupName: string, jobName: string, options?: JobsStartOptionalParams): Promise, JobsStartResponse>>; + beginStartAndWait(resourceGroupName: string, jobName: string, options?: JobsStartOptionalParams): Promise; beginStopExecution(resourceGroupName: string, jobName: string, jobExecutionName: string, options?: JobsStopExecutionOptionalParams): Promise, void>>; beginStopExecutionAndWait(resourceGroupName: string, jobName: string, jobExecutionName: string, options?: JobsStopExecutionOptionalParams): Promise; - beginStopMultipleExecutions(resourceGroupName: string, jobName: string, jobExecutionName: JobExecutionNamesCollection, options?: JobsStopMultipleExecutionsOptionalParams): Promise, JobsStopMultipleExecutionsResponse>>; - beginStopMultipleExecutionsAndWait(resourceGroupName: string, jobName: string, jobExecutionName: JobExecutionNamesCollection, options?: JobsStopMultipleExecutionsOptionalParams): Promise; + beginStopMultipleExecutions(resourceGroupName: string, jobName: string, options?: JobsStopMultipleExecutionsOptionalParams): Promise, JobsStopMultipleExecutionsResponse>>; + beginStopMultipleExecutionsAndWait(resourceGroupName: string, jobName: string, options?: JobsStopMultipleExecutionsOptionalParams): Promise; beginUpdate(resourceGroupName: string, jobName: string, jobEnvelope: JobPatchProperties, options?: JobsUpdateOptionalParams): Promise, JobsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, jobName: string, jobEnvelope: JobPatchProperties, options?: JobsUpdateOptionalParams): Promise; get(resourceGroupName: string, jobName: string, options?: JobsGetOptionalParams): Promise; @@ -1668,6 +1727,22 @@ export interface Jobs { listSecrets(resourceGroupName: string, jobName: string, options?: JobsListSecretsOptionalParams): Promise; } +// @public +export interface JobScale { + maxExecutions?: number; + minExecutions?: number; + pollingInterval?: number; + rules?: JobScaleRule[]; +} + +// @public +export interface JobScaleRule { + auth?: ScaleRuleAuth[]; + metadata?: Record; + name?: string; + type?: string; +} + // @public export interface JobsCollection { readonly nextLink?: string; @@ -1771,6 +1846,7 @@ export interface JobsStartHeaders { // @public export interface JobsStartOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; + template?: JobExecutionTemplate; updateIntervalInMs?: number; } @@ -1906,6 +1982,13 @@ export enum KnownConnectedEnvironmentProvisioningState { Waiting = "Waiting" } +// @public +export enum KnownContainerAppContainerRunningState { + Running = "Running", + Terminated = "Terminated", + Waiting = "Waiting" +} + // @public export enum KnownContainerAppProvisioningState { Canceled = "Canceled", @@ -1915,6 +1998,13 @@ export enum KnownContainerAppProvisioningState { Succeeded = "Succeeded" } +// @public +export enum KnownContainerAppReplicaRunningState { + NotRunning = "NotRunning", + Running = "Running", + Unknown = "Unknown" +} + // @public export enum KnownCreatedByType { Application = "Application", @@ -2016,6 +2106,16 @@ export enum KnownRevisionProvisioningState { Provisioning = "Provisioning" } +// @public +export enum KnownRevisionRunningState { + Degraded = "Degraded", + Failed = "Failed", + Processing = "Processing", + Running = "Running", + Stopped = "Stopped", + Unknown = "Unknown" +} + // @public export enum KnownScheme { Http = "HTTP", @@ -2041,7 +2141,7 @@ export enum KnownStorageType { export enum KnownTriggerType { Event = "Event", Manual = "Manual", - Scheduled = "Scheduled" + Schedule = "Schedule" } // @public @@ -2174,6 +2274,7 @@ export interface ManagedEnvironment extends TrackedResource { infrastructureResourceGroup?: string; kedaConfiguration?: KedaConfiguration; kind?: string; + peerAuthentication?: ManagedEnvironmentPropertiesPeerAuthentication; readonly provisioningState?: EnvironmentProvisioningState; readonly staticIp?: string; vnetConfiguration?: VnetConfiguration; @@ -2201,6 +2302,11 @@ export interface ManagedEnvironmentDiagnosticsListDetectorsOptionalParams extend // @public export type ManagedEnvironmentDiagnosticsListDetectorsResponse = DiagnosticsCollection; +// @public +export interface ManagedEnvironmentPropertiesPeerAuthentication { + mtls?: Mtls; +} + // @public export interface ManagedEnvironments { beginCreateOrUpdate(resourceGroupName: string, environmentName: string, environmentEnvelope: ManagedEnvironment, options?: ManagedEnvironmentsCreateOrUpdateOptionalParams): Promise, ManagedEnvironmentsCreateOrUpdateResponse>>; @@ -2375,6 +2481,11 @@ export interface ManagedServiceIdentity { // @public export type ManagedServiceIdentityType = string; +// @public +export interface Mtls { + enabled?: boolean; +} + // @public export interface Namespaces { checkNameAvailability(resourceGroupName: string, environmentName: string, checkNameAvailabilityRequest: CheckNameAvailabilityRequest, options?: NamespacesCheckNameAvailabilityOptionalParams): Promise; @@ -2486,6 +2597,9 @@ export interface RegistryInfo { export interface Replica extends ProxyResource { containers?: ReplicaContainer[]; readonly createdTime?: Date; + initContainers?: ReplicaContainer[]; + readonly runningState?: ContainerAppReplicaRunningState; + readonly runningStateDetails?: string; } // @public @@ -2501,6 +2615,8 @@ export interface ReplicaContainer { name?: string; ready?: boolean; restartCount?: number; + readonly runningState?: ContainerAppContainerRunningState; + readonly runningStateDetails?: string; started?: boolean; } @@ -2522,6 +2638,7 @@ export interface Revision extends ProxyResource { readonly provisioningError?: string; readonly provisioningState?: RevisionProvisioningState; readonly replicas?: number; + readonly runningState?: RevisionRunningState; readonly template?: Template; readonly trafficWeight?: number; } @@ -2538,6 +2655,9 @@ export type RevisionHealthState = string; // @public export type RevisionProvisioningState = string; +// @public +export type RevisionRunningState = string; + // @public export interface Scale { maxReplicas?: number; @@ -2582,6 +2702,17 @@ export interface SecretVolumeItem { secretRef?: string; } +// @public +export interface Service { + type: string; +} + +// @public +export interface ServiceBind { + name?: string; + serviceId?: string; +} + // @public export interface SourceControl extends ProxyResource { branch?: string; @@ -2626,6 +2757,8 @@ export interface Template { initContainers?: InitContainer[]; revisionSuffix?: string; scale?: Scale; + serviceBinds?: ServiceBind[]; + terminationGracePeriodSeconds?: number; volumes?: Volume[]; } @@ -2683,6 +2816,7 @@ export interface VnetConfiguration { // @public export interface Volume { + mountOptions?: string; name?: string; secrets?: SecretVolumeItem[]; storageName?: string; @@ -2692,6 +2826,7 @@ export interface Volume { // @public export interface VolumeMount { mountPath?: string; + subPath?: string; volumeName?: string; } diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/availableWorkloadProfilesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/availableWorkloadProfilesGetSample.ts deleted file mode 100644 index c1b852734e23..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/availableWorkloadProfilesGetSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get all available workload profiles for a location. - * - * @summary Get all available workload profiles for a location. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AvailableWorkloadProfiles_Get.json - */ -async function billingMetersGet() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const location = "East US"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.availableWorkloadProfiles.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - billingMetersGet(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/billingMetersGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/billingMetersGetSample.ts deleted file mode 100644 index 6ef7d5fe2483..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/billingMetersGetSample.ts +++ /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. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get all billingMeters for a location. - * - * @summary Get all billingMeters for a location. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/BillingMeters_Get.json - */ -async function billingMetersGet() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const location = "East US"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.billingMeters.get(location); - console.log(result); -} - -async function main() { - billingMetersGet(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesCreateOrUpdateSample.ts deleted file mode 100644 index 427265a7faf6..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesCreateOrUpdateSample.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/Certificate_CreateOrUpdate.json - */ -async function createOrUpdateCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const certificateEnvelope: Certificate = { - location: "East US", - properties: { - password: "private key password", - value: Buffer.from("Y2VydA==") - } - }; - const options: CertificatesCreateOrUpdateOptionalParams = { - certificateEnvelope - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.createOrUpdate( - resourceGroupName, - environmentName, - certificateName, - options - ); - console.log(result); -} - -async function main() { - createOrUpdateCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesDeleteSample.ts deleted file mode 100644 index 921aea9b75bc..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesDeleteSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/Certificate_Delete.json - */ -async function deleteCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.delete( - resourceGroupName, - environmentName, - certificateName - ); - console.log(result); -} - -async function main() { - deleteCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesGetSample.ts deleted file mode 100644 index 9ea615439f30..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesGetSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/Certificate_Get.json - */ -async function getCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.get( - resourceGroupName, - environmentName, - certificateName - ); - console.log(result); -} - -async function main() { - getCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesListSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesListSample.ts deleted file mode 100644 index ed459b096c87..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesListSample.ts +++ /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. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/Certificates_ListByManagedEnvironment.json - */ -async function listCertificatesByManagedEnvironment() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.certificates.list( - resourceGroupName, - environmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listCertificatesByManagedEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesUpdateSample.ts deleted file mode 100644 index 3256b0faa04a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesUpdateSample.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 { - CertificatePatch, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/Certificates_Patch.json - */ -async function patchCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const certificateName = "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, - environmentName, - certificateName, - certificateEnvelope - ); - console.log(result); -} - -async function main() { - patchCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesCreateOrUpdateSample.ts deleted file mode 100644 index 4e3287d0f52c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesCreateOrUpdateSample.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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, - ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json - */ -async function createOrUpdateCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const certificateEnvelope: Certificate = { - location: "East US", - properties: { - password: "private key password", - value: Buffer.from("Y2VydA==") - } - }; - const options: ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams = { - certificateEnvelope - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsCertificates.createOrUpdate( - resourceGroupName, - connectedEnvironmentName, - certificateName, - options - ); - console.log(result); -} - -async function main() { - createOrUpdateCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesDeleteSample.ts deleted file mode 100644 index ec12520c0494..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesDeleteSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ConnectedEnvironmentsCertificate_Delete.json - */ -async function deleteCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsCertificates.delete( - resourceGroupName, - connectedEnvironmentName, - certificateName - ); - console.log(result); -} - -async function main() { - deleteCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesGetSample.ts deleted file mode 100644 index e1baa23f157d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesGetSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ConnectedEnvironmentsCertificate_Get.json - */ -async function getCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsCertificates.get( - resourceGroupName, - connectedEnvironmentName, - certificateName - ); - console.log(result); -} - -async function main() { - getCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesListSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesListSample.ts deleted file mode 100644 index 9a1ade0f3c50..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesListSample.ts +++ /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. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the Certificates in a given connected environment. - * - * @summary Get the Certificates in a given connected environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json - */ -async function listCertificatesByConnectedEnvironment() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.connectedEnvironmentsCertificates.list( - resourceGroupName, - connectedEnvironmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listCertificatesByConnectedEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesUpdateSample.ts deleted file mode 100644 index 315475d52aaa..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesUpdateSample.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 { - CertificatePatch, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ConnectedEnvironmentsCertificates_Patch.json - */ -async function patchCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const certificateName = "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.connectedEnvironmentsCertificates.update( - resourceGroupName, - connectedEnvironmentName, - certificateName, - certificateEnvelope - ); - console.log(result); -} - -async function main() { - patchCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCheckNameAvailabilitySample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCheckNameAvailabilitySample.ts deleted file mode 100644 index 4e1459b577df..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCheckNameAvailabilitySample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { - CheckNameAvailabilityRequest, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Checks if resource connectedEnvironmentName is available. - * - * @summary Checks if resource connectedEnvironmentName is available. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json - */ -async function certificatesCheckNameAvailability() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const checkNameAvailabilityRequest: CheckNameAvailabilityRequest = { - name: "testcertificatename", - type: "Microsoft.App/connectedEnvironments/certificates" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.checkNameAvailability( - resourceGroupName, - connectedEnvironmentName, - checkNameAvailabilityRequest - ); - console.log(result); -} - -async function main() { - certificatesCheckNameAvailability(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCreateOrUpdateSample.ts deleted file mode 100644 index 414997d18432..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { - ConnectedEnvironment, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates an connectedEnvironment. - * - * @summary Creates or updates an connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_CreateOrUpdate.json - */ -async function createKubeEnvironments() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testenv"; - const environmentEnvelope: ConnectedEnvironment = { - customDomainConfiguration: { - certificatePassword: "private key password", - certificateValue: Buffer.from("Y2VydA=="), - dnsSuffix: "www.my-name.com" - }, - daprAIConnectionString: - "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/", - location: "East US", - staticIp: "1.2.3.4" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.beginCreateOrUpdateAndWait( - resourceGroupName, - connectedEnvironmentName, - environmentEnvelope - ); - console.log(result); -} - -async function main() { - createKubeEnvironments(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.ts deleted file mode 100644 index ed5bcbcf828c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a Dapr Component in a connected environment. - * - * @summary Creates or updates a Dapr Component in a connected environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json - */ -async function createOrUpdateDaprComponent() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const componentName = "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.connectedEnvironmentsDaprComponents.createOrUpdate( - resourceGroupName, - connectedEnvironmentName, - componentName, - daprComponentEnvelope - ); - console.log(result); -} - -async function main() { - createOrUpdateDaprComponent(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsDeleteSample.ts deleted file mode 100644 index 368ecf926c6a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsDeleteSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a Dapr Component from a connected environment. - * - * @summary Delete a Dapr Component from a connected environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_Delete.json - */ -async function deleteDaprComponent() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsDaprComponents.delete( - resourceGroupName, - connectedEnvironmentName, - componentName - ); - console.log(result); -} - -async function main() { - deleteDaprComponent(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsGetSample.ts deleted file mode 100644 index e2786d2c7fa3..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsGetSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json - */ -async function getDaprComponent() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsDaprComponents.get( - resourceGroupName, - connectedEnvironmentName, - componentName - ); - console.log(result); -} - -async function main() { - getDaprComponent(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsListSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsListSample.ts deleted file mode 100644 index 19094d5d885e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsListSample.ts +++ /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. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the Dapr Components for a connected environment. - * - * @summary Get the Dapr Components for a connected environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_List.json - */ -async function listDaprComponents() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.connectedEnvironmentsDaprComponents.list( - resourceGroupName, - connectedEnvironmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listDaprComponents(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsListSecretsSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsListSecretsSample.ts deleted file mode 100644 index 557f3b108cc1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsListSecretsSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List secrets for a dapr component - * - * @summary List secrets for a dapr component - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json - */ -async function listContainerAppsSecrets() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsDaprComponents.listSecrets( - resourceGroupName, - connectedEnvironmentName, - componentName - ); - console.log(result); -} - -async function main() { - listContainerAppsSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDeleteSample.ts deleted file mode 100644 index 26674465f43a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDeleteSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete an connectedEnvironment. - * - * @summary Delete an connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_Delete.json - */ -async function deleteConnectedEnvironmentByConnectedEnvironmentName() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "examplekenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.beginDeleteAndWait( - resourceGroupName, - connectedEnvironmentName - ); - console.log(result); -} - -async function main() { - deleteConnectedEnvironmentByConnectedEnvironmentName(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsGetSample.ts deleted file mode 100644 index d89d060736a1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the properties of an connectedEnvironment. - * - * @summary Get the properties of an connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_Get.json - */ -async function getConnectedEnvironmentByConnectedEnvironmentName() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "examplekenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.get( - resourceGroupName, - connectedEnvironmentName - ); - console.log(result); -} - -async function main() { - getConnectedEnvironmentByConnectedEnvironmentName(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsListByResourceGroupSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsListByResourceGroupSample.ts deleted file mode 100644 index 725f561968c0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get all connectedEnvironments in a resource group. - * - * @summary Get all connectedEnvironments in a resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_ListByResourceGroup.json - */ -async function listEnvironmentsByResourceGroup() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.connectedEnvironments.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listEnvironmentsByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsListBySubscriptionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsListBySubscriptionSample.ts deleted file mode 100644 index e52528c74c64..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsListBySubscriptionSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get all connectedEnvironments for a subscription. - * - * @summary Get all connectedEnvironments for a subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_ListBySubscription.json - */ -async function listConnectedEnvironmentsBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "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.connectedEnvironments.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listConnectedEnvironmentsBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesCreateOrUpdateSample.ts deleted file mode 100644 index 159b0fd37e02..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesCreateOrUpdateSample.ts +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { - ConnectedEnvironmentStorage, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create or update storage for a connectedEnvironment. - * - * @summary Create or update storage for a connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json - */ -async function createOrUpdateEnvironmentsStorage() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "env"; - const storageName = "jlaw-demo1"; - const storageEnvelope: ConnectedEnvironmentStorage = { - properties: { - azureFile: { - accessMode: "ReadOnly", - accountKey: "key", - accountName: "account1", - shareName: "share1" - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsStorages.createOrUpdate( - resourceGroupName, - connectedEnvironmentName, - storageName, - storageEnvelope - ); - console.log(result); -} - -async function main() { - createOrUpdateEnvironmentsStorage(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesDeleteSample.ts deleted file mode 100644 index 119a17a00f5e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesDeleteSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete storage for a connectedEnvironment. - * - * @summary Delete storage for a connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_Delete.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "env"; - const storageName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsStorages.delete( - resourceGroupName, - connectedEnvironmentName, - storageName - ); - console.log(result); -} - -async function main() { - listEnvironmentsStoragesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesGetSample.ts deleted file mode 100644 index 069492c1d62d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesGetSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get storage for a connectedEnvironment. - * - * @summary Get storage for a connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_Get.json - */ -async function getAEnvironmentsStoragePropertiesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "env"; - const storageName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsStorages.get( - resourceGroupName, - connectedEnvironmentName, - storageName - ); - console.log(result); -} - -async function main() { - getAEnvironmentsStoragePropertiesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesListSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesListSample.ts deleted file mode 100644 index d26e9c473719..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesListSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get all storages for a connectedEnvironment. - * - * @summary Get all storages for a connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_List.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "managedEnv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsStorages.list( - resourceGroupName, - connectedEnvironmentName - ); - console.log(result); -} - -async function main() { - listEnvironmentsStoragesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsUpdateSample.ts deleted file mode 100644 index f0cf7d8cc859..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsUpdateSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ConnectedEnvironments_Patch.json - */ -async function patchManagedEnvironment() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.update( - resourceGroupName, - connectedEnvironmentName - ); - console.log(result); -} - -async function main() { - patchManagedEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsCreateOrUpdateSample.ts deleted file mode 100644 index f743fdf5197b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsCreateOrUpdateSample.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create or update the AuthConfig for a Container App. - * - * @summary Create or update the AuthConfig for a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AuthConfigs_CreateOrUpdate.json - */ -async function createOrUpdateContainerAppAuthConfig() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const authConfigName = "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, - authConfigName, - authConfigEnvelope - ); - console.log(result); -} - -async function main() { - createOrUpdateContainerAppAuthConfig(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsDeleteSample.ts deleted file mode 100644 index a9b70f9d41d0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsDeleteSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a Container App AuthConfig. - * - * @summary Delete a Container App AuthConfig. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AuthConfigs_Delete.json - */ -async function deleteContainerAppAuthConfig() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const authConfigName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.delete( - resourceGroupName, - containerAppName, - authConfigName - ); - console.log(result); -} - -async function main() { - deleteContainerAppAuthConfig(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsGetSample.ts deleted file mode 100644 index 57ae061a7b34..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsGetSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/AuthConfigs_Get.json - */ -async function getContainerAppAuthConfig() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const authConfigName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.get( - resourceGroupName, - containerAppName, - authConfigName - ); - console.log(result); -} - -async function main() { - getContainerAppAuthConfig(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsListByContainerAppSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsListByContainerAppSample.ts deleted file mode 100644 index 7d0de398ec27..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsListByContainerAppSample.ts +++ /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. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/AuthConfigs_ListByContainer.json - */ -async function listAuthConfigsByContainerApps() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "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); -} - -async function main() { - listAuthConfigsByContainerApps(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsCreateOrUpdateSample.ts deleted file mode 100644 index 4cbf4f4ae1e8..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsCreateOrUpdateSample.ts +++ /dev/null @@ -1,281 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create or update a Container App. - * - * @summary Create or update a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_CreateOrUpdate.json - */ -async function createOrUpdateContainerApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const containerAppEnvelope: ContainerApp = { - configuration: { - dapr: { - appPort: 3000, - appProtocol: "http", - enableApiLogging: true, - enabled: true, - httpMaxRequestSize: 10, - httpReadBufferSize: 30, - logLevel: "debug" - }, - ingress: { - clientCertificateMode: "accept", - corsPolicy: { - allowCredentials: true, - allowedHeaders: ["HEADER1", "HEADER2"], - allowedMethods: ["GET", "POST"], - allowedOrigins: ["https://a.test.com", "https://b.test.com"], - exposeHeaders: ["HEADER3", "HEADER4"], - maxAge: 1234 - }, - 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, - ipSecurityRestrictions: [ - { - name: "Allow work IP A subnet", - description: - "Allowing all IP's within the subnet below to access containerapp", - action: "Allow", - ipAddressRange: "192.168.1.1/32" - }, - { - name: "Allow work IP B subnet", - description: - "Allowing all IP's within the subnet below to access containerapp", - action: "Allow", - ipAddressRange: "192.168.1.1/8" - } - ], - stickySessions: { affinity: "sticky" }, - targetPort: 3000, - traffic: [ - { - label: "production", - revisionName: "testcontainerApp0-ab1234", - weight: 100 - } - ] - }, - maxInactiveRevisions: 10 - }, - environmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - location: "East US", - 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 - } - ] - } - ], - initContainers: [ - { - name: "testinitcontainerApp0", - args: ["-c", "while true; do echo hello; sleep 10;done"], - command: ["/bin/sh"], - image: "repo/testcontainerApp0:v4", - resources: { cpu: 0.2, memory: "100Mi" } - } - ], - scale: { - maxReplicas: 5, - minReplicas: 1, - rules: [ - { - name: "httpscalingrule", - custom: { type: "http", metadata: { concurrentRequests: "50" } } - } - ] - } - }, - workloadProfileName: "My-GP-01" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginCreateOrUpdateAndWait( - resourceGroupName, - containerAppName, - containerAppEnvelope - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a Container App. - * - * @summary Create or update a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_ManagedBy_CreateOrUpdate.json - */ -async function createOrUpdateManagedByApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerAppManagedBy"; - const containerAppEnvelope: ContainerApp = { - configuration: { - ingress: { - exposedPort: 4000, - external: true, - targetPort: 3000, - traffic: [ - { revisionName: "testcontainerAppManagedBy-ab1234", weight: 100 } - ], - transport: "tcp" - } - }, - environmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - location: "East US", - managedBy: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.AppPlatform/Spring/springapp", - template: { - containers: [ - { - name: "testcontainerAppManagedBy", - image: "repo/testcontainerAppManagedBy:v1", - probes: [ - { - type: "Liveness", - initialDelaySeconds: 3, - periodSeconds: 3, - tcpSocket: { port: 8080 } - } - ] - } - ], - scale: { - maxReplicas: 5, - minReplicas: 1, - rules: [ - { - name: "tcpscalingrule", - tcp: { metadata: { concurrentConnections: "50" } } - } - ] - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginCreateOrUpdateAndWait( - resourceGroupName, - containerAppName, - containerAppEnvelope - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a Container App. - * - * @summary Create or update a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_TcpApp_CreateOrUpdate.json - */ -async function createOrUpdateTcpApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerAppTcp"; - const containerAppEnvelope: ContainerApp = { - configuration: { - ingress: { - exposedPort: 4000, - external: true, - targetPort: 3000, - traffic: [{ revisionName: "testcontainerAppTcp-ab1234", weight: 100 }], - transport: "tcp" - } - }, - environmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - location: "East US", - template: { - containers: [ - { - name: "testcontainerAppTcp", - image: "repo/testcontainerAppTcp:v1", - probes: [ - { - type: "Liveness", - initialDelaySeconds: 3, - periodSeconds: 3, - tcpSocket: { port: 8080 } - } - ] - } - ], - scale: { - maxReplicas: 5, - minReplicas: 1, - rules: [ - { - name: "tcpscalingrule", - tcp: { metadata: { concurrentConnections: "50" } } - } - ] - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginCreateOrUpdateAndWait( - resourceGroupName, - containerAppName, - containerAppEnvelope - ); - console.log(result); -} - -async function main() { - createOrUpdateContainerApp(); - createOrUpdateManagedByApp(); - createOrUpdateTcpApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDeleteSample.ts deleted file mode 100644 index 7086851d39ec..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDeleteSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a Container App. - * - * @summary Delete a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_Delete.json - */ -async function deleteContainerApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testWorkerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginDeleteAndWait( - resourceGroupName, - containerAppName - ); - console.log(result); -} - -async function main() { - deleteContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetDetectorSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetDetectorSample.ts deleted file mode 100644 index f516f414c4ae..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetDetectorSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a diagnostics result of a Container App. - * - * @summary Get a diagnostics result of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerAppsDiagnostics_Get.json - */ -async function getContainerAppDiagnosticsInfo() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "mikono-workerapp-test-rg"; - const containerAppName = "mikono-capp-stage1"; - const detectorName = "cappcontainerappnetworkIO"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsDiagnostics.getDetector( - resourceGroupName, - containerAppName, - detectorName - ); - console.log(result); -} - -async function main() { - getContainerAppDiagnosticsInfo(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetRevisionSample.ts deleted file mode 100644 index 6ca77f4c5ed3..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetRevisionSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/Revisions_Get.json - */ -async function getContainerAppRevision() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsDiagnostics.getRevision( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -async function main() { - getContainerAppRevision(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetRootSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetRootSample.ts deleted file mode 100644 index c2f517b46b68..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetRootSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ContainerApps_Get.json - */ -async function getContainerApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsDiagnostics.getRoot( - resourceGroupName, - containerAppName - ); - console.log(result); -} - -async function main() { - getContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsListDetectorsSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsListDetectorsSample.ts deleted file mode 100644 index ef8e3f8befcf..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsListDetectorsSample.ts +++ /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. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the list of diagnostics for a given Container App. - * - * @summary Get the list of diagnostics for a given Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerAppsDiagnostics_List.json - */ -async function getTheListOfAvailableDiagnosticsForAGivenContainerApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "mikono-workerapp-test-rg"; - const containerAppName = "mikono-capp-stage1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsDiagnostics.listDetectors( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getTheListOfAvailableDiagnosticsForAGivenContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsListRevisionsSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsListRevisionsSample.ts deleted file mode 100644 index fe96c4e59354..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsListRevisionsSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/Revisions_List.json - */ -async function listContainerAppRevisions() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsDiagnostics.listRevisions( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listContainerAppRevisions(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsGetAuthTokenSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsGetAuthTokenSample.ts deleted file mode 100644 index 17bf7b42e400..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsGetAuthTokenSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get auth token for a container app - * - * @summary Get auth token for a container app - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_GetAuthToken.json - */ -async function getContainerAppAuthToken() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.getAuthToken( - resourceGroupName, - containerAppName - ); - console.log(result); -} - -async function main() { - getContainerAppAuthToken(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsGetSample.ts deleted file mode 100644 index a80cebb595e1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsGetSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ContainerApps_Get.json - */ -async function getContainerApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.get( - resourceGroupName, - containerAppName - ); - console.log(result); -} - -async function main() { - getContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListByResourceGroupSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListByResourceGroupSample.ts deleted file mode 100644 index 6be535aba06b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListByResourceGroupSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ContainerApps_ListByResourceGroup.json - */ -async function listContainerAppsByResourceGroup() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "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); -} - -async function main() { - listContainerAppsByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListBySubscriptionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListBySubscriptionSample.ts deleted file mode 100644 index 0cd8131f30b2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListBySubscriptionSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ContainerApps_ListBySubscription.json - */ -async function listContainerAppsBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "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); -} - -async function main() { - listContainerAppsBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListCustomHostNameAnalysisSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListCustomHostNameAnalysisSample.ts deleted file mode 100644 index e460aca3b631..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListCustomHostNameAnalysisSample.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 { - ContainerAppsListCustomHostNameAnalysisOptionalParams, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json - */ -async function analyzeCustomHostname() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "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); -} - -async function main() { - analyzeCustomHostname(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListSecretsSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListSecretsSample.ts deleted file mode 100644 index 856e856c4d63..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListSecretsSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ContainerApps_ListSecrets.json - */ -async function listContainerAppsSecrets() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.listSecrets( - resourceGroupName, - containerAppName - ); - console.log(result); -} - -async function main() { - listContainerAppsSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionReplicasGetReplicaSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionReplicasGetReplicaSample.ts deleted file mode 100644 index 79112d9282a9..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionReplicasGetReplicaSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/Replicas_Get.json - */ -async function getContainerAppRevisionReplica() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "myapp"; - const revisionName = "myapp--0wlqy09"; - const replicaName = "myapp--0wlqy09-5d9774cff-5wnd8"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisionReplicas.getReplica( - resourceGroupName, - containerAppName, - revisionName, - replicaName - ); - console.log(result); -} - -async function main() { - getContainerAppRevisionReplica(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionReplicasListReplicasSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionReplicasListReplicasSample.ts deleted file mode 100644 index cfd0c66be596..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionReplicasListReplicasSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/Replicas_List.json - */ -async function listContainerAppReplicas() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "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); -} - -async function main() { - listContainerAppReplicas(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsActivateRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsActivateRevisionSample.ts deleted file mode 100644 index 0648b97690da..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsActivateRevisionSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/Revisions_Activate.json - */ -async function activateContainerAppRevision() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.activateRevision( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -async function main() { - activateContainerAppRevision(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsDeactivateRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsDeactivateRevisionSample.ts deleted file mode 100644 index 7b01102d463c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsDeactivateRevisionSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/Revisions_Deactivate.json - */ -async function deactivateContainerAppRevision() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.deactivateRevision( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -async function main() { - deactivateContainerAppRevision(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsGetRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsGetRevisionSample.ts deleted file mode 100644 index 573af0e63fe9..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsGetRevisionSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/Revisions_Get.json - */ -async function getContainerAppRevision() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.getRevision( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -async function main() { - getContainerAppRevision(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsListRevisionsSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsListRevisionsSample.ts deleted file mode 100644 index 23c0160be4ec..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsListRevisionsSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/Revisions_List.json - */ -async function listContainerAppRevisions() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "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); -} - -async function main() { - listContainerAppRevisions(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsRestartRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsRestartRevisionSample.ts deleted file mode 100644 index 885c3cb1ed9e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsRestartRevisionSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/Revisions_Restart.json - */ -async function restartContainerAppRevision() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testStaticSite0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.restartRevision( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -async function main() { - restartContainerAppRevision(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsCreateOrUpdateSample.ts deleted file mode 100644 index 2b38efb5b1b4..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsCreateOrUpdateSample.ts +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create or update the SourceControl for a Container App. - * - * @summary Create or update the SourceControl for a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/SourceControls_CreateOrUpdate.json - */ -async function createOrUpdateContainerAppSourceControl() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const sourceControlName = "current"; - const sourceControlEnvelope: SourceControl = { - branch: "master", - githubActionConfiguration: { - azureCredentials: { - clientId: "", - clientSecret: "", - tenantId: "" - }, - contextPath: "./", - image: "image/tag", - 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, - sourceControlName, - sourceControlEnvelope - ); - console.log(result); -} - -async function main() { - createOrUpdateContainerAppSourceControl(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsDeleteSample.ts deleted file mode 100644 index fb82577bcc18..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsDeleteSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a Container App SourceControl. - * - * @summary Delete a Container App SourceControl. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/SourceControls_Delete.json - */ -async function deleteContainerAppSourceControl() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const sourceControlName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.beginDeleteAndWait( - resourceGroupName, - containerAppName, - sourceControlName - ); - console.log(result); -} - -async function main() { - deleteContainerAppSourceControl(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsGetSample.ts deleted file mode 100644 index a92818f309c6..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsGetSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/SourceControls_Get.json - */ -async function getContainerAppSourceControl() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const sourceControlName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.get( - resourceGroupName, - containerAppName, - sourceControlName - ); - console.log(result); -} - -async function main() { - getContainerAppSourceControl(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsListByContainerAppSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsListByContainerAppSample.ts deleted file mode 100644 index d0c34cdbbe13..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsListByContainerAppSample.ts +++ /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. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/SourceControls_ListByContainer.json - */ -async function listAppSourceControls() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "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); -} - -async function main() { - listAppSourceControls(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsUpdateSample.ts deleted file mode 100644 index 76c5f1b085b0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsUpdateSample.ts +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patches a Container App using JSON Merge Patch - * - * @summary Patches a Container App using JSON Merge Patch - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_Patch.json - */ -async function patchContainerApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const containerAppEnvelope: ContainerApp = { - configuration: { - dapr: { - appPort: 3000, - appProtocol: "http", - enableApiLogging: true, - enabled: true, - httpMaxRequestSize: 10, - httpReadBufferSize: 30, - logLevel: "debug" - }, - 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, - ipSecurityRestrictions: [ - { - name: "Allow work IP A subnet", - description: - "Allowing all IP's within the subnet below to access containerapp", - action: "Allow", - ipAddressRange: "192.168.1.1/32" - }, - { - name: "Allow work IP B subnet", - description: - "Allowing all IP's within the subnet below to access containerapp", - action: "Allow", - ipAddressRange: "192.168.1.1/8" - } - ], - stickySessions: { affinity: "sticky" }, - targetPort: 3000, - traffic: [ - { - label: "production", - revisionName: "testcontainerApp0-ab1234", - weight: 100 - } - ] - }, - maxInactiveRevisions: 10 - }, - location: "East US", - tags: { tag1: "value1", tag2: "value2" }, - 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 - } - ] - } - ], - initContainers: [ - { - name: "testinitcontainerApp0", - image: "repo/testcontainerApp0:v4", - resources: { cpu: 0.2, memory: "100Mi" } - } - ], - 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.beginUpdateAndWait( - resourceGroupName, - containerAppName, - containerAppEnvelope - ); - console.log(result); -} - -async function main() { - patchContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsCreateOrUpdateSample.ts deleted file mode 100644 index f6098068c3f5..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json - */ -async function createOrUpdateDaprComponentWithSecretStoreComponent() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "myenvironment"; - const componentName = "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"], - secretStoreComponent: "my-secret-store", - version: "v1" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.createOrUpdate( - resourceGroupName, - environmentName, - componentName, - daprComponentEnvelope - ); - console.log(result); -} - -/** - * 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-11-01-preview/examples/DaprComponents_CreateOrUpdate_Secrets.json - */ -async function createOrUpdateDaprComponentWithSecrets() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "myenvironment"; - const componentName = "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, - componentName, - daprComponentEnvelope - ); - console.log(result); -} - -async function main() { - createOrUpdateDaprComponentWithSecretStoreComponent(); - createOrUpdateDaprComponentWithSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsDeleteSample.ts deleted file mode 100644 index 77ff870d85c1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsDeleteSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/DaprComponents_Delete.json - */ -async function deleteDaprComponent() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.delete( - resourceGroupName, - environmentName, - componentName - ); - console.log(result); -} - -async function main() { - deleteDaprComponent(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsGetSample.ts deleted file mode 100644 index 2230288a6fe5..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsGetSample.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json - */ -async function getDaprComponentWithSecretStoreComponent() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.get( - resourceGroupName, - environmentName, - componentName - ); - console.log(result); -} - -/** - * 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-11-01-preview/examples/DaprComponents_Get_Secrets.json - */ -async function getDaprComponentWithSecrets() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.get( - resourceGroupName, - environmentName, - componentName - ); - console.log(result); -} - -async function main() { - getDaprComponentWithSecretStoreComponent(); - getDaprComponentWithSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsListSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsListSample.ts deleted file mode 100644 index 2bbd0b4acca9..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsListSample.ts +++ /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. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/DaprComponents_List.json - */ -async function listDaprComponents() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "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); -} - -async function main() { - listDaprComponents(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsListSecretsSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsListSecretsSample.ts deleted file mode 100644 index 6c18584651a2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsListSecretsSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List secrets for a dapr component - * - * @summary List secrets for a dapr component - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_ListSecrets.json - */ -async function listContainerAppsSecrets() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.listSecrets( - resourceGroupName, - environmentName, - componentName - ); - console.log(result); -} - -async function main() { - listContainerAppsSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobsCreateOrUpdateSample.ts deleted file mode 100644 index 193b245ca8bc..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsCreateOrUpdateSample.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { Job, ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create or Update a Container Apps Job. - * - * @summary Create or Update a Container Apps Job. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_CreateorUpdate.json - */ -async function createOrUpdateContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerAppsJob0"; - const jobEnvelope: Job = { - configuration: { - manualTriggerConfig: { parallelism: 4, replicaCompletionCount: 1 }, - replicaRetryLimit: 10, - replicaTimeout: 10, - triggerType: "Manual" - }, - environmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - location: "East US", - template: { - containers: [ - { - name: "testcontainerAppsJob0", - image: "repo/testcontainerAppsJob0:v1", - probes: [ - { - type: "Liveness", - httpGet: { - path: "/health", - httpHeaders: [{ name: "Custom-Header", value: "Awesome" }], - port: 8080 - }, - initialDelaySeconds: 5, - periodSeconds: 3 - } - ] - } - ], - initContainers: [ - { - name: "testinitcontainerAppsJob0", - args: ["-c", "while true; do echo hello; sleep 10;done"], - command: ["/bin/sh"], - image: "repo/testcontainerAppsJob0:v4", - resources: { cpu: 0.2, memory: "100Mi" } - } - ] - } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginCreateOrUpdateAndWait( - resourceGroupName, - jobName, - jobEnvelope - ); - console.log(result); -} - -async function main() { - createOrUpdateContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobsDeleteSample.ts deleted file mode 100644 index 4c6b66a98b80..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsDeleteSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a Container Apps Job. - * - * @summary Delete a Container Apps Job. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Delete.json - */ -async function deleteContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testWorkerContainerAppsJob0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginDeleteAndWait( - resourceGroupName, - jobName - ); - console.log(result); -} - -async function main() { - deleteContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsExecutionsListSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobsExecutionsListSample.ts deleted file mode 100644 index 9c7d47be3834..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsExecutionsListSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a Container Apps Job's executions - * - * @summary Get a Container Apps Job's executions - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Executions_Get.json - */ -async function getAContainerAppsJobExecutions() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerAppsJob0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.jobsExecutions.list( - resourceGroupName, - jobName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getAContainerAppsJobExecutions(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobsGetSample.ts deleted file mode 100644 index 163f63df34b9..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsGetSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the properties of a Container Apps Job. - * - * @summary Get the properties of a Container Apps Job. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Get.json - */ -async function getContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerAppsJob0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.get(resourceGroupName, jobName); - console.log(result); -} - -async function main() { - getContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsListByResourceGroupSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobsListByResourceGroupSample.ts deleted file mode 100644 index e8b8d847fad2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsListByResourceGroupSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the Container Apps Jobs in a given resource group. - * - * @summary Get the Container Apps Jobs in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Jobs_ListByResourceGroup.json - */ -async function listContainerAppsJobsByResourceGroup() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.jobs.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listContainerAppsJobsByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsListBySubscriptionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobsListBySubscriptionSample.ts deleted file mode 100644 index 73cd0c684cd6..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsListBySubscriptionSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the Container Apps Jobs in a given subscription. - * - * @summary Get the Container Apps Jobs in a given subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Jobs_ListBySubscription.json - */ -async function listContainerAppsJobsBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "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.jobs.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listContainerAppsJobsBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsListSecretsSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobsListSecretsSample.ts deleted file mode 100644 index 4cd509568b2d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsListSecretsSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List secrets for a container apps job - * - * @summary List secrets for a container apps job - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_ListSecrets.json - */ -async function listContainerAppsJobSecrets() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerAppsJob0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.listSecrets(resourceGroupName, jobName); - console.log(result); -} - -async function main() { - listContainerAppsJobSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsStartSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobsStartSample.ts deleted file mode 100644 index 03eeadfdd2da..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsStartSample.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { - JobExecutionTemplate, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Start a Container Apps Job - * - * @summary Start a Container Apps Job - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Start.json - */ -async function runAContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerAppsJob0"; - const template: JobExecutionTemplate = { - containers: [ - { - name: "testcontainerAppsJob0", - image: "repo/testcontainerAppsJob0:v4", - resources: { cpu: 0.2, memory: "100Mi" } - } - ], - initContainers: [ - { - name: "testinitcontainerAppsJob0", - args: ["-c", "while true; do echo hello; sleep 10;done"], - command: ["/bin/sh"], - image: "repo/testcontainerAppsJob0:v4", - resources: { cpu: 0.2, memory: "100Mi" } - } - ] - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginStartAndWait( - resourceGroupName, - jobName, - template - ); - console.log(result); -} - -async function main() { - runAContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsStopExecutionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobsStopExecutionSample.ts deleted file mode 100644 index 2b50617de174..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsStopExecutionSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Terminates execution of a running container apps job - * - * @summary Terminates execution of a running container apps job - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop_Execution.json - */ -async function terminateAContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerAppsJob0"; - const jobExecutionName = "jobExecution1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginStopExecutionAndWait( - resourceGroupName, - jobName, - jobExecutionName - ); - console.log(result); -} - -async function main() { - terminateAContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsStopMultipleExecutionsSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobsStopMultipleExecutionsSample.ts deleted file mode 100644 index 3b18792ab00f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsStopMultipleExecutionsSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { - JobExecutionNamesCollection, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Terminates execution of a running container apps job - * - * @summary Terminates execution of a running container apps job - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop_Multiple.json - */ -async function terminateMultipleContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerAppsJob0"; - const jobExecutionName: JobExecutionNamesCollection = { - value: [ - { name: "jobExecution-27944453" }, - { name: "jobExecution-27944452" }, - { name: "jobExecution-27944451" } - ] - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginStopMultipleExecutionsAndWait( - resourceGroupName, - jobName, - jobExecutionName - ); - console.log(result); -} - -async function main() { - terminateMultipleContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobsUpdateSample.ts deleted file mode 100644 index 4b4439363ea3..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsUpdateSample.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { - JobPatchProperties, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patches a Container Apps Job using JSON Merge Patch - * - * @summary Patches a Container Apps Job using JSON Merge Patch - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Patch.json - */ -async function patchContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerAppsJob0"; - const jobEnvelope: JobPatchProperties = { - properties: { - configuration: { - manualTriggerConfig: { parallelism: 4, replicaCompletionCount: 1 }, - replicaRetryLimit: 10, - replicaTimeout: 10, - triggerType: "Manual" - }, - template: { - containers: [ - { - name: "testcontainerAppsJob0", - image: "repo/testcontainerAppsJob0:v1", - probes: [ - { - type: "Liveness", - httpGet: { - path: "/health", - httpHeaders: [{ name: "Custom-Header", value: "Awesome" }], - port: 8080 - }, - initialDelaySeconds: 3, - periodSeconds: 3 - } - ] - } - ], - initContainers: [ - { - name: "testinitcontainerAppsJob0", - args: ["-c", "while true; do echo hello; sleep 10;done"], - command: ["/bin/sh"], - image: "repo/testcontainerAppsJob0:v4", - resources: { cpu: 0.2, memory: "100Mi" } - } - ] - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginUpdateAndWait( - resourceGroupName, - jobName, - jobEnvelope - ); - console.log(result); -} - -async function main() { - patchContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesCreateOrUpdateSample.ts deleted file mode 100644 index 81506f3dd869..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesCreateOrUpdateSample.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { - ManagedCertificate, - ManagedCertificatesCreateOrUpdateOptionalParams, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create or Update a Managed Certificate. - * - * @summary Create or Update a Managed Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_CreateOrUpdate.json - */ -async function createOrUpdateCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const managedCertificateName = "certificate-firendly-name"; - const managedCertificateEnvelope: ManagedCertificate = { - location: "East US", - properties: { - domainControlValidation: "CNAME", - subjectName: "my-subject-name.company.country.net" - } - }; - const options: ManagedCertificatesCreateOrUpdateOptionalParams = { - managedCertificateEnvelope - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedCertificates.beginCreateOrUpdateAndWait( - resourceGroupName, - environmentName, - managedCertificateName, - options - ); - console.log(result); -} - -async function main() { - createOrUpdateCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesDeleteSample.ts deleted file mode 100644 index 5c1fdb327d67..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesDeleteSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified Managed Certificate. - * - * @summary Deletes the specified Managed Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_Delete.json - */ -async function deleteCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const managedCertificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedCertificates.delete( - resourceGroupName, - environmentName, - managedCertificateName - ); - console.log(result); -} - -async function main() { - deleteCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesGetSample.ts deleted file mode 100644 index d0a37a92fb8e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesGetSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the specified Managed Certificate. - * - * @summary Get the specified Managed Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_Get.json - */ -async function getCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const managedCertificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedCertificates.get( - resourceGroupName, - environmentName, - managedCertificateName - ); - console.log(result); -} - -async function main() { - getCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesListSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesListSample.ts deleted file mode 100644 index 25db64d33fe2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesListSample.ts +++ /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. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the Managed Certificates in a given managed environment. - * - * @summary Get the Managed Certificates in a given managed environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificates_ListByManagedEnvironment.json - */ -async function listManagedCertificatesByManagedEnvironment() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedCertificates.list( - resourceGroupName, - environmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listManagedCertificatesByManagedEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesUpdateSample.ts deleted file mode 100644 index 1c19bfb5bf21..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesUpdateSample.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 { - ManagedCertificatePatch, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patches a managed certificate. Oly patching of tags is supported - * - * @summary Patches a managed certificate. Oly patching of tags is supported - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificates_Patch.json - */ -async function patchManagedCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const managedCertificateName = "certificate-firendly-name"; - const managedCertificateEnvelope: ManagedCertificatePatch = { - tags: { tag1: "value1", tag2: "value2" } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedCertificates.update( - resourceGroupName, - environmentName, - managedCertificateName, - managedCertificateEnvelope - ); - console.log(result); -} - -async function main() { - patchManagedCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentDiagnosticsGetDetectorSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentDiagnosticsGetDetectorSample.ts deleted file mode 100644 index b48e57d93bf7..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentDiagnosticsGetDetectorSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the diagnostics data for a Managed Environment used to host container apps. - * - * @summary Get the diagnostics data for a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentDiagnostics_Get.json - */ -async function getDiagnosticDataForAManagedEnvironments() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "mikono-workerapp-test-rg"; - const environmentName = "mikonokubeenv"; - const detectorName = "ManagedEnvAvailabilityMetrics"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentDiagnostics.getDetector( - resourceGroupName, - environmentName, - detectorName - ); - console.log(result); -} - -async function main() { - getDiagnosticDataForAManagedEnvironments(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentDiagnosticsListDetectorsSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentDiagnosticsListDetectorsSample.ts deleted file mode 100644 index 71759dc309a0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentDiagnosticsListDetectorsSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the list of diagnostics for a Managed Environment used to host container apps. - * - * @summary Get the list of diagnostics for a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentDiagnostics_List.json - */ -async function getTheListOfAvailableDiagnosticDataForAManagedEnvironments() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "mikono-workerapp-test-rg"; - const environmentName = "mikonokubeenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentDiagnostics.listDetectors( - resourceGroupName, - environmentName - ); - console.log(result); -} - -async function main() { - getTheListOfAvailableDiagnosticDataForAManagedEnvironments(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsCreateOrUpdateSample.ts deleted file mode 100644 index 6cbbd3844005..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ManagedEnvironments_CustomInfrastructureResourceGroup_Create.json - */ -async function createEnvironmentWithCustomInfrastructureResourceGroup() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const environmentEnvelope: ManagedEnvironment = { - appLogsConfiguration: { - logAnalyticsConfiguration: { customerId: "string", sharedKey: "string" } - }, - customDomainConfiguration: { - certificatePassword: "1234", - certificateValue: Buffer.from("Y2VydA=="), - dnsSuffix: "www.my-name.com" - }, - daprAIConnectionString: - "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/", - infrastructureResourceGroup: "myInfrastructureRgName", - location: "East US", - vnetConfiguration: { - infrastructureSubnetId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/RGName/providers/Microsoft.Network/virtualNetworks/VNetName/subnets/subnetName1" - }, - workloadProfiles: [ - { - name: "My-GP-01", - maximumCount: 12, - minimumCount: 3, - workloadProfileType: "GeneralPurpose" - }, - { - name: "My-MO-01", - maximumCount: 6, - minimumCount: 3, - workloadProfileType: "MemoryOptimized" - }, - { - name: "My-CO-01", - maximumCount: 6, - minimumCount: 3, - workloadProfileType: "ComputeOptimized" - }, - { name: "My-consumption-01", workloadProfileType: "Consumption" } - ], - zoneRedundant: true - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginCreateOrUpdateAndWait( - resourceGroupName, - environmentName, - environmentEnvelope - ); - console.log(result); -} - -/** - * 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-11-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json - */ -async function createEnvironments() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const environmentEnvelope: ManagedEnvironment = { - appLogsConfiguration: { - logAnalyticsConfiguration: { customerId: "string", sharedKey: "string" } - }, - customDomainConfiguration: { - certificatePassword: "1234", - certificateValue: Buffer.from("Y2VydA=="), - dnsSuffix: "www.my-name.com" - }, - daprAIConnectionString: - "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/", - location: "East US", - vnetConfiguration: { - infrastructureSubnetId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/RGName/providers/Microsoft.Network/virtualNetworks/VNetName/subnets/subnetName1" - }, - workloadProfiles: [ - { - name: "My-GP-01", - maximumCount: 12, - minimumCount: 3, - workloadProfileType: "GeneralPurpose" - }, - { - name: "My-MO-01", - maximumCount: 6, - minimumCount: 3, - workloadProfileType: "MemoryOptimized" - }, - { - name: "My-CO-01", - maximumCount: 6, - minimumCount: 3, - workloadProfileType: "ComputeOptimized" - }, - { name: "My-consumption-01", workloadProfileType: "Consumption" } - ], - zoneRedundant: true - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginCreateOrUpdateAndWait( - resourceGroupName, - environmentName, - environmentEnvelope - ); - console.log(result); -} - -async function main() { - createEnvironmentWithCustomInfrastructureResourceGroup(); - createEnvironments(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsDeleteSample.ts deleted file mode 100644 index 91baf59ae190..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsDeleteSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ManagedEnvironments_Delete.json - */ -async function deleteEnvironmentByName() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "examplekenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginDeleteAndWait( - resourceGroupName, - environmentName - ); - console.log(result); -} - -async function main() { - deleteEnvironmentByName(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsDiagnosticsGetRootSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsDiagnosticsGetRootSample.ts deleted file mode 100644 index 19efcb9871ea..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsDiagnosticsGetRootSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ManagedEnvironments_Get.json - */ -async function getEnvironmentsByName() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsDiagnostics.getRoot( - resourceGroupName, - environmentName - ); - console.log(result); -} - -async function main() { - getEnvironmentsByName(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsGetAuthTokenSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsGetAuthTokenSample.ts deleted file mode 100644 index 66a84b6d8f55..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsGetAuthTokenSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Checks if resource name is available. - * - * @summary Checks if resource name is available. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_GetAuthToken.json - */ -async function getManagedEnvironmentAuthToken() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const environmentName = "testenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.getAuthToken( - resourceGroupName, - environmentName - ); - console.log(result); -} - -async function main() { - getManagedEnvironmentAuthToken(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsGetSample.ts deleted file mode 100644 index 335952fd4a20..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ManagedEnvironments_Get.json - */ -async function getEnvironmentsByName() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.get( - resourceGroupName, - environmentName - ); - console.log(result); -} - -async function main() { - getEnvironmentsByName(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListByResourceGroupSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListByResourceGroupSample.ts deleted file mode 100644 index 752b77faf978..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json - */ -async function listEnvironmentsByResourceGroup() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "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); -} - -async function main() { - listEnvironmentsByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListBySubscriptionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListBySubscriptionSample.ts deleted file mode 100644 index b99bc16e23c0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListBySubscriptionSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ManagedEnvironments_ListBySubscription.json - */ -async function listEnvironmentsBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "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); -} - -async function main() { - listEnvironmentsBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListWorkloadProfileStatesSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListWorkloadProfileStatesSample.ts deleted file mode 100644 index 25078e9fd7be..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListWorkloadProfileStatesSample.ts +++ /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. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get all workload Profile States for a Managed Environment. - * - * @summary Get all workload Profile States for a Managed Environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json - */ -async function listEnvironmentsBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listWorkloadProfileStates( - resourceGroupName, - environmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listEnvironmentsBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesCreateOrUpdateSample.ts deleted file mode 100644 index 64d6d9cd868b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesCreateOrUpdateSample.ts +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json - */ -async function createOrUpdateEnvironmentsStorage() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "managedEnv"; - const storageName = "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, - environmentName, - storageName, - storageEnvelope - ); - console.log(result); -} - -async function main() { - createOrUpdateEnvironmentsStorage(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesDeleteSample.ts deleted file mode 100644 index 36b14ca59574..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesDeleteSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ManagedEnvironmentsStorages_Delete.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "managedEnv"; - const storageName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.delete( - resourceGroupName, - environmentName, - storageName - ); - console.log(result); -} - -async function main() { - listEnvironmentsStoragesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesGetSample.ts deleted file mode 100644 index f12af5ad99b2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesGetSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ManagedEnvironmentsStorages_Get.json - */ -async function getAEnvironmentsStoragePropertiesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "managedEnv"; - const storageName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.get( - resourceGroupName, - environmentName, - storageName - ); - console.log(result); -} - -async function main() { - getAEnvironmentsStoragePropertiesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesListSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesListSample.ts deleted file mode 100644 index 746076000ec1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesListSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ManagedEnvironmentsStorages_List.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "managedEnv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.list( - resourceGroupName, - environmentName - ); - console.log(result); -} - -async function main() { - listEnvironmentsStoragesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsUpdateSample.ts deleted file mode 100644 index 3ebafa62a0af..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsUpdateSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patches a Managed Environment using JSON Merge Patch - * - * @summary Patches a Managed Environment using JSON Merge Patch - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_Patch.json - */ -async function patchManagedEnvironment() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const environmentEnvelope: ManagedEnvironment = { - location: "East US", - tags: { tag1: "value1", tag2: "value2" } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginUpdateAndWait( - resourceGroupName, - environmentName, - environmentEnvelope - ); - console.log(result); -} - -async function main() { - patchManagedEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/namespacesCheckNameAvailabilitySample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/namespacesCheckNameAvailabilitySample.ts deleted file mode 100644 index 4e397a441bd3..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/namespacesCheckNameAvailabilitySample.ts +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { - CheckNameAvailabilityRequest, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Checks if resource name is available. - * - * @summary Checks if resource name is available. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificates_CheckNameAvailability.json - */ -async function certificatesCheckNameAvailability() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const checkNameAvailabilityRequest: CheckNameAvailabilityRequest = { - name: "testcertificatename", - type: "Microsoft.App/managedEnvironments/certificates" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.namespaces.checkNameAvailability( - resourceGroupName, - environmentName, - checkNameAvailabilityRequest - ); - console.log(result); -} - -/** - * This sample demonstrates how to Checks if resource name is available. - * - * @summary Checks if resource name is available. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_CheckNameAvailability.json - */ -async function containerAppsCheckNameAvailability() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const checkNameAvailabilityRequest: CheckNameAvailabilityRequest = { - name: "testcappname", - type: "Microsoft.App/containerApps" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.namespaces.checkNameAvailability( - resourceGroupName, - environmentName, - checkNameAvailabilityRequest - ); - console.log(result); -} - -async function main() { - certificatesCheckNameAvailability(); - containerAppsCheckNameAvailability(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/operationsListSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/operationsListSample.ts deleted file mode 100644 index b82454a18eba..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/operationsListSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/Operations_List.json - */ -async function listAllOperations() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "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); -} - -async function main() { - listAllOperations(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/README.md b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/README.md deleted file mode 100644 index bf701c39da60..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/README.md +++ /dev/null @@ -1,238 +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** | -| --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| [availableWorkloadProfilesGetSample.js][availableworkloadprofilesgetsample] | Get all available workload profiles for a location. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AvailableWorkloadProfiles_Get.json | -| [billingMetersGetSample.js][billingmetersgetsample] | Get all billingMeters for a location. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/BillingMeters_Get.json | -| [certificatesCreateOrUpdateSample.js][certificatescreateorupdatesample] | Create or Update a Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-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-11-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-11-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-11-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-11-01-preview/examples/Certificates_Patch.json | -| [connectedEnvironmentsCertificatesCreateOrUpdateSample.js][connectedenvironmentscertificatescreateorupdatesample] | Create or Update a Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json | -| [connectedEnvironmentsCertificatesDeleteSample.js][connectedenvironmentscertificatesdeletesample] | Deletes the specified Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificate_Delete.json | -| [connectedEnvironmentsCertificatesGetSample.js][connectedenvironmentscertificatesgetsample] | Get the specified Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificate_Get.json | -| [connectedEnvironmentsCertificatesListSample.js][connectedenvironmentscertificateslistsample] | Get the Certificates in a given connected environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json | -| [connectedEnvironmentsCertificatesUpdateSample.js][connectedenvironmentscertificatesupdatesample] | Patches a certificate. Currently only patching of tags is supported x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificates_Patch.json | -| [connectedEnvironmentsCheckNameAvailabilitySample.js][connectedenvironmentschecknameavailabilitysample] | Checks if resource connectedEnvironmentName is available. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json | -| [connectedEnvironmentsCreateOrUpdateSample.js][connectedenvironmentscreateorupdatesample] | Creates or updates an connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_CreateOrUpdate.json | -| [connectedEnvironmentsDaprComponentsCreateOrUpdateSample.js][connectedenvironmentsdaprcomponentscreateorupdatesample] | Creates or updates a Dapr Component in a connected environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json | -| [connectedEnvironmentsDaprComponentsDeleteSample.js][connectedenvironmentsdaprcomponentsdeletesample] | Delete a Dapr Component from a connected environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_Delete.json | -| [connectedEnvironmentsDaprComponentsGetSample.js][connectedenvironmentsdaprcomponentsgetsample] | Get a dapr component. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json | -| [connectedEnvironmentsDaprComponentsListSample.js][connectedenvironmentsdaprcomponentslistsample] | Get the Dapr Components for a connected environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_List.json | -| [connectedEnvironmentsDaprComponentsListSecretsSample.js][connectedenvironmentsdaprcomponentslistsecretssample] | List secrets for a dapr component x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json | -| [connectedEnvironmentsDeleteSample.js][connectedenvironmentsdeletesample] | Delete an connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_Delete.json | -| [connectedEnvironmentsGetSample.js][connectedenvironmentsgetsample] | Get the properties of an connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_Get.json | -| [connectedEnvironmentsListByResourceGroupSample.js][connectedenvironmentslistbyresourcegroupsample] | Get all connectedEnvironments in a resource group. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_ListByResourceGroup.json | -| [connectedEnvironmentsListBySubscriptionSample.js][connectedenvironmentslistbysubscriptionsample] | Get all connectedEnvironments for a subscription. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_ListBySubscription.json | -| [connectedEnvironmentsStoragesCreateOrUpdateSample.js][connectedenvironmentsstoragescreateorupdatesample] | Create or update storage for a connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json | -| [connectedEnvironmentsStoragesDeleteSample.js][connectedenvironmentsstoragesdeletesample] | Delete storage for a connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_Delete.json | -| [connectedEnvironmentsStoragesGetSample.js][connectedenvironmentsstoragesgetsample] | Get storage for a connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_Get.json | -| [connectedEnvironmentsStoragesListSample.js][connectedenvironmentsstorageslistsample] | Get all storages for a connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_List.json | -| [connectedEnvironmentsUpdateSample.js][connectedenvironmentsupdatesample] | Patches a Managed Environment. Only patching of tags is supported currently x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_Patch.json | -| [containerAppsAuthConfigsCreateOrUpdateSample.js][containerappsauthconfigscreateorupdatesample] | Create or update the AuthConfig for a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AuthConfigs_CreateOrUpdate.json | -| [containerAppsAuthConfigsDeleteSample.js][containerappsauthconfigsdeletesample] | Delete a Container App AuthConfig. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-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-11-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-11-01-preview/examples/AuthConfigs_ListByContainer.json | -| [containerAppsCreateOrUpdateSample.js][containerappscreateorupdatesample] | Create or update a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_CreateOrUpdate.json | -| [containerAppsDeleteSample.js][containerappsdeletesample] | Delete a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_Delete.json | -| [containerAppsDiagnosticsGetDetectorSample.js][containerappsdiagnosticsgetdetectorsample] | Get a diagnostics result of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerAppsDiagnostics_Get.json | -| [containerAppsDiagnosticsGetRevisionSample.js][containerappsdiagnosticsgetrevisionsample] | Get a revision of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Get.json | -| [containerAppsDiagnosticsGetRootSample.js][containerappsdiagnosticsgetrootsample] | Get the properties of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_Get.json | -| [containerAppsDiagnosticsListDetectorsSample.js][containerappsdiagnosticslistdetectorssample] | Get the list of diagnostics for a given Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerAppsDiagnostics_List.json | -| [containerAppsDiagnosticsListRevisionsSample.js][containerappsdiagnosticslistrevisionssample] | Get the Revisions for a given Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_List.json | -| [containerAppsGetAuthTokenSample.js][containerappsgetauthtokensample] | Get auth token for a container app x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_GetAuthToken.json | -| [containerAppsGetSample.js][containerappsgetsample] | Get the properties of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-01-preview/examples/Revisions_Restart.json | -| [containerAppsSourceControlsCreateOrUpdateSample.js][containerappssourcecontrolscreateorupdatesample] | Create or update the SourceControl for a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/SourceControls_CreateOrUpdate.json | -| [containerAppsSourceControlsDeleteSample.js][containerappssourcecontrolsdeletesample] | Delete a Container App SourceControl. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-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-11-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-11-01-preview/examples/SourceControls_ListByContainer.json | -| [containerAppsUpdateSample.js][containerappsupdatesample] | Patches a Container App using JSON Merge Patch x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-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-11-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json | -| [daprComponentsDeleteSample.js][daprcomponentsdeletesample] | Delete a Dapr Component from a Managed Environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-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-11-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json | -| [daprComponentsListSample.js][daprcomponentslistsample] | Get the Dapr Components for a managed environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_List.json | -| [daprComponentsListSecretsSample.js][daprcomponentslistsecretssample] | List secrets for a dapr component x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_ListSecrets.json | -| [jobsCreateOrUpdateSample.js][jobscreateorupdatesample] | Create or Update a Container Apps Job. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_CreateorUpdate.json | -| [jobsDeleteSample.js][jobsdeletesample] | Delete a Container Apps Job. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Delete.json | -| [jobsExecutionsListSample.js][jobsexecutionslistsample] | Get a Container Apps Job's executions x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Executions_Get.json | -| [jobsGetSample.js][jobsgetsample] | Get the properties of a Container Apps Job. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Get.json | -| [jobsListByResourceGroupSample.js][jobslistbyresourcegroupsample] | Get the Container Apps Jobs in a given resource group. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Jobs_ListByResourceGroup.json | -| [jobsListBySubscriptionSample.js][jobslistbysubscriptionsample] | Get the Container Apps Jobs in a given subscription. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Jobs_ListBySubscription.json | -| [jobsListSecretsSample.js][jobslistsecretssample] | List secrets for a container apps job x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_ListSecrets.json | -| [jobsStartSample.js][jobsstartsample] | Start a Container Apps Job x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Start.json | -| [jobsStopExecutionSample.js][jobsstopexecutionsample] | Terminates execution of a running container apps job x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop_Execution.json | -| [jobsStopMultipleExecutionsSample.js][jobsstopmultipleexecutionssample] | Terminates execution of a running container apps job x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop_Multiple.json | -| [jobsUpdateSample.js][jobsupdatesample] | Patches a Container Apps Job using JSON Merge Patch x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Patch.json | -| [managedCertificatesCreateOrUpdateSample.js][managedcertificatescreateorupdatesample] | Create or Update a Managed Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_CreateOrUpdate.json | -| [managedCertificatesDeleteSample.js][managedcertificatesdeletesample] | Deletes the specified Managed Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_Delete.json | -| [managedCertificatesGetSample.js][managedcertificatesgetsample] | Get the specified Managed Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_Get.json | -| [managedCertificatesListSample.js][managedcertificateslistsample] | Get the Managed Certificates in a given managed environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificates_ListByManagedEnvironment.json | -| [managedCertificatesUpdateSample.js][managedcertificatesupdatesample] | Patches a managed certificate. Oly patching of tags is supported x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificates_Patch.json | -| [managedEnvironmentDiagnosticsGetDetectorSample.js][managedenvironmentdiagnosticsgetdetectorsample] | Get the diagnostics data for a Managed Environment used to host container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentDiagnostics_Get.json | -| [managedEnvironmentDiagnosticsListDetectorsSample.js][managedenvironmentdiagnosticslistdetectorssample] | Get the list of diagnostics for a Managed Environment used to host container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentDiagnostics_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-11-01-preview/examples/ManagedEnvironments_CustomInfrastructureResourceGroup_Create.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-11-01-preview/examples/ManagedEnvironments_Delete.json | -| [managedEnvironmentsDiagnosticsGetRootSample.js][managedenvironmentsdiagnosticsgetrootsample] | Get the properties of a Managed Environment used to host container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_Get.json | -| [managedEnvironmentsGetAuthTokenSample.js][managedenvironmentsgetauthtokensample] | Checks if resource name is available. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_GetAuthToken.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-11-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-11-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-11-01-preview/examples/ManagedEnvironments_ListBySubscription.json | -| [managedEnvironmentsListWorkloadProfileStatesSample.js][managedenvironmentslistworkloadprofilestatessample] | Get all workload Profile States for a Managed Environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json | -| [managedEnvironmentsStoragesCreateOrUpdateSample.js][managedenvironmentsstoragescreateorupdatesample] | Create or update storage for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-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-11-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-11-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-11-01-preview/examples/ManagedEnvironmentsStorages_List.json | -| [managedEnvironmentsUpdateSample.js][managedenvironmentsupdatesample] | Patches a Managed Environment using JSON Merge Patch x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_Patch.json | -| [namespacesCheckNameAvailabilitySample.js][namespaceschecknameavailabilitysample] | Checks if resource name is available. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificates_CheckNameAvailability.json | -| [operationsListSample.js][operationslistsample] | Lists all of the available RP operations. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Operations_List.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -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 availableWorkloadProfilesGetSample.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 APPCONTAINERS_SUBSCRIPTION_ID="" node availableWorkloadProfilesGetSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[availableworkloadprofilesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/availableWorkloadProfilesGetSample.js -[billingmetersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/billingMetersGetSample.js -[certificatescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesCreateOrUpdateSample.js -[certificatesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesDeleteSample.js -[certificatesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesGetSample.js -[certificateslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesListSample.js -[certificatesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesUpdateSample.js -[connectedenvironmentscertificatescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesCreateOrUpdateSample.js -[connectedenvironmentscertificatesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesDeleteSample.js -[connectedenvironmentscertificatesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesGetSample.js -[connectedenvironmentscertificateslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesListSample.js -[connectedenvironmentscertificatesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesUpdateSample.js -[connectedenvironmentschecknameavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCheckNameAvailabilitySample.js -[connectedenvironmentscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCreateOrUpdateSample.js -[connectedenvironmentsdaprcomponentscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.js -[connectedenvironmentsdaprcomponentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsDeleteSample.js -[connectedenvironmentsdaprcomponentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsGetSample.js -[connectedenvironmentsdaprcomponentslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsListSample.js -[connectedenvironmentsdaprcomponentslistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsListSecretsSample.js -[connectedenvironmentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDeleteSample.js -[connectedenvironmentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsGetSample.js -[connectedenvironmentslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsListByResourceGroupSample.js -[connectedenvironmentslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsListBySubscriptionSample.js -[connectedenvironmentsstoragescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsStoragesCreateOrUpdateSample.js -[connectedenvironmentsstoragesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsStoragesDeleteSample.js -[connectedenvironmentsstoragesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsStoragesGetSample.js -[connectedenvironmentsstorageslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsStoragesListSample.js -[connectedenvironmentsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsUpdateSample.js -[containerappsauthconfigscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsAuthConfigsCreateOrUpdateSample.js -[containerappsauthconfigsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsAuthConfigsDeleteSample.js -[containerappsauthconfigsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsAuthConfigsGetSample.js -[containerappsauthconfigslistbycontainerappsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsAuthConfigsListByContainerAppSample.js -[containerappscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsCreateOrUpdateSample.js -[containerappsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDeleteSample.js -[containerappsdiagnosticsgetdetectorsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsGetDetectorSample.js -[containerappsdiagnosticsgetrevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsGetRevisionSample.js -[containerappsdiagnosticsgetrootsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsGetRootSample.js -[containerappsdiagnosticslistdetectorssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsListDetectorsSample.js -[containerappsdiagnosticslistrevisionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsListRevisionsSample.js -[containerappsgetauthtokensample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsGetAuthTokenSample.js -[containerappsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsGetSample.js -[containerappslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsListByResourceGroupSample.js -[containerappslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsListBySubscriptionSample.js -[containerappslistcustomhostnameanalysissample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsListCustomHostNameAnalysisSample.js -[containerappslistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsListSecretsSample.js -[containerappsrevisionreplicasgetreplicasample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionReplicasGetReplicaSample.js -[containerappsrevisionreplicaslistreplicassample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionReplicasListReplicasSample.js -[containerappsrevisionsactivaterevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionsActivateRevisionSample.js -[containerappsrevisionsdeactivaterevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionsDeactivateRevisionSample.js -[containerappsrevisionsgetrevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionsGetRevisionSample.js -[containerappsrevisionslistrevisionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionsListRevisionsSample.js -[containerappsrevisionsrestartrevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionsRestartRevisionSample.js -[containerappssourcecontrolscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsSourceControlsCreateOrUpdateSample.js -[containerappssourcecontrolsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsSourceControlsDeleteSample.js -[containerappssourcecontrolsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsSourceControlsGetSample.js -[containerappssourcecontrolslistbycontainerappsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsSourceControlsListByContainerAppSample.js -[containerappsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsUpdateSample.js -[daprcomponentscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsCreateOrUpdateSample.js -[daprcomponentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsDeleteSample.js -[daprcomponentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsGetSample.js -[daprcomponentslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsListSample.js -[daprcomponentslistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsListSecretsSample.js -[jobscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsCreateOrUpdateSample.js -[jobsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsDeleteSample.js -[jobsexecutionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsExecutionsListSample.js -[jobsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsGetSample.js -[jobslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsListByResourceGroupSample.js -[jobslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsListBySubscriptionSample.js -[jobslistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsListSecretsSample.js -[jobsstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsStartSample.js -[jobsstopexecutionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsStopExecutionSample.js -[jobsstopmultipleexecutionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsStopMultipleExecutionsSample.js -[jobsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsUpdateSample.js -[managedcertificatescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedCertificatesCreateOrUpdateSample.js -[managedcertificatesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedCertificatesDeleteSample.js -[managedcertificatesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedCertificatesGetSample.js -[managedcertificateslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedCertificatesListSample.js -[managedcertificatesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedCertificatesUpdateSample.js -[managedenvironmentdiagnosticsgetdetectorsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentDiagnosticsGetDetectorSample.js -[managedenvironmentdiagnosticslistdetectorssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentDiagnosticsListDetectorsSample.js -[managedenvironmentscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsCreateOrUpdateSample.js -[managedenvironmentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsDeleteSample.js -[managedenvironmentsdiagnosticsgetrootsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsDiagnosticsGetRootSample.js -[managedenvironmentsgetauthtokensample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsGetAuthTokenSample.js -[managedenvironmentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsGetSample.js -[managedenvironmentslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsListByResourceGroupSample.js -[managedenvironmentslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsListBySubscriptionSample.js -[managedenvironmentslistworkloadprofilestatessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsListWorkloadProfileStatesSample.js -[managedenvironmentsstoragescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsStoragesCreateOrUpdateSample.js -[managedenvironmentsstoragesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsStoragesDeleteSample.js -[managedenvironmentsstoragesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsStoragesGetSample.js -[managedenvironmentsstorageslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsStoragesListSample.js -[managedenvironmentsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsUpdateSample.js -[namespaceschecknameavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/namespacesCheckNameAvailabilitySample.js -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/operationsListSample.js -[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-appcontainers?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appcontainers/arm-appcontainers/README.md diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/availableWorkloadProfilesGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/availableWorkloadProfilesGetSample.js deleted file mode 100644 index 697b57aaa2c9..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/availableWorkloadProfilesGetSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get all available workload profiles for a location. - * - * @summary Get all available workload profiles for a location. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AvailableWorkloadProfiles_Get.json - */ -async function billingMetersGet() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const location = "East US"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.availableWorkloadProfiles.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - billingMetersGet(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/billingMetersGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/billingMetersGetSample.js deleted file mode 100644 index ca1c2fd4390d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/billingMetersGetSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get all billingMeters for a location. - * - * @summary Get all billingMeters for a location. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/BillingMeters_Get.json - */ -async function billingMetersGet() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const location = "East US"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.billingMeters.get(location); - console.log(result); -} - -async function main() { - billingMetersGet(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesCreateOrUpdateSample.js deleted file mode 100644 index c9af1d9a06cb..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesCreateOrUpdateSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/Certificate_CreateOrUpdate.json - */ -async function createOrUpdateCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const certificateEnvelope = { - location: "East US", - properties: { - password: "private key password", - value: Buffer.from("Y2VydA=="), - }, - }; - const options = { - certificateEnvelope, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.createOrUpdate( - resourceGroupName, - environmentName, - certificateName, - options - ); - console.log(result); -} - -async function main() { - createOrUpdateCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesDeleteSample.js deleted file mode 100644 index 7edb0b464440..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesDeleteSample.js +++ /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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/Certificate_Delete.json - */ -async function deleteCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.delete( - resourceGroupName, - environmentName, - certificateName - ); - console.log(result); -} - -async function main() { - deleteCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesGetSample.js deleted file mode 100644 index c68a5c10a0f8..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesGetSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/Certificate_Get.json - */ -async function getCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.get(resourceGroupName, environmentName, certificateName); - console.log(result); -} - -async function main() { - getCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesListSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesListSample.js deleted file mode 100644 index da35051f3708..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesListSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/Certificates_ListByManagedEnvironment.json - */ -async function listCertificatesByManagedEnvironment() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.certificates.list(resourceGroupName, environmentName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listCertificatesByManagedEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesUpdateSample.js deleted file mode 100644 index d039dc23a815..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesUpdateSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/Certificates_Patch.json - */ -async function patchCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const certificateName = "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, - environmentName, - certificateName, - certificateEnvelope - ); - console.log(result); -} - -async function main() { - patchCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesCreateOrUpdateSample.js deleted file mode 100644 index 4ff374608dfc..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesCreateOrUpdateSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json - */ -async function createOrUpdateCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const certificateEnvelope = { - location: "East US", - properties: { - password: "private key password", - value: Buffer.from("Y2VydA=="), - }, - }; - const options = { - certificateEnvelope, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsCertificates.createOrUpdate( - resourceGroupName, - connectedEnvironmentName, - certificateName, - options - ); - console.log(result); -} - -async function main() { - createOrUpdateCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesDeleteSample.js deleted file mode 100644 index 6a836c3e0cf5..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesDeleteSample.js +++ /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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/ConnectedEnvironmentsCertificate_Delete.json - */ -async function deleteCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsCertificates.delete( - resourceGroupName, - connectedEnvironmentName, - certificateName - ); - console.log(result); -} - -async function main() { - deleteCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesGetSample.js deleted file mode 100644 index 8f3c7e2382fa..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesGetSample.js +++ /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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/ConnectedEnvironmentsCertificate_Get.json - */ -async function getCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsCertificates.get( - resourceGroupName, - connectedEnvironmentName, - certificateName - ); - console.log(result); -} - -async function main() { - getCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesListSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesListSample.js deleted file mode 100644 index 9cf7c3b92c40..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesListSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the Certificates in a given connected environment. - * - * @summary Get the Certificates in a given connected environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json - */ -async function listCertificatesByConnectedEnvironment() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.connectedEnvironmentsCertificates.list( - resourceGroupName, - connectedEnvironmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listCertificatesByConnectedEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesUpdateSample.js deleted file mode 100644 index 435f387c3941..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesUpdateSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/ConnectedEnvironmentsCertificates_Patch.json - */ -async function patchCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const certificateEnvelope = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsCertificates.update( - resourceGroupName, - connectedEnvironmentName, - certificateName, - certificateEnvelope - ); - console.log(result); -} - -async function main() { - patchCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCheckNameAvailabilitySample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCheckNameAvailabilitySample.js deleted file mode 100644 index f0e81ff0926f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCheckNameAvailabilitySample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Checks if resource connectedEnvironmentName is available. - * - * @summary Checks if resource connectedEnvironmentName is available. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json - */ -async function certificatesCheckNameAvailability() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const checkNameAvailabilityRequest = { - name: "testcertificatename", - type: "Microsoft.App/connectedEnvironments/certificates", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.checkNameAvailability( - resourceGroupName, - connectedEnvironmentName, - checkNameAvailabilityRequest - ); - console.log(result); -} - -async function main() { - certificatesCheckNameAvailability(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCreateOrUpdateSample.js deleted file mode 100644 index d39c23aacdd6..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCreateOrUpdateSample.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates or updates an connectedEnvironment. - * - * @summary Creates or updates an connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_CreateOrUpdate.json - */ -async function createKubeEnvironments() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testenv"; - const environmentEnvelope = { - customDomainConfiguration: { - certificatePassword: "private key password", - certificateValue: Buffer.from("Y2VydA=="), - dnsSuffix: "www.my-name.com", - }, - daprAIConnectionString: - "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/", - location: "East US", - staticIp: "1.2.3.4", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.beginCreateOrUpdateAndWait( - resourceGroupName, - connectedEnvironmentName, - environmentEnvelope - ); - console.log(result); -} - -async function main() { - createKubeEnvironments(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.js deleted file mode 100644 index 4b2eb9940123..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.js +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates or updates a Dapr Component in a connected environment. - * - * @summary Creates or updates a Dapr Component in a connected environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json - */ -async function createOrUpdateDaprComponent() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const componentName = "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.connectedEnvironmentsDaprComponents.createOrUpdate( - resourceGroupName, - connectedEnvironmentName, - componentName, - daprComponentEnvelope - ); - console.log(result); -} - -async function main() { - createOrUpdateDaprComponent(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsDeleteSample.js deleted file mode 100644 index 72f634fb0177..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsDeleteSample.js +++ /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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete a Dapr Component from a connected environment. - * - * @summary Delete a Dapr Component from a connected environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_Delete.json - */ -async function deleteDaprComponent() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsDaprComponents.delete( - resourceGroupName, - connectedEnvironmentName, - componentName - ); - console.log(result); -} - -async function main() { - deleteDaprComponent(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsGetSample.js deleted file mode 100644 index 0be96eed73e0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsGetSample.js +++ /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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json - */ -async function getDaprComponent() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsDaprComponents.get( - resourceGroupName, - connectedEnvironmentName, - componentName - ); - console.log(result); -} - -async function main() { - getDaprComponent(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsListSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsListSample.js deleted file mode 100644 index 507e3c05be2b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsListSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the Dapr Components for a connected environment. - * - * @summary Get the Dapr Components for a connected environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_List.json - */ -async function listDaprComponents() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.connectedEnvironmentsDaprComponents.list( - resourceGroupName, - connectedEnvironmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listDaprComponents(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsListSecretsSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsListSecretsSample.js deleted file mode 100644 index fdaf03c56c5b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsListSecretsSample.js +++ /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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List secrets for a dapr component - * - * @summary List secrets for a dapr component - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json - */ -async function listContainerAppsSecrets() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsDaprComponents.listSecrets( - resourceGroupName, - connectedEnvironmentName, - componentName - ); - console.log(result); -} - -async function main() { - listContainerAppsSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDeleteSample.js deleted file mode 100644 index 7026080440bc..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDeleteSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete an connectedEnvironment. - * - * @summary Delete an connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_Delete.json - */ -async function deleteConnectedEnvironmentByConnectedEnvironmentName() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "examplekenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.beginDeleteAndWait( - resourceGroupName, - connectedEnvironmentName - ); - console.log(result); -} - -async function main() { - deleteConnectedEnvironmentByConnectedEnvironmentName(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsGetSample.js deleted file mode 100644 index f12d4d01cfa7..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsGetSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the properties of an connectedEnvironment. - * - * @summary Get the properties of an connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_Get.json - */ -async function getConnectedEnvironmentByConnectedEnvironmentName() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "examplekenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.get( - resourceGroupName, - connectedEnvironmentName - ); - console.log(result); -} - -async function main() { - getConnectedEnvironmentByConnectedEnvironmentName(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsListByResourceGroupSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsListByResourceGroupSample.js deleted file mode 100644 index cb26227344f3..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsListByResourceGroupSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get all connectedEnvironments in a resource group. - * - * @summary Get all connectedEnvironments in a resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_ListByResourceGroup.json - */ -async function listEnvironmentsByResourceGroup() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.connectedEnvironments.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listEnvironmentsByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsListBySubscriptionSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsListBySubscriptionSample.js deleted file mode 100644 index 5994d3b12095..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsListBySubscriptionSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get all connectedEnvironments for a subscription. - * - * @summary Get all connectedEnvironments for a subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_ListBySubscription.json - */ -async function listConnectedEnvironmentsBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "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.connectedEnvironments.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listConnectedEnvironmentsBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsStoragesCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsStoragesCreateOrUpdateSample.js deleted file mode 100644 index 80aec60dd1e1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsStoragesCreateOrUpdateSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create or update storage for a connectedEnvironment. - * - * @summary Create or update storage for a connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json - */ -async function createOrUpdateEnvironmentsStorage() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "env"; - const storageName = "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.connectedEnvironmentsStorages.createOrUpdate( - resourceGroupName, - connectedEnvironmentName, - storageName, - storageEnvelope - ); - console.log(result); -} - -async function main() { - createOrUpdateEnvironmentsStorage(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsStoragesDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsStoragesDeleteSample.js deleted file mode 100644 index 1862142a6407..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsStoragesDeleteSample.js +++ /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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete storage for a connectedEnvironment. - * - * @summary Delete storage for a connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_Delete.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "env"; - const storageName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsStorages.delete( - resourceGroupName, - connectedEnvironmentName, - storageName - ); - console.log(result); -} - -async function main() { - listEnvironmentsStoragesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsStoragesGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsStoragesGetSample.js deleted file mode 100644 index cde7f5181426..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsStoragesGetSample.js +++ /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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get storage for a connectedEnvironment. - * - * @summary Get storage for a connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_Get.json - */ -async function getAEnvironmentsStoragePropertiesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "env"; - const storageName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsStorages.get( - resourceGroupName, - connectedEnvironmentName, - storageName - ); - console.log(result); -} - -async function main() { - getAEnvironmentsStoragePropertiesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsStoragesListSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsStoragesListSample.js deleted file mode 100644 index 22d2e834c4e8..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsStoragesListSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get all storages for a connectedEnvironment. - * - * @summary Get all storages for a connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_List.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "managedEnv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsStorages.list( - resourceGroupName, - connectedEnvironmentName - ); - console.log(result); -} - -async function main() { - listEnvironmentsStoragesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsUpdateSample.js deleted file mode 100644 index 0e55ee14e9c9..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsUpdateSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/ConnectedEnvironments_Patch.json - */ -async function patchManagedEnvironment() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.update( - resourceGroupName, - connectedEnvironmentName - ); - console.log(result); -} - -async function main() { - patchManagedEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsAuthConfigsCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsAuthConfigsCreateOrUpdateSample.js deleted file mode 100644 index 284d2ddffb26..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsAuthConfigsCreateOrUpdateSample.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create or update the AuthConfig for a Container App. - * - * @summary Create or update the AuthConfig for a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AuthConfigs_CreateOrUpdate.json - */ -async function createOrUpdateContainerAppAuthConfig() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const authConfigName = "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, - authConfigName, - authConfigEnvelope - ); - console.log(result); -} - -async function main() { - createOrUpdateContainerAppAuthConfig(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsAuthConfigsDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsAuthConfigsDeleteSample.js deleted file mode 100644 index bc1655dd0e3c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsAuthConfigsDeleteSample.js +++ /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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete a Container App AuthConfig. - * - * @summary Delete a Container App AuthConfig. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AuthConfigs_Delete.json - */ -async function deleteContainerAppAuthConfig() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const authConfigName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.delete( - resourceGroupName, - containerAppName, - authConfigName - ); - console.log(result); -} - -async function main() { - deleteContainerAppAuthConfig(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsAuthConfigsGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsAuthConfigsGetSample.js deleted file mode 100644 index 111e27745539..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsAuthConfigsGetSample.js +++ /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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/AuthConfigs_Get.json - */ -async function getContainerAppAuthConfig() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const authConfigName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.get( - resourceGroupName, - containerAppName, - authConfigName - ); - console.log(result); -} - -async function main() { - getContainerAppAuthConfig(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsAuthConfigsListByContainerAppSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsAuthConfigsListByContainerAppSample.js deleted file mode 100644 index df35a2d2775a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsAuthConfigsListByContainerAppSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/AuthConfigs_ListByContainer.json - */ -async function listAuthConfigsByContainerApps() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "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); -} - -async function main() { - listAuthConfigsByContainerApps(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsCreateOrUpdateSample.js deleted file mode 100644 index 6039ac3109b1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsCreateOrUpdateSample.js +++ /dev/null @@ -1,272 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create or update a Container App. - * - * @summary Create or update a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_CreateOrUpdate.json - */ -async function createOrUpdateContainerApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const containerAppEnvelope = { - configuration: { - dapr: { - appPort: 3000, - appProtocol: "http", - enableApiLogging: true, - enabled: true, - httpMaxRequestSize: 10, - httpReadBufferSize: 30, - logLevel: "debug", - }, - ingress: { - clientCertificateMode: "accept", - corsPolicy: { - allowCredentials: true, - allowedHeaders: ["HEADER1", "HEADER2"], - allowedMethods: ["GET", "POST"], - allowedOrigins: ["https://a.test.com", "https://b.test.com"], - exposeHeaders: ["HEADER3", "HEADER4"], - maxAge: 1234, - }, - 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, - ipSecurityRestrictions: [ - { - name: "Allow work IP A subnet", - description: "Allowing all IP's within the subnet below to access containerapp", - action: "Allow", - ipAddressRange: "192.168.1.1/32", - }, - { - name: "Allow work IP B subnet", - description: "Allowing all IP's within the subnet below to access containerapp", - action: "Allow", - ipAddressRange: "192.168.1.1/8", - }, - ], - stickySessions: { affinity: "sticky" }, - targetPort: 3000, - traffic: [ - { - label: "production", - revisionName: "testcontainerApp0-ab1234", - weight: 100, - }, - ], - }, - maxInactiveRevisions: 10, - }, - environmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - location: "East US", - 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, - }, - ], - }, - ], - initContainers: [ - { - name: "testinitcontainerApp0", - args: ["-c", "while true; do echo hello; sleep 10;done"], - command: ["/bin/sh"], - image: "repo/testcontainerApp0:v4", - resources: { cpu: 0.2, memory: "100Mi" }, - }, - ], - scale: { - maxReplicas: 5, - minReplicas: 1, - rules: [ - { - name: "httpscalingrule", - custom: { type: "http", metadata: { concurrentRequests: "50" } }, - }, - ], - }, - }, - workloadProfileName: "My-GP-01", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginCreateOrUpdateAndWait( - resourceGroupName, - containerAppName, - containerAppEnvelope - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a Container App. - * - * @summary Create or update a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_ManagedBy_CreateOrUpdate.json - */ -async function createOrUpdateManagedByApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerAppManagedBy"; - const containerAppEnvelope = { - configuration: { - ingress: { - exposedPort: 4000, - external: true, - targetPort: 3000, - traffic: [{ revisionName: "testcontainerAppManagedBy-ab1234", weight: 100 }], - transport: "tcp", - }, - }, - environmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - location: "East US", - managedBy: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.AppPlatform/Spring/springapp", - template: { - containers: [ - { - name: "testcontainerAppManagedBy", - image: "repo/testcontainerAppManagedBy:v1", - probes: [ - { - type: "Liveness", - initialDelaySeconds: 3, - periodSeconds: 3, - tcpSocket: { port: 8080 }, - }, - ], - }, - ], - scale: { - maxReplicas: 5, - minReplicas: 1, - rules: [ - { - name: "tcpscalingrule", - tcp: { metadata: { concurrentConnections: "50" } }, - }, - ], - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginCreateOrUpdateAndWait( - resourceGroupName, - containerAppName, - containerAppEnvelope - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a Container App. - * - * @summary Create or update a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_TcpApp_CreateOrUpdate.json - */ -async function createOrUpdateTcpApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerAppTcp"; - const containerAppEnvelope = { - configuration: { - ingress: { - exposedPort: 4000, - external: true, - targetPort: 3000, - traffic: [{ revisionName: "testcontainerAppTcp-ab1234", weight: 100 }], - transport: "tcp", - }, - }, - environmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - location: "East US", - template: { - containers: [ - { - name: "testcontainerAppTcp", - image: "repo/testcontainerAppTcp:v1", - probes: [ - { - type: "Liveness", - initialDelaySeconds: 3, - periodSeconds: 3, - tcpSocket: { port: 8080 }, - }, - ], - }, - ], - scale: { - maxReplicas: 5, - minReplicas: 1, - rules: [ - { - name: "tcpscalingrule", - tcp: { metadata: { concurrentConnections: "50" } }, - }, - ], - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginCreateOrUpdateAndWait( - resourceGroupName, - containerAppName, - containerAppEnvelope - ); - console.log(result); -} - -async function main() { - createOrUpdateContainerApp(); - createOrUpdateManagedByApp(); - createOrUpdateTcpApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDeleteSample.js deleted file mode 100644 index e69c2f743ff0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDeleteSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete a Container App. - * - * @summary Delete a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_Delete.json - */ -async function deleteContainerApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testWorkerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginDeleteAndWait(resourceGroupName, containerAppName); - console.log(result); -} - -async function main() { - deleteContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsGetDetectorSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsGetDetectorSample.js deleted file mode 100644 index 4a12660df14f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsGetDetectorSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a diagnostics result of a Container App. - * - * @summary Get a diagnostics result of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerAppsDiagnostics_Get.json - */ -async function getContainerAppDiagnosticsInfo() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "mikono-workerapp-test-rg"; - const containerAppName = "mikono-capp-stage1"; - const detectorName = "cappcontainerappnetworkIO"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsDiagnostics.getDetector( - resourceGroupName, - containerAppName, - detectorName - ); - console.log(result); -} - -async function main() { - getContainerAppDiagnosticsInfo(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsGetRevisionSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsGetRevisionSample.js deleted file mode 100644 index b669579ec983..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsGetRevisionSample.js +++ /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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/Revisions_Get.json - */ -async function getContainerAppRevision() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsDiagnostics.getRevision( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -async function main() { - getContainerAppRevision(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsGetRootSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsGetRootSample.js deleted file mode 100644 index 2b096b5e6214..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsGetRootSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/ContainerApps_Get.json - */ -async function getContainerApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsDiagnostics.getRoot(resourceGroupName, containerAppName); - console.log(result); -} - -async function main() { - getContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsListDetectorsSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsListDetectorsSample.js deleted file mode 100644 index aac8cdba35b8..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsListDetectorsSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the list of diagnostics for a given Container App. - * - * @summary Get the list of diagnostics for a given Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerAppsDiagnostics_List.json - */ -async function getTheListOfAvailableDiagnosticsForAGivenContainerApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "mikono-workerapp-test-rg"; - const containerAppName = "mikono-capp-stage1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsDiagnostics.listDetectors( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getTheListOfAvailableDiagnosticsForAGivenContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsListRevisionsSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsListRevisionsSample.js deleted file mode 100644 index b734ae4429c0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsListRevisionsSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/Revisions_List.json - */ -async function listContainerAppRevisions() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsDiagnostics.listRevisions( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listContainerAppRevisions(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsGetAuthTokenSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsGetAuthTokenSample.js deleted file mode 100644 index 1dfe2c244a6d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsGetAuthTokenSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get auth token for a container app - * - * @summary Get auth token for a container app - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_GetAuthToken.json - */ -async function getContainerAppAuthToken() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.getAuthToken(resourceGroupName, containerAppName); - console.log(result); -} - -async function main() { - getContainerAppAuthToken(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsGetSample.js deleted file mode 100644 index 8455898e0d87..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsGetSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/ContainerApps_Get.json - */ -async function getContainerApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.get(resourceGroupName, containerAppName); - console.log(result); -} - -async function main() { - getContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsListByResourceGroupSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsListByResourceGroupSample.js deleted file mode 100644 index f4cacac91af8..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsListByResourceGroupSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/ContainerApps_ListByResourceGroup.json - */ -async function listContainerAppsByResourceGroup() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "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); -} - -async function main() { - listContainerAppsByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsListBySubscriptionSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsListBySubscriptionSample.js deleted file mode 100644 index e521f01f2dcd..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsListBySubscriptionSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/ContainerApps_ListBySubscription.json - */ -async function listContainerAppsBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "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); -} - -async function main() { - listContainerAppsBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsListCustomHostNameAnalysisSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsListCustomHostNameAnalysisSample.js deleted file mode 100644 index e4ac56332b89..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsListCustomHostNameAnalysisSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json - */ -async function analyzeCustomHostname() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "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); -} - -async function main() { - analyzeCustomHostname(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsListSecretsSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsListSecretsSample.js deleted file mode 100644 index a50ec23506ea..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsListSecretsSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/ContainerApps_ListSecrets.json - */ -async function listContainerAppsSecrets() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.listSecrets(resourceGroupName, containerAppName); - console.log(result); -} - -async function main() { - listContainerAppsSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionReplicasGetReplicaSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionReplicasGetReplicaSample.js deleted file mode 100644 index 167bcbfdd6fa..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionReplicasGetReplicaSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/Replicas_Get.json - */ -async function getContainerAppRevisionReplica() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "myapp"; - const revisionName = "myapp--0wlqy09"; - const replicaName = "myapp--0wlqy09-5d9774cff-5wnd8"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisionReplicas.getReplica( - resourceGroupName, - containerAppName, - revisionName, - replicaName - ); - console.log(result); -} - -async function main() { - getContainerAppRevisionReplica(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionReplicasListReplicasSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionReplicasListReplicasSample.js deleted file mode 100644 index ada72067bf18..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionReplicasListReplicasSample.js +++ /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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/Replicas_List.json - */ -async function listContainerAppReplicas() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "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); -} - -async function main() { - listContainerAppReplicas(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionsActivateRevisionSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionsActivateRevisionSample.js deleted file mode 100644 index 56dd5c014288..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionsActivateRevisionSample.js +++ /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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/Revisions_Activate.json - */ -async function activateContainerAppRevision() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.activateRevision( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -async function main() { - activateContainerAppRevision(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionsDeactivateRevisionSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionsDeactivateRevisionSample.js deleted file mode 100644 index d04d8e4eb251..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionsDeactivateRevisionSample.js +++ /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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/Revisions_Deactivate.json - */ -async function deactivateContainerAppRevision() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.deactivateRevision( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -async function main() { - deactivateContainerAppRevision(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionsGetRevisionSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionsGetRevisionSample.js deleted file mode 100644 index 8c38f3a82294..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionsGetRevisionSample.js +++ /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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/Revisions_Get.json - */ -async function getContainerAppRevision() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.getRevision( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -async function main() { - getContainerAppRevision(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionsListRevisionsSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionsListRevisionsSample.js deleted file mode 100644 index 7fb90ece8bc0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionsListRevisionsSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/Revisions_List.json - */ -async function listContainerAppRevisions() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "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); -} - -async function main() { - listContainerAppRevisions(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionsRestartRevisionSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionsRestartRevisionSample.js deleted file mode 100644 index 8911cdf02bce..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionsRestartRevisionSample.js +++ /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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/Revisions_Restart.json - */ -async function restartContainerAppRevision() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testStaticSite0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.restartRevision( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -async function main() { - restartContainerAppRevision(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsSourceControlsCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsSourceControlsCreateOrUpdateSample.js deleted file mode 100644 index 5e75aaedfa08..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsSourceControlsCreateOrUpdateSample.js +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create or update the SourceControl for a Container App. - * - * @summary Create or update the SourceControl for a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/SourceControls_CreateOrUpdate.json - */ -async function createOrUpdateContainerAppSourceControl() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const sourceControlName = "current"; - const sourceControlEnvelope = { - branch: "master", - githubActionConfiguration: { - azureCredentials: { - clientId: "", - clientSecret: "", - tenantId: "", - }, - contextPath: "./", - image: "image/tag", - 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, - sourceControlName, - sourceControlEnvelope - ); - console.log(result); -} - -async function main() { - createOrUpdateContainerAppSourceControl(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsSourceControlsDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsSourceControlsDeleteSample.js deleted file mode 100644 index 15184f9e465d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsSourceControlsDeleteSample.js +++ /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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete a Container App SourceControl. - * - * @summary Delete a Container App SourceControl. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/SourceControls_Delete.json - */ -async function deleteContainerAppSourceControl() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const sourceControlName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.beginDeleteAndWait( - resourceGroupName, - containerAppName, - sourceControlName - ); - console.log(result); -} - -async function main() { - deleteContainerAppSourceControl(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsSourceControlsGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsSourceControlsGetSample.js deleted file mode 100644 index a4256bde6dd2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsSourceControlsGetSample.js +++ /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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/SourceControls_Get.json - */ -async function getContainerAppSourceControl() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const sourceControlName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.get( - resourceGroupName, - containerAppName, - sourceControlName - ); - console.log(result); -} - -async function main() { - getContainerAppSourceControl(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsSourceControlsListByContainerAppSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsSourceControlsListByContainerAppSample.js deleted file mode 100644 index 76363f4b49ec..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsSourceControlsListByContainerAppSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/SourceControls_ListByContainer.json - */ -async function listAppSourceControls() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "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); -} - -async function main() { - listAppSourceControls(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsUpdateSample.js deleted file mode 100644 index c0f529899689..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsUpdateSample.js +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Patches a Container App using JSON Merge Patch - * - * @summary Patches a Container App using JSON Merge Patch - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_Patch.json - */ -async function patchContainerApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const containerAppEnvelope = { - configuration: { - dapr: { - appPort: 3000, - appProtocol: "http", - enableApiLogging: true, - enabled: true, - httpMaxRequestSize: 10, - httpReadBufferSize: 30, - logLevel: "debug", - }, - 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, - ipSecurityRestrictions: [ - { - name: "Allow work IP A subnet", - description: "Allowing all IP's within the subnet below to access containerapp", - action: "Allow", - ipAddressRange: "192.168.1.1/32", - }, - { - name: "Allow work IP B subnet", - description: "Allowing all IP's within the subnet below to access containerapp", - action: "Allow", - ipAddressRange: "192.168.1.1/8", - }, - ], - stickySessions: { affinity: "sticky" }, - targetPort: 3000, - traffic: [ - { - label: "production", - revisionName: "testcontainerApp0-ab1234", - weight: 100, - }, - ], - }, - maxInactiveRevisions: 10, - }, - location: "East US", - tags: { tag1: "value1", tag2: "value2" }, - 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, - }, - ], - }, - ], - initContainers: [ - { - name: "testinitcontainerApp0", - image: "repo/testcontainerApp0:v4", - resources: { cpu: 0.2, memory: "100Mi" }, - }, - ], - 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.beginUpdateAndWait( - resourceGroupName, - containerAppName, - containerAppEnvelope - ); - console.log(result); -} - -async function main() { - patchContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsCreateOrUpdateSample.js deleted file mode 100644 index 607d567ef3eb..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsCreateOrUpdateSample.js +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json - */ -async function createOrUpdateDaprComponentWithSecretStoreComponent() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "myenvironment"; - const componentName = "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"], - secretStoreComponent: "my-secret-store", - version: "v1", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.createOrUpdate( - resourceGroupName, - environmentName, - componentName, - daprComponentEnvelope - ); - console.log(result); -} - -/** - * 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-11-01-preview/examples/DaprComponents_CreateOrUpdate_Secrets.json - */ -async function createOrUpdateDaprComponentWithSecrets() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "myenvironment"; - const componentName = "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, - componentName, - daprComponentEnvelope - ); - console.log(result); -} - -async function main() { - createOrUpdateDaprComponentWithSecretStoreComponent(); - createOrUpdateDaprComponentWithSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsDeleteSample.js deleted file mode 100644 index 939e8503e930..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsDeleteSample.js +++ /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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/DaprComponents_Delete.json - */ -async function deleteDaprComponent() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.delete( - resourceGroupName, - environmentName, - componentName - ); - console.log(result); -} - -async function main() { - deleteDaprComponent(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsGetSample.js deleted file mode 100644 index 455fe1ce9f29..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsGetSample.js +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json - */ -async function getDaprComponentWithSecretStoreComponent() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.get(resourceGroupName, environmentName, componentName); - console.log(result); -} - -/** - * 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-11-01-preview/examples/DaprComponents_Get_Secrets.json - */ -async function getDaprComponentWithSecrets() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.get(resourceGroupName, environmentName, componentName); - console.log(result); -} - -async function main() { - getDaprComponentWithSecretStoreComponent(); - getDaprComponentWithSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsListSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsListSample.js deleted file mode 100644 index eccb8e239b5a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsListSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/DaprComponents_List.json - */ -async function listDaprComponents() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "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); -} - -async function main() { - listDaprComponents(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsListSecretsSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsListSecretsSample.js deleted file mode 100644 index c528f957ce94..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsListSecretsSample.js +++ /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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List secrets for a dapr component - * - * @summary List secrets for a dapr component - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_ListSecrets.json - */ -async function listContainerAppsSecrets() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.listSecrets( - resourceGroupName, - environmentName, - componentName - ); - console.log(result); -} - -async function main() { - listContainerAppsSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsCreateOrUpdateSample.js deleted file mode 100644 index bdf729c808b5..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsCreateOrUpdateSample.js +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create or Update a Container Apps Job. - * - * @summary Create or Update a Container Apps Job. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_CreateorUpdate.json - */ -async function createOrUpdateContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerAppsJob0"; - const jobEnvelope = { - configuration: { - manualTriggerConfig: { parallelism: 4, replicaCompletionCount: 1 }, - replicaRetryLimit: 10, - replicaTimeout: 10, - triggerType: "Manual", - }, - environmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - location: "East US", - template: { - containers: [ - { - name: "testcontainerAppsJob0", - image: "repo/testcontainerAppsJob0:v1", - probes: [ - { - type: "Liveness", - httpGet: { - path: "/health", - httpHeaders: [{ name: "Custom-Header", value: "Awesome" }], - port: 8080, - }, - initialDelaySeconds: 5, - periodSeconds: 3, - }, - ], - }, - ], - initContainers: [ - { - name: "testinitcontainerAppsJob0", - args: ["-c", "while true; do echo hello; sleep 10;done"], - command: ["/bin/sh"], - image: "repo/testcontainerAppsJob0:v4", - resources: { cpu: 0.2, memory: "100Mi" }, - }, - ], - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginCreateOrUpdateAndWait( - resourceGroupName, - jobName, - jobEnvelope - ); - console.log(result); -} - -async function main() { - createOrUpdateContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsDeleteSample.js deleted file mode 100644 index f6b80d04dc0b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsDeleteSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete a Container Apps Job. - * - * @summary Delete a Container Apps Job. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Delete.json - */ -async function deleteContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testWorkerContainerAppsJob0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginDeleteAndWait(resourceGroupName, jobName); - console.log(result); -} - -async function main() { - deleteContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsExecutionsListSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsExecutionsListSample.js deleted file mode 100644 index 4434fab8bf1e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsExecutionsListSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a Container Apps Job's executions - * - * @summary Get a Container Apps Job's executions - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Executions_Get.json - */ -async function getAContainerAppsJobExecutions() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerAppsJob0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.jobsExecutions.list(resourceGroupName, jobName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getAContainerAppsJobExecutions(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsGetSample.js deleted file mode 100644 index 359e6d26f05b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsGetSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the properties of a Container Apps Job. - * - * @summary Get the properties of a Container Apps Job. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Get.json - */ -async function getContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerAppsJob0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.get(resourceGroupName, jobName); - console.log(result); -} - -async function main() { - getContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsListByResourceGroupSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsListByResourceGroupSample.js deleted file mode 100644 index 56dec80d62be..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsListByResourceGroupSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the Container Apps Jobs in a given resource group. - * - * @summary Get the Container Apps Jobs in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Jobs_ListByResourceGroup.json - */ -async function listContainerAppsJobsByResourceGroup() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.jobs.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listContainerAppsJobsByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsListBySubscriptionSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsListBySubscriptionSample.js deleted file mode 100644 index bf0db4dce839..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsListBySubscriptionSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the Container Apps Jobs in a given subscription. - * - * @summary Get the Container Apps Jobs in a given subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Jobs_ListBySubscription.json - */ -async function listContainerAppsJobsBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "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.jobs.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listContainerAppsJobsBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsListSecretsSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsListSecretsSample.js deleted file mode 100644 index 66a94294d9a6..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsListSecretsSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List secrets for a container apps job - * - * @summary List secrets for a container apps job - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_ListSecrets.json - */ -async function listContainerAppsJobSecrets() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerAppsJob0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.listSecrets(resourceGroupName, jobName); - console.log(result); -} - -async function main() { - listContainerAppsJobSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsStartSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsStartSample.js deleted file mode 100644 index 4d16e886aff5..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsStartSample.js +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Start a Container Apps Job - * - * @summary Start a Container Apps Job - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Start.json - */ -async function runAContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerAppsJob0"; - const template = { - containers: [ - { - name: "testcontainerAppsJob0", - image: "repo/testcontainerAppsJob0:v4", - resources: { cpu: 0.2, memory: "100Mi" }, - }, - ], - initContainers: [ - { - name: "testinitcontainerAppsJob0", - args: ["-c", "while true; do echo hello; sleep 10;done"], - command: ["/bin/sh"], - image: "repo/testcontainerAppsJob0:v4", - resources: { cpu: 0.2, memory: "100Mi" }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginStartAndWait(resourceGroupName, jobName, template); - console.log(result); -} - -async function main() { - runAContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsStopExecutionSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsStopExecutionSample.js deleted file mode 100644 index 327698f36587..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsStopExecutionSample.js +++ /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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Terminates execution of a running container apps job - * - * @summary Terminates execution of a running container apps job - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop_Execution.json - */ -async function terminateAContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerAppsJob0"; - const jobExecutionName = "jobExecution1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginStopExecutionAndWait( - resourceGroupName, - jobName, - jobExecutionName - ); - console.log(result); -} - -async function main() { - terminateAContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsStopMultipleExecutionsSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsStopMultipleExecutionsSample.js deleted file mode 100644 index 15e4eb266727..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsStopMultipleExecutionsSample.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Terminates execution of a running container apps job - * - * @summary Terminates execution of a running container apps job - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop_Multiple.json - */ -async function terminateMultipleContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerAppsJob0"; - const jobExecutionName = { - value: [ - { name: "jobExecution-27944453" }, - { name: "jobExecution-27944452" }, - { name: "jobExecution-27944451" }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginStopMultipleExecutionsAndWait( - resourceGroupName, - jobName, - jobExecutionName - ); - console.log(result); -} - -async function main() { - terminateMultipleContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsUpdateSample.js deleted file mode 100644 index 5c483b6da9ce..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/jobsUpdateSample.js +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Patches a Container Apps Job using JSON Merge Patch - * - * @summary Patches a Container Apps Job using JSON Merge Patch - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Patch.json - */ -async function patchContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerAppsJob0"; - const jobEnvelope = { - properties: { - configuration: { - manualTriggerConfig: { parallelism: 4, replicaCompletionCount: 1 }, - replicaRetryLimit: 10, - replicaTimeout: 10, - triggerType: "Manual", - }, - template: { - containers: [ - { - name: "testcontainerAppsJob0", - image: "repo/testcontainerAppsJob0:v1", - probes: [ - { - type: "Liveness", - httpGet: { - path: "/health", - httpHeaders: [{ name: "Custom-Header", value: "Awesome" }], - port: 8080, - }, - initialDelaySeconds: 3, - periodSeconds: 3, - }, - ], - }, - ], - initContainers: [ - { - name: "testinitcontainerAppsJob0", - args: ["-c", "while true; do echo hello; sleep 10;done"], - command: ["/bin/sh"], - image: "repo/testcontainerAppsJob0:v4", - resources: { cpu: 0.2, memory: "100Mi" }, - }, - ], - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginUpdateAndWait(resourceGroupName, jobName, jobEnvelope); - console.log(result); -} - -async function main() { - patchContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedCertificatesCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedCertificatesCreateOrUpdateSample.js deleted file mode 100644 index a44df5e8f977..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedCertificatesCreateOrUpdateSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create or Update a Managed Certificate. - * - * @summary Create or Update a Managed Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_CreateOrUpdate.json - */ -async function createOrUpdateCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const managedCertificateName = "certificate-firendly-name"; - const managedCertificateEnvelope = { - location: "East US", - properties: { - domainControlValidation: "CNAME", - subjectName: "my-subject-name.company.country.net", - }, - }; - const options = { - managedCertificateEnvelope, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedCertificates.beginCreateOrUpdateAndWait( - resourceGroupName, - environmentName, - managedCertificateName, - options - ); - console.log(result); -} - -async function main() { - createOrUpdateCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedCertificatesDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedCertificatesDeleteSample.js deleted file mode 100644 index efb80abcedcb..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedCertificatesDeleteSample.js +++ /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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes the specified Managed Certificate. - * - * @summary Deletes the specified Managed Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_Delete.json - */ -async function deleteCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const managedCertificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedCertificates.delete( - resourceGroupName, - environmentName, - managedCertificateName - ); - console.log(result); -} - -async function main() { - deleteCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedCertificatesGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedCertificatesGetSample.js deleted file mode 100644 index 8ec59431a1a0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedCertificatesGetSample.js +++ /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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the specified Managed Certificate. - * - * @summary Get the specified Managed Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_Get.json - */ -async function getCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const managedCertificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedCertificates.get( - resourceGroupName, - environmentName, - managedCertificateName - ); - console.log(result); -} - -async function main() { - getCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedCertificatesListSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedCertificatesListSample.js deleted file mode 100644 index 4dffaae47df7..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedCertificatesListSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the Managed Certificates in a given managed environment. - * - * @summary Get the Managed Certificates in a given managed environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificates_ListByManagedEnvironment.json - */ -async function listManagedCertificatesByManagedEnvironment() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedCertificates.list(resourceGroupName, environmentName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listManagedCertificatesByManagedEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedCertificatesUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedCertificatesUpdateSample.js deleted file mode 100644 index b01cc0e38896..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedCertificatesUpdateSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Patches a managed certificate. Oly patching of tags is supported - * - * @summary Patches a managed certificate. Oly patching of tags is supported - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificates_Patch.json - */ -async function patchManagedCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const managedCertificateName = "certificate-firendly-name"; - const managedCertificateEnvelope = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedCertificates.update( - resourceGroupName, - environmentName, - managedCertificateName, - managedCertificateEnvelope - ); - console.log(result); -} - -async function main() { - patchManagedCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentDiagnosticsGetDetectorSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentDiagnosticsGetDetectorSample.js deleted file mode 100644 index 71224c189f1e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentDiagnosticsGetDetectorSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the diagnostics data for a Managed Environment used to host container apps. - * - * @summary Get the diagnostics data for a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentDiagnostics_Get.json - */ -async function getDiagnosticDataForAManagedEnvironments() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "mikono-workerapp-test-rg"; - const environmentName = "mikonokubeenv"; - const detectorName = "ManagedEnvAvailabilityMetrics"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentDiagnostics.getDetector( - resourceGroupName, - environmentName, - detectorName - ); - console.log(result); -} - -async function main() { - getDiagnosticDataForAManagedEnvironments(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentDiagnosticsListDetectorsSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentDiagnosticsListDetectorsSample.js deleted file mode 100644 index bccb1c6f42e5..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentDiagnosticsListDetectorsSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the list of diagnostics for a Managed Environment used to host container apps. - * - * @summary Get the list of diagnostics for a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentDiagnostics_List.json - */ -async function getTheListOfAvailableDiagnosticDataForAManagedEnvironments() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "mikono-workerapp-test-rg"; - const environmentName = "mikonokubeenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentDiagnostics.listDetectors( - resourceGroupName, - environmentName - ); - console.log(result); -} - -async function main() { - getTheListOfAvailableDiagnosticDataForAManagedEnvironments(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsCreateOrUpdateSample.js deleted file mode 100644 index 36b2fd96e2e6..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsCreateOrUpdateSample.js +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/ManagedEnvironments_CustomInfrastructureResourceGroup_Create.json - */ -async function createEnvironmentWithCustomInfrastructureResourceGroup() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const environmentEnvelope = { - appLogsConfiguration: { - logAnalyticsConfiguration: { customerId: "string", sharedKey: "string" }, - }, - customDomainConfiguration: { - certificatePassword: "1234", - certificateValue: Buffer.from("Y2VydA=="), - dnsSuffix: "www.my-name.com", - }, - daprAIConnectionString: - "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/", - infrastructureResourceGroup: "myInfrastructureRgName", - location: "East US", - vnetConfiguration: { - infrastructureSubnetId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/RGName/providers/Microsoft.Network/virtualNetworks/VNetName/subnets/subnetName1", - }, - workloadProfiles: [ - { - name: "My-GP-01", - maximumCount: 12, - minimumCount: 3, - workloadProfileType: "GeneralPurpose", - }, - { - name: "My-MO-01", - maximumCount: 6, - minimumCount: 3, - workloadProfileType: "MemoryOptimized", - }, - { - name: "My-CO-01", - maximumCount: 6, - minimumCount: 3, - workloadProfileType: "ComputeOptimized", - }, - { name: "My-consumption-01", workloadProfileType: "Consumption" }, - ], - zoneRedundant: true, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginCreateOrUpdateAndWait( - resourceGroupName, - environmentName, - environmentEnvelope - ); - console.log(result); -} - -/** - * 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-11-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json - */ -async function createEnvironments() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const environmentEnvelope = { - appLogsConfiguration: { - logAnalyticsConfiguration: { customerId: "string", sharedKey: "string" }, - }, - customDomainConfiguration: { - certificatePassword: "1234", - certificateValue: Buffer.from("Y2VydA=="), - dnsSuffix: "www.my-name.com", - }, - daprAIConnectionString: - "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/", - location: "East US", - vnetConfiguration: { - infrastructureSubnetId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/RGName/providers/Microsoft.Network/virtualNetworks/VNetName/subnets/subnetName1", - }, - workloadProfiles: [ - { - name: "My-GP-01", - maximumCount: 12, - minimumCount: 3, - workloadProfileType: "GeneralPurpose", - }, - { - name: "My-MO-01", - maximumCount: 6, - minimumCount: 3, - workloadProfileType: "MemoryOptimized", - }, - { - name: "My-CO-01", - maximumCount: 6, - minimumCount: 3, - workloadProfileType: "ComputeOptimized", - }, - { name: "My-consumption-01", workloadProfileType: "Consumption" }, - ], - zoneRedundant: true, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginCreateOrUpdateAndWait( - resourceGroupName, - environmentName, - environmentEnvelope - ); - console.log(result); -} - -async function main() { - createEnvironmentWithCustomInfrastructureResourceGroup(); - createEnvironments(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsDeleteSample.js deleted file mode 100644 index 4533c2e129fc..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsDeleteSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/ManagedEnvironments_Delete.json - */ -async function deleteEnvironmentByName() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "examplekenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginDeleteAndWait( - resourceGroupName, - environmentName - ); - console.log(result); -} - -async function main() { - deleteEnvironmentByName(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsDiagnosticsGetRootSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsDiagnosticsGetRootSample.js deleted file mode 100644 index 318a7bfc5df9..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsDiagnosticsGetRootSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/ManagedEnvironments_Get.json - */ -async function getEnvironmentsByName() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsDiagnostics.getRoot( - resourceGroupName, - environmentName - ); - console.log(result); -} - -async function main() { - getEnvironmentsByName(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsGetAuthTokenSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsGetAuthTokenSample.js deleted file mode 100644 index 256752f46dfa..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsGetAuthTokenSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Checks if resource name is available. - * - * @summary Checks if resource name is available. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_GetAuthToken.json - */ -async function getManagedEnvironmentAuthToken() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const environmentName = "testenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.getAuthToken(resourceGroupName, environmentName); - console.log(result); -} - -async function main() { - getManagedEnvironmentAuthToken(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsGetSample.js deleted file mode 100644 index f4eeb4b79c8a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsGetSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/ManagedEnvironments_Get.json - */ -async function getEnvironmentsByName() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.get(resourceGroupName, environmentName); - console.log(result); -} - -async function main() { - getEnvironmentsByName(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsListByResourceGroupSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsListByResourceGroupSample.js deleted file mode 100644 index 994773a2df30..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsListByResourceGroupSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json - */ -async function listEnvironmentsByResourceGroup() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "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); -} - -async function main() { - listEnvironmentsByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsListBySubscriptionSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsListBySubscriptionSample.js deleted file mode 100644 index 9daad5ea4417..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsListBySubscriptionSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/ManagedEnvironments_ListBySubscription.json - */ -async function listEnvironmentsBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "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); -} - -async function main() { - listEnvironmentsBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsListWorkloadProfileStatesSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsListWorkloadProfileStatesSample.js deleted file mode 100644 index d4e8a60faf62..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsListWorkloadProfileStatesSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get all workload Profile States for a Managed Environment. - * - * @summary Get all workload Profile States for a Managed Environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json - */ -async function listEnvironmentsBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listWorkloadProfileStates( - resourceGroupName, - environmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listEnvironmentsBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsStoragesCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsStoragesCreateOrUpdateSample.js deleted file mode 100644 index fb4bba072850..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsStoragesCreateOrUpdateSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json - */ -async function createOrUpdateEnvironmentsStorage() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "managedEnv"; - const storageName = "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, - environmentName, - storageName, - storageEnvelope - ); - console.log(result); -} - -async function main() { - createOrUpdateEnvironmentsStorage(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsStoragesDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsStoragesDeleteSample.js deleted file mode 100644 index 88c68224a743..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsStoragesDeleteSample.js +++ /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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/ManagedEnvironmentsStorages_Delete.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "managedEnv"; - const storageName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.delete( - resourceGroupName, - environmentName, - storageName - ); - console.log(result); -} - -async function main() { - listEnvironmentsStoragesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsStoragesGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsStoragesGetSample.js deleted file mode 100644 index 18e65494acf1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsStoragesGetSample.js +++ /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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/ManagedEnvironmentsStorages_Get.json - */ -async function getAEnvironmentsStoragePropertiesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "managedEnv"; - const storageName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.get( - resourceGroupName, - environmentName, - storageName - ); - console.log(result); -} - -async function main() { - getAEnvironmentsStoragePropertiesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsStoragesListSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsStoragesListSample.js deleted file mode 100644 index 03f72507d247..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsStoragesListSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/ManagedEnvironmentsStorages_List.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "managedEnv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.list(resourceGroupName, environmentName); - console.log(result); -} - -async function main() { - listEnvironmentsStoragesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsUpdateSample.js deleted file mode 100644 index 4e7ad340d912..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsUpdateSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Patches a Managed Environment using JSON Merge Patch - * - * @summary Patches a Managed Environment using JSON Merge Patch - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_Patch.json - */ -async function patchManagedEnvironment() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const environmentEnvelope = { - location: "East US", - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginUpdateAndWait( - resourceGroupName, - environmentName, - environmentEnvelope - ); - console.log(result); -} - -async function main() { - patchManagedEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/namespacesCheckNameAvailabilitySample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/namespacesCheckNameAvailabilitySample.js deleted file mode 100644 index 0f9aac11a593..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/namespacesCheckNameAvailabilitySample.js +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Checks if resource name is available. - * - * @summary Checks if resource name is available. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificates_CheckNameAvailability.json - */ -async function certificatesCheckNameAvailability() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const checkNameAvailabilityRequest = { - name: "testcertificatename", - type: "Microsoft.App/managedEnvironments/certificates", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.namespaces.checkNameAvailability( - resourceGroupName, - environmentName, - checkNameAvailabilityRequest - ); - console.log(result); -} - -/** - * This sample demonstrates how to Checks if resource name is available. - * - * @summary Checks if resource name is available. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_CheckNameAvailability.json - */ -async function containerAppsCheckNameAvailability() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const checkNameAvailabilityRequest = { - name: "testcappname", - type: "Microsoft.App/containerApps", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.namespaces.checkNameAvailability( - resourceGroupName, - environmentName, - checkNameAvailabilityRequest - ); - console.log(result); -} - -async function main() { - certificatesCheckNameAvailability(); - containerAppsCheckNameAvailability(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/operationsListSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/operationsListSample.js deleted file mode 100644 index 2272f3a760d1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/operationsListSample.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-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * 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-11-01-preview/examples/Operations_List.json - */ -async function listAllOperations() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "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); -} - -async function main() { - listAllOperations(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/package.json b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/package.json deleted file mode 100644 index 26b909b3012e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "@azure-samples/arm-appcontainers-js-beta", - "private": true, - "version": "1.0.0", - "description": " client library samples for JavaScript (Beta)", - "engines": { - "node": ">=14.0.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/appcontainers/arm-appcontainers" - }, - "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/appcontainers/arm-appcontainers", - "dependencies": { - "@azure/arm-appcontainers": "next", - "dotenv": "latest", - "@azure/identity": "^2.0.1" - } -} diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/sample.env b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-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/appcontainers/arm-appcontainers/samples/v2-beta/typescript/README.md b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/README.md deleted file mode 100644 index 9f939fef3495..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/README.md +++ /dev/null @@ -1,251 +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** | -| --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| [availableWorkloadProfilesGetSample.ts][availableworkloadprofilesgetsample] | Get all available workload profiles for a location. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AvailableWorkloadProfiles_Get.json | -| [billingMetersGetSample.ts][billingmetersgetsample] | Get all billingMeters for a location. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/BillingMeters_Get.json | -| [certificatesCreateOrUpdateSample.ts][certificatescreateorupdatesample] | Create or Update a Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-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-11-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-11-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-11-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-11-01-preview/examples/Certificates_Patch.json | -| [connectedEnvironmentsCertificatesCreateOrUpdateSample.ts][connectedenvironmentscertificatescreateorupdatesample] | Create or Update a Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json | -| [connectedEnvironmentsCertificatesDeleteSample.ts][connectedenvironmentscertificatesdeletesample] | Deletes the specified Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificate_Delete.json | -| [connectedEnvironmentsCertificatesGetSample.ts][connectedenvironmentscertificatesgetsample] | Get the specified Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificate_Get.json | -| [connectedEnvironmentsCertificatesListSample.ts][connectedenvironmentscertificateslistsample] | Get the Certificates in a given connected environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json | -| [connectedEnvironmentsCertificatesUpdateSample.ts][connectedenvironmentscertificatesupdatesample] | Patches a certificate. Currently only patching of tags is supported x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificates_Patch.json | -| [connectedEnvironmentsCheckNameAvailabilitySample.ts][connectedenvironmentschecknameavailabilitysample] | Checks if resource connectedEnvironmentName is available. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json | -| [connectedEnvironmentsCreateOrUpdateSample.ts][connectedenvironmentscreateorupdatesample] | Creates or updates an connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_CreateOrUpdate.json | -| [connectedEnvironmentsDaprComponentsCreateOrUpdateSample.ts][connectedenvironmentsdaprcomponentscreateorupdatesample] | Creates or updates a Dapr Component in a connected environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json | -| [connectedEnvironmentsDaprComponentsDeleteSample.ts][connectedenvironmentsdaprcomponentsdeletesample] | Delete a Dapr Component from a connected environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_Delete.json | -| [connectedEnvironmentsDaprComponentsGetSample.ts][connectedenvironmentsdaprcomponentsgetsample] | Get a dapr component. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json | -| [connectedEnvironmentsDaprComponentsListSample.ts][connectedenvironmentsdaprcomponentslistsample] | Get the Dapr Components for a connected environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_List.json | -| [connectedEnvironmentsDaprComponentsListSecretsSample.ts][connectedenvironmentsdaprcomponentslistsecretssample] | List secrets for a dapr component x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json | -| [connectedEnvironmentsDeleteSample.ts][connectedenvironmentsdeletesample] | Delete an connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_Delete.json | -| [connectedEnvironmentsGetSample.ts][connectedenvironmentsgetsample] | Get the properties of an connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_Get.json | -| [connectedEnvironmentsListByResourceGroupSample.ts][connectedenvironmentslistbyresourcegroupsample] | Get all connectedEnvironments in a resource group. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_ListByResourceGroup.json | -| [connectedEnvironmentsListBySubscriptionSample.ts][connectedenvironmentslistbysubscriptionsample] | Get all connectedEnvironments for a subscription. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_ListBySubscription.json | -| [connectedEnvironmentsStoragesCreateOrUpdateSample.ts][connectedenvironmentsstoragescreateorupdatesample] | Create or update storage for a connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json | -| [connectedEnvironmentsStoragesDeleteSample.ts][connectedenvironmentsstoragesdeletesample] | Delete storage for a connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_Delete.json | -| [connectedEnvironmentsStoragesGetSample.ts][connectedenvironmentsstoragesgetsample] | Get storage for a connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_Get.json | -| [connectedEnvironmentsStoragesListSample.ts][connectedenvironmentsstorageslistsample] | Get all storages for a connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_List.json | -| [connectedEnvironmentsUpdateSample.ts][connectedenvironmentsupdatesample] | Patches a Managed Environment. Only patching of tags is supported currently x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_Patch.json | -| [containerAppsAuthConfigsCreateOrUpdateSample.ts][containerappsauthconfigscreateorupdatesample] | Create or update the AuthConfig for a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AuthConfigs_CreateOrUpdate.json | -| [containerAppsAuthConfigsDeleteSample.ts][containerappsauthconfigsdeletesample] | Delete a Container App AuthConfig. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-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-11-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-11-01-preview/examples/AuthConfigs_ListByContainer.json | -| [containerAppsCreateOrUpdateSample.ts][containerappscreateorupdatesample] | Create or update a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_CreateOrUpdate.json | -| [containerAppsDeleteSample.ts][containerappsdeletesample] | Delete a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_Delete.json | -| [containerAppsDiagnosticsGetDetectorSample.ts][containerappsdiagnosticsgetdetectorsample] | Get a diagnostics result of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerAppsDiagnostics_Get.json | -| [containerAppsDiagnosticsGetRevisionSample.ts][containerappsdiagnosticsgetrevisionsample] | Get a revision of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Get.json | -| [containerAppsDiagnosticsGetRootSample.ts][containerappsdiagnosticsgetrootsample] | Get the properties of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_Get.json | -| [containerAppsDiagnosticsListDetectorsSample.ts][containerappsdiagnosticslistdetectorssample] | Get the list of diagnostics for a given Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerAppsDiagnostics_List.json | -| [containerAppsDiagnosticsListRevisionsSample.ts][containerappsdiagnosticslistrevisionssample] | Get the Revisions for a given Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_List.json | -| [containerAppsGetAuthTokenSample.ts][containerappsgetauthtokensample] | Get auth token for a container app x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_GetAuthToken.json | -| [containerAppsGetSample.ts][containerappsgetsample] | Get the properties of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-01-preview/examples/Revisions_Restart.json | -| [containerAppsSourceControlsCreateOrUpdateSample.ts][containerappssourcecontrolscreateorupdatesample] | Create or update the SourceControl for a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/SourceControls_CreateOrUpdate.json | -| [containerAppsSourceControlsDeleteSample.ts][containerappssourcecontrolsdeletesample] | Delete a Container App SourceControl. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-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-11-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-11-01-preview/examples/SourceControls_ListByContainer.json | -| [containerAppsUpdateSample.ts][containerappsupdatesample] | Patches a Container App using JSON Merge Patch x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-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-11-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json | -| [daprComponentsDeleteSample.ts][daprcomponentsdeletesample] | Delete a Dapr Component from a Managed Environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-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-11-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json | -| [daprComponentsListSample.ts][daprcomponentslistsample] | Get the Dapr Components for a managed environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_List.json | -| [daprComponentsListSecretsSample.ts][daprcomponentslistsecretssample] | List secrets for a dapr component x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_ListSecrets.json | -| [jobsCreateOrUpdateSample.ts][jobscreateorupdatesample] | Create or Update a Container Apps Job. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_CreateorUpdate.json | -| [jobsDeleteSample.ts][jobsdeletesample] | Delete a Container Apps Job. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Delete.json | -| [jobsExecutionsListSample.ts][jobsexecutionslistsample] | Get a Container Apps Job's executions x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Executions_Get.json | -| [jobsGetSample.ts][jobsgetsample] | Get the properties of a Container Apps Job. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Get.json | -| [jobsListByResourceGroupSample.ts][jobslistbyresourcegroupsample] | Get the Container Apps Jobs in a given resource group. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Jobs_ListByResourceGroup.json | -| [jobsListBySubscriptionSample.ts][jobslistbysubscriptionsample] | Get the Container Apps Jobs in a given subscription. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Jobs_ListBySubscription.json | -| [jobsListSecretsSample.ts][jobslistsecretssample] | List secrets for a container apps job x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_ListSecrets.json | -| [jobsStartSample.ts][jobsstartsample] | Start a Container Apps Job x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Start.json | -| [jobsStopExecutionSample.ts][jobsstopexecutionsample] | Terminates execution of a running container apps job x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop_Execution.json | -| [jobsStopMultipleExecutionsSample.ts][jobsstopmultipleexecutionssample] | Terminates execution of a running container apps job x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop_Multiple.json | -| [jobsUpdateSample.ts][jobsupdatesample] | Patches a Container Apps Job using JSON Merge Patch x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Patch.json | -| [managedCertificatesCreateOrUpdateSample.ts][managedcertificatescreateorupdatesample] | Create or Update a Managed Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_CreateOrUpdate.json | -| [managedCertificatesDeleteSample.ts][managedcertificatesdeletesample] | Deletes the specified Managed Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_Delete.json | -| [managedCertificatesGetSample.ts][managedcertificatesgetsample] | Get the specified Managed Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_Get.json | -| [managedCertificatesListSample.ts][managedcertificateslistsample] | Get the Managed Certificates in a given managed environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificates_ListByManagedEnvironment.json | -| [managedCertificatesUpdateSample.ts][managedcertificatesupdatesample] | Patches a managed certificate. Oly patching of tags is supported x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificates_Patch.json | -| [managedEnvironmentDiagnosticsGetDetectorSample.ts][managedenvironmentdiagnosticsgetdetectorsample] | Get the diagnostics data for a Managed Environment used to host container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentDiagnostics_Get.json | -| [managedEnvironmentDiagnosticsListDetectorsSample.ts][managedenvironmentdiagnosticslistdetectorssample] | Get the list of diagnostics for a Managed Environment used to host container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentDiagnostics_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-11-01-preview/examples/ManagedEnvironments_CustomInfrastructureResourceGroup_Create.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-11-01-preview/examples/ManagedEnvironments_Delete.json | -| [managedEnvironmentsDiagnosticsGetRootSample.ts][managedenvironmentsdiagnosticsgetrootsample] | Get the properties of a Managed Environment used to host container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_Get.json | -| [managedEnvironmentsGetAuthTokenSample.ts][managedenvironmentsgetauthtokensample] | Checks if resource name is available. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_GetAuthToken.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-11-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-11-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-11-01-preview/examples/ManagedEnvironments_ListBySubscription.json | -| [managedEnvironmentsListWorkloadProfileStatesSample.ts][managedenvironmentslistworkloadprofilestatessample] | Get all workload Profile States for a Managed Environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json | -| [managedEnvironmentsStoragesCreateOrUpdateSample.ts][managedenvironmentsstoragescreateorupdatesample] | Create or update storage for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-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-11-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-11-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-11-01-preview/examples/ManagedEnvironmentsStorages_List.json | -| [managedEnvironmentsUpdateSample.ts][managedenvironmentsupdatesample] | Patches a Managed Environment using JSON Merge Patch x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_Patch.json | -| [namespacesCheckNameAvailabilitySample.ts][namespaceschecknameavailabilitysample] | Checks if resource name is available. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificates_CheckNameAvailability.json | -| [operationsListSample.ts][operationslistsample] | Lists all of the available RP operations. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Operations_List.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -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/availableWorkloadProfilesGetSample.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 APPCONTAINERS_SUBSCRIPTION_ID="" node dist/availableWorkloadProfilesGetSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[availableworkloadprofilesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/availableWorkloadProfilesGetSample.ts -[billingmetersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/billingMetersGetSample.ts -[certificatescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesCreateOrUpdateSample.ts -[certificatesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesDeleteSample.ts -[certificatesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesGetSample.ts -[certificateslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesListSample.ts -[certificatesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesUpdateSample.ts -[connectedenvironmentscertificatescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesCreateOrUpdateSample.ts -[connectedenvironmentscertificatesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesDeleteSample.ts -[connectedenvironmentscertificatesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesGetSample.ts -[connectedenvironmentscertificateslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesListSample.ts -[connectedenvironmentscertificatesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesUpdateSample.ts -[connectedenvironmentschecknameavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCheckNameAvailabilitySample.ts -[connectedenvironmentscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCreateOrUpdateSample.ts -[connectedenvironmentsdaprcomponentscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.ts -[connectedenvironmentsdaprcomponentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsDeleteSample.ts -[connectedenvironmentsdaprcomponentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsGetSample.ts -[connectedenvironmentsdaprcomponentslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsListSample.ts -[connectedenvironmentsdaprcomponentslistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsListSecretsSample.ts -[connectedenvironmentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDeleteSample.ts -[connectedenvironmentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsGetSample.ts -[connectedenvironmentslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsListByResourceGroupSample.ts -[connectedenvironmentslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsListBySubscriptionSample.ts -[connectedenvironmentsstoragescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsStoragesCreateOrUpdateSample.ts -[connectedenvironmentsstoragesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsStoragesDeleteSample.ts -[connectedenvironmentsstoragesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsStoragesGetSample.ts -[connectedenvironmentsstorageslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsStoragesListSample.ts -[connectedenvironmentsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsUpdateSample.ts -[containerappsauthconfigscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsAuthConfigsCreateOrUpdateSample.ts -[containerappsauthconfigsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsAuthConfigsDeleteSample.ts -[containerappsauthconfigsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsAuthConfigsGetSample.ts -[containerappsauthconfigslistbycontainerappsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsAuthConfigsListByContainerAppSample.ts -[containerappscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsCreateOrUpdateSample.ts -[containerappsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDeleteSample.ts -[containerappsdiagnosticsgetdetectorsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsGetDetectorSample.ts -[containerappsdiagnosticsgetrevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsGetRevisionSample.ts -[containerappsdiagnosticsgetrootsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsGetRootSample.ts -[containerappsdiagnosticslistdetectorssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsListDetectorsSample.ts -[containerappsdiagnosticslistrevisionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsListRevisionsSample.ts -[containerappsgetauthtokensample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsGetAuthTokenSample.ts -[containerappsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsGetSample.ts -[containerappslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsListByResourceGroupSample.ts -[containerappslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsListBySubscriptionSample.ts -[containerappslistcustomhostnameanalysissample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsListCustomHostNameAnalysisSample.ts -[containerappslistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsListSecretsSample.ts -[containerappsrevisionreplicasgetreplicasample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionReplicasGetReplicaSample.ts -[containerappsrevisionreplicaslistreplicassample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionReplicasListReplicasSample.ts -[containerappsrevisionsactivaterevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionsActivateRevisionSample.ts -[containerappsrevisionsdeactivaterevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionsDeactivateRevisionSample.ts -[containerappsrevisionsgetrevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionsGetRevisionSample.ts -[containerappsrevisionslistrevisionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionsListRevisionsSample.ts -[containerappsrevisionsrestartrevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionsRestartRevisionSample.ts -[containerappssourcecontrolscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsSourceControlsCreateOrUpdateSample.ts -[containerappssourcecontrolsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsSourceControlsDeleteSample.ts -[containerappssourcecontrolsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsSourceControlsGetSample.ts -[containerappssourcecontrolslistbycontainerappsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsSourceControlsListByContainerAppSample.ts -[containerappsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsUpdateSample.ts -[daprcomponentscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsCreateOrUpdateSample.ts -[daprcomponentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsDeleteSample.ts -[daprcomponentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsGetSample.ts -[daprcomponentslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsListSample.ts -[daprcomponentslistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsListSecretsSample.ts -[jobscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsCreateOrUpdateSample.ts -[jobsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsDeleteSample.ts -[jobsexecutionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsExecutionsListSample.ts -[jobsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsGetSample.ts -[jobslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsListByResourceGroupSample.ts -[jobslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsListBySubscriptionSample.ts -[jobslistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsListSecretsSample.ts -[jobsstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsStartSample.ts -[jobsstopexecutionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsStopExecutionSample.ts -[jobsstopmultipleexecutionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsStopMultipleExecutionsSample.ts -[jobsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsUpdateSample.ts -[managedcertificatescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedCertificatesCreateOrUpdateSample.ts -[managedcertificatesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedCertificatesDeleteSample.ts -[managedcertificatesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedCertificatesGetSample.ts -[managedcertificateslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedCertificatesListSample.ts -[managedcertificatesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedCertificatesUpdateSample.ts -[managedenvironmentdiagnosticsgetdetectorsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentDiagnosticsGetDetectorSample.ts -[managedenvironmentdiagnosticslistdetectorssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentDiagnosticsListDetectorsSample.ts -[managedenvironmentscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsCreateOrUpdateSample.ts -[managedenvironmentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsDeleteSample.ts -[managedenvironmentsdiagnosticsgetrootsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsDiagnosticsGetRootSample.ts -[managedenvironmentsgetauthtokensample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsGetAuthTokenSample.ts -[managedenvironmentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsGetSample.ts -[managedenvironmentslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsListByResourceGroupSample.ts -[managedenvironmentslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsListBySubscriptionSample.ts -[managedenvironmentslistworkloadprofilestatessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsListWorkloadProfileStatesSample.ts -[managedenvironmentsstoragescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsStoragesCreateOrUpdateSample.ts -[managedenvironmentsstoragesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsStoragesDeleteSample.ts -[managedenvironmentsstoragesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsStoragesGetSample.ts -[managedenvironmentsstorageslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsStoragesListSample.ts -[managedenvironmentsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsUpdateSample.ts -[namespaceschecknameavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/namespacesCheckNameAvailabilitySample.ts -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/operationsListSample.ts -[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-appcontainers?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appcontainers/arm-appcontainers/README.md -[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/package.json b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/package.json deleted file mode 100644 index 2d9864e0c891..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "@azure-samples/arm-appcontainers-ts-beta", - "private": true, - "version": "1.0.0", - "description": " client library samples for TypeScript (Beta)", - "engines": { - "node": ">=14.0.0" - }, - "scripts": { - "build": "tsc", - "prebuild": "rimraf dist/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/appcontainers/arm-appcontainers" - }, - "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/appcontainers/arm-appcontainers", - "dependencies": { - "@azure/arm-appcontainers": "next", - "dotenv": "latest", - "@azure/identity": "^2.0.1" - }, - "devDependencies": { - "@types/node": "^14.0.0", - "typescript": "~5.0.0", - "rimraf": "latest" - } -} diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/sample.env b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-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/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/availableWorkloadProfilesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/availableWorkloadProfilesGetSample.ts deleted file mode 100644 index c1b852734e23..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/availableWorkloadProfilesGetSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get all available workload profiles for a location. - * - * @summary Get all available workload profiles for a location. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AvailableWorkloadProfiles_Get.json - */ -async function billingMetersGet() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const location = "East US"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.availableWorkloadProfiles.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - billingMetersGet(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/billingMetersGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/billingMetersGetSample.ts deleted file mode 100644 index 6ef7d5fe2483..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/billingMetersGetSample.ts +++ /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. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get all billingMeters for a location. - * - * @summary Get all billingMeters for a location. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/BillingMeters_Get.json - */ -async function billingMetersGet() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const location = "East US"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.billingMeters.get(location); - console.log(result); -} - -async function main() { - billingMetersGet(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesCreateOrUpdateSample.ts deleted file mode 100644 index 427265a7faf6..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesCreateOrUpdateSample.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/Certificate_CreateOrUpdate.json - */ -async function createOrUpdateCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const certificateEnvelope: Certificate = { - location: "East US", - properties: { - password: "private key password", - value: Buffer.from("Y2VydA==") - } - }; - const options: CertificatesCreateOrUpdateOptionalParams = { - certificateEnvelope - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.createOrUpdate( - resourceGroupName, - environmentName, - certificateName, - options - ); - console.log(result); -} - -async function main() { - createOrUpdateCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesDeleteSample.ts deleted file mode 100644 index 921aea9b75bc..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesDeleteSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/Certificate_Delete.json - */ -async function deleteCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.delete( - resourceGroupName, - environmentName, - certificateName - ); - console.log(result); -} - -async function main() { - deleteCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesGetSample.ts deleted file mode 100644 index 9ea615439f30..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesGetSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/Certificate_Get.json - */ -async function getCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.get( - resourceGroupName, - environmentName, - certificateName - ); - console.log(result); -} - -async function main() { - getCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesListSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesListSample.ts deleted file mode 100644 index ed459b096c87..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesListSample.ts +++ /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. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/Certificates_ListByManagedEnvironment.json - */ -async function listCertificatesByManagedEnvironment() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.certificates.list( - resourceGroupName, - environmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listCertificatesByManagedEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesUpdateSample.ts deleted file mode 100644 index 3256b0faa04a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesUpdateSample.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 { - CertificatePatch, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/Certificates_Patch.json - */ -async function patchCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const certificateName = "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, - environmentName, - certificateName, - certificateEnvelope - ); - console.log(result); -} - -async function main() { - patchCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesCreateOrUpdateSample.ts deleted file mode 100644 index 4e3287d0f52c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesCreateOrUpdateSample.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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, - ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json - */ -async function createOrUpdateCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const certificateEnvelope: Certificate = { - location: "East US", - properties: { - password: "private key password", - value: Buffer.from("Y2VydA==") - } - }; - const options: ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams = { - certificateEnvelope - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsCertificates.createOrUpdate( - resourceGroupName, - connectedEnvironmentName, - certificateName, - options - ); - console.log(result); -} - -async function main() { - createOrUpdateCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesDeleteSample.ts deleted file mode 100644 index ec12520c0494..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesDeleteSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ConnectedEnvironmentsCertificate_Delete.json - */ -async function deleteCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsCertificates.delete( - resourceGroupName, - connectedEnvironmentName, - certificateName - ); - console.log(result); -} - -async function main() { - deleteCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesGetSample.ts deleted file mode 100644 index e1baa23f157d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesGetSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ConnectedEnvironmentsCertificate_Get.json - */ -async function getCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsCertificates.get( - resourceGroupName, - connectedEnvironmentName, - certificateName - ); - console.log(result); -} - -async function main() { - getCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesListSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesListSample.ts deleted file mode 100644 index 9a1ade0f3c50..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesListSample.ts +++ /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. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the Certificates in a given connected environment. - * - * @summary Get the Certificates in a given connected environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json - */ -async function listCertificatesByConnectedEnvironment() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.connectedEnvironmentsCertificates.list( - resourceGroupName, - connectedEnvironmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listCertificatesByConnectedEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesUpdateSample.ts deleted file mode 100644 index 315475d52aaa..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesUpdateSample.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 { - CertificatePatch, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ConnectedEnvironmentsCertificates_Patch.json - */ -async function patchCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const certificateName = "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.connectedEnvironmentsCertificates.update( - resourceGroupName, - connectedEnvironmentName, - certificateName, - certificateEnvelope - ); - console.log(result); -} - -async function main() { - patchCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCheckNameAvailabilitySample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCheckNameAvailabilitySample.ts deleted file mode 100644 index 4e1459b577df..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCheckNameAvailabilitySample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { - CheckNameAvailabilityRequest, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Checks if resource connectedEnvironmentName is available. - * - * @summary Checks if resource connectedEnvironmentName is available. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json - */ -async function certificatesCheckNameAvailability() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const checkNameAvailabilityRequest: CheckNameAvailabilityRequest = { - name: "testcertificatename", - type: "Microsoft.App/connectedEnvironments/certificates" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.checkNameAvailability( - resourceGroupName, - connectedEnvironmentName, - checkNameAvailabilityRequest - ); - console.log(result); -} - -async function main() { - certificatesCheckNameAvailability(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCreateOrUpdateSample.ts deleted file mode 100644 index 414997d18432..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { - ConnectedEnvironment, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates an connectedEnvironment. - * - * @summary Creates or updates an connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_CreateOrUpdate.json - */ -async function createKubeEnvironments() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testenv"; - const environmentEnvelope: ConnectedEnvironment = { - customDomainConfiguration: { - certificatePassword: "private key password", - certificateValue: Buffer.from("Y2VydA=="), - dnsSuffix: "www.my-name.com" - }, - daprAIConnectionString: - "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/", - location: "East US", - staticIp: "1.2.3.4" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.beginCreateOrUpdateAndWait( - resourceGroupName, - connectedEnvironmentName, - environmentEnvelope - ); - console.log(result); -} - -async function main() { - createKubeEnvironments(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.ts deleted file mode 100644 index ed5bcbcf828c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a Dapr Component in a connected environment. - * - * @summary Creates or updates a Dapr Component in a connected environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json - */ -async function createOrUpdateDaprComponent() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const componentName = "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.connectedEnvironmentsDaprComponents.createOrUpdate( - resourceGroupName, - connectedEnvironmentName, - componentName, - daprComponentEnvelope - ); - console.log(result); -} - -async function main() { - createOrUpdateDaprComponent(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsDeleteSample.ts deleted file mode 100644 index 368ecf926c6a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsDeleteSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a Dapr Component from a connected environment. - * - * @summary Delete a Dapr Component from a connected environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_Delete.json - */ -async function deleteDaprComponent() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsDaprComponents.delete( - resourceGroupName, - connectedEnvironmentName, - componentName - ); - console.log(result); -} - -async function main() { - deleteDaprComponent(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsGetSample.ts deleted file mode 100644 index e2786d2c7fa3..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsGetSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json - */ -async function getDaprComponent() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsDaprComponents.get( - resourceGroupName, - connectedEnvironmentName, - componentName - ); - console.log(result); -} - -async function main() { - getDaprComponent(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsListSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsListSample.ts deleted file mode 100644 index 19094d5d885e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsListSample.ts +++ /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. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the Dapr Components for a connected environment. - * - * @summary Get the Dapr Components for a connected environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_List.json - */ -async function listDaprComponents() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.connectedEnvironmentsDaprComponents.list( - resourceGroupName, - connectedEnvironmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listDaprComponents(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsListSecretsSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsListSecretsSample.ts deleted file mode 100644 index 557f3b108cc1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsListSecretsSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List secrets for a dapr component - * - * @summary List secrets for a dapr component - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json - */ -async function listContainerAppsSecrets() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsDaprComponents.listSecrets( - resourceGroupName, - connectedEnvironmentName, - componentName - ); - console.log(result); -} - -async function main() { - listContainerAppsSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDeleteSample.ts deleted file mode 100644 index 26674465f43a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDeleteSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete an connectedEnvironment. - * - * @summary Delete an connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_Delete.json - */ -async function deleteConnectedEnvironmentByConnectedEnvironmentName() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "examplekenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.beginDeleteAndWait( - resourceGroupName, - connectedEnvironmentName - ); - console.log(result); -} - -async function main() { - deleteConnectedEnvironmentByConnectedEnvironmentName(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsGetSample.ts deleted file mode 100644 index d89d060736a1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the properties of an connectedEnvironment. - * - * @summary Get the properties of an connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_Get.json - */ -async function getConnectedEnvironmentByConnectedEnvironmentName() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "examplekenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.get( - resourceGroupName, - connectedEnvironmentName - ); - console.log(result); -} - -async function main() { - getConnectedEnvironmentByConnectedEnvironmentName(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsListByResourceGroupSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsListByResourceGroupSample.ts deleted file mode 100644 index 725f561968c0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get all connectedEnvironments in a resource group. - * - * @summary Get all connectedEnvironments in a resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_ListByResourceGroup.json - */ -async function listEnvironmentsByResourceGroup() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.connectedEnvironments.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listEnvironmentsByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsListBySubscriptionSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsListBySubscriptionSample.ts deleted file mode 100644 index e52528c74c64..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsListBySubscriptionSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get all connectedEnvironments for a subscription. - * - * @summary Get all connectedEnvironments for a subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_ListBySubscription.json - */ -async function listConnectedEnvironmentsBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "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.connectedEnvironments.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listConnectedEnvironmentsBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsStoragesCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsStoragesCreateOrUpdateSample.ts deleted file mode 100644 index 159b0fd37e02..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsStoragesCreateOrUpdateSample.ts +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { - ConnectedEnvironmentStorage, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create or update storage for a connectedEnvironment. - * - * @summary Create or update storage for a connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json - */ -async function createOrUpdateEnvironmentsStorage() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "env"; - const storageName = "jlaw-demo1"; - const storageEnvelope: ConnectedEnvironmentStorage = { - properties: { - azureFile: { - accessMode: "ReadOnly", - accountKey: "key", - accountName: "account1", - shareName: "share1" - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsStorages.createOrUpdate( - resourceGroupName, - connectedEnvironmentName, - storageName, - storageEnvelope - ); - console.log(result); -} - -async function main() { - createOrUpdateEnvironmentsStorage(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsStoragesDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsStoragesDeleteSample.ts deleted file mode 100644 index 119a17a00f5e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsStoragesDeleteSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete storage for a connectedEnvironment. - * - * @summary Delete storage for a connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_Delete.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "env"; - const storageName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsStorages.delete( - resourceGroupName, - connectedEnvironmentName, - storageName - ); - console.log(result); -} - -async function main() { - listEnvironmentsStoragesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsStoragesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsStoragesGetSample.ts deleted file mode 100644 index 069492c1d62d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsStoragesGetSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get storage for a connectedEnvironment. - * - * @summary Get storage for a connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_Get.json - */ -async function getAEnvironmentsStoragePropertiesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "env"; - const storageName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsStorages.get( - resourceGroupName, - connectedEnvironmentName, - storageName - ); - console.log(result); -} - -async function main() { - getAEnvironmentsStoragePropertiesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsStoragesListSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsStoragesListSample.ts deleted file mode 100644 index d26e9c473719..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsStoragesListSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get all storages for a connectedEnvironment. - * - * @summary Get all storages for a connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_List.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "managedEnv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsStorages.list( - resourceGroupName, - connectedEnvironmentName - ); - console.log(result); -} - -async function main() { - listEnvironmentsStoragesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsUpdateSample.ts deleted file mode 100644 index f0cf7d8cc859..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsUpdateSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ConnectedEnvironments_Patch.json - */ -async function patchManagedEnvironment() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.update( - resourceGroupName, - connectedEnvironmentName - ); - console.log(result); -} - -async function main() { - patchManagedEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsAuthConfigsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsAuthConfigsCreateOrUpdateSample.ts deleted file mode 100644 index f743fdf5197b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsAuthConfigsCreateOrUpdateSample.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create or update the AuthConfig for a Container App. - * - * @summary Create or update the AuthConfig for a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AuthConfigs_CreateOrUpdate.json - */ -async function createOrUpdateContainerAppAuthConfig() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const authConfigName = "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, - authConfigName, - authConfigEnvelope - ); - console.log(result); -} - -async function main() { - createOrUpdateContainerAppAuthConfig(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsAuthConfigsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsAuthConfigsDeleteSample.ts deleted file mode 100644 index a9b70f9d41d0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsAuthConfigsDeleteSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a Container App AuthConfig. - * - * @summary Delete a Container App AuthConfig. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AuthConfigs_Delete.json - */ -async function deleteContainerAppAuthConfig() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const authConfigName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.delete( - resourceGroupName, - containerAppName, - authConfigName - ); - console.log(result); -} - -async function main() { - deleteContainerAppAuthConfig(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsAuthConfigsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsAuthConfigsGetSample.ts deleted file mode 100644 index 57ae061a7b34..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsAuthConfigsGetSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/AuthConfigs_Get.json - */ -async function getContainerAppAuthConfig() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const authConfigName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.get( - resourceGroupName, - containerAppName, - authConfigName - ); - console.log(result); -} - -async function main() { - getContainerAppAuthConfig(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsAuthConfigsListByContainerAppSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsAuthConfigsListByContainerAppSample.ts deleted file mode 100644 index 7d0de398ec27..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsAuthConfigsListByContainerAppSample.ts +++ /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. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/AuthConfigs_ListByContainer.json - */ -async function listAuthConfigsByContainerApps() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "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); -} - -async function main() { - listAuthConfigsByContainerApps(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsCreateOrUpdateSample.ts deleted file mode 100644 index 4cbf4f4ae1e8..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsCreateOrUpdateSample.ts +++ /dev/null @@ -1,281 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create or update a Container App. - * - * @summary Create or update a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_CreateOrUpdate.json - */ -async function createOrUpdateContainerApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const containerAppEnvelope: ContainerApp = { - configuration: { - dapr: { - appPort: 3000, - appProtocol: "http", - enableApiLogging: true, - enabled: true, - httpMaxRequestSize: 10, - httpReadBufferSize: 30, - logLevel: "debug" - }, - ingress: { - clientCertificateMode: "accept", - corsPolicy: { - allowCredentials: true, - allowedHeaders: ["HEADER1", "HEADER2"], - allowedMethods: ["GET", "POST"], - allowedOrigins: ["https://a.test.com", "https://b.test.com"], - exposeHeaders: ["HEADER3", "HEADER4"], - maxAge: 1234 - }, - 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, - ipSecurityRestrictions: [ - { - name: "Allow work IP A subnet", - description: - "Allowing all IP's within the subnet below to access containerapp", - action: "Allow", - ipAddressRange: "192.168.1.1/32" - }, - { - name: "Allow work IP B subnet", - description: - "Allowing all IP's within the subnet below to access containerapp", - action: "Allow", - ipAddressRange: "192.168.1.1/8" - } - ], - stickySessions: { affinity: "sticky" }, - targetPort: 3000, - traffic: [ - { - label: "production", - revisionName: "testcontainerApp0-ab1234", - weight: 100 - } - ] - }, - maxInactiveRevisions: 10 - }, - environmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - location: "East US", - 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 - } - ] - } - ], - initContainers: [ - { - name: "testinitcontainerApp0", - args: ["-c", "while true; do echo hello; sleep 10;done"], - command: ["/bin/sh"], - image: "repo/testcontainerApp0:v4", - resources: { cpu: 0.2, memory: "100Mi" } - } - ], - scale: { - maxReplicas: 5, - minReplicas: 1, - rules: [ - { - name: "httpscalingrule", - custom: { type: "http", metadata: { concurrentRequests: "50" } } - } - ] - } - }, - workloadProfileName: "My-GP-01" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginCreateOrUpdateAndWait( - resourceGroupName, - containerAppName, - containerAppEnvelope - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a Container App. - * - * @summary Create or update a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_ManagedBy_CreateOrUpdate.json - */ -async function createOrUpdateManagedByApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerAppManagedBy"; - const containerAppEnvelope: ContainerApp = { - configuration: { - ingress: { - exposedPort: 4000, - external: true, - targetPort: 3000, - traffic: [ - { revisionName: "testcontainerAppManagedBy-ab1234", weight: 100 } - ], - transport: "tcp" - } - }, - environmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - location: "East US", - managedBy: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.AppPlatform/Spring/springapp", - template: { - containers: [ - { - name: "testcontainerAppManagedBy", - image: "repo/testcontainerAppManagedBy:v1", - probes: [ - { - type: "Liveness", - initialDelaySeconds: 3, - periodSeconds: 3, - tcpSocket: { port: 8080 } - } - ] - } - ], - scale: { - maxReplicas: 5, - minReplicas: 1, - rules: [ - { - name: "tcpscalingrule", - tcp: { metadata: { concurrentConnections: "50" } } - } - ] - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginCreateOrUpdateAndWait( - resourceGroupName, - containerAppName, - containerAppEnvelope - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a Container App. - * - * @summary Create or update a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_TcpApp_CreateOrUpdate.json - */ -async function createOrUpdateTcpApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerAppTcp"; - const containerAppEnvelope: ContainerApp = { - configuration: { - ingress: { - exposedPort: 4000, - external: true, - targetPort: 3000, - traffic: [{ revisionName: "testcontainerAppTcp-ab1234", weight: 100 }], - transport: "tcp" - } - }, - environmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - location: "East US", - template: { - containers: [ - { - name: "testcontainerAppTcp", - image: "repo/testcontainerAppTcp:v1", - probes: [ - { - type: "Liveness", - initialDelaySeconds: 3, - periodSeconds: 3, - tcpSocket: { port: 8080 } - } - ] - } - ], - scale: { - maxReplicas: 5, - minReplicas: 1, - rules: [ - { - name: "tcpscalingrule", - tcp: { metadata: { concurrentConnections: "50" } } - } - ] - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginCreateOrUpdateAndWait( - resourceGroupName, - containerAppName, - containerAppEnvelope - ); - console.log(result); -} - -async function main() { - createOrUpdateContainerApp(); - createOrUpdateManagedByApp(); - createOrUpdateTcpApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDeleteSample.ts deleted file mode 100644 index 7086851d39ec..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDeleteSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a Container App. - * - * @summary Delete a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_Delete.json - */ -async function deleteContainerApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testWorkerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginDeleteAndWait( - resourceGroupName, - containerAppName - ); - console.log(result); -} - -async function main() { - deleteContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsGetDetectorSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsGetDetectorSample.ts deleted file mode 100644 index f516f414c4ae..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsGetDetectorSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a diagnostics result of a Container App. - * - * @summary Get a diagnostics result of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerAppsDiagnostics_Get.json - */ -async function getContainerAppDiagnosticsInfo() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "mikono-workerapp-test-rg"; - const containerAppName = "mikono-capp-stage1"; - const detectorName = "cappcontainerappnetworkIO"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsDiagnostics.getDetector( - resourceGroupName, - containerAppName, - detectorName - ); - console.log(result); -} - -async function main() { - getContainerAppDiagnosticsInfo(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsGetRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsGetRevisionSample.ts deleted file mode 100644 index 6ca77f4c5ed3..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsGetRevisionSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/Revisions_Get.json - */ -async function getContainerAppRevision() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsDiagnostics.getRevision( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -async function main() { - getContainerAppRevision(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsGetRootSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsGetRootSample.ts deleted file mode 100644 index c2f517b46b68..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsGetRootSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ContainerApps_Get.json - */ -async function getContainerApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsDiagnostics.getRoot( - resourceGroupName, - containerAppName - ); - console.log(result); -} - -async function main() { - getContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsListDetectorsSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsListDetectorsSample.ts deleted file mode 100644 index ef8e3f8befcf..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsListDetectorsSample.ts +++ /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. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the list of diagnostics for a given Container App. - * - * @summary Get the list of diagnostics for a given Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerAppsDiagnostics_List.json - */ -async function getTheListOfAvailableDiagnosticsForAGivenContainerApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "mikono-workerapp-test-rg"; - const containerAppName = "mikono-capp-stage1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsDiagnostics.listDetectors( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getTheListOfAvailableDiagnosticsForAGivenContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsListRevisionsSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsListRevisionsSample.ts deleted file mode 100644 index fe96c4e59354..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsListRevisionsSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/Revisions_List.json - */ -async function listContainerAppRevisions() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsDiagnostics.listRevisions( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listContainerAppRevisions(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsGetAuthTokenSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsGetAuthTokenSample.ts deleted file mode 100644 index 17bf7b42e400..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsGetAuthTokenSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get auth token for a container app - * - * @summary Get auth token for a container app - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_GetAuthToken.json - */ -async function getContainerAppAuthToken() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.getAuthToken( - resourceGroupName, - containerAppName - ); - console.log(result); -} - -async function main() { - getContainerAppAuthToken(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsGetSample.ts deleted file mode 100644 index a80cebb595e1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsGetSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ContainerApps_Get.json - */ -async function getContainerApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.get( - resourceGroupName, - containerAppName - ); - console.log(result); -} - -async function main() { - getContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsListByResourceGroupSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsListByResourceGroupSample.ts deleted file mode 100644 index 6be535aba06b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsListByResourceGroupSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ContainerApps_ListByResourceGroup.json - */ -async function listContainerAppsByResourceGroup() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "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); -} - -async function main() { - listContainerAppsByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsListBySubscriptionSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsListBySubscriptionSample.ts deleted file mode 100644 index 0cd8131f30b2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsListBySubscriptionSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ContainerApps_ListBySubscription.json - */ -async function listContainerAppsBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "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); -} - -async function main() { - listContainerAppsBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsListCustomHostNameAnalysisSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsListCustomHostNameAnalysisSample.ts deleted file mode 100644 index e460aca3b631..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsListCustomHostNameAnalysisSample.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 { - ContainerAppsListCustomHostNameAnalysisOptionalParams, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json - */ -async function analyzeCustomHostname() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "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); -} - -async function main() { - analyzeCustomHostname(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsListSecretsSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsListSecretsSample.ts deleted file mode 100644 index 856e856c4d63..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsListSecretsSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ContainerApps_ListSecrets.json - */ -async function listContainerAppsSecrets() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.listSecrets( - resourceGroupName, - containerAppName - ); - console.log(result); -} - -async function main() { - listContainerAppsSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionReplicasGetReplicaSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionReplicasGetReplicaSample.ts deleted file mode 100644 index 79112d9282a9..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionReplicasGetReplicaSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/Replicas_Get.json - */ -async function getContainerAppRevisionReplica() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "myapp"; - const revisionName = "myapp--0wlqy09"; - const replicaName = "myapp--0wlqy09-5d9774cff-5wnd8"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisionReplicas.getReplica( - resourceGroupName, - containerAppName, - revisionName, - replicaName - ); - console.log(result); -} - -async function main() { - getContainerAppRevisionReplica(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionReplicasListReplicasSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionReplicasListReplicasSample.ts deleted file mode 100644 index cfd0c66be596..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionReplicasListReplicasSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/Replicas_List.json - */ -async function listContainerAppReplicas() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "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); -} - -async function main() { - listContainerAppReplicas(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionsActivateRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionsActivateRevisionSample.ts deleted file mode 100644 index 0648b97690da..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionsActivateRevisionSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/Revisions_Activate.json - */ -async function activateContainerAppRevision() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.activateRevision( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -async function main() { - activateContainerAppRevision(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionsDeactivateRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionsDeactivateRevisionSample.ts deleted file mode 100644 index 7b01102d463c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionsDeactivateRevisionSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/Revisions_Deactivate.json - */ -async function deactivateContainerAppRevision() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.deactivateRevision( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -async function main() { - deactivateContainerAppRevision(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionsGetRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionsGetRevisionSample.ts deleted file mode 100644 index 573af0e63fe9..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionsGetRevisionSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/Revisions_Get.json - */ -async function getContainerAppRevision() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.getRevision( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -async function main() { - getContainerAppRevision(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionsListRevisionsSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionsListRevisionsSample.ts deleted file mode 100644 index 23c0160be4ec..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionsListRevisionsSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/Revisions_List.json - */ -async function listContainerAppRevisions() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "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); -} - -async function main() { - listContainerAppRevisions(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionsRestartRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionsRestartRevisionSample.ts deleted file mode 100644 index 885c3cb1ed9e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionsRestartRevisionSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/Revisions_Restart.json - */ -async function restartContainerAppRevision() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testStaticSite0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.restartRevision( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -async function main() { - restartContainerAppRevision(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsSourceControlsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsSourceControlsCreateOrUpdateSample.ts deleted file mode 100644 index 2b38efb5b1b4..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsSourceControlsCreateOrUpdateSample.ts +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create or update the SourceControl for a Container App. - * - * @summary Create or update the SourceControl for a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/SourceControls_CreateOrUpdate.json - */ -async function createOrUpdateContainerAppSourceControl() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const sourceControlName = "current"; - const sourceControlEnvelope: SourceControl = { - branch: "master", - githubActionConfiguration: { - azureCredentials: { - clientId: "", - clientSecret: "", - tenantId: "" - }, - contextPath: "./", - image: "image/tag", - 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, - sourceControlName, - sourceControlEnvelope - ); - console.log(result); -} - -async function main() { - createOrUpdateContainerAppSourceControl(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsSourceControlsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsSourceControlsDeleteSample.ts deleted file mode 100644 index fb82577bcc18..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsSourceControlsDeleteSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a Container App SourceControl. - * - * @summary Delete a Container App SourceControl. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/SourceControls_Delete.json - */ -async function deleteContainerAppSourceControl() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const sourceControlName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.beginDeleteAndWait( - resourceGroupName, - containerAppName, - sourceControlName - ); - console.log(result); -} - -async function main() { - deleteContainerAppSourceControl(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsSourceControlsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsSourceControlsGetSample.ts deleted file mode 100644 index a92818f309c6..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsSourceControlsGetSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/SourceControls_Get.json - */ -async function getContainerAppSourceControl() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const sourceControlName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.get( - resourceGroupName, - containerAppName, - sourceControlName - ); - console.log(result); -} - -async function main() { - getContainerAppSourceControl(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsSourceControlsListByContainerAppSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsSourceControlsListByContainerAppSample.ts deleted file mode 100644 index d0c34cdbbe13..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsSourceControlsListByContainerAppSample.ts +++ /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. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/SourceControls_ListByContainer.json - */ -async function listAppSourceControls() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "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); -} - -async function main() { - listAppSourceControls(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsUpdateSample.ts deleted file mode 100644 index 76c5f1b085b0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsUpdateSample.ts +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patches a Container App using JSON Merge Patch - * - * @summary Patches a Container App using JSON Merge Patch - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_Patch.json - */ -async function patchContainerApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const containerAppEnvelope: ContainerApp = { - configuration: { - dapr: { - appPort: 3000, - appProtocol: "http", - enableApiLogging: true, - enabled: true, - httpMaxRequestSize: 10, - httpReadBufferSize: 30, - logLevel: "debug" - }, - 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, - ipSecurityRestrictions: [ - { - name: "Allow work IP A subnet", - description: - "Allowing all IP's within the subnet below to access containerapp", - action: "Allow", - ipAddressRange: "192.168.1.1/32" - }, - { - name: "Allow work IP B subnet", - description: - "Allowing all IP's within the subnet below to access containerapp", - action: "Allow", - ipAddressRange: "192.168.1.1/8" - } - ], - stickySessions: { affinity: "sticky" }, - targetPort: 3000, - traffic: [ - { - label: "production", - revisionName: "testcontainerApp0-ab1234", - weight: 100 - } - ] - }, - maxInactiveRevisions: 10 - }, - location: "East US", - tags: { tag1: "value1", tag2: "value2" }, - 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 - } - ] - } - ], - initContainers: [ - { - name: "testinitcontainerApp0", - image: "repo/testcontainerApp0:v4", - resources: { cpu: 0.2, memory: "100Mi" } - } - ], - 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.beginUpdateAndWait( - resourceGroupName, - containerAppName, - containerAppEnvelope - ); - console.log(result); -} - -async function main() { - patchContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsCreateOrUpdateSample.ts deleted file mode 100644 index f6098068c3f5..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json - */ -async function createOrUpdateDaprComponentWithSecretStoreComponent() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "myenvironment"; - const componentName = "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"], - secretStoreComponent: "my-secret-store", - version: "v1" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.createOrUpdate( - resourceGroupName, - environmentName, - componentName, - daprComponentEnvelope - ); - console.log(result); -} - -/** - * 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-11-01-preview/examples/DaprComponents_CreateOrUpdate_Secrets.json - */ -async function createOrUpdateDaprComponentWithSecrets() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "myenvironment"; - const componentName = "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, - componentName, - daprComponentEnvelope - ); - console.log(result); -} - -async function main() { - createOrUpdateDaprComponentWithSecretStoreComponent(); - createOrUpdateDaprComponentWithSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsDeleteSample.ts deleted file mode 100644 index 77ff870d85c1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsDeleteSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/DaprComponents_Delete.json - */ -async function deleteDaprComponent() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.delete( - resourceGroupName, - environmentName, - componentName - ); - console.log(result); -} - -async function main() { - deleteDaprComponent(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsGetSample.ts deleted file mode 100644 index 2230288a6fe5..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsGetSample.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json - */ -async function getDaprComponentWithSecretStoreComponent() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.get( - resourceGroupName, - environmentName, - componentName - ); - console.log(result); -} - -/** - * 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-11-01-preview/examples/DaprComponents_Get_Secrets.json - */ -async function getDaprComponentWithSecrets() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.get( - resourceGroupName, - environmentName, - componentName - ); - console.log(result); -} - -async function main() { - getDaprComponentWithSecretStoreComponent(); - getDaprComponentWithSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsListSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsListSample.ts deleted file mode 100644 index 2bbd0b4acca9..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsListSample.ts +++ /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. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/DaprComponents_List.json - */ -async function listDaprComponents() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "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); -} - -async function main() { - listDaprComponents(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsListSecretsSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsListSecretsSample.ts deleted file mode 100644 index 6c18584651a2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsListSecretsSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List secrets for a dapr component - * - * @summary List secrets for a dapr component - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_ListSecrets.json - */ -async function listContainerAppsSecrets() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.listSecrets( - resourceGroupName, - environmentName, - componentName - ); - console.log(result); -} - -async function main() { - listContainerAppsSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsCreateOrUpdateSample.ts deleted file mode 100644 index 193b245ca8bc..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsCreateOrUpdateSample.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { Job, ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create or Update a Container Apps Job. - * - * @summary Create or Update a Container Apps Job. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_CreateorUpdate.json - */ -async function createOrUpdateContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerAppsJob0"; - const jobEnvelope: Job = { - configuration: { - manualTriggerConfig: { parallelism: 4, replicaCompletionCount: 1 }, - replicaRetryLimit: 10, - replicaTimeout: 10, - triggerType: "Manual" - }, - environmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - location: "East US", - template: { - containers: [ - { - name: "testcontainerAppsJob0", - image: "repo/testcontainerAppsJob0:v1", - probes: [ - { - type: "Liveness", - httpGet: { - path: "/health", - httpHeaders: [{ name: "Custom-Header", value: "Awesome" }], - port: 8080 - }, - initialDelaySeconds: 5, - periodSeconds: 3 - } - ] - } - ], - initContainers: [ - { - name: "testinitcontainerAppsJob0", - args: ["-c", "while true; do echo hello; sleep 10;done"], - command: ["/bin/sh"], - image: "repo/testcontainerAppsJob0:v4", - resources: { cpu: 0.2, memory: "100Mi" } - } - ] - } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginCreateOrUpdateAndWait( - resourceGroupName, - jobName, - jobEnvelope - ); - console.log(result); -} - -async function main() { - createOrUpdateContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsDeleteSample.ts deleted file mode 100644 index 4c6b66a98b80..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsDeleteSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a Container Apps Job. - * - * @summary Delete a Container Apps Job. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Delete.json - */ -async function deleteContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testWorkerContainerAppsJob0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginDeleteAndWait( - resourceGroupName, - jobName - ); - console.log(result); -} - -async function main() { - deleteContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsExecutionsListSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsExecutionsListSample.ts deleted file mode 100644 index 9c7d47be3834..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsExecutionsListSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a Container Apps Job's executions - * - * @summary Get a Container Apps Job's executions - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Executions_Get.json - */ -async function getAContainerAppsJobExecutions() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerAppsJob0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.jobsExecutions.list( - resourceGroupName, - jobName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getAContainerAppsJobExecutions(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsGetSample.ts deleted file mode 100644 index 163f63df34b9..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsGetSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the properties of a Container Apps Job. - * - * @summary Get the properties of a Container Apps Job. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Get.json - */ -async function getContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerAppsJob0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.get(resourceGroupName, jobName); - console.log(result); -} - -async function main() { - getContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsListByResourceGroupSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsListByResourceGroupSample.ts deleted file mode 100644 index e8b8d847fad2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsListByResourceGroupSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the Container Apps Jobs in a given resource group. - * - * @summary Get the Container Apps Jobs in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Jobs_ListByResourceGroup.json - */ -async function listContainerAppsJobsByResourceGroup() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.jobs.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listContainerAppsJobsByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsListBySubscriptionSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsListBySubscriptionSample.ts deleted file mode 100644 index 73cd0c684cd6..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsListBySubscriptionSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the Container Apps Jobs in a given subscription. - * - * @summary Get the Container Apps Jobs in a given subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Jobs_ListBySubscription.json - */ -async function listContainerAppsJobsBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "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.jobs.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listContainerAppsJobsBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsListSecretsSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsListSecretsSample.ts deleted file mode 100644 index 4cd509568b2d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsListSecretsSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List secrets for a container apps job - * - * @summary List secrets for a container apps job - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_ListSecrets.json - */ -async function listContainerAppsJobSecrets() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerAppsJob0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.listSecrets(resourceGroupName, jobName); - console.log(result); -} - -async function main() { - listContainerAppsJobSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsStartSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsStartSample.ts deleted file mode 100644 index 03eeadfdd2da..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsStartSample.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { - JobExecutionTemplate, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Start a Container Apps Job - * - * @summary Start a Container Apps Job - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Start.json - */ -async function runAContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerAppsJob0"; - const template: JobExecutionTemplate = { - containers: [ - { - name: "testcontainerAppsJob0", - image: "repo/testcontainerAppsJob0:v4", - resources: { cpu: 0.2, memory: "100Mi" } - } - ], - initContainers: [ - { - name: "testinitcontainerAppsJob0", - args: ["-c", "while true; do echo hello; sleep 10;done"], - command: ["/bin/sh"], - image: "repo/testcontainerAppsJob0:v4", - resources: { cpu: 0.2, memory: "100Mi" } - } - ] - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginStartAndWait( - resourceGroupName, - jobName, - template - ); - console.log(result); -} - -async function main() { - runAContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsStopExecutionSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsStopExecutionSample.ts deleted file mode 100644 index 2b50617de174..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsStopExecutionSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Terminates execution of a running container apps job - * - * @summary Terminates execution of a running container apps job - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop_Execution.json - */ -async function terminateAContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerAppsJob0"; - const jobExecutionName = "jobExecution1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginStopExecutionAndWait( - resourceGroupName, - jobName, - jobExecutionName - ); - console.log(result); -} - -async function main() { - terminateAContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsStopMultipleExecutionsSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsStopMultipleExecutionsSample.ts deleted file mode 100644 index 3b18792ab00f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsStopMultipleExecutionsSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { - JobExecutionNamesCollection, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Terminates execution of a running container apps job - * - * @summary Terminates execution of a running container apps job - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop_Multiple.json - */ -async function terminateMultipleContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerAppsJob0"; - const jobExecutionName: JobExecutionNamesCollection = { - value: [ - { name: "jobExecution-27944453" }, - { name: "jobExecution-27944452" }, - { name: "jobExecution-27944451" } - ] - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginStopMultipleExecutionsAndWait( - resourceGroupName, - jobName, - jobExecutionName - ); - console.log(result); -} - -async function main() { - terminateMultipleContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsUpdateSample.ts deleted file mode 100644 index 4b4439363ea3..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/jobsUpdateSample.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { - JobPatchProperties, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patches a Container Apps Job using JSON Merge Patch - * - * @summary Patches a Container Apps Job using JSON Merge Patch - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Patch.json - */ -async function patchContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerAppsJob0"; - const jobEnvelope: JobPatchProperties = { - properties: { - configuration: { - manualTriggerConfig: { parallelism: 4, replicaCompletionCount: 1 }, - replicaRetryLimit: 10, - replicaTimeout: 10, - triggerType: "Manual" - }, - template: { - containers: [ - { - name: "testcontainerAppsJob0", - image: "repo/testcontainerAppsJob0:v1", - probes: [ - { - type: "Liveness", - httpGet: { - path: "/health", - httpHeaders: [{ name: "Custom-Header", value: "Awesome" }], - port: 8080 - }, - initialDelaySeconds: 3, - periodSeconds: 3 - } - ] - } - ], - initContainers: [ - { - name: "testinitcontainerAppsJob0", - args: ["-c", "while true; do echo hello; sleep 10;done"], - command: ["/bin/sh"], - image: "repo/testcontainerAppsJob0:v4", - resources: { cpu: 0.2, memory: "100Mi" } - } - ] - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginUpdateAndWait( - resourceGroupName, - jobName, - jobEnvelope - ); - console.log(result); -} - -async function main() { - patchContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedCertificatesCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedCertificatesCreateOrUpdateSample.ts deleted file mode 100644 index 81506f3dd869..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedCertificatesCreateOrUpdateSample.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { - ManagedCertificate, - ManagedCertificatesCreateOrUpdateOptionalParams, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create or Update a Managed Certificate. - * - * @summary Create or Update a Managed Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_CreateOrUpdate.json - */ -async function createOrUpdateCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const managedCertificateName = "certificate-firendly-name"; - const managedCertificateEnvelope: ManagedCertificate = { - location: "East US", - properties: { - domainControlValidation: "CNAME", - subjectName: "my-subject-name.company.country.net" - } - }; - const options: ManagedCertificatesCreateOrUpdateOptionalParams = { - managedCertificateEnvelope - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedCertificates.beginCreateOrUpdateAndWait( - resourceGroupName, - environmentName, - managedCertificateName, - options - ); - console.log(result); -} - -async function main() { - createOrUpdateCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedCertificatesDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedCertificatesDeleteSample.ts deleted file mode 100644 index 5c1fdb327d67..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedCertificatesDeleteSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified Managed Certificate. - * - * @summary Deletes the specified Managed Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_Delete.json - */ -async function deleteCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const managedCertificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedCertificates.delete( - resourceGroupName, - environmentName, - managedCertificateName - ); - console.log(result); -} - -async function main() { - deleteCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedCertificatesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedCertificatesGetSample.ts deleted file mode 100644 index d0a37a92fb8e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedCertificatesGetSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the specified Managed Certificate. - * - * @summary Get the specified Managed Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_Get.json - */ -async function getCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const managedCertificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedCertificates.get( - resourceGroupName, - environmentName, - managedCertificateName - ); - console.log(result); -} - -async function main() { - getCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedCertificatesListSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedCertificatesListSample.ts deleted file mode 100644 index 25db64d33fe2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedCertificatesListSample.ts +++ /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. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the Managed Certificates in a given managed environment. - * - * @summary Get the Managed Certificates in a given managed environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificates_ListByManagedEnvironment.json - */ -async function listManagedCertificatesByManagedEnvironment() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedCertificates.list( - resourceGroupName, - environmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listManagedCertificatesByManagedEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedCertificatesUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedCertificatesUpdateSample.ts deleted file mode 100644 index 1c19bfb5bf21..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedCertificatesUpdateSample.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 { - ManagedCertificatePatch, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patches a managed certificate. Oly patching of tags is supported - * - * @summary Patches a managed certificate. Oly patching of tags is supported - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificates_Patch.json - */ -async function patchManagedCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const managedCertificateName = "certificate-firendly-name"; - const managedCertificateEnvelope: ManagedCertificatePatch = { - tags: { tag1: "value1", tag2: "value2" } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedCertificates.update( - resourceGroupName, - environmentName, - managedCertificateName, - managedCertificateEnvelope - ); - console.log(result); -} - -async function main() { - patchManagedCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentDiagnosticsGetDetectorSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentDiagnosticsGetDetectorSample.ts deleted file mode 100644 index b48e57d93bf7..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentDiagnosticsGetDetectorSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the diagnostics data for a Managed Environment used to host container apps. - * - * @summary Get the diagnostics data for a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentDiagnostics_Get.json - */ -async function getDiagnosticDataForAManagedEnvironments() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "mikono-workerapp-test-rg"; - const environmentName = "mikonokubeenv"; - const detectorName = "ManagedEnvAvailabilityMetrics"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentDiagnostics.getDetector( - resourceGroupName, - environmentName, - detectorName - ); - console.log(result); -} - -async function main() { - getDiagnosticDataForAManagedEnvironments(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentDiagnosticsListDetectorsSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentDiagnosticsListDetectorsSample.ts deleted file mode 100644 index 71759dc309a0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentDiagnosticsListDetectorsSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the list of diagnostics for a Managed Environment used to host container apps. - * - * @summary Get the list of diagnostics for a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentDiagnostics_List.json - */ -async function getTheListOfAvailableDiagnosticDataForAManagedEnvironments() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "mikono-workerapp-test-rg"; - const environmentName = "mikonokubeenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentDiagnostics.listDetectors( - resourceGroupName, - environmentName - ); - console.log(result); -} - -async function main() { - getTheListOfAvailableDiagnosticDataForAManagedEnvironments(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsCreateOrUpdateSample.ts deleted file mode 100644 index 6cbbd3844005..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ManagedEnvironments_CustomInfrastructureResourceGroup_Create.json - */ -async function createEnvironmentWithCustomInfrastructureResourceGroup() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const environmentEnvelope: ManagedEnvironment = { - appLogsConfiguration: { - logAnalyticsConfiguration: { customerId: "string", sharedKey: "string" } - }, - customDomainConfiguration: { - certificatePassword: "1234", - certificateValue: Buffer.from("Y2VydA=="), - dnsSuffix: "www.my-name.com" - }, - daprAIConnectionString: - "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/", - infrastructureResourceGroup: "myInfrastructureRgName", - location: "East US", - vnetConfiguration: { - infrastructureSubnetId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/RGName/providers/Microsoft.Network/virtualNetworks/VNetName/subnets/subnetName1" - }, - workloadProfiles: [ - { - name: "My-GP-01", - maximumCount: 12, - minimumCount: 3, - workloadProfileType: "GeneralPurpose" - }, - { - name: "My-MO-01", - maximumCount: 6, - minimumCount: 3, - workloadProfileType: "MemoryOptimized" - }, - { - name: "My-CO-01", - maximumCount: 6, - minimumCount: 3, - workloadProfileType: "ComputeOptimized" - }, - { name: "My-consumption-01", workloadProfileType: "Consumption" } - ], - zoneRedundant: true - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginCreateOrUpdateAndWait( - resourceGroupName, - environmentName, - environmentEnvelope - ); - console.log(result); -} - -/** - * 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-11-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json - */ -async function createEnvironments() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const environmentEnvelope: ManagedEnvironment = { - appLogsConfiguration: { - logAnalyticsConfiguration: { customerId: "string", sharedKey: "string" } - }, - customDomainConfiguration: { - certificatePassword: "1234", - certificateValue: Buffer.from("Y2VydA=="), - dnsSuffix: "www.my-name.com" - }, - daprAIConnectionString: - "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/", - location: "East US", - vnetConfiguration: { - infrastructureSubnetId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/RGName/providers/Microsoft.Network/virtualNetworks/VNetName/subnets/subnetName1" - }, - workloadProfiles: [ - { - name: "My-GP-01", - maximumCount: 12, - minimumCount: 3, - workloadProfileType: "GeneralPurpose" - }, - { - name: "My-MO-01", - maximumCount: 6, - minimumCount: 3, - workloadProfileType: "MemoryOptimized" - }, - { - name: "My-CO-01", - maximumCount: 6, - minimumCount: 3, - workloadProfileType: "ComputeOptimized" - }, - { name: "My-consumption-01", workloadProfileType: "Consumption" } - ], - zoneRedundant: true - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginCreateOrUpdateAndWait( - resourceGroupName, - environmentName, - environmentEnvelope - ); - console.log(result); -} - -async function main() { - createEnvironmentWithCustomInfrastructureResourceGroup(); - createEnvironments(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsDeleteSample.ts deleted file mode 100644 index 91baf59ae190..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsDeleteSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ManagedEnvironments_Delete.json - */ -async function deleteEnvironmentByName() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "examplekenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginDeleteAndWait( - resourceGroupName, - environmentName - ); - console.log(result); -} - -async function main() { - deleteEnvironmentByName(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsDiagnosticsGetRootSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsDiagnosticsGetRootSample.ts deleted file mode 100644 index 19efcb9871ea..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsDiagnosticsGetRootSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ManagedEnvironments_Get.json - */ -async function getEnvironmentsByName() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsDiagnostics.getRoot( - resourceGroupName, - environmentName - ); - console.log(result); -} - -async function main() { - getEnvironmentsByName(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsGetAuthTokenSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsGetAuthTokenSample.ts deleted file mode 100644 index 66a84b6d8f55..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsGetAuthTokenSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Checks if resource name is available. - * - * @summary Checks if resource name is available. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_GetAuthToken.json - */ -async function getManagedEnvironmentAuthToken() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const environmentName = "testenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.getAuthToken( - resourceGroupName, - environmentName - ); - console.log(result); -} - -async function main() { - getManagedEnvironmentAuthToken(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsGetSample.ts deleted file mode 100644 index 335952fd4a20..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ManagedEnvironments_Get.json - */ -async function getEnvironmentsByName() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.get( - resourceGroupName, - environmentName - ); - console.log(result); -} - -async function main() { - getEnvironmentsByName(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsListByResourceGroupSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsListByResourceGroupSample.ts deleted file mode 100644 index 752b77faf978..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json - */ -async function listEnvironmentsByResourceGroup() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "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); -} - -async function main() { - listEnvironmentsByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsListBySubscriptionSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsListBySubscriptionSample.ts deleted file mode 100644 index b99bc16e23c0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsListBySubscriptionSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ManagedEnvironments_ListBySubscription.json - */ -async function listEnvironmentsBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "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); -} - -async function main() { - listEnvironmentsBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsListWorkloadProfileStatesSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsListWorkloadProfileStatesSample.ts deleted file mode 100644 index 25078e9fd7be..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsListWorkloadProfileStatesSample.ts +++ /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. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get all workload Profile States for a Managed Environment. - * - * @summary Get all workload Profile States for a Managed Environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json - */ -async function listEnvironmentsBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listWorkloadProfileStates( - resourceGroupName, - environmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listEnvironmentsBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsStoragesCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsStoragesCreateOrUpdateSample.ts deleted file mode 100644 index 64d6d9cd868b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsStoragesCreateOrUpdateSample.ts +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json - */ -async function createOrUpdateEnvironmentsStorage() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "managedEnv"; - const storageName = "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, - environmentName, - storageName, - storageEnvelope - ); - console.log(result); -} - -async function main() { - createOrUpdateEnvironmentsStorage(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsStoragesDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsStoragesDeleteSample.ts deleted file mode 100644 index 36b14ca59574..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsStoragesDeleteSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ManagedEnvironmentsStorages_Delete.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "managedEnv"; - const storageName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.delete( - resourceGroupName, - environmentName, - storageName - ); - console.log(result); -} - -async function main() { - listEnvironmentsStoragesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsStoragesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsStoragesGetSample.ts deleted file mode 100644 index f12af5ad99b2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsStoragesGetSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ManagedEnvironmentsStorages_Get.json - */ -async function getAEnvironmentsStoragePropertiesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "managedEnv"; - const storageName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.get( - resourceGroupName, - environmentName, - storageName - ); - console.log(result); -} - -async function main() { - getAEnvironmentsStoragePropertiesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsStoragesListSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsStoragesListSample.ts deleted file mode 100644 index 746076000ec1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsStoragesListSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/ManagedEnvironmentsStorages_List.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "managedEnv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.list( - resourceGroupName, - environmentName - ); - console.log(result); -} - -async function main() { - listEnvironmentsStoragesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsUpdateSample.ts deleted file mode 100644 index 3ebafa62a0af..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsUpdateSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patches a Managed Environment using JSON Merge Patch - * - * @summary Patches a Managed Environment using JSON Merge Patch - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_Patch.json - */ -async function patchManagedEnvironment() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const environmentEnvelope: ManagedEnvironment = { - location: "East US", - tags: { tag1: "value1", tag2: "value2" } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginUpdateAndWait( - resourceGroupName, - environmentName, - environmentEnvelope - ); - console.log(result); -} - -async function main() { - patchManagedEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/namespacesCheckNameAvailabilitySample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/namespacesCheckNameAvailabilitySample.ts deleted file mode 100644 index 4e397a441bd3..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/namespacesCheckNameAvailabilitySample.ts +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { - CheckNameAvailabilityRequest, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Checks if resource name is available. - * - * @summary Checks if resource name is available. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificates_CheckNameAvailability.json - */ -async function certificatesCheckNameAvailability() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const checkNameAvailabilityRequest: CheckNameAvailabilityRequest = { - name: "testcertificatename", - type: "Microsoft.App/managedEnvironments/certificates" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.namespaces.checkNameAvailability( - resourceGroupName, - environmentName, - checkNameAvailabilityRequest - ); - console.log(result); -} - -/** - * This sample demonstrates how to Checks if resource name is available. - * - * @summary Checks if resource name is available. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_CheckNameAvailability.json - */ -async function containerAppsCheckNameAvailability() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const checkNameAvailabilityRequest: CheckNameAvailabilityRequest = { - name: "testcappname", - type: "Microsoft.App/containerApps" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.namespaces.checkNameAvailability( - resourceGroupName, - environmentName, - checkNameAvailabilityRequest - ); - console.log(result); -} - -async function main() { - certificatesCheckNameAvailability(); - containerAppsCheckNameAvailability(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/operationsListSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/operationsListSample.ts deleted file mode 100644 index b82454a18eba..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/operationsListSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * 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-11-01-preview/examples/Operations_List.json - */ -async function listAllOperations() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "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); -} - -async function main() { - listAllOperations(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/tsconfig.json b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/tsconfig.json deleted file mode 100644 index e26ce2a6d8f7..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2020", - "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/appcontainers/arm-appcontainers/src/containerAppsAPIClient.ts b/sdk/appcontainers/arm-appcontainers/src/containerAppsAPIClient.ts index 8e4722e51fc5..f62c1b266ceb 100644 --- a/sdk/appcontainers/arm-appcontainers/src/containerAppsAPIClient.ts +++ b/sdk/appcontainers/arm-appcontainers/src/containerAppsAPIClient.ts @@ -23,14 +23,14 @@ import { ConnectedEnvironmentsDaprComponentsImpl, ConnectedEnvironmentsStoragesImpl, ContainerAppsImpl, - JobsImpl, - JobsExecutionsImpl, ContainerAppsRevisionsImpl, ContainerAppsRevisionReplicasImpl, ContainerAppsDiagnosticsImpl, ManagedEnvironmentDiagnosticsImpl, ManagedEnvironmentsDiagnosticsImpl, OperationsImpl, + JobsImpl, + JobsExecutionsImpl, ManagedEnvironmentsImpl, CertificatesImpl, ManagedCertificatesImpl, @@ -48,14 +48,14 @@ import { ConnectedEnvironmentsDaprComponents, ConnectedEnvironmentsStorages, ContainerApps, - Jobs, - JobsExecutions, ContainerAppsRevisions, ContainerAppsRevisionReplicas, ContainerAppsDiagnostics, ManagedEnvironmentDiagnostics, ManagedEnvironmentsDiagnostics, Operations, + Jobs, + JobsExecutions, ManagedEnvironments, Certificates, ManagedCertificates, @@ -64,7 +64,13 @@ import { ManagedEnvironmentsStorages, ContainerAppsSourceControls } from "./operationsInterfaces"; -import { ContainerAppsAPIClientOptionalParams } from "./models"; +import * as Parameters from "./models/parameters"; +import * as Mappers from "./models/mappers"; +import { + ContainerAppsAPIClientOptionalParams, + JobExecutionOptionalParams, + JobExecutionResponse +} from "./models"; export class ContainerAppsAPIClient extends coreClient.ServiceClient { $host: string; @@ -98,7 +104,7 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-appcontainers/2.0.0-beta.4`; + const packageDetails = `azsdk-js-arm-appcontainers/2.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -151,7 +157,7 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-11-01-preview"; + this.apiVersion = options.apiVersion || "2023-05-01"; this.containerAppsAuthConfigs = new ContainerAppsAuthConfigsImpl(this); this.availableWorkloadProfiles = new AvailableWorkloadProfilesImpl(this); this.billingMeters = new BillingMetersImpl(this); @@ -166,8 +172,6 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { this ); this.containerApps = new ContainerAppsImpl(this); - this.jobs = new JobsImpl(this); - this.jobsExecutions = new JobsExecutionsImpl(this); this.containerAppsRevisions = new ContainerAppsRevisionsImpl(this); this.containerAppsRevisionReplicas = new ContainerAppsRevisionReplicasImpl( this @@ -180,6 +184,8 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { this ); this.operations = new OperationsImpl(this); + this.jobs = new JobsImpl(this); + this.jobsExecutions = new JobsExecutionsImpl(this); this.managedEnvironments = new ManagedEnvironmentsImpl(this); this.certificates = new CertificatesImpl(this); this.managedCertificates = new ManagedCertificatesImpl(this); @@ -222,6 +228,25 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { this.pipeline.addPolicy(apiVersionPolicy); } + /** + * Get details of a single job execution + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Job Name + * @param jobExecutionName Job execution name. + * @param options The options parameters. + */ + jobExecution( + resourceGroupName: string, + jobName: string, + jobExecutionName: string, + options?: JobExecutionOptionalParams + ): Promise { + return this.sendOperationRequest( + { resourceGroupName, jobName, jobExecutionName, options }, + jobExecutionOperationSpec + ); + } + containerAppsAuthConfigs: ContainerAppsAuthConfigs; availableWorkloadProfiles: AvailableWorkloadProfiles; billingMeters: BillingMeters; @@ -230,14 +255,14 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { connectedEnvironmentsDaprComponents: ConnectedEnvironmentsDaprComponents; connectedEnvironmentsStorages: ConnectedEnvironmentsStorages; containerApps: ContainerApps; - jobs: Jobs; - jobsExecutions: JobsExecutions; containerAppsRevisions: ContainerAppsRevisions; containerAppsRevisionReplicas: ContainerAppsRevisionReplicas; containerAppsDiagnostics: ContainerAppsDiagnostics; managedEnvironmentDiagnostics: ManagedEnvironmentDiagnostics; managedEnvironmentsDiagnostics: ManagedEnvironmentsDiagnostics; operations: Operations; + jobs: Jobs; + jobsExecutions: JobsExecutions; managedEnvironments: ManagedEnvironments; certificates: Certificates; managedCertificates: ManagedCertificates; @@ -246,3 +271,29 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { managedEnvironmentsStorages: ManagedEnvironmentsStorages; containerAppsSourceControls: ContainerAppsSourceControls; } +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const jobExecutionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/executions/{jobExecutionName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.JobExecution + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.jobName, + Parameters.jobExecutionName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/models/index.ts b/sdk/appcontainers/arm-appcontainers/src/models/index.ts index 25be36ab20a6..be45bee228be 100644 --- a/sdk/appcontainers/arm-appcontainers/src/models/index.ts +++ b/sdk/appcontainers/arm-appcontainers/src/models/index.ts @@ -858,6 +858,8 @@ export interface Configuration { dapr?: Dapr; /** Optional. Max inactive revisions a Container App can have. */ maxInactiveRevisions?: number; + /** Container App to be a dev Container App Service */ + service?: Service; } /** Container App Ingress configuration. */ @@ -979,6 +981,12 @@ export interface Dapr { enableApiLogging?: boolean; } +/** Container App to be a dev service */ +export interface Service { + /** Dev ContainerApp service type */ + type: string; +} + /** * Container App versioned application definition. * Defines the desired state of an immutable revision. @@ -987,6 +995,8 @@ export interface Dapr { export interface Template { /** User friendly suffix that is appended to the revision name */ revisionSuffix?: string; + /** Optional duration in seconds the Container App Instance needs to terminate gracefully. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. */ + terminationGracePeriodSeconds?: number; /** List of specialized containers that run before app containers. */ initContainers?: InitContainer[]; /** List of container definitions for the Container App. */ @@ -995,6 +1005,8 @@ export interface Template { scale?: Scale; /** List of volume definitions for the Container App. */ volumes?: Volume[]; + /** List of container app services bound to the app */ + serviceBinds?: ServiceBind[]; } /** Container App base container definition. */ @@ -1044,6 +1056,8 @@ export interface VolumeMount { volumeName?: string; /** Path within the container at which the volume should be mounted.Must not contain ':'. */ mountPath?: string; + /** Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). */ + subPath?: string; } /** Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. */ @@ -1132,9 +1146,9 @@ export interface QueueScaleRule { auth?: ScaleRuleAuth[]; } -/** Auth Secrets for Container App Scale Rule */ +/** Auth Secrets for Scale Rule */ export interface ScaleRuleAuth { - /** Name of the Container App secret from which to pull the auth params. */ + /** Name of the secret from which to pull the auth params. */ secretRef?: string; /** Trigger Parameter that uses the secret */ triggerParameter?: string; @@ -1179,6 +1193,8 @@ export interface Volume { storageName?: string; /** List of secrets to be added in volume. If no secrets are provided, all secrets in collection will be added to volume. */ secrets?: SecretVolumeItem[]; + /** Mount options used while mounting the AzureFile. Must be a comma-separated string. */ + mountOptions?: string; } /** Secret to be added to volume. */ @@ -1189,6 +1205,14 @@ export interface SecretVolumeItem { path?: string; } +/** Configuration to bind a ContainerApp to a dev ContainerApp Service */ +export interface ServiceBind { + /** Resource id of the target service */ + serviceId?: string; + /** Name of the service bind */ + name?: string; +} + /** Custom domain analysis. */ export interface CustomHostnameAnalysisResult { /** @@ -1308,161 +1332,6 @@ export interface ContainerAppSecret { readonly keyVaultUrl?: string; } -/** Container Apps Jobs collection ARM resource. */ -export interface JobsCollection { - /** Collection of resources. */ - value: Job[]; - /** - * Link to next page of resources. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Non versioned Container Apps Job configuration properties */ -export interface JobConfiguration { - /** Collection of secrets used by a Container Apps Job */ - secrets?: Secret[]; - /** Trigger type of the job */ - triggerType: TriggerType; - /** Maximum number of seconds a replica is allowed to run. */ - replicaTimeout: number; - /** Maximum number of retries before failing the job. */ - replicaRetryLimit?: number; - /** Manual trigger configuration for a single execution job. Properties replicaCompletionCount and parallelism would be set to 1 by default */ - manualTriggerConfig?: JobConfigurationManualTriggerConfig; - /** Cron formatted repeating trigger schedule ("* * * * *") for cronjobs. Properties completions and parallelism would be set to 1 by default */ - scheduleTriggerConfig?: JobConfigurationScheduleTriggerConfig; - /** Collection of private container registry credentials used by a Container apps job */ - registries?: RegistryCredentials[]; -} - -/** Manual trigger configuration for a single execution job. Properties replicaCompletionCount and parallelism would be set to 1 by default */ -export interface JobConfigurationManualTriggerConfig { - /** Minimum number of successful replica completions before overall job completion. */ - replicaCompletionCount?: number; - /** Number of parallel replicas of a job that can run at a given time. */ - parallelism?: number; -} - -/** Cron formatted repeating trigger schedule ("* * * * *") for cronjobs. Properties completions and parallelism would be set to 1 by default */ -export interface JobConfigurationScheduleTriggerConfig { - /** Minimum number of successful replica completions before overall job completion. */ - replicaCompletionCount?: number; - /** Cron formatted repeating schedule ("* * * * *") of a Cron Job. */ - cronExpression: string; - /** Number of parallel replicas of a job that can run at a given time. */ - parallelism?: number; -} - -/** Container Apps Job 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 JobTemplate { - /** List of specialized containers that run before app containers. */ - initContainers?: InitContainer[]; - /** List of container definitions for the Container App. */ - containers?: Container[]; - /** List of volume definitions for the Container App. */ - volumes?: Volume[]; -} - -/** Container Apps Job resource specific properties. */ -export interface JobPatchProperties { - /** Managed identities needed by a container app job to interact with other Azure services to not maintain any secrets or credentials in code. */ - identity?: ManagedServiceIdentity; - /** Resource tags. */ - tags?: { [propertyName: string]: string }; - properties?: JobPatchPropertiesProperties; -} - -export interface JobPatchPropertiesProperties { - /** Resource ID of environment. */ - environmentId?: string; - /** Container Apps Job configuration properties. */ - configuration?: JobConfiguration; - /** Container Apps job definition. */ - template?: JobTemplate; - /** Outbound IP Addresses of a container apps job. */ - outboundIpAddresses?: string[]; - /** The endpoint of the eventstream of the container apps job. */ - eventStreamEndpoint?: string; -} - -/** Job's execution template, containing container configuration for a job's execution */ -export interface JobExecutionTemplate { - /** List of container definitions for the Container Apps Job. */ - containers?: JobExecutionContainer[]; - /** List of specialized containers that run before job containers. */ - initContainers?: JobExecutionContainer[]; -} - -/** Container Apps Jobs execution container definition. */ -export interface JobExecutionContainer { - /** 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; -} - -/** Container App's Job execution name. */ -export interface JobExecutionBase { - /** Job execution name. */ - name?: string; - /** Job execution Id. */ - id?: string; -} - -/** Container App executions names list. */ -export interface JobExecutionNamesCollection { - /** Collection of resources. */ - value: JobExecutionBase[]; -} - -/** Container App executions collection ARM resource. */ -export interface ContainerAppJobExecutions { - /** Collection of resources. */ - value: JobExecution[]; - /** - * 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 Apps Jobs execution. */ -export interface JobExecution { - /** Job execution Name. */ - name?: string; - /** Job execution Id. */ - id?: string; - /** Job Type. */ - type?: string; - /** - * Current running State of the job - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly status?: JobExecutionRunningState; - /** Job execution start time. */ - startTime?: Date; - /** Job execution start time. */ - endTime?: Date; - /** Job's execution container. */ - template?: JobExecutionTemplate; -} - -/** Container Apps Job Secrets Collection ARM resource. */ -export interface JobSecretsCollection { - /** Collection of resources. */ - value: Secret[]; -} - /** Container App Revisions collection ARM resource. */ export interface RevisionCollection { /** Collection of resources. */ @@ -1486,6 +1355,16 @@ export interface ReplicaContainer { started?: boolean; /** The container restart count */ restartCount?: number; + /** + * Current running state of the container + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly runningState?: ContainerAppContainerRunningState; + /** + * The details of container current running state + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly runningStateDetails?: string; /** * Log Stream endpoint * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1664,13 +1543,13 @@ export interface VnetConfiguration { /** Configuration of application logs */ export interface AppLogsConfiguration { - /** Logs destination */ + /** Logs destination, can be 'log-analytics', 'azure-monitor' or 'none' */ destination?: string; - /** Log Analytics configuration */ + /** Log Analytics configuration, must only be provided when destination is configured as 'log-analytics' */ logAnalyticsConfiguration?: LogAnalyticsConfiguration; } -/** Log analytics configuration */ +/** Log Analytics configuration, must only be provided when destination is configured as 'log-analytics' */ export interface LogAnalyticsConfiguration { /** Log analytics customer id */ customerId?: string; @@ -1708,6 +1587,18 @@ export interface DaprConfiguration { readonly version?: string; } +/** Peer authentication settings for the Managed Environment */ +export interface ManagedEnvironmentPropertiesPeerAuthentication { + /** Mutual TLS authentication settings for the Managed Environment */ + mtls?: Mtls; +} + +/** Configuration properties for mutual TLS authentication */ +export interface Mtls { + /** Boolean indicating whether the mutual TLS authentication is enabled */ + enabled?: boolean; +} + /** Available operations of the service */ export interface AvailableOperations { /** Collection of available operation details */ @@ -1743,10 +1634,10 @@ export interface OperationDisplay { description?: string; } -/** Collection of Environments */ -export interface ManagedEnvironmentsCollection { +/** Container Apps Jobs collection ARM resource. */ +export interface JobsCollection { /** Collection of resources. */ - value: ManagedEnvironment[]; + value: Job[]; /** * Link to next page of resources. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1754,58 +1645,246 @@ export interface ManagedEnvironmentsCollection { readonly nextLink?: string; } -/** Certificate resource specific properties */ -export interface ManagedCertificateProperties { - /** - * Provisioning state of the certificate. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: CertificateProvisioningState; - /** Subject name of the certificate. */ - subjectName?: string; - /** - * Any error occurred during the certificate provision. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly error?: string; - /** Selected type of domain control validation for managed certificates. */ - domainControlValidation?: ManagedCertificateDomainControlValidation; - /** - * A TXT token used for DNS TXT domain control validation when issuing this type of managed certificates. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly validationToken?: string; +/** Non versioned Container Apps Job configuration properties */ +export interface JobConfiguration { + /** Collection of secrets used by a Container Apps Job */ + secrets?: Secret[]; + /** Trigger type of the job */ + triggerType: TriggerType; + /** Maximum number of seconds a replica is allowed to run. */ + replicaTimeout: number; + /** Maximum number of retries before failing the job. */ + replicaRetryLimit?: number; + /** Manual trigger configuration for a single execution job. Properties replicaCompletionCount and parallelism would be set to 1 by default */ + manualTriggerConfig?: JobConfigurationManualTriggerConfig; + /** Cron formatted repeating trigger schedule ("* * * * *") for cronjobs. Properties completions and parallelism would be set to 1 by default */ + scheduleTriggerConfig?: JobConfigurationScheduleTriggerConfig; + /** Trigger configuration of an event driven job. */ + eventTriggerConfig?: JobConfigurationEventTriggerConfig; + /** Collection of private container registry credentials used by a Container apps job */ + registries?: RegistryCredentials[]; } -/** A managed certificate to update */ -export interface ManagedCertificatePatch { - /** Application-specific metadata in the form of key-value pairs. */ - tags?: { [propertyName: string]: string }; +/** Manual trigger configuration for a single execution job. Properties replicaCompletionCount and parallelism would be set to 1 by default */ +export interface JobConfigurationManualTriggerConfig { + /** Minimum number of successful replica completions before overall job completion. */ + replicaCompletionCount?: number; + /** Number of parallel replicas of a job that can run at a given time. */ + parallelism?: number; } -/** Collection of Managed Certificates. */ -export interface ManagedCertificateCollection { - /** Collection of resources. */ - value: ManagedCertificate[]; - /** - * Link to next page of resources. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; +/** Cron formatted repeating trigger schedule ("* * * * *") for cronjobs. Properties completions and parallelism would be set to 1 by default */ +export interface JobConfigurationScheduleTriggerConfig { + /** Minimum number of successful replica completions before overall job completion. */ + replicaCompletionCount?: number; + /** Cron formatted repeating schedule ("* * * * *") of a Cron Job. */ + cronExpression: string; + /** Number of parallel replicas of a job that can run at a given time. */ + parallelism?: number; } -/** Collection of workloadProfileStates */ -export interface WorkloadProfileStatesCollection { - /** Collection of resources. */ - value: WorkloadProfileStates[]; - /** - * Link to next page of resources. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; +/** Trigger configuration of an event driven job. */ +export interface JobConfigurationEventTriggerConfig { + /** Minimum number of successful replica completions before overall job completion. */ + replicaCompletionCount?: number; + /** Number of parallel replicas of a job that can run at a given time. */ + parallelism?: number; + /** Scaling configurations for event driven jobs. */ + scale?: JobScale; +} + +/** Scaling configurations for event driven jobs. */ +export interface JobScale { + /** Interval to check each event source in seconds. Defaults to 30s */ + pollingInterval?: number; + /** Minimum number of job executions that are created for a trigger, default 0 */ + minExecutions?: number; + /** Maximum number of job executions that are created for a trigger, default 100. */ + maxExecutions?: number; + /** Scaling rules. */ + rules?: JobScaleRule[]; } -/** Workload Profile resource specific properties. */ +/** Scaling rule. */ +export interface JobScaleRule { + /** Scale Rule Name */ + name?: string; + /** + * Type of the scale rule + * eg: azure-servicebus, redis etc. + */ + type?: string; + /** Metadata properties to describe the scale rule. */ + metadata?: Record; + /** Authentication secrets for the scale rule. */ + auth?: ScaleRuleAuth[]; +} + +/** Container Apps Job 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 JobTemplate { + /** List of specialized containers that run before app containers. */ + initContainers?: InitContainer[]; + /** List of container definitions for the Container App. */ + containers?: Container[]; + /** List of volume definitions for the Container App. */ + volumes?: Volume[]; +} + +/** Container Apps Job resource specific properties. */ +export interface JobPatchProperties { + /** Managed identities needed by a container app job to interact with other Azure services to not maintain any secrets or credentials in code. */ + identity?: ManagedServiceIdentity; + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + properties?: JobPatchPropertiesProperties; +} + +export interface JobPatchPropertiesProperties { + /** Resource ID of environment. */ + environmentId?: string; + /** Container Apps Job configuration properties. */ + configuration?: JobConfiguration; + /** Container Apps job definition. */ + template?: JobTemplate; + /** Outbound IP Addresses of a container apps job. */ + outboundIpAddresses?: string[]; + /** The endpoint of the eventstream of the container apps job. */ + eventStreamEndpoint?: string; +} + +/** Job's execution template, containing container configuration for a job's execution */ +export interface JobExecutionTemplate { + /** List of container definitions for the Container Apps Job. */ + containers?: JobExecutionContainer[]; + /** List of specialized containers that run before job containers. */ + initContainers?: JobExecutionContainer[]; +} + +/** Container Apps Jobs execution container definition. */ +export interface JobExecutionContainer { + /** 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; +} + +/** Container App's Job execution name. */ +export interface JobExecutionBase { + /** Job execution name. */ + name?: string; + /** Job execution Id. */ + id?: string; +} + +/** Container App executions collection ARM resource. */ +export interface ContainerAppJobExecutions { + /** Collection of resources. */ + value: JobExecution[]; + /** + * 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 Apps Job execution. */ +export interface JobExecution { + /** Job execution Name. */ + name?: string; + /** Job execution Id. */ + id?: string; + /** Job Type. */ + type?: string; + /** + * Current running State of the job + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: JobExecutionRunningState; + /** Job execution start time. */ + startTime?: Date; + /** Job execution end time. */ + endTime?: Date; + /** Job's execution container. */ + template?: JobExecutionTemplate; +} + +/** Container Apps Job Secrets Collection ARM resource. */ +export interface JobSecretsCollection { + /** Collection of resources. */ + value: Secret[]; +} + +/** 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; +} + +/** Certificate resource specific properties */ +export interface ManagedCertificateProperties { + /** + * Provisioning state of the certificate. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: CertificateProvisioningState; + /** Subject name of the certificate. */ + subjectName?: string; + /** + * Any error occurred during the certificate provision. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly error?: string; + /** Selected type of domain control validation for managed certificates. */ + domainControlValidation?: ManagedCertificateDomainControlValidation; + /** + * A TXT token used for DNS TXT domain control validation when issuing this type of managed certificates. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly validationToken?: string; +} + +/** A managed certificate to update */ +export interface ManagedCertificatePatch { + /** Application-specific metadata in the form of key-value pairs. */ + tags?: { [propertyName: string]: string }; +} + +/** Collection of Managed Certificates. */ +export interface ManagedCertificateCollection { + /** Collection of resources. */ + value: ManagedCertificate[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Collection of workloadProfileStates */ +export interface WorkloadProfileStatesCollection { + /** Collection of resources. */ + value: WorkloadProfileStates[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Workload Profile resource specific properties. */ export interface WorkloadProfileStatesProperties { /** Minimum count of instances. */ minimumCount?: number; @@ -1846,6 +1925,8 @@ export interface GithubActionConfiguration { azureCredentials?: AzureCredentials; /** Context path */ contextPath?: string; + /** One time Github PAT to configure github environment */ + githubPersonalAccessToken?: string; /** Image name */ image?: string; /** Code or Image */ @@ -1876,10 +1957,18 @@ export interface AzureCredentials { clientSecret?: string; /** Tenant Id. */ tenantId?: string; + /** Kind of auth github does for deploying the template */ + kind?: string; /** Subscription Id. */ subscriptionId?: string; } +/** Container App executions names list. */ +export interface JobExecutionNamesCollection { + /** Collection of resources. */ + value: JobExecutionBase[]; +} + /** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ export interface ProxyResource extends Resource {} @@ -2011,6 +2100,11 @@ export interface Revision extends ProxyResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: RevisionProvisioningState; + /** + * Current running state of the revision + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly runningState?: RevisionRunningState; } /** Container App Revision Replica. */ @@ -2020,8 +2114,20 @@ export interface Replica extends ProxyResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly createdTime?: Date; + /** + * Current running state of the replica + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly runningState?: ContainerAppReplicaRunningState; + /** + * The details of replica current running state + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly runningStateDetails?: string; /** The containers collection under a replica. */ containers?: ReplicaContainer[]; + /** The init containers collection under a replica. */ + initContainers?: ReplicaContainer[]; } /** Diagnostics data for a resource. */ @@ -2163,35 +2269,6 @@ export interface ContainerAppAuthToken extends TrackedResource { readonly expires?: Date; } -/** Container App Job */ -export interface Job extends TrackedResource { - /** Managed identities needed by a container app job to interact with other Azure services to not maintain any secrets or credentials in code. */ - identity?: ManagedServiceIdentity; - /** - * Provisioning state of the Container Apps Job. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: JobProvisioningState; - /** Resource ID of environment. */ - environmentId?: string; - /** Workload profile name to pin for container apps job execution. */ - workloadProfileName?: string; - /** Container Apps Job configuration properties. */ - configuration?: JobConfiguration; - /** Container Apps job definition. */ - template?: JobTemplate; - /** - * Outbound IP Addresses of a container apps job. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly outboundIpAddresses?: string[]; - /** - * The endpoint of the eventstream of the container apps job. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly eventStreamEndpoint?: string; -} - /** An environment for hosting container apps */ export interface ManagedEnvironment extends TrackedResource { /** Kind of the Environment. */ @@ -2245,6 +2322,37 @@ export interface ManagedEnvironment extends TrackedResource { daprConfiguration?: DaprConfiguration; /** Name of the platform-managed resource group created for the Managed Environment to host infrastructure resources. If a subnet ID is provided, this resource group will be created in the same subscription as the subnet. */ infrastructureResourceGroup?: string; + /** Peer authentication settings for the Managed Environment */ + peerAuthentication?: ManagedEnvironmentPropertiesPeerAuthentication; +} + +/** Container App Job */ +export interface Job extends TrackedResource { + /** Managed identities needed by a container app job to interact with other Azure services to not maintain any secrets or credentials in code. */ + identity?: ManagedServiceIdentity; + /** + * Provisioning state of the Container Apps Job. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: JobProvisioningState; + /** Resource ID of environment. */ + environmentId?: string; + /** Workload profile name to pin for container apps job execution. */ + workloadProfileName?: string; + /** Container Apps Job configuration properties. */ + configuration?: JobConfiguration; + /** Container Apps job definition. */ + template?: JobTemplate; + /** + * Outbound IP Addresses of a container apps job. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly outboundIpAddresses?: string[]; + /** + * The endpoint of the eventstream of the container apps job. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly eventStreamEndpoint?: string; } /** Managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment */ @@ -2282,6 +2390,16 @@ export interface ContainerAppsUpdateHeaders { location?: string; } +/** Defines headers for ContainerApps_start operation. */ +export interface ContainerAppsStartHeaders { + location?: string; +} + +/** Defines headers for ContainerApps_stop operation. */ +export interface ContainerAppsStopHeaders { + location?: string; +} + /** Defines headers for Jobs_delete operation. */ export interface JobsDeleteHeaders { location?: string; @@ -2733,56 +2851,56 @@ export enum KnownStorageType { */ export type StorageType = string; -/** Known values of {@link JobProvisioningState} that the service accepts. */ -export enum KnownJobProvisioningState { - /** InProgress */ - InProgress = "InProgress", - /** Succeeded */ - Succeeded = "Succeeded", - /** Failed */ - Failed = "Failed", - /** Canceled */ - Canceled = "Canceled", - /** Deleting */ - Deleting = "Deleting" +/** Known values of {@link RevisionHealthState} that the service accepts. */ +export enum KnownRevisionHealthState { + /** Healthy */ + Healthy = "Healthy", + /** Unhealthy */ + Unhealthy = "Unhealthy", + /** None */ + None = "None" } /** - * Defines values for JobProvisioningState. \ - * {@link KnownJobProvisioningState} can be used interchangeably with JobProvisioningState, + * Defines values for RevisionHealthState. \ + * {@link KnownRevisionHealthState} can be used interchangeably with RevisionHealthState, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **InProgress** \ - * **Succeeded** \ - * **Failed** \ - * **Canceled** \ - * **Deleting** + * **Healthy** \ + * **Unhealthy** \ + * **None** */ -export type JobProvisioningState = string; +export type RevisionHealthState = string; -/** Known values of {@link TriggerType} that the service accepts. */ -export enum KnownTriggerType { - /** Scheduled */ - Scheduled = "Scheduled", - /** Event */ - Event = "Event", - /** Manual */ - Manual = "Manual" +/** Known values of {@link RevisionProvisioningState} that the service accepts. */ +export enum KnownRevisionProvisioningState { + /** Provisioning */ + Provisioning = "Provisioning", + /** Provisioned */ + Provisioned = "Provisioned", + /** Failed */ + Failed = "Failed", + /** Deprovisioning */ + Deprovisioning = "Deprovisioning", + /** Deprovisioned */ + Deprovisioned = "Deprovisioned" } /** - * Defines values for TriggerType. \ - * {@link KnownTriggerType} can be used interchangeably with TriggerType, + * Defines values for RevisionProvisioningState. \ + * {@link KnownRevisionProvisioningState} can be used interchangeably with RevisionProvisioningState, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Scheduled** \ - * **Event** \ - * **Manual** + * **Provisioning** \ + * **Provisioned** \ + * **Failed** \ + * **Deprovisioning** \ + * **Deprovisioned** */ -export type TriggerType = string; +export type RevisionProvisioningState = string; -/** Known values of {@link JobExecutionRunningState} that the service accepts. */ -export enum KnownJobExecutionRunningState { +/** Known values of {@link RevisionRunningState} that the service accepts. */ +export enum KnownRevisionRunningState { /** Running */ Running = "Running", /** Processing */ @@ -2794,14 +2912,12 @@ export enum KnownJobExecutionRunningState { /** Failed */ Failed = "Failed", /** Unknown */ - Unknown = "Unknown", - /** Succeeded */ - Succeeded = "Succeeded" + Unknown = "Unknown" } /** - * Defines values for JobExecutionRunningState. \ - * {@link KnownJobExecutionRunningState} can be used interchangeably with JobExecutionRunningState, + * Defines values for RevisionRunningState. \ + * {@link KnownRevisionRunningState} can be used interchangeably with RevisionRunningState, * this enum contains the known values that the service supports. * ### Known values supported by the service * **Running** \ @@ -2809,58 +2925,51 @@ export enum KnownJobExecutionRunningState { * **Stopped** \ * **Degraded** \ * **Failed** \ - * **Unknown** \ - * **Succeeded** + * **Unknown** */ -export type JobExecutionRunningState = string; +export type RevisionRunningState = string; -/** Known values of {@link RevisionHealthState} that the service accepts. */ -export enum KnownRevisionHealthState { - /** Healthy */ - Healthy = "Healthy", - /** Unhealthy */ - Unhealthy = "Unhealthy", - /** None */ - None = "None" +/** Known values of {@link ContainerAppReplicaRunningState} that the service accepts. */ +export enum KnownContainerAppReplicaRunningState { + /** Running */ + Running = "Running", + /** NotRunning */ + NotRunning = "NotRunning", + /** Unknown */ + Unknown = "Unknown" } /** - * Defines values for RevisionHealthState. \ - * {@link KnownRevisionHealthState} can be used interchangeably with RevisionHealthState, + * Defines values for ContainerAppReplicaRunningState. \ + * {@link KnownContainerAppReplicaRunningState} can be used interchangeably with ContainerAppReplicaRunningState, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Healthy** \ - * **Unhealthy** \ - * **None** + * **Running** \ + * **NotRunning** \ + * **Unknown** */ -export type RevisionHealthState = string; +export type ContainerAppReplicaRunningState = string; -/** Known values of {@link RevisionProvisioningState} that the service accepts. */ -export enum KnownRevisionProvisioningState { - /** Provisioning */ - Provisioning = "Provisioning", - /** Provisioned */ - Provisioned = "Provisioned", - /** Failed */ - Failed = "Failed", - /** Deprovisioning */ - Deprovisioning = "Deprovisioning", - /** Deprovisioned */ - Deprovisioned = "Deprovisioned" +/** Known values of {@link ContainerAppContainerRunningState} that the service accepts. */ +export enum KnownContainerAppContainerRunningState { + /** Running */ + Running = "Running", + /** Terminated */ + Terminated = "Terminated", + /** Waiting */ + Waiting = "Waiting" } /** - * Defines values for RevisionProvisioningState. \ - * {@link KnownRevisionProvisioningState} can be used interchangeably with RevisionProvisioningState, + * Defines values for ContainerAppContainerRunningState. \ + * {@link KnownContainerAppContainerRunningState} can be used interchangeably with ContainerAppContainerRunningState, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Provisioning** \ - * **Provisioned** \ - * **Failed** \ - * **Deprovisioning** \ - * **Deprovisioned** + * **Running** \ + * **Terminated** \ + * **Waiting** */ -export type RevisionProvisioningState = string; +export type ContainerAppContainerRunningState = string; /** Known values of {@link EnvironmentProvisioningState} that the service accepts. */ export enum KnownEnvironmentProvisioningState { @@ -2904,6 +3013,87 @@ export enum KnownEnvironmentProvisioningState { */ export type EnvironmentProvisioningState = string; +/** Known values of {@link JobProvisioningState} that the service accepts. */ +export enum KnownJobProvisioningState { + /** InProgress */ + InProgress = "InProgress", + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** Canceled */ + Canceled = "Canceled", + /** Deleting */ + Deleting = "Deleting" +} + +/** + * Defines values for JobProvisioningState. \ + * {@link KnownJobProvisioningState} can be used interchangeably with JobProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **InProgress** \ + * **Succeeded** \ + * **Failed** \ + * **Canceled** \ + * **Deleting** + */ +export type JobProvisioningState = string; + +/** Known values of {@link TriggerType} that the service accepts. */ +export enum KnownTriggerType { + /** Schedule */ + Schedule = "Schedule", + /** Event */ + Event = "Event", + /** Manual */ + Manual = "Manual" +} + +/** + * Defines values for TriggerType. \ + * {@link KnownTriggerType} can be used interchangeably with TriggerType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Schedule** \ + * **Event** \ + * **Manual** + */ +export type TriggerType = string; + +/** Known values of {@link JobExecutionRunningState} that the service accepts. */ +export enum KnownJobExecutionRunningState { + /** Running */ + Running = "Running", + /** Processing */ + Processing = "Processing", + /** Stopped */ + Stopped = "Stopped", + /** Degraded */ + Degraded = "Degraded", + /** Failed */ + Failed = "Failed", + /** Unknown */ + Unknown = "Unknown", + /** Succeeded */ + Succeeded = "Succeeded" +} + +/** + * Defines values for JobExecutionRunningState. \ + * {@link KnownJobExecutionRunningState} can be used interchangeably with JobExecutionRunningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Running** \ + * **Processing** \ + * **Stopped** \ + * **Degraded** \ + * **Failed** \ + * **Unknown** \ + * **Succeeded** + */ +export type JobExecutionRunningState = string; + /** Known values of {@link ManagedCertificateDomainControlValidation} that the service accepts. */ export enum KnownManagedCertificateDomainControlValidation { /** Cname */ @@ -3271,41 +3461,7 @@ export interface ContainerAppsGetAuthTokenOptionalParams export type ContainerAppsGetAuthTokenResponse = ContainerAppAuthToken; /** Optional parameters. */ -export interface ContainerAppsListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type ContainerAppsListBySubscriptionNextResponse = ContainerAppCollection; - -/** Optional parameters. */ -export interface ContainerAppsListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type ContainerAppsListByResourceGroupNextResponse = ContainerAppCollection; - -/** Optional parameters. */ -export interface JobsListBySubscriptionOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscription operation. */ -export type JobsListBySubscriptionResponse = JobsCollection; - -/** Optional parameters. */ -export interface JobsListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type JobsListByResourceGroupResponse = JobsCollection; - -/** Optional parameters. */ -export interface JobsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type JobsGetResponse = Job; - -/** Optional parameters. */ -export interface JobsCreateOrUpdateOptionalParams +export interface ContainerAppsStartOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3313,41 +3469,11 @@ export interface JobsCreateOrUpdateOptionalParams resumeFrom?: string; } -/** Contains response data for the createOrUpdate operation. */ -export type JobsCreateOrUpdateResponse = Job; - -/** Optional parameters. */ -export interface JobsDeleteOptionalParams 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 JobsUpdateOptionalParams 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 update operation. */ -export type JobsUpdateResponse = Job; - -/** Optional parameters. */ -export interface JobsStartOptionalParams 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 start operation. */ -export type JobsStartResponse = JobExecutionBase; +export type ContainerAppsStartResponse = ContainerApp; /** Optional parameters. */ -export interface JobsStopExecutionOptionalParams +export interface ContainerAppsStopOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3355,55 +3481,22 @@ export interface JobsStopExecutionOptionalParams resumeFrom?: string; } -/** Optional parameters. */ -export interface JobsStopMultipleExecutionsOptionalParams - 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 stopMultipleExecutions operation. */ -export type JobsStopMultipleExecutionsResponse = ContainerAppJobExecutions; - -/** Optional parameters. */ -export interface JobsListSecretsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listSecrets operation. */ -export type JobsListSecretsResponse = JobSecretsCollection; +/** Contains response data for the stop operation. */ +export type ContainerAppsStopResponse = ContainerApp; /** Optional parameters. */ -export interface JobsListBySubscriptionNextOptionalParams +export interface ContainerAppsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listBySubscriptionNext operation. */ -export type JobsListBySubscriptionNextResponse = JobsCollection; +export type ContainerAppsListBySubscriptionNextResponse = ContainerAppCollection; /** Optional parameters. */ -export interface JobsListByResourceGroupNextOptionalParams +export interface ContainerAppsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByResourceGroupNext operation. */ -export type JobsListByResourceGroupNextResponse = JobsCollection; - -/** Optional parameters. */ -export interface JobsExecutionsListOptionalParams - extends coreClient.OperationOptions { - /** The filter to apply on the operation. */ - filter?: string; -} - -/** Contains response data for the list operation. */ -export type JobsExecutionsListResponse = ContainerAppJobExecutions; - -/** Optional parameters. */ -export interface JobsExecutionsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type JobsExecutionsListNextResponse = ContainerAppJobExecutions; +export type ContainerAppsListByResourceGroupNextResponse = ContainerAppCollection; /** Optional parameters. */ export interface ContainerAppsRevisionsListRevisionsOptionalParams @@ -3542,6 +3635,136 @@ export interface OperationsListNextOptionalParams /** Contains response data for the listNext operation. */ export type OperationsListNextResponse = AvailableOperations; +/** Optional parameters. */ +export interface JobsListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type JobsListBySubscriptionResponse = JobsCollection; + +/** Optional parameters. */ +export interface JobsListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type JobsListByResourceGroupResponse = JobsCollection; + +/** Optional parameters. */ +export interface JobsGetOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type JobsGetResponse = Job; + +/** Optional parameters. */ +export interface JobsCreateOrUpdateOptionalParams + 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 JobsCreateOrUpdateResponse = Job; + +/** Optional parameters. */ +export interface JobsDeleteOptionalParams 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 JobsUpdateOptionalParams 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 update operation. */ +export type JobsUpdateResponse = Job; + +/** Optional parameters. */ +export interface JobsStartOptionalParams extends coreClient.OperationOptions { + /** Properties used to start a job execution. */ + template?: JobExecutionTemplate; + /** 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 start operation. */ +export type JobsStartResponse = JobExecutionBase; + +/** Optional parameters. */ +export interface JobsStopExecutionOptionalParams + 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 JobsStopMultipleExecutionsOptionalParams + 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 stopMultipleExecutions operation. */ +export type JobsStopMultipleExecutionsResponse = ContainerAppJobExecutions; + +/** Optional parameters. */ +export interface JobsListSecretsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listSecrets operation. */ +export type JobsListSecretsResponse = JobSecretsCollection; + +/** Optional parameters. */ +export interface JobsListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type JobsListBySubscriptionNextResponse = JobsCollection; + +/** Optional parameters. */ +export interface JobsListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type JobsListByResourceGroupNextResponse = JobsCollection; + +/** Optional parameters. */ +export interface JobsExecutionsListOptionalParams + extends coreClient.OperationOptions { + /** The filter to apply on the operation. */ + filter?: string; +} + +/** Contains response data for the list operation. */ +export type JobsExecutionsListResponse = ContainerAppJobExecutions; + +/** Optional parameters. */ +export interface JobsExecutionsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type JobsExecutionsListNextResponse = ContainerAppJobExecutions; + +/** Optional parameters. */ +export interface JobExecutionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the jobExecution operation. */ +export type JobExecutionResponse = JobExecution; + /** Optional parameters. */ export interface ManagedEnvironmentsListBySubscriptionOptionalParams extends coreClient.OperationOptions {} diff --git a/sdk/appcontainers/arm-appcontainers/src/models/mappers.ts b/sdk/appcontainers/arm-appcontainers/src/models/mappers.ts index 49b918fc0a4a..5afdbc69fbf9 100644 --- a/sdk/appcontainers/arm-appcontainers/src/models/mappers.ts +++ b/sdk/appcontainers/arm-appcontainers/src/models/mappers.ts @@ -2064,6 +2064,13 @@ export const Configuration: coreClient.CompositeMapper = { type: { name: "Number" } + }, + service: { + serializedName: "service", + type: { + name: "Composite", + className: "Service" + } } } } @@ -2445,6 +2452,22 @@ export const Dapr: coreClient.CompositeMapper = { } }; +export const Service: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Service", + modelProperties: { + type: { + serializedName: "type", + required: true, + type: { + name: "String" + } + } + } + } +}; + export const Template: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2456,6 +2479,12 @@ export const Template: coreClient.CompositeMapper = { name: "String" } }, + terminationGracePeriodSeconds: { + serializedName: "terminationGracePeriodSeconds", + type: { + name: "Number" + } + }, initContainers: { serializedName: "initContainers", type: { @@ -2498,6 +2527,18 @@ export const Template: coreClient.CompositeMapper = { } } } + }, + serviceBinds: { + serializedName: "serviceBinds", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServiceBind" + } + } + } } } } @@ -2648,6 +2689,12 @@ export const VolumeMount: coreClient.CompositeMapper = { type: { name: "String" } + }, + subPath: { + serializedName: "subPath", + type: { + name: "String" + } } } } @@ -3064,6 +3111,12 @@ export const Volume: coreClient.CompositeMapper = { } } } + }, + mountOptions: { + serializedName: "mountOptions", + type: { + name: "String" + } } } } @@ -3090,6 +3143,27 @@ export const SecretVolumeItem: coreClient.CompositeMapper = { } }; +export const ServiceBind: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServiceBind", + modelProperties: { + serviceId: { + serializedName: "serviceId", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + } + } + } +}; + export const CustomHostnameAnalysisResult: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3339,10 +3413,10 @@ export const ContainerAppSecret: coreClient.CompositeMapper = { } }; -export const JobsCollection: coreClient.CompositeMapper = { +export const RevisionCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobsCollection", + className: "RevisionCollection", modelProperties: { value: { serializedName: "value", @@ -3352,7 +3426,7 @@ export const JobsCollection: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Job" + className: "Revision" } } } @@ -3368,225 +3442,220 @@ export const JobsCollection: coreClient.CompositeMapper = { } }; -export const JobConfiguration: coreClient.CompositeMapper = { +export const ReplicaContainer: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobConfiguration", + className: "ReplicaContainer", modelProperties: { - secrets: { - serializedName: "secrets", + name: { + serializedName: "name", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Secret" - } - } + name: "String" } }, - triggerType: { - defaultValue: "Manual", - serializedName: "triggerType", - required: true, + containerId: { + serializedName: "containerId", type: { name: "String" } }, - replicaTimeout: { - serializedName: "replicaTimeout", - required: true, + ready: { + serializedName: "ready", type: { - name: "Number" + name: "Boolean" } }, - replicaRetryLimit: { - serializedName: "replicaRetryLimit", + started: { + serializedName: "started", + type: { + name: "Boolean" + } + }, + restartCount: { + serializedName: "restartCount", type: { name: "Number" } }, - manualTriggerConfig: { - serializedName: "manualTriggerConfig", + runningState: { + serializedName: "runningState", + readOnly: true, type: { - name: "Composite", - className: "JobConfigurationManualTriggerConfig" + name: "String" } }, - scheduleTriggerConfig: { - serializedName: "scheduleTriggerConfig", + runningStateDetails: { + serializedName: "runningStateDetails", + readOnly: true, type: { - name: "Composite", - className: "JobConfigurationScheduleTriggerConfig" + name: "String" } }, - registries: { - serializedName: "registries", + logStreamEndpoint: { + serializedName: "logStreamEndpoint", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RegistryCredentials" - } - } + name: "String" + } + }, + execEndpoint: { + serializedName: "execEndpoint", + readOnly: true, + type: { + name: "String" } } } } }; -export const JobConfigurationManualTriggerConfig: coreClient.CompositeMapper = { +export const ReplicaCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobConfigurationManualTriggerConfig", + className: "ReplicaCollection", modelProperties: { - replicaCompletionCount: { - serializedName: "replicaCompletionCount", - type: { - name: "Number" - } - }, - parallelism: { - serializedName: "parallelism", + value: { + serializedName: "value", + required: true, type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Replica" + } + } } } } } }; -export const JobConfigurationScheduleTriggerConfig: coreClient.CompositeMapper = { +export const DiagnosticsCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobConfigurationScheduleTriggerConfig", + className: "DiagnosticsCollection", modelProperties: { - replicaCompletionCount: { - serializedName: "replicaCompletionCount", - type: { - name: "Number" - } - }, - cronExpression: { - serializedName: "cronExpression", + value: { + serializedName: "value", required: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Diagnostics" + } + } } }, - parallelism: { - serializedName: "parallelism", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { - name: "Number" + name: "String" } } } } }; -export const JobTemplate: coreClient.CompositeMapper = { +export const DiagnosticsProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobTemplate", + className: "DiagnosticsProperties", modelProperties: { - initContainers: { - serializedName: "initContainers", + metadata: { + serializedName: "metadata", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "InitContainer" - } - } + name: "Composite", + className: "DiagnosticsDefinition" } }, - containers: { - serializedName: "containers", + dataset: { + serializedName: "dataset", type: { name: "Sequence", element: { type: { name: "Composite", - className: "Container" + className: "DiagnosticsDataApiResponse" } } } }, - volumes: { - serializedName: "volumes", + status: { + serializedName: "status", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Volume" - } - } + name: "Composite", + className: "DiagnosticsStatus" + } + }, + dataProviderMetadata: { + serializedName: "dataProviderMetadata", + type: { + name: "Composite", + className: "DiagnosticDataProviderMetadata" } } } } }; -export const JobPatchProperties: coreClient.CompositeMapper = { +export const DiagnosticsDefinition: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobPatchProperties", + className: "DiagnosticsDefinition", modelProperties: { - identity: { - serializedName: "identity", + id: { + serializedName: "id", + readOnly: true, type: { - name: "Composite", - className: "ManagedServiceIdentity" + name: "String" } }, - tags: { - serializedName: "tags", + name: { + serializedName: "name", + readOnly: true, type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" } }, - properties: { - serializedName: "properties", + description: { + serializedName: "description", + readOnly: true, type: { - name: "Composite", - className: "JobPatchPropertiesProperties" + name: "String" } - } - } - } -}; - -export const JobPatchPropertiesProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "JobPatchPropertiesProperties", - modelProperties: { - environmentId: { - serializedName: "environmentId", + }, + author: { + serializedName: "author", + readOnly: true, type: { name: "String" } }, - configuration: { - serializedName: "configuration", + category: { + serializedName: "category", + readOnly: true, type: { - name: "Composite", - className: "JobConfiguration" + name: "String" } }, - template: { - serializedName: "template", + supportTopicList: { + serializedName: "supportTopicList", type: { - name: "Composite", - className: "JobTemplate" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DiagnosticSupportTopic" + } + } } }, - outboundIpAddresses: { - serializedName: "outboundIpAddresses", + analysisTypes: { + serializedName: "analysisTypes", type: { name: "Sequence", element: { @@ -3596,187 +3665,221 @@ export const JobPatchPropertiesProperties: coreClient.CompositeMapper = { } } }, - eventStreamEndpoint: { - serializedName: "eventStreamEndpoint", + type: { + serializedName: "type", + readOnly: true, type: { name: "String" } + }, + score: { + serializedName: "score", + readOnly: true, + type: { + name: "Number" + } } } } }; -export const JobExecutionTemplate: coreClient.CompositeMapper = { +export const DiagnosticSupportTopic: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobExecutionTemplate", + className: "DiagnosticSupportTopic", modelProperties: { - containers: { - serializedName: "containers", + id: { + serializedName: "id", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JobExecutionContainer" - } - } + name: "String" } }, - initContainers: { - serializedName: "initContainers", + pesId: { + serializedName: "pesId", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JobExecutionContainer" - } - } + name: "String" } } } } }; -export const JobExecutionContainer: coreClient.CompositeMapper = { +export const DiagnosticsDataApiResponse: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobExecutionContainer", + className: "DiagnosticsDataApiResponse", modelProperties: { - image: { - serializedName: "image", + table: { + serializedName: "table", type: { - name: "String" + name: "Composite", + className: "DiagnosticDataTableResponseObject" } }, - name: { - serializedName: "name", + renderingProperties: { + serializedName: "renderingProperties", + type: { + name: "Composite", + className: "DiagnosticRendering" + } + } + } + } +}; + +export const DiagnosticDataTableResponseObject: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiagnosticDataTableResponseObject", + modelProperties: { + tableName: { + serializedName: "tableName", type: { name: "String" } }, - command: { - serializedName: "command", + columns: { + serializedName: "columns", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "DiagnosticDataTableResponseColumn" } } } }, - args: { - serializedName: "args", + rows: { + serializedName: "rows", type: { name: "Sequence", element: { type: { - name: "String" + name: "Dictionary", + value: { type: { name: "any" } } } } } + } + } + } +}; + +export const DiagnosticDataTableResponseColumn: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiagnosticDataTableResponseColumn", + modelProperties: { + columnName: { + serializedName: "columnName", + type: { + name: "String" + } }, - env: { - serializedName: "env", + dataType: { + serializedName: "dataType", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EnvironmentVar" - } - } + name: "String" } }, - resources: { - serializedName: "resources", + columnType: { + serializedName: "columnType", type: { - name: "Composite", - className: "ContainerResources" + name: "String" } } } } }; -export const JobExecutionBase: coreClient.CompositeMapper = { +export const DiagnosticRendering: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobExecutionBase", + className: "DiagnosticRendering", modelProperties: { - name: { - serializedName: "name", + type: { + serializedName: "type", + type: { + name: "Number" + } + }, + title: { + serializedName: "title", type: { name: "String" } }, - id: { - serializedName: "id", + description: { + serializedName: "description", type: { name: "String" } + }, + isVisible: { + serializedName: "isVisible", + type: { + name: "Boolean" + } } } } }; -export const JobExecutionNamesCollection: coreClient.CompositeMapper = { +export const DiagnosticsStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobExecutionNamesCollection", + className: "DiagnosticsStatus", modelProperties: { - value: { - serializedName: "value", - required: true, + message: { + serializedName: "message", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JobExecutionBase" - } - } + name: "String" + } + }, + statusId: { + serializedName: "statusId", + type: { + name: "Number" } } } } }; -export const ContainerAppJobExecutions: coreClient.CompositeMapper = { +export const DiagnosticDataProviderMetadata: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerAppJobExecutions", + className: "DiagnosticDataProviderMetadata", modelProperties: { - value: { - serializedName: "value", - required: true, + providerName: { + serializedName: "providerName", + type: { + name: "String" + } + }, + propertyBag: { + serializedName: "propertyBag", type: { name: "Sequence", element: { type: { name: "Composite", - className: "JobExecution" + className: "DiagnosticDataProviderMetadataPropertyBagItem" } } } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } } } } }; -export const JobExecution: coreClient.CompositeMapper = { +export const DiagnosticDataProviderMetadataPropertyBagItem: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobExecution", + className: "DiagnosticDataProviderMetadataPropertyBagItem", modelProperties: { name: { serializedName: "name", @@ -3784,91 +3887,90 @@ export const JobExecution: coreClient.CompositeMapper = { name: "String" } }, - id: { - serializedName: "id", - type: { - name: "String" - } - }, - type: { - serializedName: "type", - type: { - name: "String" - } - }, - status: { - serializedName: "status", - readOnly: true, + value: { + serializedName: "value", type: { name: "String" } + } + } + } +}; + +export const VnetConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VnetConfiguration", + modelProperties: { + internal: { + serializedName: "internal", + type: { + name: "Boolean" + } }, - startTime: { - serializedName: "startTime", + infrastructureSubnetId: { + serializedName: "infrastructureSubnetId", type: { - name: "DateTime" + name: "String" } }, - endTime: { - serializedName: "endTime", + dockerBridgeCidr: { + serializedName: "dockerBridgeCidr", type: { - name: "DateTime" + name: "String" } }, - template: { - serializedName: "template", + platformReservedCidr: { + serializedName: "platformReservedCidr", type: { - name: "Composite", - className: "JobExecutionTemplate" + name: "String" + } + }, + platformReservedDnsIP: { + serializedName: "platformReservedDnsIP", + type: { + name: "String" } } } } }; -export const JobSecretsCollection: coreClient.CompositeMapper = { +export const AppLogsConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobSecretsCollection", + className: "AppLogsConfiguration", modelProperties: { - value: { - serializedName: "value", - required: true, + destination: { + serializedName: "destination", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Secret" - } - } + name: "String" + } + }, + logAnalyticsConfiguration: { + serializedName: "logAnalyticsConfiguration", + type: { + name: "Composite", + className: "LogAnalyticsConfiguration" } } } } }; -export const RevisionCollection: coreClient.CompositeMapper = { +export const LogAnalyticsConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RevisionCollection", + className: "LogAnalyticsConfiguration", modelProperties: { - value: { - serializedName: "value", - required: true, + customerId: { + serializedName: "customerId", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Revision" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + sharedKey: { + serializedName: "sharedKey", type: { name: "String" } @@ -3877,50 +3979,64 @@ export const RevisionCollection: coreClient.CompositeMapper = { } }; -export const ReplicaContainer: coreClient.CompositeMapper = { +export const WorkloadProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ReplicaContainer", + className: "WorkloadProfile", modelProperties: { name: { serializedName: "name", + required: true, type: { name: "String" } }, - containerId: { - serializedName: "containerId", + workloadProfileType: { + serializedName: "workloadProfileType", + required: true, type: { name: "String" } }, - ready: { - serializedName: "ready", - type: { - name: "Boolean" - } - }, - started: { - serializedName: "started", + minimumCount: { + serializedName: "minimumCount", type: { - name: "Boolean" + name: "Number" } }, - restartCount: { - serializedName: "restartCount", + maximumCount: { + serializedName: "maximumCount", type: { name: "Number" } - }, - logStreamEndpoint: { - serializedName: "logStreamEndpoint", + } + } + } +}; + +export const KedaConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "KedaConfiguration", + modelProperties: { + version: { + serializedName: "version", readOnly: true, type: { name: "String" } - }, - execEndpoint: { - serializedName: "execEndpoint", + } + } + } +}; + +export const DaprConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DaprConfiguration", + modelProperties: { + version: { + serializedName: "version", readOnly: true, type: { name: "String" @@ -3930,49 +4046,56 @@ export const ReplicaContainer: coreClient.CompositeMapper = { } }; -export const ReplicaCollection: coreClient.CompositeMapper = { +export const ManagedEnvironmentPropertiesPeerAuthentication: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ReplicaCollection", + className: "ManagedEnvironmentPropertiesPeerAuthentication", modelProperties: { - value: { - serializedName: "value", - required: true, + mtls: { + serializedName: "mtls", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Replica" - } - } + name: "Composite", + className: "Mtls" } } } } }; -export const DiagnosticsCollection: coreClient.CompositeMapper = { +export const Mtls: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticsCollection", + className: "Mtls", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + } + } + } +}; + +export const AvailableOperations: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AvailableOperations", modelProperties: { value: { serializedName: "value", - required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "Diagnostics" + className: "OperationDetail" } } } }, nextLink: { serializedName: "nextLink", - readOnly: true, type: { name: "String" } @@ -3981,314 +4104,372 @@ export const DiagnosticsCollection: coreClient.CompositeMapper = { } }; -export const DiagnosticsProperties: coreClient.CompositeMapper = { +export const OperationDetail: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticsProperties", + className: "OperationDetail", modelProperties: { - metadata: { - serializedName: "metadata", + name: { + serializedName: "name", type: { - name: "Composite", - className: "DiagnosticsDefinition" + name: "String" } }, - dataset: { - serializedName: "dataset", + isDataAction: { + serializedName: "isDataAction", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DiagnosticsDataApiResponse" - } - } + name: "Boolean" } }, - status: { - serializedName: "status", + display: { + serializedName: "display", type: { name: "Composite", - className: "DiagnosticsStatus" + className: "OperationDisplay" } }, - dataProviderMetadata: { - serializedName: "dataProviderMetadata", + origin: { + serializedName: "origin", type: { - name: "Composite", - className: "DiagnosticDataProviderMetadata" + name: "String" } } } } }; -export const DiagnosticsDefinition: coreClient.CompositeMapper = { +export const OperationDisplay: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticsDefinition", + className: "OperationDisplay", modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, + provider: { + serializedName: "provider", type: { name: "String" } }, - description: { - serializedName: "description", - readOnly: true, + resource: { + serializedName: "resource", type: { name: "String" } }, - author: { - serializedName: "author", - readOnly: true, + operation: { + serializedName: "operation", type: { name: "String" } }, - category: { - serializedName: "category", - readOnly: true, + description: { + serializedName: "description", type: { name: "String" } - }, - supportTopicList: { - serializedName: "supportTopicList", + } + } + } +}; + +export const JobsCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobsCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "DiagnosticSupportTopic" + className: "Job" } } } }, - analysisTypes: { - serializedName: "analysisTypes", + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const JobConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobConfiguration", + modelProperties: { + secrets: { + serializedName: "secrets", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "Secret" } } } }, - type: { - serializedName: "type", - readOnly: true, + triggerType: { + defaultValue: "Manual", + serializedName: "triggerType", + required: true, type: { name: "String" } }, - score: { - serializedName: "score", - readOnly: true, + replicaTimeout: { + serializedName: "replicaTimeout", + required: true, type: { name: "Number" } - } - } - } -}; - -export const DiagnosticSupportTopic: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DiagnosticSupportTopic", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, + }, + replicaRetryLimit: { + serializedName: "replicaRetryLimit", type: { - name: "String" + name: "Number" } }, - pesId: { - serializedName: "pesId", - readOnly: true, + manualTriggerConfig: { + serializedName: "manualTriggerConfig", type: { - name: "String" + name: "Composite", + className: "JobConfigurationManualTriggerConfig" + } + }, + scheduleTriggerConfig: { + serializedName: "scheduleTriggerConfig", + type: { + name: "Composite", + className: "JobConfigurationScheduleTriggerConfig" + } + }, + eventTriggerConfig: { + serializedName: "eventTriggerConfig", + type: { + name: "Composite", + className: "JobConfigurationEventTriggerConfig" + } + }, + registries: { + serializedName: "registries", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RegistryCredentials" + } + } } } } } }; -export const DiagnosticsDataApiResponse: coreClient.CompositeMapper = { +export const JobConfigurationManualTriggerConfig: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticsDataApiResponse", + className: "JobConfigurationManualTriggerConfig", modelProperties: { - table: { - serializedName: "table", + replicaCompletionCount: { + serializedName: "replicaCompletionCount", type: { - name: "Composite", - className: "DiagnosticDataTableResponseObject" + name: "Number" } }, - renderingProperties: { - serializedName: "renderingProperties", + parallelism: { + serializedName: "parallelism", type: { - name: "Composite", - className: "DiagnosticRendering" + name: "Number" } } } } }; -export const DiagnosticDataTableResponseObject: coreClient.CompositeMapper = { +export const JobConfigurationScheduleTriggerConfig: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticDataTableResponseObject", + className: "JobConfigurationScheduleTriggerConfig", modelProperties: { - tableName: { - serializedName: "tableName", + replicaCompletionCount: { + serializedName: "replicaCompletionCount", type: { - name: "String" + name: "Number" } }, - columns: { - serializedName: "columns", + cronExpression: { + serializedName: "cronExpression", + required: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DiagnosticDataTableResponseColumn" - } - } + name: "String" } }, - rows: { - serializedName: "rows", + parallelism: { + serializedName: "parallelism", type: { - name: "Sequence", - element: { - type: { - name: "Dictionary", - value: { type: { name: "any" } } - } - } + name: "Number" } } } } }; -export const DiagnosticDataTableResponseColumn: coreClient.CompositeMapper = { +export const JobConfigurationEventTriggerConfig: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticDataTableResponseColumn", + className: "JobConfigurationEventTriggerConfig", modelProperties: { - columnName: { - serializedName: "columnName", + replicaCompletionCount: { + serializedName: "replicaCompletionCount", type: { - name: "String" + name: "Number" } }, - dataType: { - serializedName: "dataType", + parallelism: { + serializedName: "parallelism", type: { - name: "String" + name: "Number" } }, - columnType: { - serializedName: "columnType", + scale: { + serializedName: "scale", type: { - name: "String" + name: "Composite", + className: "JobScale" } } } } }; -export const DiagnosticRendering: coreClient.CompositeMapper = { +export const JobScale: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticRendering", + className: "JobScale", modelProperties: { - type: { - serializedName: "type", + pollingInterval: { + serializedName: "pollingInterval", type: { name: "Number" } }, - title: { - serializedName: "title", + minExecutions: { + defaultValue: 0, + serializedName: "minExecutions", type: { - name: "String" + name: "Number" } }, - description: { - serializedName: "description", + maxExecutions: { + defaultValue: 100, + serializedName: "maxExecutions", type: { - name: "String" + name: "Number" } }, - isVisible: { - serializedName: "isVisible", + rules: { + serializedName: "rules", type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JobScaleRule" + } + } } } } } }; -export const DiagnosticsStatus: coreClient.CompositeMapper = { +export const JobScaleRule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticsStatus", + className: "JobScaleRule", modelProperties: { - message: { - serializedName: "message", + name: { + serializedName: "name", type: { name: "String" } }, - statusId: { - serializedName: "statusId", + type: { + serializedName: "type", type: { - name: "Number" + name: "String" + } + }, + metadata: { + serializedName: "metadata", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + auth: { + serializedName: "auth", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScaleRuleAuth" + } + } } } } } }; -export const DiagnosticDataProviderMetadata: coreClient.CompositeMapper = { +export const JobTemplate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticDataProviderMetadata", + className: "JobTemplate", modelProperties: { - providerName: { - serializedName: "providerName", + initContainers: { + serializedName: "initContainers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InitContainer" + } + } + } + }, + containers: { + serializedName: "containers", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Container" + } + } } }, - propertyBag: { - serializedName: "propertyBag", + volumes: { + serializedName: "volumes", type: { name: "Sequence", element: { type: { name: "Composite", - className: "DiagnosticDataProviderMetadataPropertyBagItem" + className: "Volume" } } } @@ -4297,58 +4478,74 @@ export const DiagnosticDataProviderMetadata: coreClient.CompositeMapper = { } }; -export const DiagnosticDataProviderMetadataPropertyBagItem: coreClient.CompositeMapper = { +export const JobPatchProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticDataProviderMetadataPropertyBagItem", + className: "JobPatchProperties", modelProperties: { - name: { - serializedName: "name", + identity: { + serializedName: "identity", type: { - name: "String" + name: "Composite", + className: "ManagedServiceIdentity" } }, - value: { - serializedName: "value", + tags: { + serializedName: "tags", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "JobPatchPropertiesProperties" } } } } }; -export const VnetConfiguration: coreClient.CompositeMapper = { +export const JobPatchPropertiesProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VnetConfiguration", + className: "JobPatchPropertiesProperties", modelProperties: { - internal: { - serializedName: "internal", + environmentId: { + serializedName: "environmentId", type: { - name: "Boolean" + name: "String" } }, - infrastructureSubnetId: { - serializedName: "infrastructureSubnetId", + configuration: { + serializedName: "configuration", type: { - name: "String" + name: "Composite", + className: "JobConfiguration" } }, - dockerBridgeCidr: { - serializedName: "dockerBridgeCidr", + template: { + serializedName: "template", type: { - name: "String" + name: "Composite", + className: "JobTemplate" } }, - platformReservedCidr: { - serializedName: "platformReservedCidr", + outboundIpAddresses: { + serializedName: "outboundIpAddresses", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - platformReservedDnsIP: { - serializedName: "platformReservedDnsIP", + eventStreamEndpoint: { + serializedName: "eventStreamEndpoint", type: { name: "String" } @@ -4357,108 +4554,114 @@ export const VnetConfiguration: coreClient.CompositeMapper = { } }; -export const AppLogsConfiguration: coreClient.CompositeMapper = { +export const JobExecutionTemplate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AppLogsConfiguration", + className: "JobExecutionTemplate", modelProperties: { - destination: { - serializedName: "destination", + containers: { + serializedName: "containers", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JobExecutionContainer" + } + } } }, - logAnalyticsConfiguration: { - serializedName: "logAnalyticsConfiguration", + initContainers: { + serializedName: "initContainers", type: { - name: "Composite", - className: "LogAnalyticsConfiguration" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JobExecutionContainer" + } + } } } } } }; -export const LogAnalyticsConfiguration: coreClient.CompositeMapper = { +export const JobExecutionContainer: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LogAnalyticsConfiguration", + className: "JobExecutionContainer", modelProperties: { - customerId: { - serializedName: "customerId", + image: { + serializedName: "image", type: { name: "String" } }, - sharedKey: { - serializedName: "sharedKey", - type: { - name: "String" - } - } - } - } -}; - -export const WorkloadProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkloadProfile", - modelProperties: { name: { serializedName: "name", - required: true, type: { name: "String" } }, - workloadProfileType: { - serializedName: "workloadProfileType", - required: true, + command: { + serializedName: "command", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - minimumCount: { - serializedName: "minimumCount", + args: { + serializedName: "args", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - maximumCount: { - serializedName: "maximumCount", + env: { + serializedName: "env", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EnvironmentVar" + } + } + } + }, + resources: { + serializedName: "resources", + type: { + name: "Composite", + className: "ContainerResources" } } } } }; -export const KedaConfiguration: coreClient.CompositeMapper = { +export const JobExecutionBase: coreClient.CompositeMapper = { type: { name: "Composite", - className: "KedaConfiguration", + className: "JobExecutionBase", modelProperties: { - version: { - serializedName: "version", - readOnly: true, + name: { + serializedName: "name", type: { name: "String" } - } - } - } -}; - -export const DaprConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DaprConfiguration", - modelProperties: { - version: { - serializedName: "version", - readOnly: true, + }, + id: { + serializedName: "id", type: { name: "String" } @@ -4467,25 +4670,27 @@ export const DaprConfiguration: coreClient.CompositeMapper = { } }; -export const AvailableOperations: coreClient.CompositeMapper = { +export const ContainerAppJobExecutions: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AvailableOperations", + className: "ContainerAppJobExecutions", modelProperties: { value: { serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "OperationDetail" + className: "JobExecution" } } } }, nextLink: { serializedName: "nextLink", + readOnly: true, type: { name: "String" } @@ -4494,10 +4699,10 @@ export const AvailableOperations: coreClient.CompositeMapper = { } }; -export const OperationDetail: coreClient.CompositeMapper = { +export const JobExecution: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationDetail", + className: "JobExecution", modelProperties: { name: { serializedName: "name", @@ -4505,56 +4710,64 @@ export const OperationDetail: coreClient.CompositeMapper = { name: "String" } }, - isDataAction: { - serializedName: "isDataAction", - type: { - name: "Boolean" - } - }, - display: { - serializedName: "display", + id: { + serializedName: "id", type: { - name: "Composite", - className: "OperationDisplay" + name: "String" } }, - origin: { - serializedName: "origin", + type: { + serializedName: "type", type: { name: "String" } - } - } - } -}; - -export const OperationDisplay: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationDisplay", - modelProperties: { - provider: { - serializedName: "provider", + }, + status: { + serializedName: "status", + readOnly: true, type: { name: "String" } }, - resource: { - serializedName: "resource", + startTime: { + serializedName: "startTime", type: { - name: "String" + name: "DateTime" } }, - operation: { - serializedName: "operation", + endTime: { + serializedName: "endTime", type: { - name: "String" + name: "DateTime" } }, - description: { - serializedName: "description", + template: { + serializedName: "template", type: { - name: "String" + name: "Composite", + className: "JobExecutionTemplate" + } + } + } + } +}; + +export const JobSecretsCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobSecretsCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Secret" + } + } } } } @@ -4825,6 +5038,12 @@ export const GithubActionConfiguration: coreClient.CompositeMapper = { name: "String" } }, + githubPersonalAccessToken: { + serializedName: "githubPersonalAccessToken", + type: { + name: "String" + } + }, image: { serializedName: "image", type: { @@ -4909,6 +5128,12 @@ export const AzureCredentials: coreClient.CompositeMapper = { name: "String" } }, + kind: { + serializedName: "kind", + type: { + name: "String" + } + }, subscriptionId: { serializedName: "subscriptionId", type: { @@ -4919,6 +5144,28 @@ export const AzureCredentials: coreClient.CompositeMapper = { } }; +export const JobExecutionNamesCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobExecutionNamesCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JobExecutionBase" + } + } + } + } + } + } +}; + export const ProxyResource: coreClient.CompositeMapper = { type: { name: "Composite", @@ -5244,6 +5491,13 @@ export const Revision: coreClient.CompositeMapper = { type: { name: "String" } + }, + runningState: { + serializedName: "properties.runningState", + readOnly: true, + type: { + name: "String" + } } } } @@ -5262,6 +5516,20 @@ export const Replica: coreClient.CompositeMapper = { name: "DateTime" } }, + runningState: { + serializedName: "properties.runningState", + readOnly: true, + type: { + name: "String" + } + }, + runningStateDetails: { + serializedName: "properties.runningStateDetails", + readOnly: true, + type: { + name: "String" + } + }, containers: { serializedName: "properties.containers", type: { @@ -5273,6 +5541,18 @@ export const Replica: coreClient.CompositeMapper = { } } } + }, + initContainers: { + serializedName: "properties.initContainers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReplicaContainer" + } + } + } } } } @@ -5579,75 +5859,6 @@ export const ContainerAppAuthToken: coreClient.CompositeMapper = { } }; -export const Job: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Job", - modelProperties: { - ...TrackedResource.type.modelProperties, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "ManagedServiceIdentity" - } - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String" - } - }, - environmentId: { - serializedName: "properties.environmentId", - type: { - name: "String" - } - }, - workloadProfileName: { - serializedName: "properties.workloadProfileName", - type: { - name: "String" - } - }, - configuration: { - serializedName: "properties.configuration", - type: { - name: "Composite", - className: "JobConfiguration" - } - }, - template: { - serializedName: "properties.template", - type: { - name: "Composite", - className: "JobTemplate" - } - }, - outboundIpAddresses: { - serializedName: "properties.outboundIpAddresses", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - eventStreamEndpoint: { - serializedName: "properties.eventStreamEndpoint", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - export const ManagedEnvironment: coreClient.CompositeMapper = { type: { name: "Composite", @@ -5765,6 +5976,82 @@ export const ManagedEnvironment: coreClient.CompositeMapper = { type: { name: "String" } + }, + peerAuthentication: { + serializedName: "properties.peerAuthentication", + type: { + name: "Composite", + className: "ManagedEnvironmentPropertiesPeerAuthentication" + } + } + } + } +}; + +export const Job: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Job", + modelProperties: { + ...TrackedResource.type.modelProperties, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ManagedServiceIdentity" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + environmentId: { + serializedName: "properties.environmentId", + type: { + name: "String" + } + }, + workloadProfileName: { + serializedName: "properties.workloadProfileName", + type: { + name: "String" + } + }, + configuration: { + serializedName: "properties.configuration", + type: { + name: "Composite", + className: "JobConfiguration" + } + }, + template: { + serializedName: "properties.template", + type: { + name: "Composite", + className: "JobTemplate" + } + }, + outboundIpAddresses: { + serializedName: "properties.outboundIpAddresses", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + eventStreamEndpoint: { + serializedName: "properties.eventStreamEndpoint", + readOnly: true, + type: { + name: "String" + } } } } @@ -5856,6 +6143,36 @@ export const ContainerAppsUpdateHeaders: coreClient.CompositeMapper = { } }; +export const ContainerAppsStartHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerAppsStartHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const ContainerAppsStopHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerAppsStopHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + export const JobsDeleteHeaders: coreClient.CompositeMapper = { type: { name: "Composite", diff --git a/sdk/appcontainers/arm-appcontainers/src/models/parameters.ts b/sdk/appcontainers/arm-appcontainers/src/models/parameters.ts index d7bcee45d281..5aa9889b04df 100644 --- a/sdk/appcontainers/arm-appcontainers/src/models/parameters.ts +++ b/sdk/appcontainers/arm-appcontainers/src/models/parameters.ts @@ -23,7 +23,6 @@ import { Job as JobMapper, JobPatchProperties as JobPatchPropertiesMapper, JobExecutionTemplate as JobExecutionTemplateMapper, - JobExecutionNamesCollection as JobExecutionNamesCollectionMapper, ManagedEnvironment as ManagedEnvironmentMapper, ManagedCertificate as ManagedCertificateMapper, ManagedCertificatePatch as ManagedCertificatePatchMapper, @@ -98,7 +97,7 @@ export const containerAppName: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-11-01-preview", + defaultValue: "2023-05-01", isConstant: true, serializedName: "api-version", type: { @@ -250,53 +249,13 @@ export const customHostname: OperationQueryParameter = { } }; -export const jobName: OperationURLParameter = { - parameterPath: "jobName", - mapper: { - constraints: { - Pattern: new RegExp("^[-\\w\\._\\(\\)]+$") - }, - serializedName: "jobName", - required: true, - type: { - name: "String" - } - } -}; - -export const jobEnvelope: OperationParameter = { - parameterPath: "jobEnvelope", - mapper: JobMapper -}; - -export const jobName1: OperationURLParameter = { - parameterPath: "jobName", - mapper: { - serializedName: "jobName", - required: true, - type: { - name: "String" - } - } -}; - -export const jobEnvelope1: OperationParameter = { - parameterPath: "jobEnvelope", - mapper: JobPatchPropertiesMapper -}; - -export const template: OperationParameter = { - parameterPath: "template", - mapper: JobExecutionTemplateMapper -}; - -export const jobExecutionName: OperationURLParameter = { - parameterPath: "jobExecutionName", +export const containerAppName1: OperationURLParameter = { + parameterPath: "containerAppName", mapper: { constraints: { Pattern: new RegExp("^[-\\w\\._\\(\\)]+$") }, - serializedName: "jobExecutionName", + serializedName: "containerAppName", required: true, type: { name: "String" @@ -304,11 +263,6 @@ export const jobExecutionName: OperationURLParameter = { } }; -export const jobExecutionName1: OperationParameter = { - parameterPath: "jobExecutionName", - mapper: JobExecutionNamesCollectionMapper -}; - export const filter: OperationQueryParameter = { parameterPath: ["options", "filter"], mapper: { @@ -363,6 +317,49 @@ export const environmentName: OperationURLParameter = { } }; +export const jobName: OperationURLParameter = { + parameterPath: "jobName", + mapper: { + constraints: { + Pattern: new RegExp("^[-\\w\\._\\(\\)]+$") + }, + serializedName: "jobName", + required: true, + type: { + name: "String" + } + } +}; + +export const jobEnvelope: OperationParameter = { + parameterPath: "jobEnvelope", + mapper: JobMapper +}; + +export const jobEnvelope1: OperationParameter = { + parameterPath: "jobEnvelope", + mapper: JobPatchPropertiesMapper +}; + +export const template: OperationParameter = { + parameterPath: ["options", "template"], + mapper: JobExecutionTemplateMapper +}; + +export const jobExecutionName: OperationURLParameter = { + parameterPath: "jobExecutionName", + mapper: { + constraints: { + Pattern: new RegExp("^[-\\w\\._\\(\\)]+$") + }, + serializedName: "jobExecutionName", + required: true, + type: { + name: "String" + } + } +}; + export const environmentEnvelope1: OperationParameter = { parameterPath: "environmentEnvelope", mapper: ManagedEnvironmentMapper diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/containerApps.ts b/sdk/appcontainers/arm-appcontainers/src/operations/containerApps.ts index 0293fbdf4e9c..282fdf98cfa7 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/containerApps.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/containerApps.ts @@ -40,6 +40,10 @@ import { ContainerAppsListSecretsResponse, ContainerAppsGetAuthTokenOptionalParams, ContainerAppsGetAuthTokenResponse, + ContainerAppsStartOptionalParams, + ContainerAppsStartResponse, + ContainerAppsStopOptionalParams, + ContainerAppsStopResponse, ContainerAppsListBySubscriptionNextResponse, ContainerAppsListByResourceGroupNextResponse } from "../models"; @@ -560,6 +564,188 @@ export class ContainerAppsImpl implements ContainerApps { ); } + /** + * Start a container app + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param options The options parameters. + */ + async beginStart( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsStartOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ContainerAppsStartResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, containerAppName, options }, + spec: startOperationSpec + }); + const poller = await createHttpPoller< + ContainerAppsStartResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Start a container app + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param options The options parameters. + */ + async beginStartAndWait( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsStartOptionalParams + ): Promise { + const poller = await this.beginStart( + resourceGroupName, + containerAppName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Stop a container app + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param options The options parameters. + */ + async beginStop( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsStopOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ContainerAppsStopResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, containerAppName, options }, + spec: stopOperationSpec + }); + const poller = await createHttpPoller< + ContainerAppsStopResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Stop a container app + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param options The options parameters. + */ + async beginStopAndWait( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsStopOptionalParams + ): Promise { + const poller = await this.beginStop( + resourceGroupName, + containerAppName, + options + ); + return poller.pollUntilDone(); + } + /** * ListBySubscriptionNext * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. @@ -815,6 +1001,68 @@ const getAuthTokenOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const startOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/start", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ContainerApp + }, + 201: { + bodyMapper: Mappers.ContainerApp + }, + 202: { + bodyMapper: Mappers.ContainerApp + }, + 204: { + bodyMapper: Mappers.ContainerApp + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName1 + ], + headerParameters: [Parameters.accept], + serializer +}; +const stopOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/stop", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ContainerApp + }, + 201: { + bodyMapper: Mappers.ContainerApp + }, + 202: { + bodyMapper: Mappers.ContainerApp + }, + 204: { + bodyMapper: Mappers.ContainerApp + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName1 + ], + headerParameters: [Parameters.accept], + serializer +}; const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/index.ts b/sdk/appcontainers/arm-appcontainers/src/operations/index.ts index 7a650950fdbc..caa835d7eb68 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/index.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/index.ts @@ -14,14 +14,14 @@ export * from "./connectedEnvironmentsCertificates"; export * from "./connectedEnvironmentsDaprComponents"; export * from "./connectedEnvironmentsStorages"; export * from "./containerApps"; -export * from "./jobs"; -export * from "./jobsExecutions"; export * from "./containerAppsRevisions"; export * from "./containerAppsRevisionReplicas"; export * from "./containerAppsDiagnostics"; export * from "./managedEnvironmentDiagnostics"; export * from "./managedEnvironmentsDiagnostics"; export * from "./operations"; +export * from "./jobs"; +export * from "./jobsExecutions"; export * from "./managedEnvironments"; export * from "./certificates"; export * from "./managedCertificates"; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/jobs.ts b/sdk/appcontainers/arm-appcontainers/src/operations/jobs.ts index 6e20e44af0c2..35c3adee7fdc 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/jobs.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/jobs.ts @@ -35,11 +35,9 @@ import { JobPatchProperties, JobsUpdateOptionalParams, JobsUpdateResponse, - JobExecutionTemplate, JobsStartOptionalParams, JobsStartResponse, JobsStopExecutionOptionalParams, - JobExecutionNamesCollection, JobsStopMultipleExecutionsOptionalParams, JobsStopMultipleExecutionsResponse, JobsListSecretsOptionalParams, @@ -215,7 +213,7 @@ export class JobsImpl implements Jobs { /** * Get the properties of a Container Apps Job. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param options The options parameters. */ get( @@ -232,7 +230,7 @@ export class JobsImpl implements Jobs { /** * Create or Update a Container Apps Job. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param jobEnvelope Properties used to create a container apps job * @param options The options parameters. */ @@ -306,7 +304,7 @@ export class JobsImpl implements Jobs { /** * Create or Update a Container Apps Job. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param jobEnvelope Properties used to create a container apps job * @param options The options parameters. */ @@ -328,7 +326,7 @@ export class JobsImpl implements Jobs { /** * Delete a Container Apps Job. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param options The options parameters. */ async beginDelete( @@ -392,7 +390,7 @@ export class JobsImpl implements Jobs { /** * Delete a Container Apps Job. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param options The options parameters. */ async beginDeleteAndWait( @@ -407,7 +405,7 @@ export class JobsImpl implements Jobs { /** * Patches a Container Apps Job using JSON Merge Patch * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param jobEnvelope Properties used to create a container apps job * @param options The options parameters. */ @@ -477,7 +475,7 @@ export class JobsImpl implements Jobs { /** * Patches a Container Apps Job using JSON Merge Patch * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param jobEnvelope Properties used to create a container apps job * @param options The options parameters. */ @@ -499,14 +497,12 @@ export class JobsImpl implements Jobs { /** * Start a Container Apps Job * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. - * @param template Properties used to start a job instance. + * @param jobName Job Name * @param options The options parameters. */ async beginStart( resourceGroupName: string, jobName: string, - template: JobExecutionTemplate, options?: JobsStartOptionalParams ): Promise< SimplePollerLike, JobsStartResponse> @@ -552,7 +548,7 @@ export class JobsImpl implements Jobs { const lro = createLroSpec({ sendOperationFn, - args: { resourceGroupName, jobName, template, options }, + args: { resourceGroupName, jobName, options }, spec: startOperationSpec }); const poller = await createHttpPoller< @@ -570,29 +566,22 @@ export class JobsImpl implements Jobs { /** * Start a Container Apps Job * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. - * @param template Properties used to start a job instance. + * @param jobName Job Name * @param options The options parameters. */ async beginStartAndWait( resourceGroupName: string, jobName: string, - template: JobExecutionTemplate, options?: JobsStartOptionalParams ): Promise { - const poller = await this.beginStart( - resourceGroupName, - jobName, - template, - options - ); + const poller = await this.beginStart(resourceGroupName, jobName, options); return poller.pollUntilDone(); } /** * Terminates execution of a running container apps job * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param jobExecutionName Job execution name. * @param options The options parameters. */ @@ -658,7 +647,7 @@ export class JobsImpl implements Jobs { /** * Terminates execution of a running container apps job * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param jobExecutionName Job execution name. * @param options The options parameters. */ @@ -680,14 +669,12 @@ export class JobsImpl implements Jobs { /** * Terminates execution of a running container apps job * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. - * @param jobExecutionName List of all job executions that should be stopped. + * @param jobName Job Name * @param options The options parameters. */ async beginStopMultipleExecutions( resourceGroupName: string, jobName: string, - jobExecutionName: JobExecutionNamesCollection, options?: JobsStopMultipleExecutionsOptionalParams ): Promise< SimplePollerLike< @@ -736,7 +723,7 @@ export class JobsImpl implements Jobs { const lro = createLroSpec({ sendOperationFn, - args: { resourceGroupName, jobName, jobExecutionName, options }, + args: { resourceGroupName, jobName, options }, spec: stopMultipleExecutionsOperationSpec }); const poller = await createHttpPoller< @@ -754,20 +741,17 @@ export class JobsImpl implements Jobs { /** * Terminates execution of a running container apps job * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. - * @param jobExecutionName List of all job executions that should be stopped. + * @param jobName Job Name * @param options The options parameters. */ async beginStopMultipleExecutionsAndWait( resourceGroupName: string, jobName: string, - jobExecutionName: JobExecutionNamesCollection, options?: JobsStopMultipleExecutionsOptionalParams ): Promise { const poller = await this.beginStopMultipleExecutions( resourceGroupName, jobName, - jobExecutionName, options ); return poller.pollUntilDone(); @@ -776,7 +760,7 @@ export class JobsImpl implements Jobs { /** * List secrets for a container apps job * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param options The options parameters. */ listSecrets( @@ -911,7 +895,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.jobName1 + Parameters.jobName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -935,7 +919,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.jobName1 + Parameters.jobName ], headerParameters: [Parameters.accept], serializer @@ -967,7 +951,7 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.jobName1 + Parameters.jobName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -1051,7 +1035,6 @@ const stopMultipleExecutionsOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - requestBody: Parameters.jobExecutionName1, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -1059,8 +1042,7 @@ const stopMultipleExecutionsOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.jobName ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", + headerParameters: [Parameters.accept], serializer }; const listSecretsOperationSpec: coreClient.OperationSpec = { diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/jobsExecutions.ts b/sdk/appcontainers/arm-appcontainers/src/operations/jobsExecutions.ts index 46b05e90c511..fe4e4e00a8d9 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/jobsExecutions.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/jobsExecutions.ts @@ -37,7 +37,7 @@ export class JobsExecutionsImpl implements JobsExecutions { /** * Get a Container Apps Job's executions * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param options The options parameters. */ public list( @@ -113,7 +113,7 @@ export class JobsExecutionsImpl implements JobsExecutions { /** * Get a Container Apps Job's executions * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param options The options parameters. */ private _list( @@ -130,7 +130,7 @@ export class JobsExecutionsImpl implements JobsExecutions { /** * ListNext * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param nextLink The nextLink from the previous successful call to the List method. * @param options The options parameters. */ diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerApps.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerApps.ts index fa70e90ca85c..3cf4b242883e 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerApps.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerApps.ts @@ -24,7 +24,11 @@ import { ContainerAppsListSecretsOptionalParams, ContainerAppsListSecretsResponse, ContainerAppsGetAuthTokenOptionalParams, - ContainerAppsGetAuthTokenResponse + ContainerAppsGetAuthTokenResponse, + ContainerAppsStartOptionalParams, + ContainerAppsStartResponse, + ContainerAppsStopOptionalParams, + ContainerAppsStopResponse } from "../models"; /// @@ -174,4 +178,58 @@ export interface ContainerApps { containerAppName: string, options?: ContainerAppsGetAuthTokenOptionalParams ): Promise; + /** + * Start a container app + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param options The options parameters. + */ + beginStart( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsStartOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ContainerAppsStartResponse + > + >; + /** + * Start a container app + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param options The options parameters. + */ + beginStartAndWait( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsStartOptionalParams + ): Promise; + /** + * Stop a container app + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param options The options parameters. + */ + beginStop( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsStopOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ContainerAppsStopResponse + > + >; + /** + * Stop a container app + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param options The options parameters. + */ + beginStopAndWait( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsStopOptionalParams + ): Promise; } diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/index.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/index.ts index 7a650950fdbc..caa835d7eb68 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/index.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/index.ts @@ -14,14 +14,14 @@ export * from "./connectedEnvironmentsCertificates"; export * from "./connectedEnvironmentsDaprComponents"; export * from "./connectedEnvironmentsStorages"; export * from "./containerApps"; -export * from "./jobs"; -export * from "./jobsExecutions"; export * from "./containerAppsRevisions"; export * from "./containerAppsRevisionReplicas"; export * from "./containerAppsDiagnostics"; export * from "./managedEnvironmentDiagnostics"; export * from "./managedEnvironmentsDiagnostics"; export * from "./operations"; +export * from "./jobs"; +export * from "./jobsExecutions"; export * from "./managedEnvironments"; export * from "./certificates"; export * from "./managedCertificates"; diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/jobs.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/jobs.ts index 2540edf36f78..be38f28a6d9d 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/jobs.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/jobs.ts @@ -20,11 +20,9 @@ import { JobPatchProperties, JobsUpdateOptionalParams, JobsUpdateResponse, - JobExecutionTemplate, JobsStartOptionalParams, JobsStartResponse, JobsStopExecutionOptionalParams, - JobExecutionNamesCollection, JobsStopMultipleExecutionsOptionalParams, JobsStopMultipleExecutionsResponse, JobsListSecretsOptionalParams, @@ -53,7 +51,7 @@ export interface Jobs { /** * Get the properties of a Container Apps Job. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param options The options parameters. */ get( @@ -64,7 +62,7 @@ export interface Jobs { /** * Create or Update a Container Apps Job. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param jobEnvelope Properties used to create a container apps job * @param options The options parameters. */ @@ -82,7 +80,7 @@ export interface Jobs { /** * Create or Update a Container Apps Job. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param jobEnvelope Properties used to create a container apps job * @param options The options parameters. */ @@ -95,7 +93,7 @@ export interface Jobs { /** * Delete a Container Apps Job. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param options The options parameters. */ beginDelete( @@ -106,7 +104,7 @@ export interface Jobs { /** * Delete a Container Apps Job. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param options The options parameters. */ beginDeleteAndWait( @@ -117,7 +115,7 @@ export interface Jobs { /** * Patches a Container Apps Job using JSON Merge Patch * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param jobEnvelope Properties used to create a container apps job * @param options The options parameters. */ @@ -132,7 +130,7 @@ export interface Jobs { /** * Patches a Container Apps Job using JSON Merge Patch * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param jobEnvelope Properties used to create a container apps job * @param options The options parameters. */ @@ -145,14 +143,12 @@ export interface Jobs { /** * Start a Container Apps Job * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. - * @param template Properties used to start a job instance. + * @param jobName Job Name * @param options The options parameters. */ beginStart( resourceGroupName: string, jobName: string, - template: JobExecutionTemplate, options?: JobsStartOptionalParams ): Promise< SimplePollerLike, JobsStartResponse> @@ -160,20 +156,18 @@ export interface Jobs { /** * Start a Container Apps Job * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. - * @param template Properties used to start a job instance. + * @param jobName Job Name * @param options The options parameters. */ beginStartAndWait( resourceGroupName: string, jobName: string, - template: JobExecutionTemplate, options?: JobsStartOptionalParams ): Promise; /** * Terminates execution of a running container apps job * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param jobExecutionName Job execution name. * @param options The options parameters. */ @@ -186,7 +180,7 @@ export interface Jobs { /** * Terminates execution of a running container apps job * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param jobExecutionName Job execution name. * @param options The options parameters. */ @@ -199,14 +193,12 @@ export interface Jobs { /** * Terminates execution of a running container apps job * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. - * @param jobExecutionName List of all job executions that should be stopped. + * @param jobName Job Name * @param options The options parameters. */ beginStopMultipleExecutions( resourceGroupName: string, jobName: string, - jobExecutionName: JobExecutionNamesCollection, options?: JobsStopMultipleExecutionsOptionalParams ): Promise< SimplePollerLike< @@ -217,20 +209,18 @@ export interface Jobs { /** * Terminates execution of a running container apps job * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. - * @param jobExecutionName List of all job executions that should be stopped. + * @param jobName Job Name * @param options The options parameters. */ beginStopMultipleExecutionsAndWait( resourceGroupName: string, jobName: string, - jobExecutionName: JobExecutionNamesCollection, options?: JobsStopMultipleExecutionsOptionalParams ): Promise; /** * List secrets for a container apps job * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param options The options parameters. */ listSecrets( diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/jobsExecutions.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/jobsExecutions.ts index ba8d707255f1..9da5d6ea33fb 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/jobsExecutions.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/jobsExecutions.ts @@ -15,7 +15,7 @@ export interface JobsExecutions { /** * Get a Container Apps Job's executions * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param options The options parameters. */ list( diff --git a/sdk/appcontainers/arm-appcontainers/test/appcontainers_examples.spec.ts b/sdk/appcontainers/arm-appcontainers/test/appcontainers_examples.spec.ts deleted file mode 100644 index a9454b0124aa..000000000000 --- a/sdk/appcontainers/arm-appcontainers/test/appcontainers_examples.spec.ts +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { - env, - Recorder, - RecorderStartOptions, - delay, - isPlaybackMode, -} from "@azure-tools/test-recorder"; -import { createTestCredential } from "@azure-tools/test-credential"; -import { assert, use } from "chai"; -import { Context } from "mocha"; -import { ContainerAppsAPIClient } from "../src/containerAppsAPIClient"; -import { ContainerApp, ManagedEnvironment } from "../src/models"; - -const replaceableVariables: Record = { - AZURE_CLIENT_ID: "azure_client_id", - AZURE_CLIENT_SECRET: "azure_client_secret", - AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", - SUBSCRIPTION_ID: "azure_subscription_id" -}; - -const recorderOptions: RecorderStartOptions = { - envSetupForPlayback: replaceableVariables -}; - -export const testPollingOptions = { - updateIntervalInMs: isPlaybackMode() ? 0 : undefined, -}; - -describe("AppContainer test", () => { - let recorder: Recorder; - let subscriptionId: string; - let client: ContainerAppsAPIClient; - let location: string; - let resourceGroup: string; - let containerAppName: string; - let environmentEnvelope: ManagedEnvironment; - let containerAppEnvelope: ContainerApp; - let environmentName: string; - - beforeEach(async function (this: Context) { - recorder = new Recorder(this.currentTest); - await recorder.start(recorderOptions); - subscriptionId = env.SUBSCRIPTION_ID || ''; - // This is an example of how the environment variables are used - const credential = createTestCredential(); - client = new ContainerAppsAPIClient(credential, subscriptionId, recorder.configureClientOptions({})); - location = "eastus"; - resourceGroup = "myjstest"; - containerAppName = "mycontainerappxxx"; - environmentName = "testcontainerenv12"; - }); - - afterEach(async function () { - await recorder.stop(); - }); - - it("managedEnvironments create test", async function () { - environmentEnvelope = { - location: "East US", - zoneRedundant: false - }; - const res = await client.managedEnvironments.beginCreateOrUpdateAndWait( - resourceGroup, - environmentName, - environmentEnvelope, - testPollingOptions - ); - assert.equal(res.name, environmentName); - }) - - it("containerApp create test", async function () { - containerAppEnvelope = { - "location": location, - "managedEnvironmentId": "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroup + "/providers/Microsoft.App/managedEnvironments/" + environmentName, - template: { - containers: [ - { - name: "simple-hello-world-container", - image: "mcr.microsoft.com/azuredocs/containerapps-helloworld", - resources: { - cpu: 0.25, - memory: "0.5Gi" - } - } - ] - } - } - const res = await client.containerApps.beginCreateOrUpdateAndWait(resourceGroup, containerAppName, containerAppEnvelope, testPollingOptions); - assert.equal(res.name, containerAppName); - }); - - it("containerapp list Secrets test", async function () { - const res = await client.containerApps.listSecrets( - resourceGroup, - containerAppName - ); - }); - - it("containerapp delete test", async function () { - const res = await client.containerApps.beginDeleteAndWait(resourceGroup, containerAppName); - const resArray = new Array(); - for await (let item of client.containerApps.listByResourceGroup(resourceGroup)) { - resArray.push(item); - } - assert.equal(resArray.length, 0); - }) - - it("managedEnvironments delete test", async function () { - const res = await client.managedEnvironments.beginDeleteAndWait(resourceGroup, environmentName); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listByResourceGroup(resourceGroup)) { - resArray.push(item); - } - assert.equal(resArray.length, 0); - }) -}) diff --git a/sdk/appcontainers/arm-appcontainers/test/sampleTest.ts b/sdk/appcontainers/arm-appcontainers/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/appcontainers/arm-appcontainers/tsconfig.json b/sdk/appcontainers/arm-appcontainers/tsconfig.json index 00a8ff1127f8..3e6ae96443f3 100644 --- a/sdk/appcontainers/arm-appcontainers/tsconfig.json +++ b/sdk/appcontainers/arm-appcontainers/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-appcontainers": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"