From 766b82534e026d7b67967da8df774972148fc8ce Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 7 Jun 2023 05:15:00 +0000 Subject: [PATCH] CodeGen from PR 24332 in Azure/azure-rest-api-specs Merge 127f0347b26061abc250920e994fcfc837f53442 into e8fc692fca94fe96e424b47cf8784d15c035615c --- common/config/rush/pnpm-lock.yaml | 72 +- .../arm-appcontainers/CHANGELOG.md | 63 +- .../arm-appcontainers/_meta.json | 8 +- .../arm-appcontainers/assets.json | 6 - .../arm-appcontainers/package.json | 14 +- .../review/arm-appcontainers.api.md | 287 ++ .../availableWorkloadProfilesGetSample.ts | 41 - .../samples-dev/billingMetersGetSample.ts | 38 - .../certificatesCreateOrUpdateSample.ts | 60 - .../samples-dev/certificatesDeleteSample.ts | 45 - .../samples-dev/certificatesGetSample.ts | 45 - .../samples-dev/certificatesListSample.ts | 46 - .../samples-dev/certificatesUpdateSample.ts | 52 - ...onmentsCertificatesCreateOrUpdateSample.ts | 60 - ...tedEnvironmentsCertificatesDeleteSample.ts | 45 - ...nectedEnvironmentsCertificatesGetSample.ts | 45 - ...ectedEnvironmentsCertificatesListSample.ts | 46 - ...tedEnvironmentsCertificatesUpdateSample.ts | 52 - ...EnvironmentsCheckNameAvailabilitySample.ts | 51 - ...nnectedEnvironmentsCreateOrUpdateSample.ts | 58 - ...mentsDaprComponentsCreateOrUpdateSample.ts | 63 - ...dEnvironmentsDaprComponentsDeleteSample.ts | 45 - ...ctedEnvironmentsDaprComponentsGetSample.ts | 45 - ...tedEnvironmentsDaprComponentsListSample.ts | 46 - ...ronmentsDaprComponentsListSecretsSample.ts | 45 - .../connectedEnvironmentsDeleteSample.ts | 43 - .../connectedEnvironmentsGetSample.ts | 43 - ...edEnvironmentsListByResourceGroupSample.ts | 44 - ...tedEnvironmentsListBySubscriptionSample.ts | 40 - ...nvironmentsStoragesCreateOrUpdateSample.ts | 59 - ...nnectedEnvironmentsStoragesDeleteSample.ts | 45 - .../connectedEnvironmentsStoragesGetSample.ts | 45 - ...connectedEnvironmentsStoragesListSample.ts | 43 - .../connectedEnvironmentsUpdateSample.ts | 43 - ...inerAppsAuthConfigsCreateOrUpdateSample.ts | 55 - .../containerAppsAuthConfigsDeleteSample.ts | 45 - .../containerAppsAuthConfigsGetSample.ts | 45 - ...AppsAuthConfigsListByContainerAppSample.ts | 46 - .../containerAppsCreateOrUpdateSample.ts | 281 -- .../samples-dev/containerAppsDeleteSample.ts | 42 - ...ntainerAppsDiagnosticsGetDetectorSample.ts | 45 - ...ntainerAppsDiagnosticsGetRevisionSample.ts | 44 - .../containerAppsDiagnosticsGetRootSample.ts | 42 - ...ainerAppsDiagnosticsListDetectorsSample.ts | 46 - ...ainerAppsDiagnosticsListRevisionsSample.ts | 45 - .../containerAppsGetAuthTokenSample.ts | 42 - .../samples-dev/containerAppsGetSample.ts | 42 - .../containerAppsListByResourceGroupSample.ts | 43 - .../containerAppsListBySubscriptionSample.ts | 40 - ...nerAppsListCustomHostNameAnalysisSample.ts | 50 - .../containerAppsListSecretsSample.ts | 42 - ...nerAppsRevisionReplicasGetReplicaSample.ts | 47 - ...rAppsRevisionReplicasListReplicasSample.ts | 45 - ...inerAppsRevisionsActivateRevisionSample.ts | 44 - ...erAppsRevisionsDeactivateRevisionSample.ts | 44 - ...containerAppsRevisionsGetRevisionSample.ts | 44 - ...ntainerAppsRevisionsListRevisionsSample.ts | 45 - ...ainerAppsRevisionsRestartRevisionSample.ts | 44 - ...rAppsSourceControlsCreateOrUpdateSample.ts | 67 - ...containerAppsSourceControlsDeleteSample.ts | 45 - .../containerAppsSourceControlsGetSample.ts | 45 - ...sSourceControlsListByContainerAppSample.ts | 46 - .../samples-dev/containerAppsUpdateSample.ts | 138 - .../daprComponentsCreateOrUpdateSample.ts | 103 - .../samples-dev/daprComponentsDeleteSample.ts | 45 - .../samples-dev/daprComponentsGetSample.ts | 70 - .../samples-dev/daprComponentsListSample.ts | 46 - .../daprComponentsListSecretsSample.ts | 45 - .../samples-dev/jobsCreateOrUpdateSample.ts | 83 - .../samples-dev/jobsDeleteSample.ts | 42 - .../samples-dev/jobsExecutionsListSample.ts | 45 - .../samples-dev/jobsGetSample.ts | 39 - .../jobsListByResourceGroupSample.ts | 41 - .../jobsListBySubscriptionSample.ts | 40 - .../samples-dev/jobsListSecretsSample.ts | 39 - .../samples-dev/jobsStartSample.ts | 64 - .../samples-dev/jobsStopExecutionSample.ts | 44 - .../jobsStopMultipleExecutionsSample.ts | 53 - .../samples-dev/jobsUpdateSample.ts | 85 - ...managedCertificatesCreateOrUpdateSample.ts | 60 - .../managedCertificatesDeleteSample.ts | 45 - .../managedCertificatesGetSample.ts | 45 - .../managedCertificatesListSample.ts | 46 - .../managedCertificatesUpdateSample.ts | 52 - ...EnvironmentDiagnosticsGetDetectorSample.ts | 45 - ...vironmentDiagnosticsListDetectorsSample.ts | 43 - ...managedEnvironmentsCreateOrUpdateSample.ts | 150 - .../managedEnvironmentsDeleteSample.ts | 43 - ...gedEnvironmentsDiagnosticsGetRootSample.ts | 43 - .../managedEnvironmentsGetAuthTokenSample.ts | 42 - .../managedEnvironmentsGetSample.ts | 43 - ...edEnvironmentsListByResourceGroupSample.ts | 44 - ...gedEnvironmentsListBySubscriptionSample.ts | 40 - ...ronmentsListWorkloadProfileStatesSample.ts | 46 - ...nvironmentsStoragesCreateOrUpdateSample.ts | 59 - ...managedEnvironmentsStoragesDeleteSample.ts | 45 - .../managedEnvironmentsStoragesGetSample.ts | 45 - .../managedEnvironmentsStoragesListSample.ts | 43 - .../managedEnvironmentsUpdateSample.ts | 51 - .../namespacesCheckNameAvailabilitySample.ts | 79 - .../samples-dev/operationsListSample.ts | 40 - .../src/containerAppsAPIClient.ts | 28 +- .../arm-appcontainers/src/models/index.ts | 1372 +++++---- .../arm-appcontainers/src/models/mappers.ts | 2445 ++++++++++------- .../src/models/parameters.ts | 154 +- .../src/operations/builders.ts | 719 +++++ .../src/operations/builds.ts | 508 ++++ .../arm-appcontainers/src/operations/index.ts | 6 +- .../src/operationsInterfaces/builders.ts | 139 + .../src/operationsInterfaces/builds.ts | 109 + .../src/operationsInterfaces/index.ts | 6 +- .../test/appcontainers_examples.spec.ts | 124 - .../arm-appcontainers/test/sampleTest.ts | 43 + .../arm-appcontainers/tsconfig.json | 10 +- 114 files changed, 4406 insertions(+), 6722 deletions(-) delete mode 100644 sdk/appcontainers/arm-appcontainers/assets.json delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/availableWorkloadProfilesGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/billingMetersGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/certificatesCreateOrUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/certificatesDeleteSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/certificatesGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/certificatesListSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/certificatesUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesCreateOrUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesDeleteSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesListSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCheckNameAvailabilitySample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCreateOrUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsDeleteSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsListSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsListSecretsSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDeleteSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsListByResourceGroupSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsListBySubscriptionSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesCreateOrUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesDeleteSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesListSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsCreateOrUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsDeleteSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsListByContainerAppSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsCreateOrUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDeleteSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetDetectorSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetRevisionSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetRootSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsListDetectorsSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsListRevisionsSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsGetAuthTokenSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListByResourceGroupSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListBySubscriptionSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListCustomHostNameAnalysisSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListSecretsSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionReplicasGetReplicaSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionReplicasListReplicasSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsActivateRevisionSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsDeactivateRevisionSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsGetRevisionSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsListRevisionsSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsRestartRevisionSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsCreateOrUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsDeleteSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsListByContainerAppSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsCreateOrUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsDeleteSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsListSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsListSecretsSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/jobsCreateOrUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/jobsDeleteSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/jobsExecutionsListSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/jobsGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/jobsListByResourceGroupSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/jobsListBySubscriptionSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/jobsListSecretsSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/jobsStartSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/jobsStopExecutionSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/jobsStopMultipleExecutionsSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/jobsUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesCreateOrUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesDeleteSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesListSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentDiagnosticsGetDetectorSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentDiagnosticsListDetectorsSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsCreateOrUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsDeleteSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsDiagnosticsGetRootSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsGetAuthTokenSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListByResourceGroupSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListBySubscriptionSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListWorkloadProfileStatesSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesCreateOrUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesDeleteSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesGetSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesListSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsUpdateSample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/namespacesCheckNameAvailabilitySample.ts delete mode 100644 sdk/appcontainers/arm-appcontainers/samples-dev/operationsListSample.ts create mode 100644 sdk/appcontainers/arm-appcontainers/src/operations/builders.ts create mode 100644 sdk/appcontainers/arm-appcontainers/src/operations/builds.ts create mode 100644 sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/builders.ts create mode 100644 sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/builds.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 aafea9ae8794..eb05ab9e33d9 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -2245,7 +2245,7 @@ packages: resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} dependencies: '@types/connect': 3.4.35 - '@types/node': 14.18.48 + '@types/node': 16.18.34 dev: false /@types/chai-as-promised/7.1.5: @@ -2267,7 +2267,7 @@ packages: /@types/connect/3.4.35: resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} dependencies: - '@types/node': 14.18.48 + '@types/node': 16.18.34 dev: false /@types/cookie/0.4.1: @@ -2277,7 +2277,7 @@ packages: /@types/cors/2.8.13: resolution: {integrity: sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA==} dependencies: - '@types/node': 14.18.48 + '@types/node': 16.18.34 dev: false /@types/debug/4.1.8: @@ -2289,7 +2289,7 @@ packages: /@types/decompress/4.2.4: resolution: {integrity: sha512-/C8kTMRTNiNuWGl5nEyKbPiMv6HA+0RbEXzFhFBEzASM6+oa4tJro9b8nj7eRlOFfuLdzUU+DS/GPDlvvzMOhA==} dependencies: - '@types/node': 14.18.48 + '@types/node': 16.18.34 dev: false /@types/eslint/8.4.10: @@ -2310,7 +2310,7 @@ packages: /@types/express-serve-static-core/4.17.35: resolution: {integrity: sha512-wALWQwrgiB2AWTT91CB62b6Yt0sNHpznUXeZEcnPU3DRdlDIz74x8Qg1UUYKSVFi+va5vKOLYRBI1bRKiLLKIg==} dependencies: - '@types/node': 14.18.48 + '@types/node': 16.18.34 '@types/qs': 6.9.7 '@types/range-parser': 1.2.4 '@types/send': 0.17.1 @@ -2328,13 +2328,13 @@ packages: /@types/fs-extra/8.1.2: resolution: {integrity: sha512-SvSrYXfWSc7R4eqnOzbQF4TZmfpNSM9FrSWLU3EUnWBuyZqNBOrv1B1JA3byUDPUl9z4Ab3jeZG2eDdySlgNMg==} dependencies: - '@types/node': 14.18.48 + '@types/node': 16.18.34 dev: false /@types/fs-extra/9.0.13: resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==} dependencies: - '@types/node': 14.18.48 + '@types/node': 16.18.34 dev: false /@types/inquirer/8.2.6: @@ -2347,7 +2347,7 @@ packages: /@types/is-buffer/2.0.0: resolution: {integrity: sha512-0f7N/e3BAz32qDYvgB4d2cqv1DqUwvGxHkXsrucICn8la1Vb6Yl6Eg8mPScGwUiqHJeE7diXlzaK+QMA9m4Gxw==} dependencies: - '@types/node': 14.18.48 + '@types/node': 16.18.34 dev: false /@types/json-schema/7.0.12: @@ -2361,13 +2361,13 @@ packages: /@types/jsonwebtoken/9.0.2: resolution: {integrity: sha512-drE6uz7QBKq1fYqqoFKTDRdFCPHd5TCub75BM+D+cMx7NU9hUz7SESLfC2fSCXVFMO5Yj8sOWHuGqPgjc+fz0Q==} dependencies: - '@types/node': 14.18.48 + '@types/node': 16.18.34 dev: false /@types/jws/3.2.5: resolution: {integrity: sha512-xGTxZH34xOryaTN8CMsvhh9lfNqFuHiMoRvsLYWQdBJHqiECyfInXVl2eK8Jz2emxZWMIn5RBlmr3oDVPeWujw==} dependencies: - '@types/node': 14.18.48 + '@types/node': 16.18.34 dev: false /@types/linkify-it/3.0.2: @@ -2418,13 +2418,13 @@ packages: /@types/mysql/2.15.19: resolution: {integrity: sha512-wSRg2QZv14CWcZXkgdvHbbV2ACufNy5EgI8mBBxnJIptchv7DBy/h53VMa2jDhyo0C9MO4iowE6z9vF8Ja1DkQ==} dependencies: - '@types/node': 14.18.48 + '@types/node': 16.18.34 dev: false /@types/node-fetch/2.6.4: resolution: {integrity: sha512-1ZX9fcN4Rvkvgv4E6PAY5WXUFWFcRWxZa3EW83UjycOB9ljJCedb2CupIP4RZMEwF/M3eTcCihbBRgwtGbg5Rg==} dependencies: - '@types/node': 14.18.48 + '@types/node': 16.18.34 form-data: 3.0.1 dev: false @@ -2449,7 +2449,7 @@ packages: /@types/pg/8.6.1: resolution: {integrity: sha512-1Kc4oAGzAl7uqUStZCDvaLFqZrW9qWSjXOmBfdgyBP5La7Us6Mg4GBvRlSoaZMhQF/zSj1C8CtKMBkoiT8eL8w==} dependencies: - '@types/node': 14.18.48 + '@types/node': 16.18.34 pg-protocol: 1.6.0 pg-types: 2.2.0 dev: false @@ -2477,7 +2477,7 @@ packages: /@types/resolve/1.17.1: resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} dependencies: - '@types/node': 14.18.48 + '@types/node': 16.18.34 dev: false /@types/semaphore/1.1.1: @@ -2496,14 +2496,14 @@ packages: resolution: {integrity: sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==} dependencies: '@types/mime': 1.3.2 - '@types/node': 14.18.48 + '@types/node': 16.18.34 dev: false /@types/serve-static/1.15.1: resolution: {integrity: sha512-NUo5XNiAdULrJENtJXZZ3fHtfMolzZwczzBbnAeBbqBwG+LaG6YaJtuwzwGSQZ2wsCrxjEhNNjAkKigy3n8teQ==} dependencies: '@types/mime': 3.0.1 - '@types/node': 14.18.48 + '@types/node': 16.18.34 dev: false /@types/sinon/10.0.15: @@ -2525,13 +2525,13 @@ packages: /@types/stoppable/1.1.1: resolution: {integrity: sha512-b8N+fCADRIYYrGZOcmOR8ZNBOqhktWTB/bMUl5LvGtT201QKJZOOH5UsFyI3qtteM6ZAJbJqZoBcLqqxKIwjhw==} dependencies: - '@types/node': 14.18.48 + '@types/node': 16.18.34 dev: false /@types/through/0.0.30: resolution: {integrity: sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==} dependencies: - '@types/node': 14.18.48 + '@types/node': 16.18.34 dev: false /@types/tough-cookie/4.0.2: @@ -2545,7 +2545,7 @@ packages: /@types/tunnel/0.0.3: resolution: {integrity: sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==} dependencies: - '@types/node': 14.18.48 + '@types/node': 16.18.34 dev: false /@types/underscore/1.11.5: @@ -2563,19 +2563,19 @@ packages: /@types/ws/7.4.7: resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} dependencies: - '@types/node': 14.18.48 + '@types/node': 16.18.34 dev: false /@types/ws/8.5.4: resolution: {integrity: sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==} dependencies: - '@types/node': 14.18.48 + '@types/node': 16.18.34 dev: false /@types/xml2js/0.4.11: resolution: {integrity: sha512-JdigeAKmCyoJUiQljjr7tQG3if9NkqGUgwEUqBvV0N7LM4HyQk7UXCnusRa1lnvXAEYJ8mw8GtZWioagNztOwA==} dependencies: - '@types/node': 14.18.48 + '@types/node': 16.18.34 dev: false /@types/yargs-parser/21.0.0: @@ -2592,7 +2592,7 @@ packages: resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==} requiresBuild: true dependencies: - '@types/node': 14.18.48 + '@types/node': 16.18.34 dev: false optional: true @@ -3601,7 +3601,7 @@ packages: resolution: {integrity: sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==} deprecated: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) dependencies: - ms: 2.1.1 + ms: 2.1.3 dev: false /debug/3.2.7: @@ -3832,7 +3832,7 @@ packages: dependencies: semver: 7.5.1 shelljs: 0.8.5 - typescript: 5.2.0-dev.20230605 + typescript: 5.2.0-dev.20230606 dev: false /ecdsa-sig-formatter/1.0.11: @@ -3883,7 +3883,7 @@ packages: dependencies: '@types/cookie': 0.4.1 '@types/cors': 2.8.13 - '@types/node': 14.18.48 + '@types/node': 16.18.34 accepts: 1.3.8 base64id: 2.0.0 cookie: 0.4.2 @@ -4807,7 +4807,7 @@ packages: fs.realpath: 1.0.0 inflight: 1.0.6 inherits: 2.0.4 - minimatch: 3.0.4 + minimatch: 3.1.2 once: 1.4.0 path-is-absolute: 1.0.1 dev: false @@ -7115,7 +7115,7 @@ packages: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 14.18.48 + '@types/node': 16.18.34 long: 5.2.3 dev: false @@ -8413,6 +8413,12 @@ packages: hasBin: true dev: false + /typescript/4.8.4: + resolution: {integrity: sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==} + engines: {node: '>=4.2.0'} + hasBin: true + dev: false + /typescript/5.0.4: resolution: {integrity: sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==} engines: {node: '>=12.20'} @@ -8425,8 +8431,8 @@ packages: hasBin: true dev: false - /typescript/5.2.0-dev.20230605: - resolution: {integrity: sha512-xMeI7pFrOfxZTt1m4a2txN1E2Qh9IzLT9LNdc0DlEwJJKXjajj5j/nFLwWOUEnaFZBT6v35jlgLogG5HuSxUyA==} + /typescript/5.2.0-dev.20230606: + resolution: {integrity: sha512-aS+7vCKtiKKuzHFWW3sZ0zX1mHqSHESmM+LgOXx2jAMQ8NnHoT+7ixl37t0Z+JWXjOb0umUbgjBepaOLiGTuSQ==} engines: {node: '>=14.17'} hasBin: true dev: false @@ -9753,7 +9759,7 @@ packages: dev: false file:projects/arm-appcontainers.tgz: - resolution: {integrity: sha512-rADek+ay6GQMyTpU8o2VJVB6k3EByH7aojkhlxGHdSnHQNJ0xbDEslfN34BzidloCBX6BY3dOa6idvhEKzy/0w==, 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: @@ -9774,7 +9780,7 @@ packages: rollup: 2.79.1 rollup-plugin-sourcemaps: 0.6.3_6vxqa4pl2c5hli7lcaemfsm5je tslib: 2.5.3 - typescript: 5.0.4 + typescript: 4.8.4 uglify-js: 3.17.4 transitivePeerDependencies: - supports-color @@ -18026,7 +18032,7 @@ packages: dev: false file:projects/monitor-query.tgz: - resolution: {integrity: sha512-UTfrrypI9UvxkoW1o6zxcIzxJSxXeam5tEzF35ZFa+bJnIOgH45sUvzT2p4n/YA2/blGPYogtQPT81RcWiHgBg==, tarball: file:projects/monitor-query.tgz} + resolution: {integrity: sha512-bE/JTLjfj8HMmBTGfK1pTs4Kfsy9GJwXtrvbOjgDH8pYIvzzJ3LjUNRGjVhb3r+FOPkBRbb9fxniy5U3mmmLng==, tarball: file:projects/monitor-query.tgz} name: '@rush-temp/monitor-query' version: 0.0.0 dependencies: diff --git a/sdk/appcontainers/arm-appcontainers/CHANGELOG.md b/sdk/appcontainers/arm-appcontainers/CHANGELOG.md index c548a763325c..b6157244801a 100644 --- a/sdk/appcontainers/arm-appcontainers/CHANGELOG.md +++ b/sdk/appcontainers/arm-appcontainers/CHANGELOG.md @@ -1,11 +1,13 @@ # Release History -## 2.0.0-beta.3 (2023-05-12) +## 2.0.0-beta.4 (2023-06-07) **Features** - Added operation group AvailableWorkloadProfiles - Added operation group BillingMeters + - Added operation group Builders + - Added operation group Builds - Added operation group ConnectedEnvironments - Added operation group ConnectedEnvironmentsCertificates - Added operation group ConnectedEnvironmentsDaprComponents @@ -29,6 +31,30 @@ - Added Interface BillingMeterCollection - Added Interface BillingMeterProperties - Added Interface BillingMetersGetOptionalParams + - Added Interface BuildCollection + - Added Interface BuildConfiguration + - Added Interface BuilderCollection + - Added Interface BuilderResource + - Added Interface BuilderResourceUpdate + - Added Interface BuildersCreateOrUpdateHeaders + - Added Interface BuildersCreateOrUpdateOptionalParams + - Added Interface BuildersDeleteHeaders + - Added Interface BuildersDeleteOptionalParams + - Added Interface BuildersGetOptionalParams + - Added Interface BuildersListByResourceGroupNextOptionalParams + - Added Interface BuildersListByResourceGroupOptionalParams + - Added Interface BuildersListBySubscriptionNextOptionalParams + - Added Interface BuildersListBySubscriptionOptionalParams + - Added Interface BuildersUpdateHeaders + - Added Interface BuildersUpdateOptionalParams + - Added Interface BuildResource + - Added Interface BuildsCreateOrUpdateHeaders + - Added Interface BuildsCreateOrUpdateOptionalParams + - Added Interface BuildsDeleteHeaders + - Added Interface BuildsDeleteOptionalParams + - Added Interface BuildsGetOptionalParams + - Added Interface BuildsListByBuilderResourceNextOptionalParams + - Added Interface BuildsListByBuilderResourceOptionalParams - Added Interface ConnectedEnvironment - Added Interface ConnectedEnvironmentCollection - Added Interface ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams @@ -72,6 +98,7 @@ - Added Interface ContainerAppsDiagnosticsListRevisionsOptionalParams - Added Interface ContainerAppsGetAuthTokenOptionalParams - Added Interface ContainerAppsUpdateHeaders + - Added Interface ContainerRegistryWithCustomImage - Added Interface CorsPolicy - Added Interface CustomDomainConfiguration - Added Interface CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo @@ -91,10 +118,13 @@ - Added Interface DiagnosticsStatus - Added Interface DiagnosticSupportTopic - Added Interface EnvironmentAuthToken + - Added Interface EnvironmentVariable - Added Interface ErrorAdditionalInfo - Added Interface ErrorDetail - Added Interface ErrorResponse - Added Interface ExtendedLocation + - Added Interface HttpGet + - Added Interface IngressPortMapping - Added Interface IngressStickySessions - Added Interface InitContainer - Added Interface IpSecurityRestrictionRule @@ -148,6 +178,7 @@ - Added Interface ManagedEnvironmentsGetAuthTokenOptionalParams - Added Interface ManagedEnvironmentsListWorkloadProfileStatesNextOptionalParams - Added Interface ManagedEnvironmentsListWorkloadProfileStatesOptionalParams + - Added Interface PreBuildStep - Added Interface SecretVolumeItem - Added Interface TcpScaleRule - Added Interface WorkloadProfile @@ -160,6 +191,18 @@ - Added Type Alias AvailableWorkloadProfilesGetNextResponse - Added Type Alias AvailableWorkloadProfilesGetResponse - Added Type Alias BillingMetersGetResponse + - Added Type Alias BuildersCreateOrUpdateResponse + - Added Type Alias BuildersGetResponse + - Added Type Alias BuildersListByResourceGroupNextResponse + - Added Type Alias BuildersListByResourceGroupResponse + - Added Type Alias BuildersListBySubscriptionNextResponse + - Added Type Alias BuildersListBySubscriptionResponse + - Added Type Alias BuildersUpdateResponse + - Added Type Alias BuildsCreateOrUpdateResponse + - Added Type Alias BuildsGetResponse + - Added Type Alias BuildsListByBuilderResourceNextResponse + - Added Type Alias BuildsListByBuilderResourceResponse + - Added Type Alias BuildStatus - Added Type Alias ConnectedEnvironmentProvisioningState - Added Type Alias ConnectedEnvironmentsCertificatesCreateOrUpdateResponse - Added Type Alias ConnectedEnvironmentsCertificatesGetResponse @@ -182,6 +225,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 @@ -221,6 +266,7 @@ - Added Type Alias ManagedEnvironmentsListWorkloadProfileStatesNextResponse - Added Type Alias ManagedEnvironmentsListWorkloadProfileStatesResponse - Added Type Alias ManagedEnvironmentsUpdateResponse + - Added Type Alias ProvisioningState - Added Type Alias TriggerType - Interface CertificateProperties has a new optional parameter subjectAlternativeNames - Interface Configuration has a new optional parameter maxInactiveRevisions @@ -238,6 +284,7 @@ - Interface Dapr has a new optional parameter httpReadBufferSize - Interface Dapr has a new optional parameter logLevel - Interface DaprComponent has a new optional parameter secretStoreComponent + - Interface Ingress has a new optional parameter additionalPortMappings - Interface Ingress has a new optional parameter clientCertificateMode - Interface Ingress has a new optional parameter corsPolicy - Interface Ingress has a new optional parameter exposedPort @@ -250,33 +297,45 @@ - Interface ManagedEnvironment has a new optional parameter kedaConfiguration - Interface ManagedEnvironment has a new optional parameter kind - 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 ScaleRule has a new optional parameter tcp - Interface Secret has a new optional parameter identity - Interface Secret has a new optional parameter keyVaultUrl - Interface Template has a new optional parameter initContainers + - Interface Template has a new optional parameter 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 KnownBuildStatus - Added Enum KnownConnectedEnvironmentProvisioningState + - Added Enum KnownContainerAppContainerRunningState + - Added Enum KnownContainerAppReplicaRunningState - Added Enum KnownExtendedLocationTypes - Added Enum KnownIngressClientCertificateMode - Added Enum KnownJobExecutionRunningState - Added Enum KnownJobProvisioningState - Added Enum KnownLogLevel - Added Enum KnownManagedCertificateDomainControlValidation + - Added Enum KnownProvisioningState - Added Enum KnownTriggerType - Enum KnownContainerAppProvisioningState has a new value Deleting - Enum KnownIngressTransportMethod has a new value Tcp - Enum KnownStorageType has a new value Secret - Added function getContinuationToken - - Interface ContainerAppsRevisionsListRevisionsNextOptionalParams no longer has parameter filter **Breaking Changes** + - Interface ContainerAppsRevisionsListRevisionsNextOptionalParams no longer has parameter filter - Interface VnetConfiguration no longer has parameter runtimeSubnetId - Type of parameter customDomainVerificationFailureInfo of interface CustomHostnameAnalysisResult is changed from DefaultErrorResponse to CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo - Type of parameter value of interface DaprSecretsCollection is changed from Secret[] to DaprSecret[] diff --git a/sdk/appcontainers/arm-appcontainers/_meta.json b/sdk/appcontainers/arm-appcontainers/_meta.json index 39e4a36c9bb0..f9430e5fb41f 100644 --- a/sdk/appcontainers/arm-appcontainers/_meta.json +++ b/sdk/appcontainers/arm-appcontainers/_meta.json @@ -1,8 +1,8 @@ { - "commit": "c7daa3d35baaaabece0dbc6f731eadbe426973b9", + "commit": "8f4be08da1cb03d1e3616b29a6114d2848c76d79", "readme": "specification/app/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\app\\resource-manager\\readme.md --use=@autorest/typescript@6.0.1 --generate-sample=true", + "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/app/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.10", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.6.2", - "use": "@autorest/typescript@6.0.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.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 12680793840c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/assets.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "AssetsRepo": "Azure/azure-sdk-assets", - "AssetsRepoPrefixPath": "js", - "TagPrefix": "js/appcontainers/arm-appcontainers", - "Tag": "js/appcontainers/arm-appcontainers_7d4c58c2dc" -} diff --git a/sdk/appcontainers/arm-appcontainers/package.json b/sdk/appcontainers/arm-appcontainers/package.json index a5d787f733bc..ce1887824654 100644 --- a/sdk/appcontainers/arm-appcontainers/package.json +++ b/sdk/appcontainers/arm-appcontainers/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for ContainerAppsAPIClient.", - "version": "2.0.0-beta.3", + "version": "2.0.0-beta.4", "engines": { "node": ">=14.0.0" }, @@ -36,7 +36,7 @@ "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", @@ -111,13 +111,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appcontainers/arm-appcontainers", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-appcontainers?view=azure-node-preview" - } + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appcontainers/arm-appcontainers" } \ No newline at end of file diff --git a/sdk/appcontainers/arm-appcontainers/review/arm-appcontainers.api.md b/sdk/appcontainers/arm-appcontainers/review/arm-appcontainers.api.md index f5237442ba13..90c0e64430a5 100644 --- a/sdk/appcontainers/arm-appcontainers/review/arm-appcontainers.api.md +++ b/sdk/appcontainers/arm-appcontainers/review/arm-appcontainers.api.md @@ -234,6 +234,205 @@ export type BillingMetersGetResponse = BillingMeterCollection; // @public export type BindingType = string; +// @public +export interface BuildCollection { + nextLink?: string; + value: BuildResource[]; +} + +// @public +export interface BuildConfiguration { + baseOs?: string; + environmentVariables?: EnvironmentVariable[]; + platform?: string; + platformVersion?: string; + preBuildSteps?: PreBuildStep[]; +} + +// @public +export interface BuilderCollection { + nextLink?: string; + value: BuilderResource[]; +} + +// @public +export interface BuilderResource extends TrackedResource { + readonly buildComputeId?: string; + environmentId?: string; + identity?: ManagedServiceIdentity; + readonly patchComputeId?: string; + readonly provisioningState?: ProvisioningState; +} + +// @public +export interface BuilderResourceUpdate { + environmentId?: string; + identity?: ManagedServiceIdentity; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface Builders { + beginCreateOrUpdate(resourceGroupName: string, builderName: string, builderEnvelope: BuilderResource, options?: BuildersCreateOrUpdateOptionalParams): Promise, BuildersCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, builderName: string, builderEnvelope: BuilderResource, options?: BuildersCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, builderName: string, options?: BuildersDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, builderName: string, options?: BuildersDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, builderName: string, builderEnvelope: BuilderResourceUpdate, options?: BuildersUpdateOptionalParams): Promise, BuildersUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, builderName: string, builderEnvelope: BuilderResourceUpdate, options?: BuildersUpdateOptionalParams): Promise; + get(resourceGroupName: string, builderName: string, options?: BuildersGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: BuildersListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: BuildersListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface BuildersCreateOrUpdateHeaders { + // (undocumented) + azureAsyncOperation?: string; +} + +// @public +export interface BuildersCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type BuildersCreateOrUpdateResponse = BuilderResource; + +// @public +export interface BuildersDeleteHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface BuildersDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface BuildersGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BuildersGetResponse = BuilderResource; + +// @public +export interface BuildersListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BuildersListByResourceGroupNextResponse = BuilderCollection; + +// @public +export interface BuildersListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BuildersListByResourceGroupResponse = BuilderCollection; + +// @public +export interface BuildersListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BuildersListBySubscriptionNextResponse = BuilderCollection; + +// @public +export interface BuildersListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BuildersListBySubscriptionResponse = BuilderCollection; + +// @public +export interface BuildersUpdateHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface BuildersUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type BuildersUpdateResponse = BuilderResource; + +// @public +export interface BuildResource extends ProxyResource { + readonly buildStatus?: BuildStatus; + configuration?: BuildConfiguration; + destinationContainerRegistry?: ContainerRegistryWithCustomImage; + readonly provisioningState?: ProvisioningState; + readonly uploadEndpoint?: string; +} + +// @public +export interface Builds { + beginCreateOrUpdate(resourceGroupName: string, builderName: string, buildName: string, buildEnvelope: BuildResource, options?: BuildsCreateOrUpdateOptionalParams): Promise, BuildsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, builderName: string, buildName: string, buildEnvelope: BuildResource, options?: BuildsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, builderName: string, buildName: string, options?: BuildsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, builderName: string, buildName: string, options?: BuildsDeleteOptionalParams): Promise; + get(resourceGroupName: string, builderName: string, buildName: string, options?: BuildsGetOptionalParams): Promise; + listByBuilderResource(resourceGroupName: string, builderName: string, options?: BuildsListByBuilderResourceOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface BuildsCreateOrUpdateHeaders { + // (undocumented) + azureAsyncOperation?: string; +} + +// @public +export interface BuildsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type BuildsCreateOrUpdateResponse = BuildResource; + +// @public +export interface BuildsDeleteHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface BuildsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface BuildsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BuildsGetResponse = BuildResource; + +// @public +export interface BuildsListByBuilderResourceNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BuildsListByBuilderResourceNextResponse = BuildCollection; + +// @public +export interface BuildsListByBuilderResourceOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BuildsListByBuilderResourceResponse = BuildCollection; + +// @public +export type BuildStatus = string; + // @public export interface Certificate extends TrackedResource { properties?: CertificateProperties; @@ -635,6 +834,9 @@ export interface ContainerAppCollection { value: ContainerApp[]; } +// @public +export type ContainerAppContainerRunningState = string; + // @public export interface ContainerAppJobExecutions { readonly nextLink?: string; @@ -678,6 +880,9 @@ 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>>; @@ -706,6 +911,10 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { // (undocumented) billingMeters: BillingMeters; // (undocumented) + builders: Builders; + // (undocumented) + builds: Builds; + // (undocumented) certificates: Certificates; // (undocumented) connectedEnvironments: ConnectedEnvironments; @@ -1067,6 +1276,13 @@ export interface ContainerAppsUpdateOptionalParams extends coreClient.OperationO // @public export type ContainerAppsUpdateResponse = ContainerApp; +// @public +export interface ContainerRegistryWithCustomImage { + identity: string; + image?: string; + server: string; +} + // @public export interface ContainerResources { cpu?: number; @@ -1392,6 +1608,12 @@ export interface EnvironmentVar { value?: string; } +// @public +export interface EnvironmentVariable { + name: string; + value: string; +} + // @public export interface ErrorAdditionalInfo { readonly info?: Record; @@ -1476,6 +1698,13 @@ export interface Google { validation?: AllowedAudiencesValidation; } +// @public +export interface HttpGet { + fileName?: string; + headers?: string[]; + url: string; +} + // @public export interface HttpScaleRule { auth?: ScaleRuleAuth[]; @@ -1512,6 +1741,7 @@ export interface IdentityProviders { // @public export interface Ingress { + additionalPortMappings?: IngressPortMapping[]; allowInsecure?: boolean; clientCertificateMode?: IngressClientCertificateMode; corsPolicy?: CorsPolicy; @@ -1529,6 +1759,13 @@ export interface Ingress { // @public export type IngressClientCertificateMode = string; +// @public +export interface IngressPortMapping { + exposedPort?: number; + external: boolean; + targetPort: number; +} + // @public export interface IngressStickySessions { affinity?: Affinity; @@ -1879,6 +2116,15 @@ export enum KnownBindingType { SniEnabled = "SniEnabled" } +// @public +export enum KnownBuildStatus { + Canceled = "Canceled", + Failed = "Failed", + InProgress = "InProgress", + NotStarted = "NotStarted", + Succeeded = "Succeeded" +} + // @public export enum KnownCertificateProvisioningState { Canceled = "Canceled", @@ -1906,6 +2152,13 @@ export enum KnownConnectedEnvironmentProvisioningState { Waiting = "Waiting" } +// @public +export enum KnownContainerAppContainerRunningState { + Running = "Running", + Terminated = "Terminated", + Waiting = "Waiting" +} + // @public export enum KnownContainerAppProvisioningState { Canceled = "Canceled", @@ -1915,6 +2168,13 @@ export enum KnownContainerAppProvisioningState { Succeeded = "Succeeded" } +// @public +export enum KnownContainerAppReplicaRunningState { + NotRunning = "NotRunning", + Running = "Running", + Unknown = "Unknown" +} + // @public export enum KnownCreatedByType { Application = "Application", @@ -2000,6 +2260,15 @@ export enum KnownManagedServiceIdentityType { UserAssigned = "UserAssigned" } +// @public +export enum KnownProvisioningState { + Canceled = "Canceled", + Deleting = "Deleting", + Failed = "Failed", + InProgress = "InProgress", + Succeeded = "Succeeded" +} + // @public export enum KnownRevisionHealthState { Healthy = "Healthy", @@ -2456,6 +2725,16 @@ export interface OperationsListOptionalParams extends coreClient.OperationOption // @public export type OperationsListResponse = AvailableOperations; +// @public +export interface PreBuildStep { + description?: string; + httpGet?: HttpGet; + scripts?: string[]; +} + +// @public +export type ProvisioningState = string; + // @public export interface ProxyResource extends Resource { } @@ -2486,6 +2765,9 @@ export interface RegistryInfo { export interface Replica extends ProxyResource { containers?: ReplicaContainer[]; readonly createdTime?: Date; + initContainers?: ReplicaContainer[]; + readonly runningState?: ContainerAppReplicaRunningState; + readonly runningStateDetails?: string; } // @public @@ -2501,6 +2783,8 @@ export interface ReplicaContainer { name?: string; ready?: boolean; restartCount?: number; + readonly runningState?: ContainerAppContainerRunningState; + readonly runningStateDetails?: string; started?: boolean; } @@ -2626,6 +2910,7 @@ export interface Template { initContainers?: InitContainer[]; revisionSuffix?: string; scale?: Scale; + terminationGracePeriodSeconds?: number; volumes?: Volume[]; } @@ -2683,6 +2968,7 @@ export interface VnetConfiguration { // @public export interface Volume { + mountOptions?: string; name?: string; secrets?: SecretVolumeItem[]; storageName?: string; @@ -2692,6 +2978,7 @@ export interface Volume { // @public export interface VolumeMount { mountPath?: string; + subPath?: string; volumeName?: string; } diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/availableWorkloadProfilesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/availableWorkloadProfilesGetSample.ts deleted file mode 100644 index c1b852734e23..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/availableWorkloadProfilesGetSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get all available workload profiles for a location. - * - * @summary Get all available workload profiles for a location. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AvailableWorkloadProfiles_Get.json - */ -async function billingMetersGet() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const location = "East US"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.availableWorkloadProfiles.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - billingMetersGet(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/billingMetersGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/billingMetersGetSample.ts deleted file mode 100644 index 6ef7d5fe2483..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/billingMetersGetSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get all billingMeters for a location. - * - * @summary Get all billingMeters for a location. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/BillingMeters_Get.json - */ -async function billingMetersGet() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const location = "East US"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.billingMeters.get(location); - console.log(result); -} - -async function main() { - billingMetersGet(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesCreateOrUpdateSample.ts deleted file mode 100644 index 427265a7faf6..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesCreateOrUpdateSample.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - Certificate, - CertificatesCreateOrUpdateOptionalParams, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create or Update a Certificate. - * - * @summary Create or Update a Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificate_CreateOrUpdate.json - */ -async function createOrUpdateCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const certificateEnvelope: Certificate = { - location: "East US", - properties: { - password: "private key password", - value: Buffer.from("Y2VydA==") - } - }; - const options: CertificatesCreateOrUpdateOptionalParams = { - certificateEnvelope - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.createOrUpdate( - resourceGroupName, - environmentName, - certificateName, - options - ); - console.log(result); -} - -async function main() { - createOrUpdateCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesDeleteSample.ts deleted file mode 100644 index 921aea9b75bc..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified Certificate. - * - * @summary Deletes the specified Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificate_Delete.json - */ -async function deleteCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.delete( - resourceGroupName, - environmentName, - certificateName - ); - console.log(result); -} - -async function main() { - deleteCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesGetSample.ts deleted file mode 100644 index 9ea615439f30..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the specified Certificate. - * - * @summary Get the specified Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificate_Get.json - */ -async function getCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.get( - resourceGroupName, - environmentName, - certificateName - ); - console.log(result); -} - -async function main() { - getCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesListSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesListSample.ts deleted file mode 100644 index ed459b096c87..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesListSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the Certificates in a given managed environment. - * - * @summary Get the Certificates in a given managed environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificates_ListByManagedEnvironment.json - */ -async function listCertificatesByManagedEnvironment() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.certificates.list( - resourceGroupName, - environmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listCertificatesByManagedEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesUpdateSample.ts deleted file mode 100644 index 3256b0faa04a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - CertificatePatch, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patches a certificate. Currently only patching of tags is supported - * - * @summary Patches a certificate. Currently only patching of tags is supported - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificates_Patch.json - */ -async function patchCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const certificateEnvelope: CertificatePatch = { - tags: { tag1: "value1", tag2: "value2" } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.update( - resourceGroupName, - environmentName, - certificateName, - certificateEnvelope - ); - console.log(result); -} - -async function main() { - patchCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesCreateOrUpdateSample.ts deleted file mode 100644 index 4e3287d0f52c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesCreateOrUpdateSample.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - Certificate, - ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create or Update a Certificate. - * - * @summary Create or Update a Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json - */ -async function createOrUpdateCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const certificateEnvelope: Certificate = { - location: "East US", - properties: { - password: "private key password", - value: Buffer.from("Y2VydA==") - } - }; - const options: ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams = { - certificateEnvelope - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsCertificates.createOrUpdate( - resourceGroupName, - connectedEnvironmentName, - certificateName, - options - ); - console.log(result); -} - -async function main() { - createOrUpdateCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesDeleteSample.ts deleted file mode 100644 index ec12520c0494..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified Certificate. - * - * @summary Deletes the specified Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificate_Delete.json - */ -async function deleteCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsCertificates.delete( - resourceGroupName, - connectedEnvironmentName, - certificateName - ); - console.log(result); -} - -async function main() { - deleteCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesGetSample.ts deleted file mode 100644 index e1baa23f157d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the specified Certificate. - * - * @summary Get the specified Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificate_Get.json - */ -async function getCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsCertificates.get( - resourceGroupName, - connectedEnvironmentName, - certificateName - ); - console.log(result); -} - -async function main() { - getCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesListSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesListSample.ts deleted file mode 100644 index 9a1ade0f3c50..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesListSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the Certificates in a given connected environment. - * - * @summary Get the Certificates in a given connected environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json - */ -async function listCertificatesByConnectedEnvironment() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.connectedEnvironmentsCertificates.list( - resourceGroupName, - connectedEnvironmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listCertificatesByConnectedEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesUpdateSample.ts deleted file mode 100644 index 315475d52aaa..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - CertificatePatch, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patches a certificate. Currently only patching of tags is supported - * - * @summary Patches a certificate. Currently only patching of tags is supported - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificates_Patch.json - */ -async function patchCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const certificateEnvelope: CertificatePatch = { - tags: { tag1: "value1", tag2: "value2" } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsCertificates.update( - resourceGroupName, - connectedEnvironmentName, - certificateName, - certificateEnvelope - ); - console.log(result); -} - -async function main() { - patchCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCheckNameAvailabilitySample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCheckNameAvailabilitySample.ts deleted file mode 100644 index 4e1459b577df..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCheckNameAvailabilitySample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - CheckNameAvailabilityRequest, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Checks if resource connectedEnvironmentName is available. - * - * @summary Checks if resource connectedEnvironmentName is available. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json - */ -async function certificatesCheckNameAvailability() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const checkNameAvailabilityRequest: CheckNameAvailabilityRequest = { - name: "testcertificatename", - type: "Microsoft.App/connectedEnvironments/certificates" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.checkNameAvailability( - resourceGroupName, - connectedEnvironmentName, - checkNameAvailabilityRequest - ); - console.log(result); -} - -async function main() { - certificatesCheckNameAvailability(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCreateOrUpdateSample.ts deleted file mode 100644 index 414997d18432..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ConnectedEnvironment, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates an connectedEnvironment. - * - * @summary Creates or updates an connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_CreateOrUpdate.json - */ -async function createKubeEnvironments() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testenv"; - const environmentEnvelope: ConnectedEnvironment = { - customDomainConfiguration: { - certificatePassword: "private key password", - certificateValue: Buffer.from("Y2VydA=="), - dnsSuffix: "www.my-name.com" - }, - daprAIConnectionString: - "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/", - location: "East US", - staticIp: "1.2.3.4" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.beginCreateOrUpdateAndWait( - resourceGroupName, - connectedEnvironmentName, - environmentEnvelope - ); - console.log(result); -} - -async function main() { - createKubeEnvironments(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.ts deleted file mode 100644 index ed5bcbcf828c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - DaprComponent, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a Dapr Component in a connected environment. - * - * @summary Creates or updates a Dapr Component in a connected environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json - */ -async function createOrUpdateDaprComponent() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const componentName = "reddog"; - const daprComponentEnvelope: DaprComponent = { - componentType: "state.azure.cosmosdb", - ignoreErrors: false, - initTimeout: "50s", - metadata: [ - { name: "url", value: "" }, - { name: "database", value: "itemsDB" }, - { name: "collection", value: "items" }, - { name: "masterkey", secretRef: "masterkey" } - ], - scopes: ["container-app-1", "container-app-2"], - secrets: [{ name: "masterkey", value: "keyvalue" }], - version: "v1" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsDaprComponents.createOrUpdate( - resourceGroupName, - connectedEnvironmentName, - componentName, - daprComponentEnvelope - ); - console.log(result); -} - -async function main() { - createOrUpdateDaprComponent(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsDeleteSample.ts deleted file mode 100644 index 368ecf926c6a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a Dapr Component from a connected environment. - * - * @summary Delete a Dapr Component from a connected environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_Delete.json - */ -async function deleteDaprComponent() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsDaprComponents.delete( - resourceGroupName, - connectedEnvironmentName, - componentName - ); - console.log(result); -} - -async function main() { - deleteDaprComponent(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsGetSample.ts deleted file mode 100644 index e2786d2c7fa3..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a dapr component. - * - * @summary Get a dapr component. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json - */ -async function getDaprComponent() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsDaprComponents.get( - resourceGroupName, - connectedEnvironmentName, - componentName - ); - console.log(result); -} - -async function main() { - getDaprComponent(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsListSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsListSample.ts deleted file mode 100644 index 19094d5d885e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsListSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the Dapr Components for a connected environment. - * - * @summary Get the Dapr Components for a connected environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_List.json - */ -async function listDaprComponents() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.connectedEnvironmentsDaprComponents.list( - resourceGroupName, - connectedEnvironmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listDaprComponents(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsListSecretsSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsListSecretsSample.ts deleted file mode 100644 index 557f3b108cc1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsListSecretsSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List secrets for a dapr component - * - * @summary List secrets for a dapr component - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json - */ -async function listContainerAppsSecrets() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsDaprComponents.listSecrets( - resourceGroupName, - connectedEnvironmentName, - componentName - ); - console.log(result); -} - -async function main() { - listContainerAppsSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDeleteSample.ts deleted file mode 100644 index 26674465f43a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDeleteSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete an connectedEnvironment. - * - * @summary Delete an connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_Delete.json - */ -async function deleteConnectedEnvironmentByConnectedEnvironmentName() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "examplekenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.beginDeleteAndWait( - resourceGroupName, - connectedEnvironmentName - ); - console.log(result); -} - -async function main() { - deleteConnectedEnvironmentByConnectedEnvironmentName(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsGetSample.ts deleted file mode 100644 index d89d060736a1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the properties of an connectedEnvironment. - * - * @summary Get the properties of an connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_Get.json - */ -async function getConnectedEnvironmentByConnectedEnvironmentName() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "examplekenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.get( - resourceGroupName, - connectedEnvironmentName - ); - console.log(result); -} - -async function main() { - getConnectedEnvironmentByConnectedEnvironmentName(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsListByResourceGroupSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsListByResourceGroupSample.ts deleted file mode 100644 index 725f561968c0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get all connectedEnvironments in a resource group. - * - * @summary Get all connectedEnvironments in a resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_ListByResourceGroup.json - */ -async function listEnvironmentsByResourceGroup() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.connectedEnvironments.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listEnvironmentsByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsListBySubscriptionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsListBySubscriptionSample.ts deleted file mode 100644 index e52528c74c64..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsListBySubscriptionSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get all connectedEnvironments for a subscription. - * - * @summary Get all connectedEnvironments for a subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_ListBySubscription.json - */ -async function listConnectedEnvironmentsBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.connectedEnvironments.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listConnectedEnvironmentsBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesCreateOrUpdateSample.ts deleted file mode 100644 index 159b0fd37e02..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesCreateOrUpdateSample.ts +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ConnectedEnvironmentStorage, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create or update storage for a connectedEnvironment. - * - * @summary Create or update storage for a connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json - */ -async function createOrUpdateEnvironmentsStorage() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "env"; - const storageName = "jlaw-demo1"; - const storageEnvelope: ConnectedEnvironmentStorage = { - properties: { - azureFile: { - accessMode: "ReadOnly", - accountKey: "key", - accountName: "account1", - shareName: "share1" - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsStorages.createOrUpdate( - resourceGroupName, - connectedEnvironmentName, - storageName, - storageEnvelope - ); - console.log(result); -} - -async function main() { - createOrUpdateEnvironmentsStorage(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesDeleteSample.ts deleted file mode 100644 index 119a17a00f5e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete storage for a connectedEnvironment. - * - * @summary Delete storage for a connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_Delete.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "env"; - const storageName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsStorages.delete( - resourceGroupName, - connectedEnvironmentName, - storageName - ); - console.log(result); -} - -async function main() { - listEnvironmentsStoragesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesGetSample.ts deleted file mode 100644 index 069492c1d62d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get storage for a connectedEnvironment. - * - * @summary Get storage for a connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_Get.json - */ -async function getAEnvironmentsStoragePropertiesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "env"; - const storageName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsStorages.get( - resourceGroupName, - connectedEnvironmentName, - storageName - ); - console.log(result); -} - -async function main() { - getAEnvironmentsStoragePropertiesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesListSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesListSample.ts deleted file mode 100644 index d26e9c473719..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesListSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get all storages for a connectedEnvironment. - * - * @summary Get all storages for a connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_List.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "managedEnv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsStorages.list( - resourceGroupName, - connectedEnvironmentName - ); - console.log(result); -} - -async function main() { - listEnvironmentsStoragesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsUpdateSample.ts deleted file mode 100644 index f0cf7d8cc859..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsUpdateSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patches a Managed Environment. Only patching of tags is supported currently - * - * @summary Patches a Managed Environment. Only patching of tags is supported currently - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_Patch.json - */ -async function patchManagedEnvironment() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.update( - resourceGroupName, - connectedEnvironmentName - ); - console.log(result); -} - -async function main() { - patchManagedEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsCreateOrUpdateSample.ts deleted file mode 100644 index f743fdf5197b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsCreateOrUpdateSample.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AuthConfig, ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create or update the AuthConfig for a Container App. - * - * @summary Create or update the AuthConfig for a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AuthConfigs_CreateOrUpdate.json - */ -async function createOrUpdateContainerAppAuthConfig() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const authConfigName = "current"; - const authConfigEnvelope: AuthConfig = { - globalValidation: { unauthenticatedClientAction: "AllowAnonymous" }, - identityProviders: { - facebook: { - registration: { appId: "123", appSecretSettingName: "facebook-secret" } - } - }, - platform: { enabled: true } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.createOrUpdate( - resourceGroupName, - containerAppName, - authConfigName, - authConfigEnvelope - ); - console.log(result); -} - -async function main() { - createOrUpdateContainerAppAuthConfig(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsDeleteSample.ts deleted file mode 100644 index a9b70f9d41d0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a Container App AuthConfig. - * - * @summary Delete a Container App AuthConfig. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AuthConfigs_Delete.json - */ -async function deleteContainerAppAuthConfig() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const authConfigName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.delete( - resourceGroupName, - containerAppName, - authConfigName - ); - console.log(result); -} - -async function main() { - deleteContainerAppAuthConfig(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsGetSample.ts deleted file mode 100644 index 57ae061a7b34..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a AuthConfig of a Container App. - * - * @summary Get a AuthConfig of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AuthConfigs_Get.json - */ -async function getContainerAppAuthConfig() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const authConfigName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.get( - resourceGroupName, - containerAppName, - authConfigName - ); - console.log(result); -} - -async function main() { - getContainerAppAuthConfig(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsListByContainerAppSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsListByContainerAppSample.ts deleted file mode 100644 index 7d0de398ec27..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsListByContainerAppSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the Container App AuthConfigs in a given resource group. - * - * @summary Get the Container App AuthConfigs in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AuthConfigs_ListByContainer.json - */ -async function listAuthConfigsByContainerApps() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsAuthConfigs.listByContainerApp( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAuthConfigsByContainerApps(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsCreateOrUpdateSample.ts deleted file mode 100644 index 4cbf4f4ae1e8..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsCreateOrUpdateSample.ts +++ /dev/null @@ -1,281 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerApp, ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create or update a Container App. - * - * @summary Create or update a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_CreateOrUpdate.json - */ -async function createOrUpdateContainerApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const containerAppEnvelope: ContainerApp = { - configuration: { - dapr: { - appPort: 3000, - appProtocol: "http", - enableApiLogging: true, - enabled: true, - httpMaxRequestSize: 10, - httpReadBufferSize: 30, - logLevel: "debug" - }, - ingress: { - clientCertificateMode: "accept", - corsPolicy: { - allowCredentials: true, - allowedHeaders: ["HEADER1", "HEADER2"], - allowedMethods: ["GET", "POST"], - allowedOrigins: ["https://a.test.com", "https://b.test.com"], - exposeHeaders: ["HEADER3", "HEADER4"], - maxAge: 1234 - }, - customDomains: [ - { - name: "www.my-name.com", - bindingType: "SniEnabled", - certificateId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com" - }, - { - name: "www.my-other-name.com", - bindingType: "SniEnabled", - certificateId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com" - } - ], - external: true, - ipSecurityRestrictions: [ - { - name: "Allow work IP A subnet", - description: - "Allowing all IP's within the subnet below to access containerapp", - action: "Allow", - ipAddressRange: "192.168.1.1/32" - }, - { - name: "Allow work IP B subnet", - description: - "Allowing all IP's within the subnet below to access containerapp", - action: "Allow", - ipAddressRange: "192.168.1.1/8" - } - ], - stickySessions: { affinity: "sticky" }, - targetPort: 3000, - traffic: [ - { - label: "production", - revisionName: "testcontainerApp0-ab1234", - weight: 100 - } - ] - }, - maxInactiveRevisions: 10 - }, - environmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - location: "East US", - template: { - containers: [ - { - name: "testcontainerApp0", - image: "repo/testcontainerApp0:v1", - probes: [ - { - type: "Liveness", - httpGet: { - path: "/health", - httpHeaders: [{ name: "Custom-Header", value: "Awesome" }], - port: 8080 - }, - initialDelaySeconds: 3, - periodSeconds: 3 - } - ] - } - ], - initContainers: [ - { - name: "testinitcontainerApp0", - args: ["-c", "while true; do echo hello; sleep 10;done"], - command: ["/bin/sh"], - image: "repo/testcontainerApp0:v4", - resources: { cpu: 0.2, memory: "100Mi" } - } - ], - scale: { - maxReplicas: 5, - minReplicas: 1, - rules: [ - { - name: "httpscalingrule", - custom: { type: "http", metadata: { concurrentRequests: "50" } } - } - ] - } - }, - workloadProfileName: "My-GP-01" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginCreateOrUpdateAndWait( - resourceGroupName, - containerAppName, - containerAppEnvelope - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a Container App. - * - * @summary Create or update a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_ManagedBy_CreateOrUpdate.json - */ -async function createOrUpdateManagedByApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerAppManagedBy"; - const containerAppEnvelope: ContainerApp = { - configuration: { - ingress: { - exposedPort: 4000, - external: true, - targetPort: 3000, - traffic: [ - { revisionName: "testcontainerAppManagedBy-ab1234", weight: 100 } - ], - transport: "tcp" - } - }, - environmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - location: "East US", - managedBy: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.AppPlatform/Spring/springapp", - template: { - containers: [ - { - name: "testcontainerAppManagedBy", - image: "repo/testcontainerAppManagedBy:v1", - probes: [ - { - type: "Liveness", - initialDelaySeconds: 3, - periodSeconds: 3, - tcpSocket: { port: 8080 } - } - ] - } - ], - scale: { - maxReplicas: 5, - minReplicas: 1, - rules: [ - { - name: "tcpscalingrule", - tcp: { metadata: { concurrentConnections: "50" } } - } - ] - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginCreateOrUpdateAndWait( - resourceGroupName, - containerAppName, - containerAppEnvelope - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a Container App. - * - * @summary Create or update a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_TcpApp_CreateOrUpdate.json - */ -async function createOrUpdateTcpApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerAppTcp"; - const containerAppEnvelope: ContainerApp = { - configuration: { - ingress: { - exposedPort: 4000, - external: true, - targetPort: 3000, - traffic: [{ revisionName: "testcontainerAppTcp-ab1234", weight: 100 }], - transport: "tcp" - } - }, - environmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - location: "East US", - template: { - containers: [ - { - name: "testcontainerAppTcp", - image: "repo/testcontainerAppTcp:v1", - probes: [ - { - type: "Liveness", - initialDelaySeconds: 3, - periodSeconds: 3, - tcpSocket: { port: 8080 } - } - ] - } - ], - scale: { - maxReplicas: 5, - minReplicas: 1, - rules: [ - { - name: "tcpscalingrule", - tcp: { metadata: { concurrentConnections: "50" } } - } - ] - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginCreateOrUpdateAndWait( - resourceGroupName, - containerAppName, - containerAppEnvelope - ); - console.log(result); -} - -async function main() { - createOrUpdateContainerApp(); - createOrUpdateManagedByApp(); - createOrUpdateTcpApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDeleteSample.ts deleted file mode 100644 index 7086851d39ec..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDeleteSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a Container App. - * - * @summary Delete a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_Delete.json - */ -async function deleteContainerApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testWorkerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginDeleteAndWait( - resourceGroupName, - containerAppName - ); - console.log(result); -} - -async function main() { - deleteContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetDetectorSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetDetectorSample.ts deleted file mode 100644 index f516f414c4ae..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetDetectorSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a diagnostics result of a Container App. - * - * @summary Get a diagnostics result of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerAppsDiagnostics_Get.json - */ -async function getContainerAppDiagnosticsInfo() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "mikono-workerapp-test-rg"; - const containerAppName = "mikono-capp-stage1"; - const detectorName = "cappcontainerappnetworkIO"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsDiagnostics.getDetector( - resourceGroupName, - containerAppName, - detectorName - ); - console.log(result); -} - -async function main() { - getContainerAppDiagnosticsInfo(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetRevisionSample.ts deleted file mode 100644 index 6ca77f4c5ed3..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetRevisionSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a revision of a Container App. - * - * @summary Get a revision of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Get.json - */ -async function getContainerAppRevision() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsDiagnostics.getRevision( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -async function main() { - getContainerAppRevision(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetRootSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetRootSample.ts deleted file mode 100644 index c2f517b46b68..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetRootSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the properties of a Container App. - * - * @summary Get the properties of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_Get.json - */ -async function getContainerApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsDiagnostics.getRoot( - resourceGroupName, - containerAppName - ); - console.log(result); -} - -async function main() { - getContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsListDetectorsSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsListDetectorsSample.ts deleted file mode 100644 index ef8e3f8befcf..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsListDetectorsSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the list of diagnostics for a given Container App. - * - * @summary Get the list of diagnostics for a given Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerAppsDiagnostics_List.json - */ -async function getTheListOfAvailableDiagnosticsForAGivenContainerApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "mikono-workerapp-test-rg"; - const containerAppName = "mikono-capp-stage1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsDiagnostics.listDetectors( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getTheListOfAvailableDiagnosticsForAGivenContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsListRevisionsSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsListRevisionsSample.ts deleted file mode 100644 index fe96c4e59354..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsListRevisionsSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the Revisions for a given Container App. - * - * @summary Get the Revisions for a given Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_List.json - */ -async function listContainerAppRevisions() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsDiagnostics.listRevisions( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listContainerAppRevisions(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsGetAuthTokenSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsGetAuthTokenSample.ts deleted file mode 100644 index 17bf7b42e400..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsGetAuthTokenSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get auth token for a container app - * - * @summary Get auth token for a container app - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_GetAuthToken.json - */ -async function getContainerAppAuthToken() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.getAuthToken( - resourceGroupName, - containerAppName - ); - console.log(result); -} - -async function main() { - getContainerAppAuthToken(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsGetSample.ts deleted file mode 100644 index a80cebb595e1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsGetSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the properties of a Container App. - * - * @summary Get the properties of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_Get.json - */ -async function getContainerApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.get( - resourceGroupName, - containerAppName - ); - console.log(result); -} - -async function main() { - getContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListByResourceGroupSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListByResourceGroupSample.ts deleted file mode 100644 index 6be535aba06b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListByResourceGroupSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the Container Apps in a given resource group. - * - * @summary Get the Container Apps in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_ListByResourceGroup.json - */ -async function listContainerAppsByResourceGroup() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerApps.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listContainerAppsByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListBySubscriptionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListBySubscriptionSample.ts deleted file mode 100644 index 0cd8131f30b2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListBySubscriptionSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the Container Apps in a given subscription. - * - * @summary Get the Container Apps in a given subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_ListBySubscription.json - */ -async function listContainerAppsBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerApps.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listContainerAppsBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListCustomHostNameAnalysisSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListCustomHostNameAnalysisSample.ts deleted file mode 100644 index e460aca3b631..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListCustomHostNameAnalysisSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ContainerAppsListCustomHostNameAnalysisOptionalParams, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Analyzes a custom hostname for a Container App - * - * @summary Analyzes a custom hostname for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json - */ -async function analyzeCustomHostname() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const customHostname = "my.name.corp"; - const options: ContainerAppsListCustomHostNameAnalysisOptionalParams = { - customHostname - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.listCustomHostNameAnalysis( - resourceGroupName, - containerAppName, - options - ); - console.log(result); -} - -async function main() { - analyzeCustomHostname(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListSecretsSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListSecretsSample.ts deleted file mode 100644 index 856e856c4d63..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListSecretsSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List secrets for a container app - * - * @summary List secrets for a container app - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_ListSecrets.json - */ -async function listContainerAppsSecrets() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.listSecrets( - resourceGroupName, - containerAppName - ); - console.log(result); -} - -async function main() { - listContainerAppsSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionReplicasGetReplicaSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionReplicasGetReplicaSample.ts deleted file mode 100644 index 79112d9282a9..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionReplicasGetReplicaSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a replica for a Container App Revision. - * - * @summary Get a replica for a Container App Revision. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Replicas_Get.json - */ -async function getContainerAppRevisionReplica() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "myapp"; - const revisionName = "myapp--0wlqy09"; - const replicaName = "myapp--0wlqy09-5d9774cff-5wnd8"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisionReplicas.getReplica( - resourceGroupName, - containerAppName, - revisionName, - replicaName - ); - console.log(result); -} - -async function main() { - getContainerAppRevisionReplica(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionReplicasListReplicasSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionReplicasListReplicasSample.ts deleted file mode 100644 index cfd0c66be596..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionReplicasListReplicasSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List replicas for a Container App Revision. - * - * @summary List replicas for a Container App Revision. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Replicas_List.json - */ -async function listContainerAppReplicas() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "myapp"; - const revisionName = "myapp--0wlqy09"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisionReplicas.listReplicas( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -async function main() { - listContainerAppReplicas(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsActivateRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsActivateRevisionSample.ts deleted file mode 100644 index 0648b97690da..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsActivateRevisionSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Activates a revision for a Container App - * - * @summary Activates a revision for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Activate.json - */ -async function activateContainerAppRevision() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.activateRevision( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -async function main() { - activateContainerAppRevision(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsDeactivateRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsDeactivateRevisionSample.ts deleted file mode 100644 index 7b01102d463c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsDeactivateRevisionSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deactivates a revision for a Container App - * - * @summary Deactivates a revision for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Deactivate.json - */ -async function deactivateContainerAppRevision() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.deactivateRevision( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -async function main() { - deactivateContainerAppRevision(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsGetRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsGetRevisionSample.ts deleted file mode 100644 index 573af0e63fe9..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsGetRevisionSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a revision of a Container App. - * - * @summary Get a revision of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Get.json - */ -async function getContainerAppRevision() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.getRevision( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -async function main() { - getContainerAppRevision(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsListRevisionsSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsListRevisionsSample.ts deleted file mode 100644 index 23c0160be4ec..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsListRevisionsSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the Revisions for a given Container App. - * - * @summary Get the Revisions for a given Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_List.json - */ -async function listContainerAppRevisions() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsRevisions.listRevisions( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listContainerAppRevisions(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsRestartRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsRestartRevisionSample.ts deleted file mode 100644 index 885c3cb1ed9e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsRestartRevisionSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Restarts a revision for a Container App - * - * @summary Restarts a revision for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Restart.json - */ -async function restartContainerAppRevision() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testStaticSite0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.restartRevision( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -async function main() { - restartContainerAppRevision(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsCreateOrUpdateSample.ts deleted file mode 100644 index 2b38efb5b1b4..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsCreateOrUpdateSample.ts +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - SourceControl, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create or update the SourceControl for a Container App. - * - * @summary Create or update the SourceControl for a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/SourceControls_CreateOrUpdate.json - */ -async function createOrUpdateContainerAppSourceControl() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const sourceControlName = "current"; - const sourceControlEnvelope: SourceControl = { - branch: "master", - githubActionConfiguration: { - azureCredentials: { - clientId: "", - clientSecret: "", - tenantId: "" - }, - contextPath: "./", - image: "image/tag", - registryInfo: { - registryPassword: "", - registryUrl: "xwang971reg.azurecr.io", - registryUserName: "xwang971reg" - } - }, - repoUrl: "https://github.com/xwang971/ghatest" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.beginCreateOrUpdateAndWait( - resourceGroupName, - containerAppName, - sourceControlName, - sourceControlEnvelope - ); - console.log(result); -} - -async function main() { - createOrUpdateContainerAppSourceControl(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsDeleteSample.ts deleted file mode 100644 index fb82577bcc18..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a Container App SourceControl. - * - * @summary Delete a Container App SourceControl. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/SourceControls_Delete.json - */ -async function deleteContainerAppSourceControl() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const sourceControlName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.beginDeleteAndWait( - resourceGroupName, - containerAppName, - sourceControlName - ); - console.log(result); -} - -async function main() { - deleteContainerAppSourceControl(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsGetSample.ts deleted file mode 100644 index a92818f309c6..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a SourceControl of a Container App. - * - * @summary Get a SourceControl of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/SourceControls_Get.json - */ -async function getContainerAppSourceControl() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const sourceControlName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.get( - resourceGroupName, - containerAppName, - sourceControlName - ); - console.log(result); -} - -async function main() { - getContainerAppSourceControl(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsListByContainerAppSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsListByContainerAppSample.ts deleted file mode 100644 index d0c34cdbbe13..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsListByContainerAppSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the Container App SourceControls in a given resource group. - * - * @summary Get the Container App SourceControls in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/SourceControls_ListByContainer.json - */ -async function listAppSourceControls() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsSourceControls.listByContainerApp( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAppSourceControls(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsUpdateSample.ts deleted file mode 100644 index 76c5f1b085b0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsUpdateSample.ts +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerApp, ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patches a Container App using JSON Merge Patch - * - * @summary Patches a Container App using JSON Merge Patch - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_Patch.json - */ -async function patchContainerApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const containerAppEnvelope: ContainerApp = { - configuration: { - dapr: { - appPort: 3000, - appProtocol: "http", - enableApiLogging: true, - enabled: true, - httpMaxRequestSize: 10, - httpReadBufferSize: 30, - logLevel: "debug" - }, - ingress: { - customDomains: [ - { - name: "www.my-name.com", - bindingType: "SniEnabled", - certificateId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com" - }, - { - name: "www.my-other-name.com", - bindingType: "SniEnabled", - certificateId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com" - } - ], - external: true, - ipSecurityRestrictions: [ - { - name: "Allow work IP A subnet", - description: - "Allowing all IP's within the subnet below to access containerapp", - action: "Allow", - ipAddressRange: "192.168.1.1/32" - }, - { - name: "Allow work IP B subnet", - description: - "Allowing all IP's within the subnet below to access containerapp", - action: "Allow", - ipAddressRange: "192.168.1.1/8" - } - ], - stickySessions: { affinity: "sticky" }, - targetPort: 3000, - traffic: [ - { - label: "production", - revisionName: "testcontainerApp0-ab1234", - weight: 100 - } - ] - }, - maxInactiveRevisions: 10 - }, - location: "East US", - tags: { tag1: "value1", tag2: "value2" }, - template: { - containers: [ - { - name: "testcontainerApp0", - image: "repo/testcontainerApp0:v1", - probes: [ - { - type: "Liveness", - httpGet: { - path: "/health", - httpHeaders: [{ name: "Custom-Header", value: "Awesome" }], - port: 8080 - }, - initialDelaySeconds: 3, - periodSeconds: 3 - } - ] - } - ], - initContainers: [ - { - name: "testinitcontainerApp0", - image: "repo/testcontainerApp0:v4", - resources: { cpu: 0.2, memory: "100Mi" } - } - ], - scale: { - maxReplicas: 5, - minReplicas: 1, - rules: [ - { - name: "httpscalingrule", - custom: { type: "http", metadata: { concurrentRequests: "50" } } - } - ] - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginUpdateAndWait( - resourceGroupName, - containerAppName, - containerAppEnvelope - ); - console.log(result); -} - -async function main() { - patchContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsCreateOrUpdateSample.ts deleted file mode 100644 index f6098068c3f5..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - DaprComponent, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a Dapr Component in a Managed Environment. - * - * @summary Creates or updates a Dapr Component in a Managed Environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json - */ -async function createOrUpdateDaprComponentWithSecretStoreComponent() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "myenvironment"; - const componentName = "reddog"; - const daprComponentEnvelope: DaprComponent = { - componentType: "state.azure.cosmosdb", - ignoreErrors: false, - initTimeout: "50s", - metadata: [ - { name: "url", value: "" }, - { name: "database", value: "itemsDB" }, - { name: "collection", value: "items" }, - { name: "masterkey", secretRef: "masterkey" } - ], - scopes: ["container-app-1", "container-app-2"], - secretStoreComponent: "my-secret-store", - version: "v1" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.createOrUpdate( - resourceGroupName, - environmentName, - componentName, - daprComponentEnvelope - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a Dapr Component in a Managed Environment. - * - * @summary Creates or updates a Dapr Component in a Managed Environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_CreateOrUpdate_Secrets.json - */ -async function createOrUpdateDaprComponentWithSecrets() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "myenvironment"; - const componentName = "reddog"; - const daprComponentEnvelope: DaprComponent = { - componentType: "state.azure.cosmosdb", - ignoreErrors: false, - initTimeout: "50s", - metadata: [ - { name: "url", value: "" }, - { name: "database", value: "itemsDB" }, - { name: "collection", value: "items" }, - { name: "masterkey", secretRef: "masterkey" } - ], - scopes: ["container-app-1", "container-app-2"], - secrets: [{ name: "masterkey", value: "keyvalue" }], - version: "v1" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.createOrUpdate( - resourceGroupName, - environmentName, - componentName, - daprComponentEnvelope - ); - console.log(result); -} - -async function main() { - createOrUpdateDaprComponentWithSecretStoreComponent(); - createOrUpdateDaprComponentWithSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsDeleteSample.ts deleted file mode 100644 index 77ff870d85c1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a Dapr Component from a Managed Environment. - * - * @summary Delete a Dapr Component from a Managed Environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_Delete.json - */ -async function deleteDaprComponent() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.delete( - resourceGroupName, - environmentName, - componentName - ); - console.log(result); -} - -async function main() { - deleteDaprComponent(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsGetSample.ts deleted file mode 100644 index 2230288a6fe5..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsGetSample.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a dapr component. - * - * @summary Get a dapr component. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json - */ -async function getDaprComponentWithSecretStoreComponent() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.get( - resourceGroupName, - environmentName, - componentName - ); - console.log(result); -} - -/** - * This sample demonstrates how to Get a dapr component. - * - * @summary Get a dapr component. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_Get_Secrets.json - */ -async function getDaprComponentWithSecrets() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.get( - resourceGroupName, - environmentName, - componentName - ); - console.log(result); -} - -async function main() { - getDaprComponentWithSecretStoreComponent(); - getDaprComponentWithSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsListSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsListSample.ts deleted file mode 100644 index 2bbd0b4acca9..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsListSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the Dapr Components for a managed environment. - * - * @summary Get the Dapr Components for a managed environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_List.json - */ -async function listDaprComponents() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "myenvironment"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.daprComponents.list( - resourceGroupName, - environmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listDaprComponents(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsListSecretsSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsListSecretsSample.ts deleted file mode 100644 index 6c18584651a2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsListSecretsSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List secrets for a dapr component - * - * @summary List secrets for a dapr component - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_ListSecrets.json - */ -async function listContainerAppsSecrets() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.listSecrets( - resourceGroupName, - environmentName, - componentName - ); - console.log(result); -} - -async function main() { - listContainerAppsSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobsCreateOrUpdateSample.ts deleted file mode 100644 index 193b245ca8bc..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsCreateOrUpdateSample.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { Job, ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create or Update a Container Apps Job. - * - * @summary Create or Update a Container Apps Job. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_CreateorUpdate.json - */ -async function createOrUpdateContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerAppsJob0"; - const jobEnvelope: Job = { - configuration: { - manualTriggerConfig: { parallelism: 4, replicaCompletionCount: 1 }, - replicaRetryLimit: 10, - replicaTimeout: 10, - triggerType: "Manual" - }, - environmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - location: "East US", - template: { - containers: [ - { - name: "testcontainerAppsJob0", - image: "repo/testcontainerAppsJob0:v1", - probes: [ - { - type: "Liveness", - httpGet: { - path: "/health", - httpHeaders: [{ name: "Custom-Header", value: "Awesome" }], - port: 8080 - }, - initialDelaySeconds: 5, - periodSeconds: 3 - } - ] - } - ], - initContainers: [ - { - name: "testinitcontainerAppsJob0", - args: ["-c", "while true; do echo hello; sleep 10;done"], - command: ["/bin/sh"], - image: "repo/testcontainerAppsJob0:v4", - resources: { cpu: 0.2, memory: "100Mi" } - } - ] - } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginCreateOrUpdateAndWait( - resourceGroupName, - jobName, - jobEnvelope - ); - console.log(result); -} - -async function main() { - createOrUpdateContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobsDeleteSample.ts deleted file mode 100644 index 4c6b66a98b80..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsDeleteSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a Container Apps Job. - * - * @summary Delete a Container Apps Job. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Delete.json - */ -async function deleteContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testWorkerContainerAppsJob0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginDeleteAndWait( - resourceGroupName, - jobName - ); - console.log(result); -} - -async function main() { - deleteContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsExecutionsListSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobsExecutionsListSample.ts deleted file mode 100644 index 9c7d47be3834..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsExecutionsListSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a Container Apps Job's executions - * - * @summary Get a Container Apps Job's executions - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Executions_Get.json - */ -async function getAContainerAppsJobExecutions() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerAppsJob0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.jobsExecutions.list( - resourceGroupName, - jobName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getAContainerAppsJobExecutions(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobsGetSample.ts deleted file mode 100644 index 163f63df34b9..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsGetSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the properties of a Container Apps Job. - * - * @summary Get the properties of a Container Apps Job. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Get.json - */ -async function getContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerAppsJob0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.get(resourceGroupName, jobName); - console.log(result); -} - -async function main() { - getContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsListByResourceGroupSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobsListByResourceGroupSample.ts deleted file mode 100644 index e8b8d847fad2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsListByResourceGroupSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the Container Apps Jobs in a given resource group. - * - * @summary Get the Container Apps Jobs in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Jobs_ListByResourceGroup.json - */ -async function listContainerAppsJobsByResourceGroup() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.jobs.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listContainerAppsJobsByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsListBySubscriptionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobsListBySubscriptionSample.ts deleted file mode 100644 index 73cd0c684cd6..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsListBySubscriptionSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the Container Apps Jobs in a given subscription. - * - * @summary Get the Container Apps Jobs in a given subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Jobs_ListBySubscription.json - */ -async function listContainerAppsJobsBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.jobs.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listContainerAppsJobsBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsListSecretsSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobsListSecretsSample.ts deleted file mode 100644 index 4cd509568b2d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsListSecretsSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List secrets for a container apps job - * - * @summary List secrets for a container apps job - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_ListSecrets.json - */ -async function listContainerAppsJobSecrets() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerAppsJob0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.listSecrets(resourceGroupName, jobName); - console.log(result); -} - -async function main() { - listContainerAppsJobSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsStartSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobsStartSample.ts deleted file mode 100644 index 03eeadfdd2da..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsStartSample.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - JobExecutionTemplate, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Start a Container Apps Job - * - * @summary Start a Container Apps Job - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Start.json - */ -async function runAContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerAppsJob0"; - const template: JobExecutionTemplate = { - containers: [ - { - name: "testcontainerAppsJob0", - image: "repo/testcontainerAppsJob0:v4", - resources: { cpu: 0.2, memory: "100Mi" } - } - ], - initContainers: [ - { - name: "testinitcontainerAppsJob0", - args: ["-c", "while true; do echo hello; sleep 10;done"], - command: ["/bin/sh"], - image: "repo/testcontainerAppsJob0:v4", - resources: { cpu: 0.2, memory: "100Mi" } - } - ] - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginStartAndWait( - resourceGroupName, - jobName, - template - ); - console.log(result); -} - -async function main() { - runAContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsStopExecutionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobsStopExecutionSample.ts deleted file mode 100644 index 2b50617de174..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsStopExecutionSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Terminates execution of a running container apps job - * - * @summary Terminates execution of a running container apps job - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop_Execution.json - */ -async function terminateAContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerAppsJob0"; - const jobExecutionName = "jobExecution1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginStopExecutionAndWait( - resourceGroupName, - jobName, - jobExecutionName - ); - console.log(result); -} - -async function main() { - terminateAContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsStopMultipleExecutionsSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobsStopMultipleExecutionsSample.ts deleted file mode 100644 index 3b18792ab00f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsStopMultipleExecutionsSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - JobExecutionNamesCollection, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Terminates execution of a running container apps job - * - * @summary Terminates execution of a running container apps job - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop_Multiple.json - */ -async function terminateMultipleContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerAppsJob0"; - const jobExecutionName: JobExecutionNamesCollection = { - value: [ - { name: "jobExecution-27944453" }, - { name: "jobExecution-27944452" }, - { name: "jobExecution-27944451" } - ] - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginStopMultipleExecutionsAndWait( - resourceGroupName, - jobName, - jobExecutionName - ); - console.log(result); -} - -async function main() { - terminateMultipleContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobsUpdateSample.ts deleted file mode 100644 index 4b4439363ea3..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsUpdateSample.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - JobPatchProperties, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patches a Container Apps Job using JSON Merge Patch - * - * @summary Patches a Container Apps Job using JSON Merge Patch - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Patch.json - */ -async function patchContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerAppsJob0"; - const jobEnvelope: JobPatchProperties = { - properties: { - configuration: { - manualTriggerConfig: { parallelism: 4, replicaCompletionCount: 1 }, - replicaRetryLimit: 10, - replicaTimeout: 10, - triggerType: "Manual" - }, - template: { - containers: [ - { - name: "testcontainerAppsJob0", - image: "repo/testcontainerAppsJob0:v1", - probes: [ - { - type: "Liveness", - httpGet: { - path: "/health", - httpHeaders: [{ name: "Custom-Header", value: "Awesome" }], - port: 8080 - }, - initialDelaySeconds: 3, - periodSeconds: 3 - } - ] - } - ], - initContainers: [ - { - name: "testinitcontainerAppsJob0", - args: ["-c", "while true; do echo hello; sleep 10;done"], - command: ["/bin/sh"], - image: "repo/testcontainerAppsJob0:v4", - resources: { cpu: 0.2, memory: "100Mi" } - } - ] - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginUpdateAndWait( - resourceGroupName, - jobName, - jobEnvelope - ); - console.log(result); -} - -async function main() { - patchContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesCreateOrUpdateSample.ts deleted file mode 100644 index 81506f3dd869..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesCreateOrUpdateSample.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ManagedCertificate, - ManagedCertificatesCreateOrUpdateOptionalParams, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create or Update a Managed Certificate. - * - * @summary Create or Update a Managed Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_CreateOrUpdate.json - */ -async function createOrUpdateCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const managedCertificateName = "certificate-firendly-name"; - const managedCertificateEnvelope: ManagedCertificate = { - location: "East US", - properties: { - domainControlValidation: "CNAME", - subjectName: "my-subject-name.company.country.net" - } - }; - const options: ManagedCertificatesCreateOrUpdateOptionalParams = { - managedCertificateEnvelope - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedCertificates.beginCreateOrUpdateAndWait( - resourceGroupName, - environmentName, - managedCertificateName, - options - ); - console.log(result); -} - -async function main() { - createOrUpdateCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesDeleteSample.ts deleted file mode 100644 index 5c1fdb327d67..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified Managed Certificate. - * - * @summary Deletes the specified Managed Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_Delete.json - */ -async function deleteCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const managedCertificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedCertificates.delete( - resourceGroupName, - environmentName, - managedCertificateName - ); - console.log(result); -} - -async function main() { - deleteCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesGetSample.ts deleted file mode 100644 index d0a37a92fb8e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the specified Managed Certificate. - * - * @summary Get the specified Managed Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_Get.json - */ -async function getCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const managedCertificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedCertificates.get( - resourceGroupName, - environmentName, - managedCertificateName - ); - console.log(result); -} - -async function main() { - getCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesListSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesListSample.ts deleted file mode 100644 index 25db64d33fe2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesListSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the Managed Certificates in a given managed environment. - * - * @summary Get the Managed Certificates in a given managed environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificates_ListByManagedEnvironment.json - */ -async function listManagedCertificatesByManagedEnvironment() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedCertificates.list( - resourceGroupName, - environmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listManagedCertificatesByManagedEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesUpdateSample.ts deleted file mode 100644 index 1c19bfb5bf21..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ManagedCertificatePatch, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patches a managed certificate. Oly patching of tags is supported - * - * @summary Patches a managed certificate. Oly patching of tags is supported - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificates_Patch.json - */ -async function patchManagedCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const managedCertificateName = "certificate-firendly-name"; - const managedCertificateEnvelope: ManagedCertificatePatch = { - tags: { tag1: "value1", tag2: "value2" } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedCertificates.update( - resourceGroupName, - environmentName, - managedCertificateName, - managedCertificateEnvelope - ); - console.log(result); -} - -async function main() { - patchManagedCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentDiagnosticsGetDetectorSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentDiagnosticsGetDetectorSample.ts deleted file mode 100644 index b48e57d93bf7..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentDiagnosticsGetDetectorSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the diagnostics data for a Managed Environment used to host container apps. - * - * @summary Get the diagnostics data for a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentDiagnostics_Get.json - */ -async function getDiagnosticDataForAManagedEnvironments() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "mikono-workerapp-test-rg"; - const environmentName = "mikonokubeenv"; - const detectorName = "ManagedEnvAvailabilityMetrics"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentDiagnostics.getDetector( - resourceGroupName, - environmentName, - detectorName - ); - console.log(result); -} - -async function main() { - getDiagnosticDataForAManagedEnvironments(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentDiagnosticsListDetectorsSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentDiagnosticsListDetectorsSample.ts deleted file mode 100644 index 71759dc309a0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentDiagnosticsListDetectorsSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the list of diagnostics for a Managed Environment used to host container apps. - * - * @summary Get the list of diagnostics for a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentDiagnostics_List.json - */ -async function getTheListOfAvailableDiagnosticDataForAManagedEnvironments() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "mikono-workerapp-test-rg"; - const environmentName = "mikonokubeenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentDiagnostics.listDetectors( - resourceGroupName, - environmentName - ); - console.log(result); -} - -async function main() { - getTheListOfAvailableDiagnosticDataForAManagedEnvironments(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsCreateOrUpdateSample.ts deleted file mode 100644 index 6cbbd3844005..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ManagedEnvironment, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a Managed Environment used to host container apps. - * - * @summary Creates or updates a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_CustomInfrastructureResourceGroup_Create.json - */ -async function createEnvironmentWithCustomInfrastructureResourceGroup() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const environmentEnvelope: ManagedEnvironment = { - appLogsConfiguration: { - logAnalyticsConfiguration: { customerId: "string", sharedKey: "string" } - }, - customDomainConfiguration: { - certificatePassword: "1234", - certificateValue: Buffer.from("Y2VydA=="), - dnsSuffix: "www.my-name.com" - }, - daprAIConnectionString: - "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/", - infrastructureResourceGroup: "myInfrastructureRgName", - location: "East US", - vnetConfiguration: { - infrastructureSubnetId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/RGName/providers/Microsoft.Network/virtualNetworks/VNetName/subnets/subnetName1" - }, - workloadProfiles: [ - { - name: "My-GP-01", - maximumCount: 12, - minimumCount: 3, - workloadProfileType: "GeneralPurpose" - }, - { - name: "My-MO-01", - maximumCount: 6, - minimumCount: 3, - workloadProfileType: "MemoryOptimized" - }, - { - name: "My-CO-01", - maximumCount: 6, - minimumCount: 3, - workloadProfileType: "ComputeOptimized" - }, - { name: "My-consumption-01", workloadProfileType: "Consumption" } - ], - zoneRedundant: true - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginCreateOrUpdateAndWait( - resourceGroupName, - environmentName, - environmentEnvelope - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a Managed Environment used to host container apps. - * - * @summary Creates or updates a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json - */ -async function createEnvironments() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const environmentEnvelope: ManagedEnvironment = { - appLogsConfiguration: { - logAnalyticsConfiguration: { customerId: "string", sharedKey: "string" } - }, - customDomainConfiguration: { - certificatePassword: "1234", - certificateValue: Buffer.from("Y2VydA=="), - dnsSuffix: "www.my-name.com" - }, - daprAIConnectionString: - "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/", - location: "East US", - vnetConfiguration: { - infrastructureSubnetId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/RGName/providers/Microsoft.Network/virtualNetworks/VNetName/subnets/subnetName1" - }, - workloadProfiles: [ - { - name: "My-GP-01", - maximumCount: 12, - minimumCount: 3, - workloadProfileType: "GeneralPurpose" - }, - { - name: "My-MO-01", - maximumCount: 6, - minimumCount: 3, - workloadProfileType: "MemoryOptimized" - }, - { - name: "My-CO-01", - maximumCount: 6, - minimumCount: 3, - workloadProfileType: "ComputeOptimized" - }, - { name: "My-consumption-01", workloadProfileType: "Consumption" } - ], - zoneRedundant: true - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginCreateOrUpdateAndWait( - resourceGroupName, - environmentName, - environmentEnvelope - ); - console.log(result); -} - -async function main() { - createEnvironmentWithCustomInfrastructureResourceGroup(); - createEnvironments(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsDeleteSample.ts deleted file mode 100644 index 91baf59ae190..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsDeleteSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a Managed Environment if it does not have any container apps. - * - * @summary Delete a Managed Environment if it does not have any container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_Delete.json - */ -async function deleteEnvironmentByName() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "examplekenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginDeleteAndWait( - resourceGroupName, - environmentName - ); - console.log(result); -} - -async function main() { - deleteEnvironmentByName(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsDiagnosticsGetRootSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsDiagnosticsGetRootSample.ts deleted file mode 100644 index 19efcb9871ea..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsDiagnosticsGetRootSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the properties of a Managed Environment used to host container apps. - * - * @summary Get the properties of a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_Get.json - */ -async function getEnvironmentsByName() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsDiagnostics.getRoot( - resourceGroupName, - environmentName - ); - console.log(result); -} - -async function main() { - getEnvironmentsByName(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsGetAuthTokenSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsGetAuthTokenSample.ts deleted file mode 100644 index 66a84b6d8f55..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsGetAuthTokenSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Checks if resource name is available. - * - * @summary Checks if resource name is available. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_GetAuthToken.json - */ -async function getManagedEnvironmentAuthToken() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const environmentName = "testenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.getAuthToken( - resourceGroupName, - environmentName - ); - console.log(result); -} - -async function main() { - getManagedEnvironmentAuthToken(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsGetSample.ts deleted file mode 100644 index 335952fd4a20..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the properties of a Managed Environment used to host container apps. - * - * @summary Get the properties of a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_Get.json - */ -async function getEnvironmentsByName() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.get( - resourceGroupName, - environmentName - ); - console.log(result); -} - -async function main() { - getEnvironmentsByName(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListByResourceGroupSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListByResourceGroupSample.ts deleted file mode 100644 index 752b77faf978..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get all the Managed Environments in a resource group. - * - * @summary Get all the Managed Environments in a resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json - */ -async function listEnvironmentsByResourceGroup() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listEnvironmentsByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListBySubscriptionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListBySubscriptionSample.ts deleted file mode 100644 index b99bc16e23c0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListBySubscriptionSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get all Managed Environments for a subscription. - * - * @summary Get all Managed Environments for a subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_ListBySubscription.json - */ -async function listEnvironmentsBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listEnvironmentsBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListWorkloadProfileStatesSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListWorkloadProfileStatesSample.ts deleted file mode 100644 index 25078e9fd7be..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListWorkloadProfileStatesSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get all workload Profile States for a Managed Environment. - * - * @summary Get all workload Profile States for a Managed Environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json - */ -async function listEnvironmentsBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listWorkloadProfileStates( - resourceGroupName, - environmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listEnvironmentsBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesCreateOrUpdateSample.ts deleted file mode 100644 index 64d6d9cd868b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesCreateOrUpdateSample.ts +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ManagedEnvironmentStorage, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create or update storage for a managedEnvironment. - * - * @summary Create or update storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json - */ -async function createOrUpdateEnvironmentsStorage() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "managedEnv"; - const storageName = "jlaw-demo1"; - const storageEnvelope: ManagedEnvironmentStorage = { - properties: { - azureFile: { - accessMode: "ReadOnly", - accountKey: "key", - accountName: "account1", - shareName: "share1" - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.createOrUpdate( - resourceGroupName, - environmentName, - storageName, - storageEnvelope - ); - console.log(result); -} - -async function main() { - createOrUpdateEnvironmentsStorage(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesDeleteSample.ts deleted file mode 100644 index 36b14ca59574..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete storage for a managedEnvironment. - * - * @summary Delete storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentsStorages_Delete.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "managedEnv"; - const storageName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.delete( - resourceGroupName, - environmentName, - storageName - ); - console.log(result); -} - -async function main() { - listEnvironmentsStoragesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesGetSample.ts deleted file mode 100644 index f12af5ad99b2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get storage for a managedEnvironment. - * - * @summary Get storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentsStorages_Get.json - */ -async function getAEnvironmentsStoragePropertiesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "managedEnv"; - const storageName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.get( - resourceGroupName, - environmentName, - storageName - ); - console.log(result); -} - -async function main() { - getAEnvironmentsStoragePropertiesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesListSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesListSample.ts deleted file mode 100644 index 746076000ec1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesListSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get all storages for a managedEnvironment. - * - * @summary Get all storages for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentsStorages_List.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "managedEnv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.list( - resourceGroupName, - environmentName - ); - console.log(result); -} - -async function main() { - listEnvironmentsStoragesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsUpdateSample.ts deleted file mode 100644 index 3ebafa62a0af..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsUpdateSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ManagedEnvironment, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patches a Managed Environment using JSON Merge Patch - * - * @summary Patches a Managed Environment using JSON Merge Patch - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_Patch.json - */ -async function patchManagedEnvironment() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const environmentEnvelope: ManagedEnvironment = { - location: "East US", - tags: { tag1: "value1", tag2: "value2" } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginUpdateAndWait( - resourceGroupName, - environmentName, - environmentEnvelope - ); - console.log(result); -} - -async function main() { - patchManagedEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/namespacesCheckNameAvailabilitySample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/namespacesCheckNameAvailabilitySample.ts deleted file mode 100644 index 4e397a441bd3..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/namespacesCheckNameAvailabilitySample.ts +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - CheckNameAvailabilityRequest, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Checks if resource name is available. - * - * @summary Checks if resource name is available. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificates_CheckNameAvailability.json - */ -async function certificatesCheckNameAvailability() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const checkNameAvailabilityRequest: CheckNameAvailabilityRequest = { - name: "testcertificatename", - type: "Microsoft.App/managedEnvironments/certificates" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.namespaces.checkNameAvailability( - resourceGroupName, - environmentName, - checkNameAvailabilityRequest - ); - console.log(result); -} - -/** - * This sample demonstrates how to Checks if resource name is available. - * - * @summary Checks if resource name is available. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_CheckNameAvailability.json - */ -async function containerAppsCheckNameAvailability() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const checkNameAvailabilityRequest: CheckNameAvailabilityRequest = { - name: "testcappname", - type: "Microsoft.App/containerApps" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.namespaces.checkNameAvailability( - resourceGroupName, - environmentName, - checkNameAvailabilityRequest - ); - console.log(result); -} - -async function main() { - certificatesCheckNameAvailability(); - containerAppsCheckNameAvailability(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/operationsListSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/operationsListSample.ts deleted file mode 100644 index b82454a18eba..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/operationsListSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all of the available RP operations. - * - * @summary Lists all of the available RP operations. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Operations_List.json - */ -async function listAllOperations() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAllOperations(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/src/containerAppsAPIClient.ts b/sdk/appcontainers/arm-appcontainers/src/containerAppsAPIClient.ts index b382244c44f4..cca34f2d8ccc 100644 --- a/sdk/appcontainers/arm-appcontainers/src/containerAppsAPIClient.ts +++ b/sdk/appcontainers/arm-appcontainers/src/containerAppsAPIClient.ts @@ -18,19 +18,21 @@ import { ContainerAppsAuthConfigsImpl, AvailableWorkloadProfilesImpl, BillingMetersImpl, + BuildersImpl, + BuildsImpl, ConnectedEnvironmentsImpl, ConnectedEnvironmentsCertificatesImpl, ConnectedEnvironmentsDaprComponentsImpl, ConnectedEnvironmentsStoragesImpl, ContainerAppsImpl, - JobsImpl, - JobsExecutionsImpl, ContainerAppsRevisionsImpl, ContainerAppsRevisionReplicasImpl, ContainerAppsDiagnosticsImpl, ManagedEnvironmentDiagnosticsImpl, ManagedEnvironmentsDiagnosticsImpl, OperationsImpl, + JobsImpl, + JobsExecutionsImpl, ManagedEnvironmentsImpl, CertificatesImpl, ManagedCertificatesImpl, @@ -43,19 +45,21 @@ import { ContainerAppsAuthConfigs, AvailableWorkloadProfiles, BillingMeters, + Builders, + Builds, ConnectedEnvironments, ConnectedEnvironmentsCertificates, ConnectedEnvironmentsDaprComponents, ConnectedEnvironmentsStorages, ContainerApps, - Jobs, - JobsExecutions, ContainerAppsRevisions, ContainerAppsRevisionReplicas, ContainerAppsDiagnostics, ManagedEnvironmentDiagnostics, ManagedEnvironmentsDiagnostics, Operations, + Jobs, + JobsExecutions, ManagedEnvironments, Certificates, ManagedCertificates, @@ -98,7 +102,7 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-appcontainers/2.0.0-beta.3`; + const packageDetails = `azsdk-js-arm-appcontainers/2.0.0-beta.4`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -151,10 +155,12 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-11-01-preview"; + this.apiVersion = options.apiVersion || "2023-05-02-preview"; this.containerAppsAuthConfigs = new ContainerAppsAuthConfigsImpl(this); this.availableWorkloadProfiles = new AvailableWorkloadProfilesImpl(this); this.billingMeters = new BillingMetersImpl(this); + this.builders = new BuildersImpl(this); + this.builds = new BuildsImpl(this); this.connectedEnvironments = new ConnectedEnvironmentsImpl(this); this.connectedEnvironmentsCertificates = new ConnectedEnvironmentsCertificatesImpl( this @@ -166,8 +172,6 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { this ); this.containerApps = new ContainerAppsImpl(this); - this.jobs = new JobsImpl(this); - this.jobsExecutions = new JobsExecutionsImpl(this); this.containerAppsRevisions = new ContainerAppsRevisionsImpl(this); this.containerAppsRevisionReplicas = new ContainerAppsRevisionReplicasImpl( this @@ -180,6 +184,8 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { this ); this.operations = new OperationsImpl(this); + this.jobs = new JobsImpl(this); + this.jobsExecutions = new JobsExecutionsImpl(this); this.managedEnvironments = new ManagedEnvironmentsImpl(this); this.certificates = new CertificatesImpl(this); this.managedCertificates = new ManagedCertificatesImpl(this); @@ -225,19 +231,21 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { containerAppsAuthConfigs: ContainerAppsAuthConfigs; availableWorkloadProfiles: AvailableWorkloadProfiles; billingMeters: BillingMeters; + builders: Builders; + builds: Builds; connectedEnvironments: ConnectedEnvironments; connectedEnvironmentsCertificates: ConnectedEnvironmentsCertificates; connectedEnvironmentsDaprComponents: ConnectedEnvironmentsDaprComponents; connectedEnvironmentsStorages: ConnectedEnvironmentsStorages; containerApps: ContainerApps; - jobs: Jobs; - jobsExecutions: JobsExecutions; containerAppsRevisions: ContainerAppsRevisions; containerAppsRevisionReplicas: ContainerAppsRevisionReplicas; containerAppsDiagnostics: ContainerAppsDiagnostics; managedEnvironmentDiagnostics: ManagedEnvironmentDiagnostics; managedEnvironmentsDiagnostics: ManagedEnvironmentsDiagnostics; operations: Operations; + jobs: Jobs; + jobsExecutions: JobsExecutions; managedEnvironments: ManagedEnvironments; certificates: Certificates; managedCertificates: ManagedCertificates; diff --git a/sdk/appcontainers/arm-appcontainers/src/models/index.ts b/sdk/appcontainers/arm-appcontainers/src/models/index.ts index 25be36ab20a6..06b8306b795a 100644 --- a/sdk/appcontainers/arm-appcontainers/src/models/index.ts +++ b/sdk/appcontainers/arm-appcontainers/src/models/index.ts @@ -584,6 +584,116 @@ export interface BillingMeterProperties { displayName?: string; } +/** The response of a BuilderResource list operation. */ +export interface BuilderCollection { + /** The BuilderResource items on this page */ + value: BuilderResource[]; + /** The link to the next page of items */ + nextLink?: string; +} + +/** Managed service identity (system assigned and/or user assigned identities) */ +export interface ManagedServiceIdentity { + /** + * The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly principalId?: string; + /** + * The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tenantId?: string; + /** Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). */ + type: ManagedServiceIdentityType; + /** The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. */ + userAssignedIdentities?: { [propertyName: string]: UserAssignedIdentity }; +} + +/** User assigned identity properties */ +export interface UserAssignedIdentity { + /** + * The principal ID of the assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly principalId?: string; + /** + * The client ID of the assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly clientId?: string; +} + +/** The type used for update operations of the BuilderResource. */ +export interface BuilderResourceUpdate { + /** The managed service identities assigned to this resource. */ + identity?: ManagedServiceIdentity; + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** Resource ID of the container apps environment that the builder is associated with. */ + environmentId?: string; +} + +/** The response of a BuildResource list operation. */ +export interface BuildCollection { + /** The BuildResource items on this page */ + value: BuildResource[]; + /** The link to the next page of items */ + nextLink?: string; +} + +/** Container registry that the final image will be uploaded to. */ +export interface ContainerRegistryWithCustomImage { + /** Login server of the container registry that the final image should be uploaded to. */ + server: string; + /** Full user-assigned identity Resource ID for the managed identity that should be used to connect to the container registry. */ + identity: string; + /** Full name that the final image should be uploaded as, including both image name and tag. */ + image?: string; +} + +/** Configuration of the build. */ +export interface BuildConfiguration { + /** Base OS used to build and run the app. */ + baseOs?: string; + /** Platform to be used to build and run the app. */ + platform?: string; + /** Platform version to be used to build and run the app. */ + platformVersion?: string; + /** List of environment variables to be passed to the build and application runtime. */ + environmentVariables?: EnvironmentVariable[]; + /** List of steps to perform before the build. */ + preBuildSteps?: PreBuildStep[]; +} + +/** Model representing an environment variable. */ +export interface EnvironmentVariable { + /** Environment variable name. */ + name: string; + /** Environment variable value. */ + value: string; +} + +/** Model representing a pre-build step. */ +export interface PreBuildStep { + /** Description of the pre-build step. */ + description?: string; + /** List of custom commands to run. */ + scripts?: string[]; + /** Http get request to send before the build. */ + httpGet?: HttpGet; +} + +/** Model representing a http get request. */ +export interface HttpGet { + /** URL to make HTTP GET request against. */ + url: string; + /** Name of the file that the request should be saved to. */ + fileName?: string; + /** List of headers to send with the request. */ + headers?: string[]; +} + /** Collection of connectedEnvironments */ export interface ConnectedEnvironmentCollection { /** Collection of resources. */ @@ -809,38 +919,6 @@ export interface ContainerAppCollection { readonly nextLink?: string; } -/** Managed service identity (system assigned and/or user assigned identities) */ -export interface ManagedServiceIdentity { - /** - * The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly principalId?: string; - /** - * The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly tenantId?: string; - /** Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). */ - type: ManagedServiceIdentityType; - /** The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. */ - userAssignedIdentities?: { [propertyName: string]: UserAssignedIdentity }; -} - -/** User assigned identity properties */ -export interface UserAssignedIdentity { - /** - * The principal ID of the assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly principalId?: string; - /** - * The client ID of the assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly clientId?: string; -} - /** Non versioned Container App configuration properties that define the mutable settings of a Container app */ export interface Configuration { /** Collection of secrets used by a Container app */ @@ -889,6 +967,8 @@ export interface Ingress { clientCertificateMode?: IngressClientCertificateMode; /** CORS policy for container app */ corsPolicy?: CorsPolicy; + /** Settings to expose additional ports on container app */ + additionalPortMappings?: IngressPortMapping[]; } /** Traffic weight assigned to a revision */ @@ -947,6 +1027,16 @@ export interface CorsPolicy { allowCredentials?: boolean; } +/** Port mappings of container app ingress */ +export interface IngressPortMapping { + /** Specifies whether the app port is accessible outside of the environment */ + external: boolean; + /** Specifies the port user's container listens on */ + targetPort: number; + /** Specifies the exposed port for the target port. If not specified, it defaults to target port */ + exposedPort?: number; +} + /** Container App Private Registry */ export interface RegistryCredentials { /** Container Registry Server */ @@ -987,6 +1077,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. */ @@ -1044,6 +1136,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. */ @@ -1179,6 +1273,8 @@ export interface Volume { storageName?: string; /** List of secrets to be added in volume. If no secrets are provided, all secrets in collection will be added to volume. */ secrets?: SecretVolumeItem[]; + /** Mount options used while mounting the AzureFile. Must be a comma-separated string. */ + mountOptions?: string; } /** Secret to be added to volume. */ @@ -1308,161 +1404,6 @@ export interface ContainerAppSecret { readonly keyVaultUrl?: string; } -/** Container Apps Jobs collection ARM resource. */ -export interface JobsCollection { - /** Collection of resources. */ - value: Job[]; - /** - * Link to next page of resources. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Non versioned Container Apps Job configuration properties */ -export interface JobConfiguration { - /** Collection of secrets used by a Container Apps Job */ - secrets?: Secret[]; - /** Trigger type of the job */ - triggerType: TriggerType; - /** Maximum number of seconds a replica is allowed to run. */ - replicaTimeout: number; - /** Maximum number of retries before failing the job. */ - replicaRetryLimit?: number; - /** Manual trigger configuration for a single execution job. Properties replicaCompletionCount and parallelism would be set to 1 by default */ - manualTriggerConfig?: JobConfigurationManualTriggerConfig; - /** Cron formatted repeating trigger schedule ("* * * * *") for cronjobs. Properties completions and parallelism would be set to 1 by default */ - scheduleTriggerConfig?: JobConfigurationScheduleTriggerConfig; - /** Collection of private container registry credentials used by a Container apps job */ - registries?: RegistryCredentials[]; -} - -/** Manual trigger configuration for a single execution job. Properties replicaCompletionCount and parallelism would be set to 1 by default */ -export interface JobConfigurationManualTriggerConfig { - /** Minimum number of successful replica completions before overall job completion. */ - replicaCompletionCount?: number; - /** Number of parallel replicas of a job that can run at a given time. */ - parallelism?: number; -} - -/** Cron formatted repeating trigger schedule ("* * * * *") for cronjobs. Properties completions and parallelism would be set to 1 by default */ -export interface JobConfigurationScheduleTriggerConfig { - /** Minimum number of successful replica completions before overall job completion. */ - replicaCompletionCount?: number; - /** Cron formatted repeating schedule ("* * * * *") of a Cron Job. */ - cronExpression: string; - /** Number of parallel replicas of a job that can run at a given time. */ - parallelism?: number; -} - -/** Container Apps Job versioned application definition. Defines the desired state of an immutable revision. Any changes to this section Will result in a new revision being created */ -export interface JobTemplate { - /** List of specialized containers that run before app containers. */ - initContainers?: InitContainer[]; - /** List of container definitions for the Container App. */ - containers?: Container[]; - /** List of volume definitions for the Container App. */ - volumes?: Volume[]; -} - -/** Container Apps Job resource specific properties. */ -export interface JobPatchProperties { - /** Managed identities needed by a container app job to interact with other Azure services to not maintain any secrets or credentials in code. */ - identity?: ManagedServiceIdentity; - /** Resource tags. */ - tags?: { [propertyName: string]: string }; - properties?: JobPatchPropertiesProperties; -} - -export interface JobPatchPropertiesProperties { - /** Resource ID of environment. */ - environmentId?: string; - /** Container Apps Job configuration properties. */ - configuration?: JobConfiguration; - /** Container Apps job definition. */ - template?: JobTemplate; - /** Outbound IP Addresses of a container apps job. */ - outboundIpAddresses?: string[]; - /** The endpoint of the eventstream of the container apps job. */ - eventStreamEndpoint?: string; -} - -/** Job's execution template, containing container configuration for a job's execution */ -export interface JobExecutionTemplate { - /** List of container definitions for the Container Apps Job. */ - containers?: JobExecutionContainer[]; - /** List of specialized containers that run before job containers. */ - initContainers?: JobExecutionContainer[]; -} - -/** Container Apps Jobs execution container definition. */ -export interface JobExecutionContainer { - /** Container image tag. */ - image?: string; - /** Custom container name. */ - name?: string; - /** Container start command. */ - command?: string[]; - /** Container start command arguments. */ - args?: string[]; - /** Container environment variables. */ - env?: EnvironmentVar[]; - /** Container resource requirements. */ - resources?: ContainerResources; -} - -/** Container App's Job execution name. */ -export interface JobExecutionBase { - /** Job execution name. */ - name?: string; - /** Job execution Id. */ - id?: string; -} - -/** Container App executions names list. */ -export interface JobExecutionNamesCollection { - /** Collection of resources. */ - value: JobExecutionBase[]; -} - -/** Container App executions collection ARM resource. */ -export interface ContainerAppJobExecutions { - /** Collection of resources. */ - value: JobExecution[]; - /** - * Link to next page of resources. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Container Apps Jobs execution. */ -export interface JobExecution { - /** Job execution Name. */ - name?: string; - /** Job execution Id. */ - id?: string; - /** Job Type. */ - type?: string; - /** - * Current running State of the job - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly status?: JobExecutionRunningState; - /** Job execution start time. */ - startTime?: Date; - /** Job execution start time. */ - endTime?: Date; - /** Job's execution container. */ - template?: JobExecutionTemplate; -} - -/** Container Apps Job Secrets Collection ARM resource. */ -export interface JobSecretsCollection { - /** Collection of resources. */ - value: Secret[]; -} - /** Container App Revisions collection ARM resource. */ export interface RevisionCollection { /** Collection of resources. */ @@ -1486,6 +1427,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. @@ -1743,6 +1694,161 @@ export interface OperationDisplay { description?: string; } +/** Container Apps Jobs collection ARM resource. */ +export interface JobsCollection { + /** Collection of resources. */ + value: Job[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Non versioned Container Apps Job configuration properties */ +export interface JobConfiguration { + /** Collection of secrets used by a Container Apps Job */ + secrets?: Secret[]; + /** Trigger type of the job */ + triggerType: TriggerType; + /** Maximum number of seconds a replica is allowed to run. */ + replicaTimeout: number; + /** Maximum number of retries before failing the job. */ + replicaRetryLimit?: number; + /** Manual trigger configuration for a single execution job. Properties replicaCompletionCount and parallelism would be set to 1 by default */ + manualTriggerConfig?: JobConfigurationManualTriggerConfig; + /** Cron formatted repeating trigger schedule ("* * * * *") for cronjobs. Properties completions and parallelism would be set to 1 by default */ + scheduleTriggerConfig?: JobConfigurationScheduleTriggerConfig; + /** Collection of private container registry credentials used by a Container apps job */ + registries?: RegistryCredentials[]; +} + +/** Manual trigger configuration for a single execution job. Properties replicaCompletionCount and parallelism would be set to 1 by default */ +export interface JobConfigurationManualTriggerConfig { + /** Minimum number of successful replica completions before overall job completion. */ + replicaCompletionCount?: number; + /** Number of parallel replicas of a job that can run at a given time. */ + parallelism?: number; +} + +/** Cron formatted repeating trigger schedule ("* * * * *") for cronjobs. Properties completions and parallelism would be set to 1 by default */ +export interface JobConfigurationScheduleTriggerConfig { + /** Minimum number of successful replica completions before overall job completion. */ + replicaCompletionCount?: number; + /** Cron formatted repeating schedule ("* * * * *") of a Cron Job. */ + cronExpression: string; + /** Number of parallel replicas of a job that can run at a given time. */ + parallelism?: number; +} + +/** Container Apps Job versioned application definition. Defines the desired state of an immutable revision. Any changes to this section Will result in a new revision being created */ +export interface JobTemplate { + /** List of specialized containers that run before app containers. */ + initContainers?: InitContainer[]; + /** List of container definitions for the Container App. */ + containers?: Container[]; + /** List of volume definitions for the Container App. */ + volumes?: Volume[]; +} + +/** Container Apps Job resource specific properties. */ +export interface JobPatchProperties { + /** Managed identities needed by a container app job to interact with other Azure services to not maintain any secrets or credentials in code. */ + identity?: ManagedServiceIdentity; + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + properties?: JobPatchPropertiesProperties; +} + +export interface JobPatchPropertiesProperties { + /** Resource ID of environment. */ + environmentId?: string; + /** Container Apps Job configuration properties. */ + configuration?: JobConfiguration; + /** Container Apps job definition. */ + template?: JobTemplate; + /** Outbound IP Addresses of a container apps job. */ + outboundIpAddresses?: string[]; + /** The endpoint of the eventstream of the container apps job. */ + eventStreamEndpoint?: string; +} + +/** Job's execution template, containing container configuration for a job's execution */ +export interface JobExecutionTemplate { + /** List of container definitions for the Container Apps Job. */ + containers?: JobExecutionContainer[]; + /** List of specialized containers that run before job containers. */ + initContainers?: JobExecutionContainer[]; +} + +/** Container Apps Jobs execution container definition. */ +export interface JobExecutionContainer { + /** Container image tag. */ + image?: string; + /** Custom container name. */ + name?: string; + /** Container start command. */ + command?: string[]; + /** Container start command arguments. */ + args?: string[]; + /** Container environment variables. */ + env?: EnvironmentVar[]; + /** Container resource requirements. */ + resources?: ContainerResources; +} + +/** Container App's Job execution name. */ +export interface JobExecutionBase { + /** Job execution name. */ + name?: string; + /** Job execution Id. */ + id?: string; +} + +/** Container App executions names list. */ +export interface JobExecutionNamesCollection { + /** Collection of resources. */ + value: JobExecutionBase[]; +} + +/** Container App executions collection ARM resource. */ +export interface ContainerAppJobExecutions { + /** Collection of resources. */ + value: JobExecution[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Container Apps Jobs execution. */ +export interface JobExecution { + /** Job execution Name. */ + name?: string; + /** Job execution Id. */ + id?: string; + /** Job Type. */ + type?: string; + /** + * Current running State of the job + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: JobExecutionRunningState; + /** Job execution start time. */ + startTime?: Date; + /** Job execution start time. */ + endTime?: Date; + /** Job's execution container. */ + template?: JobExecutionTemplate; +} + +/** Container Apps Job Secrets Collection ARM resource. */ +export interface JobSecretsCollection { + /** Collection of resources. */ + value: Secret[]; +} + /** Collection of Environments */ export interface ManagedEnvironmentsCollection { /** Collection of resources. */ @@ -1930,6 +2036,29 @@ export interface BillingMeter extends ProxyResource { properties?: BillingMeterProperties; } +/** Information pertaining to an individual build. */ +export interface BuildResource extends ProxyResource { + /** + * Build provisioning state. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** + * Status of the build once it has been provisioned. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly buildStatus?: BuildStatus; + /** Container registry that the final image will be uploaded to. */ + destinationContainerRegistry?: ContainerRegistryWithCustomImage; + /** Configuration of the build. */ + configuration?: BuildConfiguration; + /** + * Endpoint to which the source code should be uploaded. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly uploadEndpoint?: string; +} + /** Dapr Component. */ export interface DaprComponent extends ProxyResource { /** Component type */ @@ -2020,8 +2149,20 @@ export interface Replica extends ProxyResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly createdTime?: Date; + /** + * Current running state of the replica + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly runningState?: ContainerAppReplicaRunningState; + /** + * The details of replica current running state + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly runningStateDetails?: string; /** The containers collection under a replica. */ containers?: ReplicaContainer[]; + /** The init containers collection under a replica. */ + initContainers?: ReplicaContainer[]; } /** Diagnostics data for a resource. */ @@ -2061,6 +2202,29 @@ export interface SourceControl extends ProxyResource { githubActionConfiguration?: GithubActionConfiguration; } +/** Information about the SourceToCloud builder resource. */ +export interface BuilderResource extends TrackedResource { + /** The managed service identities assigned to this resource. */ + identity?: ManagedServiceIdentity; + /** + * Provisioning state of a builder resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** Resource ID of the container apps environment that the builder is associated with. */ + environmentId?: string; + /** + * Resource ID of the compute that the builds will be performed on. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly buildComputeId?: string; + /** + * Resource ID of the compute that the patching will be performed on. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly patchComputeId?: string; +} + /** 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. */ @@ -2163,35 +2327,6 @@ export interface ContainerAppAuthToken extends TrackedResource { readonly expires?: Date; } -/** Container App Job */ -export interface Job extends TrackedResource { - /** Managed identities needed by a container app job to interact with other Azure services to not maintain any secrets or credentials in code. */ - identity?: ManagedServiceIdentity; - /** - * Provisioning state of the Container Apps Job. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: JobProvisioningState; - /** Resource ID of environment. */ - environmentId?: string; - /** Workload profile name to pin for container apps job execution. */ - workloadProfileName?: string; - /** Container Apps Job configuration properties. */ - configuration?: JobConfiguration; - /** Container Apps job definition. */ - template?: JobTemplate; - /** - * Outbound IP Addresses of a container apps job. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly outboundIpAddresses?: string[]; - /** - * The endpoint of the eventstream of the container apps job. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly eventStreamEndpoint?: string; -} - /** An environment for hosting container apps */ export interface ManagedEnvironment extends TrackedResource { /** Kind of the Environment. */ @@ -2247,6 +2382,35 @@ export interface ManagedEnvironment extends TrackedResource { infrastructureResourceGroup?: string; } +/** Container App Job */ +export interface Job extends TrackedResource { + /** Managed identities needed by a container app job to interact with other Azure services to not maintain any secrets or credentials in code. */ + identity?: ManagedServiceIdentity; + /** + * Provisioning state of the Container Apps Job. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: JobProvisioningState; + /** Resource ID of environment. */ + environmentId?: string; + /** Workload profile name to pin for container apps job execution. */ + workloadProfileName?: string; + /** Container Apps Job configuration properties. */ + configuration?: JobConfiguration; + /** Container Apps job definition. */ + template?: JobTemplate; + /** + * Outbound IP Addresses of a container apps job. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly outboundIpAddresses?: string[]; + /** + * The endpoint of the eventstream of the container apps job. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly eventStreamEndpoint?: string; +} + /** Managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment */ export interface ManagedCertificate extends TrackedResource { /** Certificate resource specific properties */ @@ -2267,6 +2431,31 @@ export interface EnvironmentAuthToken extends TrackedResource { readonly expires?: Date; } +/** Defines headers for Builders_createOrUpdate operation. */ +export interface BuildersCreateOrUpdateHeaders { + azureAsyncOperation?: string; +} + +/** Defines headers for Builders_update operation. */ +export interface BuildersUpdateHeaders { + location?: string; +} + +/** Defines headers for Builders_delete operation. */ +export interface BuildersDeleteHeaders { + location?: string; +} + +/** Defines headers for Builds_createOrUpdate operation. */ +export interface BuildsCreateOrUpdateHeaders { + azureAsyncOperation?: string; +} + +/** Defines headers for Builds_delete operation. */ +export interface BuildsDeleteHeaders { + location?: string; +} + /** Defines headers for ConnectedEnvironments_delete operation. */ export interface ConnectedEnvironmentsDeleteHeaders { location?: string; @@ -2349,6 +2538,84 @@ export enum KnownApplicability { */ export type Applicability = string; +/** Known values of {@link ProvisioningState} that the service accepts. */ +export enum KnownProvisioningState { + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** Canceled */ + Canceled = "Canceled", + /** InProgress */ + InProgress = "InProgress", + /** Deleting */ + Deleting = "Deleting" +} + +/** + * Defines values for ProvisioningState. \ + * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Failed** \ + * **Canceled** \ + * **InProgress** \ + * **Deleting** + */ +export type ProvisioningState = string; + +/** Known values of {@link ManagedServiceIdentityType} that the service accepts. */ +export enum KnownManagedServiceIdentityType { + /** None */ + None = "None", + /** SystemAssigned */ + SystemAssigned = "SystemAssigned", + /** UserAssigned */ + UserAssigned = "UserAssigned", + /** SystemAssignedUserAssigned */ + SystemAssignedUserAssigned = "SystemAssigned,UserAssigned" +} + +/** + * Defines values for ManagedServiceIdentityType. \ + * {@link KnownManagedServiceIdentityType} can be used interchangeably with ManagedServiceIdentityType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **SystemAssigned** \ + * **UserAssigned** \ + * **SystemAssigned,UserAssigned** + */ +export type ManagedServiceIdentityType = string; + +/** Known values of {@link BuildStatus} that the service accepts. */ +export enum KnownBuildStatus { + /** NotStarted */ + NotStarted = "NotStarted", + /** InProgress */ + InProgress = "InProgress", + /** Succeeded */ + Succeeded = "Succeeded", + /** Canceled */ + Canceled = "Canceled", + /** Failed */ + Failed = "Failed" +} + +/** + * Defines values for BuildStatus. \ + * {@link KnownBuildStatus} can be used interchangeably with BuildStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NotStarted** \ + * **InProgress** \ + * **Succeeded** \ + * **Canceled** \ + * **Failed** + */ +export type BuildStatus = string; + /** Known values of {@link ExtendedLocationTypes} that the service accepts. */ export enum KnownExtendedLocationTypes { /** CustomLocation */ @@ -2463,30 +2730,6 @@ export enum KnownAccessMode { */ export type AccessMode = string; -/** Known values of {@link ManagedServiceIdentityType} that the service accepts. */ -export enum KnownManagedServiceIdentityType { - /** None */ - None = "None", - /** SystemAssigned */ - SystemAssigned = "SystemAssigned", - /** UserAssigned */ - UserAssigned = "UserAssigned", - /** SystemAssignedUserAssigned */ - SystemAssignedUserAssigned = "SystemAssigned,UserAssigned" -} - -/** - * Defines values for ManagedServiceIdentityType. \ - * {@link KnownManagedServiceIdentityType} can be used interchangeably with ManagedServiceIdentityType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None** \ - * **SystemAssigned** \ - * **UserAssigned** \ - * **SystemAssigned,UserAssigned** - */ -export type ManagedServiceIdentityType = string; - /** Known values of {@link ContainerAppProvisioningState} that the service accepts. */ export enum KnownContainerAppProvisioningState { /** InProgress */ @@ -2733,87 +2976,6 @@ export enum KnownStorageType { */ export type StorageType = string; -/** Known values of {@link JobProvisioningState} that the service accepts. */ -export enum KnownJobProvisioningState { - /** InProgress */ - InProgress = "InProgress", - /** Succeeded */ - Succeeded = "Succeeded", - /** Failed */ - Failed = "Failed", - /** Canceled */ - Canceled = "Canceled", - /** Deleting */ - Deleting = "Deleting" -} - -/** - * Defines values for JobProvisioningState. \ - * {@link KnownJobProvisioningState} can be used interchangeably with JobProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **InProgress** \ - * **Succeeded** \ - * **Failed** \ - * **Canceled** \ - * **Deleting** - */ -export type JobProvisioningState = string; - -/** Known values of {@link TriggerType} that the service accepts. */ -export enum KnownTriggerType { - /** Scheduled */ - Scheduled = "Scheduled", - /** Event */ - Event = "Event", - /** Manual */ - Manual = "Manual" -} - -/** - * Defines values for TriggerType. \ - * {@link KnownTriggerType} can be used interchangeably with TriggerType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Scheduled** \ - * **Event** \ - * **Manual** - */ -export type TriggerType = string; - -/** Known values of {@link JobExecutionRunningState} that the service accepts. */ -export enum KnownJobExecutionRunningState { - /** Running */ - Running = "Running", - /** Processing */ - Processing = "Processing", - /** Stopped */ - Stopped = "Stopped", - /** Degraded */ - Degraded = "Degraded", - /** Failed */ - Failed = "Failed", - /** Unknown */ - Unknown = "Unknown", - /** Succeeded */ - Succeeded = "Succeeded" -} - -/** - * Defines values for JobExecutionRunningState. \ - * {@link KnownJobExecutionRunningState} can be used interchangeably with JobExecutionRunningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Running** \ - * **Processing** \ - * **Stopped** \ - * **Degraded** \ - * **Failed** \ - * **Unknown** \ - * **Succeeded** - */ -export type JobExecutionRunningState = string; - /** Known values of {@link RevisionHealthState} that the service accepts. */ export enum KnownRevisionHealthState { /** Healthy */ @@ -2862,6 +3024,48 @@ export enum KnownRevisionProvisioningState { */ export type RevisionProvisioningState = 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 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 + * **Running** \ + * **Terminated** \ + * **Waiting** + */ +export type ContainerAppContainerRunningState = string; + /** Known values of {@link EnvironmentProvisioningState} that the service accepts. */ export enum KnownEnvironmentProvisioningState { /** Succeeded */ @@ -2904,29 +3108,8 @@ export enum KnownEnvironmentProvisioningState { */ export type EnvironmentProvisioningState = 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 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 - * **CNAME** \ - * **HTTP** \ - * **TXT** - */ -export type ManagedCertificateDomainControlValidation = string; - -/** Known values of {@link SourceControlOperationState} that the service accepts. */ -export enum KnownSourceControlOperationState { +/** Known values of {@link JobProvisioningState} that the service accepts. */ +export enum KnownJobProvisioningState { /** InProgress */ InProgress = "InProgress", /** Succeeded */ @@ -2934,41 +3117,143 @@ export enum KnownSourceControlOperationState { /** Failed */ Failed = "Failed", /** Canceled */ - Canceled = "Canceled" + Canceled = "Canceled", + /** Deleting */ + Deleting = "Deleting" } /** - * Defines values for SourceControlOperationState. \ - * {@link KnownSourceControlOperationState} can be used interchangeably with SourceControlOperationState, + * 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** + * **Canceled** \ + * **Deleting** */ -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"; +export type JobProvisioningState = string; -/** Optional parameters. */ -export interface ContainerAppsAuthConfigsListByContainerAppOptionalParams - extends coreClient.OperationOptions {} +/** Known values of {@link TriggerType} that the service accepts. */ +export enum KnownTriggerType { + /** Scheduled */ + Scheduled = "Scheduled", + /** Event */ + Event = "Event", + /** Manual */ + Manual = "Manual" +} -/** Contains response data for the listByContainerApp operation. */ -export type ContainerAppsAuthConfigsListByContainerAppResponse = AuthConfigCollection; +/** + * 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 + * **Scheduled** \ + * **Event** \ + * **Manual** + */ +export type TriggerType = string; + +/** Known values of {@link JobExecutionRunningState} that the service accepts. */ +export enum KnownJobExecutionRunningState { + /** Running */ + Running = "Running", + /** Processing */ + Processing = "Processing", + /** Stopped */ + Stopped = "Stopped", + /** Degraded */ + Degraded = "Degraded", + /** Failed */ + Failed = "Failed", + /** Unknown */ + Unknown = "Unknown", + /** Succeeded */ + Succeeded = "Succeeded" +} + +/** + * Defines values for JobExecutionRunningState. \ + * {@link KnownJobExecutionRunningState} can be used interchangeably with JobExecutionRunningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Running** \ + * **Processing** \ + * **Stopped** \ + * **Degraded** \ + * **Failed** \ + * **Unknown** \ + * **Succeeded** + */ +export type JobExecutionRunningState = string; + +/** Known values of {@link ManagedCertificateDomainControlValidation} that the service accepts. */ +export enum KnownManagedCertificateDomainControlValidation { + /** Cname */ + Cname = "CNAME", + /** Http */ + Http = "HTTP", + /** TXT */ + TXT = "TXT" +} + +/** + * 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 + * **CNAME** \ + * **HTTP** \ + * **TXT** + */ +export type ManagedCertificateDomainControlValidation = string; + +/** Known values of {@link SourceControlOperationState} that the service accepts. */ +export enum KnownSourceControlOperationState { + /** InProgress */ + InProgress = "InProgress", + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** Canceled */ + Canceled = "Canceled" +} + +/** + * Defines values for SourceControlOperationState. \ + * {@link KnownSourceControlOperationState} can be used interchangeably with SourceControlOperationState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **InProgress** \ + * **Succeeded** \ + * **Failed** \ + * **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"; + +/** Optional parameters. */ +export interface ContainerAppsAuthConfigsListByContainerAppOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByContainerApp operation. */ +export type ContainerAppsAuthConfigsListByContainerAppResponse = AuthConfigCollection; /** Optional parameters. */ export interface ContainerAppsAuthConfigsGetOptionalParams @@ -3016,6 +3301,115 @@ export interface BillingMetersGetOptionalParams /** Contains response data for the get operation. */ export type BillingMetersGetResponse = BillingMeterCollection; +/** Optional parameters. */ +export interface BuildersListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type BuildersListBySubscriptionResponse = BuilderCollection; + +/** Optional parameters. */ +export interface BuildersListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type BuildersListByResourceGroupResponse = BuilderCollection; + +/** Optional parameters. */ +export interface BuildersGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type BuildersGetResponse = BuilderResource; + +/** Optional parameters. */ +export interface BuildersCreateOrUpdateOptionalParams + 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 BuildersCreateOrUpdateResponse = BuilderResource; + +/** Optional parameters. */ +export interface BuildersUpdateOptionalParams + 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 BuildersUpdateResponse = BuilderResource; + +/** Optional parameters. */ +export interface BuildersDeleteOptionalParams + 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 BuildersListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type BuildersListBySubscriptionNextResponse = BuilderCollection; + +/** Optional parameters. */ +export interface BuildersListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type BuildersListByResourceGroupNextResponse = BuilderCollection; + +/** Optional parameters. */ +export interface BuildsListByBuilderResourceOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByBuilderResource operation. */ +export type BuildsListByBuilderResourceResponse = BuildCollection; + +/** Optional parameters. */ +export interface BuildsGetOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type BuildsGetResponse = BuildResource; + +/** Optional parameters. */ +export interface BuildsCreateOrUpdateOptionalParams + 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 BuildsCreateOrUpdateResponse = BuildResource; + +/** Optional parameters. */ +export interface BuildsDeleteOptionalParams + 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 BuildsListByBuilderResourceNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByBuilderResourceNext operation. */ +export type BuildsListByBuilderResourceNextResponse = BuildCollection; + /** Optional parameters. */ export interface ConnectedEnvironmentsListBySubscriptionOptionalParams extends coreClient.OperationOptions {} @@ -3284,127 +3678,6 @@ export interface ContainerAppsListByResourceGroupNextOptionalParams /** Contains response data for the listByResourceGroupNext operation. */ export type ContainerAppsListByResourceGroupNextResponse = ContainerAppCollection; -/** Optional parameters. */ -export interface JobsListBySubscriptionOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscription operation. */ -export type JobsListBySubscriptionResponse = JobsCollection; - -/** Optional parameters. */ -export interface JobsListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type JobsListByResourceGroupResponse = JobsCollection; - -/** Optional parameters. */ -export interface JobsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type JobsGetResponse = Job; - -/** Optional parameters. */ -export interface JobsCreateOrUpdateOptionalParams - 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 { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the stopMultipleExecutions operation. */ -export type JobsStopMultipleExecutionsResponse = ContainerAppJobExecutions; - -/** Optional parameters. */ -export interface JobsListSecretsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listSecrets operation. */ -export type JobsListSecretsResponse = JobSecretsCollection; - -/** Optional parameters. */ -export interface JobsListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type JobsListBySubscriptionNextResponse = JobsCollection; - -/** Optional parameters. */ -export interface JobsListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type JobsListByResourceGroupNextResponse = JobsCollection; - -/** Optional parameters. */ -export interface JobsExecutionsListOptionalParams - extends coreClient.OperationOptions { - /** The filter to apply on the operation. */ - filter?: string; -} - -/** Contains response data for the list operation. */ -export type JobsExecutionsListResponse = ContainerAppJobExecutions; - -/** Optional parameters. */ -export interface JobsExecutionsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type JobsExecutionsListNextResponse = ContainerAppJobExecutions; - /** Optional parameters. */ export interface ContainerAppsRevisionsListRevisionsOptionalParams extends coreClient.OperationOptions { @@ -3542,6 +3815,127 @@ export interface OperationsListNextOptionalParams /** Contains response data for the listNext operation. */ export type OperationsListNextResponse = AvailableOperations; +/** Optional parameters. */ +export interface JobsListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type JobsListBySubscriptionResponse = JobsCollection; + +/** Optional parameters. */ +export interface JobsListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type JobsListByResourceGroupResponse = JobsCollection; + +/** Optional parameters. */ +export interface JobsGetOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type JobsGetResponse = Job; + +/** Optional parameters. */ +export interface JobsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type JobsCreateOrUpdateResponse = Job; + +/** Optional parameters. */ +export interface JobsDeleteOptionalParams extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface JobsUpdateOptionalParams extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type JobsUpdateResponse = Job; + +/** Optional parameters. */ +export interface JobsStartOptionalParams extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the start operation. */ +export type JobsStartResponse = JobExecutionBase; + +/** Optional parameters. */ +export interface JobsStopExecutionOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface JobsStopMultipleExecutionsOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the stopMultipleExecutions operation. */ +export type JobsStopMultipleExecutionsResponse = ContainerAppJobExecutions; + +/** Optional parameters. */ +export interface JobsListSecretsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listSecrets operation. */ +export type JobsListSecretsResponse = JobSecretsCollection; + +/** Optional parameters. */ +export interface JobsListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type JobsListBySubscriptionNextResponse = JobsCollection; + +/** Optional parameters. */ +export interface JobsListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type JobsListByResourceGroupNextResponse = JobsCollection; + +/** Optional parameters. */ +export interface JobsExecutionsListOptionalParams + extends coreClient.OperationOptions { + /** The filter to apply on the operation. */ + filter?: string; +} + +/** Contains response data for the list operation. */ +export type JobsExecutionsListResponse = ContainerAppJobExecutions; + +/** Optional parameters. */ +export interface JobsExecutionsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type JobsExecutionsListNextResponse = ContainerAppJobExecutions; + /** Optional parameters. */ export interface ManagedEnvironmentsListBySubscriptionOptionalParams extends coreClient.OperationOptions {} diff --git a/sdk/appcontainers/arm-appcontainers/src/models/mappers.ts b/sdk/appcontainers/arm-appcontainers/src/models/mappers.ts index 49b918fc0a4a..eef75cd32e5b 100644 --- a/sdk/appcontainers/arm-appcontainers/src/models/mappers.ts +++ b/sdk/appcontainers/arm-appcontainers/src/models/mappers.ts @@ -1427,47 +1427,26 @@ export const BillingMeterProperties: coreClient.CompositeMapper = { } }; -export const ConnectedEnvironmentCollection: coreClient.CompositeMapper = { +export const BuilderCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ConnectedEnvironmentCollection", + className: "BuilderCollection", modelProperties: { value: { serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "ConnectedEnvironment" + className: "BuilderResource" } } } }, nextLink: { serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const ExtendedLocation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExtendedLocation", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - type: { - serializedName: "type", type: { name: "String" } @@ -1476,101 +1455,89 @@ export const ExtendedLocation: coreClient.CompositeMapper = { } }; -export const CustomDomainConfiguration: coreClient.CompositeMapper = { +export const ManagedServiceIdentity: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CustomDomainConfiguration", + className: "ManagedServiceIdentity", modelProperties: { - customDomainVerificationId: { - serializedName: "customDomainVerificationId", + principalId: { + serializedName: "principalId", readOnly: true, type: { - name: "String" - } - }, - dnsSuffix: { - serializedName: "dnsSuffix", - type: { - name: "String" - } - }, - certificateValue: { - serializedName: "certificateValue", - type: { - name: "ByteArray" - } - }, - certificatePassword: { - serializedName: "certificatePassword", - type: { - name: "String" + name: "Uuid" } }, - expirationDate: { - serializedName: "expirationDate", + tenantId: { + serializedName: "tenantId", readOnly: true, type: { - name: "DateTime" + name: "Uuid" } }, - thumbprint: { - serializedName: "thumbprint", - readOnly: true, + type: { + serializedName: "type", + required: true, type: { name: "String" } }, - subjectName: { - serializedName: "subjectName", - readOnly: true, + userAssignedIdentities: { + serializedName: "userAssignedIdentities", type: { - name: "String" + name: "Dictionary", + value: { + type: { name: "Composite", className: "UserAssignedIdentity" } + } } } } } }; -export const CheckNameAvailabilityRequest: coreClient.CompositeMapper = { +export const UserAssignedIdentity: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CheckNameAvailabilityRequest", + className: "UserAssignedIdentity", modelProperties: { - name: { - serializedName: "name", + principalId: { + serializedName: "principalId", + readOnly: true, type: { - name: "String" + name: "Uuid" } }, - type: { - serializedName: "type", + clientId: { + serializedName: "clientId", + readOnly: true, type: { - name: "String" + name: "Uuid" } } } } }; -export const CheckNameAvailabilityResponse: coreClient.CompositeMapper = { +export const BuilderResourceUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CheckNameAvailabilityResponse", + className: "BuilderResourceUpdate", modelProperties: { - nameAvailable: { - serializedName: "nameAvailable", + identity: { + serializedName: "identity", type: { - name: "Boolean" + name: "Composite", + className: "ManagedServiceIdentity" } }, - reason: { - serializedName: "reason", + tags: { + serializedName: "tags", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } } }, - message: { - serializedName: "message", + environmentId: { + serializedName: "properties.environmentId", type: { name: "String" } @@ -1579,10 +1546,10 @@ export const CheckNameAvailabilityResponse: coreClient.CompositeMapper = { } }; -export const CertificateCollection: coreClient.CompositeMapper = { +export const BuildCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CertificateCollection", + className: "BuildCollection", modelProperties: { value: { serializedName: "value", @@ -1592,14 +1559,13 @@ export const CertificateCollection: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Certificate" + className: "BuildResource" } } } }, nextLink: { serializedName: "nextLink", - readOnly: true, type: { name: "String" } @@ -1608,237 +1574,216 @@ export const CertificateCollection: coreClient.CompositeMapper = { } }; -export const CertificateProperties: coreClient.CompositeMapper = { +export const ContainerRegistryWithCustomImage: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CertificateProperties", + className: "ContainerRegistryWithCustomImage", modelProperties: { - provisioningState: { - serializedName: "provisioningState", - readOnly: true, + server: { + serializedName: "server", + required: true, type: { name: "String" } }, - password: { - serializedName: "password", + identity: { + serializedName: "identity", + required: true, type: { name: "String" } }, - subjectName: { - serializedName: "subjectName", - readOnly: true, + image: { + serializedName: "image", type: { name: "String" } - }, - subjectAlternativeNames: { - serializedName: "subjectAlternativeNames", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - value: { - serializedName: "value", - type: { - name: "ByteArray" - } - }, - issuer: { - serializedName: "issuer", - readOnly: true, + } + } + } +}; + +export const BuildConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BuildConfiguration", + modelProperties: { + baseOs: { + serializedName: "baseOs", type: { name: "String" } }, - issueDate: { - serializedName: "issueDate", - readOnly: true, - type: { - name: "DateTime" - } - }, - expirationDate: { - serializedName: "expirationDate", - readOnly: true, + platform: { + serializedName: "platform", type: { - name: "DateTime" + name: "String" } }, - thumbprint: { - serializedName: "thumbprint", - readOnly: true, + platformVersion: { + serializedName: "platformVersion", type: { name: "String" } }, - valid: { - serializedName: "valid", - readOnly: true, + environmentVariables: { + serializedName: "environmentVariables", type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EnvironmentVariable" + } + } } }, - publicKeyHash: { - serializedName: "publicKeyHash", - readOnly: true, + preBuildSteps: { + serializedName: "preBuildSteps", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PreBuildStep" + } + } } } } } }; -export const CertificatePatch: coreClient.CompositeMapper = { +export const EnvironmentVariable: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CertificatePatch", + className: "EnvironmentVariable", modelProperties: { - tags: { - serializedName: "tags", + name: { + serializedName: "name", + required: true, type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" + } + }, + value: { + serializedName: "value", + required: true, + type: { + name: "String" } } } } }; -export const DaprComponentsCollection: coreClient.CompositeMapper = { +export const PreBuildStep: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DaprComponentsCollection", + className: "PreBuildStep", modelProperties: { - value: { - serializedName: "value", - required: true, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + scripts: { + serializedName: "scripts", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "DaprComponent" + name: "String" } } } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + httpGet: { + serializedName: "httpGet", type: { - name: "String" + name: "Composite", + className: "HttpGet" } } } } }; -export const Secret: coreClient.CompositeMapper = { +export const HttpGet: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Secret", + className: "HttpGet", modelProperties: { - name: { - serializedName: "name", + url: { + serializedName: "url", + required: true, type: { name: "String" } }, - value: { - serializedName: "value", + fileName: { + serializedName: "fileName", type: { name: "String" } }, - identity: { - serializedName: "identity", + headers: { + serializedName: "headers", type: { - name: "String" - } - }, - keyVaultUrl: { - serializedName: "keyVaultUrl", - type: { - name: "String" - } - } - } - } -}; - -export const DaprMetadata: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DaprMetadata", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - value: { - serializedName: "value", - type: { - name: "String" - } - }, - secretRef: { - serializedName: "secretRef", - type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const DaprSecretsCollection: coreClient.CompositeMapper = { +export const ConnectedEnvironmentCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DaprSecretsCollection", + className: "ConnectedEnvironmentCollection", modelProperties: { value: { serializedName: "value", - required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "DaprSecret" + className: "ConnectedEnvironment" } } } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } } } } }; -export const DaprSecret: coreClient.CompositeMapper = { +export const ExtendedLocation: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DaprSecret", + className: "ExtendedLocation", modelProperties: { name: { serializedName: "name", - readOnly: true, type: { name: "String" } }, - value: { - serializedName: "value", - readOnly: true, + type: { + serializedName: "type", type: { name: "String" } @@ -1847,69 +1792,101 @@ export const DaprSecret: coreClient.CompositeMapper = { } }; -export const ConnectedEnvironmentStoragesCollection: coreClient.CompositeMapper = { +export const CustomDomainConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ConnectedEnvironmentStoragesCollection", + className: "CustomDomainConfiguration", modelProperties: { - value: { - serializedName: "value", - required: true, + customDomainVerificationId: { + serializedName: "customDomainVerificationId", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectedEnvironmentStorage" - } - } + name: "String" + } + }, + dnsSuffix: { + serializedName: "dnsSuffix", + type: { + name: "String" + } + }, + certificateValue: { + serializedName: "certificateValue", + type: { + name: "ByteArray" + } + }, + certificatePassword: { + serializedName: "certificatePassword", + type: { + name: "String" + } + }, + expirationDate: { + serializedName: "expirationDate", + readOnly: true, + type: { + name: "DateTime" + } + }, + thumbprint: { + serializedName: "thumbprint", + readOnly: true, + type: { + name: "String" + } + }, + subjectName: { + serializedName: "subjectName", + readOnly: true, + type: { + name: "String" } } } } }; -export const ConnectedEnvironmentStorageProperties: coreClient.CompositeMapper = { +export const CheckNameAvailabilityRequest: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ConnectedEnvironmentStorageProperties", + className: "CheckNameAvailabilityRequest", modelProperties: { - azureFile: { - serializedName: "azureFile", + name: { + serializedName: "name", type: { - name: "Composite", - className: "AzureFileProperties" + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" } } } } }; -export const AzureFileProperties: coreClient.CompositeMapper = { +export const CheckNameAvailabilityResponse: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AzureFileProperties", + className: "CheckNameAvailabilityResponse", modelProperties: { - accountName: { - serializedName: "accountName", - type: { - name: "String" - } - }, - accountKey: { - serializedName: "accountKey", + nameAvailable: { + serializedName: "nameAvailable", type: { - name: "String" + name: "Boolean" } }, - accessMode: { - serializedName: "accessMode", + reason: { + serializedName: "reason", type: { name: "String" } }, - shareName: { - serializedName: "shareName", + message: { + serializedName: "message", type: { name: "String" } @@ -1918,10 +1895,10 @@ export const AzureFileProperties: coreClient.CompositeMapper = { } }; -export const ContainerAppCollection: coreClient.CompositeMapper = { +export const CertificateCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerAppCollection", + className: "CertificateCollection", modelProperties: { value: { serializedName: "value", @@ -1931,7 +1908,7 @@ export const ContainerAppCollection: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ContainerApp" + className: "Certificate" } } } @@ -1947,104 +1924,381 @@ export const ContainerAppCollection: coreClient.CompositeMapper = { } }; -export const ManagedServiceIdentity: coreClient.CompositeMapper = { +export const CertificateProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedServiceIdentity", + className: "CertificateProperties", modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, - type: { - name: "Uuid" - } - }, - tenantId: { - serializedName: "tenantId", + provisioningState: { + serializedName: "provisioningState", readOnly: true, type: { - name: "Uuid" + name: "String" } }, - type: { - serializedName: "type", - required: true, + password: { + serializedName: "password", type: { name: "String" } }, - userAssignedIdentities: { - serializedName: "userAssignedIdentities", - type: { - name: "Dictionary", - value: { - type: { name: "Composite", className: "UserAssignedIdentity" } - } - } - } - } - } -}; - -export const UserAssignedIdentity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "UserAssignedIdentity", - modelProperties: { - principalId: { - serializedName: "principalId", + subjectName: { + serializedName: "subjectName", readOnly: true, type: { - name: "Uuid" + name: "String" } }, - clientId: { - serializedName: "clientId", + subjectAlternativeNames: { + serializedName: "subjectAlternativeNames", readOnly: true, - type: { - name: "Uuid" - } - } - } - } -}; - -export const Configuration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Configuration", - modelProperties: { - secrets: { - serializedName: "secrets", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "Secret" + name: "String" } } } }, - activeRevisionsMode: { - defaultValue: "Single", - serializedName: "activeRevisionsMode", + value: { + serializedName: "value", + type: { + name: "ByteArray" + } + }, + issuer: { + serializedName: "issuer", + readOnly: true, type: { name: "String" } }, - ingress: { - serializedName: "ingress", + issueDate: { + serializedName: "issueDate", + readOnly: true, type: { - name: "Composite", - className: "Ingress" + name: "DateTime" } }, - registries: { - serializedName: "registries", + expirationDate: { + serializedName: "expirationDate", + readOnly: true, type: { - name: "Sequence", - element: { + name: "DateTime" + } + }, + thumbprint: { + serializedName: "thumbprint", + readOnly: true, + type: { + name: "String" + } + }, + valid: { + serializedName: "valid", + readOnly: true, + type: { + name: "Boolean" + } + }, + publicKeyHash: { + serializedName: "publicKeyHash", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const CertificatePatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CertificatePatch", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const DaprComponentsCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DaprComponentsCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DaprComponent" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const Secret: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Secret", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "String" + } + }, + identity: { + serializedName: "identity", + type: { + name: "String" + } + }, + keyVaultUrl: { + serializedName: "keyVaultUrl", + type: { + name: "String" + } + } + } + } +}; + +export const DaprMetadata: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DaprMetadata", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "String" + } + }, + secretRef: { + serializedName: "secretRef", + type: { + name: "String" + } + } + } + } +}; + +export const DaprSecretsCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DaprSecretsCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DaprSecret" + } + } + } + } + } + } +}; + +export const DaprSecret: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DaprSecret", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + value: { + serializedName: "value", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ConnectedEnvironmentStoragesCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConnectedEnvironmentStoragesCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConnectedEnvironmentStorage" + } + } + } + } + } + } +}; + +export const ConnectedEnvironmentStorageProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConnectedEnvironmentStorageProperties", + 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 ContainerAppCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerAppCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContainerApp" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const Configuration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Configuration", + modelProperties: { + secrets: { + serializedName: "secrets", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Secret" + } + } + } + }, + activeRevisionsMode: { + defaultValue: "Single", + serializedName: "activeRevisionsMode", + type: { + name: "String" + } + }, + ingress: { + serializedName: "ingress", + type: { + name: "Composite", + className: "Ingress" + } + }, + registries: { + serializedName: "registries", + type: { + name: "Sequence", + element: { type: { name: "Composite", className: "RegistryCredentials" @@ -2169,6 +2423,18 @@ export const Ingress: coreClient.CompositeMapper = { name: "Composite", className: "CorsPolicy" } + }, + additionalPortMappings: { + serializedName: "additionalPortMappings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IngressPortMapping" + } + } + } } } } @@ -2353,6 +2619,35 @@ export const CorsPolicy: coreClient.CompositeMapper = { } }; +export const IngressPortMapping: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IngressPortMapping", + modelProperties: { + external: { + serializedName: "external", + required: true, + type: { + name: "Boolean" + } + }, + targetPort: { + serializedName: "targetPort", + required: true, + type: { + name: "Number" + } + }, + exposedPort: { + serializedName: "exposedPort", + type: { + name: "Number" + } + } + } + } +}; + export const RegistryCredentials: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2456,6 +2751,12 @@ export const Template: coreClient.CompositeMapper = { name: "String" } }, + terminationGracePeriodSeconds: { + serializedName: "terminationGracePeriodSeconds", + type: { + name: "Number" + } + }, initContainers: { serializedName: "initContainers", type: { @@ -2648,6 +2949,12 @@ export const VolumeMount: coreClient.CompositeMapper = { type: { name: "String" } + }, + subPath: { + serializedName: "subPath", + type: { + name: "String" + } } } } @@ -3064,6 +3371,12 @@ export const Volume: coreClient.CompositeMapper = { } } } + }, + mountOptions: { + serializedName: "mountOptions", + type: { + name: "String" + } } } } @@ -3339,10 +3652,10 @@ export const ContainerAppSecret: coreClient.CompositeMapper = { } }; -export const JobsCollection: coreClient.CompositeMapper = { +export const RevisionCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobsCollection", + className: "RevisionCollection", modelProperties: { value: { serializedName: "value", @@ -3352,7 +3665,7 @@ export const JobsCollection: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Job" + className: "Revision" } } } @@ -3368,66 +3681,87 @@ export const JobsCollection: coreClient.CompositeMapper = { } }; -export const JobConfiguration: coreClient.CompositeMapper = { +export const ReplicaContainer: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobConfiguration", + className: "ReplicaContainer", modelProperties: { - secrets: { - serializedName: "secrets", + name: { + serializedName: "name", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Secret" - } - } + name: "String" } }, - triggerType: { - defaultValue: "Manual", - serializedName: "triggerType", - required: true, + containerId: { + serializedName: "containerId", type: { name: "String" } }, - replicaTimeout: { - serializedName: "replicaTimeout", - required: true, + ready: { + serializedName: "ready", type: { - name: "Number" + name: "Boolean" } }, - replicaRetryLimit: { - serializedName: "replicaRetryLimit", + started: { + serializedName: "started", + type: { + name: "Boolean" + } + }, + restartCount: { + serializedName: "restartCount", type: { name: "Number" } }, - manualTriggerConfig: { - serializedName: "manualTriggerConfig", + runningState: { + serializedName: "runningState", + readOnly: true, type: { - name: "Composite", - className: "JobConfigurationManualTriggerConfig" + name: "String" } }, - scheduleTriggerConfig: { - serializedName: "scheduleTriggerConfig", + runningStateDetails: { + serializedName: "runningStateDetails", + readOnly: true, type: { - name: "Composite", - className: "JobConfigurationScheduleTriggerConfig" + name: "String" } }, - registries: { - serializedName: "registries", + logStreamEndpoint: { + serializedName: "logStreamEndpoint", + readOnly: true, + type: { + name: "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: "RegistryCredentials" + className: "Replica" } } } @@ -3436,201 +3770,235 @@ export const JobConfiguration: coreClient.CompositeMapper = { } }; -export const JobConfigurationManualTriggerConfig: coreClient.CompositeMapper = { +export const DiagnosticsCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobConfigurationManualTriggerConfig", + className: "DiagnosticsCollection", modelProperties: { - replicaCompletionCount: { - serializedName: "replicaCompletionCount", + value: { + serializedName: "value", + required: true, type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Diagnostics" + } + } } }, - parallelism: { - serializedName: "parallelism", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { - name: "Number" + name: "String" } } } } }; -export const JobConfigurationScheduleTriggerConfig: coreClient.CompositeMapper = { +export const DiagnosticsProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobConfigurationScheduleTriggerConfig", + className: "DiagnosticsProperties", modelProperties: { - replicaCompletionCount: { - serializedName: "replicaCompletionCount", + metadata: { + serializedName: "metadata", type: { - name: "Number" + name: "Composite", + className: "DiagnosticsDefinition" } }, - cronExpression: { - serializedName: "cronExpression", - required: true, + dataset: { + serializedName: "dataset", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DiagnosticsDataApiResponse" + } + } } }, - parallelism: { - serializedName: "parallelism", + status: { + serializedName: "status", type: { - name: "Number" + name: "Composite", + className: "DiagnosticsStatus" + } + }, + dataProviderMetadata: { + serializedName: "dataProviderMetadata", + type: { + name: "Composite", + className: "DiagnosticDataProviderMetadata" } } } } }; -export const JobTemplate: coreClient.CompositeMapper = { +export const DiagnosticsDefinition: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobTemplate", + className: "DiagnosticsDefinition", modelProperties: { - initContainers: { - serializedName: "initContainers", + id: { + serializedName: "id", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "InitContainer" - } - } + name: "String" } }, - containers: { - serializedName: "containers", + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + description: { + serializedName: "description", + readOnly: true, + type: { + name: "String" + } + }, + author: { + serializedName: "author", + readOnly: true, + type: { + name: "String" + } + }, + category: { + serializedName: "category", + readOnly: true, + type: { + name: "String" + } + }, + supportTopicList: { + serializedName: "supportTopicList", type: { name: "Sequence", element: { type: { name: "Composite", - className: "Container" + className: "DiagnosticSupportTopic" } } } - }, - volumes: { - serializedName: "volumes", + }, + analysisTypes: { + serializedName: "analysisTypes", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "Volume" + name: "String" } } } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + score: { + serializedName: "score", + readOnly: true, + type: { + name: "Number" + } } } } }; -export const JobPatchProperties: coreClient.CompositeMapper = { +export const DiagnosticSupportTopic: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobPatchProperties", + className: "DiagnosticSupportTopic", modelProperties: { - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "ManagedServiceIdentity" - } - }, - tags: { - serializedName: "tags", + id: { + serializedName: "id", + readOnly: true, type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" } }, - properties: { - serializedName: "properties", + pesId: { + serializedName: "pesId", + readOnly: true, type: { - name: "Composite", - className: "JobPatchPropertiesProperties" + name: "String" } } } } }; -export const JobPatchPropertiesProperties: coreClient.CompositeMapper = { +export const DiagnosticsDataApiResponse: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobPatchPropertiesProperties", + className: "DiagnosticsDataApiResponse", modelProperties: { - environmentId: { - serializedName: "environmentId", - type: { - name: "String" - } - }, - configuration: { - serializedName: "configuration", + table: { + serializedName: "table", type: { name: "Composite", - className: "JobConfiguration" + className: "DiagnosticDataTableResponseObject" } }, - template: { - serializedName: "template", + renderingProperties: { + serializedName: "renderingProperties", type: { name: "Composite", - className: "JobTemplate" - } - }, - outboundIpAddresses: { - serializedName: "outboundIpAddresses", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - eventStreamEndpoint: { - serializedName: "eventStreamEndpoint", - type: { - name: "String" + className: "DiagnosticRendering" } } } } }; -export const JobExecutionTemplate: coreClient.CompositeMapper = { +export const DiagnosticDataTableResponseObject: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobExecutionTemplate", + className: "DiagnosticDataTableResponseObject", modelProperties: { - containers: { - serializedName: "containers", + tableName: { + serializedName: "tableName", + type: { + name: "String" + } + }, + columns: { + serializedName: "columns", type: { name: "Sequence", element: { type: { name: "Composite", - className: "JobExecutionContainer" + className: "DiagnosticDataTableResponseColumn" } } } }, - initContainers: { - serializedName: "initContainers", + rows: { + serializedName: "rows", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "JobExecutionContainer" + name: "Dictionary", + value: { type: { name: "any" } } } } } @@ -3639,103 +4007,106 @@ export const JobExecutionTemplate: coreClient.CompositeMapper = { } }; -export const JobExecutionContainer: coreClient.CompositeMapper = { +export const DiagnosticDataTableResponseColumn: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobExecutionContainer", + className: "DiagnosticDataTableResponseColumn", modelProperties: { - image: { - serializedName: "image", + columnName: { + serializedName: "columnName", type: { name: "String" } }, - name: { - serializedName: "name", + dataType: { + serializedName: "dataType", type: { name: "String" } }, - command: { - serializedName: "command", + columnType: { + serializedName: "columnType", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" + } + } + } + } +}; + +export const DiagnosticRendering: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiagnosticRendering", + modelProperties: { + type: { + serializedName: "type", + type: { + name: "Number" } }, - args: { - serializedName: "args", + title: { + serializedName: "title", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } }, - env: { - serializedName: "env", + description: { + serializedName: "description", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EnvironmentVar" - } - } + name: "String" } }, - resources: { - serializedName: "resources", + isVisible: { + serializedName: "isVisible", type: { - name: "Composite", - className: "ContainerResources" + name: "Boolean" } } } } }; -export const JobExecutionBase: coreClient.CompositeMapper = { +export const DiagnosticsStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobExecutionBase", + className: "DiagnosticsStatus", modelProperties: { - name: { - serializedName: "name", + message: { + serializedName: "message", type: { name: "String" } }, - id: { - serializedName: "id", + statusId: { + serializedName: "statusId", type: { - name: "String" + name: "Number" } } } } }; -export const JobExecutionNamesCollection: coreClient.CompositeMapper = { +export const DiagnosticDataProviderMetadata: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobExecutionNamesCollection", + 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: "JobExecutionBase" + className: "DiagnosticDataProviderMetadataPropertyBagItem" } } } @@ -3744,27 +4115,19 @@ export const JobExecutionNamesCollection: coreClient.CompositeMapper = { } }; -export const ContainerAppJobExecutions: coreClient.CompositeMapper = { +export const DiagnosticDataProviderMetadataPropertyBagItem: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerAppJobExecutions", + className: "DiagnosticDataProviderMetadataPropertyBagItem", modelProperties: { - value: { - serializedName: "value", - required: true, + name: { + serializedName: "name", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JobExecution" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + value: { + serializedName: "value", type: { name: "String" } @@ -3773,102 +4136,80 @@ export const ContainerAppJobExecutions: coreClient.CompositeMapper = { } }; -export const JobExecution: coreClient.CompositeMapper = { +export const VnetConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobExecution", + className: "VnetConfiguration", modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - id: { - serializedName: "id", - type: { - name: "String" - } - }, - type: { - serializedName: "type", + internal: { + serializedName: "internal", type: { - name: "String" + name: "Boolean" } }, - status: { - serializedName: "status", - readOnly: true, + infrastructureSubnetId: { + serializedName: "infrastructureSubnetId", type: { name: "String" } }, - startTime: { - serializedName: "startTime", + dockerBridgeCidr: { + serializedName: "dockerBridgeCidr", type: { - name: "DateTime" + name: "String" } }, - endTime: { - serializedName: "endTime", + platformReservedCidr: { + serializedName: "platformReservedCidr", type: { - name: "DateTime" + name: "String" } }, - template: { - serializedName: "template", + platformReservedDnsIP: { + serializedName: "platformReservedDnsIP", type: { - name: "Composite", - className: "JobExecutionTemplate" + name: "String" } } } } }; -export const JobSecretsCollection: coreClient.CompositeMapper = { +export const AppLogsConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobSecretsCollection", + className: "AppLogsConfiguration", modelProperties: { - value: { - serializedName: "value", - required: true, + destination: { + serializedName: "destination", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Secret" - } - } + name: "String" + } + }, + logAnalyticsConfiguration: { + serializedName: "logAnalyticsConfiguration", + type: { + name: "Composite", + className: "LogAnalyticsConfiguration" } } } } }; -export const RevisionCollection: coreClient.CompositeMapper = { +export const LogAnalyticsConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RevisionCollection", + className: "LogAnalyticsConfiguration", modelProperties: { - value: { - serializedName: "value", - required: true, + customerId: { + serializedName: "customerId", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Revision" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + sharedKey: { + serializedName: "sharedKey", type: { name: "String" } @@ -3877,101 +4218,64 @@ export const RevisionCollection: coreClient.CompositeMapper = { } }; -export const ReplicaContainer: coreClient.CompositeMapper = { +export const WorkloadProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ReplicaContainer", + className: "WorkloadProfile", modelProperties: { name: { serializedName: "name", + required: true, type: { name: "String" } }, - containerId: { - serializedName: "containerId", + workloadProfileType: { + serializedName: "workloadProfileType", + required: true, type: { name: "String" } }, - ready: { - serializedName: "ready", - type: { - name: "Boolean" - } - }, - started: { - serializedName: "started", - type: { - name: "Boolean" - } - }, - restartCount: { - serializedName: "restartCount", + minimumCount: { + serializedName: "minimumCount", type: { name: "Number" } }, - logStreamEndpoint: { - serializedName: "logStreamEndpoint", - readOnly: true, - type: { - name: "String" - } - }, - execEndpoint: { - serializedName: "execEndpoint", - readOnly: true, + maximumCount: { + serializedName: "maximumCount", type: { - name: "String" + name: "Number" } } } } }; -export const ReplicaCollection: coreClient.CompositeMapper = { +export const KedaConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ReplicaCollection", + className: "KedaConfiguration", modelProperties: { - value: { - serializedName: "value", - required: true, + version: { + serializedName: "version", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Replica" - } - } + name: "String" } } } } }; -export const DiagnosticsCollection: coreClient.CompositeMapper = { +export const DaprConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticsCollection", + className: "DaprConfiguration", modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Diagnostics" - } - } - } - }, - nextLink: { - serializedName: "nextLink", + version: { + serializedName: "version", readOnly: true, type: { name: "String" @@ -3981,144 +4285,92 @@ export const DiagnosticsCollection: coreClient.CompositeMapper = { } }; -export const DiagnosticsProperties: coreClient.CompositeMapper = { +export const AvailableOperations: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticsProperties", + className: "AvailableOperations", modelProperties: { - metadata: { - serializedName: "metadata", - type: { - name: "Composite", - className: "DiagnosticsDefinition" - } - }, - dataset: { - serializedName: "dataset", + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { name: "Composite", - className: "DiagnosticsDataApiResponse" + className: "OperationDetail" } } } }, - status: { - serializedName: "status", - type: { - name: "Composite", - className: "DiagnosticsStatus" - } - }, - dataProviderMetadata: { - serializedName: "dataProviderMetadata", + nextLink: { + serializedName: "nextLink", type: { - name: "Composite", - className: "DiagnosticDataProviderMetadata" + name: "String" } } } } }; -export const DiagnosticsDefinition: coreClient.CompositeMapper = { +export const OperationDetail: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticsDefinition", + className: "OperationDetail", modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, name: { serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - description: { - serializedName: "description", - readOnly: true, - type: { - name: "String" - } - }, - author: { - serializedName: "author", - readOnly: true, - type: { - name: "String" - } - }, - category: { - serializedName: "category", - readOnly: true, type: { name: "String" } }, - supportTopicList: { - serializedName: "supportTopicList", + isDataAction: { + serializedName: "isDataAction", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DiagnosticSupportTopic" - } - } + name: "Boolean" } }, - analysisTypes: { - serializedName: "analysisTypes", + display: { + serializedName: "display", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "OperationDisplay" } }, - type: { - serializedName: "type", - readOnly: true, + origin: { + serializedName: "origin", type: { name: "String" } - }, - score: { - serializedName: "score", - readOnly: true, - type: { - name: "Number" - } } } } }; -export const DiagnosticSupportTopic: coreClient.CompositeMapper = { +export const OperationDisplay: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticSupportTopic", + className: "OperationDisplay", modelProperties: { - id: { - serializedName: "id", - readOnly: true, + provider: { + serializedName: "provider", + type: { + name: "String" + } + }, + resource: { + serializedName: "resource", type: { name: "String" } }, - pesId: { - serializedName: "pesId", - readOnly: true, + operation: { + serializedName: "operation", + type: { + name: "String" + } + }, + description: { + serializedName: "description", type: { name: "String" } @@ -4127,60 +4379,95 @@ export const DiagnosticSupportTopic: coreClient.CompositeMapper = { } }; -export const DiagnosticsDataApiResponse: coreClient.CompositeMapper = { +export const JobsCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticsDataApiResponse", + className: "JobsCollection", modelProperties: { - table: { - serializedName: "table", + value: { + serializedName: "value", + required: true, type: { - name: "Composite", - className: "DiagnosticDataTableResponseObject" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Job" + } + } } }, - renderingProperties: { - serializedName: "renderingProperties", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { - name: "Composite", - className: "DiagnosticRendering" + name: "String" } } } } }; -export const DiagnosticDataTableResponseObject: coreClient.CompositeMapper = { +export const JobConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticDataTableResponseObject", + className: "JobConfiguration", modelProperties: { - tableName: { - serializedName: "tableName", - type: { - name: "String" - } - }, - columns: { - serializedName: "columns", + secrets: { + serializedName: "secrets", type: { name: "Sequence", element: { type: { name: "Composite", - className: "DiagnosticDataTableResponseColumn" + className: "Secret" } } } }, - rows: { - serializedName: "rows", + triggerType: { + defaultValue: "Manual", + serializedName: "triggerType", + required: true, + type: { + name: "String" + } + }, + replicaTimeout: { + serializedName: "replicaTimeout", + required: true, + type: { + name: "Number" + } + }, + replicaRetryLimit: { + serializedName: "replicaRetryLimit", + type: { + name: "Number" + } + }, + manualTriggerConfig: { + serializedName: "manualTriggerConfig", + type: { + name: "Composite", + className: "JobConfigurationManualTriggerConfig" + } + }, + scheduleTriggerConfig: { + serializedName: "scheduleTriggerConfig", + type: { + name: "Composite", + className: "JobConfigurationScheduleTriggerConfig" + } + }, + registries: { + serializedName: "registries", type: { name: "Sequence", element: { type: { - name: "Dictionary", - value: { type: { name: "any" } } + name: "Composite", + className: "RegistryCredentials" } } } @@ -4189,106 +4476,92 @@ export const DiagnosticDataTableResponseObject: coreClient.CompositeMapper = { } }; -export const DiagnosticDataTableResponseColumn: coreClient.CompositeMapper = { +export const JobConfigurationManualTriggerConfig: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticDataTableResponseColumn", + className: "JobConfigurationManualTriggerConfig", modelProperties: { - columnName: { - serializedName: "columnName", - type: { - name: "String" - } - }, - dataType: { - serializedName: "dataType", + replicaCompletionCount: { + serializedName: "replicaCompletionCount", type: { - name: "String" + name: "Number" } }, - columnType: { - serializedName: "columnType", + parallelism: { + serializedName: "parallelism", type: { - name: "String" + name: "Number" } } } } }; -export const DiagnosticRendering: coreClient.CompositeMapper = { +export const JobConfigurationScheduleTriggerConfig: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticRendering", + className: "JobConfigurationScheduleTriggerConfig", modelProperties: { - type: { - serializedName: "type", + replicaCompletionCount: { + serializedName: "replicaCompletionCount", type: { name: "Number" } }, - title: { - serializedName: "title", - type: { - name: "String" - } - }, - description: { - serializedName: "description", + cronExpression: { + serializedName: "cronExpression", + required: true, type: { name: "String" } }, - isVisible: { - serializedName: "isVisible", + parallelism: { + serializedName: "parallelism", type: { - name: "Boolean" + name: "Number" } } } } }; -export const DiagnosticsStatus: coreClient.CompositeMapper = { +export const JobTemplate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticsStatus", + className: "JobTemplate", modelProperties: { - message: { - serializedName: "message", + initContainers: { + serializedName: "initContainers", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InitContainer" + } + } } }, - statusId: { - serializedName: "statusId", - type: { - name: "Number" - } - } - } - } -}; - -export const DiagnosticDataProviderMetadata: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DiagnosticDataProviderMetadata", - modelProperties: { - providerName: { - serializedName: "providerName", + containers: { + serializedName: "containers", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Container" + } + } } }, - propertyBag: { - serializedName: "propertyBag", + volumes: { + serializedName: "volumes", type: { name: "Sequence", element: { type: { name: "Composite", - className: "DiagnosticDataProviderMetadataPropertyBagItem" + className: "Volume" } } } @@ -4297,58 +4570,74 @@ export const DiagnosticDataProviderMetadata: coreClient.CompositeMapper = { } }; -export const DiagnosticDataProviderMetadataPropertyBagItem: coreClient.CompositeMapper = { +export const JobPatchProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticDataProviderMetadataPropertyBagItem", + className: "JobPatchProperties", modelProperties: { - name: { - serializedName: "name", + identity: { + serializedName: "identity", type: { - name: "String" + name: "Composite", + className: "ManagedServiceIdentity" } }, - value: { - serializedName: "value", + tags: { + serializedName: "tags", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "JobPatchPropertiesProperties" } } } } }; -export const VnetConfiguration: coreClient.CompositeMapper = { +export const JobPatchPropertiesProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VnetConfiguration", + className: "JobPatchPropertiesProperties", modelProperties: { - internal: { - serializedName: "internal", + environmentId: { + serializedName: "environmentId", type: { - name: "Boolean" + name: "String" } }, - infrastructureSubnetId: { - serializedName: "infrastructureSubnetId", + configuration: { + serializedName: "configuration", type: { - name: "String" + name: "Composite", + className: "JobConfiguration" } }, - dockerBridgeCidr: { - serializedName: "dockerBridgeCidr", + template: { + serializedName: "template", type: { - name: "String" + name: "Composite", + className: "JobTemplate" } }, - platformReservedCidr: { - serializedName: "platformReservedCidr", + outboundIpAddresses: { + serializedName: "outboundIpAddresses", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - platformReservedDnsIP: { - serializedName: "platformReservedDnsIP", + eventStreamEndpoint: { + serializedName: "eventStreamEndpoint", type: { name: "String" } @@ -4357,92 +4646,114 @@ export const VnetConfiguration: coreClient.CompositeMapper = { } }; -export const AppLogsConfiguration: coreClient.CompositeMapper = { +export const JobExecutionTemplate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AppLogsConfiguration", + className: "JobExecutionTemplate", modelProperties: { - destination: { - serializedName: "destination", + containers: { + serializedName: "containers", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JobExecutionContainer" + } + } } }, - logAnalyticsConfiguration: { - serializedName: "logAnalyticsConfiguration", + initContainers: { + serializedName: "initContainers", type: { - name: "Composite", - className: "LogAnalyticsConfiguration" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JobExecutionContainer" + } + } } } } } }; -export const LogAnalyticsConfiguration: coreClient.CompositeMapper = { +export const JobExecutionContainer: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LogAnalyticsConfiguration", + className: "JobExecutionContainer", modelProperties: { - customerId: { - serializedName: "customerId", + image: { + serializedName: "image", type: { name: "String" } }, - sharedKey: { - serializedName: "sharedKey", - type: { - name: "String" - } - } - } - } -}; - -export const WorkloadProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkloadProfile", - modelProperties: { name: { serializedName: "name", - required: true, type: { name: "String" } }, - workloadProfileType: { - serializedName: "workloadProfileType", - required: true, + command: { + serializedName: "command", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - minimumCount: { - serializedName: "minimumCount", + args: { + serializedName: "args", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - maximumCount: { - serializedName: "maximumCount", + env: { + serializedName: "env", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EnvironmentVar" + } + } + } + }, + resources: { + serializedName: "resources", + type: { + name: "Composite", + className: "ContainerResources" } } } } }; -export const KedaConfiguration: coreClient.CompositeMapper = { +export const JobExecutionBase: coreClient.CompositeMapper = { type: { name: "Composite", - className: "KedaConfiguration", + className: "JobExecutionBase", modelProperties: { - version: { - serializedName: "version", - readOnly: true, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + id: { + serializedName: "id", type: { name: "String" } @@ -4451,41 +4762,49 @@ export const KedaConfiguration: coreClient.CompositeMapper = { } }; -export const DaprConfiguration: coreClient.CompositeMapper = { +export const JobExecutionNamesCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DaprConfiguration", + className: "JobExecutionNamesCollection", modelProperties: { - version: { - serializedName: "version", - readOnly: true, + value: { + serializedName: "value", + required: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JobExecutionBase" + } + } } } } } }; -export const AvailableOperations: coreClient.CompositeMapper = { +export const ContainerAppJobExecutions: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AvailableOperations", + className: "ContainerAppJobExecutions", modelProperties: { value: { serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "OperationDetail" + className: "JobExecution" } } } }, nextLink: { serializedName: "nextLink", + readOnly: true, type: { name: "String" } @@ -4494,10 +4813,10 @@ export const AvailableOperations: coreClient.CompositeMapper = { } }; -export const OperationDetail: coreClient.CompositeMapper = { +export const JobExecution: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationDetail", + className: "JobExecution", modelProperties: { name: { serializedName: "name", @@ -4505,56 +4824,64 @@ export const OperationDetail: coreClient.CompositeMapper = { name: "String" } }, - isDataAction: { - serializedName: "isDataAction", + id: { + serializedName: "id", type: { - name: "Boolean" + name: "String" } }, - display: { - serializedName: "display", + type: { + serializedName: "type", type: { - name: "Composite", - className: "OperationDisplay" + name: "String" } }, - origin: { - serializedName: "origin", + status: { + serializedName: "status", + readOnly: true, type: { name: "String" } - } - } - } -}; - -export const OperationDisplay: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationDisplay", - modelProperties: { - provider: { - serializedName: "provider", + }, + startTime: { + serializedName: "startTime", type: { - name: "String" + name: "DateTime" } }, - resource: { - serializedName: "resource", + endTime: { + serializedName: "endTime", type: { - name: "String" + name: "DateTime" } }, - operation: { - serializedName: "operation", + template: { + serializedName: "template", type: { - name: "String" + name: "Composite", + className: "JobExecutionTemplate" } - }, - description: { - serializedName: "description", + } + } + } +}; + +export const JobSecretsCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobSecretsCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Secret" + } + } } } } @@ -5076,6 +5403,51 @@ export const BillingMeter: coreClient.CompositeMapper = { } }; +export const BuildResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BuildResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + buildStatus: { + serializedName: "properties.buildStatus", + readOnly: true, + type: { + name: "String" + } + }, + destinationContainerRegistry: { + serializedName: "properties.destinationContainerRegistry", + type: { + name: "Composite", + className: "ContainerRegistryWithCustomImage" + } + }, + configuration: { + serializedName: "properties.configuration", + type: { + name: "Composite", + className: "BuildConfiguration" + } + }, + uploadEndpoint: { + serializedName: "properties.uploadEndpoint", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + export const DaprComponent: coreClient.CompositeMapper = { type: { name: "Composite", @@ -5259,7 +5631,21 @@ export const Replica: coreClient.CompositeMapper = { serializedName: "properties.createdTime", readOnly: true, type: { - name: "DateTime" + name: "DateTime" + } + }, + runningState: { + serializedName: "properties.runningState", + readOnly: true, + type: { + name: "String" + } + }, + runningStateDetails: { + serializedName: "properties.runningStateDetails", + readOnly: true, + type: { + name: "String" } }, containers: { @@ -5273,6 +5659,18 @@ export const Replica: coreClient.CompositeMapper = { } } } + }, + initContainers: { + serializedName: "properties.initContainers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReplicaContainer" + } + } + } } } } @@ -5365,6 +5763,50 @@ export const SourceControl: coreClient.CompositeMapper = { } }; +export const BuilderResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BuilderResource", + 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" + } + }, + buildComputeId: { + serializedName: "properties.buildComputeId", + readOnly: true, + type: { + name: "String" + } + }, + patchComputeId: { + serializedName: "properties.patchComputeId", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + export const ConnectedEnvironment: coreClient.CompositeMapper = { type: { name: "Composite", @@ -5579,75 +6021,6 @@ export const ContainerAppAuthToken: coreClient.CompositeMapper = { } }; -export const Job: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Job", - modelProperties: { - ...TrackedResource.type.modelProperties, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "ManagedServiceIdentity" - } - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String" - } - }, - environmentId: { - serializedName: "properties.environmentId", - type: { - name: "String" - } - }, - workloadProfileName: { - serializedName: "properties.workloadProfileName", - type: { - name: "String" - } - }, - configuration: { - serializedName: "properties.configuration", - type: { - name: "Composite", - className: "JobConfiguration" - } - }, - template: { - serializedName: "properties.template", - type: { - name: "Composite", - className: "JobTemplate" - } - }, - outboundIpAddresses: { - serializedName: "properties.outboundIpAddresses", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - eventStreamEndpoint: { - serializedName: "properties.eventStreamEndpoint", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - export const ManagedEnvironment: coreClient.CompositeMapper = { type: { name: "Composite", @@ -5770,6 +6143,75 @@ export const ManagedEnvironment: coreClient.CompositeMapper = { } }; +export const Job: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Job", + modelProperties: { + ...TrackedResource.type.modelProperties, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ManagedServiceIdentity" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + environmentId: { + serializedName: "properties.environmentId", + type: { + name: "String" + } + }, + workloadProfileName: { + serializedName: "properties.workloadProfileName", + type: { + name: "String" + } + }, + configuration: { + serializedName: "properties.configuration", + type: { + name: "Composite", + className: "JobConfiguration" + } + }, + template: { + serializedName: "properties.template", + type: { + name: "Composite", + className: "JobTemplate" + } + }, + outboundIpAddresses: { + serializedName: "properties.outboundIpAddresses", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + eventStreamEndpoint: { + serializedName: "properties.eventStreamEndpoint", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + export const ManagedCertificate: coreClient.CompositeMapper = { type: { name: "Composite", @@ -5811,6 +6253,81 @@ export const EnvironmentAuthToken: coreClient.CompositeMapper = { } }; +export const BuildersCreateOrUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BuildersCreateOrUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const BuildersUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BuildersUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const BuildersDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BuildersDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const BuildsCreateOrUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BuildsCreateOrUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const BuildsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BuildsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + export const ConnectedEnvironmentsDeleteHeaders: coreClient.CompositeMapper = { type: { name: "Composite", diff --git a/sdk/appcontainers/arm-appcontainers/src/models/parameters.ts b/sdk/appcontainers/arm-appcontainers/src/models/parameters.ts index d7bcee45d281..3f64bf2446de 100644 --- a/sdk/appcontainers/arm-appcontainers/src/models/parameters.ts +++ b/sdk/appcontainers/arm-appcontainers/src/models/parameters.ts @@ -13,6 +13,9 @@ import { } from "@azure/core-client"; import { AuthConfig as AuthConfigMapper, + BuilderResource as BuilderResourceMapper, + BuilderResourceUpdate as BuilderResourceUpdateMapper, + BuildResource as BuildResourceMapper, ConnectedEnvironment as ConnectedEnvironmentMapper, CheckNameAvailabilityRequest as CheckNameAvailabilityRequestMapper, Certificate as CertificateMapper, @@ -98,7 +101,7 @@ export const containerAppName: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-11-01-preview", + defaultValue: "2023-05-02-preview", isConstant: true, serializedName: "api-version", type: { @@ -161,6 +164,53 @@ export const location: OperationURLParameter = { } }; +export const builderName: OperationURLParameter = { + parameterPath: "builderName", + mapper: { + constraints: { + Pattern: new RegExp("^[-\\w\\._\\(\\)]+$"), + MaxLength: 32, + MinLength: 2 + }, + serializedName: "builderName", + required: true, + type: { + name: "String" + } + } +}; + +export const builderEnvelope: OperationParameter = { + parameterPath: "builderEnvelope", + mapper: BuilderResourceMapper +}; + +export const builderEnvelope1: OperationParameter = { + parameterPath: "builderEnvelope", + mapper: BuilderResourceUpdateMapper +}; + +export const buildName: OperationURLParameter = { + parameterPath: "buildName", + mapper: { + constraints: { + Pattern: new RegExp("^[-\\w\\._\\(\\)]+$"), + MaxLength: 64, + MinLength: 2 + }, + serializedName: "buildName", + required: true, + type: { + name: "String" + } + } +}; + +export const buildEnvelope: OperationParameter = { + parameterPath: "buildEnvelope", + mapper: BuildResourceMapper +}; + export const connectedEnvironmentName: OperationURLParameter = { parameterPath: "connectedEnvironmentName", mapper: { @@ -250,29 +300,20 @@ export const customHostname: OperationQueryParameter = { } }; -export const jobName: OperationURLParameter = { - parameterPath: "jobName", +export const filter: OperationQueryParameter = { + parameterPath: ["options", "filter"], mapper: { - constraints: { - Pattern: new RegExp("^[-\\w\\._\\(\\)]+$") - }, - serializedName: "jobName", - required: true, + serializedName: "$filter", type: { name: "String" } } }; -export const jobEnvelope: OperationParameter = { - parameterPath: "jobEnvelope", - mapper: JobMapper -}; - -export const jobName1: OperationURLParameter = { - parameterPath: "jobName", +export const revisionName: OperationURLParameter = { + parameterPath: "revisionName", mapper: { - serializedName: "jobName", + serializedName: "revisionName", required: true, type: { name: "String" @@ -280,23 +321,10 @@ export const jobName1: OperationURLParameter = { } }; -export const jobEnvelope1: OperationParameter = { - parameterPath: "jobEnvelope", - mapper: JobPatchPropertiesMapper -}; - -export const template: OperationParameter = { - parameterPath: "template", - mapper: JobExecutionTemplateMapper -}; - -export const jobExecutionName: OperationURLParameter = { - parameterPath: "jobExecutionName", +export const replicaName: OperationURLParameter = { + parameterPath: "replicaName", mapper: { - constraints: { - Pattern: new RegExp("^[-\\w\\._\\(\\)]+$") - }, - serializedName: "jobExecutionName", + serializedName: "replicaName", required: true, type: { name: "String" @@ -304,25 +332,21 @@ export const jobExecutionName: OperationURLParameter = { } }; -export const jobExecutionName1: OperationParameter = { - parameterPath: "jobExecutionName", - mapper: JobExecutionNamesCollectionMapper -}; - -export const filter: OperationQueryParameter = { - parameterPath: ["options", "filter"], +export const detectorName: OperationURLParameter = { + parameterPath: "detectorName", mapper: { - serializedName: "$filter", + serializedName: "detectorName", + required: true, type: { name: "String" } } }; -export const revisionName: OperationURLParameter = { - parameterPath: "revisionName", +export const environmentName: OperationURLParameter = { + parameterPath: "environmentName", mapper: { - serializedName: "revisionName", + serializedName: "environmentName", required: true, type: { name: "String" @@ -330,10 +354,13 @@ export const revisionName: OperationURLParameter = { } }; -export const replicaName: OperationURLParameter = { - parameterPath: "replicaName", +export const jobName: OperationURLParameter = { + parameterPath: "jobName", mapper: { - serializedName: "replicaName", + constraints: { + Pattern: new RegExp("^[-\\w\\._\\(\\)]+$") + }, + serializedName: "jobName", required: true, type: { name: "String" @@ -341,10 +368,15 @@ export const replicaName: OperationURLParameter = { } }; -export const detectorName: OperationURLParameter = { - parameterPath: "detectorName", +export const jobEnvelope: OperationParameter = { + parameterPath: "jobEnvelope", + mapper: JobMapper +}; + +export const jobName1: OperationURLParameter = { + parameterPath: "jobName", mapper: { - serializedName: "detectorName", + serializedName: "jobName", required: true, type: { name: "String" @@ -352,10 +384,23 @@ export const detectorName: OperationURLParameter = { } }; -export const environmentName: OperationURLParameter = { - parameterPath: "environmentName", +export const jobEnvelope1: OperationParameter = { + parameterPath: "jobEnvelope", + mapper: JobPatchPropertiesMapper +}; + +export const template: OperationParameter = { + parameterPath: "template", + mapper: JobExecutionTemplateMapper +}; + +export const jobExecutionName: OperationURLParameter = { + parameterPath: "jobExecutionName", mapper: { - serializedName: "environmentName", + constraints: { + Pattern: new RegExp("^[-\\w\\._\\(\\)]+$") + }, + serializedName: "jobExecutionName", required: true, type: { name: "String" @@ -363,6 +408,11 @@ export const environmentName: OperationURLParameter = { } }; +export const jobExecutionName1: OperationParameter = { + parameterPath: "jobExecutionName", + mapper: JobExecutionNamesCollectionMapper +}; + export const environmentEnvelope1: OperationParameter = { parameterPath: "environmentEnvelope", mapper: ManagedEnvironmentMapper diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/builders.ts b/sdk/appcontainers/arm-appcontainers/src/operations/builders.ts new file mode 100644 index 000000000000..1417cbd4f37b --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/builders.ts @@ -0,0 +1,719 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { Builders } 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 { + BuilderResource, + BuildersListBySubscriptionNextOptionalParams, + BuildersListBySubscriptionOptionalParams, + BuildersListBySubscriptionResponse, + BuildersListByResourceGroupNextOptionalParams, + BuildersListByResourceGroupOptionalParams, + BuildersListByResourceGroupResponse, + BuildersGetOptionalParams, + BuildersGetResponse, + BuildersCreateOrUpdateOptionalParams, + BuildersCreateOrUpdateResponse, + BuilderResourceUpdate, + BuildersUpdateOptionalParams, + BuildersUpdateResponse, + BuildersDeleteOptionalParams, + BuildersListBySubscriptionNextResponse, + BuildersListByResourceGroupNextResponse +} from "../models"; + +/// +/** Class containing Builders operations. */ +export class BuildersImpl implements Builders { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class Builders class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * List BuilderResource resources by subscription ID + * @param options The options parameters. + */ + public listBySubscription( + options?: BuildersListBySubscriptionOptionalParams + ): 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?: BuildersListBySubscriptionOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: BuildersListBySubscriptionResponse; + 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?: BuildersListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * List BuilderResource resources by 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?: BuildersListByResourceGroupOptionalParams + ): 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?: BuildersListByResourceGroupOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: BuildersListByResourceGroupResponse; + 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?: BuildersListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * List BuilderResource resources by subscription ID + * @param options The options parameters. + */ + private _listBySubscription( + options?: BuildersListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * List BuilderResource resources by 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?: BuildersListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * Get a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + builderName: string, + options?: BuildersGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, builderName, options }, + getOperationSpec + ); + } + + /** + * Create or update a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope Resource create parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + builderName: string, + builderEnvelope: BuilderResource, + options?: BuildersCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + BuildersCreateOrUpdateResponse + > + > { + 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, builderName, builderEnvelope, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + BuildersCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Create or update a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope Resource create parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + builderName: string, + builderEnvelope: BuilderResource, + options?: BuildersCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + builderName, + builderEnvelope, + options + ); + return poller.pollUntilDone(); + } + + /** + * Update a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope The resource properties to be updated. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + builderName: string, + builderEnvelope: BuilderResourceUpdate, + options?: BuildersUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + BuildersUpdateResponse + > + > { + 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, builderName, builderEnvelope, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + BuildersUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Update a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope The resource properties to be updated. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + builderName: string, + builderEnvelope: BuilderResourceUpdate, + options?: BuildersUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + builderName, + builderEnvelope, + options + ); + return poller.pollUntilDone(); + } + + /** + * Delete a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + builderName: string, + options?: BuildersDeleteOptionalParams + ): 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, builderName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Delete a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + builderName: string, + options?: BuildersDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + builderName, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: BuildersListBySubscriptionNextOptionalParams + ): 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?: BuildersListByResourceGroupNextOptionalParams + ): 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/builders", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BuilderCollection + }, + 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/builders", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BuilderCollection + }, + 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/builders/{builderName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BuilderResource + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.builderName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.BuilderResource + }, + 201: { + bodyMapper: Mappers.BuilderResource + }, + 202: { + bodyMapper: Mappers.BuilderResource + }, + 204: { + bodyMapper: Mappers.BuilderResource + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + requestBody: Parameters.builderEnvelope, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.builderName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.BuilderResource + }, + 201: { + bodyMapper: Mappers.BuilderResource + }, + 202: { + bodyMapper: Mappers.BuilderResource + }, + 204: { + bodyMapper: Mappers.BuilderResource + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + requestBody: Parameters.builderEnvelope1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.builderName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.builderName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BuilderCollection + }, + 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.BuilderCollection + }, + 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/builds.ts b/sdk/appcontainers/arm-appcontainers/src/operations/builds.ts new file mode 100644 index 000000000000..091e4ad538f4 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/builds.ts @@ -0,0 +1,508 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { Builds } 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 { + BuildResource, + BuildsListByBuilderResourceNextOptionalParams, + BuildsListByBuilderResourceOptionalParams, + BuildsListByBuilderResourceResponse, + BuildsGetOptionalParams, + BuildsGetResponse, + BuildsCreateOrUpdateOptionalParams, + BuildsCreateOrUpdateResponse, + BuildsDeleteOptionalParams, + BuildsListByBuilderResourceNextResponse +} from "../models"; + +/// +/** Class containing Builds operations. */ +export class BuildsImpl implements Builds { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class Builds class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * List BuildResource resources by BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param options The options parameters. + */ + public listByBuilderResource( + resourceGroupName: string, + builderName: string, + options?: BuildsListByBuilderResourceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByBuilderResourcePagingAll( + resourceGroupName, + builderName, + 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.listByBuilderResourcePagingPage( + resourceGroupName, + builderName, + options, + settings + ); + } + }; + } + + private async *listByBuilderResourcePagingPage( + resourceGroupName: string, + builderName: string, + options?: BuildsListByBuilderResourceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: BuildsListByBuilderResourceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByBuilderResource( + resourceGroupName, + builderName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByBuilderResourceNext( + resourceGroupName, + builderName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByBuilderResourcePagingAll( + resourceGroupName: string, + builderName: string, + options?: BuildsListByBuilderResourceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByBuilderResourcePagingPage( + resourceGroupName, + builderName, + options + )) { + yield* page; + } + } + + /** + * List BuildResource resources by BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param options The options parameters. + */ + private _listByBuilderResource( + resourceGroupName: string, + builderName: string, + options?: BuildsListByBuilderResourceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, builderName, options }, + listByBuilderResourceOperationSpec + ); + } + + /** + * Get a BuildResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + builderName: string, + buildName: string, + options?: BuildsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, builderName, buildName, options }, + getOperationSpec + ); + } + + /** + * Create a BuildResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param buildEnvelope Resource create or update parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + builderName: string, + buildName: string, + buildEnvelope: BuildResource, + options?: BuildsCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + BuildsCreateOrUpdateResponse + > + > { + 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, + builderName, + buildName, + buildEnvelope, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + BuildsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Create a BuildResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param buildEnvelope Resource create or update parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + builderName: string, + buildName: string, + buildEnvelope: BuildResource, + options?: BuildsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + builderName, + buildName, + buildEnvelope, + options + ); + return poller.pollUntilDone(); + } + + /** + * Delete a BuildResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + builderName: string, + buildName: string, + options?: BuildsDeleteOptionalParams + ): 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, builderName, buildName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Delete a BuildResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + builderName: string, + buildName: string, + options?: BuildsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + builderName, + buildName, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListByBuilderResourceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param nextLink The nextLink from the previous successful call to the ListByBuilderResource method. + * @param options The options parameters. + */ + private _listByBuilderResourceNext( + resourceGroupName: string, + builderName: string, + nextLink: string, + options?: BuildsListByBuilderResourceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, builderName, nextLink, options }, + listByBuilderResourceNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByBuilderResourceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BuildCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.builderName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BuildResource + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.builderName, + Parameters.buildName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.BuildResource + }, + 201: { + bodyMapper: Mappers.BuildResource + }, + 202: { + bodyMapper: Mappers.BuildResource + }, + 204: { + bodyMapper: Mappers.BuildResource + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + requestBody: Parameters.buildEnvelope, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.builderName, + Parameters.buildName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.builderName, + Parameters.buildName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByBuilderResourceNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BuildCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.builderName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/index.ts b/sdk/appcontainers/arm-appcontainers/src/operations/index.ts index 7a650950fdbc..2cf675e30017 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/index.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/index.ts @@ -9,19 +9,21 @@ export * from "./containerAppsAuthConfigs"; export * from "./availableWorkloadProfiles"; export * from "./billingMeters"; +export * from "./builders"; +export * from "./builds"; export * from "./connectedEnvironments"; export * from "./connectedEnvironmentsCertificates"; export * from "./connectedEnvironmentsDaprComponents"; export * from "./connectedEnvironmentsStorages"; export * from "./containerApps"; -export * from "./jobs"; -export * from "./jobsExecutions"; export * from "./containerAppsRevisions"; export * from "./containerAppsRevisionReplicas"; export * from "./containerAppsDiagnostics"; export * from "./managedEnvironmentDiagnostics"; export * from "./managedEnvironmentsDiagnostics"; export * from "./operations"; +export * from "./jobs"; +export * from "./jobsExecutions"; export * from "./managedEnvironments"; export * from "./certificates"; export * from "./managedCertificates"; diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/builders.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/builders.ts new file mode 100644 index 000000000000..a51aa8373e5d --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/builders.ts @@ -0,0 +1,139 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { + BuilderResource, + BuildersListBySubscriptionOptionalParams, + BuildersListByResourceGroupOptionalParams, + BuildersGetOptionalParams, + BuildersGetResponse, + BuildersCreateOrUpdateOptionalParams, + BuildersCreateOrUpdateResponse, + BuilderResourceUpdate, + BuildersUpdateOptionalParams, + BuildersUpdateResponse, + BuildersDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a Builders. */ +export interface Builders { + /** + * List BuilderResource resources by subscription ID + * @param options The options parameters. + */ + listBySubscription( + options?: BuildersListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * List BuilderResource resources by resource group + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: BuildersListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + builderName: string, + options?: BuildersGetOptionalParams + ): Promise; + /** + * Create or update a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope Resource create parameters. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + builderName: string, + builderEnvelope: BuilderResource, + options?: BuildersCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + BuildersCreateOrUpdateResponse + > + >; + /** + * Create or update a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope Resource create parameters. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + builderName: string, + builderEnvelope: BuilderResource, + options?: BuildersCreateOrUpdateOptionalParams + ): Promise; + /** + * Update a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope The resource properties to be updated. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + builderName: string, + builderEnvelope: BuilderResourceUpdate, + options?: BuildersUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + BuildersUpdateResponse + > + >; + /** + * Update a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope The resource properties to be updated. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + builderName: string, + builderEnvelope: BuilderResourceUpdate, + options?: BuildersUpdateOptionalParams + ): Promise; + /** + * Delete a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + builderName: string, + options?: BuildersDeleteOptionalParams + ): Promise, void>>; + /** + * Delete a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + builderName: string, + options?: BuildersDeleteOptionalParams + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/builds.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/builds.ts new file mode 100644 index 000000000000..5dbf100a312f --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/builds.ts @@ -0,0 +1,109 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { + BuildResource, + BuildsListByBuilderResourceOptionalParams, + BuildsGetOptionalParams, + BuildsGetResponse, + BuildsCreateOrUpdateOptionalParams, + BuildsCreateOrUpdateResponse, + BuildsDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a Builds. */ +export interface Builds { + /** + * List BuildResource resources by BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param options The options parameters. + */ + listByBuilderResource( + resourceGroupName: string, + builderName: string, + options?: BuildsListByBuilderResourceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a BuildResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + builderName: string, + buildName: string, + options?: BuildsGetOptionalParams + ): Promise; + /** + * Create a BuildResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param buildEnvelope Resource create or update parameters. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + builderName: string, + buildName: string, + buildEnvelope: BuildResource, + options?: BuildsCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + BuildsCreateOrUpdateResponse + > + >; + /** + * Create a BuildResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param buildEnvelope Resource create or update parameters. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + builderName: string, + buildName: string, + buildEnvelope: BuildResource, + options?: BuildsCreateOrUpdateOptionalParams + ): Promise; + /** + * Delete a BuildResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + builderName: string, + buildName: string, + options?: BuildsDeleteOptionalParams + ): Promise, void>>; + /** + * Delete a BuildResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + builderName: string, + buildName: string, + options?: BuildsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/index.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/index.ts index 7a650950fdbc..2cf675e30017 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/index.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/index.ts @@ -9,19 +9,21 @@ export * from "./containerAppsAuthConfigs"; export * from "./availableWorkloadProfiles"; export * from "./billingMeters"; +export * from "./builders"; +export * from "./builds"; export * from "./connectedEnvironments"; export * from "./connectedEnvironmentsCertificates"; export * from "./connectedEnvironmentsDaprComponents"; export * from "./connectedEnvironmentsStorages"; export * from "./containerApps"; -export * from "./jobs"; -export * from "./jobsExecutions"; export * from "./containerAppsRevisions"; export * from "./containerAppsRevisionReplicas"; export * from "./containerAppsDiagnostics"; export * from "./managedEnvironmentDiagnostics"; export * from "./managedEnvironmentsDiagnostics"; export * from "./operations"; +export * from "./jobs"; +export * from "./jobsExecutions"; export * from "./managedEnvironments"; export * from "./certificates"; export * from "./managedCertificates"; diff --git a/sdk/appcontainers/arm-appcontainers/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"