diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index c3c5bc227ce9..1ddc8faf5815 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -9107,28 +9107,27 @@ packages: dev: false file:projects/arm-app.tgz: - resolution: {integrity: sha512-LJKyEcLnJ6ZwVZFajPwxStZhrx47ilrjb0bao+zpN2dYbZVG1mefDjM+9/vMCp1+2CFtTZg8wMkvNuk7bzwq1w==, tarball: file:projects/arm-app.tgz} + resolution: {integrity: sha512-FB1MXuuM/aMYCUeqBo8YJxviCy0l2KyrjGjCek2nHsk8aX6vIFRLyCK8gFCjIonFP6jYUguBb59nBwut7Y1srw==, tarball: file:projects/arm-app.tgz} name: '@rush-temp/arm-app' version: 0.0.0 dependencies: '@azure-tools/test-recorder': 1.0.2 '@azure/identity': 2.0.4 '@microsoft/api-extractor': 7.19.4 - '@rollup/plugin-commonjs': 21.0.1_rollup@2.67.1 - '@rollup/plugin-json': 4.1.0_rollup@2.67.1 - '@rollup/plugin-multi-entry': 4.1.0_rollup@2.67.1 - '@rollup/plugin-node-resolve': 13.1.3_rollup@2.67.1 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-json': 4.1.0_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 cross-env: 7.0.3 mkdirp: 1.0.4 mocha: 7.2.0 rimraf: 3.0.2 - rollup: 2.67.1 - rollup-plugin-sourcemaps: 0.6.3_rollup@2.67.1 + rollup: 1.32.1 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 tslib: 2.3.1 typescript: 4.2.4 - uglify-js: 3.15.1 + uglify-js: 3.15.3 transitivePeerDependencies: - - '@types/node' - debug - encoding - supports-color diff --git a/sdk/app/arm-app/CHANGELOG.md b/sdk/app/arm-app/CHANGELOG.md deleted file mode 100644 index 3468066a2951..000000000000 --- a/sdk/app/arm-app/CHANGELOG.md +++ /dev/null @@ -1,5 +0,0 @@ -# Release History - -## 1.0.0-beta.1 (2022-03-23) - -The package of @azure/arm-app is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart). diff --git a/sdk/app/arm-app/README.md b/sdk/app/arm-app/README.md index 87771438489a..d67ada110c51 100644 --- a/sdk/app/arm-app/README.md +++ b/sdk/app/arm-app/README.md @@ -16,8 +16,6 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f - [LTS versions of Node.js](https://nodejs.org/about/releases/) - Latest versions of Safari, Chrome, Edge and Firefox. -See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details. - ### Prerequisites - An [Azure subscription][azure_sub]. @@ -51,17 +49,8 @@ For more information about how to create an Azure AD Application check out [this ```javascript const { ContainerAppsAPIClient } = require("@azure/arm-app"); const { DefaultAzureCredential } = require("@azure/identity"); -// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details. - const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ContainerAppsAPIClient(new DefaultAzureCredential(), subscriptionId); - -// For client-side applications running in the browser, use this code instead: -// const credential = new InteractiveBrowserCredential({ -// tenantId: "", -// clientId: "" -// }); -// const client = new ContainerAppsAPIClient(credential, subscriptionId); ``` diff --git a/sdk/app/arm-app/_meta.json b/sdk/app/arm-app/_meta.json index 8e9ec010d51b..5e8d8371c37a 100644 --- a/sdk/app/arm-app/_meta.json +++ b/sdk/app/arm-app/_meta.json @@ -1,8 +1,8 @@ { - "commit": "82fdf284eea880a8e027c354911a814999a77178", + "commit": "edb9ec9164d219cd8a71648a5774e3dd06bfc40b", "readme": "specification/app/resource-manager/readme.md", - "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\app\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-beta.17 --generate-sample=true", + "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/app/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220105.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.1.3", - "use": "@autorest/typescript@6.0.0-beta.17" + "release_tool": "@azure-tools/js-sdk-release-tools@2.2.1", + "use": "@autorest/typescript@6.0.0-alpha.16.20220105.1" } \ No newline at end of file diff --git a/sdk/app/arm-app/package.json b/sdk/app/arm-app/package.json index 9a15baf65238..82ee2f60f73d 100644 --- a/sdk/app/arm-app/package.json +++ b/sdk/app/arm-app/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for ContainerAppsAPIClient.", - "version": "1.0.0-beta.1", + "version": "1.0.0-beta.2", "engines": { "node": ">=12.0.0" }, @@ -29,13 +29,13 @@ "types": "./types/arm-app.d.ts", "devDependencies": { "@microsoft/api-extractor": "^7.18.11", - "@rollup/plugin-commonjs": "^21.0.1", - "@rollup/plugin-json": "^4.1.0", - "@rollup/plugin-multi-entry": "^4.1.0", - "@rollup/plugin-node-resolve": "^13.1.3", + "@rollup/plugin-commonjs": "11.0.2", + "@rollup/plugin-json": "^4.0.0", + "@rollup/plugin-multi-entry": "^3.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", "mkdirp": "^1.0.4", - "rollup": "^2.66.1", - "rollup-plugin-sourcemaps": "^0.6.3", + "rollup": "^1.16.3", + "rollup-plugin-sourcemaps": "^0.4.2", "typescript": "~4.2.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", @@ -98,21 +98,5 @@ "docs": "echo skipped" }, "sideEffects": false, - "//metadata": { - "constantPaths": [ - { - "path": "src/containerAppsAPIClient.ts", - "prefix": "packageDetails" - } - ] - }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-app?view=azure-node-preview" - } + "autoPublish": true } \ No newline at end of file diff --git a/sdk/app/arm-app/recordings/node/my_test/recording_sample_test.js b/sdk/app/arm-app/recordings/node/my_test/recording_sample_test.js deleted file mode 100644 index 0f6ecb857acf..000000000000 --- a/sdk/app/arm-app/recordings/node/my_test/recording_sample_test.js +++ /dev/null @@ -1,5 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "7a6be38bb8cb644d64b4094802301751"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} diff --git a/sdk/app/arm-app/rollup.config.js b/sdk/app/arm-app/rollup.config.js index 3f89d7309da5..9be1955eb7f1 100644 --- a/sdk/app/arm-app/rollup.config.js +++ b/sdk/app/arm-app/rollup.config.js @@ -14,14 +14,62 @@ import json from "@rollup/plugin-json"; import nodeBuiltins from "builtin-modules"; +/** + * Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api. + * + * NOTE: this manual configuration is only needed because OpenTelemetry uses an + * __exportStar downleveled helper function to declare its exports which confuses + * rollup's automatic discovery mechanism. + * + * @returns an object reference that can be `...`'d into your cjs() configuration. + */ +export function openTelemetryCommonJs() { + const namedExports = {}; + + for (const key of [ + "@opentelemetry/api", + "@azure/core-tracing/node_modules/@opentelemetry/api" + ]) { + namedExports[key] = [ + "SpanKind", + "TraceFlags", + "getSpan", + "setSpan", + "SpanStatusCode", + "getSpanContext", + "setSpanContext" + ]; + } + + const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"]; + + for (const version of releasedOpenTelemetryVersions) { + namedExports[ + // working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path. + `../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js` + ] = [ + "SpanKind", + "TraceFlags", + "getSpan", + "setSpan", + "StatusCode", + "CanonicalCode", + "getSpanContext", + "setSpanContext" + ]; + } + + return namedExports; +} + // #region Warning Handler /** - * A function that can determine whether a rollup warning should be ignored. If + * A function that can determine whether a rollupwarning should be ignored. If * the function returns `true`, then the warning will not be displayed. */ -function ignoreNiseSinonEval(warning) { +function ignoreNiseSinonEvalWarnings(warning) { return ( warning.code === "EVAL" && warning.id && @@ -30,14 +78,17 @@ function ignoreNiseSinonEval(warning) { ); } -function ignoreChaiCircularDependency(warning) { +function ignoreChaiCircularDependencyWarnings(warning) { return ( warning.code === "CIRCULAR_DEPENDENCY" && warning.importer && warning.importer.includes("node_modules/chai") === true ); } -const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval]; +const warningInhibitors = [ + ignoreChaiCircularDependencyWarnings, + ignoreNiseSinonEvalWarnings +]; /** * Construct a warning handler for the shared rollup configuration @@ -71,7 +122,22 @@ function makeBrowserTestConfig() { nodeResolve({ mainFields: ["module", "browser"] }), - cjs(), + cjs({ + namedExports: { + // Chai's strange internal architecture makes it impossible to statically + // analyze its exports. + chai: [ + "version", + "use", + "util", + "config", + "expect", + "should", + "assert" + ], + ...openTelemetryCommonJs() + } + }), json(), sourcemaps() //viz({ filename: "dist-test/browser-stats.html", sourcemap: true }) @@ -107,7 +173,7 @@ export function makeConfig(pkg, options) { ], output: { file: "dist/index.js", format: "cjs", sourcemap: true }, preserveSymlinks: false, - plugins: [sourcemaps(), nodeResolve()] + plugins: [sourcemaps(), nodeResolve(), cjs()] }; const config = [baseConfig]; diff --git a/sdk/app/arm-app/sample.env b/sdk/app/arm-app/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/app/arm-app/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/app/arm-app/samples-dev/certificatesCreateOrUpdateSample.ts b/sdk/app/arm-app/samples-dev/certificatesCreateOrUpdateSample.ts deleted file mode 100644 index 487eec304763..000000000000 --- a/sdk/app/arm-app/samples-dev/certificatesCreateOrUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - Certificate, - CertificatesCreateOrUpdateOptionalParams, - ContainerAppsAPIClient -} from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Create or Update a Certificate. - * - * @summary Create or Update a Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json - */ -async function createOrUpdateCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const managedEnvironmentName = "testcontainerenv"; - const name = "certificate-firendly-name"; - const certificateEnvelope: Certificate = { - location: "East US", - properties: { - password: "private key password", - value: new Uint8Array() - } - }; - const options: CertificatesCreateOrUpdateOptionalParams = { - certificateEnvelope - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.createOrUpdate( - resourceGroupName, - managedEnvironmentName, - name, - options - ); - console.log(result); -} - -createOrUpdateCertificate().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/certificatesDeleteSample.ts b/sdk/app/arm-app/samples-dev/certificatesDeleteSample.ts deleted file mode 100644 index c872144e3b1b..000000000000 --- a/sdk/app/arm-app/samples-dev/certificatesDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Deletes the specified Certificate. - * - * @summary Deletes the specified Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Delete.json - */ -async function deleteCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const managedEnvironmentName = "testcontainerenv"; - const name = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.delete( - resourceGroupName, - managedEnvironmentName, - name - ); - console.log(result); -} - -deleteCertificate().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/certificatesGetSample.ts b/sdk/app/arm-app/samples-dev/certificatesGetSample.ts deleted file mode 100644 index fb53e9432dcd..000000000000 --- a/sdk/app/arm-app/samples-dev/certificatesGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the specified Certificate. - * - * @summary Get the specified Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Get.json - */ -async function getCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const managedEnvironmentName = "testcontainerenv"; - const name = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.get( - resourceGroupName, - managedEnvironmentName, - name - ); - console.log(result); -} - -getCertificate().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/certificatesListSample.ts b/sdk/app/arm-app/samples-dev/certificatesListSample.ts deleted file mode 100644 index 73c627622c1a..000000000000 --- a/sdk/app/arm-app/samples-dev/certificatesListSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Certificates in a given managed environment. - * - * @summary Get the Certificates in a given managed environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json - */ -async function listCertificatesByManagedEnvironment() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const managedEnvironmentName = "testcontainerenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.certificates.list( - resourceGroupName, - managedEnvironmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listCertificatesByManagedEnvironment().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/certificatesUpdateSample.ts b/sdk/app/arm-app/samples-dev/certificatesUpdateSample.ts deleted file mode 100644 index 95c86c42fe06..000000000000 --- a/sdk/app/arm-app/samples-dev/certificatesUpdateSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { CertificatePatch, ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Patches a certificate. Currently only patching of tags is supported - * - * @summary Patches a certificate. Currently only patching of tags is supported - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_Patch.json - */ -async function patchCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const managedEnvironmentName = "testcontainerenv"; - const name = "certificate-firendly-name"; - const certificateEnvelope: CertificatePatch = { - tags: { tag1: "value1", tag2: "value2" } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.update( - resourceGroupName, - managedEnvironmentName, - name, - certificateEnvelope - ); - console.log(result); -} - -patchCertificate().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsAuthConfigsCreateOrUpdateSample.ts b/sdk/app/arm-app/samples-dev/containerAppsAuthConfigsCreateOrUpdateSample.ts deleted file mode 100644 index 81f7090e87bf..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsAuthConfigsCreateOrUpdateSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AuthConfig, ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Description for Create or update the AuthConfig for a Container App. - * - * @summary Description for Create or update the AuthConfig for a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/AuthConfigs_CreateOrUpdate.json - */ -async function createOrUpdateContainerAppAuthConfig() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const name = "current"; - const authConfigEnvelope: AuthConfig = { - globalValidation: { unauthenticatedClientAction: "AllowAnonymous" }, - identityProviders: { - facebook: { - registration: { appId: "123", appSecretSettingName: "facebook-secret" } - } - }, - platform: { enabled: true } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.createOrUpdate( - resourceGroupName, - containerAppName, - name, - authConfigEnvelope - ); - console.log(result); -} - -createOrUpdateContainerAppAuthConfig().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsAuthConfigsDeleteSample.ts b/sdk/app/arm-app/samples-dev/containerAppsAuthConfigsDeleteSample.ts deleted file mode 100644 index 0554af0821fa..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsAuthConfigsDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Description for Delete a Container App AuthConfig. - * - * @summary Description for Delete a Container App AuthConfig. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/AuthConfigs_Delete.json - */ -async function deleteContainerAppAuthConfig() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const name = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.delete( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -deleteContainerAppAuthConfig().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsAuthConfigsGetSample.ts b/sdk/app/arm-app/samples-dev/containerAppsAuthConfigsGetSample.ts deleted file mode 100644 index 853a1febc1dd..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsAuthConfigsGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a AuthConfig of a Container App. - * - * @summary Get a AuthConfig of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/AuthConfigs_Get.json - */ -async function getContainerAppAuthConfig() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const name = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.get( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -getContainerAppAuthConfig().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsAuthConfigsListByContainerAppSample.ts b/sdk/app/arm-app/samples-dev/containerAppsAuthConfigsListByContainerAppSample.ts deleted file mode 100644 index e3f89107286b..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsAuthConfigsListByContainerAppSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Container App AuthConfigs in a given resource group. - * - * @summary Get the Container App AuthConfigs in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/AuthConfigs_ListByContainer.json - */ -async function listAuthConfigsByContainerApps() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsAuthConfigs.listByContainerApp( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listAuthConfigsByContainerApps().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsCreateOrUpdateSample.ts b/sdk/app/arm-app/samples-dev/containerAppsCreateOrUpdateSample.ts deleted file mode 100644 index cb2523bdfb55..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsCreateOrUpdateSample.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerApp, ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Description for Create or update a Container App. - * - * @summary Description for Create or update a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_CreateOrUpdate.json - */ -async function createOrUpdateContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const name = "testcontainerApp0"; - const containerAppEnvelope: ContainerApp = { - configuration: { - dapr: { appPort: 3000, appProtocol: "http", enabled: true }, - ingress: { - customDomains: [ - { - name: "www.my-name.com", - bindingType: "SniEnabled", - certificateId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com" - }, - { - name: "www.my-other-name.com", - bindingType: "SniEnabled", - certificateId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com" - } - ], - external: true, - targetPort: 3000 - } - }, - location: "East US", - managedEnvironmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - template: { - containers: [ - { - name: "testcontainerApp0", - image: "repo/testcontainerApp0:v1", - probes: [ - { - type: "liveness", - httpGet: { - path: "/health", - httpHeaders: [{ name: "Custom-Header", value: "Awesome" }], - port: 8080 - }, - initialDelaySeconds: 3, - periodSeconds: 3 - } - ] - } - ], - scale: { - maxReplicas: 5, - minReplicas: 1, - rules: [ - { - name: "httpscalingrule", - custom: { type: "http", metadata: { concurrentRequests: "50" } } - } - ] - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginCreateOrUpdateAndWait( - resourceGroupName, - name, - containerAppEnvelope - ); - console.log(result); -} - -createOrUpdateContainerApp().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsDeleteSample.ts b/sdk/app/arm-app/samples-dev/containerAppsDeleteSample.ts deleted file mode 100644 index c6b7ad11da66..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Description for Delete a Container App. - * - * @summary Description for Delete a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Delete.json - */ -async function deleteContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const name = "testWorkerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginDeleteAndWait( - resourceGroupName, - name - ); - console.log(result); -} - -deleteContainerApp().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsGetSample.ts b/sdk/app/arm-app/samples-dev/containerAppsGetSample.ts deleted file mode 100644 index c3ed9ba32bdf..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsGetSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the properties of a Container App. - * - * @summary Get the properties of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Get.json - */ -async function getContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const name = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.get(resourceGroupName, name); - console.log(result); -} - -getContainerApp().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsListByResourceGroupSample.ts b/sdk/app/arm-app/samples-dev/containerAppsListByResourceGroupSample.ts deleted file mode 100644 index ef6d4c259ce4..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsListByResourceGroupSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Container Apps in a given resource group. - * - * @summary Get the Container Apps in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListByResourceGroup.json - */ -async function listContainerAppsByResourceGroup() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerApps.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppsByResourceGroup().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsListBySubscriptionSample.ts b/sdk/app/arm-app/samples-dev/containerAppsListBySubscriptionSample.ts deleted file mode 100644 index 9204c4d3330c..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Container Apps in a given subscription. - * - * @summary Get the Container Apps in a given subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListBySubscription.json - */ -async function listContainerAppsBySubscription() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerApps.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppsBySubscription().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsListCustomHostNameAnalysisSample.ts b/sdk/app/arm-app/samples-dev/containerAppsListCustomHostNameAnalysisSample.ts deleted file mode 100644 index 549bd4a27bf5..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsListCustomHostNameAnalysisSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ContainerAppsListCustomHostNameAnalysisOptionalParams, - ContainerAppsAPIClient -} from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Analyzes a custom hostname for a Container App - * - * @summary Analyzes a custom hostname for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json - */ -async function analyzeCustomHostname() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const customHostname = "my.name.corp"; - const options: ContainerAppsListCustomHostNameAnalysisOptionalParams = { - customHostname - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.listCustomHostNameAnalysis( - resourceGroupName, - containerAppName, - options - ); - console.log(result); -} - -analyzeCustomHostname().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsListSecretsSample.ts b/sdk/app/arm-app/samples-dev/containerAppsListSecretsSample.ts deleted file mode 100644 index 966f520a5e27..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsListSecretsSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to List secrets for a container app - * - * @summary List secrets for a container app - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListSecrets.json - */ -async function listContainerAppsSecrets() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const name = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.listSecrets( - resourceGroupName, - name - ); - console.log(result); -} - -listContainerAppsSecrets().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsRevisionReplicasGetReplicaSample.ts b/sdk/app/arm-app/samples-dev/containerAppsRevisionReplicasGetReplicaSample.ts deleted file mode 100644 index 30ef6ae6b233..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsRevisionReplicasGetReplicaSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a replica for a Container App Revision. - * - * @summary Get a replica for a Container App Revision. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Replicas_Get.json - */ -async function getContainerAppRevisionReplica() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "myapp"; - const revisionName = "myapp--0wlqy09"; - const name = "myapp--0wlqy09-5d9774cff-5wnd8"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisionReplicas.getReplica( - resourceGroupName, - containerAppName, - revisionName, - name - ); - console.log(result); -} - -getContainerAppRevisionReplica().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsRevisionReplicasListReplicasSample.ts b/sdk/app/arm-app/samples-dev/containerAppsRevisionReplicasListReplicasSample.ts deleted file mode 100644 index 844b7bdee308..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsRevisionReplicasListReplicasSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to List replicas for a Container App Revision. - * - * @summary List replicas for a Container App Revision. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Replicas_List.json - */ -async function listContainerAppReplicas() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "myapp"; - const revisionName = "myapp--0wlqy09"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisionReplicas.listReplicas( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -listContainerAppReplicas().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsRevisionsActivateRevisionSample.ts b/sdk/app/arm-app/samples-dev/containerAppsRevisionsActivateRevisionSample.ts deleted file mode 100644 index 38c6a5eb9828..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsRevisionsActivateRevisionSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Activates a revision for a Container App - * - * @summary Activates a revision for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_Activate.json - */ -async function activateContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const name = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.activateRevision( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -activateContainerAppRevision().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsRevisionsDeactivateRevisionSample.ts b/sdk/app/arm-app/samples-dev/containerAppsRevisionsDeactivateRevisionSample.ts deleted file mode 100644 index d413520920df..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsRevisionsDeactivateRevisionSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Deactivates a revision for a Container App - * - * @summary Deactivates a revision for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_Deactivate.json - */ -async function deactivateContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const name = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.deactivateRevision( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -deactivateContainerAppRevision().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsRevisionsGetRevisionSample.ts b/sdk/app/arm-app/samples-dev/containerAppsRevisionsGetRevisionSample.ts deleted file mode 100644 index 2a97703a317e..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsRevisionsGetRevisionSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a revision of a Container App. - * - * @summary Get a revision of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_Get.json - */ -async function getContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const name = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.getRevision( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -getContainerAppRevision().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsRevisionsListRevisionsSample.ts b/sdk/app/arm-app/samples-dev/containerAppsRevisionsListRevisionsSample.ts deleted file mode 100644 index 13ca118da5b4..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsRevisionsListRevisionsSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Revisions for a given Container App. - * - * @summary Get the Revisions for a given Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_List.json - */ -async function listContainerAppRevisions() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsRevisions.listRevisions( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppRevisions().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsRevisionsRestartRevisionSample.ts b/sdk/app/arm-app/samples-dev/containerAppsRevisionsRestartRevisionSample.ts deleted file mode 100644 index aaec1158e232..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsRevisionsRestartRevisionSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Restarts a revision for a Container App - * - * @summary Restarts a revision for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_Restart.json - */ -async function restartContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testStaticSite0"; - const name = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.restartRevision( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -restartContainerAppRevision().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsSourceControlsCreateOrUpdateSample.ts b/sdk/app/arm-app/samples-dev/containerAppsSourceControlsCreateOrUpdateSample.ts deleted file mode 100644 index fb65ad01eb7a..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsSourceControlsCreateOrUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { SourceControl, ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Description for Create or update the SourceControl for a Container App. - * - * @summary Description for Create or update the SourceControl for a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/SourceControls_CreateOrUpdate.json - */ -async function createOrUpdateContainerAppSourceControl() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const name = "current"; - const sourceControlEnvelope: SourceControl = { - branch: "master", - githubActionConfiguration: { - azureCredentials: { - clientId: "", - clientSecret: "", - tenantId: "" - }, - registryInfo: { - registryPassword: "", - registryUrl: "xwang971reg.azurecr.io", - registryUserName: "xwang971reg" - } - }, - repoUrl: "https://github.com/xwang971/ghatest" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.beginCreateOrUpdateAndWait( - resourceGroupName, - containerAppName, - name, - sourceControlEnvelope - ); - console.log(result); -} - -createOrUpdateContainerAppSourceControl().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsSourceControlsDeleteSample.ts b/sdk/app/arm-app/samples-dev/containerAppsSourceControlsDeleteSample.ts deleted file mode 100644 index 85ea0498d6a4..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsSourceControlsDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Description for Delete a Container App SourceControl. - * - * @summary Description for Delete a Container App SourceControl. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/SourceControls_Delete.json - */ -async function deleteContainerAppSourceControl() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const name = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.beginDeleteAndWait( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -deleteContainerAppSourceControl().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsSourceControlsGetSample.ts b/sdk/app/arm-app/samples-dev/containerAppsSourceControlsGetSample.ts deleted file mode 100644 index be593d5790a1..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsSourceControlsGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a SourceControl of a Container App. - * - * @summary Get a SourceControl of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/SourceControls_Get.json - */ -async function getContainerAppSourceControl() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const name = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.get( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -getContainerAppSourceControl().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsSourceControlsListByContainerAppSample.ts b/sdk/app/arm-app/samples-dev/containerAppsSourceControlsListByContainerAppSample.ts deleted file mode 100644 index b4bb6d8b7e93..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsSourceControlsListByContainerAppSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Container App SourceControls in a given resource group. - * - * @summary Get the Container App SourceControls in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/SourceControls_ListByContainer.json - */ -async function listAppSourceControls() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsSourceControls.listByContainerApp( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listAppSourceControls().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/containerAppsUpdateSample.ts b/sdk/app/arm-app/samples-dev/containerAppsUpdateSample.ts deleted file mode 100644 index 9343d0472dac..000000000000 --- a/sdk/app/arm-app/samples-dev/containerAppsUpdateSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppPatch, ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Patches a Container App. Currently only patching of tags is supported - * - * @summary Patches a Container App. Currently only patching of tags is supported - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Patch.json - */ -async function patchContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const name = "testcontainerApp0"; - const containerAppEnvelope: ContainerAppPatch = { - tags: { tag1: "value1", tag2: "value2" } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.update( - resourceGroupName, - name, - containerAppEnvelope - ); - console.log(result); -} - -patchContainerApp().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/daprComponentsCreateOrUpdateSample.ts b/sdk/app/arm-app/samples-dev/daprComponentsCreateOrUpdateSample.ts deleted file mode 100644 index dd0318e85e58..000000000000 --- a/sdk/app/arm-app/samples-dev/daprComponentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { DaprComponent, ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Creates or updates a Dapr Component in a Managed Environment. - * - * @summary Creates or updates a Dapr Component in a Managed Environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/DaprComponents_CreateOrUpdate.json - */ -async function createOrUpdateDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const name = "reddog"; - const daprComponentEnvelope: DaprComponent = { - componentType: "state.azure.cosmosdb", - ignoreErrors: false, - initTimeout: "50s", - metadata: [ - { name: "url", value: "" }, - { name: "database", value: "itemsDB" }, - { name: "collection", value: "items" }, - { name: "masterkey", secretRef: "masterkey" } - ], - scopes: ["container-app-1", "container-app-2"], - secrets: [{ name: "masterkey", value: "keyvalue" }], - version: "v1" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.createOrUpdate( - resourceGroupName, - environmentName, - name, - daprComponentEnvelope - ); - console.log(result); -} - -createOrUpdateDaprComponent().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/daprComponentsDeleteSample.ts b/sdk/app/arm-app/samples-dev/daprComponentsDeleteSample.ts deleted file mode 100644 index d91260e74d5b..000000000000 --- a/sdk/app/arm-app/samples-dev/daprComponentsDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Delete a Dapr Component from a Managed Environment. - * - * @summary Delete a Dapr Component from a Managed Environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/DaprComponents_Delete.json - */ -async function deleteDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const name = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.delete( - resourceGroupName, - environmentName, - name - ); - console.log(result); -} - -deleteDaprComponent().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/daprComponentsGetSample.ts b/sdk/app/arm-app/samples-dev/daprComponentsGetSample.ts deleted file mode 100644 index aaeb76f21d85..000000000000 --- a/sdk/app/arm-app/samples-dev/daprComponentsGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a dapr component. - * - * @summary Get a dapr component. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/DaprComponents_Get.json - */ -async function getDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const name = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.get( - resourceGroupName, - environmentName, - name - ); - console.log(result); -} - -getDaprComponent().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/daprComponentsListSample.ts b/sdk/app/arm-app/samples-dev/daprComponentsListSample.ts deleted file mode 100644 index 42c3487bd276..000000000000 --- a/sdk/app/arm-app/samples-dev/daprComponentsListSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Dapr Components for a managed environment. - * - * @summary Get the Dapr Components for a managed environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/DaprComponents_List.json - */ -async function listDaprComponents() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.daprComponents.list( - resourceGroupName, - environmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listDaprComponents().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/managedEnvironmentsCreateOrUpdateSample.ts b/sdk/app/arm-app/samples-dev/managedEnvironmentsCreateOrUpdateSample.ts deleted file mode 100644 index 8030b24e4581..000000000000 --- a/sdk/app/arm-app/samples-dev/managedEnvironmentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ManagedEnvironment, ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Creates or updates a Managed Environment used to host container apps. - * - * @summary Creates or updates a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json - */ -async function createEnvironments() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const name = "testcontainerenv"; - const environmentEnvelope: ManagedEnvironment = { - appLogsConfiguration: { - logAnalyticsConfiguration: { customerId: "string", sharedKey: "string" } - }, - location: "East US" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginCreateOrUpdateAndWait( - resourceGroupName, - name, - environmentEnvelope - ); - console.log(result); -} - -createEnvironments().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/managedEnvironmentsDeleteSample.ts b/sdk/app/arm-app/samples-dev/managedEnvironmentsDeleteSample.ts deleted file mode 100644 index 50c93edba9f4..000000000000 --- a/sdk/app/arm-app/samples-dev/managedEnvironmentsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Delete a Managed Environment if it does not have any container apps. - * - * @summary Delete a Managed Environment if it does not have any container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Delete.json - */ -async function deleteEnvironmentByName() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const name = "examplekenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginDeleteAndWait( - resourceGroupName, - name - ); - console.log(result); -} - -deleteEnvironmentByName().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/managedEnvironmentsGetSample.ts b/sdk/app/arm-app/samples-dev/managedEnvironmentsGetSample.ts deleted file mode 100644 index db4f69523265..000000000000 --- a/sdk/app/arm-app/samples-dev/managedEnvironmentsGetSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the properties of a Managed Environment used to host container apps. - * - * @summary Get the properties of a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Get.json - */ -async function getEnvironmentsByName() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const name = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.get(resourceGroupName, name); - console.log(result); -} - -getEnvironmentsByName().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/managedEnvironmentsListByResourceGroupSample.ts b/sdk/app/arm-app/samples-dev/managedEnvironmentsListByResourceGroupSample.ts deleted file mode 100644 index cf452fab2bf6..000000000000 --- a/sdk/app/arm-app/samples-dev/managedEnvironmentsListByResourceGroupSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get all the Managed Environments in a resource group. - * - * @summary Get all the Managed Environments in a resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json - */ -async function listEnvironmentsByResourceGroup() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listEnvironmentsByResourceGroup().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/managedEnvironmentsListBySubscriptionSample.ts b/sdk/app/arm-app/samples-dev/managedEnvironmentsListBySubscriptionSample.ts deleted file mode 100644 index ccfe7c862995..000000000000 --- a/sdk/app/arm-app/samples-dev/managedEnvironmentsListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get all Managed Environments for a subscription. - * - * @summary Get all Managed Environments for a subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListBySubscription.json - */ -async function listEnvironmentsBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -listEnvironmentsBySubscription().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/managedEnvironmentsStoragesCreateOrUpdateSample.ts b/sdk/app/arm-app/samples-dev/managedEnvironmentsStoragesCreateOrUpdateSample.ts deleted file mode 100644 index 96a53c68f61f..000000000000 --- a/sdk/app/arm-app/samples-dev/managedEnvironmentsStoragesCreateOrUpdateSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ManagedEnvironmentStorage, - ContainerAppsAPIClient -} from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Create or update storage for a managedEnvironment. - * - * @summary Create or update storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json - */ -async function createOrUpdateEnvironmentsStorage() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const envName = "managedEnv"; - const name = "jlaw-demo1"; - const storageEnvelope: ManagedEnvironmentStorage = { - properties: { - azureFile: { - accessMode: "ReadOnly", - accountKey: "key", - accountName: "account1", - shareName: "share1" - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.createOrUpdate( - resourceGroupName, - envName, - name, - storageEnvelope - ); - console.log(result); -} - -createOrUpdateEnvironmentsStorage().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/managedEnvironmentsStoragesDeleteSample.ts b/sdk/app/arm-app/samples-dev/managedEnvironmentsStoragesDeleteSample.ts deleted file mode 100644 index 71a66acd9251..000000000000 --- a/sdk/app/arm-app/samples-dev/managedEnvironmentsStoragesDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Delete storage for a managedEnvironment. - * - * @summary Delete storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_Delete.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const envName = "managedEnv"; - const name = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.delete( - resourceGroupName, - envName, - name - ); - console.log(result); -} - -listEnvironmentsStoragesBySubscription().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/managedEnvironmentsStoragesGetSample.ts b/sdk/app/arm-app/samples-dev/managedEnvironmentsStoragesGetSample.ts deleted file mode 100644 index 76bd4e1c4a4d..000000000000 --- a/sdk/app/arm-app/samples-dev/managedEnvironmentsStoragesGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get storage for a managedEnvironment. - * - * @summary Get storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_Get.json - */ -async function getAEnvironmentsStoragePropertiesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const envName = "managedEnv"; - const name = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.get( - resourceGroupName, - envName, - name - ); - console.log(result); -} - -getAEnvironmentsStoragePropertiesBySubscription().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/managedEnvironmentsStoragesListSample.ts b/sdk/app/arm-app/samples-dev/managedEnvironmentsStoragesListSample.ts deleted file mode 100644 index dbf75cbe839b..000000000000 --- a/sdk/app/arm-app/samples-dev/managedEnvironmentsStoragesListSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get all storages for a managedEnvironment. - * - * @summary Get all storages for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_List.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const envName = "managedEnv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.list( - resourceGroupName, - envName - ); - console.log(result); -} - -listEnvironmentsStoragesBySubscription().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/managedEnvironmentsUpdateSample.ts b/sdk/app/arm-app/samples-dev/managedEnvironmentsUpdateSample.ts deleted file mode 100644 index d3693deee729..000000000000 --- a/sdk/app/arm-app/samples-dev/managedEnvironmentsUpdateSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ManagedEnvironmentPatch, - ContainerAppsAPIClient -} from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Patches a Managed Environment. Only patching of tags is supported currently - * - * @summary Patches a Managed Environment. Only patching of tags is supported currently - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Patch.json - */ -async function patchManagedEnvironment() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const name = "testcontainerenv"; - const environmentEnvelope: ManagedEnvironmentPatch = { - tags: { tag1: "value1", tag2: "value2" } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.update( - resourceGroupName, - name, - environmentEnvelope - ); - console.log(result); -} - -patchManagedEnvironment().catch(console.error); diff --git a/sdk/app/arm-app/samples-dev/operationsListSample.ts b/sdk/app/arm-app/samples-dev/operationsListSample.ts deleted file mode 100644 index 62c55bbfb800..000000000000 --- a/sdk/app/arm-app/samples-dev/operationsListSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Lists all of the available RP operations. - * - * @summary Lists all of the available RP operations. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Operations_List.json - */ -async function listAllOperations() { - const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -listAllOperations().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/README.md b/sdk/app/arm-app/samples/v1-beta/javascript/README.md deleted file mode 100644 index 65ba4afc39dc..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/README.md +++ /dev/null @@ -1,134 +0,0 @@ -# client library samples for JavaScript (Beta) - -These sample programs show how to use the JavaScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| ------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [certificatesCreateOrUpdateSample.js][certificatescreateorupdatesample] | Create or Update a Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json | -| [certificatesDeleteSample.js][certificatesdeletesample] | Deletes the specified Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Delete.json | -| [certificatesGetSample.js][certificatesgetsample] | Get the specified Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Get.json | -| [certificatesListSample.js][certificateslistsample] | Get the Certificates in a given managed environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json | -| [certificatesUpdateSample.js][certificatesupdatesample] | Patches a certificate. Currently only patching of tags is supported x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_Patch.json | -| [containerAppsAuthConfigsCreateOrUpdateSample.js][containerappsauthconfigscreateorupdatesample] | Description for Create or update the AuthConfig for a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/AuthConfigs_CreateOrUpdate.json | -| [containerAppsAuthConfigsDeleteSample.js][containerappsauthconfigsdeletesample] | Description for Delete a Container App AuthConfig. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/AuthConfigs_Delete.json | -| [containerAppsAuthConfigsGetSample.js][containerappsauthconfigsgetsample] | Get a AuthConfig of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/AuthConfigs_Get.json | -| [containerAppsAuthConfigsListByContainerAppSample.js][containerappsauthconfigslistbycontainerappsample] | Get the Container App AuthConfigs in a given resource group. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/AuthConfigs_ListByContainer.json | -| [containerAppsCreateOrUpdateSample.js][containerappscreateorupdatesample] | Description for Create or update a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_CreateOrUpdate.json | -| [containerAppsDeleteSample.js][containerappsdeletesample] | Description for Delete a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Delete.json | -| [containerAppsGetSample.js][containerappsgetsample] | Get the properties of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Get.json | -| [containerAppsListByResourceGroupSample.js][containerappslistbyresourcegroupsample] | Get the Container Apps in a given resource group. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListByResourceGroup.json | -| [containerAppsListBySubscriptionSample.js][containerappslistbysubscriptionsample] | Get the Container Apps in a given subscription. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListBySubscription.json | -| [containerAppsListCustomHostNameAnalysisSample.js][containerappslistcustomhostnameanalysissample] | Analyzes a custom hostname for a Container App x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json | -| [containerAppsListSecretsSample.js][containerappslistsecretssample] | List secrets for a container app x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListSecrets.json | -| [containerAppsRevisionReplicasGetReplicaSample.js][containerappsrevisionreplicasgetreplicasample] | Get a replica for a Container App Revision. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Replicas_Get.json | -| [containerAppsRevisionReplicasListReplicasSample.js][containerappsrevisionreplicaslistreplicassample] | List replicas for a Container App Revision. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Replicas_List.json | -| [containerAppsRevisionsActivateRevisionSample.js][containerappsrevisionsactivaterevisionsample] | Activates a revision for a Container App x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_Activate.json | -| [containerAppsRevisionsDeactivateRevisionSample.js][containerappsrevisionsdeactivaterevisionsample] | Deactivates a revision for a Container App x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_Deactivate.json | -| [containerAppsRevisionsGetRevisionSample.js][containerappsrevisionsgetrevisionsample] | Get a revision of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_Get.json | -| [containerAppsRevisionsListRevisionsSample.js][containerappsrevisionslistrevisionssample] | Get the Revisions for a given Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_List.json | -| [containerAppsRevisionsRestartRevisionSample.js][containerappsrevisionsrestartrevisionsample] | Restarts a revision for a Container App x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_Restart.json | -| [containerAppsSourceControlsCreateOrUpdateSample.js][containerappssourcecontrolscreateorupdatesample] | Description for Create or update the SourceControl for a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/SourceControls_CreateOrUpdate.json | -| [containerAppsSourceControlsDeleteSample.js][containerappssourcecontrolsdeletesample] | Description for Delete a Container App SourceControl. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/SourceControls_Delete.json | -| [containerAppsSourceControlsGetSample.js][containerappssourcecontrolsgetsample] | Get a SourceControl of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/SourceControls_Get.json | -| [containerAppsSourceControlsListByContainerAppSample.js][containerappssourcecontrolslistbycontainerappsample] | Get the Container App SourceControls in a given resource group. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/SourceControls_ListByContainer.json | -| [containerAppsUpdateSample.js][containerappsupdatesample] | Patches a Container App. Currently only patching of tags is supported x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Patch.json | -| [daprComponentsCreateOrUpdateSample.js][daprcomponentscreateorupdatesample] | Creates or updates a Dapr Component in a Managed Environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/DaprComponents_CreateOrUpdate.json | -| [daprComponentsDeleteSample.js][daprcomponentsdeletesample] | Delete a Dapr Component from a Managed Environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/DaprComponents_Delete.json | -| [daprComponentsGetSample.js][daprcomponentsgetsample] | Get a dapr component. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/DaprComponents_Get.json | -| [daprComponentsListSample.js][daprcomponentslistsample] | Get the Dapr Components for a managed environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/DaprComponents_List.json | -| [managedEnvironmentsCreateOrUpdateSample.js][managedenvironmentscreateorupdatesample] | Creates or updates a Managed Environment used to host container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json | -| [managedEnvironmentsDeleteSample.js][managedenvironmentsdeletesample] | Delete a Managed Environment if it does not have any container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Delete.json | -| [managedEnvironmentsGetSample.js][managedenvironmentsgetsample] | Get the properties of a Managed Environment used to host container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Get.json | -| [managedEnvironmentsListByResourceGroupSample.js][managedenvironmentslistbyresourcegroupsample] | Get all the Managed Environments in a resource group. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json | -| [managedEnvironmentsListBySubscriptionSample.js][managedenvironmentslistbysubscriptionsample] | Get all Managed Environments for a subscription. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListBySubscription.json | -| [managedEnvironmentsStoragesCreateOrUpdateSample.js][managedenvironmentsstoragescreateorupdatesample] | Create or update storage for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json | -| [managedEnvironmentsStoragesDeleteSample.js][managedenvironmentsstoragesdeletesample] | Delete storage for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_Delete.json | -| [managedEnvironmentsStoragesGetSample.js][managedenvironmentsstoragesgetsample] | Get storage for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_Get.json | -| [managedEnvironmentsStoragesListSample.js][managedenvironmentsstorageslistsample] | Get all storages for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_List.json | -| [managedEnvironmentsUpdateSample.js][managedenvironmentsupdatesample] | Patches a Managed Environment. Only patching of tags is supported currently x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Patch.json | -| [operationsListSample.js][operationslistsample] | Lists all of the available RP operations. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Operations_List.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://nodejs.org/about/releases/). - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -3. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node certificatesCreateOrUpdateSample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx cross-env node certificatesCreateOrUpdateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[certificatescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/certificatesCreateOrUpdateSample.js -[certificatesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/certificatesDeleteSample.js -[certificatesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/certificatesGetSample.js -[certificateslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/certificatesListSample.js -[certificatesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/certificatesUpdateSample.js -[containerappsauthconfigscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsAuthConfigsCreateOrUpdateSample.js -[containerappsauthconfigsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsAuthConfigsDeleteSample.js -[containerappsauthconfigsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsAuthConfigsGetSample.js -[containerappsauthconfigslistbycontainerappsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsAuthConfigsListByContainerAppSample.js -[containerappscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsCreateOrUpdateSample.js -[containerappsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsDeleteSample.js -[containerappsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsGetSample.js -[containerappslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsListByResourceGroupSample.js -[containerappslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsListBySubscriptionSample.js -[containerappslistcustomhostnameanalysissample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsListCustomHostNameAnalysisSample.js -[containerappslistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsListSecretsSample.js -[containerappsrevisionreplicasgetreplicasample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionReplicasGetReplicaSample.js -[containerappsrevisionreplicaslistreplicassample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionReplicasListReplicasSample.js -[containerappsrevisionsactivaterevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsActivateRevisionSample.js -[containerappsrevisionsdeactivaterevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsDeactivateRevisionSample.js -[containerappsrevisionsgetrevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsGetRevisionSample.js -[containerappsrevisionslistrevisionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsListRevisionsSample.js -[containerappsrevisionsrestartrevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsRestartRevisionSample.js -[containerappssourcecontrolscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsSourceControlsCreateOrUpdateSample.js -[containerappssourcecontrolsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsSourceControlsDeleteSample.js -[containerappssourcecontrolsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsSourceControlsGetSample.js -[containerappssourcecontrolslistbycontainerappsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsSourceControlsListByContainerAppSample.js -[containerappsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsUpdateSample.js -[daprcomponentscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/daprComponentsCreateOrUpdateSample.js -[daprcomponentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/daprComponentsDeleteSample.js -[daprcomponentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/daprComponentsGetSample.js -[daprcomponentslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/daprComponentsListSample.js -[managedenvironmentscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsCreateOrUpdateSample.js -[managedenvironmentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsDeleteSample.js -[managedenvironmentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsGetSample.js -[managedenvironmentslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsListByResourceGroupSample.js -[managedenvironmentslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsListBySubscriptionSample.js -[managedenvironmentsstoragescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsStoragesCreateOrUpdateSample.js -[managedenvironmentsstoragesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsStoragesDeleteSample.js -[managedenvironmentsstoragesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsStoragesGetSample.js -[managedenvironmentsstorageslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsStoragesListSample.js -[managedenvironmentsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsUpdateSample.js -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/javascript/operationsListSample.js -[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-app?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/app/arm-app/README.md diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/certificatesCreateOrUpdateSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/certificatesCreateOrUpdateSample.js deleted file mode 100644 index ba0e4022d0de..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/certificatesCreateOrUpdateSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Create or Update a Certificate. - * - * @summary Create or Update a Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json - */ -async function createOrUpdateCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const managedEnvironmentName = "testcontainerenv"; - const name = "certificate-firendly-name"; - const certificateEnvelope = { - location: "East US", - properties: { - password: "private key password", - value: new Uint8Array(), - }, - }; - const options = { - certificateEnvelope, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.createOrUpdate( - resourceGroupName, - managedEnvironmentName, - name, - options - ); - console.log(result); -} - -createOrUpdateCertificate().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/certificatesDeleteSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/certificatesDeleteSample.js deleted file mode 100644 index 0fbaecd4d33e..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/certificatesDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Deletes the specified Certificate. - * - * @summary Deletes the specified Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Delete.json - */ -async function deleteCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const managedEnvironmentName = "testcontainerenv"; - const name = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.delete(resourceGroupName, managedEnvironmentName, name); - console.log(result); -} - -deleteCertificate().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/certificatesGetSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/certificatesGetSample.js deleted file mode 100644 index d0e1bc5770a3..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/certificatesGetSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the specified Certificate. - * - * @summary Get the specified Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Get.json - */ -async function getCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const managedEnvironmentName = "testcontainerenv"; - const name = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.get(resourceGroupName, managedEnvironmentName, name); - console.log(result); -} - -getCertificate().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/certificatesListSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/certificatesListSample.js deleted file mode 100644 index 21ae888dd338..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/certificatesListSample.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the Certificates in a given managed environment. - * - * @summary Get the Certificates in a given managed environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json - */ -async function listCertificatesByManagedEnvironment() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const managedEnvironmentName = "testcontainerenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.certificates.list(resourceGroupName, managedEnvironmentName)) { - resArray.push(item); - } - console.log(resArray); -} - -listCertificatesByManagedEnvironment().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/certificatesUpdateSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/certificatesUpdateSample.js deleted file mode 100644 index f5876664122c..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/certificatesUpdateSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Patches a certificate. Currently only patching of tags is supported - * - * @summary Patches a certificate. Currently only patching of tags is supported - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_Patch.json - */ -async function patchCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const managedEnvironmentName = "testcontainerenv"; - const name = "certificate-firendly-name"; - const certificateEnvelope = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.update( - resourceGroupName, - managedEnvironmentName, - name, - certificateEnvelope - ); - console.log(result); -} - -patchCertificate().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsAuthConfigsCreateOrUpdateSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsAuthConfigsCreateOrUpdateSample.js deleted file mode 100644 index d2b098640337..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsAuthConfigsCreateOrUpdateSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Description for Create or update the AuthConfig for a Container App. - * - * @summary Description for Create or update the AuthConfig for a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/AuthConfigs_CreateOrUpdate.json - */ -async function createOrUpdateContainerAppAuthConfig() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const name = "current"; - const authConfigEnvelope = { - globalValidation: { unauthenticatedClientAction: "AllowAnonymous" }, - identityProviders: { - facebook: { - registration: { appId: "123", appSecretSettingName: "facebook-secret" }, - }, - }, - platform: { enabled: true }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.createOrUpdate( - resourceGroupName, - containerAppName, - name, - authConfigEnvelope - ); - console.log(result); -} - -createOrUpdateContainerAppAuthConfig().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsAuthConfigsDeleteSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsAuthConfigsDeleteSample.js deleted file mode 100644 index 6f67fc553f03..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsAuthConfigsDeleteSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Description for Delete a Container App AuthConfig. - * - * @summary Description for Delete a Container App AuthConfig. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/AuthConfigs_Delete.json - */ -async function deleteContainerAppAuthConfig() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const name = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.delete( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -deleteContainerAppAuthConfig().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsAuthConfigsGetSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsAuthConfigsGetSample.js deleted file mode 100644 index 0d4d4a605942..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsAuthConfigsGetSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get a AuthConfig of a Container App. - * - * @summary Get a AuthConfig of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/AuthConfigs_Get.json - */ -async function getContainerAppAuthConfig() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const name = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.get( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -getContainerAppAuthConfig().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsAuthConfigsListByContainerAppSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsAuthConfigsListByContainerAppSample.js deleted file mode 100644 index 5af5c58bdac5..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsAuthConfigsListByContainerAppSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the Container App AuthConfigs in a given resource group. - * - * @summary Get the Container App AuthConfigs in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/AuthConfigs_ListByContainer.json - */ -async function listAuthConfigsByContainerApps() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsAuthConfigs.listByContainerApp( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listAuthConfigsByContainerApps().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsCreateOrUpdateSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsCreateOrUpdateSample.js deleted file mode 100644 index 2486b6202c65..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsCreateOrUpdateSample.js +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Description for Create or update a Container App. - * - * @summary Description for Create or update a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_CreateOrUpdate.json - */ -async function createOrUpdateContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const name = "testcontainerApp0"; - const containerAppEnvelope = { - configuration: { - dapr: { appPort: 3000, appProtocol: "http", enabled: true }, - ingress: { - customDomains: [ - { - name: "www.my-name.com", - bindingType: "SniEnabled", - certificateId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com", - }, - { - name: "www.my-other-name.com", - bindingType: "SniEnabled", - certificateId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com", - }, - ], - external: true, - targetPort: 3000, - }, - }, - location: "East US", - managedEnvironmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - template: { - containers: [ - { - name: "testcontainerApp0", - image: "repo/testcontainerApp0:v1", - probes: [ - { - type: "liveness", - httpGet: { - path: "/health", - httpHeaders: [{ name: "Custom-Header", value: "Awesome" }], - port: 8080, - }, - initialDelaySeconds: 3, - periodSeconds: 3, - }, - ], - }, - ], - scale: { - maxReplicas: 5, - minReplicas: 1, - rules: [ - { - name: "httpscalingrule", - custom: { type: "http", metadata: { concurrentRequests: "50" } }, - }, - ], - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginCreateOrUpdateAndWait( - resourceGroupName, - name, - containerAppEnvelope - ); - console.log(result); -} - -createOrUpdateContainerApp().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsDeleteSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsDeleteSample.js deleted file mode 100644 index 438be2d524c9..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsDeleteSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Description for Delete a Container App. - * - * @summary Description for Delete a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Delete.json - */ -async function deleteContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const name = "testWorkerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginDeleteAndWait(resourceGroupName, name); - console.log(result); -} - -deleteContainerApp().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsGetSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsGetSample.js deleted file mode 100644 index 084ac03b22c0..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsGetSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the properties of a Container App. - * - * @summary Get the properties of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Get.json - */ -async function getContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const name = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.get(resourceGroupName, name); - console.log(result); -} - -getContainerApp().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsListByResourceGroupSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsListByResourceGroupSample.js deleted file mode 100644 index 62a74f53f522..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsListByResourceGroupSample.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the Container Apps in a given resource group. - * - * @summary Get the Container Apps in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListByResourceGroup.json - */ -async function listContainerAppsByResourceGroup() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerApps.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppsByResourceGroup().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsListBySubscriptionSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsListBySubscriptionSample.js deleted file mode 100644 index e02beeba7648..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsListBySubscriptionSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the Container Apps in a given subscription. - * - * @summary Get the Container Apps in a given subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListBySubscription.json - */ -async function listContainerAppsBySubscription() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerApps.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppsBySubscription().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsListCustomHostNameAnalysisSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsListCustomHostNameAnalysisSample.js deleted file mode 100644 index 214d6f0a246d..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsListCustomHostNameAnalysisSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Analyzes a custom hostname for a Container App - * - * @summary Analyzes a custom hostname for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json - */ -async function analyzeCustomHostname() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const customHostname = "my.name.corp"; - const options = { - customHostname, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.listCustomHostNameAnalysis( - resourceGroupName, - containerAppName, - options - ); - console.log(result); -} - -analyzeCustomHostname().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsListSecretsSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsListSecretsSample.js deleted file mode 100644 index 2393fe6a9341..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsListSecretsSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to List secrets for a container app - * - * @summary List secrets for a container app - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListSecrets.json - */ -async function listContainerAppsSecrets() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const name = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.listSecrets(resourceGroupName, name); - console.log(result); -} - -listContainerAppsSecrets().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionReplicasGetReplicaSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionReplicasGetReplicaSample.js deleted file mode 100644 index f9a8af4adcc6..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionReplicasGetReplicaSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get a replica for a Container App Revision. - * - * @summary Get a replica for a Container App Revision. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Replicas_Get.json - */ -async function getContainerAppRevisionReplica() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "myapp"; - const revisionName = "myapp--0wlqy09"; - const name = "myapp--0wlqy09-5d9774cff-5wnd8"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisionReplicas.getReplica( - resourceGroupName, - containerAppName, - revisionName, - name - ); - console.log(result); -} - -getContainerAppRevisionReplica().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionReplicasListReplicasSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionReplicasListReplicasSample.js deleted file mode 100644 index ff795656f3e6..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionReplicasListReplicasSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to List replicas for a Container App Revision. - * - * @summary List replicas for a Container App Revision. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Replicas_List.json - */ -async function listContainerAppReplicas() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "myapp"; - const revisionName = "myapp--0wlqy09"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisionReplicas.listReplicas( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -listContainerAppReplicas().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsActivateRevisionSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsActivateRevisionSample.js deleted file mode 100644 index 00558e0519a3..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsActivateRevisionSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Activates a revision for a Container App - * - * @summary Activates a revision for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_Activate.json - */ -async function activateContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const name = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.activateRevision( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -activateContainerAppRevision().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsDeactivateRevisionSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsDeactivateRevisionSample.js deleted file mode 100644 index f0613ccf6307..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsDeactivateRevisionSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Deactivates a revision for a Container App - * - * @summary Deactivates a revision for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_Deactivate.json - */ -async function deactivateContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const name = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.deactivateRevision( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -deactivateContainerAppRevision().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsGetRevisionSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsGetRevisionSample.js deleted file mode 100644 index eb13d7a823ad..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsGetRevisionSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get a revision of a Container App. - * - * @summary Get a revision of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_Get.json - */ -async function getContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const name = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.getRevision( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -getContainerAppRevision().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsListRevisionsSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsListRevisionsSample.js deleted file mode 100644 index 677600bfd580..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsListRevisionsSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the Revisions for a given Container App. - * - * @summary Get the Revisions for a given Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_List.json - */ -async function listContainerAppRevisions() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsRevisions.listRevisions( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppRevisions().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsRestartRevisionSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsRestartRevisionSample.js deleted file mode 100644 index 32d200bdf205..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsRevisionsRestartRevisionSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Restarts a revision for a Container App - * - * @summary Restarts a revision for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_Restart.json - */ -async function restartContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testStaticSite0"; - const name = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.restartRevision( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -restartContainerAppRevision().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsSourceControlsCreateOrUpdateSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsSourceControlsCreateOrUpdateSample.js deleted file mode 100644 index 24eb059852c8..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsSourceControlsCreateOrUpdateSample.js +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Description for Create or update the SourceControl for a Container App. - * - * @summary Description for Create or update the SourceControl for a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/SourceControls_CreateOrUpdate.json - */ -async function createOrUpdateContainerAppSourceControl() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const name = "current"; - const sourceControlEnvelope = { - branch: "master", - githubActionConfiguration: { - azureCredentials: { - clientId: "", - clientSecret: "", - tenantId: "", - }, - registryInfo: { - registryPassword: "", - registryUrl: "xwang971reg.azurecr.io", - registryUserName: "xwang971reg", - }, - }, - repoUrl: "https://github.com/xwang971/ghatest", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.beginCreateOrUpdateAndWait( - resourceGroupName, - containerAppName, - name, - sourceControlEnvelope - ); - console.log(result); -} - -createOrUpdateContainerAppSourceControl().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsSourceControlsDeleteSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsSourceControlsDeleteSample.js deleted file mode 100644 index 36d8037d49a5..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsSourceControlsDeleteSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Description for Delete a Container App SourceControl. - * - * @summary Description for Delete a Container App SourceControl. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/SourceControls_Delete.json - */ -async function deleteContainerAppSourceControl() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const name = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.beginDeleteAndWait( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -deleteContainerAppSourceControl().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsSourceControlsGetSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsSourceControlsGetSample.js deleted file mode 100644 index 52e7277017a1..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsSourceControlsGetSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get a SourceControl of a Container App. - * - * @summary Get a SourceControl of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/SourceControls_Get.json - */ -async function getContainerAppSourceControl() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const name = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.get( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -getContainerAppSourceControl().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsSourceControlsListByContainerAppSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsSourceControlsListByContainerAppSample.js deleted file mode 100644 index 12005c154314..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsSourceControlsListByContainerAppSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the Container App SourceControls in a given resource group. - * - * @summary Get the Container App SourceControls in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/SourceControls_ListByContainer.json - */ -async function listAppSourceControls() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsSourceControls.listByContainerApp( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listAppSourceControls().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsUpdateSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsUpdateSample.js deleted file mode 100644 index 5fe32a3e1413..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/containerAppsUpdateSample.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Patches a Container App. Currently only patching of tags is supported - * - * @summary Patches a Container App. Currently only patching of tags is supported - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Patch.json - */ -async function patchContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const name = "testcontainerApp0"; - const containerAppEnvelope = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.update(resourceGroupName, name, containerAppEnvelope); - console.log(result); -} - -patchContainerApp().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/daprComponentsCreateOrUpdateSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/daprComponentsCreateOrUpdateSample.js deleted file mode 100644 index 67e14853f537..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/daprComponentsCreateOrUpdateSample.js +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Creates or updates a Dapr Component in a Managed Environment. - * - * @summary Creates or updates a Dapr Component in a Managed Environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/DaprComponents_CreateOrUpdate.json - */ -async function createOrUpdateDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const name = "reddog"; - const daprComponentEnvelope = { - componentType: "state.azure.cosmosdb", - ignoreErrors: false, - initTimeout: "50s", - metadata: [ - { name: "url", value: "" }, - { name: "database", value: "itemsDB" }, - { name: "collection", value: "items" }, - { name: "masterkey", secretRef: "masterkey" }, - ], - scopes: ["container-app-1", "container-app-2"], - secrets: [{ name: "masterkey", value: "keyvalue" }], - version: "v1", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.createOrUpdate( - resourceGroupName, - environmentName, - name, - daprComponentEnvelope - ); - console.log(result); -} - -createOrUpdateDaprComponent().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/daprComponentsDeleteSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/daprComponentsDeleteSample.js deleted file mode 100644 index b17b0327f7f4..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/daprComponentsDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Delete a Dapr Component from a Managed Environment. - * - * @summary Delete a Dapr Component from a Managed Environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/DaprComponents_Delete.json - */ -async function deleteDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const name = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.delete(resourceGroupName, environmentName, name); - console.log(result); -} - -deleteDaprComponent().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/daprComponentsGetSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/daprComponentsGetSample.js deleted file mode 100644 index bd96f6b5a42b..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/daprComponentsGetSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get a dapr component. - * - * @summary Get a dapr component. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/DaprComponents_Get.json - */ -async function getDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const name = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.get(resourceGroupName, environmentName, name); - console.log(result); -} - -getDaprComponent().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/daprComponentsListSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/daprComponentsListSample.js deleted file mode 100644 index 09461560ad3a..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/daprComponentsListSample.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the Dapr Components for a managed environment. - * - * @summary Get the Dapr Components for a managed environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/DaprComponents_List.json - */ -async function listDaprComponents() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.daprComponents.list(resourceGroupName, environmentName)) { - resArray.push(item); - } - console.log(resArray); -} - -listDaprComponents().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsCreateOrUpdateSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsCreateOrUpdateSample.js deleted file mode 100644 index ac88f16bac50..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsCreateOrUpdateSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Creates or updates a Managed Environment used to host container apps. - * - * @summary Creates or updates a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json - */ -async function createEnvironments() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const name = "testcontainerenv"; - const environmentEnvelope = { - appLogsConfiguration: { - logAnalyticsConfiguration: { customerId: "string", sharedKey: "string" }, - }, - location: "East US", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginCreateOrUpdateAndWait( - resourceGroupName, - name, - environmentEnvelope - ); - console.log(result); -} - -createEnvironments().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsDeleteSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsDeleteSample.js deleted file mode 100644 index 7b14b36e8094..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsDeleteSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Delete a Managed Environment if it does not have any container apps. - * - * @summary Delete a Managed Environment if it does not have any container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Delete.json - */ -async function deleteEnvironmentByName() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const name = "examplekenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginDeleteAndWait(resourceGroupName, name); - console.log(result); -} - -deleteEnvironmentByName().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsGetSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsGetSample.js deleted file mode 100644 index 64c77ef2cc01..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsGetSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the properties of a Managed Environment used to host container apps. - * - * @summary Get the properties of a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Get.json - */ -async function getEnvironmentsByName() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const name = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.get(resourceGroupName, name); - console.log(result); -} - -getEnvironmentsByName().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsListByResourceGroupSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsListByResourceGroupSample.js deleted file mode 100644 index c7801458ec72..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsListByResourceGroupSample.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get all the Managed Environments in a resource group. - * - * @summary Get all the Managed Environments in a resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json - */ -async function listEnvironmentsByResourceGroup() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -listEnvironmentsByResourceGroup().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsListBySubscriptionSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsListBySubscriptionSample.js deleted file mode 100644 index b13f81c237b0..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsListBySubscriptionSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get all Managed Environments for a subscription. - * - * @summary Get all Managed Environments for a subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListBySubscription.json - */ -async function listEnvironmentsBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -listEnvironmentsBySubscription().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsStoragesCreateOrUpdateSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsStoragesCreateOrUpdateSample.js deleted file mode 100644 index 4fcc05aa216f..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsStoragesCreateOrUpdateSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Create or update storage for a managedEnvironment. - * - * @summary Create or update storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json - */ -async function createOrUpdateEnvironmentsStorage() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const envName = "managedEnv"; - const name = "jlaw-demo1"; - const storageEnvelope = { - properties: { - azureFile: { - accessMode: "ReadOnly", - accountKey: "key", - accountName: "account1", - shareName: "share1", - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.createOrUpdate( - resourceGroupName, - envName, - name, - storageEnvelope - ); - console.log(result); -} - -createOrUpdateEnvironmentsStorage().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsStoragesDeleteSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsStoragesDeleteSample.js deleted file mode 100644 index 74d62824fdb0..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsStoragesDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Delete storage for a managedEnvironment. - * - * @summary Delete storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_Delete.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const envName = "managedEnv"; - const name = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.delete(resourceGroupName, envName, name); - console.log(result); -} - -listEnvironmentsStoragesBySubscription().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsStoragesGetSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsStoragesGetSample.js deleted file mode 100644 index 6b2156c3f1b4..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsStoragesGetSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get storage for a managedEnvironment. - * - * @summary Get storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_Get.json - */ -async function getAEnvironmentsStoragePropertiesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const envName = "managedEnv"; - const name = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.get(resourceGroupName, envName, name); - console.log(result); -} - -getAEnvironmentsStoragePropertiesBySubscription().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsStoragesListSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsStoragesListSample.js deleted file mode 100644 index cf95baf60092..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsStoragesListSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get all storages for a managedEnvironment. - * - * @summary Get all storages for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_List.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const envName = "managedEnv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.list(resourceGroupName, envName); - console.log(result); -} - -listEnvironmentsStoragesBySubscription().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsUpdateSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsUpdateSample.js deleted file mode 100644 index 3515e8cb0f5a..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/managedEnvironmentsUpdateSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Patches a Managed Environment. Only patching of tags is supported currently - * - * @summary Patches a Managed Environment. Only patching of tags is supported currently - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Patch.json - */ -async function patchManagedEnvironment() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const name = "testcontainerenv"; - const environmentEnvelope = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.update( - resourceGroupName, - name, - environmentEnvelope - ); - console.log(result); -} - -patchManagedEnvironment().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/operationsListSample.js b/sdk/app/arm-app/samples/v1-beta/javascript/operationsListSample.js deleted file mode 100644 index 191858d4b9ec..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/operationsListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-app"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Lists all of the available RP operations. - * - * @summary Lists all of the available RP operations. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Operations_List.json - */ -async function listAllOperations() { - const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -listAllOperations().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/package.json b/sdk/app/arm-app/samples/v1-beta/javascript/package.json deleted file mode 100644 index a3d3c2fc9e8f..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "azure-arm-app-samples-js-beta", - "private": true, - "version": "1.0.0", - "description": " client library samples for JavaScript (Beta)", - "engines": { - "node": ">=12.0.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/app/arm-app" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/app/arm-app", - "dependencies": { - "@azure/arm-app": "next", - "dotenv": "latest", - "@azure/identity": "^2.0.1" - } -} diff --git a/sdk/app/arm-app/samples/v1-beta/javascript/sample.env b/sdk/app/arm-app/samples/v1-beta/javascript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/javascript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/README.md b/sdk/app/arm-app/samples/v1-beta/typescript/README.md deleted file mode 100644 index 200612321d38..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/README.md +++ /dev/null @@ -1,147 +0,0 @@ -# client library samples for TypeScript (Beta) - -These sample programs show how to use the TypeScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| ------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [certificatesCreateOrUpdateSample.ts][certificatescreateorupdatesample] | Create or Update a Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json | -| [certificatesDeleteSample.ts][certificatesdeletesample] | Deletes the specified Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Delete.json | -| [certificatesGetSample.ts][certificatesgetsample] | Get the specified Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Get.json | -| [certificatesListSample.ts][certificateslistsample] | Get the Certificates in a given managed environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json | -| [certificatesUpdateSample.ts][certificatesupdatesample] | Patches a certificate. Currently only patching of tags is supported x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_Patch.json | -| [containerAppsAuthConfigsCreateOrUpdateSample.ts][containerappsauthconfigscreateorupdatesample] | Description for Create or update the AuthConfig for a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/AuthConfigs_CreateOrUpdate.json | -| [containerAppsAuthConfigsDeleteSample.ts][containerappsauthconfigsdeletesample] | Description for Delete a Container App AuthConfig. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/AuthConfigs_Delete.json | -| [containerAppsAuthConfigsGetSample.ts][containerappsauthconfigsgetsample] | Get a AuthConfig of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/AuthConfigs_Get.json | -| [containerAppsAuthConfigsListByContainerAppSample.ts][containerappsauthconfigslistbycontainerappsample] | Get the Container App AuthConfigs in a given resource group. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/AuthConfigs_ListByContainer.json | -| [containerAppsCreateOrUpdateSample.ts][containerappscreateorupdatesample] | Description for Create or update a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_CreateOrUpdate.json | -| [containerAppsDeleteSample.ts][containerappsdeletesample] | Description for Delete a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Delete.json | -| [containerAppsGetSample.ts][containerappsgetsample] | Get the properties of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Get.json | -| [containerAppsListByResourceGroupSample.ts][containerappslistbyresourcegroupsample] | Get the Container Apps in a given resource group. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListByResourceGroup.json | -| [containerAppsListBySubscriptionSample.ts][containerappslistbysubscriptionsample] | Get the Container Apps in a given subscription. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListBySubscription.json | -| [containerAppsListCustomHostNameAnalysisSample.ts][containerappslistcustomhostnameanalysissample] | Analyzes a custom hostname for a Container App x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json | -| [containerAppsListSecretsSample.ts][containerappslistsecretssample] | List secrets for a container app x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListSecrets.json | -| [containerAppsRevisionReplicasGetReplicaSample.ts][containerappsrevisionreplicasgetreplicasample] | Get a replica for a Container App Revision. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Replicas_Get.json | -| [containerAppsRevisionReplicasListReplicasSample.ts][containerappsrevisionreplicaslistreplicassample] | List replicas for a Container App Revision. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Replicas_List.json | -| [containerAppsRevisionsActivateRevisionSample.ts][containerappsrevisionsactivaterevisionsample] | Activates a revision for a Container App x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_Activate.json | -| [containerAppsRevisionsDeactivateRevisionSample.ts][containerappsrevisionsdeactivaterevisionsample] | Deactivates a revision for a Container App x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_Deactivate.json | -| [containerAppsRevisionsGetRevisionSample.ts][containerappsrevisionsgetrevisionsample] | Get a revision of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_Get.json | -| [containerAppsRevisionsListRevisionsSample.ts][containerappsrevisionslistrevisionssample] | Get the Revisions for a given Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_List.json | -| [containerAppsRevisionsRestartRevisionSample.ts][containerappsrevisionsrestartrevisionsample] | Restarts a revision for a Container App x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_Restart.json | -| [containerAppsSourceControlsCreateOrUpdateSample.ts][containerappssourcecontrolscreateorupdatesample] | Description for Create or update the SourceControl for a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/SourceControls_CreateOrUpdate.json | -| [containerAppsSourceControlsDeleteSample.ts][containerappssourcecontrolsdeletesample] | Description for Delete a Container App SourceControl. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/SourceControls_Delete.json | -| [containerAppsSourceControlsGetSample.ts][containerappssourcecontrolsgetsample] | Get a SourceControl of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/SourceControls_Get.json | -| [containerAppsSourceControlsListByContainerAppSample.ts][containerappssourcecontrolslistbycontainerappsample] | Get the Container App SourceControls in a given resource group. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/SourceControls_ListByContainer.json | -| [containerAppsUpdateSample.ts][containerappsupdatesample] | Patches a Container App. Currently only patching of tags is supported x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Patch.json | -| [daprComponentsCreateOrUpdateSample.ts][daprcomponentscreateorupdatesample] | Creates or updates a Dapr Component in a Managed Environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/DaprComponents_CreateOrUpdate.json | -| [daprComponentsDeleteSample.ts][daprcomponentsdeletesample] | Delete a Dapr Component from a Managed Environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/DaprComponents_Delete.json | -| [daprComponentsGetSample.ts][daprcomponentsgetsample] | Get a dapr component. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/DaprComponents_Get.json | -| [daprComponentsListSample.ts][daprcomponentslistsample] | Get the Dapr Components for a managed environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/DaprComponents_List.json | -| [managedEnvironmentsCreateOrUpdateSample.ts][managedenvironmentscreateorupdatesample] | Creates or updates a Managed Environment used to host container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json | -| [managedEnvironmentsDeleteSample.ts][managedenvironmentsdeletesample] | Delete a Managed Environment if it does not have any container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Delete.json | -| [managedEnvironmentsGetSample.ts][managedenvironmentsgetsample] | Get the properties of a Managed Environment used to host container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Get.json | -| [managedEnvironmentsListByResourceGroupSample.ts][managedenvironmentslistbyresourcegroupsample] | Get all the Managed Environments in a resource group. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json | -| [managedEnvironmentsListBySubscriptionSample.ts][managedenvironmentslistbysubscriptionsample] | Get all Managed Environments for a subscription. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListBySubscription.json | -| [managedEnvironmentsStoragesCreateOrUpdateSample.ts][managedenvironmentsstoragescreateorupdatesample] | Create or update storage for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json | -| [managedEnvironmentsStoragesDeleteSample.ts][managedenvironmentsstoragesdeletesample] | Delete storage for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_Delete.json | -| [managedEnvironmentsStoragesGetSample.ts][managedenvironmentsstoragesgetsample] | Get storage for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_Get.json | -| [managedEnvironmentsStoragesListSample.ts][managedenvironmentsstorageslistsample] | Get all storages for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_List.json | -| [managedEnvironmentsUpdateSample.ts][managedenvironmentsupdatesample] | Patches a Managed Environment. Only patching of tags is supported currently x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Patch.json | -| [operationsListSample.ts][operationslistsample] | Lists all of the available RP operations. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Operations_List.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://nodejs.org/about/releases/). - -Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using: - -```bash -npm install -g typescript -``` - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Compile the samples: - -```bash -npm run build -``` - -3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -4. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node dist/certificatesCreateOrUpdateSample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx cross-env node dist/certificatesCreateOrUpdateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[certificatescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesCreateOrUpdateSample.ts -[certificatesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesDeleteSample.ts -[certificatesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesGetSample.ts -[certificateslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesListSample.ts -[certificatesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesUpdateSample.ts -[containerappsauthconfigscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsAuthConfigsCreateOrUpdateSample.ts -[containerappsauthconfigsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsAuthConfigsDeleteSample.ts -[containerappsauthconfigsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsAuthConfigsGetSample.ts -[containerappsauthconfigslistbycontainerappsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsAuthConfigsListByContainerAppSample.ts -[containerappscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsCreateOrUpdateSample.ts -[containerappsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsDeleteSample.ts -[containerappsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsGetSample.ts -[containerappslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsListByResourceGroupSample.ts -[containerappslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsListBySubscriptionSample.ts -[containerappslistcustomhostnameanalysissample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsListCustomHostNameAnalysisSample.ts -[containerappslistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsListSecretsSample.ts -[containerappsrevisionreplicasgetreplicasample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionReplicasGetReplicaSample.ts -[containerappsrevisionreplicaslistreplicassample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionReplicasListReplicasSample.ts -[containerappsrevisionsactivaterevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsActivateRevisionSample.ts -[containerappsrevisionsdeactivaterevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsDeactivateRevisionSample.ts -[containerappsrevisionsgetrevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsGetRevisionSample.ts -[containerappsrevisionslistrevisionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsListRevisionsSample.ts -[containerappsrevisionsrestartrevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsRestartRevisionSample.ts -[containerappssourcecontrolscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsSourceControlsCreateOrUpdateSample.ts -[containerappssourcecontrolsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsSourceControlsDeleteSample.ts -[containerappssourcecontrolsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsSourceControlsGetSample.ts -[containerappssourcecontrolslistbycontainerappsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsSourceControlsListByContainerAppSample.ts -[containerappsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsUpdateSample.ts -[daprcomponentscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/daprComponentsCreateOrUpdateSample.ts -[daprcomponentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/daprComponentsDeleteSample.ts -[daprcomponentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/daprComponentsGetSample.ts -[daprcomponentslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/daprComponentsListSample.ts -[managedenvironmentscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsCreateOrUpdateSample.ts -[managedenvironmentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsDeleteSample.ts -[managedenvironmentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsGetSample.ts -[managedenvironmentslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsListByResourceGroupSample.ts -[managedenvironmentslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsListBySubscriptionSample.ts -[managedenvironmentsstoragescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsStoragesCreateOrUpdateSample.ts -[managedenvironmentsstoragesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsStoragesDeleteSample.ts -[managedenvironmentsstoragesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsStoragesGetSample.ts -[managedenvironmentsstorageslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsStoragesListSample.ts -[managedenvironmentsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsUpdateSample.ts -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/app/arm-app/samples/v1-beta/typescript/src/operationsListSample.ts -[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-app?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/app/arm-app/README.md -[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/package.json b/sdk/app/arm-app/samples/v1-beta/typescript/package.json deleted file mode 100644 index c33af0d72367..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "azure-arm-app-samples-ts-beta", - "private": true, - "version": "1.0.0", - "description": " client library samples for TypeScript (Beta)", - "engines": { - "node": ">=12.0.0" - }, - "scripts": { - "build": "tsc", - "prebuild": "rimraf dist/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/app/arm-app" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/app/arm-app", - "dependencies": { - "@azure/arm-app": "next", - "dotenv": "latest", - "@azure/identity": "^2.0.1" - }, - "devDependencies": { - "@types/node": "^12.0.0", - "typescript": "~4.4.0", - "rimraf": "latest" - } -} diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/sample.env b/sdk/app/arm-app/samples/v1-beta/typescript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesCreateOrUpdateSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesCreateOrUpdateSample.ts deleted file mode 100644 index 487eec304763..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesCreateOrUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - Certificate, - CertificatesCreateOrUpdateOptionalParams, - ContainerAppsAPIClient -} from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Create or Update a Certificate. - * - * @summary Create or Update a Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_CreateOrUpdate.json - */ -async function createOrUpdateCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const managedEnvironmentName = "testcontainerenv"; - const name = "certificate-firendly-name"; - const certificateEnvelope: Certificate = { - location: "East US", - properties: { - password: "private key password", - value: new Uint8Array() - } - }; - const options: CertificatesCreateOrUpdateOptionalParams = { - certificateEnvelope - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.createOrUpdate( - resourceGroupName, - managedEnvironmentName, - name, - options - ); - console.log(result); -} - -createOrUpdateCertificate().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesDeleteSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesDeleteSample.ts deleted file mode 100644 index c872144e3b1b..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Deletes the specified Certificate. - * - * @summary Deletes the specified Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Delete.json - */ -async function deleteCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const managedEnvironmentName = "testcontainerenv"; - const name = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.delete( - resourceGroupName, - managedEnvironmentName, - name - ); - console.log(result); -} - -deleteCertificate().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesGetSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesGetSample.ts deleted file mode 100644 index fb53e9432dcd..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the specified Certificate. - * - * @summary Get the specified Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificate_Get.json - */ -async function getCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const managedEnvironmentName = "testcontainerenv"; - const name = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.get( - resourceGroupName, - managedEnvironmentName, - name - ); - console.log(result); -} - -getCertificate().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesListSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesListSample.ts deleted file mode 100644 index 73c627622c1a..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesListSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Certificates in a given managed environment. - * - * @summary Get the Certificates in a given managed environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_ListByManagedEnvironment.json - */ -async function listCertificatesByManagedEnvironment() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const managedEnvironmentName = "testcontainerenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.certificates.list( - resourceGroupName, - managedEnvironmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listCertificatesByManagedEnvironment().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesUpdateSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesUpdateSample.ts deleted file mode 100644 index 95c86c42fe06..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/certificatesUpdateSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { CertificatePatch, ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Patches a certificate. Currently only patching of tags is supported - * - * @summary Patches a certificate. Currently only patching of tags is supported - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Certificates_Patch.json - */ -async function patchCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const managedEnvironmentName = "testcontainerenv"; - const name = "certificate-firendly-name"; - const certificateEnvelope: CertificatePatch = { - tags: { tag1: "value1", tag2: "value2" } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.update( - resourceGroupName, - managedEnvironmentName, - name, - certificateEnvelope - ); - console.log(result); -} - -patchCertificate().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsAuthConfigsCreateOrUpdateSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsAuthConfigsCreateOrUpdateSample.ts deleted file mode 100644 index 81f7090e87bf..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsAuthConfigsCreateOrUpdateSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AuthConfig, ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Description for Create or update the AuthConfig for a Container App. - * - * @summary Description for Create or update the AuthConfig for a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/AuthConfigs_CreateOrUpdate.json - */ -async function createOrUpdateContainerAppAuthConfig() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const name = "current"; - const authConfigEnvelope: AuthConfig = { - globalValidation: { unauthenticatedClientAction: "AllowAnonymous" }, - identityProviders: { - facebook: { - registration: { appId: "123", appSecretSettingName: "facebook-secret" } - } - }, - platform: { enabled: true } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.createOrUpdate( - resourceGroupName, - containerAppName, - name, - authConfigEnvelope - ); - console.log(result); -} - -createOrUpdateContainerAppAuthConfig().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsAuthConfigsDeleteSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsAuthConfigsDeleteSample.ts deleted file mode 100644 index 0554af0821fa..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsAuthConfigsDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Description for Delete a Container App AuthConfig. - * - * @summary Description for Delete a Container App AuthConfig. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/AuthConfigs_Delete.json - */ -async function deleteContainerAppAuthConfig() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const name = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.delete( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -deleteContainerAppAuthConfig().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsAuthConfigsGetSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsAuthConfigsGetSample.ts deleted file mode 100644 index 853a1febc1dd..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsAuthConfigsGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a AuthConfig of a Container App. - * - * @summary Get a AuthConfig of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/AuthConfigs_Get.json - */ -async function getContainerAppAuthConfig() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const name = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.get( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -getContainerAppAuthConfig().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsAuthConfigsListByContainerAppSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsAuthConfigsListByContainerAppSample.ts deleted file mode 100644 index e3f89107286b..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsAuthConfigsListByContainerAppSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Container App AuthConfigs in a given resource group. - * - * @summary Get the Container App AuthConfigs in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/AuthConfigs_ListByContainer.json - */ -async function listAuthConfigsByContainerApps() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsAuthConfigs.listByContainerApp( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listAuthConfigsByContainerApps().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsCreateOrUpdateSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsCreateOrUpdateSample.ts deleted file mode 100644 index cb2523bdfb55..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsCreateOrUpdateSample.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerApp, ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Description for Create or update a Container App. - * - * @summary Description for Create or update a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_CreateOrUpdate.json - */ -async function createOrUpdateContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const name = "testcontainerApp0"; - const containerAppEnvelope: ContainerApp = { - configuration: { - dapr: { appPort: 3000, appProtocol: "http", enabled: true }, - ingress: { - customDomains: [ - { - name: "www.my-name.com", - bindingType: "SniEnabled", - certificateId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com" - }, - { - name: "www.my-other-name.com", - bindingType: "SniEnabled", - certificateId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com" - } - ], - external: true, - targetPort: 3000 - } - }, - location: "East US", - managedEnvironmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - template: { - containers: [ - { - name: "testcontainerApp0", - image: "repo/testcontainerApp0:v1", - probes: [ - { - type: "liveness", - httpGet: { - path: "/health", - httpHeaders: [{ name: "Custom-Header", value: "Awesome" }], - port: 8080 - }, - initialDelaySeconds: 3, - periodSeconds: 3 - } - ] - } - ], - scale: { - maxReplicas: 5, - minReplicas: 1, - rules: [ - { - name: "httpscalingrule", - custom: { type: "http", metadata: { concurrentRequests: "50" } } - } - ] - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginCreateOrUpdateAndWait( - resourceGroupName, - name, - containerAppEnvelope - ); - console.log(result); -} - -createOrUpdateContainerApp().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsDeleteSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsDeleteSample.ts deleted file mode 100644 index c6b7ad11da66..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Description for Delete a Container App. - * - * @summary Description for Delete a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Delete.json - */ -async function deleteContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const name = "testWorkerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginDeleteAndWait( - resourceGroupName, - name - ); - console.log(result); -} - -deleteContainerApp().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsGetSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsGetSample.ts deleted file mode 100644 index c3ed9ba32bdf..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsGetSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the properties of a Container App. - * - * @summary Get the properties of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Get.json - */ -async function getContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const name = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.get(resourceGroupName, name); - console.log(result); -} - -getContainerApp().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsListByResourceGroupSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsListByResourceGroupSample.ts deleted file mode 100644 index ef6d4c259ce4..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsListByResourceGroupSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Container Apps in a given resource group. - * - * @summary Get the Container Apps in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListByResourceGroup.json - */ -async function listContainerAppsByResourceGroup() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerApps.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppsByResourceGroup().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsListBySubscriptionSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsListBySubscriptionSample.ts deleted file mode 100644 index 9204c4d3330c..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Container Apps in a given subscription. - * - * @summary Get the Container Apps in a given subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListBySubscription.json - */ -async function listContainerAppsBySubscription() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerApps.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppsBySubscription().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsListCustomHostNameAnalysisSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsListCustomHostNameAnalysisSample.ts deleted file mode 100644 index 549bd4a27bf5..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsListCustomHostNameAnalysisSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ContainerAppsListCustomHostNameAnalysisOptionalParams, - ContainerAppsAPIClient -} from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Analyzes a custom hostname for a Container App - * - * @summary Analyzes a custom hostname for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json - */ -async function analyzeCustomHostname() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const customHostname = "my.name.corp"; - const options: ContainerAppsListCustomHostNameAnalysisOptionalParams = { - customHostname - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.listCustomHostNameAnalysis( - resourceGroupName, - containerAppName, - options - ); - console.log(result); -} - -analyzeCustomHostname().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsListSecretsSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsListSecretsSample.ts deleted file mode 100644 index 966f520a5e27..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsListSecretsSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to List secrets for a container app - * - * @summary List secrets for a container app - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListSecrets.json - */ -async function listContainerAppsSecrets() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const name = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.listSecrets( - resourceGroupName, - name - ); - console.log(result); -} - -listContainerAppsSecrets().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionReplicasGetReplicaSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionReplicasGetReplicaSample.ts deleted file mode 100644 index 30ef6ae6b233..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionReplicasGetReplicaSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a replica for a Container App Revision. - * - * @summary Get a replica for a Container App Revision. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Replicas_Get.json - */ -async function getContainerAppRevisionReplica() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "myapp"; - const revisionName = "myapp--0wlqy09"; - const name = "myapp--0wlqy09-5d9774cff-5wnd8"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisionReplicas.getReplica( - resourceGroupName, - containerAppName, - revisionName, - name - ); - console.log(result); -} - -getContainerAppRevisionReplica().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionReplicasListReplicasSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionReplicasListReplicasSample.ts deleted file mode 100644 index 844b7bdee308..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionReplicasListReplicasSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to List replicas for a Container App Revision. - * - * @summary List replicas for a Container App Revision. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Replicas_List.json - */ -async function listContainerAppReplicas() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "myapp"; - const revisionName = "myapp--0wlqy09"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisionReplicas.listReplicas( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -listContainerAppReplicas().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsActivateRevisionSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsActivateRevisionSample.ts deleted file mode 100644 index 38c6a5eb9828..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsActivateRevisionSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Activates a revision for a Container App - * - * @summary Activates a revision for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_Activate.json - */ -async function activateContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const name = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.activateRevision( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -activateContainerAppRevision().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsDeactivateRevisionSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsDeactivateRevisionSample.ts deleted file mode 100644 index d413520920df..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsDeactivateRevisionSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Deactivates a revision for a Container App - * - * @summary Deactivates a revision for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_Deactivate.json - */ -async function deactivateContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const name = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.deactivateRevision( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -deactivateContainerAppRevision().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsGetRevisionSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsGetRevisionSample.ts deleted file mode 100644 index 2a97703a317e..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsGetRevisionSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a revision of a Container App. - * - * @summary Get a revision of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_Get.json - */ -async function getContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const name = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.getRevision( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -getContainerAppRevision().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsListRevisionsSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsListRevisionsSample.ts deleted file mode 100644 index 13ca118da5b4..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsListRevisionsSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Revisions for a given Container App. - * - * @summary Get the Revisions for a given Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_List.json - */ -async function listContainerAppRevisions() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsRevisions.listRevisions( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppRevisions().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsRestartRevisionSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsRestartRevisionSample.ts deleted file mode 100644 index aaec1158e232..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsRevisionsRestartRevisionSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Restarts a revision for a Container App - * - * @summary Restarts a revision for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Revisions_Restart.json - */ -async function restartContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testStaticSite0"; - const name = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.restartRevision( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -restartContainerAppRevision().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsSourceControlsCreateOrUpdateSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsSourceControlsCreateOrUpdateSample.ts deleted file mode 100644 index fb65ad01eb7a..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsSourceControlsCreateOrUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { SourceControl, ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Description for Create or update the SourceControl for a Container App. - * - * @summary Description for Create or update the SourceControl for a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/SourceControls_CreateOrUpdate.json - */ -async function createOrUpdateContainerAppSourceControl() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const name = "current"; - const sourceControlEnvelope: SourceControl = { - branch: "master", - githubActionConfiguration: { - azureCredentials: { - clientId: "", - clientSecret: "", - tenantId: "" - }, - registryInfo: { - registryPassword: "", - registryUrl: "xwang971reg.azurecr.io", - registryUserName: "xwang971reg" - } - }, - repoUrl: "https://github.com/xwang971/ghatest" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.beginCreateOrUpdateAndWait( - resourceGroupName, - containerAppName, - name, - sourceControlEnvelope - ); - console.log(result); -} - -createOrUpdateContainerAppSourceControl().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsSourceControlsDeleteSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsSourceControlsDeleteSample.ts deleted file mode 100644 index 85ea0498d6a4..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsSourceControlsDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Description for Delete a Container App SourceControl. - * - * @summary Description for Delete a Container App SourceControl. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/SourceControls_Delete.json - */ -async function deleteContainerAppSourceControl() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const name = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.beginDeleteAndWait( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -deleteContainerAppSourceControl().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsSourceControlsGetSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsSourceControlsGetSample.ts deleted file mode 100644 index be593d5790a1..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsSourceControlsGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a SourceControl of a Container App. - * - * @summary Get a SourceControl of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/SourceControls_Get.json - */ -async function getContainerAppSourceControl() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const name = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.get( - resourceGroupName, - containerAppName, - name - ); - console.log(result); -} - -getContainerAppSourceControl().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsSourceControlsListByContainerAppSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsSourceControlsListByContainerAppSample.ts deleted file mode 100644 index b4bb6d8b7e93..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsSourceControlsListByContainerAppSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Container App SourceControls in a given resource group. - * - * @summary Get the Container App SourceControls in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/SourceControls_ListByContainer.json - */ -async function listAppSourceControls() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsSourceControls.listByContainerApp( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listAppSourceControls().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsUpdateSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsUpdateSample.ts deleted file mode 100644 index 9343d0472dac..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/containerAppsUpdateSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppPatch, ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Patches a Container App. Currently only patching of tags is supported - * - * @summary Patches a Container App. Currently only patching of tags is supported - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_Patch.json - */ -async function patchContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const name = "testcontainerApp0"; - const containerAppEnvelope: ContainerAppPatch = { - tags: { tag1: "value1", tag2: "value2" } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.update( - resourceGroupName, - name, - containerAppEnvelope - ); - console.log(result); -} - -patchContainerApp().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/daprComponentsCreateOrUpdateSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/daprComponentsCreateOrUpdateSample.ts deleted file mode 100644 index dd0318e85e58..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/daprComponentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { DaprComponent, ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Creates or updates a Dapr Component in a Managed Environment. - * - * @summary Creates or updates a Dapr Component in a Managed Environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/DaprComponents_CreateOrUpdate.json - */ -async function createOrUpdateDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const name = "reddog"; - const daprComponentEnvelope: DaprComponent = { - componentType: "state.azure.cosmosdb", - ignoreErrors: false, - initTimeout: "50s", - metadata: [ - { name: "url", value: "" }, - { name: "database", value: "itemsDB" }, - { name: "collection", value: "items" }, - { name: "masterkey", secretRef: "masterkey" } - ], - scopes: ["container-app-1", "container-app-2"], - secrets: [{ name: "masterkey", value: "keyvalue" }], - version: "v1" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.createOrUpdate( - resourceGroupName, - environmentName, - name, - daprComponentEnvelope - ); - console.log(result); -} - -createOrUpdateDaprComponent().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/daprComponentsDeleteSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/daprComponentsDeleteSample.ts deleted file mode 100644 index d91260e74d5b..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/daprComponentsDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Delete a Dapr Component from a Managed Environment. - * - * @summary Delete a Dapr Component from a Managed Environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/DaprComponents_Delete.json - */ -async function deleteDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const name = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.delete( - resourceGroupName, - environmentName, - name - ); - console.log(result); -} - -deleteDaprComponent().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/daprComponentsGetSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/daprComponentsGetSample.ts deleted file mode 100644 index aaeb76f21d85..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/daprComponentsGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a dapr component. - * - * @summary Get a dapr component. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/DaprComponents_Get.json - */ -async function getDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const name = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.get( - resourceGroupName, - environmentName, - name - ); - console.log(result); -} - -getDaprComponent().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/daprComponentsListSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/daprComponentsListSample.ts deleted file mode 100644 index 42c3487bd276..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/daprComponentsListSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Dapr Components for a managed environment. - * - * @summary Get the Dapr Components for a managed environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/DaprComponents_List.json - */ -async function listDaprComponents() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.daprComponents.list( - resourceGroupName, - environmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listDaprComponents().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsCreateOrUpdateSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsCreateOrUpdateSample.ts deleted file mode 100644 index 8030b24e4581..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ManagedEnvironment, ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Creates or updates a Managed Environment used to host container apps. - * - * @summary Creates or updates a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json - */ -async function createEnvironments() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const name = "testcontainerenv"; - const environmentEnvelope: ManagedEnvironment = { - appLogsConfiguration: { - logAnalyticsConfiguration: { customerId: "string", sharedKey: "string" } - }, - location: "East US" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginCreateOrUpdateAndWait( - resourceGroupName, - name, - environmentEnvelope - ); - console.log(result); -} - -createEnvironments().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsDeleteSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsDeleteSample.ts deleted file mode 100644 index 50c93edba9f4..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Delete a Managed Environment if it does not have any container apps. - * - * @summary Delete a Managed Environment if it does not have any container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Delete.json - */ -async function deleteEnvironmentByName() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const name = "examplekenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginDeleteAndWait( - resourceGroupName, - name - ); - console.log(result); -} - -deleteEnvironmentByName().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsGetSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsGetSample.ts deleted file mode 100644 index db4f69523265..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsGetSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the properties of a Managed Environment used to host container apps. - * - * @summary Get the properties of a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Get.json - */ -async function getEnvironmentsByName() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const name = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.get(resourceGroupName, name); - console.log(result); -} - -getEnvironmentsByName().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsListByResourceGroupSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsListByResourceGroupSample.ts deleted file mode 100644 index cf452fab2bf6..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsListByResourceGroupSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get all the Managed Environments in a resource group. - * - * @summary Get all the Managed Environments in a resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json - */ -async function listEnvironmentsByResourceGroup() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listEnvironmentsByResourceGroup().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsListBySubscriptionSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsListBySubscriptionSample.ts deleted file mode 100644 index ccfe7c862995..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get all Managed Environments for a subscription. - * - * @summary Get all Managed Environments for a subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_ListBySubscription.json - */ -async function listEnvironmentsBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -listEnvironmentsBySubscription().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsStoragesCreateOrUpdateSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsStoragesCreateOrUpdateSample.ts deleted file mode 100644 index 96a53c68f61f..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsStoragesCreateOrUpdateSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ManagedEnvironmentStorage, - ContainerAppsAPIClient -} from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Create or update storage for a managedEnvironment. - * - * @summary Create or update storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json - */ -async function createOrUpdateEnvironmentsStorage() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const envName = "managedEnv"; - const name = "jlaw-demo1"; - const storageEnvelope: ManagedEnvironmentStorage = { - properties: { - azureFile: { - accessMode: "ReadOnly", - accountKey: "key", - accountName: "account1", - shareName: "share1" - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.createOrUpdate( - resourceGroupName, - envName, - name, - storageEnvelope - ); - console.log(result); -} - -createOrUpdateEnvironmentsStorage().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsStoragesDeleteSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsStoragesDeleteSample.ts deleted file mode 100644 index 71a66acd9251..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsStoragesDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Delete storage for a managedEnvironment. - * - * @summary Delete storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_Delete.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const envName = "managedEnv"; - const name = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.delete( - resourceGroupName, - envName, - name - ); - console.log(result); -} - -listEnvironmentsStoragesBySubscription().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsStoragesGetSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsStoragesGetSample.ts deleted file mode 100644 index 76bd4e1c4a4d..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsStoragesGetSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get storage for a managedEnvironment. - * - * @summary Get storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_Get.json - */ -async function getAEnvironmentsStoragePropertiesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const envName = "managedEnv"; - const name = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.get( - resourceGroupName, - envName, - name - ); - console.log(result); -} - -getAEnvironmentsStoragePropertiesBySubscription().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsStoragesListSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsStoragesListSample.ts deleted file mode 100644 index dbf75cbe839b..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsStoragesListSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get all storages for a managedEnvironment. - * - * @summary Get all storages for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironmentsStorages_List.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const envName = "managedEnv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.list( - resourceGroupName, - envName - ); - console.log(result); -} - -listEnvironmentsStoragesBySubscription().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsUpdateSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsUpdateSample.ts deleted file mode 100644 index d3693deee729..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/managedEnvironmentsUpdateSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ManagedEnvironmentPatch, - ContainerAppsAPIClient -} from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Patches a Managed Environment. Only patching of tags is supported currently - * - * @summary Patches a Managed Environment. Only patching of tags is supported currently - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ManagedEnvironments_Patch.json - */ -async function patchManagedEnvironment() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const name = "testcontainerenv"; - const environmentEnvelope: ManagedEnvironmentPatch = { - tags: { tag1: "value1", tag2: "value2" } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.update( - resourceGroupName, - name, - environmentEnvelope - ); - console.log(result); -} - -patchManagedEnvironment().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/src/operationsListSample.ts b/sdk/app/arm-app/samples/v1-beta/typescript/src/operationsListSample.ts deleted file mode 100644 index 62c55bbfb800..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/src/operationsListSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-app"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Lists all of the available RP operations. - * - * @summary Lists all of the available RP operations. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/Operations_List.json - */ -async function listAllOperations() { - const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -listAllOperations().catch(console.error); diff --git a/sdk/app/arm-app/samples/v1-beta/typescript/tsconfig.json b/sdk/app/arm-app/samples/v1-beta/typescript/tsconfig.json deleted file mode 100644 index 416c2dd82e00..000000000000 --- a/sdk/app/arm-app/samples/v1-beta/typescript/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2018", - "module": "commonjs", - "moduleResolution": "node", - "resolveJsonModule": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "alwaysStrict": true, - "outDir": "dist", - "rootDir": "src" - }, - "include": [ - "src/**.ts" - ] -} diff --git a/sdk/app/arm-app/src/containerAppsAPIClient.ts b/sdk/app/arm-app/src/containerAppsAPIClient.ts index c40368293462..bee4fc1d78b2 100644 --- a/sdk/app/arm-app/src/containerAppsAPIClient.ts +++ b/sdk/app/arm-app/src/containerAppsAPIClient.ts @@ -66,7 +66,7 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-app/1.0.0-beta.1`; + const packageDetails = `azsdk-js-arm-app/1.0.0-beta.2`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -81,8 +81,7 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { userAgentOptions: { userAgentPrefix }, - baseUri: - options.endpoint ?? options.baseUri ?? "https://management.azure.com" + baseUri: options.endpoint || "https://management.azure.com" }; super(optionsWithDefaults); // Parameter assignments diff --git a/sdk/app/arm-app/src/operations/containerApps.ts b/sdk/app/arm-app/src/operations/containerApps.ts index 5dd86d9c6702..70da8ee0941f 100644 --- a/sdk/app/arm-app/src/operations/containerApps.ts +++ b/sdk/app/arm-app/src/operations/containerApps.ts @@ -253,12 +253,10 @@ export class ContainerAppsImpl implements ContainerApps { { resourceGroupName, name, containerAppEnvelope, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); - await poller.poll(); - return poller; } /** @@ -338,12 +336,10 @@ export class ContainerAppsImpl implements ContainerApps { { resourceGroupName, name, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); - await poller.poll(); - return poller; } /** diff --git a/sdk/app/arm-app/src/operations/containerAppsSourceControls.ts b/sdk/app/arm-app/src/operations/containerAppsSourceControls.ts index 9861d0ebaa04..cfd2284eaba0 100644 --- a/sdk/app/arm-app/src/operations/containerAppsSourceControls.ts +++ b/sdk/app/arm-app/src/operations/containerAppsSourceControls.ts @@ -218,12 +218,10 @@ export class ContainerAppsSourceControlsImpl }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); - await poller.poll(); - return poller; } /** @@ -308,12 +306,10 @@ export class ContainerAppsSourceControlsImpl { resourceGroupName, containerAppName, name, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); - await poller.poll(); - return poller; } /** diff --git a/sdk/app/arm-app/src/operations/managedEnvironments.ts b/sdk/app/arm-app/src/operations/managedEnvironments.ts index e1340d924ede..5aea27c412f8 100644 --- a/sdk/app/arm-app/src/operations/managedEnvironments.ts +++ b/sdk/app/arm-app/src/operations/managedEnvironments.ts @@ -249,12 +249,10 @@ export class ManagedEnvironmentsImpl implements ManagedEnvironments { { resourceGroupName, name, environmentEnvelope, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); - await poller.poll(); - return poller; } /** @@ -334,12 +332,10 @@ export class ManagedEnvironmentsImpl implements ManagedEnvironments { { resourceGroupName, name, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); - await poller.poll(); - return poller; } /** diff --git a/sdk/app/arm-app/tsconfig.json b/sdk/app/arm-app/tsconfig.json index e17400c98311..3e6ae96443f3 100644 --- a/sdk/app/arm-app/tsconfig.json +++ b/sdk/app/arm-app/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-app": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"