From c7bf9da86e62e74bbd246ffcba825542868bf920 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 19 May 2023 02:38:10 +0000 Subject: [PATCH] CodeGen from PR 23932 in Azure/azure-rest-api-specs Merge 1453d69d15773934118b96382cb37a0e9d0902c1 into 45991aaacd9edb148e68a21c0bdc3e7f3e7265c8 --- common/config/rush/pnpm-lock.yaml | 19 +- .../arm-appcontainers/CHANGELOG.md | 190 +- sdk/appcontainers/arm-appcontainers/LICENSE | 2 +- .../arm-appcontainers/_meta.json | 10 +- .../arm-appcontainers/assets.json | 6 - .../arm-appcontainers/package.json | 21 +- .../review/arm-appcontainers.api.md | 706 ++- .../availableWorkloadProfilesGetSample.ts | 32 - .../samples-dev/billingMetersGetSample.ts | 29 - .../certificatesCreateOrUpdateSample.ts | 50 - .../samples-dev/certificatesDeleteSample.ts | 35 - .../samples-dev/certificatesGetSample.ts | 35 - .../samples-dev/certificatesListSample.ts | 36 - .../samples-dev/certificatesUpdateSample.ts | 42 - ...onmentsCertificatesCreateOrUpdateSample.ts | 50 - ...tedEnvironmentsCertificatesDeleteSample.ts | 35 - ...nectedEnvironmentsCertificatesGetSample.ts | 35 - ...ectedEnvironmentsCertificatesListSample.ts | 36 - ...tedEnvironmentsCertificatesUpdateSample.ts | 42 - ...EnvironmentsCheckNameAvailabilitySample.ts | 41 - ...nnectedEnvironmentsCreateOrUpdateSample.ts | 48 - ...mentsDaprComponentsCreateOrUpdateSample.ts | 53 - ...dEnvironmentsDaprComponentsDeleteSample.ts | 35 - ...ctedEnvironmentsDaprComponentsGetSample.ts | 35 - ...tedEnvironmentsDaprComponentsListSample.ts | 36 - ...ronmentsDaprComponentsListSecretsSample.ts | 35 - .../connectedEnvironmentsDeleteSample.ts | 33 - .../connectedEnvironmentsGetSample.ts | 33 - ...edEnvironmentsListByResourceGroupSample.ts | 34 - ...tedEnvironmentsListBySubscriptionSample.ts | 31 - ...nvironmentsStoragesCreateOrUpdateSample.ts | 49 - ...nnectedEnvironmentsStoragesDeleteSample.ts | 35 - .../connectedEnvironmentsStoragesGetSample.ts | 35 - ...connectedEnvironmentsStoragesListSample.ts | 33 - .../connectedEnvironmentsUpdateSample.ts | 33 - ...inerAppsAuthConfigsCreateOrUpdateSample.ts | 45 - .../containerAppsAuthConfigsDeleteSample.ts | 35 - .../containerAppsAuthConfigsGetSample.ts | 35 - ...AppsAuthConfigsListByContainerAppSample.ts | 36 - .../containerAppsCreateOrUpdateSample.ts | 194 - .../samples-dev/containerAppsDeleteSample.ts | 33 - ...ntainerAppsDiagnosticsGetDetectorSample.ts | 35 - ...ntainerAppsDiagnosticsGetRevisionSample.ts | 35 - .../containerAppsDiagnosticsGetRootSample.ts | 33 - ...ainerAppsDiagnosticsListDetectorsSample.ts | 36 - ...ainerAppsDiagnosticsListRevisionsSample.ts | 36 - .../containerAppsGetAuthTokenSample.ts | 33 - .../samples-dev/containerAppsGetSample.ts | 33 - .../containerAppsListByResourceGroupSample.ts | 34 - .../containerAppsListBySubscriptionSample.ts | 31 - ...nerAppsListCustomHostNameAnalysisSample.ts | 41 - .../containerAppsListSecretsSample.ts | 33 - ...nerAppsRevisionReplicasGetReplicaSample.ts | 37 - ...rAppsRevisionReplicasListReplicasSample.ts | 35 - ...inerAppsRevisionsActivateRevisionSample.ts | 35 - ...erAppsRevisionsDeactivateRevisionSample.ts | 35 - ...containerAppsRevisionsGetRevisionSample.ts | 35 - ...ntainerAppsRevisionsListRevisionsSample.ts | 36 - ...ainerAppsRevisionsRestartRevisionSample.ts | 35 - ...rAppsSourceControlsCreateOrUpdateSample.ts | 57 - ...containerAppsSourceControlsDeleteSample.ts | 35 - .../containerAppsSourceControlsGetSample.ts | 35 - ...sSourceControlsListByContainerAppSample.ts | 36 - .../samples-dev/containerAppsUpdateSample.ts | 128 - .../daprComponentsCreateOrUpdateSample.ts | 91 - .../samples-dev/daprComponentsDeleteSample.ts | 35 - .../samples-dev/daprComponentsGetSample.ts | 58 - .../samples-dev/daprComponentsListSample.ts | 36 - .../daprComponentsListSecretsSample.ts | 35 - ...EnvironmentDiagnosticsGetDetectorSample.ts | 35 - ...vironmentDiagnosticsListDetectorsSample.ts | 35 - ...managedEnvironmentsCreateOrUpdateSample.ts | 75 - .../managedEnvironmentsDeleteSample.ts | 33 - ...gedEnvironmentsDiagnosticsGetRootSample.ts | 33 - .../managedEnvironmentsGetAuthTokenSample.ts | 33 - .../managedEnvironmentsGetSample.ts | 33 - ...edEnvironmentsListByResourceGroupSample.ts | 34 - ...gedEnvironmentsListBySubscriptionSample.ts | 31 - ...ronmentsListWorkloadProfileStatesSample.ts | 36 - ...nvironmentsStoragesCreateOrUpdateSample.ts | 49 - ...managedEnvironmentsStoragesDeleteSample.ts | 35 - .../managedEnvironmentsStoragesGetSample.ts | 35 - .../managedEnvironmentsStoragesListSample.ts | 33 - .../managedEnvironmentsUpdateSample.ts | 41 - .../namespacesCheckNameAvailabilitySample.ts | 67 - .../samples-dev/operationsListSample.ts | 31 - .../samples/v2-beta/javascript/README.md | 206 - .../availableWorkloadProfilesGetSample.js | 32 - .../javascript/billingMetersGetSample.js | 29 - .../certificatesCreateOrUpdateSample.js | 46 - .../javascript/certificatesDeleteSample.js | 35 - .../javascript/certificatesGetSample.js | 31 - .../javascript/certificatesListSample.js | 33 - .../javascript/certificatesUpdateSample.js | 39 - ...onmentsCertificatesCreateOrUpdateSample.js | 46 - ...tedEnvironmentsCertificatesDeleteSample.js | 35 - ...nectedEnvironmentsCertificatesGetSample.js | 35 - ...ectedEnvironmentsCertificatesListSample.js | 36 - ...tedEnvironmentsCertificatesUpdateSample.js | 39 - ...EnvironmentsCheckNameAvailabilitySample.js | 38 - ...nnectedEnvironmentsCreateOrUpdateSample.js | 45 - ...mentsDaprComponentsCreateOrUpdateSample.js | 50 - ...dEnvironmentsDaprComponentsDeleteSample.js | 35 - ...ctedEnvironmentsDaprComponentsGetSample.js | 35 - ...tedEnvironmentsDaprComponentsListSample.js | 36 - ...ronmentsDaprComponentsListSecretsSample.js | 35 - .../connectedEnvironmentsDeleteSample.js | 33 - .../connectedEnvironmentsGetSample.js | 33 - ...edEnvironmentsListByResourceGroupSample.js | 32 - ...tedEnvironmentsListBySubscriptionSample.js | 31 - ...nvironmentsStoragesCreateOrUpdateSample.js | 46 - ...nnectedEnvironmentsStoragesDeleteSample.js | 35 - .../connectedEnvironmentsStoragesGetSample.js | 35 - ...connectedEnvironmentsStoragesListSample.js | 33 - .../connectedEnvironmentsUpdateSample.js | 33 - ...inerAppsAuthConfigsCreateOrUpdateSample.js | 45 - .../containerAppsAuthConfigsDeleteSample.js | 35 - .../containerAppsAuthConfigsGetSample.js | 35 - ...AppsAuthConfigsListByContainerAppSample.js | 36 - .../containerAppsCreateOrUpdateSample.js | 192 - .../javascript/containerAppsDeleteSample.js | 30 - ...ntainerAppsDiagnosticsGetDetectorSample.js | 35 - ...ntainerAppsDiagnosticsGetRevisionSample.js | 35 - .../containerAppsDiagnosticsGetRootSample.js | 30 - ...ainerAppsDiagnosticsListDetectorsSample.js | 36 - ...ainerAppsDiagnosticsListRevisionsSample.js | 36 - .../containerAppsGetAuthTokenSample.js | 30 - .../javascript/containerAppsGetSample.js | 30 - .../containerAppsListByResourceGroupSample.js | 32 - .../containerAppsListBySubscriptionSample.js | 31 - ...nerAppsListCustomHostNameAnalysisSample.js | 38 - .../containerAppsListSecretsSample.js | 30 - ...nerAppsRevisionReplicasGetReplicaSample.js | 37 - ...rAppsRevisionReplicasListReplicasSample.js | 35 - ...inerAppsRevisionsActivateRevisionSample.js | 35 - ...erAppsRevisionsDeactivateRevisionSample.js | 35 - ...containerAppsRevisionsGetRevisionSample.js | 35 - ...ntainerAppsRevisionsListRevisionsSample.js | 36 - ...ainerAppsRevisionsRestartRevisionSample.js | 35 - ...rAppsSourceControlsCreateOrUpdateSample.js | 54 - ...containerAppsSourceControlsDeleteSample.js | 35 - .../containerAppsSourceControlsGetSample.js | 35 - ...sSourceControlsListByContainerAppSample.js | 36 - .../javascript/containerAppsUpdateSample.js | 126 - .../daprComponentsCreateOrUpdateSample.js | 88 - .../javascript/daprComponentsDeleteSample.js | 35 - .../javascript/daprComponentsGetSample.js | 50 - .../javascript/daprComponentsListSample.js | 33 - .../daprComponentsListSecretsSample.js | 35 - ...EnvironmentDiagnosticsGetDetectorSample.js | 35 - ...vironmentDiagnosticsListDetectorsSample.js | 33 - ...managedEnvironmentsCreateOrUpdateSample.js | 72 - .../managedEnvironmentsDeleteSample.js | 33 - ...gedEnvironmentsDiagnosticsGetRootSample.js | 33 - .../managedEnvironmentsGetAuthTokenSample.js | 30 - .../managedEnvironmentsGetSample.js | 30 - ...edEnvironmentsListByResourceGroupSample.js | 32 - ...gedEnvironmentsListBySubscriptionSample.js | 31 - ...ronmentsListWorkloadProfileStatesSample.js | 36 - ...nvironmentsStoragesCreateOrUpdateSample.js | 46 - ...managedEnvironmentsStoragesDeleteSample.js | 35 - .../managedEnvironmentsStoragesGetSample.js | 35 - .../managedEnvironmentsStoragesListSample.js | 30 - .../managedEnvironmentsUpdateSample.js | 38 - .../namespacesCheckNameAvailabilitySample.js | 64 - .../javascript/operationsListSample.js | 31 - .../samples/v2-beta/javascript/package.json | 32 - .../samples/v2-beta/javascript/sample.env | 4 - .../samples/v2-beta/typescript/README.md | 219 - .../samples/v2-beta/typescript/package.json | 41 - .../samples/v2-beta/typescript/sample.env | 4 - .../src/availableWorkloadProfilesGetSample.ts | 32 - .../typescript/src/billingMetersGetSample.ts | 29 - .../src/certificatesCreateOrUpdateSample.ts | 50 - .../src/certificatesDeleteSample.ts | 35 - .../typescript/src/certificatesGetSample.ts | 35 - .../typescript/src/certificatesListSample.ts | 36 - .../src/certificatesUpdateSample.ts | 42 - ...onmentsCertificatesCreateOrUpdateSample.ts | 50 - ...tedEnvironmentsCertificatesDeleteSample.ts | 35 - ...nectedEnvironmentsCertificatesGetSample.ts | 35 - ...ectedEnvironmentsCertificatesListSample.ts | 36 - ...tedEnvironmentsCertificatesUpdateSample.ts | 42 - ...EnvironmentsCheckNameAvailabilitySample.ts | 41 - ...nnectedEnvironmentsCreateOrUpdateSample.ts | 48 - ...mentsDaprComponentsCreateOrUpdateSample.ts | 53 - ...dEnvironmentsDaprComponentsDeleteSample.ts | 35 - ...ctedEnvironmentsDaprComponentsGetSample.ts | 35 - ...tedEnvironmentsDaprComponentsListSample.ts | 36 - ...ronmentsDaprComponentsListSecretsSample.ts | 35 - .../src/connectedEnvironmentsDeleteSample.ts | 33 - .../src/connectedEnvironmentsGetSample.ts | 33 - ...edEnvironmentsListByResourceGroupSample.ts | 34 - ...tedEnvironmentsListBySubscriptionSample.ts | 31 - ...nvironmentsStoragesCreateOrUpdateSample.ts | 49 - ...nnectedEnvironmentsStoragesDeleteSample.ts | 35 - .../connectedEnvironmentsStoragesGetSample.ts | 35 - ...connectedEnvironmentsStoragesListSample.ts | 33 - .../src/connectedEnvironmentsUpdateSample.ts | 33 - ...inerAppsAuthConfigsCreateOrUpdateSample.ts | 45 - .../containerAppsAuthConfigsDeleteSample.ts | 35 - .../src/containerAppsAuthConfigsGetSample.ts | 35 - ...AppsAuthConfigsListByContainerAppSample.ts | 36 - .../src/containerAppsCreateOrUpdateSample.ts | 194 - .../src/containerAppsDeleteSample.ts | 33 - ...ntainerAppsDiagnosticsGetDetectorSample.ts | 35 - ...ntainerAppsDiagnosticsGetRevisionSample.ts | 35 - .../containerAppsDiagnosticsGetRootSample.ts | 33 - ...ainerAppsDiagnosticsListDetectorsSample.ts | 36 - ...ainerAppsDiagnosticsListRevisionsSample.ts | 36 - .../src/containerAppsGetAuthTokenSample.ts | 33 - .../typescript/src/containerAppsGetSample.ts | 33 - .../containerAppsListByResourceGroupSample.ts | 34 - .../containerAppsListBySubscriptionSample.ts | 31 - ...nerAppsListCustomHostNameAnalysisSample.ts | 41 - .../src/containerAppsListSecretsSample.ts | 33 - ...nerAppsRevisionReplicasGetReplicaSample.ts | 37 - ...rAppsRevisionReplicasListReplicasSample.ts | 35 - ...inerAppsRevisionsActivateRevisionSample.ts | 35 - ...erAppsRevisionsDeactivateRevisionSample.ts | 35 - ...containerAppsRevisionsGetRevisionSample.ts | 35 - ...ntainerAppsRevisionsListRevisionsSample.ts | 36 - ...ainerAppsRevisionsRestartRevisionSample.ts | 35 - ...rAppsSourceControlsCreateOrUpdateSample.ts | 57 - ...containerAppsSourceControlsDeleteSample.ts | 35 - .../containerAppsSourceControlsGetSample.ts | 35 - ...sSourceControlsListByContainerAppSample.ts | 36 - .../src/containerAppsUpdateSample.ts | 128 - .../src/daprComponentsCreateOrUpdateSample.ts | 91 - .../src/daprComponentsDeleteSample.ts | 35 - .../typescript/src/daprComponentsGetSample.ts | 58 - .../src/daprComponentsListSample.ts | 36 - .../src/daprComponentsListSecretsSample.ts | 35 - ...EnvironmentDiagnosticsGetDetectorSample.ts | 35 - ...vironmentDiagnosticsListDetectorsSample.ts | 35 - ...managedEnvironmentsCreateOrUpdateSample.ts | 75 - .../src/managedEnvironmentsDeleteSample.ts | 33 - ...gedEnvironmentsDiagnosticsGetRootSample.ts | 33 - .../managedEnvironmentsGetAuthTokenSample.ts | 33 - .../src/managedEnvironmentsGetSample.ts | 33 - ...edEnvironmentsListByResourceGroupSample.ts | 34 - ...gedEnvironmentsListBySubscriptionSample.ts | 31 - ...ronmentsListWorkloadProfileStatesSample.ts | 36 - ...nvironmentsStoragesCreateOrUpdateSample.ts | 49 - ...managedEnvironmentsStoragesDeleteSample.ts | 35 - .../managedEnvironmentsStoragesGetSample.ts | 35 - .../managedEnvironmentsStoragesListSample.ts | 33 - .../src/managedEnvironmentsUpdateSample.ts | 41 - .../namespacesCheckNameAvailabilitySample.ts | 67 - .../typescript/src/operationsListSample.ts | 31 - .../samples/v2-beta/typescript/tsconfig.json | 17 - .../src/containerAppsAPIClient.ts | 149 +- .../arm-appcontainers/src/lroImpl.ts | 54 +- .../arm-appcontainers/src/models/index.ts | 2312 ++++++--- .../arm-appcontainers/src/models/mappers.ts | 4598 +++++++++++------ .../src/models/parameters.ts | 241 +- .../operations/availableWorkloadProfiles.ts | 1 - .../src/operations/certificates.ts | 17 +- .../src/operations/connectedEnvironments.ts | 67 +- .../connectedEnvironmentsCertificates.ts | 17 +- .../connectedEnvironmentsDaprComponents.ts | 17 +- .../connectedEnvironmentsStorages.ts | 14 +- .../src/operations/containerApps.ts | 328 +- .../operations/containerAppsAuthConfigs.ts | 1 - .../operations/containerAppsDiagnostics.ts | 2 - .../src/operations/containerAppsRevisions.ts | 1 - .../operations/containerAppsSourceControls.ts | 50 +- .../src/operations/daprComponents.ts | 17 +- .../arm-appcontainers/src/operations/index.ts | 17 +- .../arm-appcontainers/src/operations/jobs.ts | 1073 ++++ .../src/operations/jobsExecutions.ts | 176 + .../src/operations/managedCertificates.ts | 485 ++ .../managedEnvironmentDiagnostics.ts | 4 +- .../src/operations/managedEnvironments.ts | 117 +- .../operations/managedEnvironmentsStorages.ts | 14 +- .../src/operations/operations.ts | 1 - .../connectedEnvironments.ts | 8 +- .../src/operationsInterfaces/containerApps.ts | 66 +- .../containerAppsSourceControls.ts | 8 +- .../src/operationsInterfaces/index.ts | 17 +- .../src/operationsInterfaces/jobs.ts | 204 + .../operationsInterfaces/jobsExecutions.ts | 24 + .../managedCertificates.ts | 110 + .../managedEnvironments.ts | 20 +- .../arm-appcontainers/src/pagingHelper.ts | 8 +- .../test/appcontainers_examples.spec.ts | 124 - .../arm-appcontainers/test/sampleTest.ts | 43 + .../arm-appcontainers/tsconfig.json | 10 +- 288 files changed, 8326 insertions(+), 13296 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/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/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/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 create mode 100644 sdk/appcontainers/arm-appcontainers/src/operations/jobs.ts create mode 100644 sdk/appcontainers/arm-appcontainers/src/operations/jobsExecutions.ts create mode 100644 sdk/appcontainers/arm-appcontainers/src/operations/managedCertificates.ts create mode 100644 sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/jobs.ts create mode 100644 sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/jobsExecutions.ts create mode 100644 sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/managedCertificates.ts 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/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index d6b2bce03f13..7860a8088285 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -3793,7 +3793,7 @@ packages: dependencies: semver: 7.5.0 shelljs: 0.8.5 - typescript: 5.2.0-dev.20230517 + typescript: 5.2.0-dev.20230518 dev: false /ecdsa-sig-formatter/1.0.11: @@ -8337,8 +8337,8 @@ packages: hasBin: true dev: false - /typescript/5.2.0-dev.20230517: - resolution: {integrity: sha512-mTT3ka5HTeudnNirocnOfr/0d2CEvZExrJpP8YXqAvdwlwjwNPJ4TqHHiL1y9lx3RfsUWu6HSX539ZxngUTqeA==} + /typescript/5.2.0-dev.20230518: + resolution: {integrity: sha512-lHSI4e0QtTokuq/T1UnAFtdh3S2bzTG1TrR0Z3n6ld6J97SlPwW3FKbtKZiSdUVyOBaL0KbEiEyjy9AzukpS4Q==} engines: {node: '>=14.17'} hasBin: true dev: false @@ -9665,7 +9665,7 @@ packages: dev: false file:projects/arm-appcontainers.tgz: - resolution: {integrity: sha512-Y+7qoYooR/RSWC+c5eY1tuqDrWkfi3rrYurtduo+UbEm3RHLEtWqvdlGu+6hmgEf/On6nfEdjC3BP1S8I/Tn7A==, tarball: file:projects/arm-appcontainers.tgz} + resolution: {integrity: sha512-uAOkD27upohdOThqbIl2os/xM2JDD25U06JwRsJUy3yyRkXQ1ST2ts8mUFZBlabjjAuzHXnXEn0KdAocezLytA==, tarball: file:projects/arm-appcontainers.tgz} name: '@rush-temp/arm-appcontainers' version: 0.0.0 dependencies: @@ -9679,13 +9679,14 @@ packages: '@types/node': 14.18.46 chai: 4.3.7 cross-env: 7.0.3 - mkdirp: 1.0.4 + dotenv: 16.0.3 + mkdirp: 2.1.6 mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.79.1 rollup-plugin-sourcemaps: 0.6.3_m742s5qpci6ulntpyriekwplh4 tslib: 2.5.0 - typescript: 5.0.4 + typescript: 4.8.4 uglify-js: 3.17.4 transitivePeerDependencies: - supports-color @@ -10816,13 +10817,13 @@ packages: version: 0.0.0 dependencies: '@azure/identity': 2.1.0 - '@microsoft/api-extractor': 7.34.6_@types+node@14.18.43 + '@microsoft/api-extractor': 7.34.8_@types+node@14.18.46 '@rollup/plugin-commonjs': 24.1.0_rollup@2.79.1 '@rollup/plugin-json': 6.0.0_rollup@2.79.1 '@rollup/plugin-multi-entry': 6.0.0_rollup@2.79.1 '@rollup/plugin-node-resolve': 13.3.0_rollup@2.79.1 '@types/chai': 4.3.5 - '@types/node': 14.18.43 + '@types/node': 14.18.46 chai: 4.3.7 cross-env: 7.0.3 dotenv: 16.0.3 @@ -10830,7 +10831,7 @@ packages: mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.79.1 - rollup-plugin-sourcemaps: 0.6.3_mn2f3gd3jpedkkr23obcmzv5eq + rollup-plugin-sourcemaps: 0.6.3_m742s5qpci6ulntpyriekwplh4 tslib: 2.5.0 typescript: 5.0.4 uglify-js: 3.17.4 diff --git a/sdk/appcontainers/arm-appcontainers/CHANGELOG.md b/sdk/appcontainers/arm-appcontainers/CHANGELOG.md index 98a67f4cb998..6fb87529aa9b 100644 --- a/sdk/appcontainers/arm-appcontainers/CHANGELOG.md +++ b/sdk/appcontainers/arm-appcontainers/CHANGELOG.md @@ -1,21 +1,7 @@ # Release History - -## 2.0.0-beta.3 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 2.0.0-beta.2 (2022-11-15) - - Bugs Fixed - -## 2.0.0-beta.1 (2022-10-12) - +## 2.0.0-beta.3 (2023-05-19) + **Features** - Added operation group AvailableWorkloadProfiles @@ -25,8 +11,15 @@ - Added operation group ConnectedEnvironmentsDaprComponents - Added operation group ConnectedEnvironmentsStorages - Added operation group ContainerAppsDiagnostics + - Added operation group Jobs + - Added operation group JobsExecutions + - 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 @@ -56,6 +49,7 @@ - Added Interface ConnectedEnvironmentsDaprComponentsListNextOptionalParams - Added Interface ConnectedEnvironmentsDaprComponentsListOptionalParams - Added Interface ConnectedEnvironmentsDaprComponentsListSecretsOptionalParams + - Added Interface ConnectedEnvironmentsDeleteHeaders - Added Interface ConnectedEnvironmentsDeleteOptionalParams - Added Interface ConnectedEnvironmentsGetOptionalParams - Added Interface ConnectedEnvironmentsListByResourceGroupNextOptionalParams @@ -71,6 +65,8 @@ - Added Interface ConnectedEnvironmentStoragesCollection - Added Interface ConnectedEnvironmentsUpdateOptionalParams - Added Interface ContainerAppAuthToken + - Added Interface ContainerAppJobExecutions + - Added Interface ContainerAppsDeleteHeaders - Added Interface ContainerAppsDiagnosticsGetDetectorOptionalParams - Added Interface ContainerAppsDiagnosticsGetRevisionOptionalParams - Added Interface ContainerAppsDiagnosticsGetRootOptionalParams @@ -79,9 +75,16 @@ - 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 - Added Interface CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo - Added Interface CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem + - Added Interface DaprConfiguration - Added Interface DaprSecret - Added Interface DiagnosticDataProviderMetadata - Added Interface DiagnosticDataProviderMetadataPropertyBagItem @@ -96,31 +99,83 @@ - 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 IngressStickySessions - Added Interface InitContainer - 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 + - Added Interface JobsDeleteOptionalParams + - Added Interface JobSecretsCollection + - Added Interface JobsExecutionsListNextOptionalParams + - Added Interface JobsExecutionsListOptionalParams + - Added Interface JobsGetOptionalParams + - Added Interface JobsListByResourceGroupNextOptionalParams + - Added Interface JobsListByResourceGroupOptionalParams + - Added Interface JobsListBySubscriptionNextOptionalParams + - Added Interface JobsListBySubscriptionOptionalParams + - Added Interface JobsListSecretsOptionalParams + - Added Interface JobsStartHeaders + - Added Interface JobsStartOptionalParams + - Added Interface JobsStopExecutionHeaders + - Added Interface JobsStopExecutionOptionalParams + - Added Interface JobsStopMultipleExecutionsHeaders + - Added Interface JobsStopMultipleExecutionsOptionalParams + - Added Interface JobsUpdateHeaders + - Added Interface JobsUpdateOptionalParams + - Added Interface JobTemplate + - Added Interface KedaConfiguration + - Added Interface ManagedCertificate + - Added Interface ManagedCertificateCollection + - Added Interface ManagedCertificatePatch + - Added Interface ManagedCertificateProperties + - Added Interface ManagedCertificatesCreateOrUpdateOptionalParams + - Added Interface ManagedCertificatesDeleteOptionalParams + - Added Interface ManagedCertificatesGetOptionalParams + - Added Interface ManagedCertificatesListNextOptionalParams + - Added Interface ManagedCertificatesListOptionalParams + - Added Interface ManagedCertificatesUpdateOptionalParams - Added Interface ManagedEnvironmentDiagnosticsGetDetectorOptionalParams - Added Interface ManagedEnvironmentDiagnosticsListDetectorsOptionalParams - - Added Interface ManagedEnvironmentOutboundSettings + - 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 - Added Interface WorkloadProfileStatesCollection - Added Interface WorkloadProfileStatesProperties - Added Type Alias Action + - Added Type Alias Affinity - 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 @@ -143,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 @@ -151,69 +208,116 @@ - Added Type Alias ContainerAppsDiagnosticsListRevisionsNextResponse - Added Type Alias ContainerAppsDiagnosticsListRevisionsResponse - Added Type Alias ContainerAppsGetAuthTokenResponse + - 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 + - Added Type Alias JobsExecutionsListNextResponse + - Added Type Alias JobsExecutionsListResponse + - Added Type Alias JobsGetResponse + - Added Type Alias JobsListByResourceGroupNextResponse + - Added Type Alias JobsListByResourceGroupResponse + - Added Type Alias JobsListBySubscriptionNextResponse + - Added Type Alias JobsListBySubscriptionResponse + - Added Type Alias JobsListSecretsResponse + - Added Type Alias JobsStartResponse + - Added Type Alias JobsStopMultipleExecutionsResponse + - Added Type Alias JobsUpdateResponse - Added Type Alias LogLevel + - Added Type Alias ManagedCertificateDomainControlValidation + - Added Type Alias ManagedCertificatesCreateOrUpdateResponse + - Added Type Alias ManagedCertificatesGetResponse + - Added Type Alias ManagedCertificatesListNextResponse + - Added Type Alias ManagedCertificatesListResponse + - Added Type Alias ManagedCertificatesUpdateResponse - 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 + - 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 - - Interface ContainerApp has a new optional parameter workloadProfileType + - Interface ContainerApp has a new optional parameter latestReadyRevisionName + - Interface ContainerApp has a new optional parameter managedBy + - Interface ContainerApp has a new optional parameter workloadProfileName + - Interface ContainerAppSecret has a new optional parameter identity + - Interface ContainerAppSecret has a new optional parameter keyVaultUrl - 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 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 - Interface Ingress has a new optional parameter ipSecurityRestrictions + - Interface Ingress has a new optional parameter stickySessions - Interface ManagedEnvironment has a new optional parameter customDomainConfiguration + - Interface ManagedEnvironment has a new optional parameter daprConfiguration - Interface ManagedEnvironment has a new optional parameter eventStreamEndpoint - - Interface ManagedEnvironment has a new optional parameter sku + - 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 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 + - 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 KnownCategory - 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 KnownManagedEnvironmentOutBoundType - - Added Enum KnownSkuName + - 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 **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 + - Class ContainerAppsAPIClient has a new signature + - 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[] ## 1.1.2 (2022-10-08) diff --git a/sdk/appcontainers/arm-appcontainers/LICENSE b/sdk/appcontainers/arm-appcontainers/LICENSE index 5d1d36e0af80..3a1d9b6f24f7 100644 --- a/sdk/appcontainers/arm-appcontainers/LICENSE +++ b/sdk/appcontainers/arm-appcontainers/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2022 Microsoft +Copyright (c) 2023 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/appcontainers/arm-appcontainers/_meta.json b/sdk/appcontainers/arm-appcontainers/_meta.json index 6d8ce1b79782..18c1b8de73d1 100644 --- a/sdk/appcontainers/arm-appcontainers/_meta.json +++ b/sdk/appcontainers/arm-appcontainers/_meta.json @@ -1,8 +1,8 @@ { - "commit": "d0965e7f28fc087c87c7411a14d8acdc8f37252e", - "readme": "specification\\app\\resource-manager\\readme.md", - "autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\app\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.3.20221108.1 --generate-sample=true", + "commit": "fa7aaed8e57d2da4873accab1aa4952f84647e52", + "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=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/app/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.10", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.4.2", - "use": "@autorest/typescript@6.0.0-rc.3.20221108.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.0", + "use": "@autorest/typescript@6.0.0-rc.10" } \ 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 16f493a43024..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_c6a3a024d0" -} diff --git a/sdk/appcontainers/arm-appcontainers/package.json b/sdk/appcontainers/arm-appcontainers/package.json index bc0337e743bc..3a1f2bf307af 100644 --- a/sdk/appcontainers/arm-appcontainers/package.json +++ b/sdk/appcontainers/arm-appcontainers/package.json @@ -8,10 +8,10 @@ "node": ">=14.0.0" }, "dependencies": { - "@azure/core-lro": "^2.2.0", + "@azure/core-lro": "^2.5.0", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", - "@azure/core-client": "^1.6.1", + "@azure/core-client": "^1.7.0", "@azure/core-auth": "^1.3.0", "@azure/core-rest-pipeline": "^1.8.0", "tslib": "^2.2.0" @@ -33,12 +33,13 @@ "@rollup/plugin-json": "^6.0.0", "@rollup/plugin-multi-entry": "^6.0.0", "@rollup/plugin-node-resolve": "^13.1.3", - "mkdirp": "^1.0.4", + "mkdirp": "^2.1.2", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", - "typescript": "~5.0.0", + "typescript": "~4.8.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", + "dotenv": "^16.0.0", "@azure/identity": "^2.0.1", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", @@ -49,7 +50,6 @@ "@types/node": "^14.0.0", "@azure/dev-tool": "^1.0.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appcontainers/arm-appcontainers", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" @@ -111,12 +111,5 @@ ] }, "autoPublish": true, - "//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 976a7827b3b1..eb4ffdaf2a9c 100644 --- a/sdk/appcontainers/arm-appcontainers/review/arm-appcontainers.api.md +++ b/sdk/appcontainers/arm-appcontainers/review/arm-appcontainers.api.md @@ -6,9 +6,9 @@ import * as coreAuth from '@azure/core-auth'; import * as coreClient from '@azure/core-client'; +import { OperationState } from '@azure/core-lro'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; -import { PollerLike } from '@azure/core-lro'; -import { PollOperationState } from '@azure/core-lro'; +import { SimplePollerLike } from '@azure/core-lro'; // @public export type AccessMode = string; @@ -19,6 +19,9 @@ export type Action = string; // @public export type ActiveRevisionsMode = string; +// @public +export type Affinity = string; + // @public export interface AllowedAudiencesValidation { allowedAudiences?: string[]; @@ -97,7 +100,7 @@ export interface AvailableWorkloadProfile extends ProxyResource { // @public export interface AvailableWorkloadProfileProperties { applicability?: Applicability; - billingMeterCategory?: Category; + category?: string; cores?: number; displayName?: string; memoryGiB?: number; @@ -164,6 +167,7 @@ export interface AzureActiveDirectoryValidation { export interface AzureCredentials { clientId?: string; clientSecret?: string; + kind?: string; subscriptionId?: string; tenantId?: string; } @@ -211,7 +215,7 @@ export interface BillingMeterCollection { // @public export interface BillingMeterProperties { - category?: Category; + category?: string; displayName?: string; meterType?: string; } @@ -231,9 +235,6 @@ export type BillingMetersGetResponse = BillingMeterCollection; // @public export type BindingType = string; -// @public -export type Category = string; - // @public export interface Certificate extends TrackedResource { properties?: CertificateProperties; @@ -349,6 +350,7 @@ export interface Configuration { maxInactiveRevisions?: number; registries?: RegistryCredentials[]; secrets?: Secret[]; + service?: Service; } // @public @@ -373,9 +375,9 @@ export type ConnectedEnvironmentProvisioningState = string; // @public export interface ConnectedEnvironments { - beginCreateOrUpdate(resourceGroupName: string, connectedEnvironmentName: string, environmentEnvelope: ConnectedEnvironment, options?: ConnectedEnvironmentsCreateOrUpdateOptionalParams): Promise, ConnectedEnvironmentsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, connectedEnvironmentName: string, environmentEnvelope: ConnectedEnvironment, options?: ConnectedEnvironmentsCreateOrUpdateOptionalParams): Promise, ConnectedEnvironmentsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, connectedEnvironmentName: string, environmentEnvelope: ConnectedEnvironment, options?: ConnectedEnvironmentsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, connectedEnvironmentName: string, options?: ConnectedEnvironmentsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, connectedEnvironmentName: string, options?: ConnectedEnvironmentsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, connectedEnvironmentName: string, options?: ConnectedEnvironmentsDeleteOptionalParams): Promise; checkNameAvailability(resourceGroupName: string, connectedEnvironmentName: string, checkNameAvailabilityRequest: CheckNameAvailabilityRequest, options?: ConnectedEnvironmentsCheckNameAvailabilityOptionalParams): Promise; get(resourceGroupName: string, connectedEnvironmentName: string, options?: ConnectedEnvironmentsGetOptionalParams): Promise; @@ -497,6 +499,12 @@ export interface ConnectedEnvironmentsDaprComponentsListSecretsOptionalParams ex // @public export type ConnectedEnvironmentsDaprComponentsListSecretsResponse = DaprSecretsCollection; +// @public +export interface ConnectedEnvironmentsDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface ConnectedEnvironmentsDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -606,13 +614,15 @@ export interface ContainerApp extends TrackedResource { readonly eventStreamEndpoint?: string; extendedLocation?: ExtendedLocation; identity?: ManagedServiceIdentity; + readonly latestReadyRevisionName?: string; readonly latestRevisionFqdn?: string; readonly latestRevisionName?: string; + managedBy?: string; managedEnvironmentId?: string; readonly outboundIpAddresses?: string[]; readonly provisioningState?: ContainerAppProvisioningState; template?: Template; - workloadProfileType?: string; + workloadProfileName?: string; } // @public @@ -627,6 +637,15 @@ export interface ContainerAppCollection { value: ContainerApp[]; } +// @public +export type ContainerAppContainerRunningState = string; + +// @public +export interface ContainerAppJobExecutions { + readonly nextLink?: string; + value: JobExecution[]; +} + // @public export interface ContainerAppProbe { failureThreshold?: number; @@ -664,14 +683,21 @@ 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>>; + 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>>; + beginDelete(resourceGroupName: string, containerAppName: string, options?: ContainerAppsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, containerAppName: string, options?: ContainerAppsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, containerAppName: string, containerAppEnvelope: ContainerApp, options?: ContainerAppsUpdateOptionalParams): Promise, void>>; - beginUpdateAndWait(resourceGroupName: string, containerAppName: string, containerAppEnvelope: ContainerApp, options?: ContainerAppsUpdateOptionalParams): Promise; + beginStart(resourceGroupName: string, containerAppName: string, options?: ContainerAppsStartOptionalParams): Promise, void>>; + beginStartAndWait(resourceGroupName: string, containerAppName: string, options?: ContainerAppsStartOptionalParams): Promise; + beginStop(resourceGroupName: string, containerAppName: string, options?: ContainerAppsStopOptionalParams): Promise, void>>; + 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; getAuthToken(resourceGroupName: string, containerAppName: string, options?: ContainerAppsGetAuthTokenOptionalParams): Promise; listByResourceGroup(resourceGroupName: string, options?: ContainerAppsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; @@ -684,7 +710,7 @@ export interface ContainerApps { export class ContainerAppsAPIClient extends coreClient.ServiceClient { // (undocumented) $host: string; - constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: ContainerAppsAPIClientOptionalParams); + constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, jobName: string, jobExecutionName: string, options?: ContainerAppsAPIClientOptionalParams); // (undocumented) apiVersion: string; // (undocumented) @@ -715,6 +741,17 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { containerAppsSourceControls: ContainerAppsSourceControls; // (undocumented) daprComponents: DaprComponents; + jobExecution(resourceGroupName: string, options?: JobExecutionOptionalParams): Promise; + // (undocumented) + jobExecutionName: string; + // (undocumented) + jobName: string; + // (undocumented) + jobs: Jobs; + // (undocumented) + jobsExecutions: JobsExecutions; + // (undocumented) + managedCertificates: ManagedCertificates; // (undocumented) managedEnvironmentDiagnostics: ManagedEnvironmentDiagnostics; // (undocumented) @@ -787,6 +824,12 @@ export interface ContainerAppsCreateOrUpdateOptionalParams extends coreClient.Op // @public export type ContainerAppsCreateOrUpdateResponse = ContainerApp; +// @public +export interface ContainerAppsDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface ContainerAppsDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -839,7 +882,6 @@ export type ContainerAppsDiagnosticsListDetectorsResponse = DiagnosticsCollectio // @public export interface ContainerAppsDiagnosticsListRevisionsNextOptionalParams extends coreClient.OperationOptions { - filter?: string; } // @public @@ -855,6 +897,8 @@ export type ContainerAppsDiagnosticsListRevisionsResponse = RevisionCollection; // @public export interface ContainerAppSecret { + readonly identity?: string; + readonly keyVaultUrl?: string; readonly name?: string; readonly value?: string; } @@ -962,7 +1006,6 @@ export type ContainerAppsRevisionsGetRevisionResponse = Revision; // @public export interface ContainerAppsRevisionsListRevisionsNextOptionalParams extends coreClient.OperationOptions { - filter?: string; } // @public @@ -982,9 +1025,9 @@ export interface ContainerAppsRevisionsRestartRevisionOptionalParams extends cor // @public export interface ContainerAppsSourceControls { - beginCreateOrUpdate(resourceGroupName: string, containerAppName: string, sourceControlName: string, sourceControlEnvelope: SourceControl, options?: ContainerAppsSourceControlsCreateOrUpdateOptionalParams): Promise, ContainerAppsSourceControlsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, containerAppName: string, sourceControlName: string, sourceControlEnvelope: SourceControl, options?: ContainerAppsSourceControlsCreateOrUpdateOptionalParams): Promise, ContainerAppsSourceControlsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, containerAppName: string, sourceControlName: string, sourceControlEnvelope: SourceControl, options?: ContainerAppsSourceControlsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, containerAppName: string, sourceControlName: string, options?: ContainerAppsSourceControlsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, containerAppName: string, sourceControlName: string, options?: ContainerAppsSourceControlsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, containerAppName: string, sourceControlName: string, options?: ContainerAppsSourceControlsDeleteOptionalParams): Promise; get(resourceGroupName: string, containerAppName: string, sourceControlName: string, options?: ContainerAppsSourceControlsGetOptionalParams): Promise; listByContainerApp(resourceGroupName: string, containerAppName: string, options?: ContainerAppsSourceControlsListByContainerAppOptionalParams): PagedAsyncIterableIterator; @@ -1026,12 +1069,45 @@ 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 interface ContainerAppsStopHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface ContainerAppsStopOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface ContainerAppsUpdateHeaders { + // (undocumented) + location?: string; +} + // @public export interface ContainerAppsUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; updateIntervalInMs?: number; } +// @public +export type ContainerAppsUpdateResponse = ContainerApp; + // @public export interface ContainerResources { cpu?: number; @@ -1048,19 +1124,29 @@ export interface CookieExpiration { // @public export type CookieExpirationConvention = "FixedTime" | "IdentityProviderDerived"; +// @public +export interface CorsPolicy { + allowCredentials?: boolean; + allowedHeaders?: string[]; + allowedMethods?: string[]; + allowedOrigins: string[]; + exposeHeaders?: string[]; + maxAge?: number; +} + // @public export type CreatedByType = string; // @public export interface CustomDomain { bindingType?: BindingType; - certificateId: string; + certificateId?: string; name: string; } // @public export interface CustomDomainConfiguration { - certificatePassword?: Uint8Array; + certificatePassword?: string; certificateValue?: Uint8Array; readonly customDomainVerificationId?: string; dnsSuffix?: string; @@ -1194,6 +1280,11 @@ export interface DaprComponentsListSecretsOptionalParams extends coreClient.Oper // @public export type DaprComponentsListSecretsResponse = DaprSecretsCollection; +// @public +export interface DaprConfiguration { + readonly version?: string; +} + // @public export interface DaprMetadata { name?: string; @@ -1209,7 +1300,7 @@ export interface DaprSecret { // @public export interface DaprSecretsCollection { - value: Secret[]; + value: DaprSecret[]; } // @public @@ -1335,11 +1426,6 @@ export interface EnvironmentAuthToken extends TrackedResource { // @public export type EnvironmentProvisioningState = string; -// @public -export interface EnvironmentSkuProperties { - name: SkuName; -} - // @public export interface EnvironmentVar { name?: string; @@ -1408,6 +1494,7 @@ export interface GitHub { export interface GithubActionConfiguration { azureCredentials?: AzureCredentials; contextPath?: string; + githubPersonalAccessToken?: string; image?: string; os?: string; publishType?: string; @@ -1468,16 +1555,27 @@ export interface IdentityProviders { // @public export interface Ingress { allowInsecure?: boolean; + clientCertificateMode?: IngressClientCertificateMode; + corsPolicy?: CorsPolicy; customDomains?: CustomDomain[]; exposedPort?: number; external?: boolean; readonly fqdn?: string; ipSecurityRestrictions?: IpSecurityRestrictionRule[]; + stickySessions?: IngressStickySessions; targetPort?: number; traffic?: TrafficWeight[]; transport?: IngressTransportMethod; } +// @public +export type IngressClientCertificateMode = string; + +// @public +export interface IngressStickySessions { + affinity?: Affinity; +} + // @public export type IngressTransportMethod = string; @@ -1493,12 +1591,325 @@ export interface IpSecurityRestrictionRule { name: string; } +// @public +export interface Job extends TrackedResource { + configuration?: JobConfiguration; + environmentId?: string; + readonly eventStreamEndpoint?: string; + identity?: ManagedServiceIdentity; + readonly outboundIpAddresses?: string[]; + readonly provisioningState?: JobProvisioningState; + template?: JobTemplate; + workloadProfileName?: string; +} + +// @public +export interface JobConfiguration { + eventTriggerConfig?: JobConfigurationEventTriggerConfig; + manualTriggerConfig?: JobConfigurationManualTriggerConfig; + registries?: RegistryCredentials[]; + replicaRetryLimit?: number; + replicaTimeout: number; + scheduleTriggerConfig?: JobConfigurationScheduleTriggerConfig; + secrets?: Secret[]; + triggerType: TriggerType; +} + +// @public +export interface JobConfigurationEventTriggerConfig { + parallelism?: number; + replicaCompletionCount?: number; + scale?: JobScale; +} + +// @public +export interface JobConfigurationManualTriggerConfig { + parallelism?: number; + replicaCompletionCount?: number; +} + +// @public +export interface JobConfigurationScheduleTriggerConfig { + cronExpression: string; + parallelism?: number; + replicaCompletionCount?: number; +} + +// @public +export interface JobExecution { + endTime?: Date; + id?: string; + name?: string; + startTime?: Date; + readonly status?: JobExecutionRunningState; + template?: JobExecutionTemplate; + type?: string; +} + +// @public +export interface JobExecutionBase { + id?: string; + name?: string; +} + +// @public +export interface JobExecutionContainer { + args?: string[]; + command?: string[]; + env?: EnvironmentVar[]; + image?: string; + name?: string; + resources?: ContainerResources; +} + +// @public +export interface JobExecutionNamesCollection { + value: JobExecutionBase[]; +} + +// @public +export interface JobExecutionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type JobExecutionResponse = JobExecution; + +// @public +export type JobExecutionRunningState = string; + +// @public +export interface JobExecutionTemplate { + containers?: JobExecutionContainer[]; + initContainers?: JobExecutionContainer[]; +} + +// @public +export interface JobPatchProperties { + identity?: ManagedServiceIdentity; + // (undocumented) + properties?: JobPatchPropertiesProperties; + tags?: { + [propertyName: string]: string; + }; +} + +// @public (undocumented) +export interface JobPatchPropertiesProperties { + configuration?: JobConfiguration; + environmentId?: string; + eventStreamEndpoint?: string; + outboundIpAddresses?: string[]; + template?: JobTemplate; +} + +// @public +export type JobProvisioningState = string; + +// @public +export interface Jobs { + beginCreateOrUpdate(resourceGroupName: string, jobEnvelope: Job, options?: JobsCreateOrUpdateOptionalParams): Promise, JobsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, jobEnvelope: Job, options?: JobsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, options?: JobsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, options?: JobsDeleteOptionalParams): Promise; + beginStart(resourceGroupName: string, template: JobExecutionTemplate, options?: JobsStartOptionalParams): Promise, JobsStartResponse>>; + beginStartAndWait(resourceGroupName: string, template: JobExecutionTemplate, options?: JobsStartOptionalParams): Promise; + beginStopExecution(resourceGroupName: string, options?: JobsStopExecutionOptionalParams): Promise, void>>; + beginStopExecutionAndWait(resourceGroupName: string, options?: JobsStopExecutionOptionalParams): Promise; + beginStopMultipleExecutions(resourceGroupName: string, options?: JobsStopMultipleExecutionsOptionalParams): Promise, JobsStopMultipleExecutionsResponse>>; + beginStopMultipleExecutionsAndWait(resourceGroupName: string, options?: JobsStopMultipleExecutionsOptionalParams): Promise; + beginUpdate(resourceGroupName: string, jobEnvelope: JobPatchProperties, options?: JobsUpdateOptionalParams): Promise, JobsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, jobEnvelope: JobPatchProperties, options?: JobsUpdateOptionalParams): Promise; + get(resourceGroupName: string, options?: JobsGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: JobsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: JobsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + listSecrets(resourceGroupName: 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; + value: Job[]; +} + +// @public +export interface JobsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type JobsCreateOrUpdateResponse = Job; + +// @public +export interface JobsDeleteHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface JobsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface JobSecretsCollection { + value: Secret[]; +} + +// @public +export interface JobsExecutions { + list(resourceGroupName: string, options?: JobsExecutionsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface JobsExecutionsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type JobsExecutionsListNextResponse = ContainerAppJobExecutions; + +// @public +export interface JobsExecutionsListOptionalParams extends coreClient.OperationOptions { + filter?: string; +} + +// @public +export type JobsExecutionsListResponse = ContainerAppJobExecutions; + +// @public +export interface JobsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type JobsGetResponse = Job; + +// @public +export interface JobsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type JobsListByResourceGroupNextResponse = JobsCollection; + +// @public +export interface JobsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type JobsListByResourceGroupResponse = JobsCollection; + +// @public +export interface JobsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type JobsListBySubscriptionNextResponse = JobsCollection; + +// @public +export interface JobsListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type JobsListBySubscriptionResponse = JobsCollection; + +// @public +export interface JobsListSecretsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type JobsListSecretsResponse = JobSecretsCollection; + +// @public +export interface JobsStartHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface JobsStartOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type JobsStartResponse = JobExecutionBase; + +// @public +export interface JobsStopExecutionHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface JobsStopExecutionOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface JobsStopMultipleExecutionsHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface JobsStopMultipleExecutionsOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type JobsStopMultipleExecutionsResponse = ContainerAppJobExecutions; + +// @public +export interface JobsUpdateHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface JobsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type JobsUpdateResponse = Job; + +// @public +export interface JobTemplate { + containers?: Container[]; + initContainers?: InitContainer[]; + volumes?: Volume[]; +} + // @public export interface JwtClaimChecks { allowedClientApplications?: string[]; allowedGroups?: string[]; } +// @public +export interface KedaConfiguration { + readonly version?: string; +} + // @public export enum KnownAccessMode { ReadOnly = "ReadOnly", @@ -1517,6 +1928,12 @@ export enum KnownActiveRevisionsMode { Single = "Single" } +// @public +export enum KnownAffinity { + None = "none", + Sticky = "sticky" +} + // @public export enum KnownApplicability { Custom = "Custom", @@ -1535,13 +1952,6 @@ export enum KnownBindingType { SniEnabled = "SniEnabled" } -// @public -export enum KnownCategory { - PremiumSkuComputeOptimized = "PremiumSkuComputeOptimized", - PremiumSkuGeneralPurpose = "PremiumSkuGeneralPurpose", - PremiumSkuMemoryOptimized = "PremiumSkuMemoryOptimized" -} - // @public export enum KnownCertificateProvisioningState { Canceled = "Canceled", @@ -1569,6 +1979,13 @@ export enum KnownConnectedEnvironmentProvisioningState { Waiting = "Waiting" } +// @public +export enum KnownContainerAppContainerRunningState { + Running = "Running", + Terminated = "Terminated", + Waiting = "Waiting" +} + // @public export enum KnownContainerAppProvisioningState { Canceled = "Canceled", @@ -1578,6 +1995,13 @@ export enum KnownContainerAppProvisioningState { Succeeded = "Succeeded" } +// @public +export enum KnownContainerAppReplicaRunningState { + NotRunning = "NotRunning", + Running = "Running", + Unknown = "Unknown" +} + // @public export enum KnownCreatedByType { Application = "Application", @@ -1605,6 +2029,13 @@ export enum KnownExtendedLocationTypes { CustomLocation = "CustomLocation" } +// @public +export enum KnownIngressClientCertificateMode { + Accept = "accept", + Ignore = "ignore", + Require = "require" +} + // @public export enum KnownIngressTransportMethod { Auto = "auto", @@ -1613,6 +2044,26 @@ export enum KnownIngressTransportMethod { Tcp = "tcp" } +// @public +export enum KnownJobExecutionRunningState { + Degraded = "Degraded", + Failed = "Failed", + Processing = "Processing", + Running = "Running", + Stopped = "Stopped", + Succeeded = "Succeeded", + Unknown = "Unknown" +} + +// @public +export enum KnownJobProvisioningState { + Canceled = "Canceled", + Deleting = "Deleting", + Failed = "Failed", + InProgress = "InProgress", + Succeeded = "Succeeded" +} + // @public export enum KnownLogLevel { Debug = "debug", @@ -1622,9 +2073,10 @@ export enum KnownLogLevel { } // @public -export enum KnownManagedEnvironmentOutBoundType { - LoadBalancer = "LoadBalancer", - UserDefinedRouting = "UserDefinedRouting" +export enum KnownManagedCertificateDomainControlValidation { + Cname = "CNAME", + Http = "HTTP", + TXT = "TXT" } // @public @@ -1652,15 +2104,19 @@ export enum KnownRevisionProvisioningState { } // @public -export enum KnownScheme { - Http = "HTTP", - Https = "HTTPS" +export enum KnownRevisionRunningState { + Degraded = "Degraded", + Failed = "Failed", + Processing = "Processing", + Running = "Running", + Stopped = "Stopped", + Unknown = "Unknown" } // @public -export enum KnownSkuName { - Consumption = "Consumption", - Premium = "Premium" +export enum KnownScheme { + Http = "HTTP", + Https = "HTTPS" } // @public @@ -1674,7 +2130,15 @@ export enum KnownSourceControlOperationState { // @public export enum KnownStorageType { AzureFile = "AzureFile", - EmptyDir = "EmptyDir" + EmptyDir = "EmptyDir", + Secret = "Secret" +} + +// @public +export enum KnownTriggerType { + Event = "Event", + Manual = "Manual", + Scheduled = "Scheduled" } // @public @@ -1712,17 +2176,103 @@ export interface LoginScopes { // @public export type LogLevel = string; +// @public +export interface ManagedCertificate extends TrackedResource { + properties?: ManagedCertificateProperties; +} + +// @public +export interface ManagedCertificateCollection { + readonly nextLink?: string; + value: ManagedCertificate[]; +} + +// @public +export type ManagedCertificateDomainControlValidation = string; + +// @public +export interface ManagedCertificatePatch { + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface ManagedCertificateProperties { + domainControlValidation?: ManagedCertificateDomainControlValidation; + readonly error?: string; + readonly provisioningState?: CertificateProvisioningState; + subjectName?: string; + readonly validationToken?: string; +} + +// @public +export interface ManagedCertificates { + beginCreateOrUpdate(resourceGroupName: string, environmentName: string, managedCertificateName: string, options?: ManagedCertificatesCreateOrUpdateOptionalParams): Promise, ManagedCertificatesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, environmentName: string, managedCertificateName: string, options?: ManagedCertificatesCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, environmentName: string, managedCertificateName: string, options?: ManagedCertificatesDeleteOptionalParams): Promise; + get(resourceGroupName: string, environmentName: string, managedCertificateName: string, options?: ManagedCertificatesGetOptionalParams): Promise; + list(resourceGroupName: string, environmentName: string, options?: ManagedCertificatesListOptionalParams): PagedAsyncIterableIterator; + update(resourceGroupName: string, environmentName: string, managedCertificateName: string, managedCertificateEnvelope: ManagedCertificatePatch, options?: ManagedCertificatesUpdateOptionalParams): Promise; +} + +// @public +export interface ManagedCertificatesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + managedCertificateEnvelope?: ManagedCertificate; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ManagedCertificatesCreateOrUpdateResponse = ManagedCertificate; + +// @public +export interface ManagedCertificatesDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface ManagedCertificatesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedCertificatesGetResponse = ManagedCertificate; + +// @public +export interface ManagedCertificatesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedCertificatesListNextResponse = ManagedCertificateCollection; + +// @public +export interface ManagedCertificatesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedCertificatesListResponse = ManagedCertificateCollection; + +// @public +export interface ManagedCertificatesUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedCertificatesUpdateResponse = ManagedCertificate; + // @public export interface ManagedEnvironment extends TrackedResource { appLogsConfiguration?: AppLogsConfiguration; customDomainConfiguration?: CustomDomainConfiguration; daprAIConnectionString?: string; daprAIInstrumentationKey?: string; + daprConfiguration?: DaprConfiguration; readonly defaultDomain?: string; readonly deploymentErrors?: string; readonly eventStreamEndpoint?: string; + infrastructureResourceGroup?: string; + kedaConfiguration?: KedaConfiguration; + kind?: string; + peerAuthentication?: ManagedEnvironmentPropertiesPeerAuthentication; readonly provisioningState?: EnvironmentProvisioningState; - sku?: EnvironmentSkuProperties; readonly staticIp?: string; vnetConfiguration?: VnetConfiguration; workloadProfiles?: WorkloadProfile[]; @@ -1750,22 +2300,18 @@ export interface ManagedEnvironmentDiagnosticsListDetectorsOptionalParams extend export type ManagedEnvironmentDiagnosticsListDetectorsResponse = DiagnosticsCollection; // @public -export interface ManagedEnvironmentOutboundSettings { - outBoundType?: ManagedEnvironmentOutBoundType; - virtualNetworkApplianceIp?: string; +export interface ManagedEnvironmentPropertiesPeerAuthentication { + mtls?: Mtls; } -// @public -export type ManagedEnvironmentOutBoundType = string; - // @public export interface ManagedEnvironments { - beginCreateOrUpdate(resourceGroupName: string, environmentName: string, environmentEnvelope: ManagedEnvironment, options?: ManagedEnvironmentsCreateOrUpdateOptionalParams): Promise, ManagedEnvironmentsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, environmentName: string, environmentEnvelope: ManagedEnvironment, options?: ManagedEnvironmentsCreateOrUpdateOptionalParams): Promise, ManagedEnvironmentsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, environmentName: string, environmentEnvelope: ManagedEnvironment, options?: ManagedEnvironmentsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, environmentName: string, options?: ManagedEnvironmentsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, environmentName: string, options?: ManagedEnvironmentsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, environmentName: string, options?: ManagedEnvironmentsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, environmentName: string, environmentEnvelope: ManagedEnvironment, options?: ManagedEnvironmentsUpdateOptionalParams): Promise, void>>; - beginUpdateAndWait(resourceGroupName: string, environmentName: string, environmentEnvelope: ManagedEnvironment, options?: ManagedEnvironmentsUpdateOptionalParams): Promise; + beginUpdate(resourceGroupName: string, environmentName: string, environmentEnvelope: ManagedEnvironment, options?: ManagedEnvironmentsUpdateOptionalParams): Promise, ManagedEnvironmentsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, environmentName: string, environmentEnvelope: ManagedEnvironment, options?: ManagedEnvironmentsUpdateOptionalParams): Promise; get(resourceGroupName: string, environmentName: string, options?: ManagedEnvironmentsGetOptionalParams): Promise; getAuthToken(resourceGroupName: string, environmentName: string, options?: ManagedEnvironmentsGetAuthTokenOptionalParams): Promise; listByResourceGroup(resourceGroupName: string, options?: ManagedEnvironmentsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; @@ -1916,6 +2462,9 @@ export interface ManagedEnvironmentsUpdateOptionalParams extends coreClient.Oper updateIntervalInMs?: number; } +// @public +export type ManagedEnvironmentsUpdateResponse = ManagedEnvironment; + // @public export interface ManagedServiceIdentity { readonly principalId?: string; @@ -1929,6 +2478,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; @@ -2040,6 +2594,9 @@ export interface RegistryInfo { export interface Replica extends ProxyResource { containers?: ReplicaContainer[]; readonly createdTime?: Date; + initContainers?: ReplicaContainer[]; + readonly runningState?: ContainerAppReplicaRunningState; + readonly runningStateDetails?: string; } // @public @@ -2055,6 +2612,8 @@ export interface ReplicaContainer { name?: string; ready?: boolean; restartCount?: number; + readonly runningState?: ContainerAppContainerRunningState; + readonly runningStateDetails?: string; started?: boolean; } @@ -2076,6 +2635,7 @@ export interface Revision extends ProxyResource { readonly provisioningError?: string; readonly provisioningState?: RevisionProvisioningState; readonly replicas?: number; + readonly runningState?: RevisionRunningState; readonly template?: Template; readonly trafficWeight?: number; } @@ -2092,6 +2652,9 @@ export type RevisionHealthState = string; // @public export type RevisionProvisioningState = string; +// @public +export type RevisionRunningState = string; + // @public export interface Scale { maxReplicas?: number; @@ -2119,6 +2682,8 @@ export type Scheme = string; // @public export interface Secret { + identity?: string; + keyVaultUrl?: string; name?: string; value?: string; } @@ -2129,7 +2694,21 @@ export interface SecretsCollection { } // @public -export type SkuName = string; +export interface SecretVolumeItem { + path?: string; + secretRef?: string; +} + +// @public +export interface Service { + type: string; +} + +// @public +export interface ServiceBind { + name?: string; + serviceId?: string; +} // @public export interface SourceControl extends ProxyResource { @@ -2175,6 +2754,8 @@ export interface Template { initContainers?: InitContainer[]; revisionSuffix?: string; scale?: Scale; + serviceBinds?: ServiceBind[]; + terminationGracePeriodSeconds?: number; volumes?: Volume[]; } @@ -2194,6 +2775,9 @@ export interface TrafficWeight { weight?: number; } +// @public +export type TriggerType = string; + // @public export interface Twitter { enabled?: boolean; @@ -2223,15 +2807,15 @@ export interface VnetConfiguration { dockerBridgeCidr?: string; infrastructureSubnetId?: string; internal?: boolean; - outboundSettings?: ManagedEnvironmentOutboundSettings; platformReservedCidr?: string; platformReservedDnsIP?: string; - runtimeSubnetId?: string; } // @public export interface Volume { + mountOptions?: string; name?: string; + secrets?: SecretVolumeItem[]; storageName?: string; storageType?: StorageType; } @@ -2239,13 +2823,15 @@ export interface Volume { // @public export interface VolumeMount { mountPath?: string; + subPath?: string; volumeName?: string; } // @public export interface WorkloadProfile { - maximumCount: number; - minimumCount: number; + maximumCount?: number; + minimumCount?: number; + name: string; workloadProfileType: 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 698603df20b1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/availableWorkloadProfilesGetSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/AvailableWorkloadProfiles_Get.json - */ -async function billingMetersGet() { - const subscriptionId = "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); -} - -billingMetersGet().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 4ab2cac8f861..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/billingMetersGetSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect 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"; - -/** - * 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-06-01-preview/examples/BillingMeters_Get.json - */ -async function billingMetersGet() { - const subscriptionId = "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); -} - -billingMetersGet().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 3a81f38b4418..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesCreateOrUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - Certificate, - CertificatesCreateOrUpdateOptionalParams, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Create or Update a Certificate. - * - * @summary Create or Update a Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificate_CreateOrUpdate.json - */ -async function createOrUpdateCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const environmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const certificateEnvelope: Certificate = { - location: "East US", - properties: { - password: "private key password", - value: Buffer.from("PFX-or-PEM-blob") - } - }; - 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); -} - -createOrUpdateCertificate().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 9826234d5259..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Deletes the specified Certificate. - * - * @summary Deletes the specified Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificate_Delete.json - */ -async function deleteCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -deleteCertificate().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 dfc9a417da1b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the specified Certificate. - * - * @summary Get the specified Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificate_Get.json - */ -async function getCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -getCertificate().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 2fd0d1b41794..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesListSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Certificates in a given managed environment. - * - * @summary Get the Certificates in a given managed environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificates_ListByManagedEnvironment.json - */ -async function listCertificatesByManagedEnvironment() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -listCertificatesByManagedEnvironment().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 07c29f9f9482..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesUpdateSample.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 { - CertificatePatch, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Patches a certificate. Currently only patching of tags is supported - * - * @summary Patches a certificate. Currently only patching of tags is supported - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificates_Patch.json - */ -async function patchCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -patchCertificate().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 a35ed9013e5b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesCreateOrUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - Certificate, - ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Create or Update a Certificate. - * - * @summary Create or Update a Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json - */ -async function createOrUpdateCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const certificateEnvelope: Certificate = { - location: "East US", - properties: { - password: "private key password", - value: Buffer.from("PFX-or-PEM-blob") - } - }; - 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); -} - -createOrUpdateCertificate().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 c96e91e0f079..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Deletes the specified Certificate. - * - * @summary Deletes the specified Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_Delete.json - */ -async function deleteCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -deleteCertificate().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 545e01de21db..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the specified Certificate. - * - * @summary Get the specified Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_Get.json - */ -async function getCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -getCertificate().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 6136748e56e1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesListSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json - */ -async function listCertificatesByConnectedEnvironment() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -listCertificatesByConnectedEnvironment().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 6727f124c0d1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesUpdateSample.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 { - CertificatePatch, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Patches a certificate. Currently only patching of tags is supported - * - * @summary Patches a certificate. Currently only patching of tags is supported - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_Patch.json - */ -async function patchCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -patchCertificate().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 76781d175693..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCheckNameAvailabilitySample.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 { - CheckNameAvailabilityRequest, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json - */ -async function certificatesCheckNameAvailability() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -certificatesCheckNameAvailability().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 fe3a09f4bbb2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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-06-01-preview/examples/ConnectedEnvironments_CreateOrUpdate.json - */ -async function createKubeEnvironments() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "testenv"; - const environmentEnvelope: ConnectedEnvironment = { - customDomainConfiguration: { - certificatePassword: Buffer.from("private key password"), - certificateValue: Buffer.from("PFX-or-PEM-blob"), - 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); -} - -createKubeEnvironments().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 801dd2337fa8..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.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 { - DaprComponent, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json - */ -async function createOrUpdateDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -createOrUpdateDaprComponent().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 4336d0617d7e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_Delete.json - */ -async function deleteDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -deleteDaprComponent().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 b70c0abfbce3..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a dapr component. - * - * @summary Get a dapr component. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json - */ -async function getDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -getDaprComponent().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 2ee4b0af6bff..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsListSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_List.json - */ -async function listDaprComponents() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -listDaprComponents().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 3d6f275aedb2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsListSecretsSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json - */ -async function listContainerAppsSecrets() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -listContainerAppsSecrets().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 39fea934b220..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Delete an connectedEnvironment. - * - * @summary Delete an connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Delete.json - */ -async function deleteConnectedEnvironmentByConnectedEnvironmentName() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -deleteConnectedEnvironmentByConnectedEnvironmentName().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 cb623c2ad6b1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ConnectedEnvironments_Get.json - */ -async function getConnectedEnvironmentByConnectedEnvironmentName() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -getConnectedEnvironmentByConnectedEnvironmentName().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 7472652f927f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsListByResourceGroupSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ConnectedEnvironments_ListByResourceGroup.json - */ -async function listEnvironmentsByResourceGroup() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.connectedEnvironments.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listEnvironmentsByResourceGroup().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 46d30ed3d5df..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ConnectedEnvironments_ListBySubscription.json - */ -async function listConnectedEnvironmentsBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.connectedEnvironments.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -listConnectedEnvironmentsBySubscription().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 ad8e052a1ef3..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesCreateOrUpdateSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ConnectedEnvironmentStorage, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json - */ -async function createOrUpdateEnvironmentsStorage() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -createOrUpdateEnvironmentsStorage().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 2a03ad0f73e9..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ConnectedEnvironmentsStorages_Delete.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -listEnvironmentsStoragesBySubscription().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 a22e6733e052..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ConnectedEnvironmentsStorages_Get.json - */ -async function getAEnvironmentsStoragePropertiesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -getAEnvironmentsStoragePropertiesBySubscription().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 896a88e038ff..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesListSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ConnectedEnvironmentsStorages_List.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -listEnvironmentsStoragesBySubscription().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 03bcbc34fcb2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsUpdateSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Patches a Managed Environment. Only patching of tags is supported currently - * - * @summary Patches a Managed Environment. Only patching of tags is supported currently - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Patch.json - */ -async function patchManagedEnvironment() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -patchManagedEnvironment().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 8be594611ce3..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsCreateOrUpdateSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AuthConfig, ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/AuthConfigs_CreateOrUpdate.json - */ -async function createOrUpdateContainerAppAuthConfig() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const 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); -} - -createOrUpdateContainerAppAuthConfig().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 fa32ed65ae85..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/AuthConfigs_Delete.json - */ -async function deleteContainerAppAuthConfig() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const authConfigName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.delete( - resourceGroupName, - containerAppName, - authConfigName - ); - console.log(result); -} - -deleteContainerAppAuthConfig().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 301bd06c5bff..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a AuthConfig of a Container App. - * - * @summary Get a AuthConfig of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_Get.json - */ -async function getContainerAppAuthConfig() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const authConfigName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.get( - resourceGroupName, - containerAppName, - authConfigName - ); - console.log(result); -} - -getContainerAppAuthConfig().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 3e33157a6831..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsListByContainerAppSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Container App AuthConfigs in a given resource group. - * - * @summary Get the Container App AuthConfigs in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_ListByContainer.json - */ -async function listAuthConfigsByContainerApps() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsAuthConfigs.listByContainerApp( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listAuthConfigsByContainerApps().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsCreateOrUpdateSample.ts deleted file mode 100644 index 89b3f42694d0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsCreateOrUpdateSample.ts +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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-06-01-preview/examples/ContainerApps_CreateOrUpdate.json - */ -async function createOrUpdateContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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" - } - ], - 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" } } - } - ] - } - }, - workloadProfileType: "GeneralPurpose" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginCreateOrUpdateAndWait( - resourceGroupName, - containerAppName, - containerAppEnvelope - ); - console.log(result); -} - -createOrUpdateContainerApp().catch(console.error); - -/** - * 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-06-01-preview/examples/ContainerApps_TcpApp_CreateOrUpdate.json - */ -async function createOrUpdateTcpApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -createOrUpdateTcpApp().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 7a1138e20db0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ContainerApps_Delete.json - */ -async function deleteContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -deleteContainerApp().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 25662a7131ab..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetDetectorSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ContainerAppsDiagnostics_Get.json - */ -async function getContainerAppDiagnosticsInfo() { - const subscriptionId = "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = "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); -} - -getContainerAppDiagnosticsInfo().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 e5841cc7790d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetRevisionSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a revision of a Container App. - * - * @summary Get a revision of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Get.json - */ -async function getContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -getContainerAppRevision().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 99fd7265f162..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetRootSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the properties of a Container App. - * - * @summary Get the properties of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Get.json - */ -async function getContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -getContainerApp().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 35216be7c122..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsListDetectorsSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ContainerAppsDiagnostics_List.json - */ -async function getTheListOfAvailableDiagnosticsForAGivenContainerApp() { - const subscriptionId = "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = "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); -} - -getTheListOfAvailableDiagnosticsForAGivenContainerApp().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 2e43067961a9..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsListRevisionsSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Revisions for a given Container App. - * - * @summary Get the Revisions for a given Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_List.json - */ -async function listContainerAppRevisions() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsDiagnostics.listRevisions( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppRevisions().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 f44411c37e54..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsGetAuthTokenSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ContainerApps_GetAuthToken.json - */ -async function getContainerAppAuthToken() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "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); -} - -getContainerAppAuthToken().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 60825d27228e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the properties of a Container App. - * - * @summary Get the properties of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Get.json - */ -async function getContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -getContainerApp().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 abe888508d18..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListByResourceGroupSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Container Apps in a given resource group. - * - * @summary Get the Container Apps in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListByResourceGroup.json - */ -async function listContainerAppsByResourceGroup() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerApps.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppsByResourceGroup().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListBySubscriptionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListBySubscriptionSample.ts deleted file mode 100644 index 17c23ab32300..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Container Apps in a given subscription. - * - * @summary Get the Container Apps in a given subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListBySubscription.json - */ -async function listContainerAppsBySubscription() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerApps.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppsBySubscription().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListCustomHostNameAnalysisSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListCustomHostNameAnalysisSample.ts deleted file mode 100644 index 6392220fed5d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListCustomHostNameAnalysisSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ContainerAppsListCustomHostNameAnalysisOptionalParams, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Analyzes a custom hostname for a Container App - * - * @summary Analyzes a custom hostname for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json - */ -async function analyzeCustomHostname() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const customHostname = "my.name.corp"; - const options: ContainerAppsListCustomHostNameAnalysisOptionalParams = { - customHostname - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.listCustomHostNameAnalysis( - resourceGroupName, - containerAppName, - options - ); - console.log(result); -} - -analyzeCustomHostname().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListSecretsSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListSecretsSample.ts deleted file mode 100644 index 8c6e649c77b7..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListSecretsSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to List secrets for a container app - * - * @summary List secrets for a container app - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListSecrets.json - */ -async function listContainerAppsSecrets() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -listContainerAppsSecrets().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 1f81d71ba138..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionReplicasGetReplicaSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a replica for a Container App Revision. - * - * @summary Get a replica for a Container App Revision. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Replicas_Get.json - */ -async function getContainerAppRevisionReplica() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "myapp"; - const revisionName = "myapp--0wlqy09"; - const 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); -} - -getContainerAppRevisionReplica().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 6ec3eb9518ec..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionReplicasListReplicasSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to List replicas for a Container App Revision. - * - * @summary List replicas for a Container App Revision. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Replicas_List.json - */ -async function listContainerAppReplicas() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "myapp"; - const revisionName = "myapp--0wlqy09"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisionReplicas.listReplicas( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -listContainerAppReplicas().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsActivateRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsActivateRevisionSample.ts deleted file mode 100644 index f17d31562a11..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsActivateRevisionSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Activates a revision for a Container App - * - * @summary Activates a revision for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Activate.json - */ -async function activateContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -activateContainerAppRevision().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 29c94e610bd7..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsDeactivateRevisionSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Deactivates a revision for a Container App - * - * @summary Deactivates a revision for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Deactivate.json - */ -async function deactivateContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -deactivateContainerAppRevision().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 d80013220cea..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsGetRevisionSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a revision of a Container App. - * - * @summary Get a revision of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Get.json - */ -async function getContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -getContainerAppRevision().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 05db4b97c3b9..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsListRevisionsSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Revisions for a given Container App. - * - * @summary Get the Revisions for a given Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_List.json - */ -async function listContainerAppRevisions() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsRevisions.listRevisions( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppRevisions().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsRestartRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsRestartRevisionSample.ts deleted file mode 100644 index fc29bb2c88ad..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsRestartRevisionSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Restarts a revision for a Container App - * - * @summary Restarts a revision for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Restart.json - */ -async function restartContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -restartContainerAppRevision().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 86418ae8cf45..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsCreateOrUpdateSample.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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-06-01-preview/examples/SourceControls_CreateOrUpdate.json - */ -async function createOrUpdateContainerAppSourceControl() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const 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); -} - -createOrUpdateContainerAppSourceControl().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 2b0f557de321..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/SourceControls_Delete.json - */ -async function deleteContainerAppSourceControl() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const sourceControlName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.beginDeleteAndWait( - resourceGroupName, - containerAppName, - sourceControlName - ); - console.log(result); -} - -deleteContainerAppSourceControl().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 3866b69a12ea..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a SourceControl of a Container App. - * - * @summary Get a SourceControl of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_Get.json - */ -async function getContainerAppSourceControl() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const sourceControlName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.get( - resourceGroupName, - containerAppName, - sourceControlName - ); - console.log(result); -} - -getContainerAppSourceControl().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 c9f6fe3aac45..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsListByContainerAppSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Container App SourceControls in a given resource group. - * - * @summary Get the Container App SourceControls in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_ListByContainer.json - */ -async function listAppSourceControls() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsSourceControls.listByContainerApp( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listAppSourceControls().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsUpdateSample.ts deleted file mode 100644 index 4d02d6f05848..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsUpdateSample.ts +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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-06-01-preview/examples/ContainerApps_Patch.json - */ -async function patchContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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" - } - ], - 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); -} - -patchContainerApp().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 338e0f0f227e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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-06-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json - */ -async function createOrUpdateDaprComponentWithSecretStoreComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -createOrUpdateDaprComponentWithSecretStoreComponent().catch(console.error); - -/** - * 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-06-01-preview/examples/DaprComponents_CreateOrUpdate_Secrets.json - */ -async function createOrUpdateDaprComponentWithSecrets() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -createOrUpdateDaprComponentWithSecrets().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 a25337cb573d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Delete a Dapr Component from a Managed Environment. - * - * @summary Delete a Dapr Component from a Managed Environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Delete.json - */ -async function deleteDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -deleteDaprComponent().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 7af846366d9a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsGetSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a dapr component. - * - * @summary Get a dapr component. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json - */ -async function getDaprComponentWithSecretStoreComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -getDaprComponentWithSecretStoreComponent().catch(console.error); - -/** - * 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-06-01-preview/examples/DaprComponents_Get_Secrets.json - */ -async function getDaprComponentWithSecrets() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -getDaprComponentWithSecrets().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 523a92eec55a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsListSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Dapr Components for a managed environment. - * - * @summary Get the Dapr Components for a managed environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_List.json - */ -async function listDaprComponents() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.daprComponents.list( - resourceGroupName, - environmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listDaprComponents().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsListSecretsSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsListSecretsSample.ts deleted file mode 100644 index 22ee2b7da364..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsListSecretsSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/DaprComponents_ListSecrets.json - */ -async function listContainerAppsSecrets() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -listContainerAppsSecrets().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 249ff959e347..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentDiagnosticsGetDetectorSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ManagedEnvironmentDiagnostics_Get.json - */ -async function getDiagnosticDataForAManagedEnvironments() { - const subscriptionId = "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = "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); -} - -getDiagnosticDataForAManagedEnvironments().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 e8fcf2a71dc0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentDiagnosticsListDetectorsSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ManagedEnvironmentDiagnostics_List.json - */ -async function getTheListOfAvailableDiagnosticDataForAManagedEnvironments() { - const subscriptionId = "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = "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); -} - -getTheListOfAvailableDiagnosticDataForAManagedEnvironments().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 ef1d2a05483c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsCreateOrUpdateSample.ts +++ /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. -import { - ManagedEnvironment, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Creates or updates a Managed Environment used to host container apps. - * - * @summary Creates or updates a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json - */ -async function createEnvironments() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const environmentName = "testcontainerenv"; - const environmentEnvelope: ManagedEnvironment = { - appLogsConfiguration: { - logAnalyticsConfiguration: { customerId: "string", sharedKey: "string" } - }, - customDomainConfiguration: { - certificatePassword: Buffer.from("private key password"), - certificateValue: Buffer.from("PFX-or-PEM-blob"), - dnsSuffix: "www.my-name.com" - }, - daprAIConnectionString: - "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/", - location: "East US", - sku: { name: "Premium" }, - vnetConfiguration: { - outboundSettings: { - outBoundType: "UserDefinedRouting", - virtualNetworkApplianceIp: "192.168.1.20" - } - }, - workloadProfiles: [ - { - maximumCount: 12, - minimumCount: 3, - workloadProfileType: "GeneralPurpose" - }, - { - maximumCount: 6, - minimumCount: 3, - workloadProfileType: "MemoryOptimized" - }, - { - maximumCount: 6, - minimumCount: 3, - workloadProfileType: "ComputeOptimized" - } - ], - zoneRedundant: true - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginCreateOrUpdateAndWait( - resourceGroupName, - environmentName, - environmentEnvelope - ); - console.log(result); -} - -createEnvironments().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 0a20d29b8396..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Delete a Managed Environment if it does not have any container apps. - * - * @summary Delete a Managed Environment if it does not have any container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Delete.json - */ -async function deleteEnvironmentByName() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -deleteEnvironmentByName().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 497d60bfe67c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsDiagnosticsGetRootSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the properties of a Managed Environment used to host container apps. - * - * @summary Get the properties of a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Get.json - */ -async function getEnvironmentsByName() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -getEnvironmentsByName().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 8086473b0918..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsGetAuthTokenSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ManagedEnvironments_GetAuthToken.json - */ -async function getManagedEnvironmentAuthToken() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "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); -} - -getManagedEnvironmentAuthToken().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 5a822df7e7c5..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the properties of a Managed Environment used to host container apps. - * - * @summary Get the properties of a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Get.json - */ -async function getEnvironmentsByName() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -getEnvironmentsByName().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 fc292fcd4f94..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListByResourceGroupSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get all the Managed Environments in a resource group. - * - * @summary Get all the Managed Environments in a resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json - */ -async function listEnvironmentsByResourceGroup() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listEnvironmentsByResourceGroup().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListBySubscriptionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListBySubscriptionSample.ts deleted file mode 100644 index 26d08b1a499d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get all Managed Environments for a subscription. - * - * @summary Get all Managed Environments for a subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListBySubscription.json - */ -async function listEnvironmentsBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -listEnvironmentsBySubscription().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListWorkloadProfileStatesSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListWorkloadProfileStatesSample.ts deleted file mode 100644 index bc4eb79e4476..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListWorkloadProfileStatesSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get all workload Profile States for a Premium Managed Environment. - * - * @summary Get all workload Profile States for a Premium Managed Environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json - */ -async function listEnvironmentsBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -listEnvironmentsBySubscription().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 1c2f40f19495..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesCreateOrUpdateSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ManagedEnvironmentStorage, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Create or update storage for a managedEnvironment. - * - * @summary Create or update storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json - */ -async function createOrUpdateEnvironmentsStorage() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -createOrUpdateEnvironmentsStorage().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 e956869c28fb..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Delete storage for a managedEnvironment. - * - * @summary Delete storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_Delete.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -listEnvironmentsStoragesBySubscription().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 359c283d858f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get storage for a managedEnvironment. - * - * @summary Get storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_Get.json - */ -async function getAEnvironmentsStoragePropertiesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -getAEnvironmentsStoragePropertiesBySubscription().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 7b6069aac420..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesListSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get all storages for a managedEnvironment. - * - * @summary Get all storages for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_List.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -listEnvironmentsStoragesBySubscription().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 28543cfe3b93..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsUpdateSample.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 { - ManagedEnvironment, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ManagedEnvironments_Patch.json - */ -async function patchManagedEnvironment() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -patchManagedEnvironment().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 4f74d5e40cc5..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/namespacesCheckNameAvailabilitySample.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 { - CheckNameAvailabilityRequest, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/Certificates_CheckNameAvailability.json - */ -async function certificatesCheckNameAvailability() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -certificatesCheckNameAvailability().catch(console.error); - -/** - * 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-06-01-preview/examples/ContainerApps_CheckNameAvailability.json - */ -async function containerAppsCheckNameAvailability() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -containerAppsCheckNameAvailability().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 b2ea13421d19..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/operationsListSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Lists all of the available RP operations. - * - * @summary Lists all of the available RP operations. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Operations_List.json - */ -async function listAllOperations() { - const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -listAllOperations().catch(console.error); diff --git a/sdk/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 9baef631b125..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/README.md +++ /dev/null @@ -1,206 +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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json | -| [connectedEnvironmentsDeleteSample.js][connectedenvironmentsdeletesample] | Delete an connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-01-preview/examples/DaprComponents_ListSecrets.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-06-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-06-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-06-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json | -| [managedEnvironmentsDeleteSample.js][managedenvironmentsdeletesample] | Delete a Managed Environment if it does not have any container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-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-06-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-06-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-06-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-06-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-06-01-preview/examples/ManagedEnvironments_ListBySubscription.json | -| [managedEnvironmentsListWorkloadProfileStatesSample.js][managedenvironmentslistworkloadprofilestatessample] | Get all workload Profile States for a Premium Managed Environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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 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 -[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 7f1882ab9bd4..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/availableWorkloadProfilesGetSample.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * 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-06-01-preview/examples/AvailableWorkloadProfiles_Get.json - */ -async function billingMetersGet() { - const subscriptionId = "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); -} - -billingMetersGet().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 c30d9472509c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/billingMetersGetSample.js +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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-06-01-preview/examples/BillingMeters_Get.json - */ -async function billingMetersGet() { - const subscriptionId = "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); -} - -billingMetersGet().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 d13dcea0f4c6..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesCreateOrUpdateSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Create or Update a Certificate. - * - * @summary Create or Update a Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificate_CreateOrUpdate.json - */ -async function createOrUpdateCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const environmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const certificateEnvelope = { - location: "East US", - properties: { - password: "private key password", - value: Buffer.from("PFX-or-PEM-blob"), - }, - }; - 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); -} - -createOrUpdateCertificate().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 42d449c5793e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesDeleteSample.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"); - -/** - * 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-06-01-preview/examples/Certificate_Delete.json - */ -async function deleteCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -deleteCertificate().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 2e9d5d18679a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesGetSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the specified Certificate. - * - * @summary Get the specified Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificate_Get.json - */ -async function getCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -getCertificate().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 81b8eb555c7b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesListSample.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the Certificates in a given managed environment. - * - * @summary Get the Certificates in a given managed environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificates_ListByManagedEnvironment.json - */ -async function listCertificatesByManagedEnvironment() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -listCertificatesByManagedEnvironment().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 75e6a1fe3fc7..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesUpdateSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Patches a certificate. Currently only patching of tags is supported - * - * @summary Patches a certificate. Currently only patching of tags is supported - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificates_Patch.json - */ -async function patchCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -patchCertificate().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 f3dfcf2cc2ed..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesCreateOrUpdateSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Create or Update a Certificate. - * - * @summary Create or Update a Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json - */ -async function createOrUpdateCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const certificateEnvelope = { - location: "East US", - properties: { - password: "private key password", - value: Buffer.from("PFX-or-PEM-blob"), - }, - }; - 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); -} - -createOrUpdateCertificate().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 d35ca3587956..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesDeleteSample.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"); - -/** - * 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-06-01-preview/examples/ConnectedEnvironmentsCertificate_Delete.json - */ -async function deleteCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -deleteCertificate().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 d402ec7f6991..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesGetSample.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"); - -/** - * 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-06-01-preview/examples/ConnectedEnvironmentsCertificate_Get.json - */ -async function getCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -getCertificate().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 cfd9a6fcf41e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesListSample.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"); - -/** - * 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-06-01-preview/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json - */ -async function listCertificatesByConnectedEnvironment() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -listCertificatesByConnectedEnvironment().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 e1a279e1cc32..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesUpdateSample.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"); - -/** - * 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-06-01-preview/examples/ConnectedEnvironmentsCertificates_Patch.json - */ -async function patchCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -patchCertificate().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 730c0ee5bdff..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCheckNameAvailabilitySample.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"); - -/** - * 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-06-01-preview/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json - */ -async function certificatesCheckNameAvailability() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -certificatesCheckNameAvailability().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 116dd24f7526..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCreateOrUpdateSample.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"); - -/** - * 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-06-01-preview/examples/ConnectedEnvironments_CreateOrUpdate.json - */ -async function createKubeEnvironments() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "testenv"; - const environmentEnvelope = { - customDomainConfiguration: { - certificatePassword: Buffer.from("private key password"), - certificateValue: Buffer.from("PFX-or-PEM-blob"), - 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); -} - -createKubeEnvironments().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 7e6a13c94018..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.js +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * 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-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json - */ -async function createOrUpdateDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -createOrUpdateDaprComponent().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 7a6b8f18a83f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsDeleteSample.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"); - -/** - * 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-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_Delete.json - */ -async function deleteDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -deleteDaprComponent().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 561482152264..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsGetSample.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"); - -/** - * 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-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json - */ -async function getDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -getDaprComponent().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 e8d488d6cef4..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsListSample.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"); - -/** - * 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-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_List.json - */ -async function listDaprComponents() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -listDaprComponents().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 cd40dbc176c6..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsListSecretsSample.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"); - -/** - * 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-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json - */ -async function listContainerAppsSecrets() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -listContainerAppsSecrets().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 7002d2584e10..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Delete an connectedEnvironment. - * - * @summary Delete an connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Delete.json - */ -async function deleteConnectedEnvironmentByConnectedEnvironmentName() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -deleteConnectedEnvironmentByConnectedEnvironmentName().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 6765725e160c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * 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-06-01-preview/examples/ConnectedEnvironments_Get.json - */ -async function getConnectedEnvironmentByConnectedEnvironmentName() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -getConnectedEnvironmentByConnectedEnvironmentName().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 50c91cfbe080..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsListByResourceGroupSample.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * 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-06-01-preview/examples/ConnectedEnvironments_ListByResourceGroup.json - */ -async function listEnvironmentsByResourceGroup() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.connectedEnvironments.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -listEnvironmentsByResourceGroup().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 4e1a29e9da5c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsListBySubscriptionSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * 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-06-01-preview/examples/ConnectedEnvironments_ListBySubscription.json - */ -async function listConnectedEnvironmentsBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.connectedEnvironments.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -listConnectedEnvironmentsBySubscription().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 a4f1f5bdc432..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsStoragesCreateOrUpdateSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * 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-06-01-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json - */ -async function createOrUpdateEnvironmentsStorage() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -createOrUpdateEnvironmentsStorage().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 eb03a65389f2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsStoragesDeleteSample.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"); - -/** - * 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-06-01-preview/examples/ConnectedEnvironmentsStorages_Delete.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -listEnvironmentsStoragesBySubscription().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 084df5c46e69..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsStoragesGetSample.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"); - -/** - * 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-06-01-preview/examples/ConnectedEnvironmentsStorages_Get.json - */ -async function getAEnvironmentsStoragePropertiesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -getAEnvironmentsStoragePropertiesBySubscription().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 40a4dc60e34f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsStoragesListSample.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * 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-06-01-preview/examples/ConnectedEnvironmentsStorages_List.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -listEnvironmentsStoragesBySubscription().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 6f9b65433c28..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsUpdateSample.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Patches a Managed Environment. Only patching of tags is supported currently - * - * @summary Patches a Managed Environment. Only patching of tags is supported currently - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Patch.json - */ -async function patchManagedEnvironment() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -patchManagedEnvironment().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 728fe7d8e24c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsAuthConfigsCreateOrUpdateSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * 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-06-01-preview/examples/AuthConfigs_CreateOrUpdate.json - */ -async function createOrUpdateContainerAppAuthConfig() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const 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); -} - -createOrUpdateContainerAppAuthConfig().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 902bbbe2b611..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsAuthConfigsDeleteSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * 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-06-01-preview/examples/AuthConfigs_Delete.json - */ -async function deleteContainerAppAuthConfig() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const authConfigName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.delete( - resourceGroupName, - containerAppName, - authConfigName - ); - console.log(result); -} - -deleteContainerAppAuthConfig().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 168d13a1d19f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsAuthConfigsGetSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get a AuthConfig of a Container App. - * - * @summary Get a AuthConfig of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_Get.json - */ -async function getContainerAppAuthConfig() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const authConfigName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.get( - resourceGroupName, - containerAppName, - authConfigName - ); - console.log(result); -} - -getContainerAppAuthConfig().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 a779ea09b593..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsAuthConfigsListByContainerAppSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the Container App AuthConfigs in a given resource group. - * - * @summary Get the Container App AuthConfigs in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_ListByContainer.json - */ -async function listAuthConfigsByContainerApps() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsAuthConfigs.listByContainerApp( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listAuthConfigsByContainerApps().catch(console.error); diff --git a/sdk/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 bcf039a4288c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsCreateOrUpdateSample.js +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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-06-01-preview/examples/ContainerApps_CreateOrUpdate.json - */ -async function createOrUpdateContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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", - }, - ], - 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" } }, - }, - ], - }, - }, - workloadProfileType: "GeneralPurpose", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginCreateOrUpdateAndWait( - resourceGroupName, - containerAppName, - containerAppEnvelope - ); - console.log(result); -} - -createOrUpdateContainerApp().catch(console.error); - -/** - * 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-06-01-preview/examples/ContainerApps_TcpApp_CreateOrUpdate.json - */ -async function createOrUpdateTcpApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -createOrUpdateTcpApp().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 87f9f199a5b3..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDeleteSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * 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-06-01-preview/examples/ContainerApps_Delete.json - */ -async function deleteContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -deleteContainerApp().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 acc2130c5974..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsGetDetectorSample.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"); - -/** - * 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-06-01-preview/examples/ContainerAppsDiagnostics_Get.json - */ -async function getContainerAppDiagnosticsInfo() { - const subscriptionId = "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = "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); -} - -getContainerAppDiagnosticsInfo().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 cd5b26d0adbc..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsGetRevisionSample.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"); - -/** - * 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-06-01-preview/examples/Revisions_Get.json - */ -async function getContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -getContainerAppRevision().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 6f19ea2a3371..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsGetRootSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the properties of a Container App. - * - * @summary Get the properties of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Get.json - */ -async function getContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -getContainerApp().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 bb9e4dd86250..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsListDetectorsSample.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"); - -/** - * 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-06-01-preview/examples/ContainerAppsDiagnostics_List.json - */ -async function getTheListOfAvailableDiagnosticsForAGivenContainerApp() { - const subscriptionId = "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = "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); -} - -getTheListOfAvailableDiagnosticsForAGivenContainerApp().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 f99ee217627b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsListRevisionsSample.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"); - -/** - * 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-06-01-preview/examples/Revisions_List.json - */ -async function listContainerAppRevisions() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsDiagnostics.listRevisions( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppRevisions().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 4fd2b071b3c4..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsGetAuthTokenSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * 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-06-01-preview/examples/ContainerApps_GetAuthToken.json - */ -async function getContainerAppAuthToken() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "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); -} - -getContainerAppAuthToken().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 0b36b2cb99c3..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsGetSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the properties of a Container App. - * - * @summary Get the properties of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Get.json - */ -async function getContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -getContainerApp().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 0aeb012933ea..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsListByResourceGroupSample.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the Container Apps in a given resource group. - * - * @summary Get the Container Apps in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListByResourceGroup.json - */ -async function listContainerAppsByResourceGroup() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerApps.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppsByResourceGroup().catch(console.error); diff --git a/sdk/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 453b59d722ce..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsListBySubscriptionSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the Container Apps in a given subscription. - * - * @summary Get the Container Apps in a given subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListBySubscription.json - */ -async function listContainerAppsBySubscription() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerApps.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppsBySubscription().catch(console.error); diff --git a/sdk/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 2343db18babf..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsListCustomHostNameAnalysisSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Analyzes a custom hostname for a Container App - * - * @summary Analyzes a custom hostname for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json - */ -async function analyzeCustomHostname() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const customHostname = "my.name.corp"; - const options = { - customHostname, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.listCustomHostNameAnalysis( - resourceGroupName, - containerAppName, - options - ); - console.log(result); -} - -analyzeCustomHostname().catch(console.error); diff --git a/sdk/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 f5204e5b3be6..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsListSecretsSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to List secrets for a container app - * - * @summary List secrets for a container app - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListSecrets.json - */ -async function listContainerAppsSecrets() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -listContainerAppsSecrets().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 9510e87f28e9..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionReplicasGetReplicaSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get a replica for a Container App Revision. - * - * @summary Get a replica for a Container App Revision. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Replicas_Get.json - */ -async function getContainerAppRevisionReplica() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "myapp"; - const revisionName = "myapp--0wlqy09"; - const 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); -} - -getContainerAppRevisionReplica().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 acac665224f6..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionReplicasListReplicasSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to List replicas for a Container App Revision. - * - * @summary List replicas for a Container App Revision. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Replicas_List.json - */ -async function listContainerAppReplicas() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "myapp"; - const revisionName = "myapp--0wlqy09"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisionReplicas.listReplicas( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -listContainerAppReplicas().catch(console.error); diff --git a/sdk/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 ad1e3bf19c27..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionsActivateRevisionSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Activates a revision for a Container App - * - * @summary Activates a revision for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Activate.json - */ -async function activateContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -activateContainerAppRevision().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 29e2fcd2d2c8..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionsDeactivateRevisionSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Deactivates a revision for a Container App - * - * @summary Deactivates a revision for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Deactivate.json - */ -async function deactivateContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -deactivateContainerAppRevision().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 2e5c997d1d69..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionsGetRevisionSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get a revision of a Container App. - * - * @summary Get a revision of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Get.json - */ -async function getContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -getContainerAppRevision().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 c57217d76698..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionsListRevisionsSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the Revisions for a given Container App. - * - * @summary Get the Revisions for a given Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_List.json - */ -async function listContainerAppRevisions() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsRevisions.listRevisions( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppRevisions().catch(console.error); diff --git a/sdk/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 cf1af68ef06e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionsRestartRevisionSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Restarts a revision for a Container App - * - * @summary Restarts a revision for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Restart.json - */ -async function restartContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -restartContainerAppRevision().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 9cd66bc576be..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsSourceControlsCreateOrUpdateSample.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"); - -/** - * 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-06-01-preview/examples/SourceControls_CreateOrUpdate.json - */ -async function createOrUpdateContainerAppSourceControl() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const 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); -} - -createOrUpdateContainerAppSourceControl().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 20233aff0c3f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsSourceControlsDeleteSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * 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-06-01-preview/examples/SourceControls_Delete.json - */ -async function deleteContainerAppSourceControl() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const sourceControlName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.beginDeleteAndWait( - resourceGroupName, - containerAppName, - sourceControlName - ); - console.log(result); -} - -deleteContainerAppSourceControl().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 7dfe3cc6a55a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsSourceControlsGetSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get a SourceControl of a Container App. - * - * @summary Get a SourceControl of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_Get.json - */ -async function getContainerAppSourceControl() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const sourceControlName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.get( - resourceGroupName, - containerAppName, - sourceControlName - ); - console.log(result); -} - -getContainerAppSourceControl().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 737c19a60a23..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsSourceControlsListByContainerAppSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the Container App SourceControls in a given resource group. - * - * @summary Get the Container App SourceControls in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_ListByContainer.json - */ -async function listAppSourceControls() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsSourceControls.listByContainerApp( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listAppSourceControls().catch(console.error); diff --git a/sdk/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 3b42ed8c74b7..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsUpdateSample.js +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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-06-01-preview/examples/ContainerApps_Patch.json - */ -async function patchContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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", - }, - ], - 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); -} - -patchContainerApp().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 54fd797c2c48..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsCreateOrUpdateSample.js +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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-06-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json - */ -async function createOrUpdateDaprComponentWithSecretStoreComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -createOrUpdateDaprComponentWithSecretStoreComponent().catch(console.error); - -/** - * 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-06-01-preview/examples/DaprComponents_CreateOrUpdate_Secrets.json - */ -async function createOrUpdateDaprComponentWithSecrets() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -createOrUpdateDaprComponentWithSecrets().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 5f739c470afe..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsDeleteSample.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"); - -/** - * 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-06-01-preview/examples/DaprComponents_Delete.json - */ -async function deleteDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -deleteDaprComponent().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 ca8f0640dc13..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsGetSample.js +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get a dapr component. - * - * @summary Get a dapr component. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json - */ -async function getDaprComponentWithSecretStoreComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -getDaprComponentWithSecretStoreComponent().catch(console.error); - -/** - * 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-06-01-preview/examples/DaprComponents_Get_Secrets.json - */ -async function getDaprComponentWithSecrets() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -getDaprComponentWithSecrets().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 6b7e38543a7b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsListSample.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the Dapr Components for a managed environment. - * - * @summary Get the Dapr Components for a managed environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_List.json - */ -async function listDaprComponents() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.daprComponents.list(resourceGroupName, environmentName)) { - resArray.push(item); - } - console.log(resArray); -} - -listDaprComponents().catch(console.error); diff --git a/sdk/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 2750ff5f280e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsListSecretsSample.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"); - -/** - * 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-06-01-preview/examples/DaprComponents_ListSecrets.json - */ -async function listContainerAppsSecrets() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -listContainerAppsSecrets().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 4697ec1ea08e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentDiagnosticsGetDetectorSample.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"); - -/** - * 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-06-01-preview/examples/ManagedEnvironmentDiagnostics_Get.json - */ -async function getDiagnosticDataForAManagedEnvironments() { - const subscriptionId = "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = "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); -} - -getDiagnosticDataForAManagedEnvironments().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 08a7e0fed070..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentDiagnosticsListDetectorsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * 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-06-01-preview/examples/ManagedEnvironmentDiagnostics_List.json - */ -async function getTheListOfAvailableDiagnosticDataForAManagedEnvironments() { - const subscriptionId = "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = "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); -} - -getTheListOfAvailableDiagnosticDataForAManagedEnvironments().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 26039577f52c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsCreateOrUpdateSample.js +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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"); - -/** - * 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-06-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json - */ -async function createEnvironments() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const environmentName = "testcontainerenv"; - const environmentEnvelope = { - appLogsConfiguration: { - logAnalyticsConfiguration: { customerId: "string", sharedKey: "string" }, - }, - customDomainConfiguration: { - certificatePassword: Buffer.from("private key password"), - certificateValue: Buffer.from("PFX-or-PEM-blob"), - dnsSuffix: "www.my-name.com", - }, - daprAIConnectionString: - "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/", - location: "East US", - sku: { name: "Premium" }, - vnetConfiguration: { - outboundSettings: { - outBoundType: "UserDefinedRouting", - virtualNetworkApplianceIp: "192.168.1.20", - }, - }, - workloadProfiles: [ - { - maximumCount: 12, - minimumCount: 3, - workloadProfileType: "GeneralPurpose", - }, - { - maximumCount: 6, - minimumCount: 3, - workloadProfileType: "MemoryOptimized", - }, - { - maximumCount: 6, - minimumCount: 3, - workloadProfileType: "ComputeOptimized", - }, - ], - zoneRedundant: true, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginCreateOrUpdateAndWait( - resourceGroupName, - environmentName, - environmentEnvelope - ); - console.log(result); -} - -createEnvironments().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 aced6768493a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Delete a Managed Environment if it does not have any container apps. - * - * @summary Delete a Managed Environment if it does not have any container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Delete.json - */ -async function deleteEnvironmentByName() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -deleteEnvironmentByName().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 37c1260673cb..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsDiagnosticsGetRootSample.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the properties of a Managed Environment used to host container apps. - * - * @summary Get the properties of a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Get.json - */ -async function getEnvironmentsByName() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -getEnvironmentsByName().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 756068ffa15b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsGetAuthTokenSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * 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-06-01-preview/examples/ManagedEnvironments_GetAuthToken.json - */ -async function getManagedEnvironmentAuthToken() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "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); -} - -getManagedEnvironmentAuthToken().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 cffeab05a6ca..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsGetSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the properties of a Managed Environment used to host container apps. - * - * @summary Get the properties of a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Get.json - */ -async function getEnvironmentsByName() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -getEnvironmentsByName().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 76b3c5b66e54..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsListByResourceGroupSample.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get all the Managed Environments in a resource group. - * - * @summary Get all the Managed Environments in a resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json - */ -async function listEnvironmentsByResourceGroup() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -listEnvironmentsByResourceGroup().catch(console.error); diff --git a/sdk/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 609ff9f7bec2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsListBySubscriptionSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get all Managed Environments for a subscription. - * - * @summary Get all Managed Environments for a subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListBySubscription.json - */ -async function listEnvironmentsBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -listEnvironmentsBySubscription().catch(console.error); diff --git a/sdk/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 50a3066c08c2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsListWorkloadProfileStatesSample.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"); - -/** - * This sample demonstrates how to Get all workload Profile States for a Premium Managed Environment. - * - * @summary Get all workload Profile States for a Premium Managed Environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json - */ -async function listEnvironmentsBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -listEnvironmentsBySubscription().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 2578907bc254..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsStoragesCreateOrUpdateSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Create or update storage for a managedEnvironment. - * - * @summary Create or update storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json - */ -async function createOrUpdateEnvironmentsStorage() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -createOrUpdateEnvironmentsStorage().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 7af15a0612f0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsStoragesDeleteSample.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"); - -/** - * 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-06-01-preview/examples/ManagedEnvironmentsStorages_Delete.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -listEnvironmentsStoragesBySubscription().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 cfcb3c2a601f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsStoragesGetSample.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"); - -/** - * 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-06-01-preview/examples/ManagedEnvironmentsStorages_Get.json - */ -async function getAEnvironmentsStoragePropertiesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -getAEnvironmentsStoragePropertiesBySubscription().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 9675a26c9f67..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsStoragesListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get all storages for a managedEnvironment. - * - * @summary Get all storages for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_List.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -listEnvironmentsStoragesBySubscription().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 49af5a3a3647..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsUpdateSample.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"); - -/** - * 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-06-01-preview/examples/ManagedEnvironments_Patch.json - */ -async function patchManagedEnvironment() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -patchManagedEnvironment().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 c61210be6f7b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/namespacesCheckNameAvailabilitySample.js +++ /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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * 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-06-01-preview/examples/Certificates_CheckNameAvailability.json - */ -async function certificatesCheckNameAvailability() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -certificatesCheckNameAvailability().catch(console.error); - -/** - * 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-06-01-preview/examples/ContainerApps_CheckNameAvailability.json - */ -async function containerAppsCheckNameAvailability() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -containerAppsCheckNameAvailability().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 e5d46d778456..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/operationsListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Lists all of the available RP operations. - * - * @summary Lists all of the available RP operations. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Operations_List.json - */ -async function listAllOperations() { - const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -listAllOperations().catch(console.error); diff --git a/sdk/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 6e3b704b7cb1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/README.md +++ /dev/null @@ -1,219 +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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json | -| [connectedEnvironmentsDeleteSample.ts][connectedenvironmentsdeletesample] | Delete an connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-01-preview/examples/DaprComponents_ListSecrets.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-06-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-06-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-06-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json | -| [managedEnvironmentsDeleteSample.ts][managedenvironmentsdeletesample] | Delete a Managed Environment if it does not have any container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-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-06-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-06-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-06-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-06-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-06-01-preview/examples/ManagedEnvironments_ListBySubscription.json | -| [managedEnvironmentsListWorkloadProfileStatesSample.ts][managedenvironmentslistworkloadprofilestatessample] | Get all workload Profile States for a Premium Managed Environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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 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 -[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 698603df20b1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/availableWorkloadProfilesGetSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/AvailableWorkloadProfiles_Get.json - */ -async function billingMetersGet() { - const subscriptionId = "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); -} - -billingMetersGet().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 4ab2cac8f861..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/billingMetersGetSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect 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"; - -/** - * 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-06-01-preview/examples/BillingMeters_Get.json - */ -async function billingMetersGet() { - const subscriptionId = "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); -} - -billingMetersGet().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 3a81f38b4418..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesCreateOrUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - Certificate, - CertificatesCreateOrUpdateOptionalParams, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Create or Update a Certificate. - * - * @summary Create or Update a Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificate_CreateOrUpdate.json - */ -async function createOrUpdateCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const environmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const certificateEnvelope: Certificate = { - location: "East US", - properties: { - password: "private key password", - value: Buffer.from("PFX-or-PEM-blob") - } - }; - 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); -} - -createOrUpdateCertificate().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 9826234d5259..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Deletes the specified Certificate. - * - * @summary Deletes the specified Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificate_Delete.json - */ -async function deleteCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -deleteCertificate().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 dfc9a417da1b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the specified Certificate. - * - * @summary Get the specified Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificate_Get.json - */ -async function getCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -getCertificate().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 2fd0d1b41794..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesListSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Certificates in a given managed environment. - * - * @summary Get the Certificates in a given managed environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificates_ListByManagedEnvironment.json - */ -async function listCertificatesByManagedEnvironment() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -listCertificatesByManagedEnvironment().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 07c29f9f9482..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesUpdateSample.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 { - CertificatePatch, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Patches a certificate. Currently only patching of tags is supported - * - * @summary Patches a certificate. Currently only patching of tags is supported - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificates_Patch.json - */ -async function patchCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -patchCertificate().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 a35ed9013e5b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesCreateOrUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - Certificate, - ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Create or Update a Certificate. - * - * @summary Create or Update a Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json - */ -async function createOrUpdateCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const certificateEnvelope: Certificate = { - location: "East US", - properties: { - password: "private key password", - value: Buffer.from("PFX-or-PEM-blob") - } - }; - 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); -} - -createOrUpdateCertificate().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 c96e91e0f079..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Deletes the specified Certificate. - * - * @summary Deletes the specified Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_Delete.json - */ -async function deleteCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -deleteCertificate().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 545e01de21db..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the specified Certificate. - * - * @summary Get the specified Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_Get.json - */ -async function getCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -getCertificate().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 6136748e56e1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesListSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json - */ -async function listCertificatesByConnectedEnvironment() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -listCertificatesByConnectedEnvironment().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 6727f124c0d1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesUpdateSample.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 { - CertificatePatch, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Patches a certificate. Currently only patching of tags is supported - * - * @summary Patches a certificate. Currently only patching of tags is supported - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_Patch.json - */ -async function patchCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -patchCertificate().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 76781d175693..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCheckNameAvailabilitySample.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 { - CheckNameAvailabilityRequest, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json - */ -async function certificatesCheckNameAvailability() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -certificatesCheckNameAvailability().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 fe3a09f4bbb2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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-06-01-preview/examples/ConnectedEnvironments_CreateOrUpdate.json - */ -async function createKubeEnvironments() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "testenv"; - const environmentEnvelope: ConnectedEnvironment = { - customDomainConfiguration: { - certificatePassword: Buffer.from("private key password"), - certificateValue: Buffer.from("PFX-or-PEM-blob"), - 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); -} - -createKubeEnvironments().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 801dd2337fa8..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.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 { - DaprComponent, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json - */ -async function createOrUpdateDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -createOrUpdateDaprComponent().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 4336d0617d7e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_Delete.json - */ -async function deleteDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -deleteDaprComponent().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 b70c0abfbce3..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a dapr component. - * - * @summary Get a dapr component. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json - */ -async function getDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -getDaprComponent().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 2ee4b0af6bff..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsListSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_List.json - */ -async function listDaprComponents() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -listDaprComponents().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 3d6f275aedb2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsListSecretsSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json - */ -async function listContainerAppsSecrets() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -listContainerAppsSecrets().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 39fea934b220..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Delete an connectedEnvironment. - * - * @summary Delete an connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Delete.json - */ -async function deleteConnectedEnvironmentByConnectedEnvironmentName() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -deleteConnectedEnvironmentByConnectedEnvironmentName().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 cb623c2ad6b1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ConnectedEnvironments_Get.json - */ -async function getConnectedEnvironmentByConnectedEnvironmentName() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -getConnectedEnvironmentByConnectedEnvironmentName().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 7472652f927f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsListByResourceGroupSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ConnectedEnvironments_ListByResourceGroup.json - */ -async function listEnvironmentsByResourceGroup() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.connectedEnvironments.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listEnvironmentsByResourceGroup().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 46d30ed3d5df..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ConnectedEnvironments_ListBySubscription.json - */ -async function listConnectedEnvironmentsBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.connectedEnvironments.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -listConnectedEnvironmentsBySubscription().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 ad8e052a1ef3..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsStoragesCreateOrUpdateSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ConnectedEnvironmentStorage, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json - */ -async function createOrUpdateEnvironmentsStorage() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -createOrUpdateEnvironmentsStorage().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 2a03ad0f73e9..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsStoragesDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ConnectedEnvironmentsStorages_Delete.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -listEnvironmentsStoragesBySubscription().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 a22e6733e052..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsStoragesGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ConnectedEnvironmentsStorages_Get.json - */ -async function getAEnvironmentsStoragePropertiesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -getAEnvironmentsStoragePropertiesBySubscription().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 896a88e038ff..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsStoragesListSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ConnectedEnvironmentsStorages_List.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -listEnvironmentsStoragesBySubscription().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 03bcbc34fcb2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsUpdateSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Patches a Managed Environment. Only patching of tags is supported currently - * - * @summary Patches a Managed Environment. Only patching of tags is supported currently - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Patch.json - */ -async function patchManagedEnvironment() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -patchManagedEnvironment().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 8be594611ce3..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsAuthConfigsCreateOrUpdateSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AuthConfig, ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/AuthConfigs_CreateOrUpdate.json - */ -async function createOrUpdateContainerAppAuthConfig() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const 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); -} - -createOrUpdateContainerAppAuthConfig().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 fa32ed65ae85..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsAuthConfigsDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/AuthConfigs_Delete.json - */ -async function deleteContainerAppAuthConfig() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const authConfigName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.delete( - resourceGroupName, - containerAppName, - authConfigName - ); - console.log(result); -} - -deleteContainerAppAuthConfig().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 301bd06c5bff..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsAuthConfigsGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a AuthConfig of a Container App. - * - * @summary Get a AuthConfig of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_Get.json - */ -async function getContainerAppAuthConfig() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const authConfigName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.get( - resourceGroupName, - containerAppName, - authConfigName - ); - console.log(result); -} - -getContainerAppAuthConfig().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 3e33157a6831..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsAuthConfigsListByContainerAppSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Container App AuthConfigs in a given resource group. - * - * @summary Get the Container App AuthConfigs in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_ListByContainer.json - */ -async function listAuthConfigsByContainerApps() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsAuthConfigs.listByContainerApp( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listAuthConfigsByContainerApps().catch(console.error); diff --git a/sdk/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 89b3f42694d0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsCreateOrUpdateSample.ts +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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-06-01-preview/examples/ContainerApps_CreateOrUpdate.json - */ -async function createOrUpdateContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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" - } - ], - 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" } } - } - ] - } - }, - workloadProfileType: "GeneralPurpose" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginCreateOrUpdateAndWait( - resourceGroupName, - containerAppName, - containerAppEnvelope - ); - console.log(result); -} - -createOrUpdateContainerApp().catch(console.error); - -/** - * 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-06-01-preview/examples/ContainerApps_TcpApp_CreateOrUpdate.json - */ -async function createOrUpdateTcpApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -createOrUpdateTcpApp().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 7a1138e20db0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ContainerApps_Delete.json - */ -async function deleteContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -deleteContainerApp().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 25662a7131ab..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsGetDetectorSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ContainerAppsDiagnostics_Get.json - */ -async function getContainerAppDiagnosticsInfo() { - const subscriptionId = "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = "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); -} - -getContainerAppDiagnosticsInfo().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 e5841cc7790d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsGetRevisionSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a revision of a Container App. - * - * @summary Get a revision of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Get.json - */ -async function getContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -getContainerAppRevision().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 99fd7265f162..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsGetRootSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the properties of a Container App. - * - * @summary Get the properties of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Get.json - */ -async function getContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -getContainerApp().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 35216be7c122..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsListDetectorsSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ContainerAppsDiagnostics_List.json - */ -async function getTheListOfAvailableDiagnosticsForAGivenContainerApp() { - const subscriptionId = "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = "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); -} - -getTheListOfAvailableDiagnosticsForAGivenContainerApp().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 2e43067961a9..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsListRevisionsSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Revisions for a given Container App. - * - * @summary Get the Revisions for a given Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_List.json - */ -async function listContainerAppRevisions() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsDiagnostics.listRevisions( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppRevisions().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 f44411c37e54..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsGetAuthTokenSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ContainerApps_GetAuthToken.json - */ -async function getContainerAppAuthToken() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "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); -} - -getContainerAppAuthToken().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 60825d27228e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the properties of a Container App. - * - * @summary Get the properties of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Get.json - */ -async function getContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -getContainerApp().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 abe888508d18..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsListByResourceGroupSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Container Apps in a given resource group. - * - * @summary Get the Container Apps in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListByResourceGroup.json - */ -async function listContainerAppsByResourceGroup() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerApps.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppsByResourceGroup().catch(console.error); diff --git a/sdk/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 17c23ab32300..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Container Apps in a given subscription. - * - * @summary Get the Container Apps in a given subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListBySubscription.json - */ -async function listContainerAppsBySubscription() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerApps.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppsBySubscription().catch(console.error); diff --git a/sdk/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 6392220fed5d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsListCustomHostNameAnalysisSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ContainerAppsListCustomHostNameAnalysisOptionalParams, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Analyzes a custom hostname for a Container App - * - * @summary Analyzes a custom hostname for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json - */ -async function analyzeCustomHostname() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const customHostname = "my.name.corp"; - const options: ContainerAppsListCustomHostNameAnalysisOptionalParams = { - customHostname - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.listCustomHostNameAnalysis( - resourceGroupName, - containerAppName, - options - ); - console.log(result); -} - -analyzeCustomHostname().catch(console.error); diff --git a/sdk/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 8c6e649c77b7..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsListSecretsSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to List secrets for a container app - * - * @summary List secrets for a container app - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListSecrets.json - */ -async function listContainerAppsSecrets() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -listContainerAppsSecrets().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 1f81d71ba138..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionReplicasGetReplicaSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a replica for a Container App Revision. - * - * @summary Get a replica for a Container App Revision. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Replicas_Get.json - */ -async function getContainerAppRevisionReplica() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "myapp"; - const revisionName = "myapp--0wlqy09"; - const 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); -} - -getContainerAppRevisionReplica().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 6ec3eb9518ec..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionReplicasListReplicasSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to List replicas for a Container App Revision. - * - * @summary List replicas for a Container App Revision. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Replicas_List.json - */ -async function listContainerAppReplicas() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "myapp"; - const revisionName = "myapp--0wlqy09"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisionReplicas.listReplicas( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -listContainerAppReplicas().catch(console.error); diff --git a/sdk/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 f17d31562a11..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionsActivateRevisionSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Activates a revision for a Container App - * - * @summary Activates a revision for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Activate.json - */ -async function activateContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -activateContainerAppRevision().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 29c94e610bd7..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionsDeactivateRevisionSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Deactivates a revision for a Container App - * - * @summary Deactivates a revision for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Deactivate.json - */ -async function deactivateContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -deactivateContainerAppRevision().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 d80013220cea..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionsGetRevisionSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a revision of a Container App. - * - * @summary Get a revision of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Get.json - */ -async function getContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -getContainerAppRevision().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 05db4b97c3b9..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionsListRevisionsSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Revisions for a given Container App. - * - * @summary Get the Revisions for a given Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_List.json - */ -async function listContainerAppRevisions() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsRevisions.listRevisions( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppRevisions().catch(console.error); diff --git a/sdk/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 fc29bb2c88ad..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionsRestartRevisionSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Restarts a revision for a Container App - * - * @summary Restarts a revision for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Restart.json - */ -async function restartContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -restartContainerAppRevision().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 86418ae8cf45..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsSourceControlsCreateOrUpdateSample.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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-06-01-preview/examples/SourceControls_CreateOrUpdate.json - */ -async function createOrUpdateContainerAppSourceControl() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const 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); -} - -createOrUpdateContainerAppSourceControl().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 2b0f557de321..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsSourceControlsDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/SourceControls_Delete.json - */ -async function deleteContainerAppSourceControl() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const sourceControlName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.beginDeleteAndWait( - resourceGroupName, - containerAppName, - sourceControlName - ); - console.log(result); -} - -deleteContainerAppSourceControl().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 3866b69a12ea..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsSourceControlsGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a SourceControl of a Container App. - * - * @summary Get a SourceControl of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_Get.json - */ -async function getContainerAppSourceControl() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const sourceControlName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.get( - resourceGroupName, - containerAppName, - sourceControlName - ); - console.log(result); -} - -getContainerAppSourceControl().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 c9f6fe3aac45..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsSourceControlsListByContainerAppSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Container App SourceControls in a given resource group. - * - * @summary Get the Container App SourceControls in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_ListByContainer.json - */ -async function listAppSourceControls() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsSourceControls.listByContainerApp( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listAppSourceControls().catch(console.error); diff --git a/sdk/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 4d02d6f05848..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsUpdateSample.ts +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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-06-01-preview/examples/ContainerApps_Patch.json - */ -async function patchContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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" - } - ], - 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); -} - -patchContainerApp().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 338e0f0f227e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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-06-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json - */ -async function createOrUpdateDaprComponentWithSecretStoreComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -createOrUpdateDaprComponentWithSecretStoreComponent().catch(console.error); - -/** - * 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-06-01-preview/examples/DaprComponents_CreateOrUpdate_Secrets.json - */ -async function createOrUpdateDaprComponentWithSecrets() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -createOrUpdateDaprComponentWithSecrets().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 a25337cb573d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Delete a Dapr Component from a Managed Environment. - * - * @summary Delete a Dapr Component from a Managed Environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Delete.json - */ -async function deleteDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -deleteDaprComponent().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 7af846366d9a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsGetSample.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 { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a dapr component. - * - * @summary Get a dapr component. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json - */ -async function getDaprComponentWithSecretStoreComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -getDaprComponentWithSecretStoreComponent().catch(console.error); - -/** - * 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-06-01-preview/examples/DaprComponents_Get_Secrets.json - */ -async function getDaprComponentWithSecrets() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -getDaprComponentWithSecrets().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 523a92eec55a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsListSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Dapr Components for a managed environment. - * - * @summary Get the Dapr Components for a managed environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_List.json - */ -async function listDaprComponents() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.daprComponents.list( - resourceGroupName, - environmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listDaprComponents().catch(console.error); diff --git a/sdk/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 22ee2b7da364..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsListSecretsSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/DaprComponents_ListSecrets.json - */ -async function listContainerAppsSecrets() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -listContainerAppsSecrets().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 249ff959e347..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentDiagnosticsGetDetectorSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ManagedEnvironmentDiagnostics_Get.json - */ -async function getDiagnosticDataForAManagedEnvironments() { - const subscriptionId = "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = "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); -} - -getDiagnosticDataForAManagedEnvironments().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 e8fcf2a71dc0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentDiagnosticsListDetectorsSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ManagedEnvironmentDiagnostics_List.json - */ -async function getTheListOfAvailableDiagnosticDataForAManagedEnvironments() { - const subscriptionId = "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = "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); -} - -getTheListOfAvailableDiagnosticDataForAManagedEnvironments().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 ef1d2a05483c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsCreateOrUpdateSample.ts +++ /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. -import { - ManagedEnvironment, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Creates or updates a Managed Environment used to host container apps. - * - * @summary Creates or updates a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json - */ -async function createEnvironments() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const environmentName = "testcontainerenv"; - const environmentEnvelope: ManagedEnvironment = { - appLogsConfiguration: { - logAnalyticsConfiguration: { customerId: "string", sharedKey: "string" } - }, - customDomainConfiguration: { - certificatePassword: Buffer.from("private key password"), - certificateValue: Buffer.from("PFX-or-PEM-blob"), - dnsSuffix: "www.my-name.com" - }, - daprAIConnectionString: - "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/", - location: "East US", - sku: { name: "Premium" }, - vnetConfiguration: { - outboundSettings: { - outBoundType: "UserDefinedRouting", - virtualNetworkApplianceIp: "192.168.1.20" - } - }, - workloadProfiles: [ - { - maximumCount: 12, - minimumCount: 3, - workloadProfileType: "GeneralPurpose" - }, - { - maximumCount: 6, - minimumCount: 3, - workloadProfileType: "MemoryOptimized" - }, - { - maximumCount: 6, - minimumCount: 3, - workloadProfileType: "ComputeOptimized" - } - ], - zoneRedundant: true - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginCreateOrUpdateAndWait( - resourceGroupName, - environmentName, - environmentEnvelope - ); - console.log(result); -} - -createEnvironments().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 0a20d29b8396..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Delete a Managed Environment if it does not have any container apps. - * - * @summary Delete a Managed Environment if it does not have any container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Delete.json - */ -async function deleteEnvironmentByName() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -deleteEnvironmentByName().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 497d60bfe67c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsDiagnosticsGetRootSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the properties of a Managed Environment used to host container apps. - * - * @summary Get the properties of a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Get.json - */ -async function getEnvironmentsByName() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -getEnvironmentsByName().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 8086473b0918..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsGetAuthTokenSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ManagedEnvironments_GetAuthToken.json - */ -async function getManagedEnvironmentAuthToken() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "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); -} - -getManagedEnvironmentAuthToken().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 5a822df7e7c5..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the properties of a Managed Environment used to host container apps. - * - * @summary Get the properties of a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Get.json - */ -async function getEnvironmentsByName() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -getEnvironmentsByName().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 fc292fcd4f94..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsListByResourceGroupSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get all the Managed Environments in a resource group. - * - * @summary Get all the Managed Environments in a resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json - */ -async function listEnvironmentsByResourceGroup() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listEnvironmentsByResourceGroup().catch(console.error); diff --git a/sdk/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 26d08b1a499d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get all Managed Environments for a subscription. - * - * @summary Get all Managed Environments for a subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListBySubscription.json - */ -async function listEnvironmentsBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -listEnvironmentsBySubscription().catch(console.error); diff --git a/sdk/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 bc4eb79e4476..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsListWorkloadProfileStatesSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get all workload Profile States for a Premium Managed Environment. - * - * @summary Get all workload Profile States for a Premium Managed Environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json - */ -async function listEnvironmentsBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -listEnvironmentsBySubscription().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 1c2f40f19495..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsStoragesCreateOrUpdateSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ManagedEnvironmentStorage, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Create or update storage for a managedEnvironment. - * - * @summary Create or update storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json - */ -async function createOrUpdateEnvironmentsStorage() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -createOrUpdateEnvironmentsStorage().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 e956869c28fb..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsStoragesDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Delete storage for a managedEnvironment. - * - * @summary Delete storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_Delete.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -listEnvironmentsStoragesBySubscription().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 359c283d858f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsStoragesGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get storage for a managedEnvironment. - * - * @summary Get storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_Get.json - */ -async function getAEnvironmentsStoragePropertiesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -getAEnvironmentsStoragePropertiesBySubscription().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 7b6069aac420..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsStoragesListSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get all storages for a managedEnvironment. - * - * @summary Get all storages for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_List.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "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); -} - -listEnvironmentsStoragesBySubscription().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 28543cfe3b93..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsUpdateSample.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 { - ManagedEnvironment, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/ManagedEnvironments_Patch.json - */ -async function patchManagedEnvironment() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -patchManagedEnvironment().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 4f74d5e40cc5..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/namespacesCheckNameAvailabilitySample.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 { - CheckNameAvailabilityRequest, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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-06-01-preview/examples/Certificates_CheckNameAvailability.json - */ -async function certificatesCheckNameAvailability() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -certificatesCheckNameAvailability().catch(console.error); - -/** - * 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-06-01-preview/examples/ContainerApps_CheckNameAvailability.json - */ -async function containerAppsCheckNameAvailability() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "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); -} - -containerAppsCheckNameAvailability().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 b2ea13421d19..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/operationsListSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Lists all of the available RP operations. - * - * @summary Lists all of the available RP operations. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Operations_List.json - */ -async function listAllOperations() { - const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -listAllOperations().catch(console.error); diff --git a/sdk/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 416c2dd82e00..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2018", - "module": "commonjs", - "moduleResolution": "node", - "resolveJsonModule": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "alwaysStrict": true, - "outDir": "dist", - "rootDir": "src" - }, - "include": [ - "src/**.ts" - ] -} diff --git a/sdk/appcontainers/arm-appcontainers/src/containerAppsAPIClient.ts b/sdk/appcontainers/arm-appcontainers/src/containerAppsAPIClient.ts index 832c212b8601..6c1f2f1e4c08 100644 --- a/sdk/appcontainers/arm-appcontainers/src/containerAppsAPIClient.ts +++ b/sdk/appcontainers/arm-appcontainers/src/containerAppsAPIClient.ts @@ -16,64 +16,82 @@ import { import * as coreAuth from "@azure/core-auth"; import { ContainerAppsAuthConfigsImpl, + AvailableWorkloadProfilesImpl, + BillingMetersImpl, + ConnectedEnvironmentsImpl, + ConnectedEnvironmentsCertificatesImpl, + ConnectedEnvironmentsDaprComponentsImpl, + ConnectedEnvironmentsStoragesImpl, ContainerAppsImpl, ContainerAppsRevisionsImpl, ContainerAppsRevisionReplicasImpl, - DaprComponentsImpl, ContainerAppsDiagnosticsImpl, ManagedEnvironmentDiagnosticsImpl, ManagedEnvironmentsDiagnosticsImpl, OperationsImpl, + JobsImpl, + JobsExecutionsImpl, ManagedEnvironmentsImpl, CertificatesImpl, + ManagedCertificatesImpl, NamespacesImpl, + DaprComponentsImpl, ManagedEnvironmentsStoragesImpl, - ContainerAppsSourceControlsImpl, - ConnectedEnvironmentsImpl, - ConnectedEnvironmentsCertificatesImpl, - ConnectedEnvironmentsDaprComponentsImpl, - ConnectedEnvironmentsStoragesImpl, - AvailableWorkloadProfilesImpl, - BillingMetersImpl + ContainerAppsSourceControlsImpl } from "./operations"; import { ContainerAppsAuthConfigs, + AvailableWorkloadProfiles, + BillingMeters, + ConnectedEnvironments, + ConnectedEnvironmentsCertificates, + ConnectedEnvironmentsDaprComponents, + ConnectedEnvironmentsStorages, ContainerApps, ContainerAppsRevisions, ContainerAppsRevisionReplicas, - DaprComponents, ContainerAppsDiagnostics, ManagedEnvironmentDiagnostics, ManagedEnvironmentsDiagnostics, Operations, + Jobs, + JobsExecutions, ManagedEnvironments, Certificates, + ManagedCertificates, Namespaces, + DaprComponents, ManagedEnvironmentsStorages, - ContainerAppsSourceControls, - ConnectedEnvironments, - ConnectedEnvironmentsCertificates, - ConnectedEnvironmentsDaprComponents, - ConnectedEnvironmentsStorages, - AvailableWorkloadProfiles, - BillingMeters + 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; subscriptionId: string; apiVersion: string; + jobName: string; + jobExecutionName: string; /** * Initializes a new instance of the ContainerAppsAPIClient class. * @param credentials Subscription credentials which uniquely identify client subscription. * @param subscriptionId The ID of the target subscription. + * @param jobName Job Name + * @param jobExecutionName Job execution name. * @param options The parameter options */ constructor( credentials: coreAuth.TokenCredential, subscriptionId: string, + jobName: string, + jobExecutionName: string, options?: ContainerAppsAPIClientOptionalParams ) { if (credentials === undefined) { @@ -82,6 +100,12 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { if (subscriptionId === undefined) { throw new Error("'subscriptionId' cannot be null"); } + if (jobName === undefined) { + throw new Error("'jobName' cannot be null"); + } + if (jobExecutionName === undefined) { + throw new Error("'jobExecutionName' cannot be null"); + } // Initializing default values for options if (!options) { @@ -142,17 +166,30 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { } // Parameter assignments this.subscriptionId = subscriptionId; + this.jobName = jobName; + this.jobExecutionName = jobExecutionName; // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-06-01-preview"; + this.apiVersion = options.apiVersion || "2023-04-01-preview"; this.containerAppsAuthConfigs = new ContainerAppsAuthConfigsImpl(this); + this.availableWorkloadProfiles = new AvailableWorkloadProfilesImpl(this); + this.billingMeters = new BillingMetersImpl(this); + this.connectedEnvironments = new ConnectedEnvironmentsImpl(this); + this.connectedEnvironmentsCertificates = new ConnectedEnvironmentsCertificatesImpl( + this + ); + this.connectedEnvironmentsDaprComponents = new ConnectedEnvironmentsDaprComponentsImpl( + this + ); + this.connectedEnvironmentsStorages = new ConnectedEnvironmentsStoragesImpl( + this + ); this.containerApps = new ContainerAppsImpl(this); this.containerAppsRevisions = new ContainerAppsRevisionsImpl(this); this.containerAppsRevisionReplicas = new ContainerAppsRevisionReplicasImpl( this ); - this.daprComponents = new DaprComponentsImpl(this); this.containerAppsDiagnostics = new ContainerAppsDiagnosticsImpl(this); this.managedEnvironmentDiagnostics = new ManagedEnvironmentDiagnosticsImpl( this @@ -161,27 +198,19 @@ 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); this.namespaces = new NamespacesImpl(this); + this.daprComponents = new DaprComponentsImpl(this); this.managedEnvironmentsStorages = new ManagedEnvironmentsStoragesImpl( this ); this.containerAppsSourceControls = new ContainerAppsSourceControlsImpl( this ); - this.connectedEnvironments = new ConnectedEnvironmentsImpl(this); - this.connectedEnvironmentsCertificates = new ConnectedEnvironmentsCertificatesImpl( - this - ); - this.connectedEnvironmentsDaprComponents = new ConnectedEnvironmentsDaprComponentsImpl( - this - ); - this.connectedEnvironmentsStorages = new ConnectedEnvironmentsStoragesImpl( - this - ); - this.availableWorkloadProfiles = new AvailableWorkloadProfilesImpl(this); - this.billingMeters = new BillingMetersImpl(this); this.addCustomApiVersionPolicy(options.apiVersion); } @@ -213,24 +242,68 @@ 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 options The options parameters. + */ + jobExecution( + resourceGroupName: string, + options?: JobExecutionOptionalParams + ): Promise { + return this.sendOperationRequest( + { resourceGroupName, options }, + jobExecutionOperationSpec + ); + } + containerAppsAuthConfigs: ContainerAppsAuthConfigs; + availableWorkloadProfiles: AvailableWorkloadProfiles; + billingMeters: BillingMeters; + connectedEnvironments: ConnectedEnvironments; + connectedEnvironmentsCertificates: ConnectedEnvironmentsCertificates; + connectedEnvironmentsDaprComponents: ConnectedEnvironmentsDaprComponents; + connectedEnvironmentsStorages: ConnectedEnvironmentsStorages; containerApps: ContainerApps; containerAppsRevisions: ContainerAppsRevisions; containerAppsRevisionReplicas: ContainerAppsRevisionReplicas; - daprComponents: DaprComponents; containerAppsDiagnostics: ContainerAppsDiagnostics; managedEnvironmentDiagnostics: ManagedEnvironmentDiagnostics; managedEnvironmentsDiagnostics: ManagedEnvironmentsDiagnostics; operations: Operations; + jobs: Jobs; + jobsExecutions: JobsExecutions; managedEnvironments: ManagedEnvironments; certificates: Certificates; + managedCertificates: ManagedCertificates; namespaces: Namespaces; + daprComponents: DaprComponents; managedEnvironmentsStorages: ManagedEnvironmentsStorages; containerAppsSourceControls: ContainerAppsSourceControls; - connectedEnvironments: ConnectedEnvironments; - connectedEnvironmentsCertificates: ConnectedEnvironmentsCertificates; - connectedEnvironmentsDaprComponents: ConnectedEnvironmentsDaprComponents; - connectedEnvironmentsStorages: ConnectedEnvironmentsStorages; - availableWorkloadProfiles: AvailableWorkloadProfiles; - billingMeters: BillingMeters; } +// 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/lroImpl.ts b/sdk/appcontainers/arm-appcontainers/src/lroImpl.ts index 518d5f053b4e..dd803cd5e28c 100644 --- a/sdk/appcontainers/arm-appcontainers/src/lroImpl.ts +++ b/sdk/appcontainers/arm-appcontainers/src/lroImpl.ts @@ -6,29 +6,37 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { AbortSignalLike } from "@azure/abort-controller"; import { LongRunningOperation, LroResponse } from "@azure/core-lro"; -export class LroImpl implements LongRunningOperation { - constructor( - private sendOperationFn: (args: any, spec: any) => Promise>, - private args: Record, - private spec: { - readonly requestBody?: unknown; - readonly path?: string; - readonly httpMethod: string; - } & Record, - public requestPath: string = spec.path!, - public requestMethod: string = spec.httpMethod - ) {} - public async sendInitialRequest(): Promise> { - return this.sendOperationFn(this.args, this.spec); - } - public async sendPollRequest(path: string): Promise> { - const { requestBody, ...restSpec } = this.spec; - return this.sendOperationFn(this.args, { - ...restSpec, - path, - httpMethod: "GET" - }); - } +export function createLroSpec(inputs: { + sendOperationFn: (args: any, spec: any) => Promise>; + args: Record; + spec: { + readonly requestBody?: unknown; + readonly path?: string; + readonly httpMethod: string; + } & Record; +}): LongRunningOperation { + const { args, spec, sendOperationFn } = inputs; + return { + requestMethod: spec.httpMethod, + requestPath: spec.path!, + sendInitialRequest: () => sendOperationFn(args, spec), + sendPollRequest: ( + path: string, + options?: { abortSignal?: AbortSignalLike } + ) => { + const { requestBody, ...restSpec } = spec; + return sendOperationFn(args, { + ...restSpec, + httpMethod: "GET", + path, + abortSignal: options?.abortSignal + }); + } + }; } diff --git a/sdk/appcontainers/arm-appcontainers/src/models/index.ts b/sdk/appcontainers/arm-appcontainers/src/models/index.ts index 918d484dd049..cb944f4bb806 100644 --- a/sdk/appcontainers/arm-appcontainers/src/models/index.ts +++ b/sdk/appcontainers/arm-appcontainers/src/models/index.ts @@ -494,10 +494,100 @@ export interface DefaultErrorResponseErrorDetailsItem { readonly target?: string; } -/** Container App collection ARM resource. */ -export interface ContainerAppCollection { +/** Collection of available workload profiles in the location. */ +export interface AvailableWorkloadProfilesCollection { + /** Collection of workload profiles. */ + value: AvailableWorkloadProfile[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Revision resource specific properties */ +export interface AvailableWorkloadProfileProperties { + /** Used to categorize workload profiles. */ + category?: string; + /** indicates whether the profile is default for the location. */ + applicability?: Applicability; + /** Number of cores in CPU. */ + cores?: number; + /** Memory in GiB. */ + memoryGiB?: number; + /** The everyday name of the workload profile. */ + displayName?: string; +} + +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ +export interface ErrorResponse { + /** The error object. */ + error?: ErrorDetail; +} + +/** The error detail. */ +export interface ErrorDetail { + /** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * The error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * The error target. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; + /** + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly details?: ErrorDetail[]; + /** + * The error additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * The additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly info?: Record; +} + +/** Collection of billing meters. */ +export interface BillingMeterCollection { + /** Collection of billing meters. */ + value: BillingMeter[]; +} + +/** Revision resource specific properties */ +export interface BillingMeterProperties { + /** Used to categorize billing meters. */ + category?: string; + /** Billing meter type. */ + meterType?: string; + /** The everyday name of the billing meter. */ + displayName?: string; +} + +/** Collection of connectedEnvironments */ +export interface ConnectedEnvironmentCollection { /** Collection of resources. */ - value: ContainerApp[]; + value?: ConnectedEnvironment[]; /** * Link to next page of resources. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -513,6 +603,212 @@ export interface ExtendedLocation { type?: ExtendedLocationTypes; } +/** Configuration properties for apps environment custom domain */ +export interface CustomDomainConfiguration { + /** + * Id used to verify domain name ownership + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly customDomainVerificationId?: string; + /** Dns suffix for the environment domain */ + dnsSuffix?: string; + /** PFX or PEM blob */ + certificateValue?: Uint8Array; + /** Certificate password */ + certificatePassword?: string; + /** + * Certificate expiration date. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly expirationDate?: Date; + /** + * Certificate thumbprint. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly thumbprint?: string; + /** + * Subject name of the certificate. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly subjectName?: string; +} + +/** The check availability request body. */ +export interface CheckNameAvailabilityRequest { + /** The name of the resource for which availability needs to be checked. */ + name?: string; + /** The resource type. */ + type?: string; +} + +/** The check availability result. */ +export interface CheckNameAvailabilityResponse { + /** Indicates if the resource name is available. */ + nameAvailable?: boolean; + /** The reason why the given name is not available. */ + reason?: CheckNameAvailabilityReason; + /** Detailed reason why the given name is available. */ + message?: string; +} + +/** Collection of Certificates. */ +export interface CertificateCollection { + /** Collection of resources. */ + value: Certificate[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Certificate resource specific properties */ +export interface CertificateProperties { + /** + * Provisioning state of the certificate. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: CertificateProvisioningState; + /** Certificate password. */ + password?: string; + /** + * Subject name of the certificate. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly subjectName?: string; + /** + * Subject alternative names the certificate applies to. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly subjectAlternativeNames?: string[]; + /** PFX or PEM blob */ + value?: Uint8Array; + /** + * Certificate issuer. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly issuer?: string; + /** + * Certificate issue Date. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly issueDate?: Date; + /** + * Certificate expiration date. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly expirationDate?: Date; + /** + * Certificate thumbprint. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly thumbprint?: string; + /** + * Is the certificate valid?. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly valid?: boolean; + /** + * Public key hash. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly publicKeyHash?: string; +} + +/** A certificate to update */ +export interface CertificatePatch { + /** Application-specific metadata in the form of key-value pairs. */ + tags?: { [propertyName: string]: string }; +} + +/** Dapr Components ARM resource. */ +export interface DaprComponentsCollection { + /** Collection of resources. */ + value: DaprComponent[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Secret definition. */ +export interface Secret { + /** Secret Name. */ + name?: string; + /** Secret Value. */ + value?: string; + /** Resource ID of a managed identity to authenticate with Azure Key Vault, or System to use a system-assigned identity. */ + identity?: string; + /** Azure Key Vault URL pointing to the secret referenced by the container app. */ + keyVaultUrl?: string; +} + +/** Dapr component metadata. */ +export interface DaprMetadata { + /** Metadata property name. */ + name?: string; + /** Metadata property value. */ + value?: string; + /** Name of the Dapr Component secret from which to pull the metadata property value. */ + secretRef?: string; +} + +/** Dapr component Secrets Collection for ListSecrets Action. */ +export interface DaprSecretsCollection { + /** Collection of secrets used by a Dapr component */ + value: DaprSecret[]; +} + +/** Dapr component Secret for ListSecrets Action */ +export interface DaprSecret { + /** + * Secret Name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Secret Value. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: string; +} + +/** Collection of Storage for Environments */ +export interface ConnectedEnvironmentStoragesCollection { + /** Collection of storage resources. */ + value: ConnectedEnvironmentStorage[]; +} + +/** Storage properties */ +export interface ConnectedEnvironmentStorageProperties { + /** Azure file properties */ + azureFile?: AzureFileProperties; +} + +/** Azure File Properties. */ +export interface AzureFileProperties { + /** Storage account name for azure file. */ + accountName?: string; + /** Storage account key for azure file. */ + accountKey?: string; + /** Access mode for storage */ + accessMode?: AccessMode; + /** Azure file share name. */ + shareName?: string; +} + +/** Container App collection ARM resource. */ +export interface ContainerAppCollection { + /** Collection of resources. */ + value: ContainerApp[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + /** Managed service identity (system assigned and/or user assigned identities) */ export interface ManagedServiceIdentity { /** @@ -562,14 +858,8 @@ export interface Configuration { dapr?: Dapr; /** Optional. Max inactive revisions a Container App can have. */ maxInactiveRevisions?: number; -} - -/** Secret definition. */ -export interface Secret { - /** Secret Name. */ - name?: string; - /** Secret Value. */ - value?: string; + /** Container App to be a dev Container App Service */ + service?: Service; } /** Container App Ingress configuration. */ @@ -595,6 +885,12 @@ export interface Ingress { allowInsecure?: boolean; /** Rules to restrict incoming IP address. */ ipSecurityRestrictions?: IpSecurityRestrictionRule[]; + /** Sticky Sessions for Single Revision Mode */ + stickySessions?: IngressStickySessions; + /** Client certificate mode for mTLS authentication. Ignore indicates server drops client certificate on forwarding. Accept indicates server forwards client certificate but does not require a client certificate. Require indicates server requires a client certificate. */ + clientCertificateMode?: IngressClientCertificateMode; + /** CORS policy for container app */ + corsPolicy?: CorsPolicy; } /** Traffic weight assigned to a revision */ @@ -616,7 +912,7 @@ export interface CustomDomain { /** Custom Domain binding type. */ bindingType?: BindingType; /** Resource Id of the Certificate to be bound to this hostname. Must exist in the Managed Environment. */ - certificateId: string; + certificateId?: string; } /** Rule to restrict incoming IP address. */ @@ -631,6 +927,28 @@ export interface IpSecurityRestrictionRule { action: Action; } +/** Sticky Sessions for Single Revision Mode */ +export interface IngressStickySessions { + /** Sticky Session Affinity */ + affinity?: Affinity; +} + +/** Cross-Origin-Resource-Sharing policy */ +export interface CorsPolicy { + /** Specifies the content for the access-control-allow-origins header */ + allowedOrigins: string[]; + /** Specifies the content for the access-control-allow-methods header */ + allowedMethods?: string[]; + /** Specifies the content for the access-control-allow-headers header */ + allowedHeaders?: string[]; + /** Specifies the content for the access-control-expose-headers header */ + exposeHeaders?: string[]; + /** Specifies the content for the access-control-max-age header */ + maxAge?: number; + /** Specifies whether the resource allows credentials */ + allowCredentials?: boolean; +} + /** Container App Private Registry */ export interface RegistryCredentials { /** Container Registry Server */ @@ -663,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. @@ -671,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. */ @@ -679,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. */ @@ -728,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. */ @@ -816,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; @@ -859,8 +1189,28 @@ export interface Volume { name?: string; /** Storage type for the volume. If not provided, use EmptyDir. */ storageType?: StorageType; - /** Name of storage resource. No need to provide for EmptyDir. */ + /** Name of storage resource. No need to provide for EmptyDir and Secret. */ 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. */ +export interface SecretVolumeItem { + /** Name of the Container App secret from which to pull the secret value. */ + secretRef?: string; + /** Path to project secret to. If no path is provided, path defaults to name of secret listed in secretRef. */ + 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. */ @@ -970,6 +1320,16 @@ export interface ContainerAppSecret { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly value?: string; + /** + * Resource ID of a managed identity to authenticate with Azure Key Vault, or System to use a system-assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly identity?: string; + /** + * Azure Key Vault URL pointing to the secret referenced by the container app. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly keyVaultUrl?: string; } /** Container App Revisions collection ARM resource. */ @@ -995,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. @@ -1013,33 +1383,6 @@ export interface ReplicaCollection { value: Replica[]; } -/** Dapr Components ARM resource. */ -export interface DaprComponentsCollection { - /** Collection of resources. */ - value: DaprComponent[]; - /** - * Link to next page of resources. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Dapr component metadata. */ -export interface DaprMetadata { - /** Metadata property name. */ - name?: string; - /** Metadata property value. */ - value?: string; - /** Name of the Dapr Component secret from which to pull the metadata property value. */ - secretRef?: string; -} - -/** Dapr component Secrets Collection for ListSecrets Action. */ -export interface DaprSecretsCollection { - /** Collection of secrets used by a Dapr component */ - value: Secret[]; -} - /** Diagnostics data collection for a resource. */ export interface DiagnosticsCollection { /** Collection of diagnostic data. */ @@ -1184,36 +1527,18 @@ export interface DiagnosticDataProviderMetadataPropertyBagItem { value?: string; } -/** Managed Environment resource SKU properties. */ -export interface EnvironmentSkuProperties { - /** Name of the Sku. */ - name: SkuName; -} - /** Configuration properties for apps environment to join a Virtual Network */ export interface VnetConfiguration { - /** Boolean indicating the environment only has an internal load balancer. These environments do not have a public static IP resource. They must provide runtimeSubnetId and infrastructureSubnetId if enabling this property */ + /** Boolean indicating the environment only has an internal load balancer. These environments do not have a public static IP resource. They must provide infrastructureSubnetId if enabling this property */ internal?: boolean; - /** Resource ID of a subnet for infrastructure components. This subnet must be in the same VNET as the subnet defined in runtimeSubnetId. Must not overlap with any other provided IP ranges. */ + /** Resource ID of a subnet for infrastructure components. Must not overlap with any other provided IP ranges. */ infrastructureSubnetId?: string; - /** Resource ID of a subnet that Container App containers are injected into. This subnet must be in the same VNET as the subnet defined in infrastructureSubnetId. Must not overlap with any other provided IP ranges. */ - runtimeSubnetId?: string; /** CIDR notation IP range assigned to the Docker bridge, network. Must not overlap with any other provided IP ranges. */ dockerBridgeCidr?: string; /** IP range in CIDR notation that can be reserved for environment infrastructure IP addresses. Must not overlap with any other provided IP ranges. */ platformReservedCidr?: string; /** An IP address from the IP range defined by platformReservedCidr that will be reserved for the internal DNS server. */ platformReservedDnsIP?: string; - /** Configuration used to control the Environment Egress outbound traffic */ - outboundSettings?: ManagedEnvironmentOutboundSettings; -} - -/** Configuration used to control the Environment Egress outbound traffic */ -export interface ManagedEnvironmentOutboundSettings { - /** Outbound type for the cluster */ - outBoundType?: ManagedEnvironmentOutBoundType; - /** Virtual Appliance IP used as the Egress controller for the Environment */ - virtualNetworkApplianceIp?: string; } /** Configuration of application logs */ @@ -1232,44 +1557,46 @@ export interface LogAnalyticsConfiguration { sharedKey?: string; } -/** Configuration properties for apps environment custom domain */ -export interface CustomDomainConfiguration { - /** - * Id used to verify domain name ownership - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly customDomainVerificationId?: string; - /** Dns suffix for the environment domain */ - dnsSuffix?: string; - /** PFX or PEM blob */ - certificateValue?: Uint8Array; - /** Certificate password */ - certificatePassword?: Uint8Array; - /** - * Certificate expiration date. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly expirationDate?: Date; +/** Workload profile to scope container app execution. */ +export interface WorkloadProfile { + /** Workload profile type for the workloads to run on. */ + name: string; + /** Workload profile type for the workloads to run on. */ + workloadProfileType: string; + /** The minimum capacity. */ + minimumCount?: number; + /** The maximum capacity. */ + maximumCount?: number; +} + +/** Configuration properties Keda component */ +export interface KedaConfiguration { /** - * Certificate thumbprint. + * The version of Keda * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly thumbprint?: string; + readonly version?: string; +} + +/** Configuration properties Dapr component */ +export interface DaprConfiguration { /** - * Subject name of the certificate. + * The version of Dapr * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly subjectName?: string; + readonly version?: string; } -/** Workload profile to scope container app execution. */ -export interface WorkloadProfile { - /** Workload profile type for the workloads to run on. */ - workloadProfileType: string; - /** The minimum capacity. */ - minimumCount: number; - /** The maximum capacity. */ - maximumCount: number; +/** 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 */ @@ -1307,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. @@ -1318,10 +1645,149 @@ export interface ManagedEnvironmentsCollection { readonly nextLink?: string; } -/** Collection of Certificates. */ -export interface CertificateCollection { +/** 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[]; +} + +/** 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; +} + +/** 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[]; +} + +/** 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: Certificate[]; + value: JobExecution[]; /** * Link to next page of resources. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1329,81 +1795,82 @@ export interface CertificateCollection { readonly nextLink?: string; } -/** Certificate resource specific properties */ -export interface CertificateProperties { - /** - * Provisioning state of the certificate. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: CertificateProvisioningState; - /** Certificate password. */ - password?: string; - /** - * Subject name of the certificate. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly subjectName?: string; - /** - * Subject alternative names the certificate applies to. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly subjectAlternativeNames?: string[]; - /** PFX or PEM blob */ - value?: Uint8Array; - /** - * Certificate issuer. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly issuer?: string; +/** Container Apps Job execution. */ +export interface JobExecution { + /** Job execution Name. */ + name?: string; + /** Job execution Id. */ + id?: string; + /** Job Type. */ + type?: string; /** - * Certificate issue Date. + * Current running State of the job * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly issueDate?: Date; + 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[]; +} + +/** Collection of Environments */ +export interface ManagedEnvironmentsCollection { + /** Collection of resources. */ + value: ManagedEnvironment[]; /** - * Certificate expiration date. + * Link to next page of resources. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly expirationDate?: Date; + readonly nextLink?: string; +} + +/** Certificate resource specific properties */ +export interface ManagedCertificateProperties { /** - * Certificate thumbprint. + * Provisioning state of the certificate. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly thumbprint?: string; + readonly provisioningState?: CertificateProvisioningState; + /** Subject name of the certificate. */ + subjectName?: string; /** - * Is the certificate valid?. + * Any error occurred during the certificate provision. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly valid?: boolean; + readonly error?: string; + /** Selected type of domain control validation for managed certificates. */ + domainControlValidation?: ManagedCertificateDomainControlValidation; /** - * Public key hash. + * 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 publicKeyHash?: string; + readonly validationToken?: string; } -/** A certificate to update */ -export interface CertificatePatch { +/** A managed certificate to update */ +export interface ManagedCertificatePatch { /** Application-specific metadata in the form of key-value pairs. */ tags?: { [propertyName: string]: string }; } -/** The check availability request body. */ -export interface CheckNameAvailabilityRequest { - /** The name of the resource for which availability needs to be checked. */ - name?: string; - /** The resource type. */ - type?: string; -} - -/** The check availability result. */ -export interface CheckNameAvailabilityResponse { - /** Indicates if the resource name is available. */ - nameAvailable?: boolean; - /** The reason why the given name is not available. */ - reason?: CheckNameAvailabilityReason; - /** Detailed reason why the given name is available. */ - message?: string; +/** Collection of 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 */ @@ -1439,18 +1906,6 @@ export interface ManagedEnvironmentStorageProperties { azureFile?: AzureFileProperties; } -/** Azure File Properties. */ -export interface AzureFileProperties { - /** Storage account name for azure file. */ - accountName?: string; - /** Storage account key for azure file. */ - accountKey?: string; - /** Access mode for storage */ - accessMode?: AccessMode; - /** Azure file share name. */ - shareName?: string; -} - /** SourceControl collection ARM resource. */ export interface SourceControlCollection { /** Collection of resources. */ @@ -1470,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 */ @@ -1500,135 +1957,16 @@ export interface AzureCredentials { clientSecret?: string; /** Tenant Id. */ tenantId?: string; + /** Kind of auth github does for deploying the template */ + kind?: string; /** Subscription Id. */ subscriptionId?: string; } -/** Collection of connectedEnvironments */ -export interface ConnectedEnvironmentCollection { +/** Container App executions names list. */ +export interface JobExecutionNamesCollection { /** Collection of resources. */ - value?: ConnectedEnvironment[]; - /** - * 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 Storage for Environments */ -export interface ConnectedEnvironmentStoragesCollection { - /** Collection of storage resources. */ - value: ConnectedEnvironmentStorage[]; -} - -/** Storage properties */ -export interface ConnectedEnvironmentStorageProperties { - /** Azure file properties */ - azureFile?: AzureFileProperties; -} - -/** Collection of available workload profiles in the location. */ -export interface AvailableWorkloadProfilesCollection { - /** Collection of workload profiles. */ - value: AvailableWorkloadProfile[]; - /** - * Link to next page of resources. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Revision resource specific properties */ -export interface AvailableWorkloadProfileProperties { - /** Used to map workload profile types to billing meter. */ - billingMeterCategory?: Category; - /** indicates whether the profile is default for the location. */ - applicability?: Applicability; - /** Number of cores in CPU. */ - cores?: number; - /** Memory in GiB. */ - memoryGiB?: number; - /** The everyday name of the workload profile. */ - displayName?: string; -} - -/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ -export interface ErrorResponse { - /** The error object. */ - error?: ErrorDetail; -} - -/** The error detail. */ -export interface ErrorDetail { - /** - * The error code. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly code?: string; - /** - * The error message. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; - /** - * The error target. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly target?: string; - /** - * The error details. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly details?: ErrorDetail[]; - /** - * The error additional info. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly additionalInfo?: ErrorAdditionalInfo[]; -} - -/** The resource management error additional info. */ -export interface ErrorAdditionalInfo { - /** - * The additional info type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * The additional info. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly info?: Record; -} - -/** Collection of premium workload billing meters. */ -export interface BillingMeterCollection { - /** Collection of billing meters. */ - value: BillingMeter[]; -} - -/** Revision resource specific properties */ -export interface BillingMeterProperties { - /** Used to map workload profile types to billing meter. */ - category?: Category; - /** Billing meter type. */ - meterType?: string; - /** The everyday name of the billing meter. */ - displayName?: string; -} - -/** Dapr component Secret for ListSecrets Action */ -export interface DaprSecret { - /** - * Secret Name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Secret Value. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: string; + value: JobExecutionBase[]; } /** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ @@ -1665,6 +2003,48 @@ export interface AuthConfig extends ProxyResource { httpSettings?: HttpSettings; } +/** A workload profile with specific hardware configure to run container apps. */ +export interface AvailableWorkloadProfile extends ProxyResource { + /** Region of the workload profile. */ + location?: string; + /** Revision resource specific properties */ + properties?: AvailableWorkloadProfileProperties; +} + +/** Billing meter. */ +export interface BillingMeter extends ProxyResource { + /** Region for the billing meter. */ + location?: string; + /** Revision resource specific properties */ + properties?: BillingMeterProperties; +} + +/** Dapr Component. */ +export interface DaprComponent extends ProxyResource { + /** Component type */ + componentType?: string; + /** Component version */ + version?: string; + /** Boolean describing if the component errors are ignores */ + ignoreErrors?: boolean; + /** Initialization timeout */ + initTimeout?: string; + /** Collection of secrets used by a Dapr component */ + secrets?: Secret[]; + /** Name of a Dapr component to retrieve component secrets from */ + secretStoreComponent?: string; + /** Component metadata */ + metadata?: DaprMetadata[]; + /** Names of container apps that can use this Dapr component */ + scopes?: string[]; +} + +/** Storage resource for connectedEnvironment. */ +export interface ConnectedEnvironmentStorage extends ProxyResource { + /** Storage properties */ + properties?: ConnectedEnvironmentStorageProperties; +} + /** Container App Revision. */ export interface Revision extends ProxyResource { /** @@ -1720,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. */ @@ -1729,28 +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[]; -} - -/** Dapr Component. */ -export interface DaprComponent extends ProxyResource { - /** Component type */ - componentType?: string; - /** Component version */ - version?: string; - /** Boolean describing if the component errors are ignores */ - ignoreErrors?: boolean; - /** Initialization timeout */ - initTimeout?: string; - /** Collection of secrets used by a Dapr component */ - secrets?: Secret[]; - /** Name of a Dapr component to retrieve component secrets from */ - secretStoreComponent?: string; - /** Component metadata */ - metadata?: DaprMetadata[]; - /** Names of container apps that can use this Dapr component */ - scopes?: string[]; + /** The init containers collection under a replica. */ + initContainers?: ReplicaContainer[]; } /** Diagnostics data for a resource. */ @@ -1759,7 +2136,7 @@ export interface Diagnostics extends ProxyResource { properties?: DiagnosticsProperties; } -/** Collection of all the workload Profile States for a Premium Managed Environment.. */ +/** Collection of all the workload Profile States for a Managed Environment.. */ export interface WorkloadProfileStates extends ProxyResource { /** Workload Profile resource specific properties. */ properties?: WorkloadProfileStatesProperties; @@ -1787,29 +2164,40 @@ export interface SourceControl extends ProxyResource { * defaults if user did not provide them. The defaults are populated * as they were at the creation time */ - githubActionConfiguration?: GithubActionConfiguration; -} - -/** Storage resource for connectedEnvironment. */ -export interface ConnectedEnvironmentStorage extends ProxyResource { - /** Storage properties */ - properties?: ConnectedEnvironmentStorageProperties; -} - -/** A premium workload profile. */ -export interface AvailableWorkloadProfile extends ProxyResource { - /** Region of the workload profile. */ - location?: string; - /** Revision resource specific properties */ - properties?: AvailableWorkloadProfileProperties; + githubActionConfiguration?: GithubActionConfiguration; +} + +/** An environment for Kubernetes cluster specialized for web workloads by Azure App Service */ +export interface ConnectedEnvironment extends TrackedResource { + /** The complex type of the extended location. */ + extendedLocation?: ExtendedLocation; + /** + * Provisioning state of the Kubernetes Environment. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ConnectedEnvironmentProvisioningState; + /** + * Any errors that occurred during deployment or deployment validation + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly deploymentErrors?: string; + /** + * Default Domain Name for the cluster + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly defaultDomain?: string; + /** Static IP of the connectedEnvironment */ + staticIp?: string; + /** Application Insights connection string used by Dapr to export Service to Service communication telemetry */ + daprAIConnectionString?: string; + /** Custom domain configuration for the environment */ + customDomainConfiguration?: CustomDomainConfiguration; } -/** A premium billing meter. */ -export interface BillingMeter extends ProxyResource { - /** Region for the billing meter. */ - location?: string; - /** Revision resource specific properties */ - properties?: BillingMeterProperties; +/** Certificate used for Custom Domain bindings of Container Apps in a Managed Environment */ +export interface Certificate extends TrackedResource { + /** Certificate resource specific properties */ + properties?: CertificateProperties; } /** Container App. */ @@ -1818,6 +2206,8 @@ export interface ContainerApp extends TrackedResource { extendedLocation?: ExtendedLocation; /** managed identities for the Container App to interact with other Azure services without maintaining any secrets or credentials in code. */ identity?: ManagedServiceIdentity; + /** The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource. */ + managedBy?: string; /** * Provisioning state of the Container App. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1827,13 +2217,18 @@ export interface ContainerApp extends TrackedResource { managedEnvironmentId?: string; /** Resource ID of environment. */ environmentId?: string; - /** Workload profile type to pin for container app execution. */ - workloadProfileType?: string; + /** Workload profile name to pin for container app execution. */ + workloadProfileName?: string; /** * Name of the latest revision of the Container App. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly latestRevisionName?: string; + /** + * Name of the latest ready revision of the Container App. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly latestReadyRevisionName?: string; /** * Fully Qualified Domain Name of the latest revision of the Container App. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1876,8 +2271,8 @@ export interface ContainerAppAuthToken extends TrackedResource { /** An environment for hosting container apps */ export interface ManagedEnvironment extends TrackedResource { - /** SKU properties of the Environment. */ - sku?: EnvironmentSkuProperties; + /** Kind of the Environment. */ + kind?: string; /** * Provisioning state of the Environment. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1921,12 +2316,49 @@ export interface ManagedEnvironment extends TrackedResource { readonly eventStreamEndpoint?: string; /** Workload profiles configured for the Managed Environment. */ workloadProfiles?: WorkloadProfile[]; + /** The configuration of Keda component. */ + kedaConfiguration?: KedaConfiguration; + /** The configuration of Dapr component. */ + 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; } -/** Certificate used for Custom Domain bindings of Container Apps in a Managed Environment */ -export interface Certificate extends TrackedResource { +/** Managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment */ +export interface ManagedCertificate extends TrackedResource { /** Certificate resource specific properties */ - properties?: CertificateProperties; + properties?: ManagedCertificateProperties; } /** Environment Auth Token. */ @@ -1943,31 +2375,54 @@ export interface EnvironmentAuthToken extends TrackedResource { readonly expires?: Date; } -/** An environment for Kubernetes cluster specialized for web workloads by Azure App Service */ -export interface ConnectedEnvironment extends TrackedResource { - /** The complex type of the extended location. */ - extendedLocation?: ExtendedLocation; - /** - * Provisioning state of the Kubernetes Environment. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ConnectedEnvironmentProvisioningState; - /** - * Any errors that occurred during deployment or deployment validation - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly deploymentErrors?: string; - /** - * Default Domain Name for the cluster - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly defaultDomain?: string; - /** Static IP of the connectedEnvironment */ - staticIp?: string; - /** Application Insights connection string used by Dapr to export Service to Service communication telemetry */ - daprAIConnectionString?: string; - /** Custom domain configuration for the environment */ - customDomainConfiguration?: CustomDomainConfiguration; +/** Defines headers for ConnectedEnvironments_delete operation. */ +export interface ConnectedEnvironmentsDeleteHeaders { + location?: string; +} + +/** Defines headers for ContainerApps_delete operation. */ +export interface ContainerAppsDeleteHeaders { + location?: string; +} + +/** Defines headers for ContainerApps_update operation. */ +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; +} + +/** Defines headers for Jobs_update operation. */ +export interface JobsUpdateHeaders { + location?: string; +} + +/** Defines headers for Jobs_start operation. */ +export interface JobsStartHeaders { + location?: string; +} + +/** Defines headers for Jobs_stopExecution operation. */ +export interface JobsStopExecutionHeaders { + location?: string; +} + +/** Defines headers for Jobs_stopMultipleExecutions operation. */ +export interface JobsStopMultipleExecutionsHeaders { + location?: string; } /** Known values of {@link CreatedByType} that the service accepts. */ @@ -1994,6 +2449,24 @@ export enum KnownCreatedByType { */ export type CreatedByType = string; +/** Known values of {@link Applicability} that the service accepts. */ +export enum KnownApplicability { + /** LocationDefault */ + LocationDefault = "LocationDefault", + /** Custom */ + Custom = "Custom" +} + +/** + * Defines values for Applicability. \ + * {@link KnownApplicability} can be used interchangeably with Applicability, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **LocationDefault** \ + * **Custom** + */ +export type Applicability = string; + /** Known values of {@link ExtendedLocationTypes} that the service accepts. */ export enum KnownExtendedLocationTypes { /** CustomLocation */ @@ -2009,6 +2482,105 @@ export enum KnownExtendedLocationTypes { */ export type ExtendedLocationTypes = string; +/** Known values of {@link ConnectedEnvironmentProvisioningState} that the service accepts. */ +export enum KnownConnectedEnvironmentProvisioningState { + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** Canceled */ + Canceled = "Canceled", + /** Waiting */ + Waiting = "Waiting", + /** InitializationInProgress */ + InitializationInProgress = "InitializationInProgress", + /** InfrastructureSetupInProgress */ + InfrastructureSetupInProgress = "InfrastructureSetupInProgress", + /** InfrastructureSetupComplete */ + InfrastructureSetupComplete = "InfrastructureSetupComplete", + /** ScheduledForDelete */ + ScheduledForDelete = "ScheduledForDelete" +} + +/** + * Defines values for ConnectedEnvironmentProvisioningState. \ + * {@link KnownConnectedEnvironmentProvisioningState} can be used interchangeably with ConnectedEnvironmentProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Failed** \ + * **Canceled** \ + * **Waiting** \ + * **InitializationInProgress** \ + * **InfrastructureSetupInProgress** \ + * **InfrastructureSetupComplete** \ + * **ScheduledForDelete** + */ +export type ConnectedEnvironmentProvisioningState = string; + +/** Known values of {@link CheckNameAvailabilityReason} that the service accepts. */ +export enum KnownCheckNameAvailabilityReason { + /** Invalid */ + Invalid = "Invalid", + /** AlreadyExists */ + AlreadyExists = "AlreadyExists" +} + +/** + * Defines values for CheckNameAvailabilityReason. \ + * {@link KnownCheckNameAvailabilityReason} can be used interchangeably with CheckNameAvailabilityReason, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Invalid** \ + * **AlreadyExists** + */ +export type CheckNameAvailabilityReason = string; + +/** Known values of {@link CertificateProvisioningState} that the service accepts. */ +export enum KnownCertificateProvisioningState { + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** Canceled */ + Canceled = "Canceled", + /** DeleteFailed */ + DeleteFailed = "DeleteFailed", + /** Pending */ + Pending = "Pending" +} + +/** + * Defines values for CertificateProvisioningState. \ + * {@link KnownCertificateProvisioningState} can be used interchangeably with CertificateProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Failed** \ + * **Canceled** \ + * **DeleteFailed** \ + * **Pending** + */ +export type CertificateProvisioningState = string; + +/** Known values of {@link AccessMode} that the service accepts. */ +export enum KnownAccessMode { + /** ReadOnly */ + ReadOnly = "ReadOnly", + /** ReadWrite */ + ReadWrite = "ReadWrite" +} + +/** + * Defines values for AccessMode. \ + * {@link KnownAccessMode} can be used interchangeably with AccessMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ReadOnly** \ + * **ReadWrite** + */ +export type AccessMode = string; + /** Known values of {@link ManagedServiceIdentityType} that the service accepts. */ export enum KnownManagedServiceIdentityType { /** None */ @@ -2138,6 +2710,45 @@ export enum KnownAction { */ export type Action = string; +/** Known values of {@link Affinity} that the service accepts. */ +export enum KnownAffinity { + /** Sticky */ + Sticky = "sticky", + /** None */ + None = "none" +} + +/** + * Defines values for Affinity. \ + * {@link KnownAffinity} can be used interchangeably with Affinity, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **sticky** \ + * **none** + */ +export type Affinity = string; + +/** Known values of {@link IngressClientCertificateMode} that the service accepts. */ +export enum KnownIngressClientCertificateMode { + /** Ignore */ + Ignore = "ignore", + /** Accept */ + Accept = "accept", + /** Require */ + Require = "require" +} + +/** + * Defines values for IngressClientCertificateMode. \ + * {@link KnownIngressClientCertificateMode} can be used interchangeably with IngressClientCertificateMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ignore** \ + * **accept** \ + * **require** + */ +export type IngressClientCertificateMode = string; + /** Known values of {@link AppProtocol} that the service accepts. */ export enum KnownAppProtocol { /** Http */ @@ -2224,7 +2835,9 @@ export enum KnownStorageType { /** AzureFile */ AzureFile = "AzureFile", /** EmptyDir */ - EmptyDir = "EmptyDir" + EmptyDir = "EmptyDir", + /** Secret */ + Secret = "Secret" } /** @@ -2233,7 +2846,8 @@ export enum KnownStorageType { * this enum contains the known values that the service supports. * ### Known values supported by the service * **AzureFile** \ - * **EmptyDir** + * **EmptyDir** \ + * **Secret** */ export type StorageType = string; @@ -2283,25 +2897,79 @@ export enum KnownRevisionProvisioningState { * **Deprovisioning** \ * **Deprovisioned** */ -export type RevisionProvisioningState = string; - -/** Known values of {@link SkuName} that the service accepts. */ -export enum KnownSkuName { - /** Consumption SKU of Managed Environment. */ - Consumption = "Consumption", - /** Premium SKU of Managed Environment. */ - Premium = "Premium" +export type RevisionProvisioningState = string; + +/** Known values of {@link RevisionRunningState} that the service accepts. */ +export enum KnownRevisionRunningState { + /** Running */ + Running = "Running", + /** Processing */ + Processing = "Processing", + /** Stopped */ + Stopped = "Stopped", + /** Degraded */ + Degraded = "Degraded", + /** Failed */ + Failed = "Failed", + /** Unknown */ + Unknown = "Unknown" +} + +/** + * 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** \ + * **Processing** \ + * **Stopped** \ + * **Degraded** \ + * **Failed** \ + * **Unknown** + */ +export type RevisionRunningState = string; + +/** Known values of {@link ContainerAppReplicaRunningState} that the service accepts. */ +export enum KnownContainerAppReplicaRunningState { + /** Running */ + Running = "Running", + /** NotRunning */ + NotRunning = "NotRunning", + /** Unknown */ + Unknown = "Unknown" +} + +/** + * 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 + * **Running** \ + * **NotRunning** \ + * **Unknown** + */ +export type ContainerAppReplicaRunningState = string; + +/** Known values of {@link ContainerAppContainerRunningState} that the service accepts. */ +export enum KnownContainerAppContainerRunningState { + /** Running */ + Running = "Running", + /** Terminated */ + Terminated = "Terminated", + /** Waiting */ + Waiting = "Waiting" } /** - * Defines values for SkuName. \ - * {@link KnownSkuName} can be used interchangeably with SkuName, + * 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 - * **Consumption**: Consumption SKU of Managed Environment. \ - * **Premium**: Premium SKU of Managed Environment. + * **Running** \ + * **Terminated** \ + * **Waiting** */ -export type SkuName = string; +export type ContainerAppContainerRunningState = string; /** Known values of {@link EnvironmentProvisioningState} that the service accepts. */ export enum KnownEnvironmentProvisioningState { @@ -2345,86 +3013,107 @@ export enum KnownEnvironmentProvisioningState { */ export type EnvironmentProvisioningState = string; -/** Known values of {@link ManagedEnvironmentOutBoundType} that the service accepts. */ -export enum KnownManagedEnvironmentOutBoundType { - /** LoadBalancer */ - LoadBalancer = "LoadBalancer", - /** UserDefinedRouting */ - UserDefinedRouting = "UserDefinedRouting" -} - -/** - * Defines values for ManagedEnvironmentOutBoundType. \ - * {@link KnownManagedEnvironmentOutBoundType} can be used interchangeably with ManagedEnvironmentOutBoundType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **LoadBalancer** \ - * **UserDefinedRouting** - */ -export type ManagedEnvironmentOutBoundType = string; - -/** Known values of {@link CertificateProvisioningState} that the service accepts. */ -export enum KnownCertificateProvisioningState { +/** Known values of {@link JobProvisioningState} that the service accepts. */ +export enum KnownJobProvisioningState { + /** InProgress */ + InProgress = "InProgress", /** Succeeded */ Succeeded = "Succeeded", /** Failed */ Failed = "Failed", /** Canceled */ Canceled = "Canceled", - /** DeleteFailed */ - DeleteFailed = "DeleteFailed", - /** Pending */ - Pending = "Pending" + /** Deleting */ + Deleting = "Deleting" } /** - * Defines values for CertificateProvisioningState. \ - * {@link KnownCertificateProvisioningState} can be used interchangeably with CertificateProvisioningState, + * 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** \ - * **DeleteFailed** \ - * **Pending** + * **Deleting** */ -export type CertificateProvisioningState = string; +export type JobProvisioningState = string; -/** Known values of {@link CheckNameAvailabilityReason} that the service accepts. */ -export enum KnownCheckNameAvailabilityReason { - /** Invalid */ - Invalid = "Invalid", - /** AlreadyExists */ - AlreadyExists = "AlreadyExists" +/** Known values of {@link TriggerType} that the service accepts. */ +export enum KnownTriggerType { + /** Scheduled */ + Scheduled = "Scheduled", + /** Event */ + Event = "Event", + /** Manual */ + Manual = "Manual" } /** - * Defines values for CheckNameAvailabilityReason. \ - * {@link KnownCheckNameAvailabilityReason} can be used interchangeably with CheckNameAvailabilityReason, + * 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 - * **Invalid** \ - * **AlreadyExists** + * **Scheduled** \ + * **Event** \ + * **Manual** */ -export type CheckNameAvailabilityReason = string; +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" +} -/** Known values of {@link AccessMode} that the service accepts. */ -export enum KnownAccessMode { - /** ReadOnly */ - ReadOnly = "ReadOnly", - /** ReadWrite */ - ReadWrite = "ReadWrite" +/** + * 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 */ + Cname = "CNAME", + /** Http */ + Http = "HTTP", + /** TXT */ + TXT = "TXT" } /** - * Defines values for AccessMode. \ - * {@link KnownAccessMode} can be used interchangeably with AccessMode, + * Defines values for ManagedCertificateDomainControlValidation. \ + * {@link KnownManagedCertificateDomainControlValidation} can be used interchangeably with ManagedCertificateDomainControlValidation, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **ReadOnly** \ - * **ReadWrite** + * **CNAME** \ + * **HTTP** \ + * **TXT** */ -export type AccessMode = string; +export type ManagedCertificateDomainControlValidation = string; /** Known values of {@link SourceControlOperationState} that the service accepts. */ export enum KnownSourceControlOperationState { @@ -2449,127 +3138,249 @@ export enum KnownSourceControlOperationState { * **Canceled** */ export type SourceControlOperationState = string; +/** Defines values for UnauthenticatedClientActionV2. */ +export type UnauthenticatedClientActionV2 = + | "RedirectToLoginPage" + | "AllowAnonymous" + | "Return401" + | "Return403"; +/** Defines values for CookieExpirationConvention. */ +export type CookieExpirationConvention = + | "FixedTime" + | "IdentityProviderDerived"; +/** Defines values for ForwardProxyConvention. */ +export type ForwardProxyConvention = "NoProxy" | "Standard" | "Custom"; +/** Defines values for DnsVerificationTestResult. */ +export type DnsVerificationTestResult = "Passed" | "Failed" | "Skipped"; -/** Known values of {@link ConnectedEnvironmentProvisioningState} that the service accepts. */ -export enum KnownConnectedEnvironmentProvisioningState { - /** Succeeded */ - Succeeded = "Succeeded", - /** Failed */ - Failed = "Failed", - /** Canceled */ - Canceled = "Canceled", - /** Waiting */ - Waiting = "Waiting", - /** InitializationInProgress */ - InitializationInProgress = "InitializationInProgress", - /** InfrastructureSetupInProgress */ - InfrastructureSetupInProgress = "InfrastructureSetupInProgress", - /** InfrastructureSetupComplete */ - InfrastructureSetupComplete = "InfrastructureSetupComplete", - /** ScheduledForDelete */ - ScheduledForDelete = "ScheduledForDelete" +/** Optional parameters. */ +export interface ContainerAppsAuthConfigsListByContainerAppOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByContainerApp operation. */ +export type ContainerAppsAuthConfigsListByContainerAppResponse = AuthConfigCollection; + +/** Optional parameters. */ +export interface ContainerAppsAuthConfigsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ContainerAppsAuthConfigsGetResponse = AuthConfig; + +/** Optional parameters. */ +export interface ContainerAppsAuthConfigsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type ContainerAppsAuthConfigsCreateOrUpdateResponse = AuthConfig; + +/** Optional parameters. */ +export interface ContainerAppsAuthConfigsDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface ContainerAppsAuthConfigsListByContainerAppNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByContainerAppNext operation. */ +export type ContainerAppsAuthConfigsListByContainerAppNextResponse = AuthConfigCollection; + +/** Optional parameters. */ +export interface AvailableWorkloadProfilesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type AvailableWorkloadProfilesGetResponse = AvailableWorkloadProfilesCollection; + +/** Optional parameters. */ +export interface AvailableWorkloadProfilesGetNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getNext operation. */ +export type AvailableWorkloadProfilesGetNextResponse = AvailableWorkloadProfilesCollection; + +/** Optional parameters. */ +export interface BillingMetersGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type BillingMetersGetResponse = BillingMeterCollection; + +/** Optional parameters. */ +export interface ConnectedEnvironmentsListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type ConnectedEnvironmentsListBySubscriptionResponse = ConnectedEnvironmentCollection; + +/** Optional parameters. */ +export interface ConnectedEnvironmentsListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type ConnectedEnvironmentsListByResourceGroupResponse = ConnectedEnvironmentCollection; + +/** Optional parameters. */ +export interface ConnectedEnvironmentsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ConnectedEnvironmentsGetResponse = ConnectedEnvironment; + +/** Optional parameters. */ +export interface ConnectedEnvironmentsCreateOrUpdateOptionalParams + 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; } -/** - * Defines values for ConnectedEnvironmentProvisioningState. \ - * {@link KnownConnectedEnvironmentProvisioningState} can be used interchangeably with ConnectedEnvironmentProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded** \ - * **Failed** \ - * **Canceled** \ - * **Waiting** \ - * **InitializationInProgress** \ - * **InfrastructureSetupInProgress** \ - * **InfrastructureSetupComplete** \ - * **ScheduledForDelete** - */ -export type ConnectedEnvironmentProvisioningState = string; +/** Contains response data for the createOrUpdate operation. */ +export type ConnectedEnvironmentsCreateOrUpdateResponse = ConnectedEnvironment; + +/** Optional parameters. */ +export interface ConnectedEnvironmentsDeleteOptionalParams + 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 ConnectedEnvironmentsUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the update operation. */ +export type ConnectedEnvironmentsUpdateResponse = ConnectedEnvironment; + +/** Optional parameters. */ +export interface ConnectedEnvironmentsCheckNameAvailabilityOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the checkNameAvailability operation. */ +export type ConnectedEnvironmentsCheckNameAvailabilityResponse = CheckNameAvailabilityResponse; + +/** Optional parameters. */ +export interface ConnectedEnvironmentsListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type ConnectedEnvironmentsListBySubscriptionNextResponse = ConnectedEnvironmentCollection; + +/** Optional parameters. */ +export interface ConnectedEnvironmentsListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type ConnectedEnvironmentsListByResourceGroupNextResponse = ConnectedEnvironmentCollection; + +/** Optional parameters. */ +export interface ConnectedEnvironmentsCertificatesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type ConnectedEnvironmentsCertificatesListResponse = CertificateCollection; + +/** Optional parameters. */ +export interface ConnectedEnvironmentsCertificatesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ConnectedEnvironmentsCertificatesGetResponse = Certificate; + +/** Optional parameters. */ +export interface ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Certificate to be created or updated */ + certificateEnvelope?: Certificate; +} + +/** Contains response data for the createOrUpdate operation. */ +export type ConnectedEnvironmentsCertificatesCreateOrUpdateResponse = Certificate; + +/** Optional parameters. */ +export interface ConnectedEnvironmentsCertificatesDeleteOptionalParams + extends coreClient.OperationOptions {} -/** Known values of {@link Category} that the service accepts. */ -export enum KnownCategory { - /** PremiumSkuGeneralPurpose */ - PremiumSkuGeneralPurpose = "PremiumSkuGeneralPurpose", - /** PremiumSkuMemoryOptimized */ - PremiumSkuMemoryOptimized = "PremiumSkuMemoryOptimized", - /** PremiumSkuComputeOptimized */ - PremiumSkuComputeOptimized = "PremiumSkuComputeOptimized" -} +/** Optional parameters. */ +export interface ConnectedEnvironmentsCertificatesUpdateOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for Category. \ - * {@link KnownCategory} can be used interchangeably with Category, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **PremiumSkuGeneralPurpose** \ - * **PremiumSkuMemoryOptimized** \ - * **PremiumSkuComputeOptimized** - */ -export type Category = string; +/** Contains response data for the update operation. */ +export type ConnectedEnvironmentsCertificatesUpdateResponse = Certificate; -/** Known values of {@link Applicability} that the service accepts. */ -export enum KnownApplicability { - /** LocationDefault */ - LocationDefault = "LocationDefault", - /** Custom */ - Custom = "Custom" -} +/** Optional parameters. */ +export interface ConnectedEnvironmentsCertificatesListNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for Applicability. \ - * {@link KnownApplicability} can be used interchangeably with Applicability, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **LocationDefault** \ - * **Custom** - */ -export type Applicability = string; -/** Defines values for UnauthenticatedClientActionV2. */ -export type UnauthenticatedClientActionV2 = - | "RedirectToLoginPage" - | "AllowAnonymous" - | "Return401" - | "Return403"; -/** Defines values for CookieExpirationConvention. */ -export type CookieExpirationConvention = - | "FixedTime" - | "IdentityProviderDerived"; -/** Defines values for ForwardProxyConvention. */ -export type ForwardProxyConvention = "NoProxy" | "Standard" | "Custom"; -/** Defines values for DnsVerificationTestResult. */ -export type DnsVerificationTestResult = "Passed" | "Failed" | "Skipped"; +/** Contains response data for the listNext operation. */ +export type ConnectedEnvironmentsCertificatesListNextResponse = CertificateCollection; /** Optional parameters. */ -export interface ContainerAppsAuthConfigsListByContainerAppOptionalParams +export interface ConnectedEnvironmentsDaprComponentsListOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByContainerApp operation. */ -export type ContainerAppsAuthConfigsListByContainerAppResponse = AuthConfigCollection; +/** Contains response data for the list operation. */ +export type ConnectedEnvironmentsDaprComponentsListResponse = DaprComponentsCollection; /** Optional parameters. */ -export interface ContainerAppsAuthConfigsGetOptionalParams +export interface ConnectedEnvironmentsDaprComponentsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type ContainerAppsAuthConfigsGetResponse = AuthConfig; +export type ConnectedEnvironmentsDaprComponentsGetResponse = DaprComponent; /** Optional parameters. */ -export interface ContainerAppsAuthConfigsCreateOrUpdateOptionalParams +export interface ConnectedEnvironmentsDaprComponentsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the createOrUpdate operation. */ -export type ContainerAppsAuthConfigsCreateOrUpdateResponse = AuthConfig; +export type ConnectedEnvironmentsDaprComponentsCreateOrUpdateResponse = DaprComponent; /** Optional parameters. */ -export interface ContainerAppsAuthConfigsDeleteOptionalParams +export interface ConnectedEnvironmentsDaprComponentsDeleteOptionalParams extends coreClient.OperationOptions {} /** Optional parameters. */ -export interface ContainerAppsAuthConfigsListByContainerAppNextOptionalParams +export interface ConnectedEnvironmentsDaprComponentsListSecretsOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByContainerAppNext operation. */ -export type ContainerAppsAuthConfigsListByContainerAppNextResponse = AuthConfigCollection; +/** Contains response data for the listSecrets operation. */ +export type ConnectedEnvironmentsDaprComponentsListSecretsResponse = DaprSecretsCollection; + +/** Optional parameters. */ +export interface ConnectedEnvironmentsDaprComponentsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ConnectedEnvironmentsDaprComponentsListNextResponse = DaprComponentsCollection; + +/** Optional parameters. */ +export interface ConnectedEnvironmentsStoragesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type ConnectedEnvironmentsStoragesListResponse = ConnectedEnvironmentStoragesCollection; + +/** Optional parameters. */ +export interface ConnectedEnvironmentsStoragesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ConnectedEnvironmentsStoragesGetResponse = ConnectedEnvironmentStorage; + +/** Optional parameters. */ +export interface ConnectedEnvironmentsStoragesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type ConnectedEnvironmentsStoragesCreateOrUpdateResponse = ConnectedEnvironmentStorage; + +/** Optional parameters. */ +export interface ConnectedEnvironmentsStoragesDeleteOptionalParams + extends coreClient.OperationOptions {} /** Optional parameters. */ export interface ContainerAppsListBySubscriptionOptionalParams @@ -2622,6 +3433,9 @@ export interface ContainerAppsUpdateOptionalParams resumeFrom?: string; } +/** Contains response data for the update operation. */ +export type ContainerAppsUpdateResponse = ContainerApp; + /** Optional parameters. */ export interface ContainerAppsListCustomHostNameAnalysisOptionalParams extends coreClient.OperationOptions { @@ -2646,6 +3460,24 @@ export interface ContainerAppsGetAuthTokenOptionalParams /** Contains response data for the getAuthToken operation. */ export type ContainerAppsGetAuthTokenResponse = ContainerAppAuthToken; +/** Optional parameters. */ +export interface ContainerAppsStartOptionalParams + 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 ContainerAppsStopOptionalParams + 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 ContainerAppsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions {} @@ -2691,10 +3523,7 @@ export interface ContainerAppsRevisionsRestartRevisionOptionalParams /** Optional parameters. */ export interface ContainerAppsRevisionsListRevisionsNextOptionalParams - extends coreClient.OperationOptions { - /** The filter to apply on the operation. */ - filter?: string; -} + extends coreClient.OperationOptions {} /** Contains response data for the listRevisionsNext operation. */ export type ContainerAppsRevisionsListRevisionsNextResponse = RevisionCollection; @@ -2714,133 +3543,219 @@ export interface ContainerAppsRevisionReplicasListReplicasOptionalParams export type ContainerAppsRevisionReplicasListReplicasResponse = ReplicaCollection; /** Optional parameters. */ -export interface DaprComponentsListOptionalParams +export interface ContainerAppsDiagnosticsListDetectorsOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the list operation. */ -export type DaprComponentsListResponse = DaprComponentsCollection; +/** Contains response data for the listDetectors operation. */ +export type ContainerAppsDiagnosticsListDetectorsResponse = DiagnosticsCollection; /** Optional parameters. */ -export interface DaprComponentsGetOptionalParams +export interface ContainerAppsDiagnosticsGetDetectorOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type DaprComponentsGetResponse = DaprComponent; +/** Contains response data for the getDetector operation. */ +export type ContainerAppsDiagnosticsGetDetectorResponse = Diagnostics; /** Optional parameters. */ -export interface DaprComponentsCreateOrUpdateOptionalParams +export interface ContainerAppsDiagnosticsListRevisionsOptionalParams + extends coreClient.OperationOptions { + /** The filter to apply on the operation. */ + filter?: string; +} + +/** Contains response data for the listRevisions operation. */ +export type ContainerAppsDiagnosticsListRevisionsResponse = RevisionCollection; + +/** Optional parameters. */ +export interface ContainerAppsDiagnosticsGetRevisionOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the createOrUpdate operation. */ -export type DaprComponentsCreateOrUpdateResponse = DaprComponent; +/** Contains response data for the getRevision operation. */ +export type ContainerAppsDiagnosticsGetRevisionResponse = Revision; /** Optional parameters. */ -export interface DaprComponentsDeleteOptionalParams +export interface ContainerAppsDiagnosticsGetRootOptionalParams extends coreClient.OperationOptions {} +/** Contains response data for the getRoot operation. */ +export type ContainerAppsDiagnosticsGetRootResponse = ContainerApp; + /** Optional parameters. */ -export interface DaprComponentsListSecretsOptionalParams +export interface ContainerAppsDiagnosticsListDetectorsNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listSecrets operation. */ -export type DaprComponentsListSecretsResponse = DaprSecretsCollection; +/** Contains response data for the listDetectorsNext operation. */ +export type ContainerAppsDiagnosticsListDetectorsNextResponse = DiagnosticsCollection; /** Optional parameters. */ -export interface DaprComponentsListNextOptionalParams +export interface ContainerAppsDiagnosticsListRevisionsNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listNext operation. */ -export type DaprComponentsListNextResponse = DaprComponentsCollection; +/** Contains response data for the listRevisionsNext operation. */ +export type ContainerAppsDiagnosticsListRevisionsNextResponse = RevisionCollection; /** Optional parameters. */ -export interface ContainerAppsDiagnosticsListDetectorsOptionalParams +export interface ManagedEnvironmentDiagnosticsListDetectorsOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listDetectors operation. */ -export type ContainerAppsDiagnosticsListDetectorsResponse = DiagnosticsCollection; +export type ManagedEnvironmentDiagnosticsListDetectorsResponse = DiagnosticsCollection; /** Optional parameters. */ -export interface ContainerAppsDiagnosticsGetDetectorOptionalParams +export interface ManagedEnvironmentDiagnosticsGetDetectorOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the getDetector operation. */ -export type ContainerAppsDiagnosticsGetDetectorResponse = Diagnostics; +export type ManagedEnvironmentDiagnosticsGetDetectorResponse = Diagnostics; /** Optional parameters. */ -export interface ContainerAppsDiagnosticsListRevisionsOptionalParams - extends coreClient.OperationOptions { - /** The filter to apply on the operation. */ - filter?: string; -} +export interface ManagedEnvironmentsDiagnosticsGetRootOptionalParams + extends coreClient.OperationOptions {} -/** Contains response data for the listRevisions operation. */ -export type ContainerAppsDiagnosticsListRevisionsResponse = RevisionCollection; +/** Contains response data for the getRoot operation. */ +export type ManagedEnvironmentsDiagnosticsGetRootResponse = ManagedEnvironment; /** Optional parameters. */ -export interface ContainerAppsDiagnosticsGetRevisionOptionalParams +export interface OperationsListOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the getRevision operation. */ -export type ContainerAppsDiagnosticsGetRevisionResponse = Revision; +/** Contains response data for the list operation. */ +export type OperationsListResponse = AvailableOperations; /** Optional parameters. */ -export interface ContainerAppsDiagnosticsGetRootOptionalParams +export interface OperationsListNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the getRoot operation. */ -export type ContainerAppsDiagnosticsGetRootResponse = ContainerApp; +/** Contains response data for the listNext operation. */ +export type OperationsListNextResponse = AvailableOperations; /** Optional parameters. */ -export interface ContainerAppsDiagnosticsListDetectorsNextOptionalParams +export interface JobsListBySubscriptionOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listDetectorsNext operation. */ -export type ContainerAppsDiagnosticsListDetectorsNextResponse = DiagnosticsCollection; +/** Contains response data for the listBySubscription operation. */ +export type JobsListBySubscriptionResponse = JobsCollection; /** Optional parameters. */ -export interface ContainerAppsDiagnosticsListRevisionsNextOptionalParams +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 { + /** 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 { - /** The filter to apply on the operation. */ - filter?: string; + /** 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 listRevisionsNext operation. */ -export type ContainerAppsDiagnosticsListRevisionsNextResponse = RevisionCollection; +/** Contains response data for the stopMultipleExecutions operation. */ +export type JobsStopMultipleExecutionsResponse = ContainerAppJobExecutions; /** Optional parameters. */ -export interface ManagedEnvironmentDiagnosticsListDetectorsOptionalParams +export interface JobsListSecretsOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listDetectors operation. */ -export type ManagedEnvironmentDiagnosticsListDetectorsResponse = DiagnosticsCollection; +/** Contains response data for the listSecrets operation. */ +export type JobsListSecretsResponse = JobSecretsCollection; /** Optional parameters. */ -export interface ManagedEnvironmentDiagnosticsGetDetectorOptionalParams +export interface JobsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the getDetector operation. */ -export type ManagedEnvironmentDiagnosticsGetDetectorResponse = Diagnostics; +/** Contains response data for the listBySubscriptionNext operation. */ +export type JobsListBySubscriptionNextResponse = JobsCollection; /** Optional parameters. */ -export interface ManagedEnvironmentsDiagnosticsGetRootOptionalParams +export interface JobsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the getRoot operation. */ -export type ManagedEnvironmentsDiagnosticsGetRootResponse = ManagedEnvironment; +/** Contains response data for the listByResourceGroupNext operation. */ +export type JobsListByResourceGroupNextResponse = JobsCollection; /** Optional parameters. */ -export interface OperationsListOptionalParams - extends coreClient.OperationOptions {} +export interface JobsExecutionsListOptionalParams + extends coreClient.OperationOptions { + /** The filter to apply on the operation. */ + filter?: string; +} /** Contains response data for the list operation. */ -export type OperationsListResponse = AvailableOperations; +export type JobsExecutionsListResponse = ContainerAppJobExecutions; /** Optional parameters. */ -export interface OperationsListNextOptionalParams +export interface JobsExecutionsListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ -export type OperationsListNextResponse = AvailableOperations; +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 @@ -2893,6 +3808,9 @@ export interface ManagedEnvironmentsUpdateOptionalParams resumeFrom?: string; } +/** Contains response data for the update operation. */ +export type ManagedEnvironmentsUpdateResponse = ManagedEnvironment; + /** Optional parameters. */ export interface ManagedEnvironmentsGetAuthTokenOptionalParams extends coreClient.OperationOptions {} @@ -2971,54 +3889,17 @@ export interface CertificatesListNextOptionalParams export type CertificatesListNextResponse = CertificateCollection; /** Optional parameters. */ -export interface NamespacesCheckNameAvailabilityOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the checkNameAvailability operation. */ -export type NamespacesCheckNameAvailabilityResponse = CheckNameAvailabilityResponse; - -/** Optional parameters. */ -export interface ManagedEnvironmentsStoragesListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ManagedEnvironmentsStoragesListResponse = ManagedEnvironmentStoragesCollection; - -/** Optional parameters. */ -export interface ManagedEnvironmentsStoragesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ManagedEnvironmentsStoragesGetResponse = ManagedEnvironmentStorage; - -/** Optional parameters. */ -export interface ManagedEnvironmentsStoragesCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type ManagedEnvironmentsStoragesCreateOrUpdateResponse = ManagedEnvironmentStorage; - -/** Optional parameters. */ -export interface ManagedEnvironmentsStoragesDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface ContainerAppsSourceControlsListByContainerAppOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByContainerApp operation. */ -export type ContainerAppsSourceControlsListByContainerAppResponse = SourceControlCollection; - -/** Optional parameters. */ -export interface ContainerAppsSourceControlsGetOptionalParams +export interface ManagedCertificatesGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type ContainerAppsSourceControlsGetResponse = SourceControl; +export type ManagedCertificatesGetResponse = ManagedCertificate; /** Optional parameters. */ -export interface ContainerAppsSourceControlsCreateOrUpdateOptionalParams +export interface ManagedCertificatesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + /** Managed Certificate to be created or updated */ + managedCertificateEnvelope?: ManagedCertificate; /** 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. */ @@ -3026,220 +3907,145 @@ export interface ContainerAppsSourceControlsCreateOrUpdateOptionalParams } /** Contains response data for the createOrUpdate operation. */ -export type ContainerAppsSourceControlsCreateOrUpdateResponse = SourceControl; - -/** Optional parameters. */ -export interface ContainerAppsSourceControlsDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Optional parameters. */ -export interface ContainerAppsSourceControlsListByContainerAppNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByContainerAppNext operation. */ -export type ContainerAppsSourceControlsListByContainerAppNextResponse = SourceControlCollection; - -/** Optional parameters. */ -export interface ConnectedEnvironmentsListBySubscriptionOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscription operation. */ -export type ConnectedEnvironmentsListBySubscriptionResponse = ConnectedEnvironmentCollection; - -/** Optional parameters. */ -export interface ConnectedEnvironmentsListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type ConnectedEnvironmentsListByResourceGroupResponse = ConnectedEnvironmentCollection; +export type ManagedCertificatesCreateOrUpdateResponse = ManagedCertificate; /** Optional parameters. */ -export interface ConnectedEnvironmentsGetOptionalParams +export interface ManagedCertificatesDeleteOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type ConnectedEnvironmentsGetResponse = ConnectedEnvironment; - -/** Optional parameters. */ -export interface ConnectedEnvironmentsCreateOrUpdateOptionalParams - 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 ConnectedEnvironmentsCreateOrUpdateResponse = ConnectedEnvironment; - -/** Optional parameters. */ -export interface ConnectedEnvironmentsDeleteOptionalParams - 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 ConnectedEnvironmentsUpdateOptionalParams +export interface ManagedCertificatesUpdateOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the update operation. */ -export type ConnectedEnvironmentsUpdateResponse = ConnectedEnvironment; +export type ManagedCertificatesUpdateResponse = ManagedCertificate; /** Optional parameters. */ -export interface ConnectedEnvironmentsCheckNameAvailabilityOptionalParams +export interface ManagedCertificatesListOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the checkNameAvailability operation. */ -export type ConnectedEnvironmentsCheckNameAvailabilityResponse = CheckNameAvailabilityResponse; +/** Contains response data for the list operation. */ +export type ManagedCertificatesListResponse = ManagedCertificateCollection; /** Optional parameters. */ -export interface ConnectedEnvironmentsListBySubscriptionNextOptionalParams +export interface ManagedCertificatesListNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listBySubscriptionNext operation. */ -export type ConnectedEnvironmentsListBySubscriptionNextResponse = ConnectedEnvironmentCollection; +/** Contains response data for the listNext operation. */ +export type ManagedCertificatesListNextResponse = ManagedCertificateCollection; /** Optional parameters. */ -export interface ConnectedEnvironmentsListByResourceGroupNextOptionalParams +export interface NamespacesCheckNameAvailabilityOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByResourceGroupNext operation. */ -export type ConnectedEnvironmentsListByResourceGroupNextResponse = ConnectedEnvironmentCollection; +/** Contains response data for the checkNameAvailability operation. */ +export type NamespacesCheckNameAvailabilityResponse = CheckNameAvailabilityResponse; /** Optional parameters. */ -export interface ConnectedEnvironmentsCertificatesListOptionalParams +export interface DaprComponentsListOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the list operation. */ -export type ConnectedEnvironmentsCertificatesListResponse = CertificateCollection; +export type DaprComponentsListResponse = DaprComponentsCollection; /** Optional parameters. */ -export interface ConnectedEnvironmentsCertificatesGetOptionalParams +export interface DaprComponentsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type ConnectedEnvironmentsCertificatesGetResponse = Certificate; +export type DaprComponentsGetResponse = DaprComponent; /** Optional parameters. */ -export interface ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** Certificate to be created or updated */ - certificateEnvelope?: Certificate; -} +export interface DaprComponentsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} /** Contains response data for the createOrUpdate operation. */ -export type ConnectedEnvironmentsCertificatesCreateOrUpdateResponse = Certificate; +export type DaprComponentsCreateOrUpdateResponse = DaprComponent; /** Optional parameters. */ -export interface ConnectedEnvironmentsCertificatesDeleteOptionalParams +export interface DaprComponentsDeleteOptionalParams extends coreClient.OperationOptions {} /** Optional parameters. */ -export interface ConnectedEnvironmentsCertificatesUpdateOptionalParams +export interface DaprComponentsListSecretsOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the update operation. */ -export type ConnectedEnvironmentsCertificatesUpdateResponse = Certificate; +/** Contains response data for the listSecrets operation. */ +export type DaprComponentsListSecretsResponse = DaprSecretsCollection; /** Optional parameters. */ -export interface ConnectedEnvironmentsCertificatesListNextOptionalParams +export interface DaprComponentsListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ -export type ConnectedEnvironmentsCertificatesListNextResponse = CertificateCollection; +export type DaprComponentsListNextResponse = DaprComponentsCollection; /** Optional parameters. */ -export interface ConnectedEnvironmentsDaprComponentsListOptionalParams +export interface ManagedEnvironmentsStoragesListOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the list operation. */ -export type ConnectedEnvironmentsDaprComponentsListResponse = DaprComponentsCollection; +export type ManagedEnvironmentsStoragesListResponse = ManagedEnvironmentStoragesCollection; /** Optional parameters. */ -export interface ConnectedEnvironmentsDaprComponentsGetOptionalParams +export interface ManagedEnvironmentsStoragesGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type ConnectedEnvironmentsDaprComponentsGetResponse = DaprComponent; +export type ManagedEnvironmentsStoragesGetResponse = ManagedEnvironmentStorage; /** Optional parameters. */ -export interface ConnectedEnvironmentsDaprComponentsCreateOrUpdateOptionalParams +export interface ManagedEnvironmentsStoragesCreateOrUpdateOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the createOrUpdate operation. */ -export type ConnectedEnvironmentsDaprComponentsCreateOrUpdateResponse = DaprComponent; - -/** Optional parameters. */ -export interface ConnectedEnvironmentsDaprComponentsDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface ConnectedEnvironmentsDaprComponentsListSecretsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listSecrets operation. */ -export type ConnectedEnvironmentsDaprComponentsListSecretsResponse = DaprSecretsCollection; +export type ManagedEnvironmentsStoragesCreateOrUpdateResponse = ManagedEnvironmentStorage; /** Optional parameters. */ -export interface ConnectedEnvironmentsDaprComponentsListNextOptionalParams +export interface ManagedEnvironmentsStoragesDeleteOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listNext operation. */ -export type ConnectedEnvironmentsDaprComponentsListNextResponse = DaprComponentsCollection; - /** Optional parameters. */ -export interface ConnectedEnvironmentsStoragesListOptionalParams +export interface ContainerAppsSourceControlsListByContainerAppOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the list operation. */ -export type ConnectedEnvironmentsStoragesListResponse = ConnectedEnvironmentStoragesCollection; +/** Contains response data for the listByContainerApp operation. */ +export type ContainerAppsSourceControlsListByContainerAppResponse = SourceControlCollection; /** Optional parameters. */ -export interface ConnectedEnvironmentsStoragesGetOptionalParams +export interface ContainerAppsSourceControlsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type ConnectedEnvironmentsStoragesGetResponse = ConnectedEnvironmentStorage; +export type ContainerAppsSourceControlsGetResponse = SourceControl; /** Optional parameters. */ -export interface ConnectedEnvironmentsStoragesCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} +export interface ContainerAppsSourceControlsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} /** Contains response data for the createOrUpdate operation. */ -export type ConnectedEnvironmentsStoragesCreateOrUpdateResponse = ConnectedEnvironmentStorage; - -/** Optional parameters. */ -export interface ConnectedEnvironmentsStoragesDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface AvailableWorkloadProfilesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type AvailableWorkloadProfilesGetResponse = AvailableWorkloadProfilesCollection; +export type ContainerAppsSourceControlsCreateOrUpdateResponse = SourceControl; /** Optional parameters. */ -export interface AvailableWorkloadProfilesGetNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getNext operation. */ -export type AvailableWorkloadProfilesGetNextResponse = AvailableWorkloadProfilesCollection; +export interface ContainerAppsSourceControlsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} /** Optional parameters. */ -export interface BillingMetersGetOptionalParams +export interface ContainerAppsSourceControlsListByContainerAppNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type BillingMetersGetResponse = BillingMeterCollection; +/** Contains response data for the listByContainerAppNext operation. */ +export type ContainerAppsSourceControlsListByContainerAppNextResponse = SourceControlCollection; /** Optional parameters. */ export interface ContainerAppsAPIClientOptionalParams diff --git a/sdk/appcontainers/arm-appcontainers/src/models/mappers.ts b/sdk/appcontainers/arm-appcontainers/src/models/mappers.ts index e70ccb8c77eb..5afdbc69fbf9 100644 --- a/sdk/appcontainers/arm-appcontainers/src/models/mappers.ts +++ b/sdk/appcontainers/arm-appcontainers/src/models/mappers.ts @@ -1214,10 +1214,10 @@ export const DefaultErrorResponseErrorDetailsItem: coreClient.CompositeMapper = } }; -export const ContainerAppCollection: coreClient.CompositeMapper = { +export const AvailableWorkloadProfilesCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerAppCollection", + className: "AvailableWorkloadProfilesCollection", modelProperties: { value: { serializedName: "value", @@ -1227,7 +1227,7 @@ export const ContainerAppCollection: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ContainerApp" + className: "AvailableWorkloadProfile" } } } @@ -1243,19 +1243,37 @@ export const ContainerAppCollection: coreClient.CompositeMapper = { } }; -export const ExtendedLocation: coreClient.CompositeMapper = { +export const AvailableWorkloadProfileProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ExtendedLocation", + className: "AvailableWorkloadProfileProperties", modelProperties: { - name: { - serializedName: "name", + category: { + serializedName: "category", type: { name: "String" } }, - type: { - serializedName: "type", + applicability: { + serializedName: "applicability", + type: { + name: "String" + } + }, + cores: { + serializedName: "cores", + type: { + name: "Number" + } + }, + memoryGiB: { + serializedName: "memoryGiB", + type: { + name: "Number" + } + }, + displayName: { + serializedName: "displayName", type: { name: "String" } @@ -1264,38 +1282,71 @@ export const ExtendedLocation: coreClient.CompositeMapper = { } }; -export const ManagedServiceIdentity: coreClient.CompositeMapper = { +export const ErrorResponse: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedServiceIdentity", + className: "ErrorResponse", modelProperties: { - principalId: { - serializedName: "principalId", + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + } +}; + +export const ErrorDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorDetail", + modelProperties: { + code: { + serializedName: "code", readOnly: true, type: { - name: "Uuid" + name: "String" } }, - tenantId: { - serializedName: "tenantId", + message: { + serializedName: "message", readOnly: true, type: { - name: "Uuid" + name: "String" } }, - type: { - serializedName: "type", - required: true, + target: { + serializedName: "target", + readOnly: true, type: { name: "String" } }, - userAssignedIdentities: { - serializedName: "userAssignedIdentities", + details: { + serializedName: "details", + readOnly: true, type: { - name: "Dictionary", - value: { - type: { name: "Composite", className: "UserAssignedIdentity" } + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + }, + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } } } } @@ -1303,92 +1354,111 @@ export const ManagedServiceIdentity: coreClient.CompositeMapper = { } }; -export const UserAssignedIdentity: coreClient.CompositeMapper = { +export const ErrorAdditionalInfo: coreClient.CompositeMapper = { type: { name: "Composite", - className: "UserAssignedIdentity", + className: "ErrorAdditionalInfo", modelProperties: { - principalId: { - serializedName: "principalId", + type: { + serializedName: "type", readOnly: true, type: { - name: "Uuid" + name: "String" } }, - clientId: { - serializedName: "clientId", + info: { + serializedName: "info", readOnly: true, type: { - name: "Uuid" + name: "Dictionary", + value: { type: { name: "any" } } } } } } }; -export const Configuration: coreClient.CompositeMapper = { +export const BillingMeterCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Configuration", + className: "BillingMeterCollection", modelProperties: { - secrets: { - serializedName: "secrets", + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "Secret" + className: "BillingMeter" } } } - }, - activeRevisionsMode: { - serializedName: "activeRevisionsMode", + } + } + } +}; + +export const BillingMeterProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BillingMeterProperties", + modelProperties: { + category: { + serializedName: "category", type: { name: "String" } }, - ingress: { - serializedName: "ingress", + meterType: { + serializedName: "meterType", type: { - name: "Composite", - className: "Ingress" + name: "String" } }, - registries: { - serializedName: "registries", + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + } + } + } +}; + +export const ConnectedEnvironmentCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConnectedEnvironmentCollection", + modelProperties: { + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { name: "Composite", - className: "RegistryCredentials" + className: "ConnectedEnvironment" } } } }, - dapr: { - serializedName: "dapr", - type: { - name: "Composite", - className: "Dapr" - } - }, - maxInactiveRevisions: { - serializedName: "maxInactiveRevisions", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { - name: "Number" + name: "String" } } } } }; -export const Secret: coreClient.CompositeMapper = { +export const ExtendedLocation: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Secret", + className: "ExtendedLocation", modelProperties: { name: { serializedName: "name", @@ -1396,8 +1466,8 @@ export const Secret: coreClient.CompositeMapper = { name: "String" } }, - value: { - serializedName: "value", + type: { + serializedName: "type", type: { name: "String" } @@ -1406,115 +1476,74 @@ export const Secret: coreClient.CompositeMapper = { } }; -export const Ingress: coreClient.CompositeMapper = { +export const CustomDomainConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Ingress", + className: "CustomDomainConfiguration", modelProperties: { - fqdn: { - serializedName: "fqdn", + customDomainVerificationId: { + serializedName: "customDomainVerificationId", readOnly: true, type: { name: "String" } }, - external: { - defaultValue: false, - serializedName: "external", - type: { - name: "Boolean" - } - }, - targetPort: { - serializedName: "targetPort", + dnsSuffix: { + serializedName: "dnsSuffix", type: { - name: "Number" + name: "String" } }, - exposedPort: { - serializedName: "exposedPort", + certificateValue: { + serializedName: "certificateValue", type: { - name: "Number" + name: "ByteArray" } }, - transport: { - serializedName: "transport", + certificatePassword: { + serializedName: "certificatePassword", type: { name: "String" } }, - traffic: { - serializedName: "traffic", + expirationDate: { + serializedName: "expirationDate", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TrafficWeight" - } - } + name: "DateTime" } }, - customDomains: { - serializedName: "customDomains", + thumbprint: { + serializedName: "thumbprint", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CustomDomain" - } - } + name: "String" } }, - allowInsecure: { - serializedName: "allowInsecure", + subjectName: { + serializedName: "subjectName", + readOnly: true, type: { - name: "Boolean" - } - }, - ipSecurityRestrictions: { - serializedName: "ipSecurityRestrictions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IpSecurityRestrictionRule" - } - } + name: "String" } } } } }; -export const TrafficWeight: coreClient.CompositeMapper = { +export const CheckNameAvailabilityRequest: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TrafficWeight", + className: "CheckNameAvailabilityRequest", modelProperties: { - revisionName: { - serializedName: "revisionName", + name: { + serializedName: "name", type: { name: "String" } }, - weight: { - serializedName: "weight", - type: { - name: "Number" - } - }, - latestRevision: { - defaultValue: false, - serializedName: "latestRevision", - type: { - name: "Boolean" - } - }, - label: { - serializedName: "label", + type: { + serializedName: "type", type: { name: "String" } @@ -1523,27 +1552,25 @@ export const TrafficWeight: coreClient.CompositeMapper = { } }; -export const CustomDomain: coreClient.CompositeMapper = { +export const CheckNameAvailabilityResponse: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CustomDomain", + className: "CheckNameAvailabilityResponse", modelProperties: { - name: { - serializedName: "name", - required: true, + nameAvailable: { + serializedName: "nameAvailable", type: { - name: "String" + name: "Boolean" } }, - bindingType: { - serializedName: "bindingType", + reason: { + serializedName: "reason", type: { name: "String" } }, - certificateId: { - serializedName: "certificateId", - required: true, + message: { + serializedName: "message", type: { name: "String" } @@ -1552,34 +1579,27 @@ export const CustomDomain: coreClient.CompositeMapper = { } }; -export const IpSecurityRestrictionRule: coreClient.CompositeMapper = { +export const CertificateCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "IpSecurityRestrictionRule", + className: "CertificateCollection", modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String" - } - }, - description: { - serializedName: "description", - type: { - name: "String" - } - }, - ipAddressRange: { - serializedName: "ipAddressRange", + value: { + serializedName: "value", required: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Certificate" + } + } } }, - action: { - serializedName: "action", - required: true, + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String" } @@ -1588,232 +1608,177 @@ export const IpSecurityRestrictionRule: coreClient.CompositeMapper = { } }; -export const RegistryCredentials: coreClient.CompositeMapper = { +export const CertificateProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RegistryCredentials", + className: "CertificateProperties", modelProperties: { - server: { - serializedName: "server", + provisioningState: { + serializedName: "provisioningState", + readOnly: true, type: { name: "String" } }, - username: { - serializedName: "username", + password: { + serializedName: "password", type: { name: "String" } }, - passwordSecretRef: { - serializedName: "passwordSecretRef", + subjectName: { + serializedName: "subjectName", + readOnly: true, type: { name: "String" } }, - identity: { - serializedName: "identity", - type: { - name: "String" - } - } - } - } -}; - -export const Dapr: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Dapr", - modelProperties: { - enabled: { - serializedName: "enabled", + subjectAlternativeNames: { + serializedName: "subjectAlternativeNames", + readOnly: true, type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - appId: { - serializedName: "appId", + value: { + serializedName: "value", type: { - name: "String" + name: "ByteArray" } }, - appProtocol: { - serializedName: "appProtocol", + issuer: { + serializedName: "issuer", + readOnly: true, type: { name: "String" } }, - appPort: { - serializedName: "appPort", + issueDate: { + serializedName: "issueDate", + readOnly: true, type: { - name: "Number" + name: "DateTime" } }, - httpReadBufferSize: { - serializedName: "httpReadBufferSize", + expirationDate: { + serializedName: "expirationDate", + readOnly: true, type: { - name: "Number" + name: "DateTime" } }, - httpMaxRequestSize: { - serializedName: "httpMaxRequestSize", + thumbprint: { + serializedName: "thumbprint", + readOnly: true, type: { - name: "Number" + name: "String" } }, - logLevel: { - serializedName: "logLevel", + valid: { + serializedName: "valid", + readOnly: true, type: { - name: "String" + name: "Boolean" } }, - enableApiLogging: { - serializedName: "enableApiLogging", + publicKeyHash: { + serializedName: "publicKeyHash", + readOnly: true, type: { - name: "Boolean" + name: "String" } } } } }; -export const Template: coreClient.CompositeMapper = { +export const CertificatePatch: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Template", + className: "CertificatePatch", modelProperties: { - revisionSuffix: { - serializedName: "revisionSuffix", - type: { - name: "String" - } - }, - initContainers: { - serializedName: "initContainers", + tags: { + serializedName: "tags", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "InitContainer" - } - } + name: "Dictionary", + value: { type: { name: "String" } } } - }, - containers: { - serializedName: "containers", + } + } + } +}; + +export const DaprComponentsCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DaprComponentsCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "Container" + className: "DaprComponent" } } } }, - scale: { - serializedName: "scale", - type: { - name: "Composite", - className: "Scale" - } - }, - volumes: { - serializedName: "volumes", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Volume" - } - } + name: "String" } } } } }; -export const BaseContainer: coreClient.CompositeMapper = { +export const Secret: coreClient.CompositeMapper = { type: { name: "Composite", - className: "BaseContainer", + className: "Secret", modelProperties: { - image: { - serializedName: "image", - type: { - name: "String" - } - }, name: { serializedName: "name", type: { name: "String" } }, - command: { - serializedName: "command", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - args: { - serializedName: "args", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - env: { - serializedName: "env", + value: { + serializedName: "value", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EnvironmentVar" - } - } + name: "String" } }, - resources: { - serializedName: "resources", + identity: { + serializedName: "identity", type: { - name: "Composite", - className: "ContainerResources" + name: "String" } }, - volumeMounts: { - serializedName: "volumeMounts", + keyVaultUrl: { + serializedName: "keyVaultUrl", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VolumeMount" - } - } + name: "String" } } } } }; -export const EnvironmentVar: coreClient.CompositeMapper = { +export const DaprMetadata: coreClient.CompositeMapper = { type: { name: "Composite", - className: "EnvironmentVar", + className: "DaprMetadata", modelProperties: { name: { serializedName: "name", @@ -1837,25 +1802,42 @@ export const EnvironmentVar: coreClient.CompositeMapper = { } }; -export const ContainerResources: coreClient.CompositeMapper = { +export const DaprSecretsCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerResources", + className: "DaprSecretsCollection", modelProperties: { - cpu: { - serializedName: "cpu", + value: { + serializedName: "value", + required: true, type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DaprSecret" + } + } } - }, - memory: { - serializedName: "memory", + } + } + } +}; + +export const DaprSecret: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DaprSecret", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, type: { name: "String" } }, - ephemeralStorage: { - serializedName: "ephemeralStorage", + value: { + serializedName: "value", readOnly: true, type: { name: "String" @@ -1865,84 +1847,69 @@ export const ContainerResources: coreClient.CompositeMapper = { } }; -export const VolumeMount: coreClient.CompositeMapper = { +export const ConnectedEnvironmentStoragesCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VolumeMount", + className: "ConnectedEnvironmentStoragesCollection", modelProperties: { - volumeName: { - serializedName: "volumeName", - type: { - name: "String" - } - }, - mountPath: { - serializedName: "mountPath", + value: { + serializedName: "value", + required: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConnectedEnvironmentStorage" + } + } } } } } }; -export const ContainerAppProbe: coreClient.CompositeMapper = { +export const ConnectedEnvironmentStorageProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerAppProbe", + className: "ConnectedEnvironmentStorageProperties", modelProperties: { - failureThreshold: { - serializedName: "failureThreshold", - type: { - name: "Number" - } - }, - httpGet: { - serializedName: "httpGet", + azureFile: { + serializedName: "azureFile", type: { name: "Composite", - className: "ContainerAppProbeHttpGet" - } - }, - initialDelaySeconds: { - serializedName: "initialDelaySeconds", - type: { - name: "Number" - } - }, - periodSeconds: { - serializedName: "periodSeconds", - type: { - name: "Number" - } - }, - successThreshold: { - serializedName: "successThreshold", - type: { - name: "Number" + className: "AzureFileProperties" } - }, - tcpSocket: { - serializedName: "tcpSocket", + } + } + } +}; + +export const AzureFileProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AzureFileProperties", + modelProperties: { + accountName: { + serializedName: "accountName", type: { - name: "Composite", - className: "ContainerAppProbeTcpSocket" + name: "String" } }, - terminationGracePeriodSeconds: { - serializedName: "terminationGracePeriodSeconds", + accountKey: { + serializedName: "accountKey", type: { - name: "Number" + name: "String" } }, - timeoutSeconds: { - serializedName: "timeoutSeconds", + accessMode: { + serializedName: "accessMode", type: { - name: "Number" + name: "String" } }, - type: { - serializedName: "type", + shareName: { + serializedName: "shareName", type: { name: "String" } @@ -1951,44 +1918,27 @@ export const ContainerAppProbe: coreClient.CompositeMapper = { } }; -export const ContainerAppProbeHttpGet: coreClient.CompositeMapper = { +export const ContainerAppCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerAppProbeHttpGet", + className: "ContainerAppCollection", modelProperties: { - host: { - serializedName: "host", - type: { - name: "String" - } - }, - httpHeaders: { - serializedName: "httpHeaders", + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "ContainerAppProbeHttpGetHttpHeadersItem" + className: "ContainerApp" } } } }, - path: { - serializedName: "path", - type: { - name: "String" - } - }, - port: { - serializedName: "port", - required: true, - type: { - name: "Number" - } - }, - scheme: { - serializedName: "scheme", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String" } @@ -1997,290 +1947,294 @@ export const ContainerAppProbeHttpGet: coreClient.CompositeMapper = { } }; -export const ContainerAppProbeHttpGetHttpHeadersItem: coreClient.CompositeMapper = { +export const ManagedServiceIdentity: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerAppProbeHttpGetHttpHeadersItem", + className: "ManagedServiceIdentity", modelProperties: { - name: { - serializedName: "name", - required: true, + principalId: { + serializedName: "principalId", + readOnly: true, type: { - name: "String" + name: "Uuid" } }, - value: { - serializedName: "value", + tenantId: { + serializedName: "tenantId", + readOnly: true, + type: { + name: "Uuid" + } + }, + type: { + serializedName: "type", required: true, type: { name: "String" } + }, + userAssignedIdentities: { + serializedName: "userAssignedIdentities", + type: { + name: "Dictionary", + value: { + type: { name: "Composite", className: "UserAssignedIdentity" } + } + } } } } }; -export const ContainerAppProbeTcpSocket: coreClient.CompositeMapper = { +export const UserAssignedIdentity: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerAppProbeTcpSocket", + className: "UserAssignedIdentity", modelProperties: { - host: { - serializedName: "host", - type: { - name: "String" + principalId: { + serializedName: "principalId", + readOnly: true, + type: { + name: "Uuid" } }, - port: { - serializedName: "port", - required: true, + clientId: { + serializedName: "clientId", + readOnly: true, type: { - name: "Number" + name: "Uuid" } } } } }; -export const Scale: coreClient.CompositeMapper = { +export const Configuration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Scale", + className: "Configuration", modelProperties: { - minReplicas: { - serializedName: "minReplicas", - type: { - name: "Number" - } - }, - maxReplicas: { - serializedName: "maxReplicas", - type: { - name: "Number" - } - }, - rules: { - serializedName: "rules", + secrets: { + serializedName: "secrets", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ScaleRule" + className: "Secret" } } } - } - } - } -}; - -export const ScaleRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ScaleRule", - modelProperties: { - name: { - serializedName: "name", + }, + activeRevisionsMode: { + defaultValue: "Single", + serializedName: "activeRevisionsMode", type: { name: "String" } }, - azureQueue: { - serializedName: "azureQueue", + ingress: { + serializedName: "ingress", type: { name: "Composite", - className: "QueueScaleRule" + className: "Ingress" } }, - custom: { - serializedName: "custom", + registries: { + serializedName: "registries", type: { - name: "Composite", - className: "CustomScaleRule" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RegistryCredentials" + } + } } }, - http: { - serializedName: "http", + dapr: { + serializedName: "dapr", type: { name: "Composite", - className: "HttpScaleRule" + className: "Dapr" } }, - tcp: { - serializedName: "tcp", + maxInactiveRevisions: { + serializedName: "maxInactiveRevisions", + type: { + name: "Number" + } + }, + service: { + serializedName: "service", type: { name: "Composite", - className: "TcpScaleRule" + className: "Service" } } } } }; -export const QueueScaleRule: coreClient.CompositeMapper = { +export const Ingress: coreClient.CompositeMapper = { type: { name: "Composite", - className: "QueueScaleRule", + className: "Ingress", modelProperties: { - queueName: { - serializedName: "queueName", + fqdn: { + serializedName: "fqdn", + readOnly: true, type: { name: "String" } }, - queueLength: { - serializedName: "queueLength", + external: { + defaultValue: false, + serializedName: "external", type: { - name: "Number" + name: "Boolean" } }, - auth: { - serializedName: "auth", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ScaleRuleAuth" - } - } - } - } - } - } -}; - -export const ScaleRuleAuth: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ScaleRuleAuth", - modelProperties: { - secretRef: { - serializedName: "secretRef", + targetPort: { + serializedName: "targetPort", type: { - name: "String" + name: "Number" } }, - triggerParameter: { - serializedName: "triggerParameter", + exposedPort: { + serializedName: "exposedPort", type: { - name: "String" + name: "Number" } - } - } - } -}; - -export const CustomScaleRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CustomScaleRule", - modelProperties: { - type: { - serializedName: "type", + }, + transport: { + defaultValue: "auto", + serializedName: "transport", type: { name: "String" } }, - metadata: { - serializedName: "metadata", + traffic: { + serializedName: "traffic", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TrafficWeight" + } + } } }, - auth: { - serializedName: "auth", + customDomains: { + serializedName: "customDomains", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ScaleRuleAuth" + className: "CustomDomain" } } } - } - } - } -}; - -export const HttpScaleRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HttpScaleRule", - modelProperties: { - metadata: { - serializedName: "metadata", + }, + allowInsecure: { + defaultValue: false, + serializedName: "allowInsecure", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "Boolean" } }, - auth: { - serializedName: "auth", + ipSecurityRestrictions: { + serializedName: "ipSecurityRestrictions", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ScaleRuleAuth" + className: "IpSecurityRestrictionRule" } } } + }, + stickySessions: { + serializedName: "stickySessions", + type: { + name: "Composite", + className: "IngressStickySessions" + } + }, + clientCertificateMode: { + serializedName: "clientCertificateMode", + type: { + name: "String" + } + }, + corsPolicy: { + serializedName: "corsPolicy", + type: { + name: "Composite", + className: "CorsPolicy" + } } } } }; -export const TcpScaleRule: coreClient.CompositeMapper = { +export const TrafficWeight: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TcpScaleRule", + className: "TrafficWeight", modelProperties: { - metadata: { - serializedName: "metadata", + revisionName: { + serializedName: "revisionName", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" } }, - auth: { - serializedName: "auth", + weight: { + serializedName: "weight", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ScaleRuleAuth" - } - } + name: "Number" + } + }, + latestRevision: { + defaultValue: false, + serializedName: "latestRevision", + type: { + name: "Boolean" + } + }, + label: { + serializedName: "label", + type: { + name: "String" } } } } }; -export const Volume: coreClient.CompositeMapper = { +export const CustomDomain: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Volume", + className: "CustomDomain", modelProperties: { name: { serializedName: "name", + required: true, type: { name: "String" } }, - storageType: { - serializedName: "storageType", + bindingType: { + serializedName: "bindingType", type: { name: "String" } }, - storageName: { - serializedName: "storageName", + certificateId: { + serializedName: "certificateId", type: { name: "String" } @@ -2289,64 +2243,65 @@ export const Volume: coreClient.CompositeMapper = { } }; -export const CustomHostnameAnalysisResult: coreClient.CompositeMapper = { +export const IpSecurityRestrictionRule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CustomHostnameAnalysisResult", + className: "IpSecurityRestrictionRule", modelProperties: { - hostName: { - serializedName: "hostName", - readOnly: true, + name: { + serializedName: "name", + required: true, type: { name: "String" } }, - isHostnameAlreadyVerified: { - serializedName: "isHostnameAlreadyVerified", - readOnly: true, - type: { - name: "Boolean" - } - }, - customDomainVerificationTest: { - serializedName: "customDomainVerificationTest", - readOnly: true, - type: { - name: "Enum", - allowedValues: ["Passed", "Failed", "Skipped"] - } - }, - customDomainVerificationFailureInfo: { - serializedName: "customDomainVerificationFailureInfo", + description: { + serializedName: "description", type: { - name: "Composite", - className: - "CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo" + name: "String" } }, - hasConflictOnManagedEnvironment: { - serializedName: "hasConflictOnManagedEnvironment", - readOnly: true, + ipAddressRange: { + serializedName: "ipAddressRange", + required: true, type: { - name: "Boolean" + name: "String" } }, - conflictWithEnvironmentCustomDomain: { - serializedName: "conflictWithEnvironmentCustomDomain", - readOnly: true, + action: { + serializedName: "action", + required: true, type: { - name: "Boolean" + name: "String" } - }, - conflictingContainerAppResourceId: { - serializedName: "conflictingContainerAppResourceId", - readOnly: true, + } + } + } +}; + +export const IngressStickySessions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IngressStickySessions", + modelProperties: { + affinity: { + serializedName: "affinity", type: { name: "String" } - }, - cNameRecords: { - serializedName: "cNameRecords", + } + } + } +}; + +export const CorsPolicy: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CorsPolicy", + modelProperties: { + allowedOrigins: { + serializedName: "allowedOrigins", + required: true, type: { name: "Sequence", element: { @@ -2356,8 +2311,8 @@ export const CustomHostnameAnalysisResult: coreClient.CompositeMapper = { } } }, - txtRecords: { - serializedName: "txtRecords", + allowedMethods: { + serializedName: "allowedMethods", type: { name: "Sequence", element: { @@ -2367,8 +2322,8 @@ export const CustomHostnameAnalysisResult: coreClient.CompositeMapper = { } } }, - aRecords: { - serializedName: "aRecords", + allowedHeaders: { + serializedName: "allowedHeaders", type: { name: "Sequence", element: { @@ -2378,8 +2333,8 @@ export const CustomHostnameAnalysisResult: coreClient.CompositeMapper = { } } }, - alternateCNameRecords: { - serializedName: "alternateCNameRecords", + exposeHeaders: { + serializedName: "exposeHeaders", type: { name: "Sequence", element: { @@ -2389,266 +2344,1449 @@ export const CustomHostnameAnalysisResult: coreClient.CompositeMapper = { } } }, - alternateTxtRecords: { - serializedName: "alternateTxtRecords", + maxAge: { + serializedName: "maxAge", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Number" + } + }, + allowCredentials: { + serializedName: "allowCredentials", + type: { + name: "Boolean" } } } } }; -export const CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo: coreClient.CompositeMapper = { +export const RegistryCredentials: coreClient.CompositeMapper = { type: { name: "Composite", - className: - "CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo", + className: "RegistryCredentials", modelProperties: { - code: { - serializedName: "code", - readOnly: true, + server: { + serializedName: "server", type: { name: "String" } }, - message: { - serializedName: "message", - readOnly: true, + username: { + serializedName: "username", type: { name: "String" } }, - target: { - serializedName: "target", - readOnly: true, + passwordSecretRef: { + serializedName: "passwordSecretRef", type: { name: "String" } }, - details: { - serializedName: "details", + identity: { + serializedName: "identity", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: - "CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem" - } - } + name: "String" } } } } }; -export const CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem: coreClient.CompositeMapper = { +export const Dapr: coreClient.CompositeMapper = { type: { name: "Composite", - className: - "CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem", + className: "Dapr", modelProperties: { - code: { - serializedName: "code", - readOnly: true, + enabled: { + defaultValue: false, + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + appId: { + serializedName: "appId", type: { name: "String" } }, - message: { - serializedName: "message", - readOnly: true, + appProtocol: { + defaultValue: "http", + serializedName: "appProtocol", type: { name: "String" } }, - target: { - serializedName: "target", - readOnly: true, + appPort: { + serializedName: "appPort", + type: { + name: "Number" + } + }, + httpReadBufferSize: { + serializedName: "httpReadBufferSize", + type: { + name: "Number" + } + }, + httpMaxRequestSize: { + serializedName: "httpMaxRequestSize", + type: { + name: "Number" + } + }, + logLevel: { + serializedName: "logLevel", type: { name: "String" } + }, + enableApiLogging: { + serializedName: "enableApiLogging", + type: { + name: "Boolean" + } } } } }; -export const SecretsCollection: coreClient.CompositeMapper = { +export const Service: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SecretsCollection", + className: "Service", modelProperties: { - value: { - serializedName: "value", + type: { + serializedName: "type", required: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ContainerAppSecret" - } - } + name: "String" } } } } }; -export const ContainerAppSecret: coreClient.CompositeMapper = { +export const Template: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerAppSecret", + className: "Template", modelProperties: { - name: { - serializedName: "name", - readOnly: true, + revisionSuffix: { + serializedName: "revisionSuffix", type: { name: "String" } }, - value: { - serializedName: "value", - readOnly: true, + terminationGracePeriodSeconds: { + serializedName: "terminationGracePeriodSeconds", type: { - name: "String" + name: "Number" } - } - } - } -}; - -export const RevisionCollection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RevisionCollection", - modelProperties: { - value: { - serializedName: "value", - required: true, + }, + initContainers: { + serializedName: "initContainers", type: { name: "Sequence", element: { type: { name: "Composite", - className: "Revision" + className: "InitContainer" } } } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + containers: { + serializedName: "containers", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Container" + } + } } - } - } - } -}; - -export const ReplicaContainer: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ReplicaContainer", - modelProperties: { - name: { - serializedName: "name", + }, + scale: { + serializedName: "scale", type: { - name: "String" + name: "Composite", + className: "Scale" } }, - containerId: { - serializedName: "containerId", - type: { + volumes: { + serializedName: "volumes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Volume" + } + } + } + }, + serviceBinds: { + serializedName: "serviceBinds", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServiceBind" + } + } + } + } + } + } +}; + +export const BaseContainer: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BaseContainer", + modelProperties: { + image: { + serializedName: "image", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + command: { + serializedName: "command", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + args: { + serializedName: "args", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + env: { + serializedName: "env", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EnvironmentVar" + } + } + } + }, + resources: { + serializedName: "resources", + type: { + name: "Composite", + className: "ContainerResources" + } + }, + volumeMounts: { + serializedName: "volumeMounts", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VolumeMount" + } + } + } + } + } + } +}; + +export const EnvironmentVar: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EnvironmentVar", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "String" + } + }, + secretRef: { + serializedName: "secretRef", + type: { + name: "String" + } + } + } + } +}; + +export const ContainerResources: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerResources", + modelProperties: { + cpu: { + serializedName: "cpu", + type: { + name: "Number" + } + }, + memory: { + serializedName: "memory", + type: { + name: "String" + } + }, + ephemeralStorage: { + serializedName: "ephemeralStorage", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const VolumeMount: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VolumeMount", + modelProperties: { + volumeName: { + serializedName: "volumeName", + type: { + name: "String" + } + }, + mountPath: { + serializedName: "mountPath", + type: { + name: "String" + } + }, + subPath: { + serializedName: "subPath", + type: { + name: "String" + } + } + } + } +}; + +export const ContainerAppProbe: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerAppProbe", + modelProperties: { + failureThreshold: { + serializedName: "failureThreshold", + type: { + name: "Number" + } + }, + httpGet: { + serializedName: "httpGet", + type: { + name: "Composite", + className: "ContainerAppProbeHttpGet" + } + }, + initialDelaySeconds: { + serializedName: "initialDelaySeconds", + type: { + name: "Number" + } + }, + periodSeconds: { + serializedName: "periodSeconds", + type: { + name: "Number" + } + }, + successThreshold: { + serializedName: "successThreshold", + type: { + name: "Number" + } + }, + tcpSocket: { + serializedName: "tcpSocket", + type: { + name: "Composite", + className: "ContainerAppProbeTcpSocket" + } + }, + terminationGracePeriodSeconds: { + serializedName: "terminationGracePeriodSeconds", + type: { + name: "Number" + } + }, + timeoutSeconds: { + serializedName: "timeoutSeconds", + type: { + name: "Number" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const ContainerAppProbeHttpGet: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerAppProbeHttpGet", + modelProperties: { + host: { + serializedName: "host", + type: { + name: "String" + } + }, + httpHeaders: { + serializedName: "httpHeaders", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContainerAppProbeHttpGetHttpHeadersItem" + } + } + } + }, + path: { + serializedName: "path", + type: { + name: "String" + } + }, + port: { + serializedName: "port", + required: true, + type: { + name: "Number" + } + }, + scheme: { + serializedName: "scheme", + type: { + name: "String" + } + } + } + } +}; + +export const ContainerAppProbeHttpGetHttpHeadersItem: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerAppProbeHttpGetHttpHeadersItem", + modelProperties: { + name: { + serializedName: "name", + required: true, + type: { + name: "String" + } + }, + value: { + serializedName: "value", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ContainerAppProbeTcpSocket: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerAppProbeTcpSocket", + modelProperties: { + host: { + serializedName: "host", + type: { + name: "String" + } + }, + port: { + serializedName: "port", + required: true, + type: { + name: "Number" + } + } + } + } +}; + +export const Scale: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Scale", + modelProperties: { + minReplicas: { + serializedName: "minReplicas", + type: { + name: "Number" + } + }, + maxReplicas: { + defaultValue: 10, + serializedName: "maxReplicas", + type: { + name: "Number" + } + }, + rules: { + serializedName: "rules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScaleRule" + } + } + } + } + } + } +}; + +export const ScaleRule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ScaleRule", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + azureQueue: { + serializedName: "azureQueue", + type: { + name: "Composite", + className: "QueueScaleRule" + } + }, + custom: { + serializedName: "custom", + type: { + name: "Composite", + className: "CustomScaleRule" + } + }, + http: { + serializedName: "http", + type: { + name: "Composite", + className: "HttpScaleRule" + } + }, + tcp: { + serializedName: "tcp", + type: { + name: "Composite", + className: "TcpScaleRule" + } + } + } + } +}; + +export const QueueScaleRule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "QueueScaleRule", + modelProperties: { + queueName: { + serializedName: "queueName", + type: { + name: "String" + } + }, + queueLength: { + serializedName: "queueLength", + type: { + name: "Number" + } + }, + auth: { + serializedName: "auth", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScaleRuleAuth" + } + } + } + } + } + } +}; + +export const ScaleRuleAuth: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ScaleRuleAuth", + modelProperties: { + secretRef: { + serializedName: "secretRef", + type: { + name: "String" + } + }, + triggerParameter: { + serializedName: "triggerParameter", + type: { + name: "String" + } + } + } + } +}; + +export const CustomScaleRule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CustomScaleRule", + modelProperties: { + type: { + serializedName: "type", + type: { + name: "String" + } + }, + metadata: { + serializedName: "metadata", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + auth: { + serializedName: "auth", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScaleRuleAuth" + } + } + } + } + } + } +}; + +export const HttpScaleRule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HttpScaleRule", + modelProperties: { + metadata: { + serializedName: "metadata", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + auth: { + serializedName: "auth", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScaleRuleAuth" + } + } + } + } + } + } +}; + +export const TcpScaleRule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TcpScaleRule", + modelProperties: { + metadata: { + serializedName: "metadata", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + auth: { + serializedName: "auth", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScaleRuleAuth" + } + } + } + } + } + } +}; + +export const Volume: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Volume", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + storageType: { + serializedName: "storageType", + type: { + name: "String" + } + }, + storageName: { + serializedName: "storageName", + type: { + name: "String" + } + }, + secrets: { + serializedName: "secrets", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SecretVolumeItem" + } + } + } + }, + mountOptions: { + serializedName: "mountOptions", + type: { + name: "String" + } + } + } + } +}; + +export const SecretVolumeItem: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SecretVolumeItem", + modelProperties: { + secretRef: { + serializedName: "secretRef", + type: { + name: "String" + } + }, + path: { + serializedName: "path", + type: { + name: "String" + } + } + } + } +}; + +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", + className: "CustomHostnameAnalysisResult", + modelProperties: { + hostName: { + serializedName: "hostName", + readOnly: true, + type: { + name: "String" + } + }, + isHostnameAlreadyVerified: { + serializedName: "isHostnameAlreadyVerified", + readOnly: true, + type: { + name: "Boolean" + } + }, + customDomainVerificationTest: { + serializedName: "customDomainVerificationTest", + readOnly: true, + type: { + name: "Enum", + allowedValues: ["Passed", "Failed", "Skipped"] + } + }, + customDomainVerificationFailureInfo: { + serializedName: "customDomainVerificationFailureInfo", + type: { + name: "Composite", + className: + "CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo" + } + }, + hasConflictOnManagedEnvironment: { + serializedName: "hasConflictOnManagedEnvironment", + readOnly: true, + type: { + name: "Boolean" + } + }, + conflictWithEnvironmentCustomDomain: { + serializedName: "conflictWithEnvironmentCustomDomain", + readOnly: true, + type: { + name: "Boolean" + } + }, + conflictingContainerAppResourceId: { + serializedName: "conflictingContainerAppResourceId", + readOnly: true, + type: { + name: "String" + } + }, + cNameRecords: { + serializedName: "cNameRecords", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + txtRecords: { + serializedName: "txtRecords", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + aRecords: { + serializedName: "aRecords", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + alternateCNameRecords: { + serializedName: "alternateCNameRecords", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + alternateTxtRecords: { + serializedName: "alternateTxtRecords", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: + "CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String" + } + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String" + } + }, + details: { + serializedName: "details", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: + "CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem" + } + } + } + } + } + } +}; + +export const CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: + "CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String" + } + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const SecretsCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SecretsCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContainerAppSecret" + } + } + } + } + } + } +}; + +export const ContainerAppSecret: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerAppSecret", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + value: { + serializedName: "value", + readOnly: true, + type: { + name: "String" + } + }, + identity: { + serializedName: "identity", + readOnly: true, + type: { + name: "String" + } + }, + keyVaultUrl: { + serializedName: "keyVaultUrl", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const RevisionCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RevisionCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Revision" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ReplicaContainer: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ReplicaContainer", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + containerId: { + serializedName: "containerId", + type: { + name: "String" + } + }, + ready: { + serializedName: "ready", + type: { + name: "Boolean" + } + }, + started: { + serializedName: "started", + type: { + name: "Boolean" + } + }, + restartCount: { + serializedName: "restartCount", + type: { + name: "Number" + } + }, + runningState: { + serializedName: "runningState", + readOnly: true, + type: { + name: "String" + } + }, + runningStateDetails: { + serializedName: "runningStateDetails", + readOnly: true, + type: { + name: "String" + } + }, + logStreamEndpoint: { + serializedName: "logStreamEndpoint", + readOnly: true, + type: { + name: "String" + } + }, + execEndpoint: { + serializedName: "execEndpoint", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ReplicaCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ReplicaCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Replica" + } + } + } + } + } + } +}; + +export const DiagnosticsCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiagnosticsCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Diagnostics" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const DiagnosticsProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiagnosticsProperties", + modelProperties: { + metadata: { + serializedName: "metadata", + type: { + name: "Composite", + className: "DiagnosticsDefinition" + } + }, + dataset: { + serializedName: "dataset", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DiagnosticsDataApiResponse" + } + } + } + }, + status: { + serializedName: "status", + type: { + name: "Composite", + className: "DiagnosticsStatus" + } + }, + dataProviderMetadata: { + serializedName: "dataProviderMetadata", + type: { + name: "Composite", + className: "DiagnosticDataProviderMetadata" + } + } + } + } +}; + +export const DiagnosticsDefinition: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiagnosticsDefinition", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { name: "String" } }, - ready: { - serializedName: "ready", + name: { + serializedName: "name", + readOnly: true, type: { - name: "Boolean" + name: "String" } }, - started: { - serializedName: "started", + description: { + serializedName: "description", + readOnly: true, type: { - name: "Boolean" + name: "String" } }, - restartCount: { - serializedName: "restartCount", + author: { + serializedName: "author", + readOnly: true, type: { - name: "Number" + name: "String" } }, - logStreamEndpoint: { - serializedName: "logStreamEndpoint", + category: { + serializedName: "category", readOnly: true, type: { name: "String" } }, - execEndpoint: { - serializedName: "execEndpoint", + supportTopicList: { + serializedName: "supportTopicList", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DiagnosticSupportTopic" + } + } + } + }, + analysisTypes: { + serializedName: "analysisTypes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + type: { + serializedName: "type", readOnly: true, type: { name: "String" } + }, + score: { + serializedName: "score", + readOnly: true, + type: { + name: "Number" + } } } } }; -export const ReplicaCollection: coreClient.CompositeMapper = { +export const DiagnosticSupportTopic: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ReplicaCollection", + className: "DiagnosticSupportTopic", modelProperties: { - value: { - serializedName: "value", - required: true, + id: { + serializedName: "id", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Replica" - } - } + name: "String" + } + }, + pesId: { + serializedName: "pesId", + readOnly: true, + type: { + name: "String" } } } } }; -export const DaprComponentsCollection: coreClient.CompositeMapper = { +export const DiagnosticsDataApiResponse: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DaprComponentsCollection", + className: "DiagnosticsDataApiResponse", modelProperties: { - value: { - serializedName: "value", - required: true, + table: { + serializedName: "table", + type: { + name: "Composite", + className: "DiagnosticDataTableResponseObject" + } + }, + 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" + } + }, + columns: { + serializedName: "columns", type: { name: "Sequence", element: { type: { name: "Composite", - className: "DaprComponent" + className: "DiagnosticDataTableResponseColumn" } } } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + rows: { + serializedName: "rows", + type: { + name: "Sequence", + element: { + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } + } + } + } + } +}; + +export const DiagnosticDataTableResponseColumn: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiagnosticDataTableResponseColumn", + modelProperties: { + columnName: { + serializedName: "columnName", + type: { + name: "String" + } + }, + dataType: { + serializedName: "dataType", + type: { + name: "String" + } + }, + columnType: { + serializedName: "columnType", type: { name: "String" } @@ -2657,47 +3795,79 @@ export const DaprComponentsCollection: coreClient.CompositeMapper = { } }; -export const DaprMetadata: coreClient.CompositeMapper = { +export const DiagnosticRendering: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DaprMetadata", + className: "DiagnosticRendering", modelProperties: { - name: { - serializedName: "name", + type: { + serializedName: "type", + type: { + name: "Number" + } + }, + title: { + serializedName: "title", type: { name: "String" } }, - value: { - serializedName: "value", + description: { + serializedName: "description", + type: { + name: "String" + } + }, + isVisible: { + serializedName: "isVisible", + type: { + name: "Boolean" + } + } + } + } +}; + +export const DiagnosticsStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiagnosticsStatus", + modelProperties: { + message: { + serializedName: "message", type: { name: "String" } }, - secretRef: { - serializedName: "secretRef", + statusId: { + serializedName: "statusId", type: { - name: "String" + name: "Number" } } } } }; -export const DaprSecretsCollection: coreClient.CompositeMapper = { +export const DiagnosticDataProviderMetadata: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DaprSecretsCollection", + 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: "Secret" + className: "DiagnosticDataProviderMetadataPropertyBagItem" } } } @@ -2706,27 +3876,19 @@ export const DaprSecretsCollection: coreClient.CompositeMapper = { } }; -export const DiagnosticsCollection: coreClient.CompositeMapper = { +export const DiagnosticDataProviderMetadataPropertyBagItem: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticsCollection", + className: "DiagnosticDataProviderMetadataPropertyBagItem", modelProperties: { - value: { - serializedName: "value", - required: true, + name: { + serializedName: "name", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Diagnostics" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + value: { + serializedName: "value", type: { name: "String" } @@ -2735,121 +3897,115 @@ export const DiagnosticsCollection: coreClient.CompositeMapper = { } }; -export const DiagnosticsProperties: coreClient.CompositeMapper = { +export const VnetConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticsProperties", + className: "VnetConfiguration", modelProperties: { - metadata: { - serializedName: "metadata", + internal: { + serializedName: "internal", type: { - name: "Composite", - className: "DiagnosticsDefinition" + name: "Boolean" } }, - dataset: { - serializedName: "dataset", + infrastructureSubnetId: { + serializedName: "infrastructureSubnetId", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DiagnosticsDataApiResponse" - } - } + name: "String" } }, - status: { - serializedName: "status", + dockerBridgeCidr: { + serializedName: "dockerBridgeCidr", type: { - name: "Composite", - className: "DiagnosticsStatus" + name: "String" } }, - dataProviderMetadata: { - serializedName: "dataProviderMetadata", + platformReservedCidr: { + serializedName: "platformReservedCidr", type: { - name: "Composite", - className: "DiagnosticDataProviderMetadata" + name: "String" + } + }, + platformReservedDnsIP: { + serializedName: "platformReservedDnsIP", + type: { + name: "String" } } } } }; -export const DiagnosticsDefinition: coreClient.CompositeMapper = { +export const AppLogsConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticsDefinition", + className: "AppLogsConfiguration", modelProperties: { - id: { - serializedName: "id", - readOnly: true, + destination: { + serializedName: "destination", type: { name: "String" } }, - name: { - serializedName: "name", - readOnly: true, + logAnalyticsConfiguration: { + serializedName: "logAnalyticsConfiguration", type: { - name: "String" + name: "Composite", + className: "LogAnalyticsConfiguration" } - }, - description: { - serializedName: "description", - readOnly: true, + } + } + } +}; + +export const LogAnalyticsConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LogAnalyticsConfiguration", + modelProperties: { + customerId: { + serializedName: "customerId", type: { name: "String" } }, - author: { - serializedName: "author", - readOnly: true, + sharedKey: { + serializedName: "sharedKey", type: { name: "String" } - }, - category: { - serializedName: "category", - readOnly: true, + } + } + } +}; + +export const WorkloadProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WorkloadProfile", + modelProperties: { + name: { + serializedName: "name", + required: true, type: { name: "String" } }, - supportTopicList: { - serializedName: "supportTopicList", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DiagnosticSupportTopic" - } - } - } - }, - analysisTypes: { - serializedName: "analysisTypes", + workloadProfileType: { + serializedName: "workloadProfileType", + required: true, type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } }, - type: { - serializedName: "type", - readOnly: true, + minimumCount: { + serializedName: "minimumCount", type: { - name: "String" + name: "Number" } }, - score: { - serializedName: "score", - readOnly: true, + maximumCount: { + serializedName: "maximumCount", type: { name: "Number" } @@ -2858,20 +4014,29 @@ export const DiagnosticsDefinition: coreClient.CompositeMapper = { } }; -export const DiagnosticSupportTopic: coreClient.CompositeMapper = { +export const KedaConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticSupportTopic", + className: "KedaConfiguration", modelProperties: { - id: { - serializedName: "id", + version: { + serializedName: "version", readOnly: true, type: { name: "String" } - }, - pesId: { - serializedName: "pesId", + } + } + } +}; + +export const DaprConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DaprConfiguration", + modelProperties: { + version: { + serializedName: "version", readOnly: true, type: { name: "String" @@ -2881,87 +4046,56 @@ export const DiagnosticSupportTopic: coreClient.CompositeMapper = { } }; -export const DiagnosticsDataApiResponse: coreClient.CompositeMapper = { +export const ManagedEnvironmentPropertiesPeerAuthentication: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticsDataApiResponse", + className: "ManagedEnvironmentPropertiesPeerAuthentication", modelProperties: { - table: { - serializedName: "table", - type: { - name: "Composite", - className: "DiagnosticDataTableResponseObject" - } - }, - renderingProperties: { - serializedName: "renderingProperties", + mtls: { + serializedName: "mtls", type: { name: "Composite", - className: "DiagnosticRendering" + className: "Mtls" } } } } }; -export const DiagnosticDataTableResponseObject: coreClient.CompositeMapper = { +export const Mtls: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticDataTableResponseObject", + className: "Mtls", modelProperties: { - tableName: { - serializedName: "tableName", - type: { - name: "String" - } - }, - columns: { - serializedName: "columns", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DiagnosticDataTableResponseColumn" - } - } - } - }, - rows: { - serializedName: "rows", + enabled: { + serializedName: "enabled", type: { - name: "Sequence", - element: { - type: { - name: "Dictionary", - value: { type: { name: "any" } } - } - } + name: "Boolean" } } } } }; -export const DiagnosticDataTableResponseColumn: coreClient.CompositeMapper = { +export const AvailableOperations: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticDataTableResponseColumn", + className: "AvailableOperations", modelProperties: { - columnName: { - serializedName: "columnName", - type: { - name: "String" - } - }, - dataType: { - serializedName: "dataType", + value: { + serializedName: "value", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OperationDetail" + } + } } }, - columnType: { - serializedName: "columnType", + nextLink: { + serializedName: "nextLink", type: { name: "String" } @@ -2970,100 +4104,65 @@ export const DiagnosticDataTableResponseColumn: coreClient.CompositeMapper = { } }; -export const DiagnosticRendering: coreClient.CompositeMapper = { +export const OperationDetail: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticRendering", + className: "OperationDetail", modelProperties: { - type: { - serializedName: "type", + name: { + serializedName: "name", type: { - name: "Number" + name: "String" } }, - title: { - serializedName: "title", + isDataAction: { + serializedName: "isDataAction", type: { - name: "String" + name: "Boolean" } }, - description: { - serializedName: "description", + display: { + serializedName: "display", type: { - name: "String" + name: "Composite", + className: "OperationDisplay" } }, - isVisible: { - serializedName: "isVisible", + origin: { + serializedName: "origin", type: { - name: "Boolean" + name: "String" } } } } }; -export const DiagnosticsStatus: coreClient.CompositeMapper = { +export const OperationDisplay: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticsStatus", + className: "OperationDisplay", modelProperties: { - message: { - serializedName: "message", + provider: { + serializedName: "provider", type: { name: "String" } }, - statusId: { - serializedName: "statusId", - type: { - name: "Number" - } - } - } - } -}; - -export const DiagnosticDataProviderMetadata: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DiagnosticDataProviderMetadata", - modelProperties: { - providerName: { - serializedName: "providerName", + resource: { + serializedName: "resource", type: { name: "String" } }, - propertyBag: { - serializedName: "propertyBag", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DiagnosticDataProviderMetadataPropertyBagItem" - } - } - } - } - } - } -}; - -export const DiagnosticDataProviderMetadataPropertyBagItem: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DiagnosticDataProviderMetadataPropertyBagItem", - modelProperties: { - name: { - serializedName: "name", + operation: { + serializedName: "operation", type: { name: "String" } }, - value: { - serializedName: "value", + description: { + serializedName: "description", type: { name: "String" } @@ -3072,14 +4171,27 @@ export const DiagnosticDataProviderMetadataPropertyBagItem: coreClient.Composite } }; -export const EnvironmentSkuProperties: coreClient.CompositeMapper = { +export const JobsCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "EnvironmentSkuProperties", + className: "JobsCollection", modelProperties: { - name: { - serializedName: "name", + value: { + serializedName: "value", required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Job" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String" } @@ -3088,322 +4200,352 @@ export const EnvironmentSkuProperties: coreClient.CompositeMapper = { } }; -export const VnetConfiguration: coreClient.CompositeMapper = { +export const JobConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VnetConfiguration", + className: "JobConfiguration", modelProperties: { - internal: { - serializedName: "internal", + secrets: { + serializedName: "secrets", type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Secret" + } + } } }, - infrastructureSubnetId: { - serializedName: "infrastructureSubnetId", + triggerType: { + defaultValue: "Manual", + serializedName: "triggerType", + required: true, type: { name: "String" } }, - runtimeSubnetId: { - serializedName: "runtimeSubnetId", + replicaTimeout: { + serializedName: "replicaTimeout", + required: true, type: { - name: "String" + name: "Number" } }, - dockerBridgeCidr: { - serializedName: "dockerBridgeCidr", + replicaRetryLimit: { + serializedName: "replicaRetryLimit", type: { - name: "String" + name: "Number" } }, - platformReservedCidr: { - serializedName: "platformReservedCidr", + manualTriggerConfig: { + serializedName: "manualTriggerConfig", type: { - name: "String" + name: "Composite", + className: "JobConfigurationManualTriggerConfig" } }, - platformReservedDnsIP: { - serializedName: "platformReservedDnsIP", + scheduleTriggerConfig: { + serializedName: "scheduleTriggerConfig", type: { - name: "String" + name: "Composite", + className: "JobConfigurationScheduleTriggerConfig" } }, - outboundSettings: { - serializedName: "outboundSettings", + eventTriggerConfig: { + serializedName: "eventTriggerConfig", type: { name: "Composite", - className: "ManagedEnvironmentOutboundSettings" + className: "JobConfigurationEventTriggerConfig" + } + }, + registries: { + serializedName: "registries", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RegistryCredentials" + } + } } } } } }; -export const ManagedEnvironmentOutboundSettings: coreClient.CompositeMapper = { +export const JobConfigurationManualTriggerConfig: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedEnvironmentOutboundSettings", + className: "JobConfigurationManualTriggerConfig", modelProperties: { - outBoundType: { - serializedName: "outBoundType", + replicaCompletionCount: { + serializedName: "replicaCompletionCount", type: { - name: "String" + name: "Number" } }, - virtualNetworkApplianceIp: { - serializedName: "virtualNetworkApplianceIp", + parallelism: { + serializedName: "parallelism", type: { - name: "String" + name: "Number" } } } } }; -export const AppLogsConfiguration: coreClient.CompositeMapper = { +export const JobConfigurationScheduleTriggerConfig: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AppLogsConfiguration", + className: "JobConfigurationScheduleTriggerConfig", modelProperties: { - destination: { - serializedName: "destination", + replicaCompletionCount: { + serializedName: "replicaCompletionCount", + type: { + name: "Number" + } + }, + cronExpression: { + serializedName: "cronExpression", + required: true, type: { name: "String" } }, - logAnalyticsConfiguration: { - serializedName: "logAnalyticsConfiguration", + parallelism: { + serializedName: "parallelism", type: { - name: "Composite", - className: "LogAnalyticsConfiguration" + name: "Number" } } } } }; -export const LogAnalyticsConfiguration: coreClient.CompositeMapper = { +export const JobConfigurationEventTriggerConfig: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LogAnalyticsConfiguration", + className: "JobConfigurationEventTriggerConfig", modelProperties: { - customerId: { - serializedName: "customerId", + replicaCompletionCount: { + serializedName: "replicaCompletionCount", type: { - name: "String" + name: "Number" } }, - sharedKey: { - serializedName: "sharedKey", + parallelism: { + serializedName: "parallelism", type: { - name: "String" + name: "Number" + } + }, + scale: { + serializedName: "scale", + type: { + name: "Composite", + className: "JobScale" } } } } }; -export const CustomDomainConfiguration: coreClient.CompositeMapper = { +export const JobScale: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CustomDomainConfiguration", + className: "JobScale", modelProperties: { - customDomainVerificationId: { - serializedName: "customDomainVerificationId", - readOnly: true, - type: { - name: "String" - } - }, - dnsSuffix: { - serializedName: "dnsSuffix", - type: { - name: "String" - } - }, - certificateValue: { - serializedName: "certificateValue", + pollingInterval: { + serializedName: "pollingInterval", type: { - name: "ByteArray" - } - }, - certificatePassword: { - serializedName: "certificatePassword", - type: { - name: "ByteArray" + name: "Number" } }, - expirationDate: { - serializedName: "expirationDate", - readOnly: true, + minExecutions: { + defaultValue: 0, + serializedName: "minExecutions", type: { - name: "DateTime" + name: "Number" } }, - thumbprint: { - serializedName: "thumbprint", - readOnly: true, + maxExecutions: { + defaultValue: 100, + serializedName: "maxExecutions", type: { - name: "String" + name: "Number" } }, - subjectName: { - serializedName: "subjectName", - readOnly: true, + rules: { + serializedName: "rules", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JobScaleRule" + } + } } } } } }; -export const WorkloadProfile: coreClient.CompositeMapper = { +export const JobScaleRule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "WorkloadProfile", + className: "JobScaleRule", modelProperties: { - workloadProfileType: { - serializedName: "workloadProfileType", - required: true, + name: { + serializedName: "name", type: { name: "String" } }, - minimumCount: { - serializedName: "minimumCount", - required: true, + type: { + serializedName: "type", + type: { + name: "String" + } + }, + metadata: { + serializedName: "metadata", type: { - name: "Number" + name: "Dictionary", + value: { type: { name: "any" } } } }, - maximumCount: { - serializedName: "maximumCount", - required: true, + auth: { + serializedName: "auth", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScaleRuleAuth" + } + } } } } } }; -export const AvailableOperations: coreClient.CompositeMapper = { +export const JobTemplate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AvailableOperations", + className: "JobTemplate", modelProperties: { - value: { - serializedName: "value", + initContainers: { + serializedName: "initContainers", type: { name: "Sequence", element: { type: { name: "Composite", - className: "OperationDetail" + className: "InitContainer" } } } }, - nextLink: { - serializedName: "nextLink", + containers: { + serializedName: "containers", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Container" + } + } + } + }, + volumes: { + serializedName: "volumes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Volume" + } + } } } } } }; -export const OperationDetail: coreClient.CompositeMapper = { +export const JobPatchProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationDetail", + className: "JobPatchProperties", modelProperties: { - name: { - serializedName: "name", + identity: { + serializedName: "identity", type: { - name: "String" + name: "Composite", + className: "ManagedServiceIdentity" } }, - isDataAction: { - serializedName: "isDataAction", + tags: { + serializedName: "tags", type: { - name: "Boolean" + name: "Dictionary", + value: { type: { name: "String" } } } }, - display: { - serializedName: "display", + properties: { + serializedName: "properties", type: { name: "Composite", - className: "OperationDisplay" - } - }, - origin: { - serializedName: "origin", - type: { - name: "String" + className: "JobPatchPropertiesProperties" } } } } }; -export const OperationDisplay: coreClient.CompositeMapper = { +export const JobPatchPropertiesProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationDisplay", + className: "JobPatchPropertiesProperties", modelProperties: { - provider: { - serializedName: "provider", + environmentId: { + serializedName: "environmentId", type: { name: "String" } }, - resource: { - serializedName: "resource", + configuration: { + serializedName: "configuration", type: { - name: "String" + name: "Composite", + className: "JobConfiguration" } }, - operation: { - serializedName: "operation", + template: { + serializedName: "template", type: { - name: "String" + name: "Composite", + className: "JobTemplate" } }, - description: { - serializedName: "description", - type: { - name: "String" - } - } - } - } -}; - -export const ManagedEnvironmentsCollection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedEnvironmentsCollection", - modelProperties: { - value: { - serializedName: "value", - required: true, + outboundIpAddresses: { + serializedName: "outboundIpAddresses", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "ManagedEnvironment" + name: "String" } } } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + eventStreamEndpoint: { + serializedName: "eventStreamEndpoint", type: { name: "String" } @@ -3412,63 +4554,58 @@ export const ManagedEnvironmentsCollection: coreClient.CompositeMapper = { } }; -export const CertificateCollection: coreClient.CompositeMapper = { +export const JobExecutionTemplate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CertificateCollection", + className: "JobExecutionTemplate", modelProperties: { - value: { - serializedName: "value", - required: true, + containers: { + serializedName: "containers", type: { name: "Sequence", element: { type: { name: "Composite", - className: "Certificate" + className: "JobExecutionContainer" } } } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + initContainers: { + serializedName: "initContainers", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JobExecutionContainer" + } + } } } } } }; -export const CertificateProperties: coreClient.CompositeMapper = { +export const JobExecutionContainer: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CertificateProperties", + className: "JobExecutionContainer", modelProperties: { - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String" - } - }, - password: { - serializedName: "password", + image: { + serializedName: "image", type: { name: "String" } }, - subjectName: { - serializedName: "subjectName", - readOnly: true, + name: { + serializedName: "name", type: { name: "String" } }, - subjectAlternativeNames: { - serializedName: "subjectAlternativeNames", - readOnly: true, + command: { + serializedName: "command", type: { name: "Sequence", element: { @@ -3478,114 +4615,53 @@ export const CertificateProperties: coreClient.CompositeMapper = { } } }, - value: { - serializedName: "value", - type: { - name: "ByteArray" - } - }, - issuer: { - serializedName: "issuer", - readOnly: true, - type: { - name: "String" - } - }, - issueDate: { - serializedName: "issueDate", - readOnly: true, - type: { - name: "DateTime" - } - }, - expirationDate: { - serializedName: "expirationDate", - readOnly: true, - type: { - name: "DateTime" - } - }, - thumbprint: { - serializedName: "thumbprint", - readOnly: true, - type: { - name: "String" - } - }, - valid: { - serializedName: "valid", - readOnly: true, + args: { + serializedName: "args", type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - publicKeyHash: { - serializedName: "publicKeyHash", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const CertificatePatch: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CertificatePatch", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - } - } - } -}; - -export const CheckNameAvailabilityRequest: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CheckNameAvailabilityRequest", - modelProperties: { - name: { - serializedName: "name", + env: { + serializedName: "env", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EnvironmentVar" + } + } } }, - type: { - serializedName: "type", + resources: { + serializedName: "resources", type: { - name: "String" + name: "Composite", + className: "ContainerResources" } } } } }; -export const CheckNameAvailabilityResponse: coreClient.CompositeMapper = { +export const JobExecutionBase: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CheckNameAvailabilityResponse", + className: "JobExecutionBase", modelProperties: { - nameAvailable: { - serializedName: "nameAvailable", - type: { - name: "Boolean" - } - }, - reason: { - serializedName: "reason", + name: { + serializedName: "name", type: { name: "String" } }, - message: { - serializedName: "message", + id: { + serializedName: "id", type: { name: "String" } @@ -3594,10 +4670,10 @@ export const CheckNameAvailabilityResponse: coreClient.CompositeMapper = { } }; -export const WorkloadProfileStatesCollection: coreClient.CompositeMapper = { +export const ContainerAppJobExecutions: coreClient.CompositeMapper = { type: { name: "Composite", - className: "WorkloadProfileStatesCollection", + className: "ContainerAppJobExecutions", modelProperties: { value: { serializedName: "value", @@ -3607,7 +4683,7 @@ export const WorkloadProfileStatesCollection: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "WorkloadProfileStates" + className: "JobExecution" } } } @@ -3623,37 +4699,63 @@ export const WorkloadProfileStatesCollection: coreClient.CompositeMapper = { } }; -export const WorkloadProfileStatesProperties: coreClient.CompositeMapper = { +export const JobExecution: coreClient.CompositeMapper = { type: { name: "Composite", - className: "WorkloadProfileStatesProperties", + className: "JobExecution", modelProperties: { - minimumCount: { - serializedName: "minimumCount", + name: { + serializedName: "name", type: { - name: "Number" + name: "String" } }, - maximumCount: { - serializedName: "maximumCount", + id: { + serializedName: "id", type: { - name: "Number" + name: "String" } }, - currentCount: { - serializedName: "currentCount", + type: { + serializedName: "type", type: { - name: "Number" + name: "String" + } + }, + status: { + serializedName: "status", + readOnly: true, + type: { + name: "String" + } + }, + startTime: { + serializedName: "startTime", + type: { + name: "DateTime" + } + }, + endTime: { + serializedName: "endTime", + type: { + name: "DateTime" + } + }, + template: { + serializedName: "template", + type: { + name: "Composite", + className: "JobExecutionTemplate" } } } } }; -export const ManagedEnvironmentStoragesCollection: coreClient.CompositeMapper = { +export const JobSecretsCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedEnvironmentStoragesCollection", + className: "JobSecretsCollection", modelProperties: { value: { serializedName: "value", @@ -3663,7 +4765,7 @@ export const ManagedEnvironmentStoragesCollection: coreClient.CompositeMapper = element: { type: { name: "Composite", - className: "ManagedEnvironmentStorage" + className: "Secret" } } } @@ -3672,59 +4774,10 @@ export const ManagedEnvironmentStoragesCollection: coreClient.CompositeMapper = } }; -export const ManagedEnvironmentStorageProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedEnvironmentStorageProperties", - modelProperties: { - azureFile: { - serializedName: "azureFile", - type: { - name: "Composite", - className: "AzureFileProperties" - } - } - } - } -}; - -export const AzureFileProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureFileProperties", - modelProperties: { - accountName: { - serializedName: "accountName", - type: { - name: "String" - } - }, - accountKey: { - serializedName: "accountKey", - type: { - name: "String" - } - }, - accessMode: { - serializedName: "accessMode", - type: { - name: "String" - } - }, - shareName: { - serializedName: "shareName", - type: { - name: "String" - } - } - } - } -}; - -export const SourceControlCollection: coreClient.CompositeMapper = { +export const ManagedEnvironmentsCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SourceControlCollection", + className: "ManagedEnvironmentsCollection", modelProperties: { value: { serializedName: "value", @@ -3734,7 +4787,7 @@ export const SourceControlCollection: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "SourceControl" + className: "ManagedEnvironment" } } } @@ -3750,57 +4803,40 @@ export const SourceControlCollection: coreClient.CompositeMapper = { } }; -export const GithubActionConfiguration: coreClient.CompositeMapper = { +export const ManagedCertificateProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GithubActionConfiguration", + className: "ManagedCertificateProperties", modelProperties: { - registryInfo: { - serializedName: "registryInfo", - type: { - name: "Composite", - className: "RegistryInfo" - } - }, - azureCredentials: { - serializedName: "azureCredentials", - type: { - name: "Composite", - className: "AzureCredentials" - } - }, - contextPath: { - serializedName: "contextPath", - type: { - name: "String" - } - }, - image: { - serializedName: "image", + provisioningState: { + serializedName: "provisioningState", + readOnly: true, type: { name: "String" } }, - publishType: { - serializedName: "publishType", + subjectName: { + serializedName: "subjectName", type: { name: "String" } }, - os: { - serializedName: "os", + error: { + serializedName: "error", + readOnly: true, type: { name: "String" } }, - runtimeStack: { - serializedName: "runtimeStack", + domainControlValidation: { + serializedName: "domainControlValidation", type: { name: "String" } }, - runtimeVersion: { - serializedName: "runtimeVersion", + validationToken: { + serializedName: "validationToken", + readOnly: true, type: { name: "String" } @@ -3809,58 +4845,43 @@ export const GithubActionConfiguration: coreClient.CompositeMapper = { } }; -export const RegistryInfo: coreClient.CompositeMapper = { +export const ManagedCertificatePatch: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RegistryInfo", + className: "ManagedCertificatePatch", modelProperties: { - registryUrl: { - serializedName: "registryUrl", - type: { - name: "String" - } - }, - registryUserName: { - serializedName: "registryUserName", - type: { - name: "String" - } - }, - registryPassword: { - serializedName: "registryPassword", + tags: { + serializedName: "tags", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } } } } } }; -export const AzureCredentials: coreClient.CompositeMapper = { +export const ManagedCertificateCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AzureCredentials", + className: "ManagedCertificateCollection", modelProperties: { - clientId: { - serializedName: "clientId", - type: { - name: "String" - } - }, - clientSecret: { - serializedName: "clientSecret", - type: { - name: "String" - } - }, - tenantId: { - serializedName: "tenantId", + value: { + serializedName: "value", + required: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedCertificate" + } + } } }, - subscriptionId: { - serializedName: "subscriptionId", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String" } @@ -3869,19 +4890,20 @@ export const AzureCredentials: coreClient.CompositeMapper = { } }; -export const ConnectedEnvironmentCollection: coreClient.CompositeMapper = { +export const WorkloadProfileStatesCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ConnectedEnvironmentCollection", + className: "WorkloadProfileStatesCollection", modelProperties: { value: { serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "ConnectedEnvironment" + className: "WorkloadProfileStates" } } } @@ -3897,10 +4919,37 @@ export const ConnectedEnvironmentCollection: coreClient.CompositeMapper = { } }; -export const ConnectedEnvironmentStoragesCollection: coreClient.CompositeMapper = { +export const WorkloadProfileStatesProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ConnectedEnvironmentStoragesCollection", + className: "WorkloadProfileStatesProperties", + modelProperties: { + minimumCount: { + serializedName: "minimumCount", + type: { + name: "Number" + } + }, + maximumCount: { + serializedName: "maximumCount", + type: { + name: "Number" + } + }, + currentCount: { + serializedName: "currentCount", + type: { + name: "Number" + } + } + } + } +}; + +export const ManagedEnvironmentStoragesCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedEnvironmentStoragesCollection", modelProperties: { value: { serializedName: "value", @@ -3910,7 +4959,7 @@ export const ConnectedEnvironmentStoragesCollection: coreClient.CompositeMapper element: { type: { name: "Composite", - className: "ConnectedEnvironmentStorage" + className: "ManagedEnvironmentStorage" } } } @@ -3919,10 +4968,10 @@ export const ConnectedEnvironmentStoragesCollection: coreClient.CompositeMapper } }; -export const ConnectedEnvironmentStorageProperties: coreClient.CompositeMapper = { +export const ManagedEnvironmentStorageProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ConnectedEnvironmentStorageProperties", + className: "ManagedEnvironmentStorageProperties", modelProperties: { azureFile: { serializedName: "azureFile", @@ -3935,10 +4984,10 @@ export const ConnectedEnvironmentStorageProperties: coreClient.CompositeMapper = } }; -export const AvailableWorkloadProfilesCollection: coreClient.CompositeMapper = { +export const SourceControlCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AvailableWorkloadProfilesCollection", + className: "SourceControlCollection", modelProperties: { value: { serializedName: "value", @@ -3948,7 +4997,7 @@ export const AvailableWorkloadProfilesCollection: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "AvailableWorkloadProfile" + className: "SourceControl" } } } @@ -3964,37 +5013,63 @@ export const AvailableWorkloadProfilesCollection: coreClient.CompositeMapper = { } }; -export const AvailableWorkloadProfileProperties: coreClient.CompositeMapper = { +export const GithubActionConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AvailableWorkloadProfileProperties", + className: "GithubActionConfiguration", modelProperties: { - billingMeterCategory: { - serializedName: "billingMeterCategory", + registryInfo: { + serializedName: "registryInfo", + type: { + name: "Composite", + className: "RegistryInfo" + } + }, + azureCredentials: { + serializedName: "azureCredentials", + type: { + name: "Composite", + className: "AzureCredentials" + } + }, + contextPath: { + serializedName: "contextPath", type: { name: "String" } }, - applicability: { - serializedName: "applicability", + githubPersonalAccessToken: { + serializedName: "githubPersonalAccessToken", type: { name: "String" } }, - cores: { - serializedName: "cores", + image: { + serializedName: "image", type: { - name: "Number" + name: "String" } }, - memoryGiB: { - serializedName: "memoryGiB", + publishType: { + serializedName: "publishType", type: { - name: "Number" + name: "String" } }, - displayName: { - serializedName: "displayName", + os: { + serializedName: "os", + type: { + name: "String" + } + }, + runtimeStack: { + serializedName: "runtimeStack", + type: { + name: "String" + } + }, + runtimeVersion: { + serializedName: "runtimeVersion", type: { name: "String" } @@ -4003,106 +5078,76 @@ export const AvailableWorkloadProfileProperties: coreClient.CompositeMapper = { } }; -export const ErrorResponse: coreClient.CompositeMapper = { +export const RegistryInfo: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ErrorResponse", + className: "RegistryInfo", modelProperties: { - error: { - serializedName: "error", + registryUrl: { + serializedName: "registryUrl", type: { - name: "Composite", - className: "ErrorDetail" + name: "String" + } + }, + registryUserName: { + serializedName: "registryUserName", + type: { + name: "String" + } + }, + registryPassword: { + serializedName: "registryPassword", + type: { + name: "String" } } } } }; -export const ErrorDetail: coreClient.CompositeMapper = { +export const AzureCredentials: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ErrorDetail", + className: "AzureCredentials", modelProperties: { - code: { - serializedName: "code", - readOnly: true, + clientId: { + serializedName: "clientId", type: { name: "String" } }, - message: { - serializedName: "message", - readOnly: true, + clientSecret: { + serializedName: "clientSecret", type: { name: "String" } }, - target: { - serializedName: "target", - readOnly: true, + tenantId: { + serializedName: "tenantId", type: { name: "String" } }, - details: { - serializedName: "details", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorDetail" - } - } - } - }, - additionalInfo: { - serializedName: "additionalInfo", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorAdditionalInfo" - } - } - } - } - } - } -}; - -export const ErrorAdditionalInfo: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorAdditionalInfo", - modelProperties: { - type: { - serializedName: "type", - readOnly: true, + kind: { + serializedName: "kind", type: { name: "String" } }, - info: { - serializedName: "info", - readOnly: true, + subscriptionId: { + serializedName: "subscriptionId", type: { - name: "Dictionary", - value: { type: { name: "any" } } + name: "String" } } } } }; -export const BillingMeterCollection: coreClient.CompositeMapper = { +export const JobExecutionNamesCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "BillingMeterCollection", + className: "JobExecutionNamesCollection", modelProperties: { value: { serializedName: "value", @@ -4112,7 +5157,7 @@ export const BillingMeterCollection: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "BillingMeter" + className: "JobExecutionBase" } } } @@ -4121,48 +5166,32 @@ export const BillingMeterCollection: coreClient.CompositeMapper = { } }; -export const BillingMeterProperties: coreClient.CompositeMapper = { +export const ProxyResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "BillingMeterProperties", + className: "ProxyResource", modelProperties: { - category: { - serializedName: "category", - type: { - name: "String" - } - }, - meterType: { - serializedName: "meterType", - type: { - name: "String" - } - }, - displayName: { - serializedName: "displayName", - type: { - name: "String" - } - } + ...Resource.type.modelProperties } } }; -export const DaprSecret: coreClient.CompositeMapper = { +export const TrackedResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DaprSecret", + className: "TrackedResource", modelProperties: { - name: { - serializedName: "name", - readOnly: true, + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } } }, - value: { - serializedName: "value", - readOnly: true, + location: { + serializedName: "location", + required: true, type: { name: "String" } @@ -4171,111 +5200,216 @@ export const DaprSecret: coreClient.CompositeMapper = { } }; -export const ProxyResource: coreClient.CompositeMapper = { +export const InitContainer: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ProxyResource", + className: "InitContainer", modelProperties: { - ...Resource.type.modelProperties + ...BaseContainer.type.modelProperties } } }; -export const TrackedResource: coreClient.CompositeMapper = { +export const Container: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TrackedResource", + className: "Container", modelProperties: { - ...Resource.type.modelProperties, - tags: { - serializedName: "tags", + ...BaseContainer.type.modelProperties, + probes: { + serializedName: "probes", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContainerAppProbe" + } + } + } + } + } + } +}; + +export const AuthConfig: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AuthConfig", + modelProperties: { + ...ProxyResource.type.modelProperties, + platform: { + serializedName: "properties.platform", + type: { + name: "Composite", + className: "AuthPlatform" } }, - location: { - serializedName: "location", - required: true, + globalValidation: { + serializedName: "properties.globalValidation", + type: { + name: "Composite", + className: "GlobalValidation" + } + }, + identityProviders: { + serializedName: "properties.identityProviders", + type: { + name: "Composite", + className: "IdentityProviders" + } + }, + login: { + serializedName: "properties.login", + type: { + name: "Composite", + className: "Login" + } + }, + httpSettings: { + serializedName: "properties.httpSettings", type: { - name: "String" + name: "Composite", + className: "HttpSettings" } } } } }; -export const InitContainer: coreClient.CompositeMapper = { +export const AvailableWorkloadProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "InitContainer", + className: "AvailableWorkloadProfile", modelProperties: { - ...BaseContainer.type.modelProperties + ...ProxyResource.type.modelProperties, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "AvailableWorkloadProfileProperties" + } + } } } }; -export const Container: coreClient.CompositeMapper = { +export const BillingMeter: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Container", + className: "BillingMeter", modelProperties: { - ...BaseContainer.type.modelProperties, - probes: { - serializedName: "probes", + ...ProxyResource.type.modelProperties, + location: { + serializedName: "location", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ContainerAppProbe" - } - } + name: "String" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "BillingMeterProperties" } } } } }; -export const AuthConfig: coreClient.CompositeMapper = { +export const DaprComponent: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AuthConfig", + className: "DaprComponent", modelProperties: { ...ProxyResource.type.modelProperties, - platform: { - serializedName: "properties.platform", + componentType: { + serializedName: "properties.componentType", type: { - name: "Composite", - className: "AuthPlatform" + name: "String" } }, - globalValidation: { - serializedName: "properties.globalValidation", + version: { + serializedName: "properties.version", type: { - name: "Composite", - className: "GlobalValidation" + name: "String" } }, - identityProviders: { - serializedName: "properties.identityProviders", + ignoreErrors: { + defaultValue: false, + serializedName: "properties.ignoreErrors", type: { - name: "Composite", - className: "IdentityProviders" + name: "Boolean" } }, - login: { - serializedName: "properties.login", + initTimeout: { + serializedName: "properties.initTimeout", type: { - name: "Composite", - className: "Login" + name: "String" } }, - httpSettings: { - serializedName: "properties.httpSettings", + secrets: { + serializedName: "properties.secrets", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Secret" + } + } + } + }, + secretStoreComponent: { + serializedName: "properties.secretStoreComponent", + type: { + name: "String" + } + }, + metadata: { + serializedName: "properties.metadata", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DaprMetadata" + } + } + } + }, + scopes: { + serializedName: "properties.scopes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const ConnectedEnvironmentStorage: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConnectedEnvironmentStorage", + modelProperties: { + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", type: { name: "Composite", - className: "HttpSettings" + className: "ConnectedEnvironmentStorageProperties" } } } @@ -4357,6 +5491,13 @@ export const Revision: coreClient.CompositeMapper = { type: { name: "String" } + }, + runningState: { + serializedName: "properties.runningState", + readOnly: true, + type: { + name: "String" + } } } } @@ -4375,89 +5516,40 @@ export const Replica: coreClient.CompositeMapper = { name: "DateTime" } }, - containers: { - serializedName: "properties.containers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ReplicaContainer" - } - } - } - } - } - } -}; - -export const DaprComponent: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DaprComponent", - modelProperties: { - ...ProxyResource.type.modelProperties, - componentType: { - serializedName: "properties.componentType", - type: { - name: "String" - } - }, - version: { - serializedName: "properties.version", + runningState: { + serializedName: "properties.runningState", + readOnly: true, type: { name: "String" } }, - ignoreErrors: { - serializedName: "properties.ignoreErrors", - type: { - name: "Boolean" - } - }, - initTimeout: { - serializedName: "properties.initTimeout", + runningStateDetails: { + serializedName: "properties.runningStateDetails", + readOnly: true, type: { name: "String" } }, - secrets: { - serializedName: "properties.secrets", + containers: { + serializedName: "properties.containers", type: { name: "Sequence", element: { type: { name: "Composite", - className: "Secret" + className: "ReplicaContainer" } } } }, - secretStoreComponent: { - serializedName: "properties.secretStoreComponent", - type: { - name: "String" - } - }, - metadata: { - serializedName: "properties.metadata", + initContainers: { + serializedName: "properties.initContainers", type: { name: "Sequence", element: { type: { name: "Composite", - className: "DaprMetadata" - } - } - } - }, - scopes: { - serializedName: "properties.scopes", - type: { - name: "Sequence", - element: { - type: { - name: "String" + className: "ReplicaContainer" } } } @@ -4553,63 +5645,74 @@ export const SourceControl: coreClient.CompositeMapper = { } }; -export const ConnectedEnvironmentStorage: coreClient.CompositeMapper = { +export const ConnectedEnvironment: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ConnectedEnvironmentStorage", + className: "ConnectedEnvironment", modelProperties: { - ...ProxyResource.type.modelProperties, - properties: { - serializedName: "properties", + ...TrackedResource.type.modelProperties, + extendedLocation: { + serializedName: "extendedLocation", type: { name: "Composite", - className: "ConnectedEnvironmentStorageProperties" + className: "ExtendedLocation" } - } - } - } -}; - -export const AvailableWorkloadProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AvailableWorkloadProfile", - modelProperties: { - ...ProxyResource.type.modelProperties, - location: { - serializedName: "location", + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + deploymentErrors: { + serializedName: "properties.deploymentErrors", + readOnly: true, + type: { + name: "String" + } + }, + defaultDomain: { + serializedName: "properties.defaultDomain", + readOnly: true, + type: { + name: "String" + } + }, + staticIp: { + serializedName: "properties.staticIp", type: { name: "String" } }, - properties: { - serializedName: "properties", + daprAIConnectionString: { + serializedName: "properties.daprAIConnectionString", + type: { + name: "String" + } + }, + customDomainConfiguration: { + serializedName: "properties.customDomainConfiguration", type: { name: "Composite", - className: "AvailableWorkloadProfileProperties" + className: "CustomDomainConfiguration" } } } } }; -export const BillingMeter: coreClient.CompositeMapper = { +export const Certificate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "BillingMeter", + className: "Certificate", modelProperties: { - ...ProxyResource.type.modelProperties, - location: { - serializedName: "location", - type: { - name: "String" - } - }, + ...TrackedResource.type.modelProperties, properties: { serializedName: "properties", type: { name: "Composite", - className: "BillingMeterProperties" + className: "CertificateProperties" } } } @@ -4636,6 +5739,12 @@ export const ContainerApp: coreClient.CompositeMapper = { className: "ManagedServiceIdentity" } }, + managedBy: { + serializedName: "managedBy", + type: { + name: "String" + } + }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, @@ -4655,8 +5764,8 @@ export const ContainerApp: coreClient.CompositeMapper = { name: "String" } }, - workloadProfileType: { - serializedName: "properties.workloadProfileType", + workloadProfileName: { + serializedName: "properties.workloadProfileName", type: { name: "String" } @@ -4668,6 +5777,13 @@ export const ContainerApp: coreClient.CompositeMapper = { name: "String" } }, + latestReadyRevisionName: { + serializedName: "properties.latestReadyRevisionName", + readOnly: true, + type: { + name: "String" + } + }, latestRevisionFqdn: { serializedName: "properties.latestRevisionFqdn", readOnly: true, @@ -4749,11 +5865,10 @@ export const ManagedEnvironment: coreClient.CompositeMapper = { className: "ManagedEnvironment", modelProperties: { ...TrackedResource.type.modelProperties, - sku: { - serializedName: "sku", + kind: { + serializedName: "kind", type: { - name: "Composite", - className: "EnvironmentSkuProperties" + name: "String" } }, provisioningState: { @@ -4841,22 +5956,118 @@ export const ManagedEnvironment: coreClient.CompositeMapper = { } } } + }, + kedaConfiguration: { + serializedName: "properties.kedaConfiguration", + type: { + name: "Composite", + className: "KedaConfiguration" + } + }, + daprConfiguration: { + serializedName: "properties.daprConfiguration", + type: { + name: "Composite", + className: "DaprConfiguration" + } + }, + infrastructureResourceGroup: { + serializedName: "properties.infrastructureResourceGroup", + type: { + name: "String" + } + }, + peerAuthentication: { + serializedName: "properties.peerAuthentication", + type: { + name: "Composite", + className: "ManagedEnvironmentPropertiesPeerAuthentication" + } } } } }; -export const Certificate: coreClient.CompositeMapper = { +export const Job: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Certificate", + 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 ManagedCertificate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedCertificate", modelProperties: { ...TrackedResource.type.modelProperties, properties: { serializedName: "properties", type: { name: "Composite", - className: "CertificateProperties" + className: "ManagedCertificateProperties" } } } @@ -4887,57 +6098,150 @@ export const EnvironmentAuthToken: coreClient.CompositeMapper = { } }; -export const ConnectedEnvironment: coreClient.CompositeMapper = { +export const ConnectedEnvironmentsDeleteHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ConnectedEnvironment", + className: "ConnectedEnvironmentsDeleteHeaders", modelProperties: { - ...TrackedResource.type.modelProperties, - extendedLocation: { - serializedName: "extendedLocation", + location: { + serializedName: "location", type: { - name: "Composite", - className: "ExtendedLocation" + name: "String" } - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, + } + } + } +}; + +export const ContainerAppsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerAppsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", type: { name: "String" } - }, - deploymentErrors: { - serializedName: "properties.deploymentErrors", - readOnly: true, + } + } + } +}; + +export const ContainerAppsUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerAppsUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", type: { name: "String" } - }, - defaultDomain: { - serializedName: "properties.defaultDomain", - readOnly: true, + } + } + } +}; + +export const ContainerAppsStartHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerAppsStartHeaders", + modelProperties: { + location: { + serializedName: "location", type: { name: "String" } - }, - staticIp: { - serializedName: "properties.staticIp", + } + } + } +}; + +export const ContainerAppsStopHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerAppsStopHeaders", + modelProperties: { + location: { + serializedName: "location", type: { name: "String" } - }, - daprAIConnectionString: { - serializedName: "properties.daprAIConnectionString", + } + } + } +}; + +export const JobsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", type: { name: "String" } - }, - customDomainConfiguration: { - serializedName: "properties.customDomainConfiguration", + } + } + } +}; + +export const JobsUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobsUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", type: { - name: "Composite", - className: "CustomDomainConfiguration" + name: "String" + } + } + } + } +}; + +export const JobsStartHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobsStartHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const JobsStopExecutionHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobsStopExecutionHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const JobsStopMultipleExecutionsHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobsStopMultipleExecutionsHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" } } } diff --git a/sdk/appcontainers/arm-appcontainers/src/models/parameters.ts b/sdk/appcontainers/arm-appcontainers/src/models/parameters.ts index 8f3673eadcad..b639b7f0fd72 100644 --- a/sdk/appcontainers/arm-appcontainers/src/models/parameters.ts +++ b/sdk/appcontainers/arm-appcontainers/src/models/parameters.ts @@ -13,16 +13,21 @@ import { } from "@azure/core-client"; import { AuthConfig as AuthConfigMapper, - ContainerApp as ContainerAppMapper, - DaprComponent as DaprComponentMapper, - ManagedEnvironment as ManagedEnvironmentMapper, + ConnectedEnvironment as ConnectedEnvironmentMapper, + CheckNameAvailabilityRequest as CheckNameAvailabilityRequestMapper, Certificate as CertificateMapper, CertificatePatch as CertificatePatchMapper, - CheckNameAvailabilityRequest as CheckNameAvailabilityRequestMapper, + DaprComponent as DaprComponentMapper, + ConnectedEnvironmentStorage as ConnectedEnvironmentStorageMapper, + ContainerApp as ContainerAppMapper, + Job as JobMapper, + JobPatchProperties as JobPatchPropertiesMapper, + JobExecutionTemplate as JobExecutionTemplateMapper, + ManagedEnvironment as ManagedEnvironmentMapper, + ManagedCertificate as ManagedCertificateMapper, + ManagedCertificatePatch as ManagedCertificatePatchMapper, ManagedEnvironmentStorage as ManagedEnvironmentStorageMapper, - SourceControl as SourceControlMapper, - ConnectedEnvironment as ConnectedEnvironmentMapper, - ConnectedEnvironmentStorage as ConnectedEnvironmentStorageMapper + SourceControl as SourceControlMapper } from "../models/mappers"; export const accept: OperationParameter = { @@ -92,7 +97,7 @@ export const containerAppName: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-06-01-preview", + defaultValue: "2023-04-01-preview", isConstant: true, serializedName: "api-version", type: { @@ -141,6 +146,94 @@ export const nextLink: OperationURLParameter = { skipEncoding: true }; +export const location: OperationURLParameter = { + parameterPath: "location", + mapper: { + constraints: { + MinLength: 1 + }, + serializedName: "location", + required: true, + type: { + name: "String" + } + } +}; + +export const connectedEnvironmentName: OperationURLParameter = { + parameterPath: "connectedEnvironmentName", + mapper: { + serializedName: "connectedEnvironmentName", + required: true, + type: { + name: "String" + } + } +}; + +export const environmentEnvelope: OperationParameter = { + parameterPath: "environmentEnvelope", + mapper: ConnectedEnvironmentMapper +}; + +export const checkNameAvailabilityRequest: OperationParameter = { + parameterPath: "checkNameAvailabilityRequest", + mapper: CheckNameAvailabilityRequestMapper +}; + +export const certificateName: OperationURLParameter = { + parameterPath: "certificateName", + mapper: { + serializedName: "certificateName", + required: true, + type: { + name: "String" + } + } +}; + +export const certificateEnvelope: OperationParameter = { + parameterPath: ["options", "certificateEnvelope"], + mapper: CertificateMapper +}; + +export const certificateEnvelope1: OperationParameter = { + parameterPath: "certificateEnvelope", + mapper: CertificatePatchMapper +}; + +export const componentName: OperationURLParameter = { + parameterPath: "componentName", + mapper: { + serializedName: "componentName", + required: true, + type: { + name: "String" + } + } +}; + +export const daprComponentEnvelope: OperationParameter = { + parameterPath: "daprComponentEnvelope", + mapper: DaprComponentMapper +}; + +export const storageName: OperationURLParameter = { + parameterPath: "storageName", + mapper: { + serializedName: "storageName", + required: true, + type: { + name: "String" + } + } +}; + +export const storageEnvelope: OperationParameter = { + parameterPath: "storageEnvelope", + mapper: ConnectedEnvironmentStorageMapper +}; + export const containerAppEnvelope: OperationParameter = { parameterPath: "containerAppEnvelope", mapper: ContainerAppMapper @@ -156,6 +249,20 @@ export const customHostname: OperationQueryParameter = { } }; +export const containerAppName1: OperationURLParameter = { + parameterPath: "containerAppName", + mapper: { + constraints: { + Pattern: new RegExp("^[-\\w\\._\\(\\)]+$") + }, + serializedName: "containerAppName", + required: true, + type: { + name: "String" + } + } +}; + export const filter: OperationQueryParameter = { parameterPath: ["options", "filter"], mapper: { @@ -188,6 +295,17 @@ export const replicaName: OperationURLParameter = { } }; +export const detectorName: OperationURLParameter = { + parameterPath: "detectorName", + mapper: { + serializedName: "detectorName", + required: true, + type: { + name: "String" + } + } +}; + export const environmentName: OperationURLParameter = { parameterPath: "environmentName", mapper: { @@ -199,10 +317,13 @@ export const environmentName: OperationURLParameter = { } }; -export const componentName: OperationURLParameter = { - parameterPath: "componentName", +export const jobName: OperationURLParameter = { + parameterPath: "jobName", mapper: { - serializedName: "componentName", + constraints: { + Pattern: new RegExp("^[-\\w\\._\\(\\)]+$") + }, + serializedName: "jobName", required: true, type: { name: "String" @@ -210,15 +331,28 @@ export const componentName: OperationURLParameter = { } }; -export const daprComponentEnvelope: OperationParameter = { - parameterPath: "daprComponentEnvelope", - mapper: DaprComponentMapper +export const jobEnvelope: OperationParameter = { + parameterPath: "jobEnvelope", + mapper: JobMapper }; -export const detectorName: OperationURLParameter = { - parameterPath: "detectorName", +export const jobEnvelope1: OperationParameter = { + parameterPath: "jobEnvelope", + mapper: JobPatchPropertiesMapper +}; + +export const template: OperationParameter = { + parameterPath: "template", + mapper: JobExecutionTemplateMapper +}; + +export const jobExecutionName: OperationURLParameter = { + parameterPath: "jobExecutionName", mapper: { - serializedName: "detectorName", + constraints: { + Pattern: new RegExp("^[-\\w\\._\\(\\)]+$") + }, + serializedName: "jobExecutionName", required: true, type: { name: "String" @@ -226,15 +360,15 @@ export const detectorName: OperationURLParameter = { } }; -export const environmentEnvelope: OperationParameter = { +export const environmentEnvelope1: OperationParameter = { parameterPath: "environmentEnvelope", mapper: ManagedEnvironmentMapper }; -export const certificateName: OperationURLParameter = { - parameterPath: "certificateName", +export const managedCertificateName: OperationURLParameter = { + parameterPath: "managedCertificateName", mapper: { - serializedName: "certificateName", + serializedName: "managedCertificateName", required: true, type: { name: "String" @@ -242,33 +376,17 @@ export const certificateName: OperationURLParameter = { } }; -export const certificateEnvelope: OperationParameter = { - parameterPath: ["options", "certificateEnvelope"], - mapper: CertificateMapper +export const managedCertificateEnvelope: OperationParameter = { + parameterPath: ["options", "managedCertificateEnvelope"], + mapper: ManagedCertificateMapper }; -export const certificateEnvelope1: OperationParameter = { - parameterPath: "certificateEnvelope", - mapper: CertificatePatchMapper +export const managedCertificateEnvelope1: OperationParameter = { + parameterPath: "managedCertificateEnvelope", + mapper: ManagedCertificatePatchMapper }; -export const checkNameAvailabilityRequest: OperationParameter = { - parameterPath: "checkNameAvailabilityRequest", - mapper: CheckNameAvailabilityRequestMapper -}; - -export const storageName: OperationURLParameter = { - parameterPath: "storageName", - mapper: { - serializedName: "storageName", - required: true, - type: { - name: "String" - } - } -}; - -export const storageEnvelope: OperationParameter = { +export const storageEnvelope1: OperationParameter = { parameterPath: "storageEnvelope", mapper: ManagedEnvironmentStorageMapper }; @@ -288,38 +406,3 @@ export const sourceControlEnvelope: OperationParameter = { parameterPath: "sourceControlEnvelope", mapper: SourceControlMapper }; - -export const connectedEnvironmentName: OperationURLParameter = { - parameterPath: "connectedEnvironmentName", - mapper: { - serializedName: "connectedEnvironmentName", - required: true, - type: { - name: "String" - } - } -}; - -export const environmentEnvelope1: OperationParameter = { - parameterPath: "environmentEnvelope", - mapper: ConnectedEnvironmentMapper -}; - -export const storageEnvelope1: OperationParameter = { - parameterPath: "storageEnvelope", - mapper: ConnectedEnvironmentStorageMapper -}; - -export const location: OperationURLParameter = { - parameterPath: "location", - mapper: { - constraints: { - MinLength: 1 - }, - serializedName: "location", - required: true, - type: { - name: "String" - } - } -}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/availableWorkloadProfiles.ts b/sdk/appcontainers/arm-appcontainers/src/operations/availableWorkloadProfiles.ts index 40572dc25833..0a770c0b01be 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/availableWorkloadProfiles.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/availableWorkloadProfiles.ts @@ -160,7 +160,6 @@ const getNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/certificates.ts b/sdk/appcontainers/arm-appcontainers/src/operations/certificates.ts index abc53d53ec7c..50def81fbc80 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/certificates.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/certificates.ts @@ -284,8 +284,8 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.environmentName, - Parameters.certificateName + Parameters.certificateName, + Parameters.environmentName ], headerParameters: [Parameters.accept], serializer @@ -308,8 +308,8 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.environmentName, - Parameters.certificateName + Parameters.certificateName, + Parameters.environmentName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -331,8 +331,8 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.environmentName, - Parameters.certificateName + Parameters.certificateName, + Parameters.environmentName ], headerParameters: [Parameters.accept], serializer @@ -355,8 +355,8 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.environmentName, - Parameters.certificateName + Parameters.certificateName, + Parameters.environmentName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -373,7 +373,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironments.ts b/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironments.ts index 6e00f85d2ff8..6567cc8d202b 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironments.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironments.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { ConnectedEnvironment, ConnectedEnvironmentsListBySubscriptionNextOptionalParams, @@ -231,8 +235,8 @@ export class ConnectedEnvironmentsImpl implements ConnectedEnvironments { environmentEnvelope: ConnectedEnvironment, options?: ConnectedEnvironmentsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ConnectedEnvironmentsCreateOrUpdateResponse > > { @@ -242,7 +246,7 @@ export class ConnectedEnvironmentsImpl implements ConnectedEnvironments { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -275,19 +279,23 @@ export class ConnectedEnvironmentsImpl implements ConnectedEnvironments { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, connectedEnvironmentName, environmentEnvelope, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + ConnectedEnvironmentsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -325,14 +333,14 @@ export class ConnectedEnvironmentsImpl implements ConnectedEnvironments { resourceGroupName: string, connectedEnvironmentName: string, options?: ConnectedEnvironmentsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -365,14 +373,15 @@ export class ConnectedEnvironmentsImpl implements ConnectedEnvironments { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, connectedEnvironmentName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, connectedEnvironmentName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -513,7 +522,7 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = { }; const getOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}", httpMethod: "GET", responses: { 200: { @@ -535,7 +544,7 @@ const getOperationSpec: coreClient.OperationSpec = { }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}", httpMethod: "PUT", responses: { 200: { @@ -554,7 +563,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - requestBody: Parameters.environmentEnvelope1, + requestBody: Parameters.environmentEnvelope, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -568,7 +577,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }; const deleteOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}", httpMethod: "DELETE", responses: { 200: {}, @@ -591,7 +600,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { }; const updateOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}", httpMethod: "PATCH", responses: { 200: { @@ -646,7 +655,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -666,7 +674,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsCertificates.ts b/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsCertificates.ts index a920e82c0390..10bf2489fb05 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsCertificates.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsCertificates.ts @@ -289,8 +289,8 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.certificateName, - Parameters.connectedEnvironmentName + Parameters.connectedEnvironmentName, + Parameters.certificateName ], headerParameters: [Parameters.accept], serializer @@ -313,8 +313,8 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.certificateName, - Parameters.connectedEnvironmentName + Parameters.connectedEnvironmentName, + Parameters.certificateName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -336,8 +336,8 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.certificateName, - Parameters.connectedEnvironmentName + Parameters.connectedEnvironmentName, + Parameters.certificateName ], headerParameters: [Parameters.accept], serializer @@ -360,8 +360,8 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.certificateName, - Parameters.connectedEnvironmentName + Parameters.connectedEnvironmentName, + Parameters.certificateName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -378,7 +378,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsDaprComponents.ts b/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsDaprComponents.ts index 1d69b38a5dcd..e4f61d14dee4 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsDaprComponents.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsDaprComponents.ts @@ -288,8 +288,8 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.componentName, - Parameters.connectedEnvironmentName + Parameters.connectedEnvironmentName, + Parameters.componentName ], headerParameters: [Parameters.accept], serializer @@ -312,8 +312,8 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.componentName, - Parameters.connectedEnvironmentName + Parameters.connectedEnvironmentName, + Parameters.componentName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -335,8 +335,8 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.componentName, - Parameters.connectedEnvironmentName + Parameters.connectedEnvironmentName, + Parameters.componentName ], headerParameters: [Parameters.accept], serializer @@ -358,8 +358,8 @@ const listSecretsOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.componentName, - Parameters.connectedEnvironmentName + Parameters.connectedEnvironmentName, + Parameters.componentName ], headerParameters: [Parameters.accept], serializer @@ -375,7 +375,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsStorages.ts b/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsStorages.ts index e1f12b3c7f33..38a5f292aa22 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsStorages.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsStorages.ts @@ -159,8 +159,8 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.storageName, - Parameters.connectedEnvironmentName + Parameters.connectedEnvironmentName, + Parameters.storageName ], headerParameters: [Parameters.accept], serializer @@ -177,14 +177,14 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - requestBody: Parameters.storageEnvelope1, + requestBody: Parameters.storageEnvelope, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.storageName, - Parameters.connectedEnvironmentName + Parameters.connectedEnvironmentName, + Parameters.storageName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -206,8 +206,8 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.storageName, - Parameters.connectedEnvironmentName + Parameters.connectedEnvironmentName, + Parameters.storageName ], headerParameters: [Parameters.accept], serializer diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/containerApps.ts b/sdk/appcontainers/arm-appcontainers/src/operations/containerApps.ts index ef137d3b1ba5..8c3f247f45b3 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/containerApps.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/containerApps.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { ContainerApp, ContainerAppsListBySubscriptionNextOptionalParams, @@ -29,12 +33,15 @@ import { ContainerAppsCreateOrUpdateResponse, ContainerAppsDeleteOptionalParams, ContainerAppsUpdateOptionalParams, + ContainerAppsUpdateResponse, ContainerAppsListCustomHostNameAnalysisOptionalParams, ContainerAppsListCustomHostNameAnalysisResponse, ContainerAppsListSecretsOptionalParams, ContainerAppsListSecretsResponse, ContainerAppsGetAuthTokenOptionalParams, ContainerAppsGetAuthTokenResponse, + ContainerAppsStartOptionalParams, + ContainerAppsStopOptionalParams, ContainerAppsListBySubscriptionNextResponse, ContainerAppsListByResourceGroupNextResponse } from "../models"; @@ -233,8 +240,8 @@ export class ContainerAppsImpl implements ContainerApps { containerAppEnvelope: ContainerApp, options?: ContainerAppsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ContainerAppsCreateOrUpdateResponse > > { @@ -244,7 +251,7 @@ export class ContainerAppsImpl implements ContainerApps { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -277,14 +284,23 @@ export class ContainerAppsImpl implements ContainerApps { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, containerAppName, containerAppEnvelope, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + containerAppName, + containerAppEnvelope, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + ContainerAppsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -322,14 +338,14 @@ export class ContainerAppsImpl implements ContainerApps { resourceGroupName: string, containerAppName: string, options?: ContainerAppsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -362,14 +378,15 @@ export class ContainerAppsImpl implements ContainerApps { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, containerAppName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, containerAppName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -406,14 +423,19 @@ export class ContainerAppsImpl implements ContainerApps { containerAppName: string, containerAppEnvelope: ContainerApp, options?: ContainerAppsUpdateOptionalParams - ): Promise, void>> { + ): Promise< + SimplePollerLike< + OperationState, + ContainerAppsUpdateResponse + > + > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -446,13 +468,21 @@ export class ContainerAppsImpl implements ContainerApps { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, containerAppName, containerAppEnvelope, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + containerAppName, + containerAppEnvelope, + options + }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + ContainerAppsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -471,7 +501,7 @@ export class ContainerAppsImpl implements ContainerApps { containerAppName: string, containerAppEnvelope: ContainerApp, options?: ContainerAppsUpdateOptionalParams - ): Promise { + ): Promise { const poller = await this.beginUpdate( resourceGroupName, containerAppName, @@ -532,6 +562,172 @@ 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, void>> { + 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>(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, void>> { + 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>(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. @@ -690,10 +886,18 @@ const updateOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}", httpMethod: "PATCH", responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, + 200: { + bodyMapper: Mappers.ContainerApp + }, + 201: { + bodyMapper: Mappers.ContainerApp + }, + 202: { + bodyMapper: Mappers.ContainerApp + }, + 204: { + bodyMapper: Mappers.ContainerApp + }, default: { bodyMapper: Mappers.DefaultErrorResponse } @@ -779,6 +983,52 @@ 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: {}, + 201: {}, + 202: {}, + 204: {}, + 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: {}, + 201: {}, + 202: {}, + 204: {}, + 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", @@ -790,7 +1040,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -810,7 +1059,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsAuthConfigs.ts b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsAuthConfigs.ts index 9e45d15ab288..730b4f246cc7 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsAuthConfigs.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsAuthConfigs.ts @@ -330,7 +330,6 @@ const listByContainerAppNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsDiagnostics.ts b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsDiagnostics.ts index 849175306fc6..2f5bac546cb4 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsDiagnostics.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsDiagnostics.ts @@ -469,7 +469,6 @@ const listDetectorsNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -491,7 +490,6 @@ const listRevisionsNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - queryParameters: [Parameters.apiVersion, Parameters.filter], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsRevisions.ts b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsRevisions.ts index daf6f1750a48..102a0c9d61d6 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsRevisions.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsRevisions.ts @@ -357,7 +357,6 @@ const listRevisionsNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - queryParameters: [Parameters.apiVersion, Parameters.filter], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsSourceControls.ts b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsSourceControls.ts index 4afa93622d9f..5a5c0ff192fa 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsSourceControls.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsSourceControls.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { SourceControl, ContainerAppsSourceControlsListByContainerAppNextOptionalParams, @@ -177,8 +181,8 @@ export class ContainerAppsSourceControlsImpl sourceControlEnvelope: SourceControl, options?: ContainerAppsSourceControlsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ContainerAppsSourceControlsCreateOrUpdateResponse > > { @@ -188,7 +192,7 @@ export class ContainerAppsSourceControlsImpl ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -221,19 +225,22 @@ export class ContainerAppsSourceControlsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + ContainerAppsSourceControlsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -277,14 +284,14 @@ export class ContainerAppsSourceControlsImpl containerAppName: string, sourceControlName: string, options?: ContainerAppsSourceControlsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -317,13 +324,13 @@ export class ContainerAppsSourceControlsImpl }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, containerAppName, sourceControlName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, containerAppName, sourceControlName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -488,7 +495,6 @@ const listByContainerAppNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/daprComponents.ts b/sdk/appcontainers/arm-appcontainers/src/operations/daprComponents.ts index d05d6ff004b3..e288f99384fb 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/daprComponents.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/daprComponents.ts @@ -283,8 +283,8 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.environmentName, - Parameters.componentName + Parameters.componentName, + Parameters.environmentName ], headerParameters: [Parameters.accept], serializer @@ -307,8 +307,8 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.environmentName, - Parameters.componentName + Parameters.componentName, + Parameters.environmentName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -330,8 +330,8 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.environmentName, - Parameters.componentName + Parameters.componentName, + Parameters.environmentName ], headerParameters: [Parameters.accept], serializer @@ -353,8 +353,8 @@ const listSecretsOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.environmentName, - Parameters.componentName + Parameters.componentName, + Parameters.environmentName ], headerParameters: [Parameters.accept], serializer @@ -370,7 +370,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/index.ts b/sdk/appcontainers/arm-appcontainers/src/operations/index.ts index cb79504dd5c6..caa835d7eb68 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/index.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/index.ts @@ -7,22 +7,25 @@ */ export * from "./containerAppsAuthConfigs"; +export * from "./availableWorkloadProfiles"; +export * from "./billingMeters"; +export * from "./connectedEnvironments"; +export * from "./connectedEnvironmentsCertificates"; +export * from "./connectedEnvironmentsDaprComponents"; +export * from "./connectedEnvironmentsStorages"; export * from "./containerApps"; export * from "./containerAppsRevisions"; export * from "./containerAppsRevisionReplicas"; -export * from "./daprComponents"; export * from "./containerAppsDiagnostics"; export * from "./managedEnvironmentDiagnostics"; export * from "./managedEnvironmentsDiagnostics"; export * from "./operations"; +export * from "./jobs"; +export * from "./jobsExecutions"; export * from "./managedEnvironments"; export * from "./certificates"; +export * from "./managedCertificates"; export * from "./namespaces"; +export * from "./daprComponents"; export * from "./managedEnvironmentsStorages"; export * from "./containerAppsSourceControls"; -export * from "./connectedEnvironments"; -export * from "./connectedEnvironmentsCertificates"; -export * from "./connectedEnvironmentsDaprComponents"; -export * from "./connectedEnvironmentsStorages"; -export * from "./availableWorkloadProfiles"; -export * from "./billingMeters"; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/jobs.ts b/sdk/appcontainers/arm-appcontainers/src/operations/jobs.ts new file mode 100644 index 000000000000..c325f18259d0 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/jobs.ts @@ -0,0 +1,1073 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { Jobs } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + Job, + JobsListBySubscriptionNextOptionalParams, + JobsListBySubscriptionOptionalParams, + JobsListBySubscriptionResponse, + JobsListByResourceGroupNextOptionalParams, + JobsListByResourceGroupOptionalParams, + JobsListByResourceGroupResponse, + JobsGetOptionalParams, + JobsGetResponse, + JobsCreateOrUpdateOptionalParams, + JobsCreateOrUpdateResponse, + JobsDeleteOptionalParams, + JobPatchProperties, + JobsUpdateOptionalParams, + JobsUpdateResponse, + JobExecutionTemplate, + JobsStartOptionalParams, + JobsStartResponse, + JobsStopExecutionOptionalParams, + JobsStopMultipleExecutionsOptionalParams, + JobsStopMultipleExecutionsResponse, + JobsListSecretsOptionalParams, + JobsListSecretsResponse, + JobsListBySubscriptionNextResponse, + JobsListByResourceGroupNextResponse +} from "../models"; + +/// +/** Class containing Jobs operations. */ +export class JobsImpl implements Jobs { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class Jobs class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Get the Container Apps Jobs in a given subscription. + * @param options The options parameters. + */ + public listBySubscription( + options?: JobsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBySubscriptionPagingPage(options, settings); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: JobsListBySubscriptionOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: JobsListBySubscriptionResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySubscription(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listBySubscriptionPagingAll( + options?: JobsListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Get the Container Apps Jobs in a given resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: JobsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByResourceGroupPagingPage( + resourceGroupName, + options, + settings + ); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: JobsListByResourceGroupOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: JobsListByResourceGroupResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByResourceGroup(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: JobsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Get the Container Apps Jobs in a given subscription. + * @param options The options parameters. + */ + private _listBySubscription( + options?: JobsListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * Get the Container Apps Jobs in a given resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: JobsListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * Get the properties of a Container Apps Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + options?: JobsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + getOperationSpec + ); + } + + /** + * Create or Update a Container Apps Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobEnvelope Properties used to create a container apps job + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + jobEnvelope: Job, + options?: JobsCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + JobsCreateOrUpdateResponse + > + > { + 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, jobEnvelope, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + JobsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Create or Update a Container Apps Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobEnvelope Properties used to create a container apps job + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + jobEnvelope: Job, + options?: JobsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + jobEnvelope, + options + ); + return poller.pollUntilDone(); + } + + /** + * Delete a Container Apps Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + options?: JobsDeleteOptionalParams + ): Promise, void>> { + 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, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Delete a Container Apps Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + options?: JobsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete(resourceGroupName, options); + return poller.pollUntilDone(); + } + + /** + * Patches a Container Apps Job using JSON Merge Patch + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobEnvelope Properties used to create a container apps job + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + jobEnvelope: JobPatchProperties, + options?: JobsUpdateOptionalParams + ): Promise< + SimplePollerLike, JobsUpdateResponse> + > { + 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, jobEnvelope, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + JobsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Patches a Container Apps Job using JSON Merge Patch + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobEnvelope Properties used to create a container apps job + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + jobEnvelope: JobPatchProperties, + options?: JobsUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + jobEnvelope, + options + ); + return poller.pollUntilDone(); + } + + /** + * Start a Container Apps Job + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param template Properties used to start a job instance. + * @param options The options parameters. + */ + async beginStart( + resourceGroupName: string, + template: JobExecutionTemplate, + options?: JobsStartOptionalParams + ): Promise< + SimplePollerLike, JobsStartResponse> + > { + 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, template, options }, + spec: startOperationSpec + }); + const poller = await createHttpPoller< + JobsStartResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Start a Container Apps Job + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param template Properties used to start a job instance. + * @param options The options parameters. + */ + async beginStartAndWait( + resourceGroupName: string, + template: JobExecutionTemplate, + options?: JobsStartOptionalParams + ): Promise { + const poller = await this.beginStart(resourceGroupName, template, 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 options The options parameters. + */ + async beginStopExecution( + resourceGroupName: string, + options?: JobsStopExecutionOptionalParams + ): Promise, void>> { + 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, options }, + spec: stopExecutionOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Terminates execution of a running container apps job + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + async beginStopExecutionAndWait( + resourceGroupName: string, + options?: JobsStopExecutionOptionalParams + ): Promise { + const poller = await this.beginStopExecution(resourceGroupName, 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 options The options parameters. + */ + async beginStopMultipleExecutions( + resourceGroupName: string, + options?: JobsStopMultipleExecutionsOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + JobsStopMultipleExecutionsResponse + > + > { + 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, options }, + spec: stopMultipleExecutionsOperationSpec + }); + const poller = await createHttpPoller< + JobsStopMultipleExecutionsResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Terminates execution of a running container apps job + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + async beginStopMultipleExecutionsAndWait( + resourceGroupName: string, + options?: JobsStopMultipleExecutionsOptionalParams + ): Promise { + const poller = await this.beginStopMultipleExecutions( + resourceGroupName, + options + ); + return poller.pollUntilDone(); + } + + /** + * List secrets for a container apps job + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listSecrets( + resourceGroupName: string, + options?: JobsListSecretsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listSecretsOperationSpec + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: JobsListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: JobsListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/providers/Microsoft.App/jobs", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.JobsCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.JobsCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Job + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.jobName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.Job + }, + 201: { + bodyMapper: Mappers.Job + }, + 202: { + bodyMapper: Mappers.Job + }, + 204: { + bodyMapper: Mappers.Job + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + requestBody: Parameters.jobEnvelope, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.jobName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.jobName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.Job + }, + 201: { + bodyMapper: Mappers.Job + }, + 202: { + bodyMapper: Mappers.Job + }, + 204: { + bodyMapper: Mappers.Job + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + requestBody: Parameters.jobEnvelope1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.jobName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const startOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/start", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.JobExecutionBase + }, + 201: { + bodyMapper: Mappers.JobExecutionBase + }, + 202: { + bodyMapper: Mappers.JobExecutionBase + }, + 204: { + bodyMapper: Mappers.JobExecutionBase + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + requestBody: Parameters.template, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.jobName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const stopExecutionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/executions/{jobExecutionName}/stop", + httpMethod: "POST", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.jobName, + Parameters.jobExecutionName + ], + headerParameters: [Parameters.accept], + serializer +}; +const stopMultipleExecutionsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/stop", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ContainerAppJobExecutions + }, + 201: { + bodyMapper: Mappers.ContainerAppJobExecutions + }, + 202: { + bodyMapper: Mappers.ContainerAppJobExecutions + }, + 204: { + bodyMapper: Mappers.ContainerAppJobExecutions + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.jobName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listSecretsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/listSecrets", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.JobSecretsCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.jobName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.JobsCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.JobsCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/jobsExecutions.ts b/sdk/appcontainers/arm-appcontainers/src/operations/jobsExecutions.ts new file mode 100644 index 000000000000..d20a60ea5f31 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/jobsExecutions.ts @@ -0,0 +1,176 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { JobsExecutions } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; +import { + JobExecution, + JobsExecutionsListNextOptionalParams, + JobsExecutionsListOptionalParams, + JobsExecutionsListResponse, + JobsExecutionsListNextResponse +} from "../models"; + +/// +/** Class containing JobsExecutions operations. */ +export class JobsExecutionsImpl implements JobsExecutions { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class JobsExecutions class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Get a Container Apps Job's executions + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + options?: JobsExecutionsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(resourceGroupName, options, settings); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + options?: JobsExecutionsListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: JobsExecutionsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + options?: JobsExecutionsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(resourceGroupName, options)) { + yield* page; + } + } + + /** + * Get a Container Apps Job's executions + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + options?: JobsExecutionsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + nextLink: string, + options?: JobsExecutionsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/executions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ContainerAppJobExecutions + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.filter], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.jobName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ContainerAppJobExecutions + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.jobName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/managedCertificates.ts b/sdk/appcontainers/arm-appcontainers/src/operations/managedCertificates.ts new file mode 100644 index 000000000000..7954e51450ab --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/managedCertificates.ts @@ -0,0 +1,485 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { ManagedCertificates } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + ManagedCertificate, + ManagedCertificatesListNextOptionalParams, + ManagedCertificatesListOptionalParams, + ManagedCertificatesListResponse, + ManagedCertificatesGetOptionalParams, + ManagedCertificatesGetResponse, + ManagedCertificatesCreateOrUpdateOptionalParams, + ManagedCertificatesCreateOrUpdateResponse, + ManagedCertificatesDeleteOptionalParams, + ManagedCertificatePatch, + ManagedCertificatesUpdateOptionalParams, + ManagedCertificatesUpdateResponse, + ManagedCertificatesListNextResponse +} from "../models"; + +/// +/** Class containing ManagedCertificates operations. */ +export class ManagedCertificatesImpl implements ManagedCertificates { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class ManagedCertificates class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Get the Managed Certificates in a given managed environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + environmentName: string, + options?: ManagedCertificatesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + environmentName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + environmentName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + environmentName: string, + options?: ManagedCertificatesListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ManagedCertificatesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, environmentName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + environmentName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + environmentName: string, + options?: ManagedCertificatesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + environmentName, + options + )) { + yield* page; + } + } + + /** + * Get the specified Managed Certificate. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + environmentName: string, + managedCertificateName: string, + options?: ManagedCertificatesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, managedCertificateName, options }, + getOperationSpec + ); + } + + /** + * Create or Update a Managed Certificate. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + environmentName: string, + managedCertificateName: string, + options?: ManagedCertificatesCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ManagedCertificatesCreateOrUpdateResponse + > + > { + 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, + environmentName, + managedCertificateName, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + ManagedCertificatesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Create or Update a Managed Certificate. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + environmentName: string, + managedCertificateName: string, + options?: ManagedCertificatesCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + environmentName, + managedCertificateName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes the specified Managed Certificate. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + environmentName: string, + managedCertificateName: string, + options?: ManagedCertificatesDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, managedCertificateName, options }, + deleteOperationSpec + ); + } + + /** + * Patches a managed certificate. Oly patching of tags is supported + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param managedCertificateEnvelope Properties of a managed certificate that need to be updated + * @param options The options parameters. + */ + update( + resourceGroupName: string, + environmentName: string, + managedCertificateName: string, + managedCertificateEnvelope: ManagedCertificatePatch, + options?: ManagedCertificatesUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + environmentName, + managedCertificateName, + managedCertificateEnvelope, + options + }, + updateOperationSpec + ); + } + + /** + * Get the Managed Certificates in a given managed environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + environmentName: string, + options?: ManagedCertificatesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + environmentName: string, + nextLink: string, + options?: ManagedCertificatesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedCertificate + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName, + Parameters.managedCertificateName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ManagedCertificate + }, + 201: { + bodyMapper: Mappers.ManagedCertificate + }, + 202: { + bodyMapper: Mappers.ManagedCertificate + }, + 204: { + bodyMapper: Mappers.ManagedCertificate + }, + 400: { + isError: true + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + requestBody: Parameters.managedCertificateEnvelope, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName, + Parameters.managedCertificateName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName, + Parameters.managedCertificateName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.ManagedCertificate + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + requestBody: Parameters.managedCertificateEnvelope1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName, + Parameters.managedCertificateName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedCertificateCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedCertificateCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.environmentName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironmentDiagnostics.ts b/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironmentDiagnostics.ts index a74c66507b36..b8c4ee4edaae 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironmentDiagnostics.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironmentDiagnostics.ts @@ -109,8 +109,8 @@ const getDetectorOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.environmentName, - Parameters.detectorName + Parameters.detectorName, + Parameters.environmentName ], headerParameters: [Parameters.accept], serializer diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironments.ts b/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironments.ts index 709d202cfaaa..8a7c9a6b0e9b 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironments.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironments.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { ManagedEnvironment, ManagedEnvironmentsListBySubscriptionNextOptionalParams, @@ -33,6 +37,7 @@ import { ManagedEnvironmentsCreateOrUpdateResponse, ManagedEnvironmentsDeleteOptionalParams, ManagedEnvironmentsUpdateOptionalParams, + ManagedEnvironmentsUpdateResponse, ManagedEnvironmentsGetAuthTokenOptionalParams, ManagedEnvironmentsGetAuthTokenResponse, ManagedEnvironmentsListBySubscriptionNextResponse, @@ -177,7 +182,7 @@ export class ManagedEnvironmentsImpl implements ManagedEnvironments { } /** - * Get all workload Profile States for a Premium Managed Environment. + * Get all workload Profile States for a Managed Environment. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param options The options parameters. @@ -318,8 +323,8 @@ export class ManagedEnvironmentsImpl implements ManagedEnvironments { environmentEnvelope: ManagedEnvironment, options?: ManagedEnvironmentsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ManagedEnvironmentsCreateOrUpdateResponse > > { @@ -329,7 +334,7 @@ export class ManagedEnvironmentsImpl implements ManagedEnvironments { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -362,13 +367,21 @@ export class ManagedEnvironmentsImpl implements ManagedEnvironments { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, environmentName, environmentEnvelope, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + environmentName, + environmentEnvelope, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + ManagedEnvironmentsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -407,14 +420,14 @@ export class ManagedEnvironmentsImpl implements ManagedEnvironments { resourceGroupName: string, environmentName: string, options?: ManagedEnvironmentsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -447,13 +460,13 @@ export class ManagedEnvironmentsImpl implements ManagedEnvironments { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, environmentName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, environmentName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -491,14 +504,19 @@ export class ManagedEnvironmentsImpl implements ManagedEnvironments { environmentName: string, environmentEnvelope: ManagedEnvironment, options?: ManagedEnvironmentsUpdateOptionalParams - ): Promise, void>> { + ): Promise< + SimplePollerLike< + OperationState, + ManagedEnvironmentsUpdateResponse + > + > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -531,13 +549,21 @@ export class ManagedEnvironmentsImpl implements ManagedEnvironments { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, environmentName, environmentEnvelope, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + environmentName, + environmentEnvelope, + options + }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + ManagedEnvironmentsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -556,7 +582,7 @@ export class ManagedEnvironmentsImpl implements ManagedEnvironments { environmentName: string, environmentEnvelope: ManagedEnvironment, options?: ManagedEnvironmentsUpdateOptionalParams - ): Promise { + ): Promise { const poller = await this.beginUpdate( resourceGroupName, environmentName, @@ -584,7 +610,7 @@ export class ManagedEnvironmentsImpl implements ManagedEnvironments { } /** - * Get all workload Profile States for a Premium Managed Environment. + * Get all workload Profile States for a Managed Environment. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param options The options parameters. @@ -736,7 +762,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - requestBody: Parameters.environmentEnvelope, + requestBody: Parameters.environmentEnvelope1, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -776,15 +802,23 @@ const updateOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}", httpMethod: "PATCH", responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, + 200: { + bodyMapper: Mappers.ManagedEnvironment + }, + 201: { + bodyMapper: Mappers.ManagedEnvironment + }, + 202: { + bodyMapper: Mappers.ManagedEnvironment + }, + 204: { + bodyMapper: Mappers.ManagedEnvironment + }, default: { bodyMapper: Mappers.DefaultErrorResponse } }, - requestBody: Parameters.environmentEnvelope, + requestBody: Parameters.environmentEnvelope1, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -851,7 +885,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -871,7 +904,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -892,7 +924,6 @@ const listWorkloadProfileStatesNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironmentsStorages.ts b/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironmentsStorages.ts index ed330cba0b98..8f0707995923 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironmentsStorages.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironmentsStorages.ts @@ -159,8 +159,8 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.environmentName, - Parameters.storageName + Parameters.storageName, + Parameters.environmentName ], headerParameters: [Parameters.accept], serializer @@ -177,14 +177,14 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - requestBody: Parameters.storageEnvelope, + requestBody: Parameters.storageEnvelope1, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.environmentName, - Parameters.storageName + Parameters.storageName, + Parameters.environmentName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -206,8 +206,8 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.environmentName, - Parameters.storageName + Parameters.storageName, + Parameters.environmentName ], headerParameters: [Parameters.accept], serializer diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/operations.ts b/sdk/appcontainers/arm-appcontainers/src/operations/operations.ts index ce821e2ed00d..4ed2af793177 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/operations.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/operations.ts @@ -143,7 +143,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.nextLink], headerParameters: [Parameters.accept], serializer diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/connectedEnvironments.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/connectedEnvironments.ts index 7770413e4575..b55958c95dbc 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/connectedEnvironments.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/connectedEnvironments.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { ConnectedEnvironment, ConnectedEnvironmentsListBySubscriptionOptionalParams, @@ -67,8 +67,8 @@ export interface ConnectedEnvironments { environmentEnvelope: ConnectedEnvironment, options?: ConnectedEnvironmentsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ConnectedEnvironmentsCreateOrUpdateResponse > >; @@ -95,7 +95,7 @@ export interface ConnectedEnvironments { resourceGroupName: string, connectedEnvironmentName: string, options?: ConnectedEnvironmentsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete an connectedEnvironment. * @param resourceGroupName The name of the resource group. The name is case insensitive. diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerApps.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerApps.ts index e891805063ca..627b1d15497e 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerApps.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerApps.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { ContainerApp, ContainerAppsListBySubscriptionOptionalParams, @@ -18,12 +18,15 @@ import { ContainerAppsCreateOrUpdateResponse, ContainerAppsDeleteOptionalParams, ContainerAppsUpdateOptionalParams, + ContainerAppsUpdateResponse, ContainerAppsListCustomHostNameAnalysisOptionalParams, ContainerAppsListCustomHostNameAnalysisResponse, ContainerAppsListSecretsOptionalParams, ContainerAppsListSecretsResponse, ContainerAppsGetAuthTokenOptionalParams, - ContainerAppsGetAuthTokenResponse + ContainerAppsGetAuthTokenResponse, + ContainerAppsStartOptionalParams, + ContainerAppsStopOptionalParams } from "../models"; /// @@ -69,8 +72,8 @@ export interface ContainerApps { containerAppEnvelope: ContainerApp, options?: ContainerAppsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ContainerAppsCreateOrUpdateResponse > >; @@ -97,7 +100,7 @@ export interface ContainerApps { resourceGroupName: string, containerAppName: string, options?: ContainerAppsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete a Container App. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -121,7 +124,12 @@ export interface ContainerApps { containerAppName: string, containerAppEnvelope: ContainerApp, options?: ContainerAppsUpdateOptionalParams - ): Promise, void>>; + ): Promise< + SimplePollerLike< + OperationState, + ContainerAppsUpdateResponse + > + >; /** * Patches a Container App using JSON Merge Patch * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -134,7 +142,7 @@ export interface ContainerApps { containerAppName: string, containerAppEnvelope: ContainerApp, options?: ContainerAppsUpdateOptionalParams - ): Promise; + ): Promise; /** * Analyzes a custom hostname for a Container App * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -168,4 +176,48 @@ 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, void>>; + /** + * 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, void>>; + /** + * 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/containerAppsSourceControls.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsSourceControls.ts index d276be2eaa6d..0858efd0fcd0 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsSourceControls.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsSourceControls.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { SourceControl, ContainerAppsSourceControlsListByContainerAppOptionalParams, @@ -60,8 +60,8 @@ export interface ContainerAppsSourceControls { sourceControlEnvelope: SourceControl, options?: ContainerAppsSourceControlsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ContainerAppsSourceControlsCreateOrUpdateResponse > >; @@ -92,7 +92,7 @@ export interface ContainerAppsSourceControls { containerAppName: string, sourceControlName: string, options?: ContainerAppsSourceControlsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete a Container App SourceControl. * @param resourceGroupName The name of the resource group. The name is case insensitive. diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/index.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/index.ts index cb79504dd5c6..caa835d7eb68 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/index.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/index.ts @@ -7,22 +7,25 @@ */ export * from "./containerAppsAuthConfigs"; +export * from "./availableWorkloadProfiles"; +export * from "./billingMeters"; +export * from "./connectedEnvironments"; +export * from "./connectedEnvironmentsCertificates"; +export * from "./connectedEnvironmentsDaprComponents"; +export * from "./connectedEnvironmentsStorages"; export * from "./containerApps"; export * from "./containerAppsRevisions"; export * from "./containerAppsRevisionReplicas"; -export * from "./daprComponents"; export * from "./containerAppsDiagnostics"; export * from "./managedEnvironmentDiagnostics"; export * from "./managedEnvironmentsDiagnostics"; export * from "./operations"; +export * from "./jobs"; +export * from "./jobsExecutions"; export * from "./managedEnvironments"; export * from "./certificates"; +export * from "./managedCertificates"; export * from "./namespaces"; +export * from "./daprComponents"; export * from "./managedEnvironmentsStorages"; export * from "./containerAppsSourceControls"; -export * from "./connectedEnvironments"; -export * from "./connectedEnvironmentsCertificates"; -export * from "./connectedEnvironmentsDaprComponents"; -export * from "./connectedEnvironmentsStorages"; -export * from "./availableWorkloadProfiles"; -export * from "./billingMeters"; diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/jobs.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/jobs.ts new file mode 100644 index 000000000000..788bafcdb2f2 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/jobs.ts @@ -0,0 +1,204 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + Job, + JobsListBySubscriptionOptionalParams, + JobsListByResourceGroupOptionalParams, + JobsGetOptionalParams, + JobsGetResponse, + JobsCreateOrUpdateOptionalParams, + JobsCreateOrUpdateResponse, + JobsDeleteOptionalParams, + JobPatchProperties, + JobsUpdateOptionalParams, + JobsUpdateResponse, + JobExecutionTemplate, + JobsStartOptionalParams, + JobsStartResponse, + JobsStopExecutionOptionalParams, + JobsStopMultipleExecutionsOptionalParams, + JobsStopMultipleExecutionsResponse, + JobsListSecretsOptionalParams, + JobsListSecretsResponse +} from "../models"; + +/// +/** Interface representing a Jobs. */ +export interface Jobs { + /** + * Get the Container Apps Jobs in a given subscription. + * @param options The options parameters. + */ + listBySubscription( + options?: JobsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get the Container Apps Jobs in a given resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: JobsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get the properties of a Container Apps Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + options?: JobsGetOptionalParams + ): Promise; + /** + * Create or Update a Container Apps Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobEnvelope Properties used to create a container apps job + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + jobEnvelope: Job, + options?: JobsCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + JobsCreateOrUpdateResponse + > + >; + /** + * Create or Update a Container Apps Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobEnvelope Properties used to create a container apps job + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + jobEnvelope: Job, + options?: JobsCreateOrUpdateOptionalParams + ): Promise; + /** + * Delete a Container Apps Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + options?: JobsDeleteOptionalParams + ): Promise, void>>; + /** + * Delete a Container Apps Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + options?: JobsDeleteOptionalParams + ): Promise; + /** + * Patches a Container Apps Job using JSON Merge Patch + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobEnvelope Properties used to create a container apps job + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + jobEnvelope: JobPatchProperties, + options?: JobsUpdateOptionalParams + ): Promise< + SimplePollerLike, JobsUpdateResponse> + >; + /** + * Patches a Container Apps Job using JSON Merge Patch + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobEnvelope Properties used to create a container apps job + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + jobEnvelope: JobPatchProperties, + options?: JobsUpdateOptionalParams + ): Promise; + /** + * Start a Container Apps Job + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param template Properties used to start a job instance. + * @param options The options parameters. + */ + beginStart( + resourceGroupName: string, + template: JobExecutionTemplate, + options?: JobsStartOptionalParams + ): Promise< + SimplePollerLike, JobsStartResponse> + >; + /** + * Start a Container Apps Job + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param template Properties used to start a job instance. + * @param options The options parameters. + */ + beginStartAndWait( + resourceGroupName: 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 options The options parameters. + */ + beginStopExecution( + resourceGroupName: string, + options?: JobsStopExecutionOptionalParams + ): Promise, void>>; + /** + * Terminates execution of a running container apps job + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + beginStopExecutionAndWait( + resourceGroupName: string, + options?: JobsStopExecutionOptionalParams + ): Promise; + /** + * Terminates execution of a running container apps job + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + beginStopMultipleExecutions( + resourceGroupName: string, + options?: JobsStopMultipleExecutionsOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + JobsStopMultipleExecutionsResponse + > + >; + /** + * Terminates execution of a running container apps job + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + beginStopMultipleExecutionsAndWait( + resourceGroupName: string, + options?: JobsStopMultipleExecutionsOptionalParams + ): Promise; + /** + * List secrets for a container apps job + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listSecrets( + resourceGroupName: string, + options?: JobsListSecretsOptionalParams + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/jobsExecutions.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/jobsExecutions.ts new file mode 100644 index 000000000000..b2faf3e7df4e --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/jobsExecutions.ts @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { JobExecution, JobsExecutionsListOptionalParams } from "../models"; + +/// +/** Interface representing a JobsExecutions. */ +export interface JobsExecutions { + /** + * Get a Container Apps Job's executions + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + options?: JobsExecutionsListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/managedCertificates.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/managedCertificates.ts new file mode 100644 index 000000000000..ce0723009a74 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/managedCertificates.ts @@ -0,0 +1,110 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + ManagedCertificate, + ManagedCertificatesListOptionalParams, + ManagedCertificatesGetOptionalParams, + ManagedCertificatesGetResponse, + ManagedCertificatesCreateOrUpdateOptionalParams, + ManagedCertificatesCreateOrUpdateResponse, + ManagedCertificatesDeleteOptionalParams, + ManagedCertificatePatch, + ManagedCertificatesUpdateOptionalParams, + ManagedCertificatesUpdateResponse +} from "../models"; + +/// +/** Interface representing a ManagedCertificates. */ +export interface ManagedCertificates { + /** + * Get the Managed Certificates in a given managed environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + environmentName: string, + options?: ManagedCertificatesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get the specified Managed Certificate. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + environmentName: string, + managedCertificateName: string, + options?: ManagedCertificatesGetOptionalParams + ): Promise; + /** + * Create or Update a Managed Certificate. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + environmentName: string, + managedCertificateName: string, + options?: ManagedCertificatesCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ManagedCertificatesCreateOrUpdateResponse + > + >; + /** + * Create or Update a Managed Certificate. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + environmentName: string, + managedCertificateName: string, + options?: ManagedCertificatesCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the specified Managed Certificate. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + environmentName: string, + managedCertificateName: string, + options?: ManagedCertificatesDeleteOptionalParams + ): Promise; + /** + * Patches a managed certificate. Oly patching of tags is supported + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param managedCertificateEnvelope Properties of a managed certificate that need to be updated + * @param options The options parameters. + */ + update( + resourceGroupName: string, + environmentName: string, + managedCertificateName: string, + managedCertificateEnvelope: ManagedCertificatePatch, + options?: ManagedCertificatesUpdateOptionalParams + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/managedEnvironments.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/managedEnvironments.ts index 1d2e810c840f..895d16a1f5b0 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/managedEnvironments.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/managedEnvironments.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { ManagedEnvironment, ManagedEnvironmentsListBySubscriptionOptionalParams, @@ -20,6 +20,7 @@ import { ManagedEnvironmentsCreateOrUpdateResponse, ManagedEnvironmentsDeleteOptionalParams, ManagedEnvironmentsUpdateOptionalParams, + ManagedEnvironmentsUpdateResponse, ManagedEnvironmentsGetAuthTokenOptionalParams, ManagedEnvironmentsGetAuthTokenResponse } from "../models"; @@ -44,7 +45,7 @@ export interface ManagedEnvironments { options?: ManagedEnvironmentsListByResourceGroupOptionalParams ): PagedAsyncIterableIterator; /** - * Get all workload Profile States for a Premium Managed Environment. + * Get all workload Profile States for a Managed Environment. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param options The options parameters. @@ -78,8 +79,8 @@ export interface ManagedEnvironments { environmentEnvelope: ManagedEnvironment, options?: ManagedEnvironmentsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ManagedEnvironmentsCreateOrUpdateResponse > >; @@ -106,7 +107,7 @@ export interface ManagedEnvironments { resourceGroupName: string, environmentName: string, options?: ManagedEnvironmentsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete a Managed Environment if it does not have any container apps. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -130,7 +131,12 @@ export interface ManagedEnvironments { environmentName: string, environmentEnvelope: ManagedEnvironment, options?: ManagedEnvironmentsUpdateOptionalParams - ): Promise, void>>; + ): Promise< + SimplePollerLike< + OperationState, + ManagedEnvironmentsUpdateResponse + > + >; /** * Patches a Managed Environment using JSON Merge Patch * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -143,7 +149,7 @@ export interface ManagedEnvironments { environmentName: string, environmentEnvelope: ManagedEnvironment, options?: ManagedEnvironmentsUpdateOptionalParams - ): Promise; + ): Promise; /** * Checks if resource name is available. * @param resourceGroupName The name of the resource group. The name is case insensitive. diff --git a/sdk/appcontainers/arm-appcontainers/src/pagingHelper.ts b/sdk/appcontainers/arm-appcontainers/src/pagingHelper.ts index d85fc13bce1e..269a2b9814b5 100644 --- a/sdk/appcontainers/arm-appcontainers/src/pagingHelper.ts +++ b/sdk/appcontainers/arm-appcontainers/src/pagingHelper.ts @@ -13,11 +13,11 @@ export interface PageInfo { const pageMap = new WeakMap(); /** - * Given a result page from a pageable operation, returns a - * continuation token that can be used to begin paging from + * Given the last `.value` produced by the `byPage` iterator, + * returns a continuation token that can be used to begin paging from * that point later. - * @param page A result object from calling .byPage() on a paged operation. - * @returns The continuation token that can be passed into byPage(). + * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator. + * @returns The continuation token that can be passed into byPage() during future calls. */ export function getContinuationToken(page: unknown): string | undefined { if (typeof page !== "object" || page === null) { 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"