diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index a0121f606644..13c99ef36159 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -2188,7 +2188,7 @@ packages: resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} dependencies: '@types/connect': 3.4.35 - '@types/node': 14.18.46 + '@types/node': 16.18.28 dev: false /@types/chai-as-promised/7.1.5: @@ -2210,7 +2210,7 @@ packages: /@types/connect/3.4.35: resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} dependencies: - '@types/node': 14.18.46 + '@types/node': 16.18.28 dev: false /@types/cookie/0.4.1: @@ -2220,7 +2220,7 @@ packages: /@types/cors/2.8.13: resolution: {integrity: sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA==} dependencies: - '@types/node': 14.18.46 + '@types/node': 16.18.28 dev: false /@types/debug/4.1.7: @@ -2232,7 +2232,7 @@ packages: /@types/decompress/4.2.4: resolution: {integrity: sha512-/C8kTMRTNiNuWGl5nEyKbPiMv6HA+0RbEXzFhFBEzASM6+oa4tJro9b8nj7eRlOFfuLdzUU+DS/GPDlvvzMOhA==} dependencies: - '@types/node': 14.18.46 + '@types/node': 16.18.28 dev: false /@types/eslint/8.4.10: @@ -2253,7 +2253,7 @@ packages: /@types/express-serve-static-core/4.17.34: resolution: {integrity: sha512-fvr49XlCGoUj2Pp730AItckfjat4WNb0lb3kfrLWffd+RLeoGAMsq7UOy04PAPtoL01uKwcp6u8nhzpgpDYr3w==} dependencies: - '@types/node': 14.18.46 + '@types/node': 16.18.28 '@types/qs': 6.9.7 '@types/range-parser': 1.2.4 '@types/send': 0.17.1 @@ -2271,13 +2271,13 @@ packages: /@types/fs-extra/8.1.2: resolution: {integrity: sha512-SvSrYXfWSc7R4eqnOzbQF4TZmfpNSM9FrSWLU3EUnWBuyZqNBOrv1B1JA3byUDPUl9z4Ab3jeZG2eDdySlgNMg==} dependencies: - '@types/node': 14.18.46 + '@types/node': 16.18.28 dev: false /@types/fs-extra/9.0.13: resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==} dependencies: - '@types/node': 14.18.46 + '@types/node': 16.18.28 dev: false /@types/inquirer/8.2.6: @@ -2290,7 +2290,7 @@ packages: /@types/is-buffer/2.0.0: resolution: {integrity: sha512-0f7N/e3BAz32qDYvgB4d2cqv1DqUwvGxHkXsrucICn8la1Vb6Yl6Eg8mPScGwUiqHJeE7diXlzaK+QMA9m4Gxw==} dependencies: - '@types/node': 14.18.46 + '@types/node': 16.18.28 dev: false /@types/json-schema/7.0.11: @@ -2304,13 +2304,13 @@ packages: /@types/jsonwebtoken/9.0.2: resolution: {integrity: sha512-drE6uz7QBKq1fYqqoFKTDRdFCPHd5TCub75BM+D+cMx7NU9hUz7SESLfC2fSCXVFMO5Yj8sOWHuGqPgjc+fz0Q==} dependencies: - '@types/node': 14.18.46 + '@types/node': 16.18.28 dev: false /@types/jws/3.2.5: resolution: {integrity: sha512-xGTxZH34xOryaTN8CMsvhh9lfNqFuHiMoRvsLYWQdBJHqiECyfInXVl2eK8Jz2emxZWMIn5RBlmr3oDVPeWujw==} dependencies: - '@types/node': 14.18.46 + '@types/node': 16.18.28 dev: false /@types/linkify-it/3.0.2: @@ -2361,13 +2361,13 @@ packages: /@types/mysql/2.15.19: resolution: {integrity: sha512-wSRg2QZv14CWcZXkgdvHbbV2ACufNy5EgI8mBBxnJIptchv7DBy/h53VMa2jDhyo0C9MO4iowE6z9vF8Ja1DkQ==} dependencies: - '@types/node': 14.18.46 + '@types/node': 16.18.28 dev: false /@types/node-fetch/2.6.3: resolution: {integrity: sha512-ETTL1mOEdq/sxUtgtOhKjyB2Irra4cjxksvcMUR5Zr4n+PxVhsCD9WS46oPbHL3et9Zde7CNRr+WUNlcHvsX+w==} dependencies: - '@types/node': 14.18.46 + '@types/node': 16.18.28 form-data: 3.0.1 dev: false @@ -2392,7 +2392,7 @@ packages: /@types/pg/8.6.1: resolution: {integrity: sha512-1Kc4oAGzAl7uqUStZCDvaLFqZrW9qWSjXOmBfdgyBP5La7Us6Mg4GBvRlSoaZMhQF/zSj1C8CtKMBkoiT8eL8w==} dependencies: - '@types/node': 14.18.46 + '@types/node': 16.18.28 pg-protocol: 1.6.0 pg-types: 2.2.0 dev: false @@ -2420,7 +2420,7 @@ packages: /@types/resolve/1.17.1: resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} dependencies: - '@types/node': 14.18.46 + '@types/node': 16.18.28 dev: false /@types/semaphore/1.1.1: @@ -2439,14 +2439,14 @@ packages: resolution: {integrity: sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==} dependencies: '@types/mime': 1.3.2 - '@types/node': 14.18.46 + '@types/node': 16.18.28 dev: false /@types/serve-static/1.15.1: resolution: {integrity: sha512-NUo5XNiAdULrJENtJXZZ3fHtfMolzZwczzBbnAeBbqBwG+LaG6YaJtuwzwGSQZ2wsCrxjEhNNjAkKigy3n8teQ==} dependencies: '@types/mime': 3.0.1 - '@types/node': 14.18.46 + '@types/node': 16.18.28 dev: false /@types/sinon/10.0.14: @@ -2468,13 +2468,13 @@ packages: /@types/stoppable/1.1.1: resolution: {integrity: sha512-b8N+fCADRIYYrGZOcmOR8ZNBOqhktWTB/bMUl5LvGtT201QKJZOOH5UsFyI3qtteM6ZAJbJqZoBcLqqxKIwjhw==} dependencies: - '@types/node': 14.18.46 + '@types/node': 16.18.28 dev: false /@types/through/0.0.30: resolution: {integrity: sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==} dependencies: - '@types/node': 14.18.46 + '@types/node': 16.18.28 dev: false /@types/tough-cookie/4.0.2: @@ -2488,7 +2488,7 @@ packages: /@types/tunnel/0.0.3: resolution: {integrity: sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==} dependencies: - '@types/node': 14.18.46 + '@types/node': 16.18.28 dev: false /@types/underscore/1.11.4: @@ -2506,19 +2506,19 @@ packages: /@types/ws/7.4.7: resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} dependencies: - '@types/node': 14.18.46 + '@types/node': 16.18.28 dev: false /@types/ws/8.5.4: resolution: {integrity: sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==} dependencies: - '@types/node': 14.18.46 + '@types/node': 16.18.28 dev: false /@types/xml2js/0.4.11: resolution: {integrity: sha512-JdigeAKmCyoJUiQljjr7tQG3if9NkqGUgwEUqBvV0N7LM4HyQk7UXCnusRa1lnvXAEYJ8mw8GtZWioagNztOwA==} dependencies: - '@types/node': 14.18.46 + '@types/node': 16.18.28 dev: false /@types/yargs-parser/21.0.0: @@ -2535,7 +2535,7 @@ packages: resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==} requiresBuild: true dependencies: - '@types/node': 14.18.46 + '@types/node': 16.18.28 dev: false optional: true @@ -3540,7 +3540,7 @@ packages: resolution: {integrity: sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==} deprecated: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) dependencies: - ms: 2.1.1 + ms: 2.1.3 dev: false /debug/3.2.7: @@ -3771,7 +3771,7 @@ packages: dependencies: semver: 7.5.0 shelljs: 0.8.5 - typescript: 5.1.0-dev.20230511 + typescript: 5.1.0-dev.20230515 dev: false /ecdsa-sig-formatter/1.0.11: @@ -3822,7 +3822,7 @@ packages: dependencies: '@types/cookie': 0.4.1 '@types/cors': 2.8.13 - '@types/node': 14.18.46 + '@types/node': 16.18.28 accepts: 1.3.8 base64id: 2.0.0 cookie: 0.4.2 @@ -4746,7 +4746,7 @@ packages: fs.realpath: 1.0.0 inflight: 1.0.6 inherits: 2.0.4 - minimatch: 3.0.4 + minimatch: 3.1.2 once: 1.4.0 path-is-absolute: 1.0.1 dev: false @@ -7043,7 +7043,7 @@ packages: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 14.18.46 + '@types/node': 16.18.28 long: 5.2.3 dev: false @@ -8315,8 +8315,8 @@ packages: hasBin: true dev: false - /typescript/5.1.0-dev.20230511: - resolution: {integrity: sha512-T/GsNgbl4YWUZwSxCrj9uq2aIj7OC/5EyXqj4exIhRbwZEpjPIflv2TEqm6K5fFQhqKQpFATE8OBvY0Qzu8D1A==} + /typescript/5.1.0-dev.20230515: + resolution: {integrity: sha512-yn0MGsy6U0QAVF+lXW6LPupQmuRsyA0xUJetqw2tDqa+49231BpkhTuY6oEwLsc98tiEzCfIw7hzbLsiwVGFaA==} engines: {node: '>=14.17'} hasBin: true dev: false @@ -14176,7 +14176,7 @@ packages: dev: false file:projects/arm-selfhelp.tgz: - resolution: {integrity: sha512-p8aapHDpKa8OpG/SM/+3ZVTZOk2UqRru20IRlBe++/8BVqP3PaOqyaX1FBM9L9v0AaetNazNSd819VRM4QehjA==, tarball: file:projects/arm-selfhelp.tgz} + resolution: {integrity: sha512-WryVDsrQfP69Zi4rvuk2+hv8QZ2Bnpf0IY5Wv4dez/66SA4cSmEuI5RmPmw+NKxhJ/vd6VPhHJZsLHyqmLwibw==, tarball: file:projects/arm-selfhelp.tgz} name: '@rush-temp/arm-selfhelp' version: 0.0.0 dependencies: @@ -14197,7 +14197,7 @@ packages: rollup: 2.79.1 rollup-plugin-sourcemaps: 0.6.3_m742s5qpci6ulntpyriekwplh4 tslib: 2.5.0 - typescript: 5.0.4 + typescript: 4.8.4 uglify-js: 3.17.4 transitivePeerDependencies: - supports-color diff --git a/sdk/selfhelp/arm-selfhelp/CHANGELOG.md b/sdk/selfhelp/arm-selfhelp/CHANGELOG.md deleted file mode 100644 index 4f29327dba04..000000000000 --- a/sdk/selfhelp/arm-selfhelp/CHANGELOG.md +++ /dev/null @@ -1,5 +0,0 @@ -# Release History - -## 1.0.0-beta.1 (2023-04-27) - -The package of @azure/arm-selfhelp 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/selfhelp/arm-selfhelp/README.md b/sdk/selfhelp/arm-selfhelp/README.md index 79fe7daaaf54..9c0564d0523d 100644 --- a/sdk/selfhelp/arm-selfhelp/README.md +++ b/sdk/selfhelp/arm-selfhelp/README.md @@ -53,14 +53,15 @@ const { HelpRP } = require("@azure/arm-selfhelp"); 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 client = new HelpRP(new DefaultAzureCredential()); +const subscriptionId = "00000000-0000-0000-0000-000000000000"; +const client = new HelpRP(new DefaultAzureCredential(), subscriptionId); // For client-side applications running in the browser, use this code instead: // const credential = new InteractiveBrowserCredential({ // tenantId: "", // clientId: "" // }); -// const client = new HelpRP(credential); +// const client = new HelpRP(credential, subscriptionId); ``` diff --git a/sdk/selfhelp/arm-selfhelp/_meta.json b/sdk/selfhelp/arm-selfhelp/_meta.json index c5c14c4f0777..77e7b6d2623c 100644 --- a/sdk/selfhelp/arm-selfhelp/_meta.json +++ b/sdk/selfhelp/arm-selfhelp/_meta.json @@ -1,8 +1,8 @@ { - "commit": "2e2f8781fac5b72af86895d2e97ee0b1fab02048", + "commit": "724d25ed1b226d8f85f13e43a2e457d8e32f2daa", "readme": "specification/help/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\help\\resource-manager\\readme.md --use=@autorest/typescript@6.0.1 --generate-sample=true", + "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/help/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.10", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.6.2", - "use": "@autorest/typescript@6.0.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.0", + "use": "@autorest/typescript@6.0.0-rc.10" } \ No newline at end of file diff --git a/sdk/selfhelp/arm-selfhelp/assets.json b/sdk/selfhelp/arm-selfhelp/assets.json deleted file mode 100644 index 55f39628bb29..000000000000 --- a/sdk/selfhelp/arm-selfhelp/assets.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "AssetsRepo": "Azure/azure-sdk-assets", - "AssetsRepoPrefixPath": "js", - "TagPrefix": "js/selfhelp/arm-selfhelp", - "Tag": "js/selfhelp/arm-selfhelp_0633afaf92" -} diff --git a/sdk/selfhelp/arm-selfhelp/package.json b/sdk/selfhelp/arm-selfhelp/package.json index 523e3a32bbd5..df0cb99fb1eb 100644 --- a/sdk/selfhelp/arm-selfhelp/package.json +++ b/sdk/selfhelp/arm-selfhelp/package.json @@ -36,7 +36,7 @@ "mkdirp": "^2.1.2", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", - "typescript": "~5.0.0", + "typescript": "~4.8.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", "dotenv": "^16.0.0", @@ -111,13 +111,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/selfhelp/arm-selfhelp", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-selfhelp?view=azure-node-preview" - } + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/selfhelp/arm-selfhelp" } \ No newline at end of file diff --git a/sdk/selfhelp/arm-selfhelp/samples-dev/diagnosticsCheckNameAvailabilitySample.ts b/sdk/selfhelp/arm-selfhelp/samples-dev/diagnosticsCheckNameAvailabilitySample.ts deleted file mode 100644 index 9dd01890f755..000000000000 --- a/sdk/selfhelp/arm-selfhelp/samples-dev/diagnosticsCheckNameAvailabilitySample.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - CheckNameAvailabilityRequest, - DiagnosticsCheckNameAvailabilityOptionalParams, - HelpRP -} from "@azure/arm-selfhelp"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to This API is used to check the uniqueness of a resource name used for a diagnostic check. - * - * @summary This API is used to check the uniqueness of a resource name used for a diagnostic check. - * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/CheckNameAvailabilityForDiagnosticWhenNameIsAvailable.json - */ -async function exampleWhenNameIsAvailableForADiagnosticResource() { - const scope = "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6"; - const checkNameAvailabilityRequest: CheckNameAvailabilityRequest = { - name: "sampleName", - type: "Microsoft.Help/diagnostics" - }; - const options: DiagnosticsCheckNameAvailabilityOptionalParams = { - checkNameAvailabilityRequest - }; - const credential = new DefaultAzureCredential(); - const client = new HelpRP(credential); - const result = await client.diagnostics.checkNameAvailability(scope, options); - console.log(result); -} - -/** - * This sample demonstrates how to This API is used to check the uniqueness of a resource name used for a diagnostic check. - * - * @summary This API is used to check the uniqueness of a resource name used for a diagnostic check. - * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/CheckNameAvailabilityForDiagnosticWhenNameIsNotAvailable.json - */ -async function exampleWhenNameIsNotAvailableForADiagnosticResource() { - const scope = "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6"; - const checkNameAvailabilityRequest: CheckNameAvailabilityRequest = { - name: "sampleName", - type: "Microsoft.Help/diagnostics" - }; - const options: DiagnosticsCheckNameAvailabilityOptionalParams = { - checkNameAvailabilityRequest - }; - const credential = new DefaultAzureCredential(); - const client = new HelpRP(credential); - const result = await client.diagnostics.checkNameAvailability(scope, options); - console.log(result); -} - -async function main() { - exampleWhenNameIsAvailableForADiagnosticResource(); - exampleWhenNameIsNotAvailableForADiagnosticResource(); -} - -main().catch(console.error); diff --git a/sdk/selfhelp/arm-selfhelp/samples-dev/diagnosticsCreateSample.ts b/sdk/selfhelp/arm-selfhelp/samples-dev/diagnosticsCreateSample.ts deleted file mode 100644 index 5daff5c027b0..000000000000 --- a/sdk/selfhelp/arm-selfhelp/samples-dev/diagnosticsCreateSample.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 { HelpRP } from "@azure/arm-selfhelp"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Diagnostics tells you precisely the root cause of the issue and how to address it. You can get diagnostics once you discover and identify the relevant solution for your Azure issue.

You can create diagnostics using the ‘solutionId’ from Solution Discovery API response and ‘additionalParameters’

Note: ‘requiredParameterSets’ from Solutions Discovery API response must be passed via ‘additionalParameters’ as an input to Diagnostics API - * - * @summary Diagnostics tells you precisely the root cause of the issue and how to address it. You can get diagnostics once you discover and identify the relevant solution for your Azure issue.

You can create diagnostics using the ‘solutionId’ from Solution Discovery API response and ‘additionalParameters’

Note: ‘requiredParameterSets’ from Solutions Discovery API response must be passed via ‘additionalParameters’ as an input to Diagnostics API - * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/CreateDiagnosticForKeyVaultResource.json - */ -async function createsADiagnosticForAKeyVaultResource() { - const scope = - "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read"; - const diagnosticsResourceName = "VMNotWorkingInsight"; - const credential = new DefaultAzureCredential(); - const client = new HelpRP(credential); - const result = await client.diagnostics.beginCreateAndWait( - scope, - diagnosticsResourceName - ); - console.log(result); -} - -async function main() { - createsADiagnosticForAKeyVaultResource(); -} - -main().catch(console.error); diff --git a/sdk/selfhelp/arm-selfhelp/samples-dev/diagnosticsGetSample.ts b/sdk/selfhelp/arm-selfhelp/samples-dev/diagnosticsGetSample.ts deleted file mode 100644 index f08f6656e2e8..000000000000 --- a/sdk/selfhelp/arm-selfhelp/samples-dev/diagnosticsGetSample.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 { HelpRP } from "@azure/arm-selfhelp"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the diagnostics using the 'diagnosticsResourceName' you chose while creating the diagnostic. - * - * @summary Get the diagnostics using the 'diagnosticsResourceName' you chose while creating the diagnostic. - * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/GetDiagnosticForKeyVaultResource.json - */ -async function getsADiagnosticForAKeyVaultResource() { - const scope = - "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read"; - const diagnosticsResourceName = "VMNotWorkingInsight"; - const credential = new DefaultAzureCredential(); - const client = new HelpRP(credential); - const result = await client.diagnostics.get(scope, diagnosticsResourceName); - console.log(result); -} - -async function main() { - getsADiagnosticForAKeyVaultResource(); -} - -main().catch(console.error); diff --git a/sdk/selfhelp/arm-selfhelp/samples-dev/discoverySolutionListSample.ts b/sdk/selfhelp/arm-selfhelp/samples-dev/discoverySolutionListSample.ts deleted file mode 100644 index 34d5254bdf05..000000000000 --- a/sdk/selfhelp/arm-selfhelp/samples-dev/discoverySolutionListSample.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 { HelpRP } from "@azure/arm-selfhelp"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Solutions Discovery is the initial point of entry within Help API, which helps you identify the relevant solutions for your Azure issue.

You can discover solutions using resourceUri OR resourceUri + problemClassificationId.

We will do our best in returning relevant diagnostics for your Azure issue.

Get the problemClassificationId(s) using this [reference](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP).

Note: ‘requiredParameterSets’ from Solutions Discovery API response must be passed via ‘additionalParameters’ as an input to Diagnostics API. - * - * @summary Solutions Discovery is the initial point of entry within Help API, which helps you identify the relevant solutions for your Azure issue.

You can discover solutions using resourceUri OR resourceUri + problemClassificationId.

We will do our best in returning relevant diagnostics for your Azure issue.

Get the problemClassificationId(s) using this [reference](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP).

Note: ‘requiredParameterSets’ from Solutions Discovery API response must be passed via ‘additionalParameters’ as an input to Diagnostics API. - * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/ListDiscoverySolutionsForKeyVaultResource.json - */ -async function listDiscoverySolutionsForAKeyVaultResource() { - const scope = - "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read"; - const credential = new DefaultAzureCredential(); - const client = new HelpRP(credential); - const resArray = new Array(); - for await (let item of client.discoverySolution.list(scope)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listDiscoverySolutionsForAKeyVaultResource(); -} - -main().catch(console.error); diff --git a/sdk/selfhelp/arm-selfhelp/samples-dev/operationsListSample.ts b/sdk/selfhelp/arm-selfhelp/samples-dev/operationsListSample.ts deleted file mode 100644 index 41b98266f6d8..000000000000 --- a/sdk/selfhelp/arm-selfhelp/samples-dev/operationsListSample.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 { HelpRP } from "@azure/arm-selfhelp"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Returns list of operations. - * - * @summary Returns list of operations. - * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/ListOperations.json - */ -async function listAllOperations() { - const credential = new DefaultAzureCredential(); - const client = new HelpRP(credential); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAllOperations(); -} - -main().catch(console.error); diff --git a/sdk/selfhelp/arm-selfhelp/samples/v1-beta/javascript/README.md b/sdk/selfhelp/arm-selfhelp/samples/v1-beta/javascript/README.md deleted file mode 100644 index 87e5223f1998..000000000000 --- a/sdk/selfhelp/arm-selfhelp/samples/v1-beta/javascript/README.md +++ /dev/null @@ -1,58 +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** | -| ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| [diagnosticsCheckNameAvailabilitySample.js][diagnosticschecknameavailabilitysample] | This API is used to check the uniqueness of a resource name used for a diagnostic check. x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/CheckNameAvailabilityForDiagnosticWhenNameIsAvailable.json | -| [diagnosticsCreateSample.js][diagnosticscreatesample] | Diagnostics tells you precisely the root cause of the issue and how to address it. You can get diagnostics once you discover and identify the relevant solution for your Azure issue.

You can create diagnostics using the ‘solutionId’ from Solution Discovery API response and ‘additionalParameters’

Note: ‘requiredParameterSets’ from Solutions Discovery API response must be passed via ‘additionalParameters’ as an input to Diagnostics API x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/CreateDiagnosticForKeyVaultResource.json | -| [diagnosticsGetSample.js][diagnosticsgetsample] | Get the diagnostics using the 'diagnosticsResourceName' you chose while creating the diagnostic. x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/GetDiagnosticForKeyVaultResource.json | -| [discoverySolutionListSample.js][discoverysolutionlistsample] | Solutions Discovery is the initial point of entry within Help API, which helps you identify the relevant solutions for your Azure issue.

You can discover solutions using resourceUri OR resourceUri + problemClassificationId.

We will do our best in returning relevant diagnostics for your Azure issue.

Get the problemClassificationId(s) using this [reference](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP).

Note: ‘requiredParameterSets’ from Solutions Discovery API response must be passed via ‘additionalParameters’ as an input to Diagnostics API. x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/ListDiscoverySolutionsForKeyVaultResource.json | -| [operationsListSample.js][operationslistsample] | Returns list of operations. x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/ListOperations.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -3. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node diagnosticsCheckNameAvailabilitySample.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 diagnosticsCheckNameAvailabilitySample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[diagnosticschecknameavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/selfhelp/arm-selfhelp/samples/v1-beta/javascript/diagnosticsCheckNameAvailabilitySample.js -[diagnosticscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/selfhelp/arm-selfhelp/samples/v1-beta/javascript/diagnosticsCreateSample.js -[diagnosticsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/selfhelp/arm-selfhelp/samples/v1-beta/javascript/diagnosticsGetSample.js -[discoverysolutionlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/selfhelp/arm-selfhelp/samples/v1-beta/javascript/discoverySolutionListSample.js -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/selfhelp/arm-selfhelp/samples/v1-beta/javascript/operationsListSample.js -[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-selfhelp?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/selfhelp/arm-selfhelp/README.md diff --git a/sdk/selfhelp/arm-selfhelp/samples/v1-beta/javascript/diagnosticsCheckNameAvailabilitySample.js b/sdk/selfhelp/arm-selfhelp/samples/v1-beta/javascript/diagnosticsCheckNameAvailabilitySample.js deleted file mode 100644 index d301c98b79df..000000000000 --- a/sdk/selfhelp/arm-selfhelp/samples/v1-beta/javascript/diagnosticsCheckNameAvailabilitySample.js +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { HelpRP } = require("@azure/arm-selfhelp"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to This API is used to check the uniqueness of a resource name used for a diagnostic check. - * - * @summary This API is used to check the uniqueness of a resource name used for a diagnostic check. - * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/CheckNameAvailabilityForDiagnosticWhenNameIsAvailable.json - */ -async function exampleWhenNameIsAvailableForADiagnosticResource() { - const scope = "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6"; - const checkNameAvailabilityRequest = { - name: "sampleName", - type: "Microsoft.Help/diagnostics", - }; - const options = { - checkNameAvailabilityRequest, - }; - const credential = new DefaultAzureCredential(); - const client = new HelpRP(credential); - const result = await client.diagnostics.checkNameAvailability(scope, options); - console.log(result); -} - -/** - * This sample demonstrates how to This API is used to check the uniqueness of a resource name used for a diagnostic check. - * - * @summary This API is used to check the uniqueness of a resource name used for a diagnostic check. - * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/CheckNameAvailabilityForDiagnosticWhenNameIsNotAvailable.json - */ -async function exampleWhenNameIsNotAvailableForADiagnosticResource() { - const scope = "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6"; - const checkNameAvailabilityRequest = { - name: "sampleName", - type: "Microsoft.Help/diagnostics", - }; - const options = { - checkNameAvailabilityRequest, - }; - const credential = new DefaultAzureCredential(); - const client = new HelpRP(credential); - const result = await client.diagnostics.checkNameAvailability(scope, options); - console.log(result); -} - -async function main() { - exampleWhenNameIsAvailableForADiagnosticResource(); - exampleWhenNameIsNotAvailableForADiagnosticResource(); -} - -main().catch(console.error); diff --git a/sdk/selfhelp/arm-selfhelp/samples/v1-beta/javascript/diagnosticsCreateSample.js b/sdk/selfhelp/arm-selfhelp/samples/v1-beta/javascript/diagnosticsCreateSample.js deleted file mode 100644 index d0d30a1c0023..000000000000 --- a/sdk/selfhelp/arm-selfhelp/samples/v1-beta/javascript/diagnosticsCreateSample.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 { HelpRP } = require("@azure/arm-selfhelp"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Diagnostics tells you precisely the root cause of the issue and how to address it. You can get diagnostics once you discover and identify the relevant solution for your Azure issue.

You can create diagnostics using the ‘solutionId’ from Solution Discovery API response and ‘additionalParameters’

Note: ‘requiredParameterSets’ from Solutions Discovery API response must be passed via ‘additionalParameters’ as an input to Diagnostics API - * - * @summary Diagnostics tells you precisely the root cause of the issue and how to address it. You can get diagnostics once you discover and identify the relevant solution for your Azure issue.

You can create diagnostics using the ‘solutionId’ from Solution Discovery API response and ‘additionalParameters’

Note: ‘requiredParameterSets’ from Solutions Discovery API response must be passed via ‘additionalParameters’ as an input to Diagnostics API - * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/CreateDiagnosticForKeyVaultResource.json - */ -async function createsADiagnosticForAKeyVaultResource() { - const scope = - "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read"; - const diagnosticsResourceName = "VMNotWorkingInsight"; - const credential = new DefaultAzureCredential(); - const client = new HelpRP(credential); - const result = await client.diagnostics.beginCreateAndWait(scope, diagnosticsResourceName); - console.log(result); -} - -async function main() { - createsADiagnosticForAKeyVaultResource(); -} - -main().catch(console.error); diff --git a/sdk/selfhelp/arm-selfhelp/samples/v1-beta/javascript/diagnosticsGetSample.js b/sdk/selfhelp/arm-selfhelp/samples/v1-beta/javascript/diagnosticsGetSample.js deleted file mode 100644 index 1ee946802f01..000000000000 --- a/sdk/selfhelp/arm-selfhelp/samples/v1-beta/javascript/diagnosticsGetSample.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 { HelpRP } = require("@azure/arm-selfhelp"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the diagnostics using the 'diagnosticsResourceName' you chose while creating the diagnostic. - * - * @summary Get the diagnostics using the 'diagnosticsResourceName' you chose while creating the diagnostic. - * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/GetDiagnosticForKeyVaultResource.json - */ -async function getsADiagnosticForAKeyVaultResource() { - const scope = - "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read"; - const diagnosticsResourceName = "VMNotWorkingInsight"; - const credential = new DefaultAzureCredential(); - const client = new HelpRP(credential); - const result = await client.diagnostics.get(scope, diagnosticsResourceName); - console.log(result); -} - -async function main() { - getsADiagnosticForAKeyVaultResource(); -} - -main().catch(console.error); diff --git a/sdk/selfhelp/arm-selfhelp/samples/v1-beta/javascript/discoverySolutionListSample.js b/sdk/selfhelp/arm-selfhelp/samples/v1-beta/javascript/discoverySolutionListSample.js deleted file mode 100644 index e018e02dc5e5..000000000000 --- a/sdk/selfhelp/arm-selfhelp/samples/v1-beta/javascript/discoverySolutionListSample.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 { HelpRP } = require("@azure/arm-selfhelp"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Solutions Discovery is the initial point of entry within Help API, which helps you identify the relevant solutions for your Azure issue.

You can discover solutions using resourceUri OR resourceUri + problemClassificationId.

We will do our best in returning relevant diagnostics for your Azure issue.

Get the problemClassificationId(s) using this [reference](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP).

Note: ‘requiredParameterSets’ from Solutions Discovery API response must be passed via ‘additionalParameters’ as an input to Diagnostics API. - * - * @summary Solutions Discovery is the initial point of entry within Help API, which helps you identify the relevant solutions for your Azure issue.

You can discover solutions using resourceUri OR resourceUri + problemClassificationId.

We will do our best in returning relevant diagnostics for your Azure issue.

Get the problemClassificationId(s) using this [reference](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP).

Note: ‘requiredParameterSets’ from Solutions Discovery API response must be passed via ‘additionalParameters’ as an input to Diagnostics API. - * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/ListDiscoverySolutionsForKeyVaultResource.json - */ -async function listDiscoverySolutionsForAKeyVaultResource() { - const scope = - "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read"; - const credential = new DefaultAzureCredential(); - const client = new HelpRP(credential); - const resArray = new Array(); - for await (let item of client.discoverySolution.list(scope)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listDiscoverySolutionsForAKeyVaultResource(); -} - -main().catch(console.error); diff --git a/sdk/selfhelp/arm-selfhelp/samples/v1-beta/javascript/operationsListSample.js b/sdk/selfhelp/arm-selfhelp/samples/v1-beta/javascript/operationsListSample.js deleted file mode 100644 index 8e01e1adf303..000000000000 --- a/sdk/selfhelp/arm-selfhelp/samples/v1-beta/javascript/operationsListSample.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 { HelpRP } = require("@azure/arm-selfhelp"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Returns list of operations. - * - * @summary Returns list of operations. - * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/ListOperations.json - */ -async function listAllOperations() { - const credential = new DefaultAzureCredential(); - const client = new HelpRP(credential); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAllOperations(); -} - -main().catch(console.error); diff --git a/sdk/selfhelp/arm-selfhelp/samples/v1-beta/javascript/package.json b/sdk/selfhelp/arm-selfhelp/samples/v1-beta/javascript/package.json deleted file mode 100644 index d058e51b49fa..000000000000 --- a/sdk/selfhelp/arm-selfhelp/samples/v1-beta/javascript/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "@azure-samples/arm-selfhelp-js-beta", - "private": true, - "version": "1.0.0", - "description": " client library samples for JavaScript (Beta)", - "engines": { - "node": ">=14.0.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/selfhelp/arm-selfhelp" - }, - "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/selfhelp/arm-selfhelp", - "dependencies": { - "@azure/arm-selfhelp": "next", - "dotenv": "latest", - "@azure/identity": "^2.0.1" - } -} diff --git a/sdk/selfhelp/arm-selfhelp/samples/v1-beta/javascript/sample.env b/sdk/selfhelp/arm-selfhelp/samples/v1-beta/javascript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/selfhelp/arm-selfhelp/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/selfhelp/arm-selfhelp/samples/v1-beta/typescript/README.md b/sdk/selfhelp/arm-selfhelp/samples/v1-beta/typescript/README.md deleted file mode 100644 index 55bb5b89d641..000000000000 --- a/sdk/selfhelp/arm-selfhelp/samples/v1-beta/typescript/README.md +++ /dev/null @@ -1,71 +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** | -| ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| [diagnosticsCheckNameAvailabilitySample.ts][diagnosticschecknameavailabilitysample] | This API is used to check the uniqueness of a resource name used for a diagnostic check. x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/CheckNameAvailabilityForDiagnosticWhenNameIsAvailable.json | -| [diagnosticsCreateSample.ts][diagnosticscreatesample] | Diagnostics tells you precisely the root cause of the issue and how to address it. You can get diagnostics once you discover and identify the relevant solution for your Azure issue.

You can create diagnostics using the ‘solutionId’ from Solution Discovery API response and ‘additionalParameters’

Note: ‘requiredParameterSets’ from Solutions Discovery API response must be passed via ‘additionalParameters’ as an input to Diagnostics API x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/CreateDiagnosticForKeyVaultResource.json | -| [diagnosticsGetSample.ts][diagnosticsgetsample] | Get the diagnostics using the 'diagnosticsResourceName' you chose while creating the diagnostic. x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/GetDiagnosticForKeyVaultResource.json | -| [discoverySolutionListSample.ts][discoverysolutionlistsample] | Solutions Discovery is the initial point of entry within Help API, which helps you identify the relevant solutions for your Azure issue.

You can discover solutions using resourceUri OR resourceUri + problemClassificationId.

We will do our best in returning relevant diagnostics for your Azure issue.

Get the problemClassificationId(s) using this [reference](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP).

Note: ‘requiredParameterSets’ from Solutions Discovery API response must be passed via ‘additionalParameters’ as an input to Diagnostics API. x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/ListDiscoverySolutionsForKeyVaultResource.json | -| [operationsListSample.ts][operationslistsample] | Returns list of operations. x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/ListOperations.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using: - -```bash -npm install -g typescript -``` - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Compile the samples: - -```bash -npm run build -``` - -3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -4. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node dist/diagnosticsCheckNameAvailabilitySample.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/diagnosticsCheckNameAvailabilitySample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[diagnosticschecknameavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/selfhelp/arm-selfhelp/samples/v1-beta/typescript/src/diagnosticsCheckNameAvailabilitySample.ts -[diagnosticscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/selfhelp/arm-selfhelp/samples/v1-beta/typescript/src/diagnosticsCreateSample.ts -[diagnosticsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/selfhelp/arm-selfhelp/samples/v1-beta/typescript/src/diagnosticsGetSample.ts -[discoverysolutionlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/selfhelp/arm-selfhelp/samples/v1-beta/typescript/src/discoverySolutionListSample.ts -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/selfhelp/arm-selfhelp/samples/v1-beta/typescript/src/operationsListSample.ts -[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-selfhelp?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/selfhelp/arm-selfhelp/README.md -[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/selfhelp/arm-selfhelp/samples/v1-beta/typescript/package.json b/sdk/selfhelp/arm-selfhelp/samples/v1-beta/typescript/package.json deleted file mode 100644 index 07262c793483..000000000000 --- a/sdk/selfhelp/arm-selfhelp/samples/v1-beta/typescript/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "@azure-samples/arm-selfhelp-ts-beta", - "private": true, - "version": "1.0.0", - "description": " client library samples for TypeScript (Beta)", - "engines": { - "node": ">=14.0.0" - }, - "scripts": { - "build": "tsc", - "prebuild": "rimraf dist/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/selfhelp/arm-selfhelp" - }, - "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/selfhelp/arm-selfhelp", - "dependencies": { - "@azure/arm-selfhelp": "next", - "dotenv": "latest", - "@azure/identity": "^2.0.1" - }, - "devDependencies": { - "@types/node": "^14.0.0", - "typescript": "~5.0.0", - "rimraf": "latest" - } -} diff --git a/sdk/selfhelp/arm-selfhelp/samples/v1-beta/typescript/sample.env b/sdk/selfhelp/arm-selfhelp/samples/v1-beta/typescript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/selfhelp/arm-selfhelp/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/selfhelp/arm-selfhelp/samples/v1-beta/typescript/src/diagnosticsCheckNameAvailabilitySample.ts b/sdk/selfhelp/arm-selfhelp/samples/v1-beta/typescript/src/diagnosticsCheckNameAvailabilitySample.ts deleted file mode 100644 index 9dd01890f755..000000000000 --- a/sdk/selfhelp/arm-selfhelp/samples/v1-beta/typescript/src/diagnosticsCheckNameAvailabilitySample.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - CheckNameAvailabilityRequest, - DiagnosticsCheckNameAvailabilityOptionalParams, - HelpRP -} from "@azure/arm-selfhelp"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to This API is used to check the uniqueness of a resource name used for a diagnostic check. - * - * @summary This API is used to check the uniqueness of a resource name used for a diagnostic check. - * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/CheckNameAvailabilityForDiagnosticWhenNameIsAvailable.json - */ -async function exampleWhenNameIsAvailableForADiagnosticResource() { - const scope = "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6"; - const checkNameAvailabilityRequest: CheckNameAvailabilityRequest = { - name: "sampleName", - type: "Microsoft.Help/diagnostics" - }; - const options: DiagnosticsCheckNameAvailabilityOptionalParams = { - checkNameAvailabilityRequest - }; - const credential = new DefaultAzureCredential(); - const client = new HelpRP(credential); - const result = await client.diagnostics.checkNameAvailability(scope, options); - console.log(result); -} - -/** - * This sample demonstrates how to This API is used to check the uniqueness of a resource name used for a diagnostic check. - * - * @summary This API is used to check the uniqueness of a resource name used for a diagnostic check. - * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/CheckNameAvailabilityForDiagnosticWhenNameIsNotAvailable.json - */ -async function exampleWhenNameIsNotAvailableForADiagnosticResource() { - const scope = "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6"; - const checkNameAvailabilityRequest: CheckNameAvailabilityRequest = { - name: "sampleName", - type: "Microsoft.Help/diagnostics" - }; - const options: DiagnosticsCheckNameAvailabilityOptionalParams = { - checkNameAvailabilityRequest - }; - const credential = new DefaultAzureCredential(); - const client = new HelpRP(credential); - const result = await client.diagnostics.checkNameAvailability(scope, options); - console.log(result); -} - -async function main() { - exampleWhenNameIsAvailableForADiagnosticResource(); - exampleWhenNameIsNotAvailableForADiagnosticResource(); -} - -main().catch(console.error); diff --git a/sdk/selfhelp/arm-selfhelp/samples/v1-beta/typescript/src/diagnosticsCreateSample.ts b/sdk/selfhelp/arm-selfhelp/samples/v1-beta/typescript/src/diagnosticsCreateSample.ts deleted file mode 100644 index 5daff5c027b0..000000000000 --- a/sdk/selfhelp/arm-selfhelp/samples/v1-beta/typescript/src/diagnosticsCreateSample.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 { HelpRP } from "@azure/arm-selfhelp"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Diagnostics tells you precisely the root cause of the issue and how to address it. You can get diagnostics once you discover and identify the relevant solution for your Azure issue.

You can create diagnostics using the ‘solutionId’ from Solution Discovery API response and ‘additionalParameters’

Note: ‘requiredParameterSets’ from Solutions Discovery API response must be passed via ‘additionalParameters’ as an input to Diagnostics API - * - * @summary Diagnostics tells you precisely the root cause of the issue and how to address it. You can get diagnostics once you discover and identify the relevant solution for your Azure issue.

You can create diagnostics using the ‘solutionId’ from Solution Discovery API response and ‘additionalParameters’

Note: ‘requiredParameterSets’ from Solutions Discovery API response must be passed via ‘additionalParameters’ as an input to Diagnostics API - * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/CreateDiagnosticForKeyVaultResource.json - */ -async function createsADiagnosticForAKeyVaultResource() { - const scope = - "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read"; - const diagnosticsResourceName = "VMNotWorkingInsight"; - const credential = new DefaultAzureCredential(); - const client = new HelpRP(credential); - const result = await client.diagnostics.beginCreateAndWait( - scope, - diagnosticsResourceName - ); - console.log(result); -} - -async function main() { - createsADiagnosticForAKeyVaultResource(); -} - -main().catch(console.error); diff --git a/sdk/selfhelp/arm-selfhelp/samples/v1-beta/typescript/src/diagnosticsGetSample.ts b/sdk/selfhelp/arm-selfhelp/samples/v1-beta/typescript/src/diagnosticsGetSample.ts deleted file mode 100644 index f08f6656e2e8..000000000000 --- a/sdk/selfhelp/arm-selfhelp/samples/v1-beta/typescript/src/diagnosticsGetSample.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 { HelpRP } from "@azure/arm-selfhelp"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the diagnostics using the 'diagnosticsResourceName' you chose while creating the diagnostic. - * - * @summary Get the diagnostics using the 'diagnosticsResourceName' you chose while creating the diagnostic. - * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/GetDiagnosticForKeyVaultResource.json - */ -async function getsADiagnosticForAKeyVaultResource() { - const scope = - "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read"; - const diagnosticsResourceName = "VMNotWorkingInsight"; - const credential = new DefaultAzureCredential(); - const client = new HelpRP(credential); - const result = await client.diagnostics.get(scope, diagnosticsResourceName); - console.log(result); -} - -async function main() { - getsADiagnosticForAKeyVaultResource(); -} - -main().catch(console.error); diff --git a/sdk/selfhelp/arm-selfhelp/samples/v1-beta/typescript/src/discoverySolutionListSample.ts b/sdk/selfhelp/arm-selfhelp/samples/v1-beta/typescript/src/discoverySolutionListSample.ts deleted file mode 100644 index 34d5254bdf05..000000000000 --- a/sdk/selfhelp/arm-selfhelp/samples/v1-beta/typescript/src/discoverySolutionListSample.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 { HelpRP } from "@azure/arm-selfhelp"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Solutions Discovery is the initial point of entry within Help API, which helps you identify the relevant solutions for your Azure issue.

You can discover solutions using resourceUri OR resourceUri + problemClassificationId.

We will do our best in returning relevant diagnostics for your Azure issue.

Get the problemClassificationId(s) using this [reference](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP).

Note: ‘requiredParameterSets’ from Solutions Discovery API response must be passed via ‘additionalParameters’ as an input to Diagnostics API. - * - * @summary Solutions Discovery is the initial point of entry within Help API, which helps you identify the relevant solutions for your Azure issue.

You can discover solutions using resourceUri OR resourceUri + problemClassificationId.

We will do our best in returning relevant diagnostics for your Azure issue.

Get the problemClassificationId(s) using this [reference](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP).

Note: ‘requiredParameterSets’ from Solutions Discovery API response must be passed via ‘additionalParameters’ as an input to Diagnostics API. - * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/ListDiscoverySolutionsForKeyVaultResource.json - */ -async function listDiscoverySolutionsForAKeyVaultResource() { - const scope = - "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read"; - const credential = new DefaultAzureCredential(); - const client = new HelpRP(credential); - const resArray = new Array(); - for await (let item of client.discoverySolution.list(scope)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listDiscoverySolutionsForAKeyVaultResource(); -} - -main().catch(console.error); diff --git a/sdk/selfhelp/arm-selfhelp/samples/v1-beta/typescript/src/operationsListSample.ts b/sdk/selfhelp/arm-selfhelp/samples/v1-beta/typescript/src/operationsListSample.ts deleted file mode 100644 index 41b98266f6d8..000000000000 --- a/sdk/selfhelp/arm-selfhelp/samples/v1-beta/typescript/src/operationsListSample.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 { HelpRP } from "@azure/arm-selfhelp"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Returns list of operations. - * - * @summary Returns list of operations. - * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/ListOperations.json - */ -async function listAllOperations() { - const credential = new DefaultAzureCredential(); - const client = new HelpRP(credential); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAllOperations(); -} - -main().catch(console.error); diff --git a/sdk/selfhelp/arm-selfhelp/samples/v1-beta/typescript/tsconfig.json b/sdk/selfhelp/arm-selfhelp/samples/v1-beta/typescript/tsconfig.json deleted file mode 100644 index e26ce2a6d8f7..000000000000 --- a/sdk/selfhelp/arm-selfhelp/samples/v1-beta/typescript/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2020", - "module": "commonjs", - "moduleResolution": "node", - "resolveJsonModule": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "alwaysStrict": true, - "outDir": "dist", - "rootDir": "src" - }, - "include": [ - "src/**.ts" - ] -} diff --git a/sdk/selfhelp/arm-selfhelp/test/sampleTest.ts b/sdk/selfhelp/arm-selfhelp/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/selfhelp/arm-selfhelp/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/selfhelp/arm-selfhelp/test/selfhelp_operations_test.spec.ts b/sdk/selfhelp/arm-selfhelp/test/selfhelp_operations_test.spec.ts deleted file mode 100644 index d15bf611887e..000000000000 --- a/sdk/selfhelp/arm-selfhelp/test/selfhelp_operations_test.spec.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - env, - Recorder, - RecorderStartOptions, - delay, - isPlaybackMode, -} from "@azure-tools/test-recorder"; -import { createTestCredential } from "@azure-tools/test-credential"; -import { assert } from "chai"; -import { Context } from "mocha"; -import { HelpRP } from "../src/helpRP"; - -const replaceableVariables: Record = { - AZURE_CLIENT_ID: "azure_client_id", - AZURE_CLIENT_SECRET: "azure_client_secret", - AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", - SUBSCRIPTION_ID: "azure_subscription_id" -}; - -const recorderOptions: RecorderStartOptions = { - envSetupForPlayback: replaceableVariables -}; - -export const testPollingOptions = { - updateIntervalInMs: isPlaybackMode() ? 0 : undefined, -}; - -describe("help test", () => { - let recorder: Recorder; - let subscriptionId: string; - let client: HelpRP; - let location: string; - let resourceGroup: string; - let resourcename: string; - let scope: string; - - beforeEach(async function (this: Context) { - recorder = new Recorder(this.currentTest); - await recorder.start(recorderOptions); - subscriptionId = env.SUBSCRIPTION_ID || ''; - // This is an example of how the environment variables are used - const credential = createTestCredential(); - client = new HelpRP(credential, recorder.configureClientOptions({})); - location = "eastus"; - resourceGroup = "czwjstest"; - resourcename = "resourcetest"; - scope = "subscriptions/" + subscriptionId; - }); - - afterEach(async function () { - await recorder.stop(); - }); - - it("selfhelp checkname test", async function () { - const res = await client.diagnostics.checkNameAvailability( - scope, - { - checkNameAvailabilityRequest: { - name: "sampleName", - type: "Microsoft.Help/diagnostics" - } - }); - }); - -}) diff --git a/sdk/selfhelp/arm-selfhelp/tsconfig.json b/sdk/selfhelp/arm-selfhelp/tsconfig.json index 43c53468dfed..3e6ae96443f3 100644 --- a/sdk/selfhelp/arm-selfhelp/tsconfig.json +++ b/sdk/selfhelp/arm-selfhelp/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-selfhelp": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"