From 2711e9e631fd7eb8ab245c72a4925e91ead6a3de Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 20 May 2022 08:50:36 +0000 Subject: [PATCH] CodeGen from PR 19133 in Azure/azure-rest-api-specs update-app-typescript.md (#19133) * update-app-typescript.md * update * update --- common/config/rush/pnpm-lock.yaml | 43 +- rush.json | 5 + .../arm-appcontainers/CHANGELOG.md | 5 + sdk/appcontainers/arm-appcontainers/LICENSE | 21 + sdk/appcontainers/arm-appcontainers/README.md | 109 + .../arm-appcontainers/_meta.json | 8 + .../arm-appcontainers/api-extractor.json | 31 + .../arm-appcontainers/package.json | 112 + .../review/arm-appcontainers.api.md | 1557 ++++++++ .../arm-appcontainers/rollup.config.js | 122 + .../src/containerAppsAPIClient.ts | 184 + .../arm-appcontainers/src/index.ts | 12 + .../arm-appcontainers/src/lroImpl.ts | 34 + .../arm-appcontainers/src/models/index.ts | 2140 ++++++++++ .../arm-appcontainers/src/models/mappers.ts | 3538 +++++++++++++++++ .../src/models/parameters.ts | 277 ++ .../src/operations/certificates.ts | 368 ++ .../src/operations/containerApps.ts | 749 ++++ .../operations/containerAppsAuthConfigs.ts | 329 ++ .../containerAppsRevisionReplicas.ts | 129 + .../src/operations/containerAppsRevisions.ts | 356 ++ .../operations/containerAppsSourceControls.ts | 487 +++ .../src/operations/daprComponents.ts | 365 ++ .../arm-appcontainers/src/operations/index.ts | 19 + .../src/operations/managedEnvironments.ts | 665 ++++ .../operations/managedEnvironmentsStorages.ts | 214 + .../src/operations/namespaces.ts | 82 + .../src/operations/operations.ts | 137 + .../src/operationsInterfaces/certificates.ts | 91 + .../src/operationsInterfaces/containerApps.ts | 158 + .../containerAppsAuthConfigs.ts | 75 + .../containerAppsRevisionReplicas.ts | 46 + .../containerAppsRevisions.ts | 86 + .../containerAppsSourceControls.ts | 109 + .../operationsInterfaces/daprComponents.ts | 90 + .../src/operationsInterfaces/index.ts | 19 + .../managedEnvironments.ts | 132 + .../managedEnvironmentsStorages.ts | 74 + .../src/operationsInterfaces/namespaces.ts | 30 + .../src/operationsInterfaces/operations.ts | 22 + .../arm-appcontainers/test/sampleTest.ts | 43 + .../arm-appcontainers/tsconfig.json | 27 + sdk/appcontainers/ci.mgmt.yml | 38 + 43 files changed, 13131 insertions(+), 7 deletions(-) create mode 100644 sdk/appcontainers/arm-appcontainers/CHANGELOG.md create mode 100644 sdk/appcontainers/arm-appcontainers/LICENSE create mode 100644 sdk/appcontainers/arm-appcontainers/README.md create mode 100644 sdk/appcontainers/arm-appcontainers/_meta.json create mode 100644 sdk/appcontainers/arm-appcontainers/api-extractor.json create mode 100644 sdk/appcontainers/arm-appcontainers/package.json create mode 100644 sdk/appcontainers/arm-appcontainers/review/arm-appcontainers.api.md create mode 100644 sdk/appcontainers/arm-appcontainers/rollup.config.js create mode 100644 sdk/appcontainers/arm-appcontainers/src/containerAppsAPIClient.ts create mode 100644 sdk/appcontainers/arm-appcontainers/src/index.ts create mode 100644 sdk/appcontainers/arm-appcontainers/src/lroImpl.ts create mode 100644 sdk/appcontainers/arm-appcontainers/src/models/index.ts create mode 100644 sdk/appcontainers/arm-appcontainers/src/models/mappers.ts create mode 100644 sdk/appcontainers/arm-appcontainers/src/models/parameters.ts create mode 100644 sdk/appcontainers/arm-appcontainers/src/operations/certificates.ts create mode 100644 sdk/appcontainers/arm-appcontainers/src/operations/containerApps.ts create mode 100644 sdk/appcontainers/arm-appcontainers/src/operations/containerAppsAuthConfigs.ts create mode 100644 sdk/appcontainers/arm-appcontainers/src/operations/containerAppsRevisionReplicas.ts create mode 100644 sdk/appcontainers/arm-appcontainers/src/operations/containerAppsRevisions.ts create mode 100644 sdk/appcontainers/arm-appcontainers/src/operations/containerAppsSourceControls.ts create mode 100644 sdk/appcontainers/arm-appcontainers/src/operations/daprComponents.ts create mode 100644 sdk/appcontainers/arm-appcontainers/src/operations/index.ts create mode 100644 sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironments.ts create mode 100644 sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironmentsStorages.ts create mode 100644 sdk/appcontainers/arm-appcontainers/src/operations/namespaces.ts create mode 100644 sdk/appcontainers/arm-appcontainers/src/operations/operations.ts create mode 100644 sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/certificates.ts create mode 100644 sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerApps.ts create mode 100644 sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsAuthConfigs.ts create mode 100644 sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsRevisionReplicas.ts create mode 100644 sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsRevisions.ts create mode 100644 sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsSourceControls.ts create mode 100644 sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/daprComponents.ts create mode 100644 sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/index.ts create mode 100644 sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/managedEnvironments.ts create mode 100644 sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/managedEnvironmentsStorages.ts create mode 100644 sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/namespaces.ts create mode 100644 sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/operations.ts create mode 100644 sdk/appcontainers/arm-appcontainers/test/sampleTest.ts create mode 100644 sdk/appcontainers/arm-appcontainers/tsconfig.json create mode 100644 sdk/appcontainers/ci.mgmt.yml diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 05462e1a289a..5730c73c6e06 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -14,6 +14,7 @@ specifiers: '@rush-temp/arm-apimanagement': file:./projects/arm-apimanagement.tgz '@rush-temp/arm-app': file:./projects/arm-app.tgz '@rush-temp/arm-appconfiguration': file:./projects/arm-appconfiguration.tgz + '@rush-temp/arm-appcontainers': file:./projects/arm-appcontainers.tgz '@rush-temp/arm-appinsights': file:./projects/arm-appinsights.tgz '@rush-temp/arm-appplatform': file:./projects/arm-appplatform.tgz '@rush-temp/arm-appservice': file:./projects/arm-appservice.tgz @@ -291,6 +292,7 @@ dependencies: '@rush-temp/arm-apimanagement': file:projects/arm-apimanagement.tgz '@rush-temp/arm-app': file:projects/arm-app.tgz '@rush-temp/arm-appconfiguration': file:projects/arm-appconfiguration.tgz + '@rush-temp/arm-appcontainers': file:projects/arm-appcontainers.tgz '@rush-temp/arm-appinsights': file:projects/arm-appinsights.tgz '@rush-temp/arm-appplatform': file:projects/arm-appplatform.tgz '@rush-temp/arm-appservice': file:projects/arm-appservice.tgz @@ -3034,7 +3036,7 @@ packages: dev: false /array-flatten/1.1.1: - resolution: {integrity: sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=} + resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} dev: false /array-includes/3.1.5: @@ -3274,7 +3276,7 @@ packages: dev: false /buffer-equal-constant-time/1.0.1: - resolution: {integrity: sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=} + resolution: {integrity: sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==} dev: false /buffer-from/1.1.2: @@ -3415,7 +3417,7 @@ packages: dev: false /charenc/0.0.2: - resolution: {integrity: sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc=} + resolution: {integrity: sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==} dev: false /check-error/1.0.2: @@ -9344,7 +9346,7 @@ packages: dev: false file:projects/ai-text-analytics.tgz: - resolution: {integrity: sha512-V1NlOFf8Wnqlap0NTRGTlOKmC4mSJwMHJ+VEXvv+fzwH/G/cnCEBgumjG5iykPHAGOjHril1iyXbs8oDv/JOSA==, tarball: file:projects/ai-text-analytics.tgz} + resolution: {integrity: sha512-I99Oz+cBO61S5+NIWAXD4SFRrwAr7vPyMT5ATznLAdTHMBaeLR+xGASQ5iLbm0nDdnAKROioQwdrppKL1zn5gw==, tarball: file:projects/ai-text-analytics.tgz} name: '@rush-temp/ai-text-analytics' version: 0.0.0 dependencies: @@ -9587,6 +9589,33 @@ packages: - supports-color dev: false + file:projects/arm-appcontainers.tgz: + resolution: {integrity: sha512-ty/UbHIATJvPfvYFbjcES1pE4Tapb/Ks9Oj5f022XGSafuDqLdVuWddNgeMfFqK61sqRmNKl7cxD1Q6siUmL0A==, tarball: file:projects/arm-appcontainers.tgz} + name: '@rush-temp/arm-appcontainers' + version: 0.0.0 + dependencies: + '@azure/core-lro': 2.2.4 + '@azure/identity': 2.0.4 + '@microsoft/api-extractor': 7.18.11 + '@rollup/plugin-commonjs': 21.1.0_rollup@2.73.0 + '@rollup/plugin-json': 4.1.0_rollup@2.73.0 + '@rollup/plugin-multi-entry': 4.1.0_rollup@2.73.0 + '@rollup/plugin-node-resolve': 13.3.0_rollup@2.73.0 + cross-env: 7.0.3 + mkdirp: 1.0.4 + mocha: 7.2.0 + rimraf: 3.0.2 + rollup: 2.73.0 + rollup-plugin-sourcemaps: 0.6.3_rollup@2.73.0 + tslib: 2.4.0 + typescript: 4.2.4 + uglify-js: 3.15.5 + transitivePeerDependencies: + - '@types/node' + - debug + - supports-color + dev: false + file:projects/arm-appinsights.tgz: resolution: {integrity: sha512-bw7EG2T7OtewsQWt1Ol05H0FUUQU5Obz2j6C8fYeLG3iQqsmdJfap/rotKzhGsHDXpYN7bjBoHrsuWedeQz7PA==, tarball: file:projects/arm-appinsights.tgz} name: '@rush-temp/arm-appinsights' @@ -9616,7 +9645,7 @@ packages: dev: false file:projects/arm-appplatform.tgz: - resolution: {integrity: sha512-hLb4plZqAwNgC+bYrBI2fwqMGvGHwcaZASTrdPI948i0bFcVHGvg+w4JDVqRd2EXD+g+KDOqBlKFhHM2XMK44g==, tarball: file:projects/arm-appplatform.tgz} + resolution: {integrity: sha512-7tK1LGBQ0e1HS/l8zDSnesQSjtgSEsV7OD3Geqv/Fwk33IP+FtSShT2ezkCR3U8SLo2GqmO8rgOns1xuUY/A2w==, tarball: file:projects/arm-appplatform.tgz} name: '@rush-temp/arm-appplatform' version: 0.0.0 dependencies: @@ -11044,7 +11073,7 @@ packages: dev: false file:projects/arm-eventgrid.tgz: - resolution: {integrity: sha512-/09YtHZ3Rh0PhOzZ2RekHu9/MosORc7V4XRjdRcv75XckUvafH+uG788k0BZihPXavZ8j7YvUPBqMNZvjlKTQw==, tarball: file:projects/arm-eventgrid.tgz} + resolution: {integrity: sha512-0vEf7jW0UiW2yE+nRLujQUdyDxSobbhULSwYRnAgLVMN/h9xmFeQcb8IG9Ds2G4IqbDnca+uYLyy9BVFvzTMlg==, tarball: file:projects/arm-eventgrid.tgz} name: '@rush-temp/arm-eventgrid' version: 0.0.0 dependencies: @@ -13373,7 +13402,7 @@ packages: dev: false file:projects/arm-securityinsight.tgz: - resolution: {integrity: sha512-7gsp4KOCne09k9AHVpEjIEF1IV65n1mjboYFyt7gupl7GXx7J970B4+YPA2Q9iMt45MhrcJNR/3DYf4p7GiTNg==, tarball: file:projects/arm-securityinsight.tgz} + resolution: {integrity: sha512-W5eHlYwGGF4L6CVtJTOdm3qD6ptIzX177kAx0F1g1KjwVQbqXyZTO0n1NcYLKYT1Jw8Oz2wsXgBEq3eDA1ppbQ==, tarball: file:projects/arm-securityinsight.tgz} name: '@rush-temp/arm-securityinsight' version: 0.0.0 dependencies: diff --git a/rush.json b/rush.json index 76249727247b..acb2e03449e2 100644 --- a/rush.json +++ b/rush.json @@ -1695,6 +1695,11 @@ "packageName": "@azure/arm-changes", "projectFolder": "sdk/changes/arm-changes", "versionPolicyName": "management" + }, + { + "packageName": "@azure/arm-appcontainers", + "projectFolder": "sdk/appcontainers/arm-appcontainers", + "versionPolicyName": "management" } ] } \ No newline at end of file diff --git a/sdk/appcontainers/arm-appcontainers/CHANGELOG.md b/sdk/appcontainers/arm-appcontainers/CHANGELOG.md new file mode 100644 index 000000000000..541c2c9a6fbe --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 1.0.0 (2022-05-20) + +The package of @azure/arm-appcontainers is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart). diff --git a/sdk/appcontainers/arm-appcontainers/LICENSE b/sdk/appcontainers/arm-appcontainers/LICENSE new file mode 100644 index 000000000000..5d1d36e0af80 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2022 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/sdk/appcontainers/arm-appcontainers/README.md b/sdk/appcontainers/arm-appcontainers/README.md new file mode 100644 index 000000000000..69eb13af0700 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/README.md @@ -0,0 +1,109 @@ +# Azure ContainerApps API client library for JavaScript + +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure ContainerApps API client. + + + +[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appcontainers/arm-appcontainers) | +[Package (NPM)](https://www.npmjs.com/package/@azure/arm-appcontainers) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-appcontainers) | +[Samples](https://github.com/Azure-Samples/azure-samples-js-management) + +## Getting started + +### Currently supported environments + +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge and Firefox. + +See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details. + +### Prerequisites + +- An [Azure subscription][azure_sub]. + +### Install the `@azure/arm-appcontainers` package + +Install the Azure ContainerApps API client library for JavaScript with `npm`: + +```bash +npm install @azure/arm-appcontainers +``` + +### Create and authenticate a `ContainerAppsAPIClient` + +To create a client object to access the Azure ContainerApps API API, you will need the `endpoint` of your Azure ContainerApps API resource and a `credential`. The Azure ContainerApps API client can use Azure Active Directory credentials to authenticate. +You can find the endpoint for your Azure ContainerApps API resource in the [Azure Portal][azure_portal]. + +You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token). + +To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package: + +```bash +npm install @azure/identity +``` + +You will also need to **register a new AAD application and grant access to Azure ContainerApps API** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). +Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`. + +For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). + +```javascript +const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); +const { DefaultAzureCredential } = require("@azure/identity"); +// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details. + +const subscriptionId = "00000000-0000-0000-0000-000000000000"; +const client = new ContainerAppsAPIClient(new DefaultAzureCredential(), subscriptionId); + +// For client-side applications running in the browser, use this code instead: +// const credential = new InteractiveBrowserCredential({ +// tenantId: "", +// clientId: "" +// }); +// const client = new ContainerAppsAPIClient(credential, subscriptionId); +``` + + +### JavaScript Bundle +To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling). + +## Key concepts + +### ContainerAppsAPIClient + +`ContainerAppsAPIClient` is the primary interface for developers using the Azure ContainerApps API client library. Explore the methods on this client object to understand the different features of the Azure ContainerApps API service that you can access. + +## Troubleshooting + +### Logging + +Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`: + +```javascript +const { setLogLevel } = require("@azure/logger"); +setLogLevel("info"); +``` + +For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger). + +## Next steps + +Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library. + +## Contributing + +If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code. + +## Related projects + +- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js) + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fappcontainers%2Farm-appcontainers%2FREADME.png) + +[azure_cli]: https://docs.microsoft.com/cli/azure +[azure_sub]: https://azure.microsoft.com/free/ +[azure_sub]: https://azure.microsoft.com/free/ +[azure_portal]: https://portal.azure.com +[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity +[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential diff --git a/sdk/appcontainers/arm-appcontainers/_meta.json b/sdk/appcontainers/arm-appcontainers/_meta.json new file mode 100644 index 000000000000..831a6043a4fa --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/_meta.json @@ -0,0 +1,8 @@ +{ + "commit": "ace0542cdd24df36b68203f754b1e7a4a1883014", + "readme": "specification/app/resource-manager/readme.md", + "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/app/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220425.1", + "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", + "release_tool": "@azure-tools/js-sdk-release-tools@2.3.0", + "use": "@autorest/typescript@6.0.0-alpha.19.20220425.1" +} \ No newline at end of file diff --git a/sdk/appcontainers/arm-appcontainers/api-extractor.json b/sdk/appcontainers/arm-appcontainers/api-extractor.json new file mode 100644 index 000000000000..05e35e108750 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/api-extractor.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", + "docModel": { + "enabled": true + }, + "apiReport": { + "enabled": true, + "reportFolder": "./review" + }, + "dtsRollup": { + "enabled": true, + "untrimmedFilePath": "", + "publicTrimmedFilePath": "./types/arm-appcontainers.d.ts" + }, + "messages": { + "tsdocMessageReporting": { + "default": { + "logLevel": "none" + } + }, + "extractorMessageReporting": { + "ae-missing-release-tag": { + "logLevel": "none" + }, + "ae-unresolved-link": { + "logLevel": "none" + } + } + } +} \ No newline at end of file diff --git a/sdk/appcontainers/arm-appcontainers/package.json b/sdk/appcontainers/arm-appcontainers/package.json new file mode 100644 index 000000000000..255564debcac --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/package.json @@ -0,0 +1,112 @@ +{ + "name": "@azure/arm-appcontainers", + "sdk-type": "mgmt", + "author": "Microsoft Corporation", + "description": "A generated SDK for ContainerAppsAPIClient.", + "version": "1.0.0", + "engines": { + "node": ">=12.0.0" + }, + "dependencies": { + "@azure/core-lro": "^2.2.0", + "@azure/abort-controller": "^1.0.0", + "@azure/core-paging": "^1.2.0", + "@azure/core-client": "^1.5.0", + "@azure/core-auth": "^1.3.0", + "@azure/core-rest-pipeline": "^1.8.0", + "tslib": "^2.2.0" + }, + "keywords": [ + "node", + "azure", + "typescript", + "browser", + "isomorphic" + ], + "license": "MIT", + "main": "./dist/index.js", + "module": "./dist-esm/src/index.js", + "types": "./types/arm-appcontainers.d.ts", + "devDependencies": { + "@microsoft/api-extractor": "7.18.11", + "@rollup/plugin-commonjs": "^21.0.1", + "@rollup/plugin-json": "^4.1.0", + "@rollup/plugin-multi-entry": "^4.1.0", + "@rollup/plugin-node-resolve": "^13.1.3", + "mkdirp": "^1.0.4", + "rollup": "^2.66.1", + "rollup-plugin-sourcemaps": "^0.6.3", + "typescript": "~4.2.0", + "uglify-js": "^3.4.9", + "rimraf": "^3.0.0", + "@azure/identity": "^2.0.1", + "@azure-tools/test-recorder": "^2.0.0", + "@azure-tools/test-credential": "^1.0.0", + "mocha": "^7.1.1", + "cross-env": "^7.0.2", + "@azure/dev-tool": "^1.0.0" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appcontainers/arm-appcontainers", + "repository": { + "type": "git", + "url": "https://github.com/Azure/azure-sdk-for-js.git" + }, + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "files": [ + "dist/**/*.js", + "dist/**/*.js.map", + "dist/**/*.d.ts", + "dist/**/*.d.ts.map", + "dist-esm/**/*.js", + "dist-esm/**/*.js.map", + "dist-esm/**/*.d.ts", + "dist-esm/**/*.d.ts.map", + "src/**/*.ts", + "README.md", + "LICENSE", + "rollup.config.js", + "tsconfig.json", + "review/*", + "CHANGELOG.md", + "types/*" + ], + "scripts": { + "build": "npm run clean && tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api", + "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", + "prepack": "npm run build", + "pack": "npm pack 2>&1", + "extract-api": "api-extractor run --local", + "lint": "echo skipped", + "audit": "echo skipped", + "clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log", + "build:node": "echo skipped", + "build:browser": "echo skipped", + "build:test": "echo skipped", + "build:samples": "echo skipped.", + "check-format": "echo skipped", + "execute:samples": "echo skipped", + "format": "echo skipped", + "test": "npm run integration-test", + "test:node": "echo skipped", + "test:browser": "echo skipped", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node", + "unit-test:browser": "echo skipped", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:browser": "echo skipped", + "docs": "echo skipped" + }, + "sideEffects": false, + "//metadata": { + "constantPaths": [ + { + "path": "src/containerAppsAPIClient.ts", + "prefix": "packageDetails" + } + ] + }, + "autoPublish": true +} \ 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 new file mode 100644 index 000000000000..6718e8cfe1fa --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/review/arm-appcontainers.api.md @@ -0,0 +1,1557 @@ +## API Report File for "@azure/arm-appcontainers" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import * as coreAuth from '@azure/core-auth'; +import * as coreClient from '@azure/core-client'; +import { PagedAsyncIterableIterator } from '@azure/core-paging'; +import { PollerLike } from '@azure/core-lro'; +import { PollOperationState } from '@azure/core-lro'; + +// @public +export type AccessMode = string; + +// @public +export type ActiveRevisionsMode = string; + +// @public +export interface AllowedAudiencesValidation { + allowedAudiences?: string[]; +} + +// @public +export interface AllowedPrincipals { + groups?: string[]; + identities?: string[]; +} + +// @public +export interface Apple { + enabled?: boolean; + login?: LoginScopes; + registration?: AppleRegistration; +} + +// @public +export interface AppleRegistration { + clientId?: string; + clientSecretSettingName?: string; +} + +// @public +export interface AppLogsConfiguration { + destination?: string; + logAnalyticsConfiguration?: LogAnalyticsConfiguration; +} + +// @public +export type AppProtocol = string; + +// @public +export interface AppRegistration { + appId?: string; + appSecretSettingName?: string; +} + +// @public +export type AuthConfig = ProxyResource & { + platform?: AuthPlatform; + globalValidation?: GlobalValidation; + identityProviders?: IdentityProviders; + login?: Login; + httpSettings?: HttpSettings; +}; + +// @public +export interface AuthConfigCollection { + readonly nextLink?: string; + value: AuthConfig[]; +} + +// @public +export interface AuthPlatform { + enabled?: boolean; + runtimeVersion?: string; +} + +// @public +export interface AvailableOperations { + nextLink?: string; + value?: OperationDetail[]; +} + +// @public +export interface AzureActiveDirectory { + enabled?: boolean; + isAutoProvisioned?: boolean; + login?: AzureActiveDirectoryLogin; + registration?: AzureActiveDirectoryRegistration; + validation?: AzureActiveDirectoryValidation; +} + +// @public +export interface AzureActiveDirectoryLogin { + disableWWWAuthenticate?: boolean; + loginParameters?: string[]; +} + +// @public +export interface AzureActiveDirectoryRegistration { + clientId?: string; + clientSecretCertificateIssuer?: string; + clientSecretCertificateSubjectAlternativeName?: string; + clientSecretCertificateThumbprint?: string; + clientSecretSettingName?: string; + openIdIssuer?: string; +} + +// @public +export interface AzureActiveDirectoryValidation { + allowedAudiences?: string[]; + defaultAuthorizationPolicy?: DefaultAuthorizationPolicy; + jwtClaimChecks?: JwtClaimChecks; +} + +// @public +export interface AzureCredentials { + clientId?: string; + clientSecret?: string; + subscriptionId?: string; + tenantId?: string; +} + +// @public +export interface AzureFileProperties { + accessMode?: AccessMode; + accountKey?: string; + accountName?: string; + shareName?: string; +} + +// @public +export interface AzureStaticWebApps { + enabled?: boolean; + registration?: AzureStaticWebAppsRegistration; +} + +// @public +export interface AzureStaticWebAppsRegistration { + clientId?: string; +} + +// @public +export type BindingType = string; + +// @public +export type Certificate = TrackedResource & { + properties?: CertificateProperties; +}; + +// @public +export interface CertificateCollection { + readonly nextLink?: string; + value: Certificate[]; +} + +// @public +export interface CertificatePatch { + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface CertificateProperties { + readonly expirationDate?: Date; + readonly issueDate?: Date; + readonly issuer?: string; + password?: string; + readonly provisioningState?: CertificateProvisioningState; + readonly publicKeyHash?: string; + readonly subjectName?: string; + readonly thumbprint?: string; + readonly valid?: boolean; + value?: Uint8Array; +} + +// @public +export type CertificateProvisioningState = string; + +// @public +export interface Certificates { + createOrUpdate(resourceGroupName: string, environmentName: string, certificateName: string, options?: CertificatesCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, environmentName: string, certificateName: string, options?: CertificatesDeleteOptionalParams): Promise; + get(resourceGroupName: string, environmentName: string, certificateName: string, options?: CertificatesGetOptionalParams): Promise; + list(resourceGroupName: string, environmentName: string, options?: CertificatesListOptionalParams): PagedAsyncIterableIterator; + update(resourceGroupName: string, environmentName: string, certificateName: string, certificateEnvelope: CertificatePatch, options?: CertificatesUpdateOptionalParams): Promise; +} + +// @public +export interface CertificatesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + certificateEnvelope?: Certificate; +} + +// @public +export type CertificatesCreateOrUpdateResponse = Certificate; + +// @public +export interface CertificatesDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface CertificatesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CertificatesGetResponse = Certificate; + +// @public +export interface CertificatesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CertificatesListNextResponse = CertificateCollection; + +// @public +export interface CertificatesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CertificatesListResponse = CertificateCollection; + +// @public +export interface CertificatesUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CertificatesUpdateResponse = Certificate; + +// @public +export type CheckNameAvailabilityReason = string; + +// @public +export interface CheckNameAvailabilityRequest { + name?: string; + type?: string; +} + +// @public +export interface CheckNameAvailabilityResponse { + message?: string; + nameAvailable?: boolean; + reason?: CheckNameAvailabilityReason; +} + +// @public +export interface ClientRegistration { + clientId?: string; + clientSecretSettingName?: string; +} + +// @public +export interface Configuration { + activeRevisionsMode?: ActiveRevisionsMode; + dapr?: Dapr; + ingress?: Ingress; + registries?: RegistryCredentials[]; + secrets?: Secret[]; +} + +// @public +export interface Container { + args?: string[]; + command?: string[]; + env?: EnvironmentVar[]; + image?: string; + name?: string; + probes?: ContainerAppProbe[]; + resources?: ContainerResources; + volumeMounts?: VolumeMount[]; +} + +// @public +export type ContainerApp = TrackedResource & { + identity?: ManagedServiceIdentity; + readonly provisioningState?: ContainerAppProvisioningState; + managedEnvironmentId?: string; + readonly latestRevisionName?: string; + readonly latestRevisionFqdn?: string; + readonly customDomainVerificationId?: string; + configuration?: Configuration; + template?: Template; + readonly outboundIPAddresses?: string[]; +}; + +// @public +export interface ContainerAppCollection { + readonly nextLink?: string; + value: ContainerApp[]; +} + +// @public +export interface ContainerAppProbe { + failureThreshold?: number; + httpGet?: ContainerAppProbeHttpGet; + initialDelaySeconds?: number; + periodSeconds?: number; + successThreshold?: number; + tcpSocket?: ContainerAppProbeTcpSocket; + terminationGracePeriodSeconds?: number; + timeoutSeconds?: number; + type?: Type; +} + +// @public +export interface ContainerAppProbeHttpGet { + host?: string; + httpHeaders?: ContainerAppProbeHttpGetHttpHeadersItem[]; + path?: string; + port: number; + scheme?: Scheme; +} + +// @public +export interface ContainerAppProbeHttpGetHttpHeadersItem { + name: string; + value: string; +} + +// @public +export interface ContainerAppProbeTcpSocket { + host?: string; + port: number; +} + +// @public +export type ContainerAppProvisioningState = string; + +// @public +export interface ContainerApps { + beginCreateOrUpdate(resourceGroupName: string, containerAppName: string, containerAppEnvelope: ContainerApp, options?: ContainerAppsCreateOrUpdateOptionalParams): Promise, ContainerAppsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, containerAppName: string, containerAppEnvelope: ContainerApp, options?: ContainerAppsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, containerAppName: string, options?: ContainerAppsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, containerAppName: string, options?: ContainerAppsDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, containerAppName: string, containerAppEnvelope: ContainerApp, options?: ContainerAppsUpdateOptionalParams): Promise, void>>; + beginUpdateAndWait(resourceGroupName: string, containerAppName: string, containerAppEnvelope: ContainerApp, options?: ContainerAppsUpdateOptionalParams): Promise; + get(resourceGroupName: string, containerAppName: string, options?: ContainerAppsGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: ContainerAppsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: ContainerAppsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + listCustomHostNameAnalysis(resourceGroupName: string, containerAppName: string, options?: ContainerAppsListCustomHostNameAnalysisOptionalParams): Promise; + listSecrets(resourceGroupName: string, containerAppName: string, options?: ContainerAppsListSecretsOptionalParams): Promise; +} + +// @public (undocumented) +export class ContainerAppsAPIClient extends coreClient.ServiceClient { + // (undocumented) + $host: string; + constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: ContainerAppsAPIClientOptionalParams); + // (undocumented) + apiVersion: string; + // (undocumented) + certificates: Certificates; + // (undocumented) + containerApps: ContainerApps; + // (undocumented) + containerAppsAuthConfigs: ContainerAppsAuthConfigs; + // (undocumented) + containerAppsRevisionReplicas: ContainerAppsRevisionReplicas; + // (undocumented) + containerAppsRevisions: ContainerAppsRevisions; + // (undocumented) + containerAppsSourceControls: ContainerAppsSourceControls; + // (undocumented) + daprComponents: DaprComponents; + // (undocumented) + managedEnvironments: ManagedEnvironments; + // (undocumented) + managedEnvironmentsStorages: ManagedEnvironmentsStorages; + // (undocumented) + namespaces: Namespaces; + // (undocumented) + operations: Operations; + // (undocumented) + subscriptionId: string; +} + +// @public +export interface ContainerAppsAPIClientOptionalParams extends coreClient.ServiceClientOptions { + $host?: string; + apiVersion?: string; + endpoint?: string; +} + +// @public +export interface ContainerAppsAuthConfigs { + createOrUpdate(resourceGroupName: string, containerAppName: string, authConfigName: string, authConfigEnvelope: AuthConfig, options?: ContainerAppsAuthConfigsCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, containerAppName: string, authConfigName: string, options?: ContainerAppsAuthConfigsDeleteOptionalParams): Promise; + get(resourceGroupName: string, containerAppName: string, authConfigName: string, options?: ContainerAppsAuthConfigsGetOptionalParams): Promise; + listByContainerApp(resourceGroupName: string, containerAppName: string, options?: ContainerAppsAuthConfigsListByContainerAppOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ContainerAppsAuthConfigsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerAppsAuthConfigsCreateOrUpdateResponse = AuthConfig; + +// @public +export interface ContainerAppsAuthConfigsDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface ContainerAppsAuthConfigsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerAppsAuthConfigsGetResponse = AuthConfig; + +// @public +export interface ContainerAppsAuthConfigsListByContainerAppNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerAppsAuthConfigsListByContainerAppNextResponse = AuthConfigCollection; + +// @public +export interface ContainerAppsAuthConfigsListByContainerAppOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerAppsAuthConfigsListByContainerAppResponse = AuthConfigCollection; + +// @public +export interface ContainerAppsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ContainerAppsCreateOrUpdateResponse = ContainerApp; + +// @public +export interface ContainerAppsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface ContainerAppSecret { + readonly name?: string; + readonly value?: string; +} + +// @public +export interface ContainerAppsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerAppsGetResponse = ContainerApp; + +// @public +export interface ContainerAppsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerAppsListByResourceGroupNextResponse = ContainerAppCollection; + +// @public +export interface ContainerAppsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerAppsListByResourceGroupResponse = ContainerAppCollection; + +// @public +export interface ContainerAppsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerAppsListBySubscriptionNextResponse = ContainerAppCollection; + +// @public +export interface ContainerAppsListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerAppsListBySubscriptionResponse = ContainerAppCollection; + +// @public +export interface ContainerAppsListCustomHostNameAnalysisOptionalParams extends coreClient.OperationOptions { + customHostname?: string; +} + +// @public +export type ContainerAppsListCustomHostNameAnalysisResponse = CustomHostnameAnalysisResult; + +// @public +export interface ContainerAppsListSecretsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerAppsListSecretsResponse = SecretsCollection; + +// @public +export interface ContainerAppsRevisionReplicas { + getReplica(resourceGroupName: string, containerAppName: string, revisionName: string, replicaName: string, options?: ContainerAppsRevisionReplicasGetReplicaOptionalParams): Promise; + listReplicas(resourceGroupName: string, containerAppName: string, revisionName: string, options?: ContainerAppsRevisionReplicasListReplicasOptionalParams): Promise; +} + +// @public +export interface ContainerAppsRevisionReplicasGetReplicaOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerAppsRevisionReplicasGetReplicaResponse = Replica; + +// @public +export interface ContainerAppsRevisionReplicasListReplicasOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerAppsRevisionReplicasListReplicasResponse = ReplicaCollection; + +// @public +export interface ContainerAppsRevisions { + activateRevision(resourceGroupName: string, containerAppName: string, revisionName: string, options?: ContainerAppsRevisionsActivateRevisionOptionalParams): Promise; + deactivateRevision(resourceGroupName: string, containerAppName: string, revisionName: string, options?: ContainerAppsRevisionsDeactivateRevisionOptionalParams): Promise; + getRevision(resourceGroupName: string, containerAppName: string, revisionName: string, options?: ContainerAppsRevisionsGetRevisionOptionalParams): Promise; + listRevisions(resourceGroupName: string, containerAppName: string, options?: ContainerAppsRevisionsListRevisionsOptionalParams): PagedAsyncIterableIterator; + restartRevision(resourceGroupName: string, containerAppName: string, revisionName: string, options?: ContainerAppsRevisionsRestartRevisionOptionalParams): Promise; +} + +// @public +export interface ContainerAppsRevisionsActivateRevisionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface ContainerAppsRevisionsDeactivateRevisionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface ContainerAppsRevisionsGetRevisionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerAppsRevisionsGetRevisionResponse = Revision; + +// @public +export interface ContainerAppsRevisionsListRevisionsNextOptionalParams extends coreClient.OperationOptions { + filter?: string; +} + +// @public +export type ContainerAppsRevisionsListRevisionsNextResponse = RevisionCollection; + +// @public +export interface ContainerAppsRevisionsListRevisionsOptionalParams extends coreClient.OperationOptions { + filter?: string; +} + +// @public +export type ContainerAppsRevisionsListRevisionsResponse = RevisionCollection; + +// @public +export interface ContainerAppsRevisionsRestartRevisionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface ContainerAppsSourceControls { + beginCreateOrUpdate(resourceGroupName: string, containerAppName: string, sourceControlName: string, sourceControlEnvelope: SourceControl, options?: ContainerAppsSourceControlsCreateOrUpdateOptionalParams): Promise, ContainerAppsSourceControlsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, containerAppName: string, sourceControlName: string, sourceControlEnvelope: SourceControl, options?: ContainerAppsSourceControlsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, containerAppName: string, sourceControlName: string, options?: ContainerAppsSourceControlsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, containerAppName: string, sourceControlName: string, options?: ContainerAppsSourceControlsDeleteOptionalParams): Promise; + get(resourceGroupName: string, containerAppName: string, sourceControlName: string, options?: ContainerAppsSourceControlsGetOptionalParams): Promise; + listByContainerApp(resourceGroupName: string, containerAppName: string, options?: ContainerAppsSourceControlsListByContainerAppOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ContainerAppsSourceControlsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ContainerAppsSourceControlsCreateOrUpdateResponse = SourceControl; + +// @public +export interface ContainerAppsSourceControlsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface ContainerAppsSourceControlsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerAppsSourceControlsGetResponse = SourceControl; + +// @public +export interface ContainerAppsSourceControlsListByContainerAppNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerAppsSourceControlsListByContainerAppNextResponse = SourceControlCollection; + +// @public +export interface ContainerAppsSourceControlsListByContainerAppOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerAppsSourceControlsListByContainerAppResponse = SourceControlCollection; + +// @public +export interface ContainerAppsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface ContainerResources { + cpu?: number; + readonly ephemeralStorage?: string; + memory?: string; +} + +// @public +export interface CookieExpiration { + convention?: CookieExpirationConvention; + timeToExpiration?: string; +} + +// @public +export type CookieExpirationConvention = "FixedTime" | "IdentityProviderDerived"; + +// @public +export type CreatedByType = string; + +// @public +export interface CustomDomain { + bindingType?: BindingType; + certificateId: string; + name: string; +} + +// @public +export type CustomHostnameAnalysisResult = ProxyResource & { + readonly hostName?: string; + readonly isHostnameAlreadyVerified?: boolean; + readonly customDomainVerificationTest?: DnsVerificationTestResult; + readonly customDomainVerificationFailureInfo?: DefaultErrorResponse; + readonly hasConflictOnManagedEnvironment?: boolean; + readonly conflictingContainerAppResourceId?: string; + cNameRecords?: string[]; + txtRecords?: string[]; + aRecords?: string[]; + alternateCNameRecords?: string[]; + alternateTxtRecords?: string[]; +}; + +// @public +export interface CustomOpenIdConnectProvider { + enabled?: boolean; + login?: OpenIdConnectLogin; + registration?: OpenIdConnectRegistration; +} + +// @public +export interface CustomScaleRule { + auth?: ScaleRuleAuth[]; + metadata?: { + [propertyName: string]: string; + }; + type?: string; +} + +// @public +export interface Dapr { + appId?: string; + appPort?: number; + appProtocol?: AppProtocol; + enabled?: boolean; +} + +// @public +export type DaprComponent = ProxyResource & { + componentType?: string; + version?: string; + ignoreErrors?: boolean; + initTimeout?: string; + secrets?: Secret[]; + metadata?: DaprMetadata[]; + scopes?: string[]; +}; + +// @public +export interface DaprComponents { + createOrUpdate(resourceGroupName: string, environmentName: string, componentName: string, daprComponentEnvelope: DaprComponent, options?: DaprComponentsCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, environmentName: string, componentName: string, options?: DaprComponentsDeleteOptionalParams): Promise; + get(resourceGroupName: string, environmentName: string, componentName: string, options?: DaprComponentsGetOptionalParams): Promise; + list(resourceGroupName: string, environmentName: string, options?: DaprComponentsListOptionalParams): PagedAsyncIterableIterator; + listSecrets(resourceGroupName: string, environmentName: string, componentName: string, options?: DaprComponentsListSecretsOptionalParams): Promise; +} + +// @public +export interface DaprComponentsCollection { + readonly nextLink?: string; + value: DaprComponent[]; +} + +// @public +export interface DaprComponentsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DaprComponentsCreateOrUpdateResponse = DaprComponent; + +// @public +export interface DaprComponentsDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface DaprComponentsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DaprComponentsGetResponse = DaprComponent; + +// @public +export interface DaprComponentsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DaprComponentsListNextResponse = DaprComponentsCollection; + +// @public +export interface DaprComponentsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DaprComponentsListResponse = DaprComponentsCollection; + +// @public +export interface DaprComponentsListSecretsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DaprComponentsListSecretsResponse = DaprSecretsCollection; + +// @public +export interface DaprMetadata { + name?: string; + secretRef?: string; + value?: string; +} + +// @public +export interface DaprSecretsCollection { + value: Secret[]; +} + +// @public +export interface DefaultAuthorizationPolicy { + allowedApplications?: string[]; + allowedPrincipals?: AllowedPrincipals; +} + +// @public +export interface DefaultErrorResponse { + readonly error?: DefaultErrorResponseError; +} + +// @public +export interface DefaultErrorResponseError { + readonly code?: string; + details?: DefaultErrorResponseErrorDetailsItem[]; + readonly innererror?: string; + readonly message?: string; + readonly target?: string; +} + +// @public +export interface DefaultErrorResponseErrorDetailsItem { + readonly code?: string; + readonly message?: string; + readonly target?: string; +} + +// @public +export type DnsVerificationTestResult = "Passed" | "Failed" | "Skipped"; + +// @public +export type EnvironmentProvisioningState = string; + +// @public +export interface EnvironmentVar { + name?: string; + secretRef?: string; + value?: string; +} + +// @public +export interface Facebook { + enabled?: boolean; + graphApiVersion?: string; + login?: LoginScopes; + registration?: AppRegistration; +} + +// @public +export interface ForwardProxy { + convention?: ForwardProxyConvention; + customHostHeaderName?: string; + customProtoHeaderName?: string; +} + +// @public +export type ForwardProxyConvention = "NoProxy" | "Standard" | "Custom"; + +// @public +export interface GitHub { + enabled?: boolean; + login?: LoginScopes; + registration?: ClientRegistration; +} + +// @public +export interface GithubActionConfiguration { + azureCredentials?: AzureCredentials; + contextPath?: string; + image?: string; + os?: string; + publishType?: string; + registryInfo?: RegistryInfo; + runtimeStack?: string; + runtimeVersion?: string; +} + +// @public +export interface GlobalValidation { + excludedPaths?: string[]; + redirectToProvider?: string; + unauthenticatedClientAction?: UnauthenticatedClientActionV2; +} + +// @public +export interface Google { + enabled?: boolean; + login?: LoginScopes; + registration?: ClientRegistration; + validation?: AllowedAudiencesValidation; +} + +// @public +export interface HttpScaleRule { + auth?: ScaleRuleAuth[]; + metadata?: { + [propertyName: string]: string; + }; +} + +// @public +export interface HttpSettings { + forwardProxy?: ForwardProxy; + requireHttps?: boolean; + routes?: HttpSettingsRoutes; +} + +// @public +export interface HttpSettingsRoutes { + apiPrefix?: string; +} + +// @public +export interface IdentityProviders { + apple?: Apple; + azureActiveDirectory?: AzureActiveDirectory; + azureStaticWebApps?: AzureStaticWebApps; + customOpenIdConnectProviders?: { + [propertyName: string]: CustomOpenIdConnectProvider; + }; + facebook?: Facebook; + gitHub?: GitHub; + google?: Google; + twitter?: Twitter; +} + +// @public +export interface Ingress { + allowInsecure?: boolean; + customDomains?: CustomDomain[]; + external?: boolean; + readonly fqdn?: string; + targetPort?: number; + traffic?: TrafficWeight[]; + transport?: IngressTransportMethod; +} + +// @public +export type IngressTransportMethod = string; + +// @public +export interface JwtClaimChecks { + allowedClientApplications?: string[]; + allowedGroups?: string[]; +} + +// @public +export enum KnownAccessMode { + // (undocumented) + ReadOnly = "ReadOnly", + // (undocumented) + ReadWrite = "ReadWrite" +} + +// @public +export enum KnownActiveRevisionsMode { + // (undocumented) + Multiple = "Multiple", + // (undocumented) + Single = "Single" +} + +// @public +export enum KnownAppProtocol { + // (undocumented) + Grpc = "grpc", + // (undocumented) + Http = "http" +} + +// @public +export enum KnownBindingType { + // (undocumented) + Disabled = "Disabled", + // (undocumented) + SniEnabled = "SniEnabled" +} + +// @public +export enum KnownCertificateProvisioningState { + // (undocumented) + Canceled = "Canceled", + // (undocumented) + DeleteFailed = "DeleteFailed", + // (undocumented) + Failed = "Failed", + // (undocumented) + Pending = "Pending", + // (undocumented) + Succeeded = "Succeeded" +} + +// @public +export enum KnownCheckNameAvailabilityReason { + // (undocumented) + AlreadyExists = "AlreadyExists", + // (undocumented) + Invalid = "Invalid" +} + +// @public +export enum KnownContainerAppProvisioningState { + // (undocumented) + Canceled = "Canceled", + // (undocumented) + Failed = "Failed", + // (undocumented) + InProgress = "InProgress", + // (undocumented) + Succeeded = "Succeeded" +} + +// @public +export enum KnownCreatedByType { + // (undocumented) + Application = "Application", + // (undocumented) + Key = "Key", + // (undocumented) + ManagedIdentity = "ManagedIdentity", + // (undocumented) + User = "User" +} + +// @public +export enum KnownEnvironmentProvisioningState { + // (undocumented) + Canceled = "Canceled", + // (undocumented) + Failed = "Failed", + // (undocumented) + InfrastructureSetupComplete = "InfrastructureSetupComplete", + // (undocumented) + InfrastructureSetupInProgress = "InfrastructureSetupInProgress", + // (undocumented) + InitializationInProgress = "InitializationInProgress", + // (undocumented) + ScheduledForDelete = "ScheduledForDelete", + // (undocumented) + Succeeded = "Succeeded", + // (undocumented) + UpgradeFailed = "UpgradeFailed", + // (undocumented) + UpgradeRequested = "UpgradeRequested", + // (undocumented) + Waiting = "Waiting" +} + +// @public +export enum KnownIngressTransportMethod { + // (undocumented) + Auto = "auto", + // (undocumented) + Http = "http", + // (undocumented) + Http2 = "http2" +} + +// @public +export enum KnownManagedServiceIdentityType { + // (undocumented) + None = "None", + // (undocumented) + SystemAssigned = "SystemAssigned", + // (undocumented) + SystemAssignedUserAssigned = "SystemAssigned,UserAssigned", + // (undocumented) + UserAssigned = "UserAssigned" +} + +// @public +export enum KnownRevisionHealthState { + // (undocumented) + Healthy = "Healthy", + // (undocumented) + None = "None", + // (undocumented) + Unhealthy = "Unhealthy" +} + +// @public +export enum KnownRevisionProvisioningState { + // (undocumented) + Deprovisioned = "Deprovisioned", + // (undocumented) + Deprovisioning = "Deprovisioning", + // (undocumented) + Failed = "Failed", + // (undocumented) + Provisioned = "Provisioned", + // (undocumented) + Provisioning = "Provisioning" +} + +// @public +export enum KnownScheme { + // (undocumented) + Http = "HTTP", + // (undocumented) + Https = "HTTPS" +} + +// @public +export enum KnownSourceControlOperationState { + // (undocumented) + Canceled = "Canceled", + // (undocumented) + Failed = "Failed", + // (undocumented) + InProgress = "InProgress", + // (undocumented) + Succeeded = "Succeeded" +} + +// @public +export enum KnownStorageType { + // (undocumented) + AzureFile = "AzureFile", + // (undocumented) + EmptyDir = "EmptyDir" +} + +// @public +export enum KnownType { + // (undocumented) + Liveness = "Liveness", + // (undocumented) + Readiness = "Readiness", + // (undocumented) + Startup = "Startup" +} + +// @public +export interface LogAnalyticsConfiguration { + customerId?: string; + sharedKey?: string; +} + +// @public +export interface Login { + allowedExternalRedirectUrls?: string[]; + cookieExpiration?: CookieExpiration; + nonce?: Nonce; + preserveUrlFragmentsForLogins?: boolean; + routes?: LoginRoutes; +} + +// @public +export interface LoginRoutes { + logoutEndpoint?: string; +} + +// @public +export interface LoginScopes { + scopes?: string[]; +} + +// @public +export type ManagedEnvironment = TrackedResource & { + readonly provisioningState?: EnvironmentProvisioningState; + daprAIInstrumentationKey?: string; + daprAIConnectionString?: string; + vnetConfiguration?: VnetConfiguration; + readonly deploymentErrors?: string; + readonly defaultDomain?: string; + readonly staticIp?: string; + appLogsConfiguration?: AppLogsConfiguration; + zoneRedundant?: boolean; +}; + +// @public +export interface ManagedEnvironments { + beginCreateOrUpdate(resourceGroupName: string, environmentName: string, environmentEnvelope: ManagedEnvironment, options?: ManagedEnvironmentsCreateOrUpdateOptionalParams): Promise, ManagedEnvironmentsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, environmentName: string, environmentEnvelope: ManagedEnvironment, options?: ManagedEnvironmentsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, environmentName: string, options?: ManagedEnvironmentsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, environmentName: string, options?: ManagedEnvironmentsDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, environmentName: string, environmentEnvelope: ManagedEnvironment, options?: ManagedEnvironmentsUpdateOptionalParams): Promise, void>>; + beginUpdateAndWait(resourceGroupName: string, environmentName: string, environmentEnvelope: ManagedEnvironment, options?: ManagedEnvironmentsUpdateOptionalParams): Promise; + get(resourceGroupName: string, environmentName: string, options?: ManagedEnvironmentsGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: ManagedEnvironmentsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: ManagedEnvironmentsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ManagedEnvironmentsCollection { + readonly nextLink?: string; + value: ManagedEnvironment[]; +} + +// @public +export interface ManagedEnvironmentsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ManagedEnvironmentsCreateOrUpdateResponse = ManagedEnvironment; + +// @public +export interface ManagedEnvironmentsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface ManagedEnvironmentsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedEnvironmentsGetResponse = ManagedEnvironment; + +// @public +export interface ManagedEnvironmentsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedEnvironmentsListByResourceGroupNextResponse = ManagedEnvironmentsCollection; + +// @public +export interface ManagedEnvironmentsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedEnvironmentsListByResourceGroupResponse = ManagedEnvironmentsCollection; + +// @public +export interface ManagedEnvironmentsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedEnvironmentsListBySubscriptionNextResponse = ManagedEnvironmentsCollection; + +// @public +export interface ManagedEnvironmentsListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedEnvironmentsListBySubscriptionResponse = ManagedEnvironmentsCollection; + +// @public +export interface ManagedEnvironmentsStorages { + createOrUpdate(resourceGroupName: string, environmentName: string, storageName: string, storageEnvelope: ManagedEnvironmentStorage, options?: ManagedEnvironmentsStoragesCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, environmentName: string, storageName: string, options?: ManagedEnvironmentsStoragesDeleteOptionalParams): Promise; + get(resourceGroupName: string, environmentName: string, storageName: string, options?: ManagedEnvironmentsStoragesGetOptionalParams): Promise; + list(resourceGroupName: string, environmentName: string, options?: ManagedEnvironmentsStoragesListOptionalParams): Promise; +} + +// @public +export interface ManagedEnvironmentsStoragesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedEnvironmentsStoragesCreateOrUpdateResponse = ManagedEnvironmentStorage; + +// @public +export interface ManagedEnvironmentsStoragesDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface ManagedEnvironmentsStoragesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedEnvironmentsStoragesGetResponse = ManagedEnvironmentStorage; + +// @public +export interface ManagedEnvironmentsStoragesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedEnvironmentsStoragesListResponse = ManagedEnvironmentStoragesCollection; + +// @public +export type ManagedEnvironmentStorage = ProxyResource & { + properties?: ManagedEnvironmentStorageProperties; +}; + +// @public +export interface ManagedEnvironmentStorageProperties { + azureFile?: AzureFileProperties; +} + +// @public +export interface ManagedEnvironmentStoragesCollection { + value: ManagedEnvironmentStorage[]; +} + +// @public +export interface ManagedEnvironmentsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface ManagedServiceIdentity { + readonly principalId?: string; + readonly tenantId?: string; + type: ManagedServiceIdentityType; + userAssignedIdentities?: { + [propertyName: string]: UserAssignedIdentity; + }; +} + +// @public +export type ManagedServiceIdentityType = string; + +// @public +export interface Namespaces { + checkNameAvailability(resourceGroupName: string, environmentName: string, checkNameAvailabilityRequest: CheckNameAvailabilityRequest, options?: NamespacesCheckNameAvailabilityOptionalParams): Promise; +} + +// @public +export interface NamespacesCheckNameAvailabilityOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NamespacesCheckNameAvailabilityResponse = CheckNameAvailabilityResponse; + +// @public +export interface Nonce { + nonceExpirationInterval?: string; + validateNonce?: boolean; +} + +// @public +export interface OpenIdConnectClientCredential { + clientSecretSettingName?: string; + method?: "ClientSecretPost"; +} + +// @public +export interface OpenIdConnectConfig { + authorizationEndpoint?: string; + certificationUri?: string; + issuer?: string; + tokenEndpoint?: string; + wellKnownOpenIdConfiguration?: string; +} + +// @public +export interface OpenIdConnectLogin { + nameClaimType?: string; + scopes?: string[]; +} + +// @public +export interface OpenIdConnectRegistration { + clientCredential?: OpenIdConnectClientCredential; + clientId?: string; + openIdConnectConfiguration?: OpenIdConnectConfig; +} + +// @public +export interface OperationDetail { + display?: OperationDisplay; + isDataAction?: boolean; + name?: string; + origin?: string; +} + +// @public +export interface OperationDisplay { + description?: string; + operation?: string; + provider?: string; + resource?: string; +} + +// @public +export interface Operations { + list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface OperationsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationsListNextResponse = AvailableOperations; + +// @public +export interface OperationsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationsListResponse = AvailableOperations; + +// @public +export type ProxyResource = Resource & {}; + +// @public +export interface QueueScaleRule { + auth?: ScaleRuleAuth[]; + queueLength?: number; + queueName?: string; +} + +// @public +export interface RegistryCredentials { + identity?: string; + passwordSecretRef?: string; + server?: string; + username?: string; +} + +// @public +export interface RegistryInfo { + registryPassword?: string; + registryUrl?: string; + registryUserName?: string; +} + +// @public +export type Replica = ProxyResource & { + readonly createdTime?: Date; + containers?: ReplicaContainer[]; +}; + +// @public +export interface ReplicaCollection { + value: Replica[]; +} + +// @public +export interface ReplicaContainer { + containerId?: string; + name?: string; + ready?: boolean; + restartCount?: number; + started?: boolean; +} + +// @public +export interface Resource { + readonly id?: string; + readonly name?: string; + readonly systemData?: SystemData; + readonly type?: string; +} + +// @public +export type Revision = ProxyResource & { + readonly createdTime?: Date; + readonly fqdn?: string; + readonly template?: Template; + readonly active?: boolean; + readonly replicas?: number; + readonly trafficWeight?: number; + readonly provisioningError?: string; + readonly healthState?: RevisionHealthState; + readonly provisioningState?: RevisionProvisioningState; +}; + +// @public +export interface RevisionCollection { + readonly nextLink?: string; + value: Revision[]; +} + +// @public +export type RevisionHealthState = string; + +// @public +export type RevisionProvisioningState = string; + +// @public +export interface Scale { + maxReplicas?: number; + minReplicas?: number; + rules?: ScaleRule[]; +} + +// @public +export interface ScaleRule { + azureQueue?: QueueScaleRule; + custom?: CustomScaleRule; + http?: HttpScaleRule; + name?: string; +} + +// @public +export interface ScaleRuleAuth { + secretRef?: string; + triggerParameter?: string; +} + +// @public +export type Scheme = string; + +// @public +export interface Secret { + name?: string; + value?: string; +} + +// @public +export interface SecretsCollection { + value: ContainerAppSecret[]; +} + +// @public +export type SourceControl = ProxyResource & { + readonly operationState?: SourceControlOperationState; + repoUrl?: string; + branch?: string; + githubActionConfiguration?: GithubActionConfiguration; +}; + +// @public +export interface SourceControlCollection { + readonly nextLink?: string; + value: SourceControl[]; +} + +// @public +export type SourceControlOperationState = string; + +// @public +export type StorageType = string; + +// @public +export interface SystemData { + createdAt?: Date; + createdBy?: string; + createdByType?: CreatedByType; + lastModifiedAt?: Date; + lastModifiedBy?: string; + lastModifiedByType?: CreatedByType; +} + +// @public +export interface Template { + containers?: Container[]; + revisionSuffix?: string; + scale?: Scale; + volumes?: Volume[]; +} + +// @public +export type TrackedResource = Resource & { + tags?: { + [propertyName: string]: string; + }; + location: string; +}; + +// @public +export interface TrafficWeight { + label?: string; + latestRevision?: boolean; + revisionName?: string; + weight?: number; +} + +// @public +export interface Twitter { + enabled?: boolean; + registration?: TwitterRegistration; +} + +// @public +export interface TwitterRegistration { + consumerKey?: string; + consumerSecretSettingName?: string; +} + +// @public +export type Type = string; + +// @public +export type UnauthenticatedClientActionV2 = "RedirectToLoginPage" | "AllowAnonymous" | "Return401" | "Return403"; + +// @public +export interface UserAssignedIdentity { + readonly clientId?: string; + readonly principalId?: string; +} + +// @public +export interface VnetConfiguration { + dockerBridgeCidr?: string; + infrastructureSubnetId?: string; + internal?: boolean; + platformReservedCidr?: string; + platformReservedDnsIP?: string; + runtimeSubnetId?: string; +} + +// @public +export interface Volume { + name?: string; + storageName?: string; + storageType?: StorageType; +} + +// @public +export interface VolumeMount { + mountPath?: string; + volumeName?: string; +} + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/appcontainers/arm-appcontainers/rollup.config.js b/sdk/appcontainers/arm-appcontainers/rollup.config.js new file mode 100644 index 000000000000..3f89d7309da5 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/rollup.config.js @@ -0,0 +1,122 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 nodeResolve from "@rollup/plugin-node-resolve"; +import cjs from "@rollup/plugin-commonjs"; +import sourcemaps from "rollup-plugin-sourcemaps"; +import multiEntry from "@rollup/plugin-multi-entry"; +import json from "@rollup/plugin-json"; + +import nodeBuiltins from "builtin-modules"; + +// #region Warning Handler + +/** + * A function that can determine whether a rollup warning should be ignored. If + * the function returns `true`, then the warning will not be displayed. + */ + +function ignoreNiseSinonEval(warning) { + return ( + warning.code === "EVAL" && + warning.id && + (warning.id.includes("node_modules/nise") || + warning.id.includes("node_modules/sinon")) === true + ); +} + +function ignoreChaiCircularDependency(warning) { + return ( + warning.code === "CIRCULAR_DEPENDENCY" && + warning.importer && warning.importer.includes("node_modules/chai") === true + ); +} + +const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval]; + +/** + * Construct a warning handler for the shared rollup configuration + * that ignores certain warnings that are not relevant to testing. + */ +function makeOnWarnForTesting() { + return (warning, warn) => { + // If every inhibitor returns false (i.e. no inhibitors), then show the warning + if (warningInhibitors.every((inhib) => !inhib(warning))) { + warn(warning); + } + }; +} + +// #endregion + +function makeBrowserTestConfig() { + const config = { + input: { + include: ["dist-esm/test/**/*.spec.js"], + exclude: ["dist-esm/test/**/node/**"] + }, + output: { + file: `dist-test/index.browser.js`, + format: "umd", + sourcemap: true + }, + preserveSymlinks: false, + plugins: [ + multiEntry({ exports: false }), + nodeResolve({ + mainFields: ["module", "browser"] + }), + cjs(), + json(), + sourcemaps() + //viz({ filename: "dist-test/browser-stats.html", sourcemap: true }) + ], + onwarn: makeOnWarnForTesting(), + // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0, + // rollup started respecting the "sideEffects" field in package.json. Since + // our package.json sets "sideEffects=false", this also applies to test + // code, which causes all tests to be removed by tree-shaking. + treeshake: false + }; + + return config; +} + +const defaultConfigurationOptions = { + disableBrowserBundle: false +}; + +export function makeConfig(pkg, options) { + options = { + ...defaultConfigurationOptions, + ...(options || {}) + }; + + const baseConfig = { + // Use the package's module field if it has one + input: pkg["module"] || "dist-esm/src/index.js", + external: [ + ...nodeBuiltins, + ...Object.keys(pkg.dependencies), + ...Object.keys(pkg.devDependencies) + ], + output: { file: "dist/index.js", format: "cjs", sourcemap: true }, + preserveSymlinks: false, + plugins: [sourcemaps(), nodeResolve()] + }; + + const config = [baseConfig]; + + if (!options.disableBrowserBundle) { + config.push(makeBrowserTestConfig()); + } + + return config; +} + +export default makeConfig(require("./package.json")); diff --git a/sdk/appcontainers/arm-appcontainers/src/containerAppsAPIClient.ts b/sdk/appcontainers/arm-appcontainers/src/containerAppsAPIClient.ts new file mode 100644 index 000000000000..4f521da00fa1 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/containerAppsAPIClient.ts @@ -0,0 +1,184 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 * as coreClient from "@azure/core-client"; +import * as coreRestPipeline from "@azure/core-rest-pipeline"; +import { + PipelineRequest, + PipelineResponse, + SendRequest +} from "@azure/core-rest-pipeline"; +import * as coreAuth from "@azure/core-auth"; +import { + ContainerAppsAuthConfigsImpl, + ContainerAppsImpl, + ContainerAppsRevisionsImpl, + ContainerAppsRevisionReplicasImpl, + DaprComponentsImpl, + OperationsImpl, + ManagedEnvironmentsImpl, + CertificatesImpl, + NamespacesImpl, + ManagedEnvironmentsStoragesImpl, + ContainerAppsSourceControlsImpl +} from "./operations"; +import { + ContainerAppsAuthConfigs, + ContainerApps, + ContainerAppsRevisions, + ContainerAppsRevisionReplicas, + DaprComponents, + Operations, + ManagedEnvironments, + Certificates, + Namespaces, + ManagedEnvironmentsStorages, + ContainerAppsSourceControls +} from "./operationsInterfaces"; +import { ContainerAppsAPIClientOptionalParams } from "./models"; + +export class ContainerAppsAPIClient extends coreClient.ServiceClient { + $host: string; + subscriptionId: string; + apiVersion: string; + + /** + * Initializes a new instance of the ContainerAppsAPIClient class. + * @param credentials Subscription credentials which uniquely identify client subscription. + * @param subscriptionId The ID of the target subscription. + * @param options The parameter options + */ + constructor( + credentials: coreAuth.TokenCredential, + subscriptionId: string, + options?: ContainerAppsAPIClientOptionalParams + ) { + if (credentials === undefined) { + throw new Error("'credentials' cannot be null"); + } + if (subscriptionId === undefined) { + throw new Error("'subscriptionId' cannot be null"); + } + + // Initializing default values for options + if (!options) { + options = {}; + } + const defaults: ContainerAppsAPIClientOptionalParams = { + requestContentType: "application/json; charset=utf-8", + credential: credentials + }; + + const packageDetails = `azsdk-js-arm-appcontainers/1.0.0`; + const userAgentPrefix = + options.userAgentOptions && options.userAgentOptions.userAgentPrefix + ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` + : `${packageDetails}`; + + if (!options.credentialScopes) { + options.credentialScopes = ["https://management.azure.com/.default"]; + } + const optionsWithDefaults = { + ...defaults, + ...options, + userAgentOptions: { + userAgentPrefix + }, + baseUri: + options.endpoint ?? options.baseUri ?? "https://management.azure.com" + }; + super(optionsWithDefaults); + + if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { + const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); + const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( + (pipelinePolicy) => + pipelinePolicy.name === + coreRestPipeline.bearerTokenAuthenticationPolicyName + ); + if (!bearerTokenAuthenticationPolicyFound) { + this.pipeline.removePolicy({ + name: coreRestPipeline.bearerTokenAuthenticationPolicyName + }); + this.pipeline.addPolicy( + coreRestPipeline.bearerTokenAuthenticationPolicy({ + scopes: `${optionsWithDefaults.baseUri}/.default`, + challengeCallbacks: { + authorizeRequestOnChallenge: + coreClient.authorizeRequestOnClaimChallenge + } + }) + ); + } + } + // Parameter assignments + this.subscriptionId = subscriptionId; + + // Assigning values to Constant parameters + this.$host = options.$host || "https://management.azure.com"; + this.apiVersion = options.apiVersion || "2022-03-01"; + this.containerAppsAuthConfigs = new ContainerAppsAuthConfigsImpl(this); + this.containerApps = new ContainerAppsImpl(this); + this.containerAppsRevisions = new ContainerAppsRevisionsImpl(this); + this.containerAppsRevisionReplicas = new ContainerAppsRevisionReplicasImpl( + this + ); + this.daprComponents = new DaprComponentsImpl(this); + this.operations = new OperationsImpl(this); + this.managedEnvironments = new ManagedEnvironmentsImpl(this); + this.certificates = new CertificatesImpl(this); + this.namespaces = new NamespacesImpl(this); + this.managedEnvironmentsStorages = new ManagedEnvironmentsStoragesImpl( + this + ); + this.containerAppsSourceControls = new ContainerAppsSourceControlsImpl( + this + ); + this.addCustomApiVersionPolicy(options.apiVersion); + } + + /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */ + private addCustomApiVersionPolicy(apiVersion?: string) { + if (!apiVersion) { + return; + } + const apiVersionPolicy = { + name: "CustomApiVersionPolicy", + async sendRequest( + request: PipelineRequest, + next: SendRequest + ): Promise { + const param = request.url.split("?"); + if (param.length > 1) { + const newParams = param[1].split("&").map((item) => { + if (item.indexOf("api-version") > -1) { + return item.replace(/(?<==).*$/, apiVersion); + } else { + return item; + } + }); + request.url = param[0] + "?" + newParams.join("&"); + } + return next(request); + } + }; + this.pipeline.addPolicy(apiVersionPolicy); + } + + containerAppsAuthConfigs: ContainerAppsAuthConfigs; + containerApps: ContainerApps; + containerAppsRevisions: ContainerAppsRevisions; + containerAppsRevisionReplicas: ContainerAppsRevisionReplicas; + daprComponents: DaprComponents; + operations: Operations; + managedEnvironments: ManagedEnvironments; + certificates: Certificates; + namespaces: Namespaces; + managedEnvironmentsStorages: ManagedEnvironmentsStorages; + containerAppsSourceControls: ContainerAppsSourceControls; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/index.ts b/sdk/appcontainers/arm-appcontainers/src/index.ts new file mode 100644 index 000000000000..895d36c46397 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/index.ts @@ -0,0 +1,12 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +/// +export * from "./models"; +export { ContainerAppsAPIClient } from "./containerAppsAPIClient"; +export * from "./operationsInterfaces"; diff --git a/sdk/appcontainers/arm-appcontainers/src/lroImpl.ts b/sdk/appcontainers/arm-appcontainers/src/lroImpl.ts new file mode 100644 index 000000000000..518d5f053b4e --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/lroImpl.ts @@ -0,0 +1,34 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { LongRunningOperation, LroResponse } from "@azure/core-lro"; + +export class LroImpl implements LongRunningOperation { + constructor( + private sendOperationFn: (args: any, spec: any) => Promise>, + private args: Record, + private spec: { + readonly requestBody?: unknown; + readonly path?: string; + readonly httpMethod: string; + } & Record, + public requestPath: string = spec.path!, + public requestMethod: string = spec.httpMethod + ) {} + public async sendInitialRequest(): Promise> { + return this.sendOperationFn(this.args, this.spec); + } + public async sendPollRequest(path: string): Promise> { + const { requestBody, ...restSpec } = this.spec; + return this.sendOperationFn(this.args, { + ...restSpec, + path, + httpMethod: "GET" + }); + } +} diff --git a/sdk/appcontainers/arm-appcontainers/src/models/index.ts b/sdk/appcontainers/arm-appcontainers/src/models/index.ts new file mode 100644 index 000000000000..6463ddecf112 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/models/index.ts @@ -0,0 +1,2140 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 * as coreClient from "@azure/core-client"; + +/** AuthConfig collection ARM resource. */ +export interface AuthConfigCollection { + /** Collection of resources. */ + value: AuthConfig[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** The configuration settings of the platform of ContainerApp Service Authentication/Authorization. */ +export interface AuthPlatform { + /** true if the Authentication / Authorization feature is enabled for the current app; otherwise, false. */ + enabled?: boolean; + /** + * The RuntimeVersion of the Authentication / Authorization feature in use for the current app. + * The setting in this value can control the behavior of certain features in the Authentication / Authorization module. + */ + runtimeVersion?: string; +} + +/** The configuration settings that determines the validation flow of users using ContainerApp Service Authentication/Authorization. */ +export interface GlobalValidation { + /** The action to take when an unauthenticated client attempts to access the app. */ + unauthenticatedClientAction?: UnauthenticatedClientActionV2; + /** + * The default authentication provider to use when multiple providers are configured. + * This setting is only needed if multiple providers are configured and the unauthenticated client + * action is set to "RedirectToLoginPage". + */ + redirectToProvider?: string; + /** The paths for which unauthenticated flow would not be redirected to the login page. */ + excludedPaths?: string[]; +} + +/** The configuration settings of each of the identity providers used to configure ContainerApp Service Authentication/Authorization. */ +export interface IdentityProviders { + /** The configuration settings of the Azure Active directory provider. */ + azureActiveDirectory?: AzureActiveDirectory; + /** The configuration settings of the Facebook provider. */ + facebook?: Facebook; + /** The configuration settings of the GitHub provider. */ + gitHub?: GitHub; + /** The configuration settings of the Google provider. */ + google?: Google; + /** The configuration settings of the Twitter provider. */ + twitter?: Twitter; + /** The configuration settings of the Apple provider. */ + apple?: Apple; + /** The configuration settings of the Azure Static Web Apps provider. */ + azureStaticWebApps?: AzureStaticWebApps; + /** + * The map of the name of the alias of each custom Open ID Connect provider to the + * configuration settings of the custom Open ID Connect provider. + */ + customOpenIdConnectProviders?: { + [propertyName: string]: CustomOpenIdConnectProvider; + }; +} + +/** The configuration settings of the Azure Active directory provider. */ +export interface AzureActiveDirectory { + /** false if the Azure Active Directory provider should not be enabled despite the set registration; otherwise, true. */ + enabled?: boolean; + /** The configuration settings of the Azure Active Directory app registration. */ + registration?: AzureActiveDirectoryRegistration; + /** The configuration settings of the Azure Active Directory login flow. */ + login?: AzureActiveDirectoryLogin; + /** The configuration settings of the Azure Active Directory token validation flow. */ + validation?: AzureActiveDirectoryValidation; + /** + * Gets a value indicating whether the Azure AD configuration was auto-provisioned using 1st party tooling. + * This is an internal flag primarily intended to support the Azure Management Portal. Users should not + * read or write to this property. + */ + isAutoProvisioned?: boolean; +} + +/** The configuration settings of the Azure Active Directory app registration. */ +export interface AzureActiveDirectoryRegistration { + /** + * The OpenID Connect Issuer URI that represents the entity which issues access tokens for this application. + * When using Azure Active Directory, this value is the URI of the directory tenant, e.g. https://login.microsoftonline.com/v2.0/{tenant-guid}/. + * This URI is a case-sensitive identifier for the token issuer. + * More information on OpenID Connect Discovery: http://openid.net/specs/openid-connect-discovery-1_0.html + */ + openIdIssuer?: string; + /** + * The Client ID of this relying party application, known as the client_id. + * This setting is required for enabling OpenID Connection authentication with Azure Active Directory or + * other 3rd party OpenID Connect providers. + * More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html + */ + clientId?: string; + /** The app setting name that contains the client secret of the relying party application. */ + clientSecretSettingName?: string; + /** + * An alternative to the client secret, that is the thumbprint of a certificate used for signing purposes. This property acts as + * a replacement for the Client Secret. It is also optional. + */ + clientSecretCertificateThumbprint?: string; + /** + * An alternative to the client secret thumbprint, that is the subject alternative name of a certificate used for signing purposes. This property acts as + * a replacement for the Client Secret Certificate Thumbprint. It is also optional. + */ + clientSecretCertificateSubjectAlternativeName?: string; + /** + * An alternative to the client secret thumbprint, that is the issuer of a certificate used for signing purposes. This property acts as + * a replacement for the Client Secret Certificate Thumbprint. It is also optional. + */ + clientSecretCertificateIssuer?: string; +} + +/** The configuration settings of the Azure Active Directory login flow. */ +export interface AzureActiveDirectoryLogin { + /** + * Login parameters to send to the OpenID Connect authorization endpoint when + * a user logs in. Each parameter must be in the form "key=value". + */ + loginParameters?: string[]; + /** true if the www-authenticate provider should be omitted from the request; otherwise, false. */ + disableWWWAuthenticate?: boolean; +} + +/** The configuration settings of the Azure Active Directory token validation flow. */ +export interface AzureActiveDirectoryValidation { + /** The configuration settings of the checks that should be made while validating the JWT Claims. */ + jwtClaimChecks?: JwtClaimChecks; + /** The list of audiences that can make successful authentication/authorization requests. */ + allowedAudiences?: string[]; + /** The configuration settings of the default authorization policy. */ + defaultAuthorizationPolicy?: DefaultAuthorizationPolicy; +} + +/** The configuration settings of the checks that should be made while validating the JWT Claims. */ +export interface JwtClaimChecks { + /** The list of the allowed groups. */ + allowedGroups?: string[]; + /** The list of the allowed client applications. */ + allowedClientApplications?: string[]; +} + +/** The configuration settings of the Azure Active Directory default authorization policy. */ +export interface DefaultAuthorizationPolicy { + /** The configuration settings of the Azure Active Directory allowed principals. */ + allowedPrincipals?: AllowedPrincipals; + /** The configuration settings of the Azure Active Directory allowed applications. */ + allowedApplications?: string[]; +} + +/** The configuration settings of the Azure Active Directory allowed principals. */ +export interface AllowedPrincipals { + /** The list of the allowed groups. */ + groups?: string[]; + /** The list of the allowed identities. */ + identities?: string[]; +} + +/** The configuration settings of the Facebook provider. */ +export interface Facebook { + /** false if the Facebook provider should not be enabled despite the set registration; otherwise, true. */ + enabled?: boolean; + /** The configuration settings of the app registration for the Facebook provider. */ + registration?: AppRegistration; + /** The version of the Facebook api to be used while logging in. */ + graphApiVersion?: string; + /** The configuration settings of the login flow. */ + login?: LoginScopes; +} + +/** The configuration settings of the app registration for providers that have app ids and app secrets */ +export interface AppRegistration { + /** The App ID of the app used for login. */ + appId?: string; + /** The app setting name that contains the app secret. */ + appSecretSettingName?: string; +} + +/** The configuration settings of the login flow, including the scopes that should be requested. */ +export interface LoginScopes { + /** A list of the scopes that should be requested while authenticating. */ + scopes?: string[]; +} + +/** The configuration settings of the GitHub provider. */ +export interface GitHub { + /** false if the GitHub provider should not be enabled despite the set registration; otherwise, true. */ + enabled?: boolean; + /** The configuration settings of the app registration for the GitHub provider. */ + registration?: ClientRegistration; + /** The configuration settings of the login flow. */ + login?: LoginScopes; +} + +/** The configuration settings of the app registration for providers that have client ids and client secrets */ +export interface ClientRegistration { + /** The Client ID of the app used for login. */ + clientId?: string; + /** The app setting name that contains the client secret. */ + clientSecretSettingName?: string; +} + +/** The configuration settings of the Google provider. */ +export interface Google { + /** false if the Google provider should not be enabled despite the set registration; otherwise, true. */ + enabled?: boolean; + /** The configuration settings of the app registration for the Google provider. */ + registration?: ClientRegistration; + /** The configuration settings of the login flow. */ + login?: LoginScopes; + /** The configuration settings of the Azure Active Directory token validation flow. */ + validation?: AllowedAudiencesValidation; +} + +/** The configuration settings of the Allowed Audiences validation flow. */ +export interface AllowedAudiencesValidation { + /** The configuration settings of the allowed list of audiences from which to validate the JWT token. */ + allowedAudiences?: string[]; +} + +/** The configuration settings of the Twitter provider. */ +export interface Twitter { + /** false if the Twitter provider should not be enabled despite the set registration; otherwise, true. */ + enabled?: boolean; + /** The configuration settings of the app registration for the Twitter provider. */ + registration?: TwitterRegistration; +} + +/** The configuration settings of the app registration for the Twitter provider. */ +export interface TwitterRegistration { + /** + * The OAuth 1.0a consumer key of the Twitter application used for sign-in. + * This setting is required for enabling Twitter Sign-In. + * Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in + */ + consumerKey?: string; + /** + * The app setting name that contains the OAuth 1.0a consumer secret of the Twitter + * application used for sign-in. + */ + consumerSecretSettingName?: string; +} + +/** The configuration settings of the Apple provider. */ +export interface Apple { + /** false if the Apple provider should not be enabled despite the set registration; otherwise, true. */ + enabled?: boolean; + /** The configuration settings of the Apple registration. */ + registration?: AppleRegistration; + /** The configuration settings of the login flow. */ + login?: LoginScopes; +} + +/** The configuration settings of the registration for the Apple provider */ +export interface AppleRegistration { + /** The Client ID of the app used for login. */ + clientId?: string; + /** The app setting name that contains the client secret. */ + clientSecretSettingName?: string; +} + +/** The configuration settings of the Azure Static Web Apps provider. */ +export interface AzureStaticWebApps { + /** false if the Azure Static Web Apps provider should not be enabled despite the set registration; otherwise, true. */ + enabled?: boolean; + /** The configuration settings of the Azure Static Web Apps registration. */ + registration?: AzureStaticWebAppsRegistration; +} + +/** The configuration settings of the registration for the Azure Static Web Apps provider */ +export interface AzureStaticWebAppsRegistration { + /** The Client ID of the app used for login. */ + clientId?: string; +} + +/** The configuration settings of the custom Open ID Connect provider. */ +export interface CustomOpenIdConnectProvider { + /** false if the custom Open ID provider provider should not be enabled; otherwise, true. */ + enabled?: boolean; + /** The configuration settings of the app registration for the custom Open ID Connect provider. */ + registration?: OpenIdConnectRegistration; + /** The configuration settings of the login flow of the custom Open ID Connect provider. */ + login?: OpenIdConnectLogin; +} + +/** The configuration settings of the app registration for the custom Open ID Connect provider. */ +export interface OpenIdConnectRegistration { + /** The client id of the custom Open ID Connect provider. */ + clientId?: string; + /** The authentication credentials of the custom Open ID Connect provider. */ + clientCredential?: OpenIdConnectClientCredential; + /** The configuration settings of the endpoints used for the custom Open ID Connect provider. */ + openIdConnectConfiguration?: OpenIdConnectConfig; +} + +/** The authentication client credentials of the custom Open ID Connect provider. */ +export interface OpenIdConnectClientCredential { + /** The method that should be used to authenticate the user. */ + method?: "ClientSecretPost"; + /** The app setting that contains the client secret for the custom Open ID Connect provider. */ + clientSecretSettingName?: string; +} + +/** The configuration settings of the endpoints used for the custom Open ID Connect provider. */ +export interface OpenIdConnectConfig { + /** The endpoint to be used to make an authorization request. */ + authorizationEndpoint?: string; + /** The endpoint to be used to request a token. */ + tokenEndpoint?: string; + /** The endpoint that issues the token. */ + issuer?: string; + /** The endpoint that provides the keys necessary to validate the token. */ + certificationUri?: string; + /** The endpoint that contains all the configuration endpoints for the provider. */ + wellKnownOpenIdConfiguration?: string; +} + +/** The configuration settings of the login flow of the custom Open ID Connect provider. */ +export interface OpenIdConnectLogin { + /** The name of the claim that contains the users name. */ + nameClaimType?: string; + /** A list of the scopes that should be requested while authenticating. */ + scopes?: string[]; +} + +/** The configuration settings of the login flow of users using ContainerApp Service Authentication/Authorization. */ +export interface Login { + /** The routes that specify the endpoints used for login and logout requests. */ + routes?: LoginRoutes; + /** true if the fragments from the request are preserved after the login request is made; otherwise, false. */ + preserveUrlFragmentsForLogins?: boolean; + /** + * External URLs that can be redirected to as part of logging in or logging out of the app. Note that the query string part of the URL is ignored. + * This is an advanced setting typically only needed by Windows Store application backends. + * Note that URLs within the current domain are always implicitly allowed. + */ + allowedExternalRedirectUrls?: string[]; + /** The configuration settings of the session cookie's expiration. */ + cookieExpiration?: CookieExpiration; + /** The configuration settings of the nonce used in the login flow. */ + nonce?: Nonce; +} + +/** The routes that specify the endpoints used for login and logout requests. */ +export interface LoginRoutes { + /** The endpoint at which a logout request should be made. */ + logoutEndpoint?: string; +} + +/** The configuration settings of the session cookie's expiration. */ +export interface CookieExpiration { + /** The convention used when determining the session cookie's expiration. */ + convention?: CookieExpirationConvention; + /** The time after the request is made when the session cookie should expire. */ + timeToExpiration?: string; +} + +/** The configuration settings of the nonce used in the login flow. */ +export interface Nonce { + /** false if the nonce should not be validated while completing the login flow; otherwise, true. */ + validateNonce?: boolean; + /** The time after the request is made when the nonce should expire. */ + nonceExpirationInterval?: string; +} + +/** The configuration settings of the HTTP requests for authentication and authorization requests made against ContainerApp Service Authentication/Authorization. */ +export interface HttpSettings { + /** false if the authentication/authorization responses not having the HTTPS scheme are permissible; otherwise, true. */ + requireHttps?: boolean; + /** The configuration settings of the paths HTTP requests. */ + routes?: HttpSettingsRoutes; + /** The configuration settings of a forward proxy used to make the requests. */ + forwardProxy?: ForwardProxy; +} + +/** The configuration settings of the paths HTTP requests. */ +export interface HttpSettingsRoutes { + /** The prefix that should precede all the authentication/authorization paths. */ + apiPrefix?: string; +} + +/** The configuration settings of a forward proxy used to make the requests. */ +export interface ForwardProxy { + /** The convention used to determine the url of the request made. */ + convention?: ForwardProxyConvention; + /** The name of the header containing the host of the request. */ + customHostHeaderName?: string; + /** The name of the header containing the scheme of the request. */ + customProtoHeaderName?: string; +} + +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface Resource { + /** + * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData { + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + createdByType?: CreatedByType; + /** The timestamp of resource creation (UTC). */ + createdAt?: Date; + /** The identity that last modified the resource. */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource. */ + lastModifiedByType?: CreatedByType; + /** The timestamp of resource last modification (UTC) */ + lastModifiedAt?: Date; +} + +/** App Service error response. */ +export interface DefaultErrorResponse { + /** + * Error model. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly error?: DefaultErrorResponseError; +} + +/** Error model. */ +export interface DefaultErrorResponseError { + /** + * Standardized string to programmatically identify the error. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * Detailed error description and debugging information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * Detailed error description and debugging information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; + /** Details or the error */ + details?: DefaultErrorResponseErrorDetailsItem[]; + /** + * More information to debug error. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly innererror?: string; +} + +/** Detailed errors. */ +export interface DefaultErrorResponseErrorDetailsItem { + /** + * Standardized string to programmatically identify the error. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * Detailed error description and debugging information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * Detailed error description and debugging information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; +} + +/** Container App collection ARM resource. */ +export interface ContainerAppCollection { + /** Collection of resources. */ + value: ContainerApp[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Managed service identity (system assigned and/or user assigned identities) */ +export interface ManagedServiceIdentity { + /** + * 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 */ + secrets?: Secret[]; + /** + * ActiveRevisionsMode controls how active revisions are handled for the Container app: + * Multiple: multiple revisions can be active.Single: Only one revision can be active at a time. Revision weights can not be used in this mode. If no value if provided, this is the default. + */ + activeRevisionsMode?: ActiveRevisionsMode; + /** Ingress configurations. */ + ingress?: Ingress; + /** Collection of private container registry credentials for containers used by the Container app */ + registries?: RegistryCredentials[]; + /** Dapr configuration for the Container App. */ + dapr?: Dapr; +} + +/** Secret definition. */ +export interface Secret { + /** Secret Name. */ + name?: string; + /** Secret Value. */ + value?: string; +} + +/** Container App Ingress configuration. */ +export interface Ingress { + /** + * Hostname. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly fqdn?: string; + /** Bool indicating if app exposes an external http endpoint */ + external?: boolean; + /** Target Port in containers for traffic from ingress */ + targetPort?: number; + /** Ingress transport protocol */ + transport?: IngressTransportMethod; + /** Traffic weights for app's revisions */ + traffic?: TrafficWeight[]; + /** custom domain bindings for Container Apps' hostnames. */ + customDomains?: CustomDomain[]; + /** Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected to HTTPS connections */ + allowInsecure?: boolean; +} + +/** Traffic weight assigned to a revision */ +export interface TrafficWeight { + /** Name of a revision */ + revisionName?: string; + /** Traffic weight assigned to a revision */ + weight?: number; + /** Indicates that the traffic weight belongs to a latest stable revision */ + latestRevision?: boolean; + /** Associates a traffic label with a revision */ + label?: string; +} + +/** Custom Domain of a Container App */ +export interface CustomDomain { + /** Hostname. */ + name: string; + /** Custom Domain binding type. */ + bindingType?: BindingType; + /** Resource Id of the Certificate to be bound to this hostname. Must exist in the Managed Environment. */ + certificateId: string; +} + +/** Container App Private Registry */ +export interface RegistryCredentials { + /** Container Registry Server */ + server?: string; + /** Container Registry Username */ + username?: string; + /** The name of the Secret that contains the registry login password */ + passwordSecretRef?: string; + /** A Managed Identity to use to authenticate with Azure Container Registry. For user-assigned identities, use the full user-assigned identity Resource ID. For system-assigned identities, use 'system' */ + identity?: string; +} + +/** Container App Dapr configuration. */ +export interface Dapr { + /** Boolean indicating if the Dapr side car is enabled */ + enabled?: boolean; + /** Dapr application identifier */ + appId?: string; + /** Tells Dapr which protocol your application is using. Valid options are http and grpc. Default is http */ + appProtocol?: AppProtocol; + /** Tells Dapr which port your application is listening on */ + appPort?: number; +} + +/** + * Container App versioned application definition. + * Defines the desired state of an immutable revision. + * Any changes to this section Will result in a new revision being created + */ +export interface Template { + /** User friendly suffix that is appended to the revision name */ + revisionSuffix?: string; + /** List of container definitions for the Container App. */ + containers?: Container[]; + /** Scaling properties for the Container App. */ + scale?: Scale; + /** List of volume definitions for the Container App. */ + volumes?: Volume[]; +} + +/** Container App container definition. */ +export interface Container { + /** Container image tag. */ + image?: string; + /** Custom container name. */ + name?: string; + /** Container start command. */ + command?: string[]; + /** Container start command arguments. */ + args?: string[]; + /** Container environment variables. */ + env?: EnvironmentVar[]; + /** Container resource requirements. */ + resources?: ContainerResources; + /** List of probes for the container. */ + probes?: ContainerAppProbe[]; + /** Container volume mounts. */ + volumeMounts?: VolumeMount[]; +} + +/** Container App container environment variable. */ +export interface EnvironmentVar { + /** Environment variable name. */ + name?: string; + /** Non-secret environment variable value. */ + value?: string; + /** Name of the Container App secret from which to pull the environment variable value. */ + secretRef?: string; +} + +/** Container App container resource requirements. */ +export interface ContainerResources { + /** Required CPU in cores, e.g. 0.5 */ + cpu?: number; + /** Required memory, e.g. "250Mb" */ + memory?: string; + /** + * Ephemeral Storage, e.g. "1Gi" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ephemeralStorage?: string; +} + +/** Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. */ +export interface ContainerAppProbe { + /** Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. Maximum value is 10. */ + failureThreshold?: number; + /** HTTPGet specifies the http request to perform. */ + httpGet?: ContainerAppProbeHttpGet; + /** Number of seconds after the container has started before liveness probes are initiated. Minimum value is 1. Maximum value is 60. */ + initialDelaySeconds?: number; + /** How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value is 240. */ + periodSeconds?: number; + /** Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. Maximum value is 10. */ + successThreshold?: number; + /** TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported. */ + tcpSocket?: ContainerAppProbeTcpSocket; + /** Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is an alpha field and requires enabling ProbeTerminationGracePeriod feature gate. Maximum value is 3600 seconds (1 hour) */ + terminationGracePeriodSeconds?: number; + /** Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Maximum value is 240. */ + timeoutSeconds?: number; + /** The type of probe. */ + type?: Type; +} + +/** HTTPGet specifies the http request to perform. */ +export interface ContainerAppProbeHttpGet { + /** Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. */ + host?: string; + /** Custom headers to set in the request. HTTP allows repeated headers. */ + httpHeaders?: ContainerAppProbeHttpGetHttpHeadersItem[]; + /** Path to access on the HTTP server. */ + path?: string; + /** Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. */ + port: number; + /** Scheme to use for connecting to the host. Defaults to HTTP. */ + scheme?: Scheme; +} + +/** HTTPHeader describes a custom header to be used in HTTP probes */ +export interface ContainerAppProbeHttpGetHttpHeadersItem { + /** The header field name */ + name: string; + /** The header field value */ + value: string; +} + +/** TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported. */ +export interface ContainerAppProbeTcpSocket { + /** Optional: Host name to connect to, defaults to the pod IP. */ + host?: string; + /** Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. */ + port: number; +} + +/** Volume mount for the Container App. */ +export interface VolumeMount { + /** This must match the Name of a Volume. */ + volumeName?: string; + /** Path within the container at which the volume should be mounted.Must not contain ':'. */ + mountPath?: string; +} + +/** Container App scaling configurations. */ +export interface Scale { + /** Optional. Minimum number of container replicas. */ + minReplicas?: number; + /** Optional. Maximum number of container replicas. Defaults to 10 if not set. */ + maxReplicas?: number; + /** Scaling rules. */ + rules?: ScaleRule[]; +} + +/** Container App container scaling rule. */ +export interface ScaleRule { + /** Scale Rule Name */ + name?: string; + /** Azure Queue based scaling. */ + azureQueue?: QueueScaleRule; + /** Custom scale rule. */ + custom?: CustomScaleRule; + /** HTTP requests based scaling. */ + http?: HttpScaleRule; +} + +/** Container App container Azure Queue based scaling rule. */ +export interface QueueScaleRule { + /** Queue name. */ + queueName?: string; + /** Queue length. */ + queueLength?: number; + /** Authentication secrets for the queue scale rule. */ + auth?: ScaleRuleAuth[]; +} + +/** Auth Secrets for Container App Scale Rule */ +export interface ScaleRuleAuth { + /** Name of the Container App secret from which to pull the auth params. */ + secretRef?: string; + /** Trigger Parameter that uses the secret */ + triggerParameter?: string; +} + +/** Container App container Custom scaling rule. */ +export interface CustomScaleRule { + /** + * Type of the custom scale rule + * eg: azure-servicebus, redis etc. + */ + type?: string; + /** Metadata properties to describe custom scale rule. */ + metadata?: { [propertyName: string]: string }; + /** Authentication secrets for the custom scale rule. */ + auth?: ScaleRuleAuth[]; +} + +/** Container App container Custom scaling rule. */ +export interface HttpScaleRule { + /** Metadata properties to describe http scale rule. */ + metadata?: { [propertyName: string]: string }; + /** Authentication secrets for the custom scale rule. */ + auth?: ScaleRuleAuth[]; +} + +/** Volume definitions for the Container App. */ +export interface Volume { + /** Volume name. */ + name?: string; + /** Storage type for the volume. If not provided, use EmptyDir. */ + storageType?: StorageType; + /** Name of storage resource. No need to provide for EmptyDir. */ + storageName?: string; +} + +/** Container App Secrets Collection ARM resource. */ +export interface SecretsCollection { + /** Collection of resources. */ + value: ContainerAppSecret[]; +} + +/** Container App Secret. */ +export interface ContainerAppSecret { + /** + * Secret Name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Secret Value. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: string; +} + +/** Container App Revisions collection ARM resource. */ +export interface RevisionCollection { + /** Collection of resources. */ + value: Revision[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Container object under Container App Revision Replica. */ +export interface ReplicaContainer { + /** The Name of the Container */ + name?: string; + /** The Id of the Container */ + containerId?: string; + /** The container ready status */ + ready?: boolean; + /** The container start status */ + started?: boolean; + /** The container restart count */ + restartCount?: number; +} + +/** Container App Revision Replicas collection ARM resource. */ +export interface ReplicaCollection { + /** Collection of resources. */ + value: Replica[]; +} + +/** Dapr Components ARM resource. */ +export interface DaprComponentsCollection { + /** Collection of resources. */ + value: DaprComponent[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Dapr component metadata. */ +export interface DaprMetadata { + /** Metadata property name. */ + name?: string; + /** Metadata property value. */ + value?: string; + /** Name of the Dapr Component secret from which to pull the metadata property value. */ + secretRef?: string; +} + +/** Dapr component Secrets Collection ARM resource. */ +export interface DaprSecretsCollection { + /** Collection of secrets used by a Dapr component */ + value: Secret[]; +} + +/** Available operations of the service */ +export interface AvailableOperations { + /** Collection of available operation details */ + value?: OperationDetail[]; + /** + * URL client should use to fetch the next page (per server side paging). + * It's null for now, added for future use. + */ + nextLink?: string; +} + +/** Operation detail payload */ +export interface OperationDetail { + /** Name of the operation */ + name?: string; + /** Indicates whether the operation is a data action */ + isDataAction?: boolean; + /** Display of the operation */ + display?: OperationDisplay; + /** Origin of the operation */ + origin?: string; +} + +/** Operation display payload */ +export interface OperationDisplay { + /** Resource provider of the operation */ + provider?: string; + /** Resource of the operation */ + resource?: string; + /** Localized friendly name for the operation */ + operation?: string; + /** Localized friendly description for the operation */ + description?: string; +} + +/** Collection of Environments */ +export interface ManagedEnvironmentsCollection { + /** Collection of resources. */ + value: ManagedEnvironment[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Configuration properties for apps environment to join a Virtual Network */ +export interface VnetConfiguration { + /** Boolean indicating the environment only has an internal load balancer. These environments do not have a public static IP resource, must provide ControlPlaneSubnetResourceId and AppSubnetResourceId if enabling this property */ + internal?: boolean; + /** Resource ID of a subnet for infrastructure components. This subnet must be in the same VNET as the subnet defined in runtimeSubnetId. Must not overlap with any other provided IP ranges. */ + infrastructureSubnetId?: string; + /** Resource ID of a subnet that Container App containers are injected into. This subnet must be in the same VNET as the subnet defined in infrastructureSubnetId. Must not overlap with any other provided IP ranges. */ + runtimeSubnetId?: string; + /** CIDR notation IP range assigned to the Docker bridge, network. Must not overlap with any other provided IP ranges. */ + dockerBridgeCidr?: string; + /** IP range in CIDR notation that can be reserved for environment infrastructure IP addresses. Must not overlap with any other provided IP ranges. */ + platformReservedCidr?: string; + /** An IP address from the IP range defined by platformReservedCidr that will be reserved for the internal DNS server. */ + platformReservedDnsIP?: string; +} + +/** Configuration of application logs */ +export interface AppLogsConfiguration { + /** Logs destination */ + destination?: string; + /** Log Analytics configuration */ + logAnalyticsConfiguration?: LogAnalyticsConfiguration; +} + +/** Log analytics configuration */ +export interface LogAnalyticsConfiguration { + /** Log analytics customer id */ + customerId?: string; + /** Log analytics customer key */ + sharedKey?: string; +} + +/** Collection of Certificates. */ +export interface CertificateCollection { + /** Collection of resources. */ + value: Certificate[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Certificate resource specific properties */ +export interface CertificateProperties { + /** + * Provisioning state of the certificate. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: CertificateProvisioningState; + /** Certificate password. */ + password?: string; + /** + * Subject name of the certificate. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly subjectName?: string; + /** PFX or PEM blob */ + value?: Uint8Array; + /** + * Certificate issuer. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly issuer?: string; + /** + * Certificate issue Date. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly issueDate?: Date; + /** + * Certificate expiration date. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly expirationDate?: Date; + /** + * Certificate thumbprint. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly thumbprint?: string; + /** + * Is the certificate valid?. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly valid?: boolean; + /** + * Public key hash. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly publicKeyHash?: string; +} + +/** A certificate to update */ +export interface CertificatePatch { + /** Application-specific metadata in the form of key-value pairs. */ + tags?: { [propertyName: string]: string }; +} + +/** The check availability request body. */ +export interface CheckNameAvailabilityRequest { + /** The name of the resource for which availability needs to be checked. */ + name?: string; + /** The resource type. */ + type?: string; +} + +/** The check availability result. */ +export interface CheckNameAvailabilityResponse { + /** Indicates if the resource name is available. */ + nameAvailable?: boolean; + /** The reason why the given name is not available. */ + reason?: CheckNameAvailabilityReason; + /** Detailed reason why the given name is available. */ + message?: string; +} + +/** Collection of Storage for Environments */ +export interface ManagedEnvironmentStoragesCollection { + /** Collection of storage resources. */ + value: ManagedEnvironmentStorage[]; +} + +/** Storage properties */ +export interface ManagedEnvironmentStorageProperties { + /** Azure file properties */ + azureFile?: AzureFileProperties; +} + +/** Azure File Properties. */ +export interface AzureFileProperties { + /** Storage account name for azure file. */ + accountName?: string; + /** Storage account key for azure file. */ + accountKey?: string; + /** Access mode for storage */ + accessMode?: AccessMode; + /** Azure file share name. */ + shareName?: string; +} + +/** SourceControl collection ARM resource. */ +export interface SourceControlCollection { + /** Collection of resources. */ + value: SourceControl[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Configuration properties that define the mutable settings of a Container App SourceControl */ +export interface GithubActionConfiguration { + /** Registry configurations. */ + registryInfo?: RegistryInfo; + /** AzureCredentials configurations. */ + azureCredentials?: AzureCredentials; + /** Context path */ + contextPath?: string; + /** Image name */ + image?: string; + /** Code or Image */ + publishType?: string; + /** Operation system */ + os?: string; + /** Runtime stack */ + runtimeStack?: string; + /** Runtime version */ + runtimeVersion?: string; +} + +/** Container App registry information. */ +export interface RegistryInfo { + /** registry server Url. */ + registryUrl?: string; + /** registry username. */ + registryUserName?: string; + /** registry secret. */ + registryPassword?: string; +} + +/** Container App credentials. */ +export interface AzureCredentials { + /** Client Id. */ + clientId?: string; + /** Client Secret. */ + clientSecret?: string; + /** Tenant Id. */ + tenantId?: string; + /** Subscription Id. */ + subscriptionId?: string; +} + +/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ +export type ProxyResource = Resource & {}; + +/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ +export type TrackedResource = Resource & { + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** The geo-location where the resource lives */ + location: string; +}; + +/** Configuration settings for the Azure ContainerApp Service Authentication / Authorization feature. */ +export type AuthConfig = ProxyResource & { + /** The configuration settings of the platform of ContainerApp Service Authentication/Authorization. */ + platform?: AuthPlatform; + /** The configuration settings that determines the validation flow of users using Service Authentication/Authorization. */ + globalValidation?: GlobalValidation; + /** The configuration settings of each of the identity providers used to configure ContainerApp Service Authentication/Authorization. */ + identityProviders?: IdentityProviders; + /** The configuration settings of the login flow of users using ContainerApp Service Authentication/Authorization. */ + login?: Login; + /** The configuration settings of the HTTP requests for authentication and authorization requests made against ContainerApp Service Authentication/Authorization. */ + httpSettings?: HttpSettings; +}; + +/** Custom domain analysis. */ +export type CustomHostnameAnalysisResult = ProxyResource & { + /** + * Host name that was analyzed + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly hostName?: string; + /** + * true if hostname is already verified; otherwise, false. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isHostnameAlreadyVerified?: boolean; + /** + * DNS verification test result. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly customDomainVerificationTest?: DnsVerificationTestResult; + /** + * Raw failure information if DNS verification fails. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly customDomainVerificationFailureInfo?: DefaultErrorResponse; + /** + * true if there is a conflict on the Container App's managed environment; otherwise, false. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly hasConflictOnManagedEnvironment?: boolean; + /** + * Name of the conflicting Container App on the Managed Environment if it's within the same subscription. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly conflictingContainerAppResourceId?: string; + /** CName records visible for this hostname. */ + cNameRecords?: string[]; + /** TXT records visible for this hostname. */ + txtRecords?: string[]; + /** A records visible for this hostname. */ + aRecords?: string[]; + /** Alternate CName records visible for this hostname. */ + alternateCNameRecords?: string[]; + /** Alternate TXT records visible for this hostname. */ + alternateTxtRecords?: string[]; +}; + +/** Container App Revision. */ +export type Revision = ProxyResource & { + /** + * Timestamp describing when the revision was created + * by controller + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly createdTime?: Date; + /** + * Fully qualified domain name of the revision + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly fqdn?: string; + /** + * Container App Revision Template with all possible settings and the + * defaults if user did not provide them. The defaults are populated + * as they were at the creation time + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly template?: Template; + /** + * Boolean describing if the Revision is Active + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly active?: boolean; + /** + * Number of pods currently running for this revision + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly replicas?: number; + /** + * Traffic weight assigned to this revision + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly trafficWeight?: number; + /** + * Optional Field - Platform Error Message + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningError?: string; + /** + * Current health State of the revision + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly healthState?: RevisionHealthState; + /** + * Current provisioning State of the revision + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: RevisionProvisioningState; +}; + +/** Container App Revision Replica. */ +export type Replica = ProxyResource & { + /** + * Timestamp describing when the pod was created by controller + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly createdTime?: Date; + /** The containers collection under a replica. */ + containers?: ReplicaContainer[]; +}; + +/** Dapr Component. */ +export type DaprComponent = ProxyResource & { + /** Component type */ + componentType?: string; + /** Component version */ + version?: string; + /** Boolean describing if the component errors are ignores */ + ignoreErrors?: boolean; + /** Initialization timeout */ + initTimeout?: string; + /** Collection of secrets used by a Dapr component */ + secrets?: Secret[]; + /** Component metadata */ + metadata?: DaprMetadata[]; + /** Names of container apps that can use this Dapr component */ + scopes?: string[]; +}; + +/** Storage resource for managedEnvironment. */ +export type ManagedEnvironmentStorage = ProxyResource & { + /** Storage properties */ + properties?: ManagedEnvironmentStorageProperties; +}; + +/** Container App SourceControl. */ +export type SourceControl = ProxyResource & { + /** + * Current provisioning State of the operation + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly operationState?: SourceControlOperationState; + /** The repo url which will be integrated to ContainerApp. */ + repoUrl?: string; + /** The branch which will trigger the auto deployment */ + branch?: string; + /** + * Container App Revision Template with all possible settings and the + * defaults if user did not provide them. The defaults are populated + * as they were at the creation time + */ + githubActionConfiguration?: GithubActionConfiguration; +}; + +/** Container App. */ +export type ContainerApp = TrackedResource & { + /** managed identities for the Container App to interact with other Azure services without maintaining any secrets or credentials in code. */ + identity?: ManagedServiceIdentity; + /** + * Provisioning state of the Container App. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ContainerAppProvisioningState; + /** Resource ID of the Container App's environment. */ + managedEnvironmentId?: string; + /** + * Name of the latest revision of the Container App. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly latestRevisionName?: string; + /** + * Fully Qualified Domain Name of the latest revision of the Container App. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly latestRevisionFqdn?: string; + /** + * Id used to verify domain name ownership + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly customDomainVerificationId?: string; + /** Non versioned Container App configuration properties. */ + configuration?: Configuration; + /** Container App versioned application definition. */ + template?: Template; + /** + * Outbound IP Addresses for container app. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly outboundIPAddresses?: string[]; +}; + +/** An environment for hosting container apps */ +export type ManagedEnvironment = TrackedResource & { + /** + * Provisioning state of the Environment. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: EnvironmentProvisioningState; + /** Azure Monitor instrumentation key used by Dapr to export Service to Service communication telemetry */ + daprAIInstrumentationKey?: string; + /** Application Insights connection string used by Dapr to export Service to Service communication telemetry */ + daprAIConnectionString?: string; + /** Vnet configuration for the environment */ + vnetConfiguration?: VnetConfiguration; + /** + * Any errors that occurred during deployment or deployment validation + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly deploymentErrors?: string; + /** + * Default Domain Name for the cluster + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly defaultDomain?: string; + /** + * Static IP of the Environment + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly staticIp?: string; + /** + * Cluster configuration which enables the log daemon to export + * app logs to a destination. Currently only "log-analytics" is + * supported + */ + appLogsConfiguration?: AppLogsConfiguration; + /** Whether or not this Managed Environment is zone-redundant. */ + zoneRedundant?: boolean; +}; + +/** Certificate used for Custom Domain bindings of Container Apps in a Managed Environment */ +export type Certificate = TrackedResource & { + /** Certificate resource specific properties */ + properties?: CertificateProperties; +}; + +/** Known values of {@link CreatedByType} that the service accepts. */ +export enum KnownCreatedByType { + User = "User", + Application = "Application", + ManagedIdentity = "ManagedIdentity", + Key = "Key" +} + +/** + * Defines values for CreatedByType. \ + * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **User** \ + * **Application** \ + * **ManagedIdentity** \ + * **Key** + */ +export type CreatedByType = string; + +/** Known values of {@link ManagedServiceIdentityType} that the service accepts. */ +export enum KnownManagedServiceIdentityType { + None = "None", + SystemAssigned = "SystemAssigned", + UserAssigned = "UserAssigned", + 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 = "InProgress", + Succeeded = "Succeeded", + Failed = "Failed", + Canceled = "Canceled" +} + +/** + * Defines values for ContainerAppProvisioningState. \ + * {@link KnownContainerAppProvisioningState} can be used interchangeably with ContainerAppProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **InProgress** \ + * **Succeeded** \ + * **Failed** \ + * **Canceled** + */ +export type ContainerAppProvisioningState = string; + +/** Known values of {@link ActiveRevisionsMode} that the service accepts. */ +export enum KnownActiveRevisionsMode { + Multiple = "Multiple", + Single = "Single" +} + +/** + * Defines values for ActiveRevisionsMode. \ + * {@link KnownActiveRevisionsMode} can be used interchangeably with ActiveRevisionsMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Multiple** \ + * **Single** + */ +export type ActiveRevisionsMode = string; + +/** Known values of {@link IngressTransportMethod} that the service accepts. */ +export enum KnownIngressTransportMethod { + Auto = "auto", + Http = "http", + Http2 = "http2" +} + +/** + * Defines values for IngressTransportMethod. \ + * {@link KnownIngressTransportMethod} can be used interchangeably with IngressTransportMethod, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **auto** \ + * **http** \ + * **http2** + */ +export type IngressTransportMethod = string; + +/** Known values of {@link BindingType} that the service accepts. */ +export enum KnownBindingType { + Disabled = "Disabled", + SniEnabled = "SniEnabled" +} + +/** + * Defines values for BindingType. \ + * {@link KnownBindingType} can be used interchangeably with BindingType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Disabled** \ + * **SniEnabled** + */ +export type BindingType = string; + +/** Known values of {@link AppProtocol} that the service accepts. */ +export enum KnownAppProtocol { + Http = "http", + Grpc = "grpc" +} + +/** + * Defines values for AppProtocol. \ + * {@link KnownAppProtocol} can be used interchangeably with AppProtocol, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **http** \ + * **grpc** + */ +export type AppProtocol = string; + +/** Known values of {@link Scheme} that the service accepts. */ +export enum KnownScheme { + Http = "HTTP", + Https = "HTTPS" +} + +/** + * Defines values for Scheme. \ + * {@link KnownScheme} can be used interchangeably with Scheme, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **HTTP** \ + * **HTTPS** + */ +export type Scheme = string; + +/** Known values of {@link Type} that the service accepts. */ +export enum KnownType { + Liveness = "Liveness", + Readiness = "Readiness", + Startup = "Startup" +} + +/** + * Defines values for Type. \ + * {@link KnownType} can be used interchangeably with Type, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Liveness** \ + * **Readiness** \ + * **Startup** + */ +export type Type = string; + +/** Known values of {@link StorageType} that the service accepts. */ +export enum KnownStorageType { + AzureFile = "AzureFile", + EmptyDir = "EmptyDir" +} + +/** + * Defines values for StorageType. \ + * {@link KnownStorageType} can be used interchangeably with StorageType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AzureFile** \ + * **EmptyDir** + */ +export type StorageType = string; + +/** Known values of {@link RevisionHealthState} that the service accepts. */ +export enum KnownRevisionHealthState { + Healthy = "Healthy", + Unhealthy = "Unhealthy", + None = "None" +} + +/** + * Defines values for RevisionHealthState. \ + * {@link KnownRevisionHealthState} can be used interchangeably with RevisionHealthState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Healthy** \ + * **Unhealthy** \ + * **None** + */ +export type RevisionHealthState = string; + +/** Known values of {@link RevisionProvisioningState} that the service accepts. */ +export enum KnownRevisionProvisioningState { + Provisioning = "Provisioning", + Provisioned = "Provisioned", + Failed = "Failed", + Deprovisioning = "Deprovisioning", + Deprovisioned = "Deprovisioned" +} + +/** + * Defines values for RevisionProvisioningState. \ + * {@link KnownRevisionProvisioningState} can be used interchangeably with RevisionProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Provisioning** \ + * **Provisioned** \ + * **Failed** \ + * **Deprovisioning** \ + * **Deprovisioned** + */ +export type RevisionProvisioningState = string; + +/** Known values of {@link EnvironmentProvisioningState} that the service accepts. */ +export enum KnownEnvironmentProvisioningState { + Succeeded = "Succeeded", + Failed = "Failed", + Canceled = "Canceled", + Waiting = "Waiting", + InitializationInProgress = "InitializationInProgress", + InfrastructureSetupInProgress = "InfrastructureSetupInProgress", + InfrastructureSetupComplete = "InfrastructureSetupComplete", + ScheduledForDelete = "ScheduledForDelete", + UpgradeRequested = "UpgradeRequested", + UpgradeFailed = "UpgradeFailed" +} + +/** + * Defines values for EnvironmentProvisioningState. \ + * {@link KnownEnvironmentProvisioningState} can be used interchangeably with EnvironmentProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Failed** \ + * **Canceled** \ + * **Waiting** \ + * **InitializationInProgress** \ + * **InfrastructureSetupInProgress** \ + * **InfrastructureSetupComplete** \ + * **ScheduledForDelete** \ + * **UpgradeRequested** \ + * **UpgradeFailed** + */ +export type EnvironmentProvisioningState = string; + +/** Known values of {@link CertificateProvisioningState} that the service accepts. */ +export enum KnownCertificateProvisioningState { + Succeeded = "Succeeded", + Failed = "Failed", + Canceled = "Canceled", + DeleteFailed = "DeleteFailed", + Pending = "Pending" +} + +/** + * Defines values for CertificateProvisioningState. \ + * {@link KnownCertificateProvisioningState} can be used interchangeably with CertificateProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Failed** \ + * **Canceled** \ + * **DeleteFailed** \ + * **Pending** + */ +export type CertificateProvisioningState = string; + +/** Known values of {@link CheckNameAvailabilityReason} that the service accepts. */ +export enum KnownCheckNameAvailabilityReason { + Invalid = "Invalid", + AlreadyExists = "AlreadyExists" +} + +/** + * Defines values for CheckNameAvailabilityReason. \ + * {@link KnownCheckNameAvailabilityReason} can be used interchangeably with CheckNameAvailabilityReason, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Invalid** \ + * **AlreadyExists** + */ +export type CheckNameAvailabilityReason = string; + +/** Known values of {@link AccessMode} that the service accepts. */ +export enum KnownAccessMode { + ReadOnly = "ReadOnly", + ReadWrite = "ReadWrite" +} + +/** + * Defines values for AccessMode. \ + * {@link KnownAccessMode} can be used interchangeably with AccessMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ReadOnly** \ + * **ReadWrite** + */ +export type AccessMode = string; + +/** Known values of {@link SourceControlOperationState} that the service accepts. */ +export enum KnownSourceControlOperationState { + InProgress = "InProgress", + Succeeded = "Succeeded", + Failed = "Failed", + 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 + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ContainerAppsAuthConfigsGetResponse = AuthConfig; + +/** Optional parameters. */ +export interface ContainerAppsAuthConfigsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type ContainerAppsAuthConfigsCreateOrUpdateResponse = AuthConfig; + +/** Optional parameters. */ +export interface ContainerAppsAuthConfigsDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface ContainerAppsAuthConfigsListByContainerAppNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByContainerAppNext operation. */ +export type ContainerAppsAuthConfigsListByContainerAppNextResponse = AuthConfigCollection; + +/** Optional parameters. */ +export interface ContainerAppsListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type ContainerAppsListBySubscriptionResponse = ContainerAppCollection; + +/** Optional parameters. */ +export interface ContainerAppsListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type ContainerAppsListByResourceGroupResponse = ContainerAppCollection; + +/** Optional parameters. */ +export interface ContainerAppsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ContainerAppsGetResponse = ContainerApp; + +/** Optional parameters. */ +export interface ContainerAppsCreateOrUpdateOptionalParams + 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 ContainerAppsCreateOrUpdateResponse = ContainerApp; + +/** Optional parameters. */ +export interface ContainerAppsDeleteOptionalParams + 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 ContainerAppsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface ContainerAppsListCustomHostNameAnalysisOptionalParams + extends coreClient.OperationOptions { + /** Custom hostname. */ + customHostname?: string; +} + +/** Contains response data for the listCustomHostNameAnalysis operation. */ +export type ContainerAppsListCustomHostNameAnalysisResponse = CustomHostnameAnalysisResult; + +/** Optional parameters. */ +export interface ContainerAppsListSecretsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listSecrets operation. */ +export type ContainerAppsListSecretsResponse = SecretsCollection; + +/** Optional parameters. */ +export interface ContainerAppsListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type ContainerAppsListBySubscriptionNextResponse = ContainerAppCollection; + +/** Optional parameters. */ +export interface ContainerAppsListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type ContainerAppsListByResourceGroupNextResponse = ContainerAppCollection; + +/** Optional parameters. */ +export interface ContainerAppsRevisionsListRevisionsOptionalParams + extends coreClient.OperationOptions { + /** The filter to apply on the operation. */ + filter?: string; +} + +/** Contains response data for the listRevisions operation. */ +export type ContainerAppsRevisionsListRevisionsResponse = RevisionCollection; + +/** Optional parameters. */ +export interface ContainerAppsRevisionsGetRevisionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getRevision operation. */ +export type ContainerAppsRevisionsGetRevisionResponse = Revision; + +/** Optional parameters. */ +export interface ContainerAppsRevisionsActivateRevisionOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface ContainerAppsRevisionsDeactivateRevisionOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface ContainerAppsRevisionsRestartRevisionOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface ContainerAppsRevisionsListRevisionsNextOptionalParams + extends coreClient.OperationOptions { + /** The filter to apply on the operation. */ + filter?: string; +} + +/** Contains response data for the listRevisionsNext operation. */ +export type ContainerAppsRevisionsListRevisionsNextResponse = RevisionCollection; + +/** Optional parameters. */ +export interface ContainerAppsRevisionReplicasGetReplicaOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getReplica operation. */ +export type ContainerAppsRevisionReplicasGetReplicaResponse = Replica; + +/** Optional parameters. */ +export interface ContainerAppsRevisionReplicasListReplicasOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listReplicas operation. */ +export type ContainerAppsRevisionReplicasListReplicasResponse = ReplicaCollection; + +/** Optional parameters. */ +export interface DaprComponentsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type DaprComponentsListResponse = DaprComponentsCollection; + +/** Optional parameters. */ +export interface DaprComponentsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type DaprComponentsGetResponse = DaprComponent; + +/** Optional parameters. */ +export interface DaprComponentsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type DaprComponentsCreateOrUpdateResponse = DaprComponent; + +/** Optional parameters. */ +export interface DaprComponentsDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface DaprComponentsListSecretsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listSecrets operation. */ +export type DaprComponentsListSecretsResponse = DaprSecretsCollection; + +/** Optional parameters. */ +export interface DaprComponentsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type DaprComponentsListNextResponse = DaprComponentsCollection; + +/** Optional parameters. */ +export interface OperationsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type OperationsListResponse = AvailableOperations; + +/** Optional parameters. */ +export interface OperationsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type OperationsListNextResponse = AvailableOperations; + +/** Optional parameters. */ +export interface ManagedEnvironmentsListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type ManagedEnvironmentsListBySubscriptionResponse = ManagedEnvironmentsCollection; + +/** Optional parameters. */ +export interface ManagedEnvironmentsListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type ManagedEnvironmentsListByResourceGroupResponse = ManagedEnvironmentsCollection; + +/** Optional parameters. */ +export interface ManagedEnvironmentsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ManagedEnvironmentsGetResponse = ManagedEnvironment; + +/** Optional parameters. */ +export interface ManagedEnvironmentsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type ManagedEnvironmentsCreateOrUpdateResponse = ManagedEnvironment; + +/** Optional parameters. */ +export interface ManagedEnvironmentsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface ManagedEnvironmentsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface ManagedEnvironmentsListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type ManagedEnvironmentsListBySubscriptionNextResponse = ManagedEnvironmentsCollection; + +/** Optional parameters. */ +export interface ManagedEnvironmentsListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type ManagedEnvironmentsListByResourceGroupNextResponse = ManagedEnvironmentsCollection; + +/** Optional parameters. */ +export interface CertificatesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type CertificatesListResponse = CertificateCollection; + +/** Optional parameters. */ +export interface CertificatesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type CertificatesGetResponse = Certificate; + +/** Optional parameters. */ +export interface CertificatesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Certificate to be created or updated */ + certificateEnvelope?: Certificate; +} + +/** Contains response data for the createOrUpdate operation. */ +export type CertificatesCreateOrUpdateResponse = Certificate; + +/** Optional parameters. */ +export interface CertificatesDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface CertificatesUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the update operation. */ +export type CertificatesUpdateResponse = Certificate; + +/** Optional parameters. */ +export interface CertificatesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type CertificatesListNextResponse = CertificateCollection; + +/** Optional parameters. */ +export interface NamespacesCheckNameAvailabilityOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the checkNameAvailability operation. */ +export type NamespacesCheckNameAvailabilityResponse = CheckNameAvailabilityResponse; + +/** Optional parameters. */ +export interface ManagedEnvironmentsStoragesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type ManagedEnvironmentsStoragesListResponse = ManagedEnvironmentStoragesCollection; + +/** Optional parameters. */ +export interface ManagedEnvironmentsStoragesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ManagedEnvironmentsStoragesGetResponse = ManagedEnvironmentStorage; + +/** Optional parameters. */ +export interface ManagedEnvironmentsStoragesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type ManagedEnvironmentsStoragesCreateOrUpdateResponse = ManagedEnvironmentStorage; + +/** Optional parameters. */ +export interface ManagedEnvironmentsStoragesDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface ContainerAppsSourceControlsListByContainerAppOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByContainerApp operation. */ +export type ContainerAppsSourceControlsListByContainerAppResponse = SourceControlCollection; + +/** Optional parameters. */ +export interface ContainerAppsSourceControlsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ContainerAppsSourceControlsGetResponse = SourceControl; + +/** Optional parameters. */ +export interface ContainerAppsSourceControlsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type ContainerAppsSourceControlsCreateOrUpdateResponse = SourceControl; + +/** Optional parameters. */ +export interface ContainerAppsSourceControlsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface ContainerAppsSourceControlsListByContainerAppNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByContainerAppNext operation. */ +export type ContainerAppsSourceControlsListByContainerAppNextResponse = SourceControlCollection; + +/** Optional parameters. */ +export interface ContainerAppsAPIClientOptionalParams + extends coreClient.ServiceClientOptions { + /** server parameter */ + $host?: string; + /** Api Version */ + apiVersion?: string; + /** Overrides client endpoint. */ + endpoint?: string; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/models/mappers.ts b/sdk/appcontainers/arm-appcontainers/src/models/mappers.ts new file mode 100644 index 000000000000..e3c31995385f --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/models/mappers.ts @@ -0,0 +1,3538 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 * as coreClient from "@azure/core-client"; + +export const AuthConfigCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AuthConfigCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AuthConfig" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const AuthPlatform: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AuthPlatform", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + runtimeVersion: { + serializedName: "runtimeVersion", + type: { + name: "String" + } + } + } + } +}; + +export const GlobalValidation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GlobalValidation", + modelProperties: { + unauthenticatedClientAction: { + serializedName: "unauthenticatedClientAction", + type: { + name: "Enum", + allowedValues: [ + "RedirectToLoginPage", + "AllowAnonymous", + "Return401", + "Return403" + ] + } + }, + redirectToProvider: { + serializedName: "redirectToProvider", + type: { + name: "String" + } + }, + excludedPaths: { + serializedName: "excludedPaths", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const IdentityProviders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IdentityProviders", + modelProperties: { + azureActiveDirectory: { + serializedName: "azureActiveDirectory", + type: { + name: "Composite", + className: "AzureActiveDirectory" + } + }, + facebook: { + serializedName: "facebook", + type: { + name: "Composite", + className: "Facebook" + } + }, + gitHub: { + serializedName: "gitHub", + type: { + name: "Composite", + className: "GitHub" + } + }, + google: { + serializedName: "google", + type: { + name: "Composite", + className: "Google" + } + }, + twitter: { + serializedName: "twitter", + type: { + name: "Composite", + className: "Twitter" + } + }, + apple: { + serializedName: "apple", + type: { + name: "Composite", + className: "Apple" + } + }, + azureStaticWebApps: { + serializedName: "azureStaticWebApps", + type: { + name: "Composite", + className: "AzureStaticWebApps" + } + }, + customOpenIdConnectProviders: { + serializedName: "customOpenIdConnectProviders", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "CustomOpenIdConnectProvider" + } + } + } + } + } + } +}; + +export const AzureActiveDirectory: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AzureActiveDirectory", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + registration: { + serializedName: "registration", + type: { + name: "Composite", + className: "AzureActiveDirectoryRegistration" + } + }, + login: { + serializedName: "login", + type: { + name: "Composite", + className: "AzureActiveDirectoryLogin" + } + }, + validation: { + serializedName: "validation", + type: { + name: "Composite", + className: "AzureActiveDirectoryValidation" + } + }, + isAutoProvisioned: { + serializedName: "isAutoProvisioned", + type: { + name: "Boolean" + } + } + } + } +}; + +export const AzureActiveDirectoryRegistration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AzureActiveDirectoryRegistration", + modelProperties: { + openIdIssuer: { + serializedName: "openIdIssuer", + type: { + name: "String" + } + }, + clientId: { + serializedName: "clientId", + type: { + name: "String" + } + }, + clientSecretSettingName: { + serializedName: "clientSecretSettingName", + type: { + name: "String" + } + }, + clientSecretCertificateThumbprint: { + serializedName: "clientSecretCertificateThumbprint", + type: { + name: "String" + } + }, + clientSecretCertificateSubjectAlternativeName: { + serializedName: "clientSecretCertificateSubjectAlternativeName", + type: { + name: "String" + } + }, + clientSecretCertificateIssuer: { + serializedName: "clientSecretCertificateIssuer", + type: { + name: "String" + } + } + } + } +}; + +export const AzureActiveDirectoryLogin: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AzureActiveDirectoryLogin", + modelProperties: { + loginParameters: { + serializedName: "loginParameters", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + disableWWWAuthenticate: { + serializedName: "disableWWWAuthenticate", + type: { + name: "Boolean" + } + } + } + } +}; + +export const AzureActiveDirectoryValidation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AzureActiveDirectoryValidation", + modelProperties: { + jwtClaimChecks: { + serializedName: "jwtClaimChecks", + type: { + name: "Composite", + className: "JwtClaimChecks" + } + }, + allowedAudiences: { + serializedName: "allowedAudiences", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + defaultAuthorizationPolicy: { + serializedName: "defaultAuthorizationPolicy", + type: { + name: "Composite", + className: "DefaultAuthorizationPolicy" + } + } + } + } +}; + +export const JwtClaimChecks: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JwtClaimChecks", + modelProperties: { + allowedGroups: { + serializedName: "allowedGroups", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + allowedClientApplications: { + serializedName: "allowedClientApplications", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DefaultAuthorizationPolicy: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DefaultAuthorizationPolicy", + modelProperties: { + allowedPrincipals: { + serializedName: "allowedPrincipals", + type: { + name: "Composite", + className: "AllowedPrincipals" + } + }, + allowedApplications: { + serializedName: "allowedApplications", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const AllowedPrincipals: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AllowedPrincipals", + modelProperties: { + groups: { + serializedName: "groups", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + identities: { + serializedName: "identities", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const Facebook: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Facebook", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + registration: { + serializedName: "registration", + type: { + name: "Composite", + className: "AppRegistration" + } + }, + graphApiVersion: { + serializedName: "graphApiVersion", + type: { + name: "String" + } + }, + login: { + serializedName: "login", + type: { + name: "Composite", + className: "LoginScopes" + } + } + } + } +}; + +export const AppRegistration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AppRegistration", + modelProperties: { + appId: { + serializedName: "appId", + type: { + name: "String" + } + }, + appSecretSettingName: { + serializedName: "appSecretSettingName", + type: { + name: "String" + } + } + } + } +}; + +export const LoginScopes: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LoginScopes", + modelProperties: { + scopes: { + serializedName: "scopes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const GitHub: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GitHub", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + registration: { + serializedName: "registration", + type: { + name: "Composite", + className: "ClientRegistration" + } + }, + login: { + serializedName: "login", + type: { + name: "Composite", + className: "LoginScopes" + } + } + } + } +}; + +export const ClientRegistration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClientRegistration", + modelProperties: { + clientId: { + serializedName: "clientId", + type: { + name: "String" + } + }, + clientSecretSettingName: { + serializedName: "clientSecretSettingName", + type: { + name: "String" + } + } + } + } +}; + +export const Google: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Google", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + registration: { + serializedName: "registration", + type: { + name: "Composite", + className: "ClientRegistration" + } + }, + login: { + serializedName: "login", + type: { + name: "Composite", + className: "LoginScopes" + } + }, + validation: { + serializedName: "validation", + type: { + name: "Composite", + className: "AllowedAudiencesValidation" + } + } + } + } +}; + +export const AllowedAudiencesValidation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AllowedAudiencesValidation", + modelProperties: { + allowedAudiences: { + serializedName: "allowedAudiences", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const Twitter: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Twitter", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + registration: { + serializedName: "registration", + type: { + name: "Composite", + className: "TwitterRegistration" + } + } + } + } +}; + +export const TwitterRegistration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TwitterRegistration", + modelProperties: { + consumerKey: { + serializedName: "consumerKey", + type: { + name: "String" + } + }, + consumerSecretSettingName: { + serializedName: "consumerSecretSettingName", + type: { + name: "String" + } + } + } + } +}; + +export const Apple: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Apple", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + registration: { + serializedName: "registration", + type: { + name: "Composite", + className: "AppleRegistration" + } + }, + login: { + serializedName: "login", + type: { + name: "Composite", + className: "LoginScopes" + } + } + } + } +}; + +export const AppleRegistration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AppleRegistration", + modelProperties: { + clientId: { + serializedName: "clientId", + type: { + name: "String" + } + }, + clientSecretSettingName: { + serializedName: "clientSecretSettingName", + type: { + name: "String" + } + } + } + } +}; + +export const AzureStaticWebApps: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AzureStaticWebApps", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + registration: { + serializedName: "registration", + type: { + name: "Composite", + className: "AzureStaticWebAppsRegistration" + } + } + } + } +}; + +export const AzureStaticWebAppsRegistration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AzureStaticWebAppsRegistration", + modelProperties: { + clientId: { + serializedName: "clientId", + type: { + name: "String" + } + } + } + } +}; + +export const CustomOpenIdConnectProvider: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CustomOpenIdConnectProvider", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + registration: { + serializedName: "registration", + type: { + name: "Composite", + className: "OpenIdConnectRegistration" + } + }, + login: { + serializedName: "login", + type: { + name: "Composite", + className: "OpenIdConnectLogin" + } + } + } + } +}; + +export const OpenIdConnectRegistration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OpenIdConnectRegistration", + modelProperties: { + clientId: { + serializedName: "clientId", + type: { + name: "String" + } + }, + clientCredential: { + serializedName: "clientCredential", + type: { + name: "Composite", + className: "OpenIdConnectClientCredential" + } + }, + openIdConnectConfiguration: { + serializedName: "openIdConnectConfiguration", + type: { + name: "Composite", + className: "OpenIdConnectConfig" + } + } + } + } +}; + +export const OpenIdConnectClientCredential: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OpenIdConnectClientCredential", + modelProperties: { + method: { + defaultValue: "ClientSecretPost", + isConstant: true, + serializedName: "method", + type: { + name: "String" + } + }, + clientSecretSettingName: { + serializedName: "clientSecretSettingName", + type: { + name: "String" + } + } + } + } +}; + +export const OpenIdConnectConfig: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OpenIdConnectConfig", + modelProperties: { + authorizationEndpoint: { + serializedName: "authorizationEndpoint", + type: { + name: "String" + } + }, + tokenEndpoint: { + serializedName: "tokenEndpoint", + type: { + name: "String" + } + }, + issuer: { + serializedName: "issuer", + type: { + name: "String" + } + }, + certificationUri: { + serializedName: "certificationUri", + type: { + name: "String" + } + }, + wellKnownOpenIdConfiguration: { + serializedName: "wellKnownOpenIdConfiguration", + type: { + name: "String" + } + } + } + } +}; + +export const OpenIdConnectLogin: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OpenIdConnectLogin", + modelProperties: { + nameClaimType: { + serializedName: "nameClaimType", + type: { + name: "String" + } + }, + scopes: { + serializedName: "scopes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const Login: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Login", + modelProperties: { + routes: { + serializedName: "routes", + type: { + name: "Composite", + className: "LoginRoutes" + } + }, + preserveUrlFragmentsForLogins: { + serializedName: "preserveUrlFragmentsForLogins", + type: { + name: "Boolean" + } + }, + allowedExternalRedirectUrls: { + serializedName: "allowedExternalRedirectUrls", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + cookieExpiration: { + serializedName: "cookieExpiration", + type: { + name: "Composite", + className: "CookieExpiration" + } + }, + nonce: { + serializedName: "nonce", + type: { + name: "Composite", + className: "Nonce" + } + } + } + } +}; + +export const LoginRoutes: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LoginRoutes", + modelProperties: { + logoutEndpoint: { + serializedName: "logoutEndpoint", + type: { + name: "String" + } + } + } + } +}; + +export const CookieExpiration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CookieExpiration", + modelProperties: { + convention: { + serializedName: "convention", + type: { + name: "Enum", + allowedValues: ["FixedTime", "IdentityProviderDerived"] + } + }, + timeToExpiration: { + serializedName: "timeToExpiration", + type: { + name: "String" + } + } + } + } +}; + +export const Nonce: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Nonce", + modelProperties: { + validateNonce: { + serializedName: "validateNonce", + type: { + name: "Boolean" + } + }, + nonceExpirationInterval: { + serializedName: "nonceExpirationInterval", + type: { + name: "String" + } + } + } + } +}; + +export const HttpSettings: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HttpSettings", + modelProperties: { + requireHttps: { + serializedName: "requireHttps", + type: { + name: "Boolean" + } + }, + routes: { + serializedName: "routes", + type: { + name: "Composite", + className: "HttpSettingsRoutes" + } + }, + forwardProxy: { + serializedName: "forwardProxy", + type: { + name: "Composite", + className: "ForwardProxy" + } + } + } + } +}; + +export const HttpSettingsRoutes: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HttpSettingsRoutes", + modelProperties: { + apiPrefix: { + serializedName: "apiPrefix", + type: { + name: "String" + } + } + } + } +}; + +export const ForwardProxy: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ForwardProxy", + modelProperties: { + convention: { + serializedName: "convention", + type: { + name: "Enum", + allowedValues: ["NoProxy", "Standard", "Custom"] + } + }, + customHostHeaderName: { + serializedName: "customHostHeaderName", + type: { + name: "String" + } + }, + customProtoHeaderName: { + serializedName: "customProtoHeaderName", + type: { + name: "String" + } + } + } + } +}; + +export const Resource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + } + } + } +}; + +export const SystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String" + } + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } + } + } + } +}; + +export const DefaultErrorResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DefaultErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "DefaultErrorResponseError" + } + } + } + } +}; + +export const DefaultErrorResponseError: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DefaultErrorResponseError", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String" + } + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String" + } + }, + details: { + serializedName: "details", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DefaultErrorResponseErrorDetailsItem" + } + } + } + }, + innererror: { + serializedName: "innererror", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const DefaultErrorResponseErrorDetailsItem: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DefaultErrorResponseErrorDetailsItem", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String" + } + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const 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 ManagedServiceIdentity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedServiceIdentity", + modelProperties: { + principalId: { + serializedName: "principalId", + readOnly: true, + type: { + name: "Uuid" + } + }, + tenantId: { + serializedName: "tenantId", + readOnly: true, + type: { + name: "Uuid" + } + }, + type: { + serializedName: "type", + required: true, + type: { + name: "String" + } + }, + userAssignedIdentities: { + serializedName: "userAssignedIdentities", + type: { + name: "Dictionary", + value: { + type: { name: "Composite", className: "UserAssignedIdentity" } + } + } + } + } + } +}; + +export const UserAssignedIdentity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UserAssignedIdentity", + modelProperties: { + principalId: { + serializedName: "principalId", + readOnly: true, + type: { + name: "Uuid" + } + }, + clientId: { + serializedName: "clientId", + 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" + } + } + } + }, + activeRevisionsMode: { + 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" + } + } + } + }, + dapr: { + serializedName: "dapr", + type: { + name: "Composite", + className: "Dapr" + } + } + } + } +}; + +export const Secret: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Secret", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "String" + } + } + } + } +}; + +export const Ingress: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Ingress", + modelProperties: { + fqdn: { + serializedName: "fqdn", + readOnly: true, + type: { + name: "String" + } + }, + external: { + defaultValue: false, + serializedName: "external", + type: { + name: "Boolean" + } + }, + targetPort: { + serializedName: "targetPort", + type: { + name: "Number" + } + }, + transport: { + serializedName: "transport", + type: { + name: "String" + } + }, + traffic: { + serializedName: "traffic", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TrafficWeight" + } + } + } + }, + customDomains: { + serializedName: "customDomains", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CustomDomain" + } + } + } + }, + allowInsecure: { + serializedName: "allowInsecure", + type: { + name: "Boolean" + } + } + } + } +}; + +export const TrafficWeight: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrafficWeight", + modelProperties: { + revisionName: { + serializedName: "revisionName", + type: { + name: "String" + } + }, + weight: { + serializedName: "weight", + type: { + name: "Number" + } + }, + latestRevision: { + defaultValue: false, + serializedName: "latestRevision", + type: { + name: "Boolean" + } + }, + label: { + serializedName: "label", + type: { + name: "String" + } + } + } + } +}; + +export const CustomDomain: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CustomDomain", + modelProperties: { + name: { + serializedName: "name", + required: true, + type: { + name: "String" + } + }, + bindingType: { + serializedName: "bindingType", + type: { + name: "String" + } + }, + certificateId: { + serializedName: "certificateId", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const RegistryCredentials: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RegistryCredentials", + modelProperties: { + server: { + serializedName: "server", + type: { + name: "String" + } + }, + username: { + serializedName: "username", + type: { + name: "String" + } + }, + passwordSecretRef: { + serializedName: "passwordSecretRef", + type: { + name: "String" + } + }, + identity: { + serializedName: "identity", + type: { + name: "String" + } + } + } + } +}; + +export const Dapr: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Dapr", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + appId: { + serializedName: "appId", + type: { + name: "String" + } + }, + appProtocol: { + serializedName: "appProtocol", + type: { + name: "String" + } + }, + appPort: { + serializedName: "appPort", + type: { + name: "Number" + } + } + } + } +}; + +export const Template: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Template", + modelProperties: { + revisionSuffix: { + serializedName: "revisionSuffix", + type: { + name: "String" + } + }, + containers: { + serializedName: "containers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Container" + } + } + } + }, + scale: { + serializedName: "scale", + type: { + name: "Composite", + className: "Scale" + } + }, + volumes: { + serializedName: "volumes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Volume" + } + } + } + } + } + } +}; + +export const Container: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Container", + modelProperties: { + image: { + serializedName: "image", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + command: { + serializedName: "command", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + args: { + serializedName: "args", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + env: { + serializedName: "env", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EnvironmentVar" + } + } + } + }, + resources: { + serializedName: "resources", + type: { + name: "Composite", + className: "ContainerResources" + } + }, + probes: { + serializedName: "probes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContainerAppProbe" + } + } + } + }, + volumeMounts: { + serializedName: "volumeMounts", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VolumeMount" + } + } + } + } + } + } +}; + +export const EnvironmentVar: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EnvironmentVar", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "String" + } + }, + secretRef: { + serializedName: "secretRef", + type: { + name: "String" + } + } + } + } +}; + +export const ContainerResources: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerResources", + modelProperties: { + cpu: { + serializedName: "cpu", + type: { + name: "Number" + } + }, + memory: { + serializedName: "memory", + type: { + name: "String" + } + }, + ephemeralStorage: { + serializedName: "ephemeralStorage", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ContainerAppProbe: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerAppProbe", + modelProperties: { + failureThreshold: { + serializedName: "failureThreshold", + type: { + name: "Number" + } + }, + httpGet: { + serializedName: "httpGet", + type: { + name: "Composite", + className: "ContainerAppProbeHttpGet" + } + }, + initialDelaySeconds: { + serializedName: "initialDelaySeconds", + type: { + name: "Number" + } + }, + periodSeconds: { + serializedName: "periodSeconds", + type: { + name: "Number" + } + }, + successThreshold: { + serializedName: "successThreshold", + type: { + name: "Number" + } + }, + tcpSocket: { + serializedName: "tcpSocket", + type: { + name: "Composite", + className: "ContainerAppProbeTcpSocket" + } + }, + terminationGracePeriodSeconds: { + serializedName: "terminationGracePeriodSeconds", + type: { + name: "Number" + } + }, + timeoutSeconds: { + serializedName: "timeoutSeconds", + type: { + name: "Number" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const ContainerAppProbeHttpGet: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerAppProbeHttpGet", + modelProperties: { + host: { + serializedName: "host", + type: { + name: "String" + } + }, + httpHeaders: { + serializedName: "httpHeaders", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContainerAppProbeHttpGetHttpHeadersItem" + } + } + } + }, + path: { + serializedName: "path", + type: { + name: "String" + } + }, + port: { + serializedName: "port", + required: true, + type: { + name: "Number" + } + }, + scheme: { + serializedName: "scheme", + type: { + name: "String" + } + } + } + } +}; + +export const ContainerAppProbeHttpGetHttpHeadersItem: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerAppProbeHttpGetHttpHeadersItem", + modelProperties: { + name: { + serializedName: "name", + required: true, + type: { + name: "String" + } + }, + value: { + serializedName: "value", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ContainerAppProbeTcpSocket: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerAppProbeTcpSocket", + modelProperties: { + host: { + serializedName: "host", + type: { + name: "String" + } + }, + port: { + serializedName: "port", + required: true, + type: { + name: "Number" + } + } + } + } +}; + +export const VolumeMount: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VolumeMount", + modelProperties: { + volumeName: { + serializedName: "volumeName", + type: { + name: "String" + } + }, + mountPath: { + serializedName: "mountPath", + type: { + name: "String" + } + } + } + } +}; + +export const Scale: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Scale", + modelProperties: { + minReplicas: { + serializedName: "minReplicas", + type: { + name: "Number" + } + }, + maxReplicas: { + serializedName: "maxReplicas", + type: { + name: "Number" + } + }, + rules: { + serializedName: "rules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScaleRule" + } + } + } + } + } + } +}; + +export const ScaleRule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ScaleRule", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + azureQueue: { + serializedName: "azureQueue", + type: { + name: "Composite", + className: "QueueScaleRule" + } + }, + custom: { + serializedName: "custom", + type: { + name: "Composite", + className: "CustomScaleRule" + } + }, + http: { + serializedName: "http", + type: { + name: "Composite", + className: "HttpScaleRule" + } + } + } + } +}; + +export const QueueScaleRule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "QueueScaleRule", + modelProperties: { + queueName: { + serializedName: "queueName", + type: { + name: "String" + } + }, + queueLength: { + serializedName: "queueLength", + type: { + name: "Number" + } + }, + auth: { + serializedName: "auth", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScaleRuleAuth" + } + } + } + } + } + } +}; + +export const ScaleRuleAuth: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ScaleRuleAuth", + modelProperties: { + secretRef: { + serializedName: "secretRef", + type: { + name: "String" + } + }, + triggerParameter: { + serializedName: "triggerParameter", + type: { + name: "String" + } + } + } + } +}; + +export const CustomScaleRule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CustomScaleRule", + modelProperties: { + type: { + serializedName: "type", + type: { + name: "String" + } + }, + metadata: { + serializedName: "metadata", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + auth: { + serializedName: "auth", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScaleRuleAuth" + } + } + } + } + } + } +}; + +export const HttpScaleRule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HttpScaleRule", + modelProperties: { + metadata: { + serializedName: "metadata", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + auth: { + serializedName: "auth", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScaleRuleAuth" + } + } + } + } + } + } +}; + +export const Volume: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Volume", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + storageType: { + serializedName: "storageType", + type: { + name: "String" + } + }, + storageName: { + serializedName: "storageName", + type: { + name: "String" + } + } + } + } +}; + +export const SecretsCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SecretsCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContainerAppSecret" + } + } + } + } + } + } +}; + +export const ContainerAppSecret: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerAppSecret", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + value: { + serializedName: "value", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const RevisionCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RevisionCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Revision" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ReplicaContainer: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ReplicaContainer", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + containerId: { + serializedName: "containerId", + type: { + name: "String" + } + }, + ready: { + serializedName: "ready", + type: { + name: "Boolean" + } + }, + started: { + serializedName: "started", + type: { + name: "Boolean" + } + }, + restartCount: { + serializedName: "restartCount", + type: { + name: "Number" + } + } + } + } +}; + +export const ReplicaCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ReplicaCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Replica" + } + } + } + } + } + } +}; + +export const 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 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: "Secret" + } + } + } + } + } + } +}; + +export const AvailableOperations: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AvailableOperations", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OperationDetail" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const OperationDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationDetail", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + isDataAction: { + serializedName: "isDataAction", + type: { + name: "Boolean" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + }, + origin: { + serializedName: "origin", + type: { + name: "String" + } + } + } + } +}; + +export const OperationDisplay: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + serializedName: "provider", + type: { + name: "String" + } + }, + resource: { + serializedName: "resource", + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const ManagedEnvironmentsCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedEnvironmentsCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedEnvironment" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const VnetConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VnetConfiguration", + modelProperties: { + internal: { + serializedName: "internal", + type: { + name: "Boolean" + } + }, + infrastructureSubnetId: { + serializedName: "infrastructureSubnetId", + type: { + name: "String" + } + }, + runtimeSubnetId: { + serializedName: "runtimeSubnetId", + type: { + name: "String" + } + }, + dockerBridgeCidr: { + serializedName: "dockerBridgeCidr", + type: { + name: "String" + } + }, + platformReservedCidr: { + serializedName: "platformReservedCidr", + type: { + name: "String" + } + }, + platformReservedDnsIP: { + serializedName: "platformReservedDnsIP", + type: { + name: "String" + } + } + } + } +}; + +export const AppLogsConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AppLogsConfiguration", + modelProperties: { + destination: { + serializedName: "destination", + type: { + name: "String" + } + }, + logAnalyticsConfiguration: { + serializedName: "logAnalyticsConfiguration", + type: { + name: "Composite", + className: "LogAnalyticsConfiguration" + } + } + } + } +}; + +export const LogAnalyticsConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LogAnalyticsConfiguration", + modelProperties: { + customerId: { + serializedName: "customerId", + type: { + name: "String" + } + }, + sharedKey: { + serializedName: "sharedKey", + type: { + name: "String" + } + } + } + } +}; + +export const CertificateCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CertificateCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Certificate" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const CertificateProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CertificateProperties", + modelProperties: { + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + password: { + serializedName: "password", + type: { + name: "String" + } + }, + subjectName: { + serializedName: "subjectName", + readOnly: true, + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "ByteArray" + } + }, + issuer: { + serializedName: "issuer", + readOnly: true, + type: { + name: "String" + } + }, + issueDate: { + serializedName: "issueDate", + readOnly: true, + type: { + name: "DateTime" + } + }, + expirationDate: { + serializedName: "expirationDate", + readOnly: true, + type: { + name: "DateTime" + } + }, + thumbprint: { + serializedName: "thumbprint", + readOnly: true, + type: { + name: "String" + } + }, + valid: { + serializedName: "valid", + readOnly: true, + type: { + name: "Boolean" + } + }, + publicKeyHash: { + serializedName: "publicKeyHash", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const CertificatePatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CertificatePatch", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const CheckNameAvailabilityRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CheckNameAvailabilityRequest", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const CheckNameAvailabilityResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CheckNameAvailabilityResponse", + modelProperties: { + nameAvailable: { + serializedName: "nameAvailable", + type: { + name: "Boolean" + } + }, + reason: { + serializedName: "reason", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const ManagedEnvironmentStoragesCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedEnvironmentStoragesCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedEnvironmentStorage" + } + } + } + } + } + } +}; + +export const ManagedEnvironmentStorageProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedEnvironmentStorageProperties", + modelProperties: { + azureFile: { + serializedName: "azureFile", + type: { + name: "Composite", + className: "AzureFileProperties" + } + } + } + } +}; + +export const AzureFileProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AzureFileProperties", + modelProperties: { + accountName: { + serializedName: "accountName", + type: { + name: "String" + } + }, + accountKey: { + serializedName: "accountKey", + type: { + name: "String" + } + }, + accessMode: { + serializedName: "accessMode", + type: { + name: "String" + } + }, + shareName: { + serializedName: "shareName", + type: { + name: "String" + } + } + } + } +}; + +export const SourceControlCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SourceControlCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SourceControl" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const GithubActionConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GithubActionConfiguration", + modelProperties: { + registryInfo: { + serializedName: "registryInfo", + type: { + name: "Composite", + className: "RegistryInfo" + } + }, + azureCredentials: { + serializedName: "azureCredentials", + type: { + name: "Composite", + className: "AzureCredentials" + } + }, + contextPath: { + serializedName: "contextPath", + type: { + name: "String" + } + }, + image: { + serializedName: "image", + type: { + name: "String" + } + }, + publishType: { + serializedName: "publishType", + type: { + name: "String" + } + }, + os: { + serializedName: "os", + type: { + name: "String" + } + }, + runtimeStack: { + serializedName: "runtimeStack", + type: { + name: "String" + } + }, + runtimeVersion: { + serializedName: "runtimeVersion", + type: { + name: "String" + } + } + } + } +}; + +export const RegistryInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RegistryInfo", + modelProperties: { + registryUrl: { + serializedName: "registryUrl", + type: { + name: "String" + } + }, + registryUserName: { + serializedName: "registryUserName", + type: { + name: "String" + } + }, + registryPassword: { + serializedName: "registryPassword", + type: { + name: "String" + } + } + } + } +}; + +export const AzureCredentials: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AzureCredentials", + modelProperties: { + clientId: { + serializedName: "clientId", + type: { + name: "String" + } + }, + clientSecret: { + serializedName: "clientSecret", + type: { + name: "String" + } + }, + tenantId: { + serializedName: "tenantId", + type: { + name: "String" + } + }, + subscriptionId: { + serializedName: "subscriptionId", + type: { + name: "String" + } + } + } + } +}; + +export const ProxyResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + +export const TrackedResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + location: { + serializedName: "location", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const AuthConfig: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AuthConfig", + modelProperties: { + ...ProxyResource.type.modelProperties, + platform: { + serializedName: "properties.platform", + type: { + name: "Composite", + className: "AuthPlatform" + } + }, + globalValidation: { + serializedName: "properties.globalValidation", + type: { + name: "Composite", + className: "GlobalValidation" + } + }, + identityProviders: { + serializedName: "properties.identityProviders", + type: { + name: "Composite", + className: "IdentityProviders" + } + }, + login: { + serializedName: "properties.login", + type: { + name: "Composite", + className: "Login" + } + }, + httpSettings: { + serializedName: "properties.httpSettings", + type: { + name: "Composite", + className: "HttpSettings" + } + } + } + } +}; + +export const CustomHostnameAnalysisResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CustomHostnameAnalysisResult", + modelProperties: { + ...ProxyResource.type.modelProperties, + hostName: { + serializedName: "properties.hostName", + readOnly: true, + type: { + name: "String" + } + }, + isHostnameAlreadyVerified: { + serializedName: "properties.isHostnameAlreadyVerified", + readOnly: true, + type: { + name: "Boolean" + } + }, + customDomainVerificationTest: { + serializedName: "properties.customDomainVerificationTest", + readOnly: true, + type: { + name: "Enum", + allowedValues: ["Passed", "Failed", "Skipped"] + } + }, + customDomainVerificationFailureInfo: { + serializedName: "properties.customDomainVerificationFailureInfo", + type: { + name: "Composite", + className: "DefaultErrorResponse" + } + }, + hasConflictOnManagedEnvironment: { + serializedName: "properties.hasConflictOnManagedEnvironment", + readOnly: true, + type: { + name: "Boolean" + } + }, + conflictingContainerAppResourceId: { + serializedName: "properties.conflictingContainerAppResourceId", + readOnly: true, + type: { + name: "String" + } + }, + cNameRecords: { + serializedName: "properties.cNameRecords", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + txtRecords: { + serializedName: "properties.txtRecords", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + aRecords: { + serializedName: "properties.aRecords", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + alternateCNameRecords: { + serializedName: "properties.alternateCNameRecords", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + alternateTxtRecords: { + serializedName: "properties.alternateTxtRecords", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const Revision: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Revision", + modelProperties: { + ...ProxyResource.type.modelProperties, + createdTime: { + serializedName: "properties.createdTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + fqdn: { + serializedName: "properties.fqdn", + readOnly: true, + type: { + name: "String" + } + }, + template: { + serializedName: "properties.template", + type: { + name: "Composite", + className: "Template" + } + }, + active: { + serializedName: "properties.active", + readOnly: true, + type: { + name: "Boolean" + } + }, + replicas: { + serializedName: "properties.replicas", + readOnly: true, + type: { + name: "Number" + } + }, + trafficWeight: { + serializedName: "properties.trafficWeight", + readOnly: true, + type: { + name: "Number" + } + }, + provisioningError: { + serializedName: "properties.provisioningError", + readOnly: true, + type: { + name: "String" + } + }, + healthState: { + serializedName: "properties.healthState", + readOnly: true, + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const Replica: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Replica", + modelProperties: { + ...ProxyResource.type.modelProperties, + createdTime: { + serializedName: "properties.createdTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + containers: { + serializedName: "properties.containers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReplicaContainer" + } + } + } + } + } + } +}; + +export const DaprComponent: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DaprComponent", + modelProperties: { + ...ProxyResource.type.modelProperties, + componentType: { + serializedName: "properties.componentType", + type: { + name: "String" + } + }, + version: { + serializedName: "properties.version", + type: { + name: "String" + } + }, + ignoreErrors: { + serializedName: "properties.ignoreErrors", + type: { + name: "Boolean" + } + }, + initTimeout: { + serializedName: "properties.initTimeout", + type: { + name: "String" + } + }, + secrets: { + serializedName: "properties.secrets", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Secret" + } + } + } + }, + metadata: { + serializedName: "properties.metadata", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DaprMetadata" + } + } + } + }, + scopes: { + serializedName: "properties.scopes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const ManagedEnvironmentStorage: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedEnvironmentStorage", + modelProperties: { + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ManagedEnvironmentStorageProperties" + } + } + } + } +}; + +export const SourceControl: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SourceControl", + modelProperties: { + ...ProxyResource.type.modelProperties, + operationState: { + serializedName: "properties.operationState", + readOnly: true, + type: { + name: "String" + } + }, + repoUrl: { + serializedName: "properties.repoUrl", + type: { + name: "String" + } + }, + branch: { + serializedName: "properties.branch", + type: { + name: "String" + } + }, + githubActionConfiguration: { + serializedName: "properties.githubActionConfiguration", + type: { + name: "Composite", + className: "GithubActionConfiguration" + } + } + } + } +}; + +export const ContainerApp: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerApp", + modelProperties: { + ...TrackedResource.type.modelProperties, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ManagedServiceIdentity" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + managedEnvironmentId: { + serializedName: "properties.managedEnvironmentId", + type: { + name: "String" + } + }, + latestRevisionName: { + serializedName: "properties.latestRevisionName", + readOnly: true, + type: { + name: "String" + } + }, + latestRevisionFqdn: { + serializedName: "properties.latestRevisionFqdn", + readOnly: true, + type: { + name: "String" + } + }, + customDomainVerificationId: { + serializedName: "properties.customDomainVerificationId", + readOnly: true, + type: { + name: "String" + } + }, + configuration: { + serializedName: "properties.configuration", + type: { + name: "Composite", + className: "Configuration" + } + }, + template: { + serializedName: "properties.template", + type: { + name: "Composite", + className: "Template" + } + }, + outboundIPAddresses: { + serializedName: "properties.outboundIPAddresses", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const ManagedEnvironment: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedEnvironment", + modelProperties: { + ...TrackedResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + daprAIInstrumentationKey: { + serializedName: "properties.daprAIInstrumentationKey", + type: { + name: "String" + } + }, + daprAIConnectionString: { + serializedName: "properties.daprAIConnectionString", + type: { + name: "String" + } + }, + vnetConfiguration: { + serializedName: "properties.vnetConfiguration", + type: { + name: "Composite", + className: "VnetConfiguration" + } + }, + deploymentErrors: { + serializedName: "properties.deploymentErrors", + readOnly: true, + type: { + name: "String" + } + }, + defaultDomain: { + serializedName: "properties.defaultDomain", + readOnly: true, + type: { + name: "String" + } + }, + staticIp: { + serializedName: "properties.staticIp", + readOnly: true, + type: { + name: "String" + } + }, + appLogsConfiguration: { + serializedName: "properties.appLogsConfiguration", + type: { + name: "Composite", + className: "AppLogsConfiguration" + } + }, + zoneRedundant: { + serializedName: "properties.zoneRedundant", + type: { + name: "Boolean" + } + } + } + } +}; + +export const Certificate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Certificate", + modelProperties: { + ...TrackedResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "CertificateProperties" + } + } + } + } +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/models/parameters.ts b/sdk/appcontainers/arm-appcontainers/src/models/parameters.ts new file mode 100644 index 000000000000..24d86d380904 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/models/parameters.ts @@ -0,0 +1,277 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { + OperationParameter, + OperationURLParameter, + OperationQueryParameter +} from "@azure/core-client"; +import { + AuthConfig as AuthConfigMapper, + ContainerApp as ContainerAppMapper, + DaprComponent as DaprComponentMapper, + ManagedEnvironment as ManagedEnvironmentMapper, + Certificate as CertificateMapper, + CertificatePatch as CertificatePatchMapper, + CheckNameAvailabilityRequest as CheckNameAvailabilityRequestMapper, + ManagedEnvironmentStorage as ManagedEnvironmentStorageMapper, + SourceControl as SourceControlMapper +} from "../models/mappers"; + +export const accept: OperationParameter = { + parameterPath: "accept", + mapper: { + defaultValue: "application/json", + isConstant: true, + serializedName: "Accept", + type: { + name: "String" + } + } +}; + +export const $host: OperationURLParameter = { + parameterPath: "$host", + mapper: { + serializedName: "$host", + required: true, + type: { + name: "String" + } + }, + skipEncoding: true +}; + +export const subscriptionId: OperationURLParameter = { + parameterPath: "subscriptionId", + mapper: { + constraints: { + MinLength: 1 + }, + serializedName: "subscriptionId", + required: true, + type: { + name: "String" + } + } +}; + +export const resourceGroupName: OperationURLParameter = { + parameterPath: "resourceGroupName", + mapper: { + constraints: { + MaxLength: 90, + MinLength: 1 + }, + serializedName: "resourceGroupName", + required: true, + type: { + name: "String" + } + } +}; + +export const containerAppName: OperationURLParameter = { + parameterPath: "containerAppName", + mapper: { + serializedName: "containerAppName", + required: true, + type: { + name: "String" + } + } +}; + +export const apiVersion: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2022-03-01", + isConstant: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; + +export const authConfigName: OperationURLParameter = { + parameterPath: "authConfigName", + mapper: { + serializedName: "authConfigName", + required: true, + type: { + name: "String" + } + } +}; + +export const contentType: OperationParameter = { + parameterPath: ["options", "contentType"], + mapper: { + defaultValue: "application/json", + isConstant: true, + serializedName: "Content-Type", + type: { + name: "String" + } + } +}; + +export const authConfigEnvelope: OperationParameter = { + parameterPath: "authConfigEnvelope", + mapper: AuthConfigMapper +}; + +export const nextLink: OperationURLParameter = { + parameterPath: "nextLink", + mapper: { + serializedName: "nextLink", + required: true, + type: { + name: "String" + } + }, + skipEncoding: true +}; + +export const containerAppEnvelope: OperationParameter = { + parameterPath: "containerAppEnvelope", + mapper: ContainerAppMapper +}; + +export const customHostname: OperationQueryParameter = { + parameterPath: ["options", "customHostname"], + mapper: { + serializedName: "customHostname", + type: { + name: "String" + } + } +}; + +export const filter: OperationQueryParameter = { + parameterPath: ["options", "filter"], + mapper: { + serializedName: "$filter", + type: { + name: "String" + } + } +}; + +export const revisionName: OperationURLParameter = { + parameterPath: "revisionName", + mapper: { + serializedName: "revisionName", + required: true, + type: { + name: "String" + } + } +}; + +export const replicaName: OperationURLParameter = { + parameterPath: "replicaName", + mapper: { + serializedName: "replicaName", + required: true, + type: { + name: "String" + } + } +}; + +export const environmentName: OperationURLParameter = { + parameterPath: "environmentName", + mapper: { + serializedName: "environmentName", + required: true, + type: { + name: "String" + } + } +}; + +export const componentName: OperationURLParameter = { + parameterPath: "componentName", + mapper: { + serializedName: "componentName", + required: true, + type: { + name: "String" + } + } +}; + +export const daprComponentEnvelope: OperationParameter = { + parameterPath: "daprComponentEnvelope", + mapper: DaprComponentMapper +}; + +export const environmentEnvelope: OperationParameter = { + parameterPath: "environmentEnvelope", + mapper: ManagedEnvironmentMapper +}; + +export const certificateName: OperationURLParameter = { + parameterPath: "certificateName", + mapper: { + serializedName: "certificateName", + required: true, + type: { + name: "String" + } + } +}; + +export const certificateEnvelope: OperationParameter = { + parameterPath: ["options", "certificateEnvelope"], + mapper: CertificateMapper +}; + +export const certificateEnvelope1: OperationParameter = { + parameterPath: "certificateEnvelope", + mapper: CertificatePatchMapper +}; + +export const checkNameAvailabilityRequest: OperationParameter = { + parameterPath: "checkNameAvailabilityRequest", + mapper: CheckNameAvailabilityRequestMapper +}; + +export const storageName: OperationURLParameter = { + parameterPath: "storageName", + mapper: { + serializedName: "storageName", + required: true, + type: { + name: "String" + } + } +}; + +export const storageEnvelope: OperationParameter = { + parameterPath: "storageEnvelope", + mapper: ManagedEnvironmentStorageMapper +}; + +export const sourceControlName: OperationURLParameter = { + parameterPath: "sourceControlName", + mapper: { + serializedName: "sourceControlName", + required: true, + type: { + name: "String" + } + } +}; + +export const sourceControlEnvelope: OperationParameter = { + parameterPath: "sourceControlEnvelope", + mapper: SourceControlMapper +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/certificates.ts b/sdk/appcontainers/arm-appcontainers/src/operations/certificates.ts new file mode 100644 index 000000000000..8dda7b4fc8b1 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/certificates.ts @@ -0,0 +1,368 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { Certificates } 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 { + Certificate, + CertificatesListNextOptionalParams, + CertificatesListOptionalParams, + CertificatesListResponse, + CertificatesGetOptionalParams, + CertificatesGetResponse, + CertificatesCreateOrUpdateOptionalParams, + CertificatesCreateOrUpdateResponse, + CertificatesDeleteOptionalParams, + CertificatePatch, + CertificatesUpdateOptionalParams, + CertificatesUpdateResponse, + CertificatesListNextResponse +} from "../models"; + +/// +/** Class containing Certificates operations. */ +export class CertificatesImpl implements Certificates { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class Certificates class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Get the Certificates in a given managed environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + environmentName: string, + options?: CertificatesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + environmentName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(resourceGroupName, environmentName, options); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + environmentName: string, + options?: CertificatesListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(resourceGroupName, environmentName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + environmentName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + resourceGroupName: string, + environmentName: string, + options?: CertificatesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + environmentName, + options + )) { + yield* page; + } + } + + /** + * Get the Certificates in a given managed environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + environmentName: string, + options?: CertificatesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, options }, + listOperationSpec + ); + } + + /** + * Get the specified Certificate. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param certificateName Name of the Certificate. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + environmentName: string, + certificateName: string, + options?: CertificatesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, certificateName, options }, + getOperationSpec + ); + } + + /** + * Create or Update a Certificate. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param certificateName Name of the Certificate. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + environmentName: string, + certificateName: string, + options?: CertificatesCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, certificateName, options }, + createOrUpdateOperationSpec + ); + } + + /** + * Deletes the specified Certificate. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param certificateName Name of the Certificate. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + environmentName: string, + certificateName: string, + options?: CertificatesDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, certificateName, options }, + deleteOperationSpec + ); + } + + /** + * Patches a certificate. Currently only patching of tags is supported + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param certificateName Name of the Certificate. + * @param certificateEnvelope Properties of a certificate that need to be updated + * @param options The options parameters. + */ + update( + resourceGroupName: string, + environmentName: string, + certificateName: string, + certificateEnvelope: CertificatePatch, + options?: CertificatesUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + environmentName, + certificateName, + certificateEnvelope, + options + }, + updateOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + environmentName: string, + nextLink: string, + options?: CertificatesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/certificates", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CertificateCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/certificates/{certificateName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Certificate + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName, + Parameters.certificateName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/certificates/{certificateName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.Certificate + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + requestBody: Parameters.certificateEnvelope, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName, + Parameters.certificateName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/certificates/{certificateName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName, + Parameters.certificateName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/certificates/{certificateName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.Certificate + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + requestBody: Parameters.certificateEnvelope1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName, + Parameters.certificateName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CertificateCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.environmentName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/containerApps.ts b/sdk/appcontainers/arm-appcontainers/src/operations/containerApps.ts new file mode 100644 index 000000000000..8bdfb89a7856 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/containerApps.ts @@ -0,0 +1,749 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { ContainerApps } 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 { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + ContainerApp, + ContainerAppsListBySubscriptionNextOptionalParams, + ContainerAppsListBySubscriptionOptionalParams, + ContainerAppsListByResourceGroupNextOptionalParams, + ContainerAppsListByResourceGroupOptionalParams, + ContainerAppsListBySubscriptionResponse, + ContainerAppsListByResourceGroupResponse, + ContainerAppsGetOptionalParams, + ContainerAppsGetResponse, + ContainerAppsCreateOrUpdateOptionalParams, + ContainerAppsCreateOrUpdateResponse, + ContainerAppsDeleteOptionalParams, + ContainerAppsUpdateOptionalParams, + ContainerAppsListCustomHostNameAnalysisOptionalParams, + ContainerAppsListCustomHostNameAnalysisResponse, + ContainerAppsListSecretsOptionalParams, + ContainerAppsListSecretsResponse, + ContainerAppsListBySubscriptionNextResponse, + ContainerAppsListByResourceGroupNextResponse +} from "../models"; + +/// +/** Class containing ContainerApps operations. */ +export class ContainerAppsImpl implements ContainerApps { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class ContainerApps class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Get the Container Apps in a given subscription. + * @param options The options parameters. + */ + public listBySubscription( + options?: ContainerAppsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listBySubscriptionPagingPage(options); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: ContainerAppsListBySubscriptionOptionalParams + ): AsyncIterableIterator { + let result = await this._listBySubscription(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listBySubscriptionPagingAll( + options?: ContainerAppsListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Get the Container Apps in a given resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: ContainerAppsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: ContainerAppsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: ContainerAppsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Get the Container Apps in a given subscription. + * @param options The options parameters. + */ + private _listBySubscription( + options?: ContainerAppsListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * Get the Container Apps in a given resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: ContainerAppsListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * Get the properties of a Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, options }, + getOperationSpec + ); + } + + /** + * Create or update a Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param containerAppEnvelope Properties used to create a container app + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + containerAppName: string, + containerAppEnvelope: ContainerApp, + options?: ContainerAppsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ContainerAppsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, containerAppName, containerAppEnvelope, options }, + createOrUpdateOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Create or update a Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param containerAppEnvelope Properties used to create a container app + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + containerAppName: string, + containerAppEnvelope: ContainerApp, + options?: ContainerAppsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + containerAppName, + containerAppEnvelope, + options + ); + return poller.pollUntilDone(); + } + + /** + * Delete a Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, containerAppName, options }, + deleteOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Delete a Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + containerAppName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Patches a Container App using JSON Merge Patch + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param containerAppEnvelope Properties of a Container App that need to be updated + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + containerAppName: string, + containerAppEnvelope: ContainerApp, + options?: ContainerAppsUpdateOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, containerAppName, containerAppEnvelope, options }, + updateOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Patches a Container App using JSON Merge Patch + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param containerAppEnvelope Properties of a Container App that need to be updated + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + containerAppName: string, + containerAppEnvelope: ContainerApp, + options?: ContainerAppsUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + containerAppName, + containerAppEnvelope, + options + ); + return poller.pollUntilDone(); + } + + /** + * Analyzes a custom hostname for a Container App + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param options The options parameters. + */ + listCustomHostNameAnalysis( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsListCustomHostNameAnalysisOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, options }, + listCustomHostNameAnalysisOperationSpec + ); + } + + /** + * List secrets for a container app + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param options The options parameters. + */ + listSecrets( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsListSecretsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, options }, + listSecretsOperationSpec + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: ContainerAppsListBySubscriptionNextOptionalParams + ): 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?: ContainerAppsListByResourceGroupNextOptionalParams + ): 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/containerApps", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ContainerAppCollection + }, + 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/containerApps", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ContainerAppCollection + }, + 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/containerApps/{containerAppName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ContainerApp + }, + 404: { + isError: true + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ContainerApp + }, + 201: { + bodyMapper: Mappers.ContainerApp + }, + 202: { + bodyMapper: Mappers.ContainerApp + }, + 204: { + bodyMapper: Mappers.ContainerApp + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + requestBody: Parameters.containerAppEnvelope, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}", + httpMethod: "PATCH", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + requestBody: Parameters.containerAppEnvelope, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listCustomHostNameAnalysisOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/listCustomHostNameAnalysis", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.CustomHostnameAnalysisResult + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.customHostname], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listSecretsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/listSecrets", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.SecretsCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ContainerAppCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ContainerAppCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsAuthConfigs.ts b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsAuthConfigs.ts new file mode 100644 index 000000000000..eb5da145c1e1 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsAuthConfigs.ts @@ -0,0 +1,329 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { ContainerAppsAuthConfigs } 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 { + AuthConfig, + ContainerAppsAuthConfigsListByContainerAppNextOptionalParams, + ContainerAppsAuthConfigsListByContainerAppOptionalParams, + ContainerAppsAuthConfigsListByContainerAppResponse, + ContainerAppsAuthConfigsGetOptionalParams, + ContainerAppsAuthConfigsGetResponse, + ContainerAppsAuthConfigsCreateOrUpdateOptionalParams, + ContainerAppsAuthConfigsCreateOrUpdateResponse, + ContainerAppsAuthConfigsDeleteOptionalParams, + ContainerAppsAuthConfigsListByContainerAppNextResponse +} from "../models"; + +/// +/** Class containing ContainerAppsAuthConfigs operations. */ +export class ContainerAppsAuthConfigsImpl implements ContainerAppsAuthConfigs { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class ContainerAppsAuthConfigs class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Get the Container App AuthConfigs in a given resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param options The options parameters. + */ + public listByContainerApp( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsAuthConfigsListByContainerAppOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByContainerAppPagingAll( + resourceGroupName, + containerAppName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByContainerAppPagingPage( + resourceGroupName, + containerAppName, + options + ); + } + }; + } + + private async *listByContainerAppPagingPage( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsAuthConfigsListByContainerAppOptionalParams + ): AsyncIterableIterator { + let result = await this._listByContainerApp( + resourceGroupName, + containerAppName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByContainerAppNext( + resourceGroupName, + containerAppName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByContainerAppPagingAll( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsAuthConfigsListByContainerAppOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByContainerAppPagingPage( + resourceGroupName, + containerAppName, + options + )) { + yield* page; + } + } + + /** + * Get the Container App AuthConfigs in a given resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param options The options parameters. + */ + private _listByContainerApp( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsAuthConfigsListByContainerAppOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, options }, + listByContainerAppOperationSpec + ); + } + + /** + * Get a AuthConfig of a Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param authConfigName Name of the Container App AuthConfig. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + containerAppName: string, + authConfigName: string, + options?: ContainerAppsAuthConfigsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, authConfigName, options }, + getOperationSpec + ); + } + + /** + * Create or update the AuthConfig for a Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param authConfigName Name of the Container App AuthConfig. + * @param authConfigEnvelope Properties used to create a Container App AuthConfig + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + containerAppName: string, + authConfigName: string, + authConfigEnvelope: AuthConfig, + options?: ContainerAppsAuthConfigsCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + containerAppName, + authConfigName, + authConfigEnvelope, + options + }, + createOrUpdateOperationSpec + ); + } + + /** + * Delete a Container App AuthConfig. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param authConfigName Name of the Container App AuthConfig. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + containerAppName: string, + authConfigName: string, + options?: ContainerAppsAuthConfigsDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, authConfigName, options }, + deleteOperationSpec + ); + } + + /** + * ListByContainerAppNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param nextLink The nextLink from the previous successful call to the ListByContainerApp method. + * @param options The options parameters. + */ + private _listByContainerAppNext( + resourceGroupName: string, + containerAppName: string, + nextLink: string, + options?: ContainerAppsAuthConfigsListByContainerAppNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, nextLink, options }, + listByContainerAppNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByContainerAppOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AuthConfigCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs/{authConfigName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AuthConfig + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName, + Parameters.authConfigName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs/{authConfigName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.AuthConfig + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + requestBody: Parameters.authConfigEnvelope, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName, + Parameters.authConfigName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs/{authConfigName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName, + Parameters.authConfigName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByContainerAppNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AuthConfigCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsRevisionReplicas.ts b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsRevisionReplicas.ts new file mode 100644 index 000000000000..1367a4c2210a --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsRevisionReplicas.ts @@ -0,0 +1,129 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { ContainerAppsRevisionReplicas } 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 { + ContainerAppsRevisionReplicasGetReplicaOptionalParams, + ContainerAppsRevisionReplicasGetReplicaResponse, + ContainerAppsRevisionReplicasListReplicasOptionalParams, + ContainerAppsRevisionReplicasListReplicasResponse +} from "../models"; + +/** Class containing ContainerAppsRevisionReplicas operations. */ +export class ContainerAppsRevisionReplicasImpl + implements ContainerAppsRevisionReplicas { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class ContainerAppsRevisionReplicas class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Get a replica for a Container App Revision. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision. + * @param replicaName Name of the Container App Revision Replica. + * @param options The options parameters. + */ + getReplica( + resourceGroupName: string, + containerAppName: string, + revisionName: string, + replicaName: string, + options?: ContainerAppsRevisionReplicasGetReplicaOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + containerAppName, + revisionName, + replicaName, + options + }, + getReplicaOperationSpec + ); + } + + /** + * List replicas for a Container App Revision. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision. + * @param options The options parameters. + */ + listReplicas( + resourceGroupName: string, + containerAppName: string, + revisionName: string, + options?: ContainerAppsRevisionReplicasListReplicasOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, revisionName, options }, + listReplicasOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getReplicaOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/replicas/{replicaName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Replica + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName, + Parameters.revisionName, + Parameters.replicaName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listReplicasOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/replicas", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReplicaCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName, + Parameters.revisionName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsRevisions.ts b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsRevisions.ts new file mode 100644 index 000000000000..b110d86064a2 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsRevisions.ts @@ -0,0 +1,356 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { ContainerAppsRevisions } 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 { + Revision, + ContainerAppsRevisionsListRevisionsNextOptionalParams, + ContainerAppsRevisionsListRevisionsOptionalParams, + ContainerAppsRevisionsListRevisionsResponse, + ContainerAppsRevisionsGetRevisionOptionalParams, + ContainerAppsRevisionsGetRevisionResponse, + ContainerAppsRevisionsActivateRevisionOptionalParams, + ContainerAppsRevisionsDeactivateRevisionOptionalParams, + ContainerAppsRevisionsRestartRevisionOptionalParams, + ContainerAppsRevisionsListRevisionsNextResponse +} from "../models"; + +/// +/** Class containing ContainerAppsRevisions operations. */ +export class ContainerAppsRevisionsImpl implements ContainerAppsRevisions { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class ContainerAppsRevisions class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Get the Revisions for a given Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App for which Revisions are needed. + * @param options The options parameters. + */ + public listRevisions( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsRevisionsListRevisionsOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listRevisionsPagingAll( + resourceGroupName, + containerAppName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listRevisionsPagingPage( + resourceGroupName, + containerAppName, + options + ); + } + }; + } + + private async *listRevisionsPagingPage( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsRevisionsListRevisionsOptionalParams + ): AsyncIterableIterator { + let result = await this._listRevisions( + resourceGroupName, + containerAppName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listRevisionsNext( + resourceGroupName, + containerAppName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listRevisionsPagingAll( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsRevisionsListRevisionsOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listRevisionsPagingPage( + resourceGroupName, + containerAppName, + options + )) { + yield* page; + } + } + + /** + * Get the Revisions for a given Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App for which Revisions are needed. + * @param options The options parameters. + */ + private _listRevisions( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsRevisionsListRevisionsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, options }, + listRevisionsOperationSpec + ); + } + + /** + * Get a revision of a Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision. + * @param options The options parameters. + */ + getRevision( + resourceGroupName: string, + containerAppName: string, + revisionName: string, + options?: ContainerAppsRevisionsGetRevisionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, revisionName, options }, + getRevisionOperationSpec + ); + } + + /** + * Activates a revision for a Container App + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision. + * @param options The options parameters. + */ + activateRevision( + resourceGroupName: string, + containerAppName: string, + revisionName: string, + options?: ContainerAppsRevisionsActivateRevisionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, revisionName, options }, + activateRevisionOperationSpec + ); + } + + /** + * Deactivates a revision for a Container App + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision. + * @param options The options parameters. + */ + deactivateRevision( + resourceGroupName: string, + containerAppName: string, + revisionName: string, + options?: ContainerAppsRevisionsDeactivateRevisionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, revisionName, options }, + deactivateRevisionOperationSpec + ); + } + + /** + * Restarts a revision for a Container App + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision. + * @param options The options parameters. + */ + restartRevision( + resourceGroupName: string, + containerAppName: string, + revisionName: string, + options?: ContainerAppsRevisionsRestartRevisionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, revisionName, options }, + restartRevisionOperationSpec + ); + } + + /** + * ListRevisionsNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App for which Revisions are needed. + * @param nextLink The nextLink from the previous successful call to the ListRevisions method. + * @param options The options parameters. + */ + private _listRevisionsNext( + resourceGroupName: string, + containerAppName: string, + nextLink: string, + options?: ContainerAppsRevisionsListRevisionsNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, nextLink, options }, + listRevisionsNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listRevisionsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RevisionCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.filter], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getRevisionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Revision + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName, + Parameters.revisionName + ], + headerParameters: [Parameters.accept], + serializer +}; +const activateRevisionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/activate", + httpMethod: "POST", + responses: { + 200: {}, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName, + Parameters.revisionName + ], + headerParameters: [Parameters.accept], + serializer +}; +const deactivateRevisionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/deactivate", + httpMethod: "POST", + responses: { + 200: {}, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName, + Parameters.revisionName + ], + headerParameters: [Parameters.accept], + serializer +}; +const restartRevisionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/restart", + httpMethod: "POST", + responses: { + 200: {}, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName, + Parameters.revisionName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listRevisionsNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RevisionCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.filter], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsSourceControls.ts b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsSourceControls.ts new file mode 100644 index 000000000000..ab681c635ff1 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsSourceControls.ts @@ -0,0 +1,487 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { ContainerAppsSourceControls } 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 { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + SourceControl, + ContainerAppsSourceControlsListByContainerAppNextOptionalParams, + ContainerAppsSourceControlsListByContainerAppOptionalParams, + ContainerAppsSourceControlsListByContainerAppResponse, + ContainerAppsSourceControlsGetOptionalParams, + ContainerAppsSourceControlsGetResponse, + ContainerAppsSourceControlsCreateOrUpdateOptionalParams, + ContainerAppsSourceControlsCreateOrUpdateResponse, + ContainerAppsSourceControlsDeleteOptionalParams, + ContainerAppsSourceControlsListByContainerAppNextResponse +} from "../models"; + +/// +/** Class containing ContainerAppsSourceControls operations. */ +export class ContainerAppsSourceControlsImpl + implements ContainerAppsSourceControls { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class ContainerAppsSourceControls class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Get the Container App SourceControls in a given resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param options The options parameters. + */ + public listByContainerApp( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsSourceControlsListByContainerAppOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByContainerAppPagingAll( + resourceGroupName, + containerAppName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByContainerAppPagingPage( + resourceGroupName, + containerAppName, + options + ); + } + }; + } + + private async *listByContainerAppPagingPage( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsSourceControlsListByContainerAppOptionalParams + ): AsyncIterableIterator { + let result = await this._listByContainerApp( + resourceGroupName, + containerAppName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByContainerAppNext( + resourceGroupName, + containerAppName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByContainerAppPagingAll( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsSourceControlsListByContainerAppOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByContainerAppPagingPage( + resourceGroupName, + containerAppName, + options + )) { + yield* page; + } + } + + /** + * Get the Container App SourceControls in a given resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param options The options parameters. + */ + private _listByContainerApp( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsSourceControlsListByContainerAppOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, options }, + listByContainerAppOperationSpec + ); + } + + /** + * Get a SourceControl of a Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param sourceControlName Name of the Container App SourceControl. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + containerAppName: string, + sourceControlName: string, + options?: ContainerAppsSourceControlsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, sourceControlName, options }, + getOperationSpec + ); + } + + /** + * Create or update the SourceControl for a Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param sourceControlName Name of the Container App SourceControl. + * @param sourceControlEnvelope Properties used to create a Container App SourceControl + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + containerAppName: string, + sourceControlName: string, + sourceControlEnvelope: SourceControl, + options?: ContainerAppsSourceControlsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ContainerAppsSourceControlsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + containerAppName, + sourceControlName, + sourceControlEnvelope, + options + }, + createOrUpdateOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Create or update the SourceControl for a Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param sourceControlName Name of the Container App SourceControl. + * @param sourceControlEnvelope Properties used to create a Container App SourceControl + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + containerAppName: string, + sourceControlName: string, + sourceControlEnvelope: SourceControl, + options?: ContainerAppsSourceControlsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + containerAppName, + sourceControlName, + sourceControlEnvelope, + options + ); + return poller.pollUntilDone(); + } + + /** + * Delete a Container App SourceControl. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param sourceControlName Name of the Container App SourceControl. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + containerAppName: string, + sourceControlName: string, + options?: ContainerAppsSourceControlsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, containerAppName, sourceControlName, options }, + deleteOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Delete a Container App SourceControl. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param sourceControlName Name of the Container App SourceControl. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + containerAppName: string, + sourceControlName: string, + options?: ContainerAppsSourceControlsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + containerAppName, + sourceControlName, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListByContainerAppNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param nextLink The nextLink from the previous successful call to the ListByContainerApp method. + * @param options The options parameters. + */ + private _listByContainerAppNext( + resourceGroupName: string, + containerAppName: string, + nextLink: string, + options?: ContainerAppsSourceControlsListByContainerAppNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, nextLink, options }, + listByContainerAppNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByContainerAppOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SourceControlCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{sourceControlName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SourceControl + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName, + Parameters.sourceControlName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{sourceControlName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.SourceControl + }, + 201: { + bodyMapper: Mappers.SourceControl + }, + 202: { + bodyMapper: Mappers.SourceControl + }, + 204: { + bodyMapper: Mappers.SourceControl + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + requestBody: Parameters.sourceControlEnvelope, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName, + Parameters.sourceControlName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{sourceControlName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName, + Parameters.sourceControlName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByContainerAppNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SourceControlCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/daprComponents.ts b/sdk/appcontainers/arm-appcontainers/src/operations/daprComponents.ts new file mode 100644 index 000000000000..527966427907 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/daprComponents.ts @@ -0,0 +1,365 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { DaprComponents } 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 { + DaprComponent, + DaprComponentsListNextOptionalParams, + DaprComponentsListOptionalParams, + DaprComponentsListResponse, + DaprComponentsGetOptionalParams, + DaprComponentsGetResponse, + DaprComponentsCreateOrUpdateOptionalParams, + DaprComponentsCreateOrUpdateResponse, + DaprComponentsDeleteOptionalParams, + DaprComponentsListSecretsOptionalParams, + DaprComponentsListSecretsResponse, + DaprComponentsListNextResponse +} from "../models"; + +/// +/** Class containing DaprComponents operations. */ +export class DaprComponentsImpl implements DaprComponents { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class DaprComponents class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Get the Dapr Components for a managed environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + environmentName: string, + options?: DaprComponentsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + environmentName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(resourceGroupName, environmentName, options); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + environmentName: string, + options?: DaprComponentsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(resourceGroupName, environmentName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + environmentName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + resourceGroupName: string, + environmentName: string, + options?: DaprComponentsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + environmentName, + options + )) { + yield* page; + } + } + + /** + * Get the Dapr Components for a managed environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + environmentName: string, + options?: DaprComponentsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, options }, + listOperationSpec + ); + } + + /** + * Get a dapr component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + environmentName: string, + componentName: string, + options?: DaprComponentsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, componentName, options }, + getOperationSpec + ); + } + + /** + * Creates or updates a Dapr Component in a Managed Environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param daprComponentEnvelope Configuration details of the Dapr Component. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + environmentName: string, + componentName: string, + daprComponentEnvelope: DaprComponent, + options?: DaprComponentsCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + environmentName, + componentName, + daprComponentEnvelope, + options + }, + createOrUpdateOperationSpec + ); + } + + /** + * Delete a Dapr Component from a Managed Environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + environmentName: string, + componentName: string, + options?: DaprComponentsDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, componentName, options }, + deleteOperationSpec + ); + } + + /** + * List secrets for a dapr component + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param options The options parameters. + */ + listSecrets( + resourceGroupName: string, + environmentName: string, + componentName: string, + options?: DaprComponentsListSecretsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, componentName, options }, + listSecretsOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + environmentName: string, + nextLink: string, + options?: DaprComponentsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DaprComponentsCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DaprComponent + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName, + Parameters.componentName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.DaprComponent + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + requestBody: Parameters.daprComponentEnvelope, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName, + Parameters.componentName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName, + Parameters.componentName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listSecretsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/listSecrets", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.DaprSecretsCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName, + Parameters.componentName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DaprComponentsCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.environmentName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/index.ts b/sdk/appcontainers/arm-appcontainers/src/operations/index.ts new file mode 100644 index 000000000000..6b480d5a26e4 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/index.ts @@ -0,0 +1,19 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export * from "./containerAppsAuthConfigs"; +export * from "./containerApps"; +export * from "./containerAppsRevisions"; +export * from "./containerAppsRevisionReplicas"; +export * from "./daprComponents"; +export * from "./operations"; +export * from "./managedEnvironments"; +export * from "./certificates"; +export * from "./namespaces"; +export * from "./managedEnvironmentsStorages"; +export * from "./containerAppsSourceControls"; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironments.ts b/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironments.ts new file mode 100644 index 000000000000..c474dd1cc701 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironments.ts @@ -0,0 +1,665 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { ManagedEnvironments } 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 { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + ManagedEnvironment, + ManagedEnvironmentsListBySubscriptionNextOptionalParams, + ManagedEnvironmentsListBySubscriptionOptionalParams, + ManagedEnvironmentsListByResourceGroupNextOptionalParams, + ManagedEnvironmentsListByResourceGroupOptionalParams, + ManagedEnvironmentsListBySubscriptionResponse, + ManagedEnvironmentsListByResourceGroupResponse, + ManagedEnvironmentsGetOptionalParams, + ManagedEnvironmentsGetResponse, + ManagedEnvironmentsCreateOrUpdateOptionalParams, + ManagedEnvironmentsCreateOrUpdateResponse, + ManagedEnvironmentsDeleteOptionalParams, + ManagedEnvironmentsUpdateOptionalParams, + ManagedEnvironmentsListBySubscriptionNextResponse, + ManagedEnvironmentsListByResourceGroupNextResponse +} from "../models"; + +/// +/** Class containing ManagedEnvironments operations. */ +export class ManagedEnvironmentsImpl implements ManagedEnvironments { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class ManagedEnvironments class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Get all Managed Environments for a subscription. + * @param options The options parameters. + */ + public listBySubscription( + options?: ManagedEnvironmentsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listBySubscriptionPagingPage(options); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: ManagedEnvironmentsListBySubscriptionOptionalParams + ): AsyncIterableIterator { + let result = await this._listBySubscription(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listBySubscriptionPagingAll( + options?: ManagedEnvironmentsListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Get all the Managed Environments in a 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?: ManagedEnvironmentsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: ManagedEnvironmentsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: ManagedEnvironmentsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Get all Managed Environments for a subscription. + * @param options The options parameters. + */ + private _listBySubscription( + options?: ManagedEnvironmentsListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * Get all the Managed Environments in a 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?: ManagedEnvironmentsListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * Get the properties of a Managed Environment used to host container apps. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + environmentName: string, + options?: ManagedEnvironmentsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, options }, + getOperationSpec + ); + } + + /** + * Creates or updates a Managed Environment used to host container apps. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @param environmentEnvelope Configuration details of the Environment. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + environmentName: string, + environmentEnvelope: ManagedEnvironment, + options?: ManagedEnvironmentsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ManagedEnvironmentsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, environmentName, environmentEnvelope, options }, + createOrUpdateOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Creates or updates a Managed Environment used to host container apps. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @param environmentEnvelope Configuration details of the Environment. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + environmentName: string, + environmentEnvelope: ManagedEnvironment, + options?: ManagedEnvironmentsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + environmentName, + environmentEnvelope, + options + ); + return poller.pollUntilDone(); + } + + /** + * Delete a Managed Environment if it does not have any container apps. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + environmentName: string, + options?: ManagedEnvironmentsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, environmentName, options }, + deleteOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Delete a Managed Environment if it does not have any container apps. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + environmentName: string, + options?: ManagedEnvironmentsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + environmentName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Patches a Managed Environment using JSON Merge Patch + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @param environmentEnvelope Configuration details of the Environment. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + environmentName: string, + environmentEnvelope: ManagedEnvironment, + options?: ManagedEnvironmentsUpdateOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, environmentName, environmentEnvelope, options }, + updateOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Patches a Managed Environment using JSON Merge Patch + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @param environmentEnvelope Configuration details of the Environment. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + environmentName: string, + environmentEnvelope: ManagedEnvironment, + options?: ManagedEnvironmentsUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + environmentName, + environmentEnvelope, + 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?: ManagedEnvironmentsListBySubscriptionNextOptionalParams + ): 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?: ManagedEnvironmentsListByResourceGroupNextOptionalParams + ): 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/managedEnvironments", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedEnvironmentsCollection + }, + 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/managedEnvironments", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedEnvironmentsCollection + }, + 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/managedEnvironments/{environmentName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedEnvironment + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ManagedEnvironment + }, + 201: { + bodyMapper: Mappers.ManagedEnvironment + }, + 202: { + bodyMapper: Mappers.ManagedEnvironment + }, + 204: { + bodyMapper: Mappers.ManagedEnvironment + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + requestBody: Parameters.environmentEnvelope, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}", + httpMethod: "PATCH", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + requestBody: Parameters.environmentEnvelope, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedEnvironmentsCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedEnvironmentsCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironmentsStorages.ts b/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironmentsStorages.ts new file mode 100644 index 000000000000..ed330cba0b98 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironmentsStorages.ts @@ -0,0 +1,214 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { ManagedEnvironmentsStorages } 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 { + ManagedEnvironmentsStoragesListOptionalParams, + ManagedEnvironmentsStoragesListResponse, + ManagedEnvironmentsStoragesGetOptionalParams, + ManagedEnvironmentsStoragesGetResponse, + ManagedEnvironmentStorage, + ManagedEnvironmentsStoragesCreateOrUpdateOptionalParams, + ManagedEnvironmentsStoragesCreateOrUpdateResponse, + ManagedEnvironmentsStoragesDeleteOptionalParams +} from "../models"; + +/** Class containing ManagedEnvironmentsStorages operations. */ +export class ManagedEnvironmentsStoragesImpl + implements ManagedEnvironmentsStorages { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class ManagedEnvironmentsStorages class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Get all storages for a managedEnvironment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + environmentName: string, + options?: ManagedEnvironmentsStoragesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, options }, + listOperationSpec + ); + } + + /** + * Get storage for a managedEnvironment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @param storageName Name of the storage. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + environmentName: string, + storageName: string, + options?: ManagedEnvironmentsStoragesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, storageName, options }, + getOperationSpec + ); + } + + /** + * Create or update storage for a managedEnvironment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @param storageName Name of the storage. + * @param storageEnvelope Configuration details of storage. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + environmentName: string, + storageName: string, + storageEnvelope: ManagedEnvironmentStorage, + options?: ManagedEnvironmentsStoragesCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + environmentName, + storageName, + storageEnvelope, + options + }, + createOrUpdateOperationSpec + ); + } + + /** + * Delete storage for a managedEnvironment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @param storageName Name of the storage. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + environmentName: string, + storageName: string, + options?: ManagedEnvironmentsStoragesDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, storageName, options }, + deleteOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/storages", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedEnvironmentStoragesCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/storages/{storageName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedEnvironmentStorage + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName, + Parameters.storageName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/storages/{storageName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ManagedEnvironmentStorage + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + requestBody: Parameters.storageEnvelope, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName, + Parameters.storageName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/storages/{storageName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName, + Parameters.storageName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/namespaces.ts b/sdk/appcontainers/arm-appcontainers/src/operations/namespaces.ts new file mode 100644 index 000000000000..2f2ed80b203c --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/namespaces.ts @@ -0,0 +1,82 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { Namespaces } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; +import { + CheckNameAvailabilityRequest, + NamespacesCheckNameAvailabilityOptionalParams, + NamespacesCheckNameAvailabilityResponse +} from "../models"; + +/** Class containing Namespaces operations. */ +export class NamespacesImpl implements Namespaces { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class Namespaces class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Checks if resource name is available. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param checkNameAvailabilityRequest The check name availability request. + * @param options The options parameters. + */ + checkNameAvailability( + resourceGroupName: string, + environmentName: string, + checkNameAvailabilityRequest: CheckNameAvailabilityRequest, + options?: NamespacesCheckNameAvailabilityOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + environmentName, + checkNameAvailabilityRequest, + options + }, + checkNameAvailabilityOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/checkNameAvailability", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.CheckNameAvailabilityResponse + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + requestBody: Parameters.checkNameAvailabilityRequest, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/operations.ts b/sdk/appcontainers/arm-appcontainers/src/operations/operations.ts new file mode 100644 index 000000000000..365537dcc52e --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/operations.ts @@ -0,0 +1,137 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { Operations } 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 { + OperationDetail, + OperationsListNextOptionalParams, + OperationsListOptionalParams, + OperationsListResponse, + OperationsListNextResponse +} from "../models"; + +/// +/** Class containing Operations operations. */ +export class OperationsImpl implements Operations { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class Operations class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Lists all of the available RP operations. + * @param options The options parameters. + */ + public list( + options?: OperationsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(options); + } + }; + } + + private async *listPagingPage( + options?: OperationsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + options?: OperationsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * Lists all of the available RP operations. + * @param options The options parameters. + */ + private _list( + options?: OperationsListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: OperationsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/providers/Microsoft.App/operations", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AvailableOperations + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AvailableOperations + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.nextLink], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/certificates.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/certificates.ts new file mode 100644 index 000000000000..a0a7a35d7be1 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/certificates.ts @@ -0,0 +1,91 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { + Certificate, + CertificatesListOptionalParams, + CertificatesGetOptionalParams, + CertificatesGetResponse, + CertificatesCreateOrUpdateOptionalParams, + CertificatesCreateOrUpdateResponse, + CertificatesDeleteOptionalParams, + CertificatePatch, + CertificatesUpdateOptionalParams, + CertificatesUpdateResponse +} from "../models"; + +/// +/** Interface representing a Certificates. */ +export interface Certificates { + /** + * Get the Certificates in a given managed environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + environmentName: string, + options?: CertificatesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get the specified Certificate. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param certificateName Name of the Certificate. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + environmentName: string, + certificateName: string, + options?: CertificatesGetOptionalParams + ): Promise; + /** + * Create or Update a Certificate. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param certificateName Name of the Certificate. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + environmentName: string, + certificateName: string, + options?: CertificatesCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the specified Certificate. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param certificateName Name of the Certificate. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + environmentName: string, + certificateName: string, + options?: CertificatesDeleteOptionalParams + ): Promise; + /** + * Patches a certificate. Currently only patching of tags is supported + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param certificateName Name of the Certificate. + * @param certificateEnvelope Properties of a certificate that need to be updated + * @param options The options parameters. + */ + update( + resourceGroupName: string, + environmentName: string, + certificateName: string, + certificateEnvelope: CertificatePatch, + options?: CertificatesUpdateOptionalParams + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerApps.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerApps.ts new file mode 100644 index 000000000000..abbeaa8edd1e --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerApps.ts @@ -0,0 +1,158 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + ContainerApp, + ContainerAppsListBySubscriptionOptionalParams, + ContainerAppsListByResourceGroupOptionalParams, + ContainerAppsGetOptionalParams, + ContainerAppsGetResponse, + ContainerAppsCreateOrUpdateOptionalParams, + ContainerAppsCreateOrUpdateResponse, + ContainerAppsDeleteOptionalParams, + ContainerAppsUpdateOptionalParams, + ContainerAppsListCustomHostNameAnalysisOptionalParams, + ContainerAppsListCustomHostNameAnalysisResponse, + ContainerAppsListSecretsOptionalParams, + ContainerAppsListSecretsResponse +} from "../models"; + +/// +/** Interface representing a ContainerApps. */ +export interface ContainerApps { + /** + * Get the Container Apps in a given subscription. + * @param options The options parameters. + */ + listBySubscription( + options?: ContainerAppsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get the Container Apps in a given resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: ContainerAppsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get the properties of a Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsGetOptionalParams + ): Promise; + /** + * Create or update a Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param containerAppEnvelope Properties used to create a container app + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + containerAppName: string, + containerAppEnvelope: ContainerApp, + options?: ContainerAppsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ContainerAppsCreateOrUpdateResponse + > + >; + /** + * Create or update a Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param containerAppEnvelope Properties used to create a container app + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + containerAppName: string, + containerAppEnvelope: ContainerApp, + options?: ContainerAppsCreateOrUpdateOptionalParams + ): Promise; + /** + * Delete a Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsDeleteOptionalParams + ): Promise, void>>; + /** + * Delete a Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsDeleteOptionalParams + ): Promise; + /** + * Patches a Container App using JSON Merge Patch + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param containerAppEnvelope Properties of a Container App that need to be updated + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + containerAppName: string, + containerAppEnvelope: ContainerApp, + options?: ContainerAppsUpdateOptionalParams + ): Promise, void>>; + /** + * Patches a Container App using JSON Merge Patch + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param containerAppEnvelope Properties of a Container App that need to be updated + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + containerAppName: string, + containerAppEnvelope: ContainerApp, + options?: ContainerAppsUpdateOptionalParams + ): Promise; + /** + * Analyzes a custom hostname for a Container App + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param options The options parameters. + */ + listCustomHostNameAnalysis( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsListCustomHostNameAnalysisOptionalParams + ): Promise; + /** + * List secrets for a container app + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param options The options parameters. + */ + listSecrets( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsListSecretsOptionalParams + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsAuthConfigs.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsAuthConfigs.ts new file mode 100644 index 000000000000..35e76fdda014 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsAuthConfigs.ts @@ -0,0 +1,75 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { + AuthConfig, + ContainerAppsAuthConfigsListByContainerAppOptionalParams, + ContainerAppsAuthConfigsGetOptionalParams, + ContainerAppsAuthConfigsGetResponse, + ContainerAppsAuthConfigsCreateOrUpdateOptionalParams, + ContainerAppsAuthConfigsCreateOrUpdateResponse, + ContainerAppsAuthConfigsDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a ContainerAppsAuthConfigs. */ +export interface ContainerAppsAuthConfigs { + /** + * Get the Container App AuthConfigs in a given resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param options The options parameters. + */ + listByContainerApp( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsAuthConfigsListByContainerAppOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a AuthConfig of a Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param authConfigName Name of the Container App AuthConfig. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + containerAppName: string, + authConfigName: string, + options?: ContainerAppsAuthConfigsGetOptionalParams + ): Promise; + /** + * Create or update the AuthConfig for a Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param authConfigName Name of the Container App AuthConfig. + * @param authConfigEnvelope Properties used to create a Container App AuthConfig + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + containerAppName: string, + authConfigName: string, + authConfigEnvelope: AuthConfig, + options?: ContainerAppsAuthConfigsCreateOrUpdateOptionalParams + ): Promise; + /** + * Delete a Container App AuthConfig. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param authConfigName Name of the Container App AuthConfig. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + containerAppName: string, + authConfigName: string, + options?: ContainerAppsAuthConfigsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsRevisionReplicas.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsRevisionReplicas.ts new file mode 100644 index 000000000000..e582a12a99ad --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsRevisionReplicas.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { + ContainerAppsRevisionReplicasGetReplicaOptionalParams, + ContainerAppsRevisionReplicasGetReplicaResponse, + ContainerAppsRevisionReplicasListReplicasOptionalParams, + ContainerAppsRevisionReplicasListReplicasResponse +} from "../models"; + +/** Interface representing a ContainerAppsRevisionReplicas. */ +export interface ContainerAppsRevisionReplicas { + /** + * Get a replica for a Container App Revision. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision. + * @param replicaName Name of the Container App Revision Replica. + * @param options The options parameters. + */ + getReplica( + resourceGroupName: string, + containerAppName: string, + revisionName: string, + replicaName: string, + options?: ContainerAppsRevisionReplicasGetReplicaOptionalParams + ): Promise; + /** + * List replicas for a Container App Revision. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision. + * @param options The options parameters. + */ + listReplicas( + resourceGroupName: string, + containerAppName: string, + revisionName: string, + options?: ContainerAppsRevisionReplicasListReplicasOptionalParams + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsRevisions.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsRevisions.ts new file mode 100644 index 000000000000..de0c4751919e --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsRevisions.ts @@ -0,0 +1,86 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { + Revision, + ContainerAppsRevisionsListRevisionsOptionalParams, + ContainerAppsRevisionsGetRevisionOptionalParams, + ContainerAppsRevisionsGetRevisionResponse, + ContainerAppsRevisionsActivateRevisionOptionalParams, + ContainerAppsRevisionsDeactivateRevisionOptionalParams, + ContainerAppsRevisionsRestartRevisionOptionalParams +} from "../models"; + +/// +/** Interface representing a ContainerAppsRevisions. */ +export interface ContainerAppsRevisions { + /** + * Get the Revisions for a given Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App for which Revisions are needed. + * @param options The options parameters. + */ + listRevisions( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsRevisionsListRevisionsOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a revision of a Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision. + * @param options The options parameters. + */ + getRevision( + resourceGroupName: string, + containerAppName: string, + revisionName: string, + options?: ContainerAppsRevisionsGetRevisionOptionalParams + ): Promise; + /** + * Activates a revision for a Container App + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision. + * @param options The options parameters. + */ + activateRevision( + resourceGroupName: string, + containerAppName: string, + revisionName: string, + options?: ContainerAppsRevisionsActivateRevisionOptionalParams + ): Promise; + /** + * Deactivates a revision for a Container App + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision. + * @param options The options parameters. + */ + deactivateRevision( + resourceGroupName: string, + containerAppName: string, + revisionName: string, + options?: ContainerAppsRevisionsDeactivateRevisionOptionalParams + ): Promise; + /** + * Restarts a revision for a Container App + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision. + * @param options The options parameters. + */ + restartRevision( + resourceGroupName: string, + containerAppName: string, + revisionName: string, + options?: ContainerAppsRevisionsRestartRevisionOptionalParams + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsSourceControls.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsSourceControls.ts new file mode 100644 index 000000000000..d276be2eaa6d --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsSourceControls.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 { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + SourceControl, + ContainerAppsSourceControlsListByContainerAppOptionalParams, + ContainerAppsSourceControlsGetOptionalParams, + ContainerAppsSourceControlsGetResponse, + ContainerAppsSourceControlsCreateOrUpdateOptionalParams, + ContainerAppsSourceControlsCreateOrUpdateResponse, + ContainerAppsSourceControlsDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a ContainerAppsSourceControls. */ +export interface ContainerAppsSourceControls { + /** + * Get the Container App SourceControls in a given resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param options The options parameters. + */ + listByContainerApp( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsSourceControlsListByContainerAppOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a SourceControl of a Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param sourceControlName Name of the Container App SourceControl. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + containerAppName: string, + sourceControlName: string, + options?: ContainerAppsSourceControlsGetOptionalParams + ): Promise; + /** + * Create or update the SourceControl for a Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param sourceControlName Name of the Container App SourceControl. + * @param sourceControlEnvelope Properties used to create a Container App SourceControl + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + containerAppName: string, + sourceControlName: string, + sourceControlEnvelope: SourceControl, + options?: ContainerAppsSourceControlsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ContainerAppsSourceControlsCreateOrUpdateResponse + > + >; + /** + * Create or update the SourceControl for a Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param sourceControlName Name of the Container App SourceControl. + * @param sourceControlEnvelope Properties used to create a Container App SourceControl + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + containerAppName: string, + sourceControlName: string, + sourceControlEnvelope: SourceControl, + options?: ContainerAppsSourceControlsCreateOrUpdateOptionalParams + ): Promise; + /** + * Delete a Container App SourceControl. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param sourceControlName Name of the Container App SourceControl. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + containerAppName: string, + sourceControlName: string, + options?: ContainerAppsSourceControlsDeleteOptionalParams + ): Promise, void>>; + /** + * Delete a Container App SourceControl. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param sourceControlName Name of the Container App SourceControl. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + containerAppName: string, + sourceControlName: string, + options?: ContainerAppsSourceControlsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/daprComponents.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/daprComponents.ts new file mode 100644 index 000000000000..a598b7bbe25b --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/daprComponents.ts @@ -0,0 +1,90 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { + DaprComponent, + DaprComponentsListOptionalParams, + DaprComponentsGetOptionalParams, + DaprComponentsGetResponse, + DaprComponentsCreateOrUpdateOptionalParams, + DaprComponentsCreateOrUpdateResponse, + DaprComponentsDeleteOptionalParams, + DaprComponentsListSecretsOptionalParams, + DaprComponentsListSecretsResponse +} from "../models"; + +/// +/** Interface representing a DaprComponents. */ +export interface DaprComponents { + /** + * Get the Dapr Components for a managed environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + environmentName: string, + options?: DaprComponentsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a dapr component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + environmentName: string, + componentName: string, + options?: DaprComponentsGetOptionalParams + ): Promise; + /** + * Creates or updates a Dapr Component in a Managed Environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param daprComponentEnvelope Configuration details of the Dapr Component. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + environmentName: string, + componentName: string, + daprComponentEnvelope: DaprComponent, + options?: DaprComponentsCreateOrUpdateOptionalParams + ): Promise; + /** + * Delete a Dapr Component from a Managed Environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + environmentName: string, + componentName: string, + options?: DaprComponentsDeleteOptionalParams + ): Promise; + /** + * List secrets for a dapr component + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param options The options parameters. + */ + listSecrets( + resourceGroupName: string, + environmentName: string, + componentName: string, + options?: DaprComponentsListSecretsOptionalParams + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/index.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/index.ts new file mode 100644 index 000000000000..6b480d5a26e4 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/index.ts @@ -0,0 +1,19 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export * from "./containerAppsAuthConfigs"; +export * from "./containerApps"; +export * from "./containerAppsRevisions"; +export * from "./containerAppsRevisionReplicas"; +export * from "./daprComponents"; +export * from "./operations"; +export * from "./managedEnvironments"; +export * from "./certificates"; +export * from "./namespaces"; +export * from "./managedEnvironmentsStorages"; +export * from "./containerAppsSourceControls"; diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/managedEnvironments.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/managedEnvironments.ts new file mode 100644 index 000000000000..bbb4449aa607 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/managedEnvironments.ts @@ -0,0 +1,132 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + ManagedEnvironment, + ManagedEnvironmentsListBySubscriptionOptionalParams, + ManagedEnvironmentsListByResourceGroupOptionalParams, + ManagedEnvironmentsGetOptionalParams, + ManagedEnvironmentsGetResponse, + ManagedEnvironmentsCreateOrUpdateOptionalParams, + ManagedEnvironmentsCreateOrUpdateResponse, + ManagedEnvironmentsDeleteOptionalParams, + ManagedEnvironmentsUpdateOptionalParams +} from "../models"; + +/// +/** Interface representing a ManagedEnvironments. */ +export interface ManagedEnvironments { + /** + * Get all Managed Environments for a subscription. + * @param options The options parameters. + */ + listBySubscription( + options?: ManagedEnvironmentsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get all the Managed Environments in a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: ManagedEnvironmentsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get the properties of a Managed Environment used to host container apps. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + environmentName: string, + options?: ManagedEnvironmentsGetOptionalParams + ): Promise; + /** + * Creates or updates a Managed Environment used to host container apps. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @param environmentEnvelope Configuration details of the Environment. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + environmentName: string, + environmentEnvelope: ManagedEnvironment, + options?: ManagedEnvironmentsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ManagedEnvironmentsCreateOrUpdateResponse + > + >; + /** + * Creates or updates a Managed Environment used to host container apps. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @param environmentEnvelope Configuration details of the Environment. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + environmentName: string, + environmentEnvelope: ManagedEnvironment, + options?: ManagedEnvironmentsCreateOrUpdateOptionalParams + ): Promise; + /** + * Delete a Managed Environment if it does not have any container apps. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + environmentName: string, + options?: ManagedEnvironmentsDeleteOptionalParams + ): Promise, void>>; + /** + * Delete a Managed Environment if it does not have any container apps. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + environmentName: string, + options?: ManagedEnvironmentsDeleteOptionalParams + ): Promise; + /** + * Patches a Managed Environment using JSON Merge Patch + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @param environmentEnvelope Configuration details of the Environment. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + environmentName: string, + environmentEnvelope: ManagedEnvironment, + options?: ManagedEnvironmentsUpdateOptionalParams + ): Promise, void>>; + /** + * Patches a Managed Environment using JSON Merge Patch + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @param environmentEnvelope Configuration details of the Environment. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + environmentName: string, + environmentEnvelope: ManagedEnvironment, + options?: ManagedEnvironmentsUpdateOptionalParams + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/managedEnvironmentsStorages.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/managedEnvironmentsStorages.ts new file mode 100644 index 000000000000..9ceeba873bfc --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/managedEnvironmentsStorages.ts @@ -0,0 +1,74 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { + ManagedEnvironmentsStoragesListOptionalParams, + ManagedEnvironmentsStoragesListResponse, + ManagedEnvironmentsStoragesGetOptionalParams, + ManagedEnvironmentsStoragesGetResponse, + ManagedEnvironmentStorage, + ManagedEnvironmentsStoragesCreateOrUpdateOptionalParams, + ManagedEnvironmentsStoragesCreateOrUpdateResponse, + ManagedEnvironmentsStoragesDeleteOptionalParams +} from "../models"; + +/** Interface representing a ManagedEnvironmentsStorages. */ +export interface ManagedEnvironmentsStorages { + /** + * Get all storages for a managedEnvironment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + environmentName: string, + options?: ManagedEnvironmentsStoragesListOptionalParams + ): Promise; + /** + * Get storage for a managedEnvironment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @param storageName Name of the storage. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + environmentName: string, + storageName: string, + options?: ManagedEnvironmentsStoragesGetOptionalParams + ): Promise; + /** + * Create or update storage for a managedEnvironment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @param storageName Name of the storage. + * @param storageEnvelope Configuration details of storage. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + environmentName: string, + storageName: string, + storageEnvelope: ManagedEnvironmentStorage, + options?: ManagedEnvironmentsStoragesCreateOrUpdateOptionalParams + ): Promise; + /** + * Delete storage for a managedEnvironment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @param storageName Name of the storage. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + environmentName: string, + storageName: string, + options?: ManagedEnvironmentsStoragesDeleteOptionalParams + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/namespaces.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/namespaces.ts new file mode 100644 index 000000000000..b3b2251fc092 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/namespaces.ts @@ -0,0 +1,30 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + CheckNameAvailabilityRequest, + NamespacesCheckNameAvailabilityOptionalParams, + NamespacesCheckNameAvailabilityResponse +} from "../models"; + +/** Interface representing a Namespaces. */ +export interface Namespaces { + /** + * Checks if resource name is available. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param checkNameAvailabilityRequest The check name availability request. + * @param options The options parameters. + */ + checkNameAvailability( + resourceGroupName: string, + environmentName: string, + checkNameAvailabilityRequest: CheckNameAvailabilityRequest, + options?: NamespacesCheckNameAvailabilityOptionalParams + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/operations.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/operations.ts new file mode 100644 index 000000000000..a704bdd7789c --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/operations.ts @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { OperationDetail, OperationsListOptionalParams } from "../models"; + +/// +/** Interface representing a Operations. */ +export interface Operations { + /** + * Lists all of the available RP operations. + * @param options The options parameters. + */ + list( + options?: OperationsListOptionalParams + ): PagedAsyncIterableIterator; +} 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 new file mode 100644 index 000000000000..3e6ae96443f3 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "module": "es6", + "moduleResolution": "node", + "strict": true, + "target": "es6", + "sourceMap": true, + "declarationMap": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "lib": [ + "es6", + "dom" + ], + "declaration": true, + "outDir": "./dist-esm", + "importHelpers": true + }, + "include": [ + "./src/**/*.ts", + "./test/**/*.ts" + ], + "exclude": [ + "node_modules" + ] +} \ No newline at end of file diff --git a/sdk/appcontainers/ci.mgmt.yml b/sdk/appcontainers/ci.mgmt.yml new file mode 100644 index 000000000000..93cfa0e9c0e1 --- /dev/null +++ b/sdk/appcontainers/ci.mgmt.yml @@ -0,0 +1,38 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: + branches: + include: + - main + - feature/* + - release/* + - hotfix/* + exclude: + - feature/v4 + paths: + include: + - sdk/appcontainers/arm-appcontainers + - sdk/appcontainers/ci.mgmt.yml + +pr: + branches: + include: + - main + - feature/* + - release/* + - hotfix/* + exclude: + - feature/v4 + paths: + include: + - sdk/appcontainers/arm-appcontainers + - sdk/appcontainers/ci.mgmt.yml + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: appcontainers + Artifacts: + - name: azure-arm-appcontainers + safeName: azurearmappcontainers + \ No newline at end of file