From 85d5f2e0b636ce0e24d6d16bb17ca956337238dc Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 16 Oct 2023 06:38:01 +0000 Subject: [PATCH] CodeGen from PR 26215 in Azure/azure-rest-api-specs Merge 0abb859218ac6c0a3d6c67b3be77bde8c5bac8c2 into 9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0 --- common/config/rush/pnpm-lock.yaml | 107 +++++++- .../arm-newrelicobservability/CHANGELOG.md | 34 ++- .../arm-newrelicobservability/README.md | 2 +- .../arm-newrelicobservability/_meta.json | 8 +- .../arm-newrelicobservability/assets.json | 6 - .../arm-newrelicobservability/package.json | 34 +-- .../review/arm-newrelicobservability.api.md | 89 +++++++ .../samples-dev/accountsListSample.ts | 62 ----- .../monitorsCreateOrUpdateSample.ts | 84 ------- .../samples-dev/monitorsDeleteSample.ts | 68 ------ .../monitorsGetMetricRulesSample.ts | 71 ------ .../monitorsGetMetricStatusSample.ts | 76 ------ .../samples-dev/monitorsGetSample.ts | 39 --- .../monitorsListAppServicesSample.ts | 82 ------- .../monitorsListByResourceGroupSample.ts | 43 ---- .../monitorsListBySubscriptionSample.ts | 39 --- .../samples-dev/monitorsListHostsSample.ts | 83 ------- .../monitorsListMonitoredResourcesSample.ts | 70 ------ .../monitorsSwitchBillingSample.ts | 83 ------- .../samples-dev/monitorsUpdateSample.ts | 80 ------ .../monitorsVMHostPayloadSample.ts | 64 ----- .../samples-dev/operationsListSample.ts | 60 ----- .../samples-dev/organizationsListSample.ts | 62 ----- .../samples-dev/plansListSample.ts | 64 ----- .../tagRulesCreateOrUpdateSample.ts | 99 -------- .../samples-dev/tagRulesDeleteSample.ts | 68 ------ .../samples-dev/tagRulesGetSample.ts | 68 ------ ...ulesListByNewRelicMonitorResourceSample.ts | 70 ------ .../samples-dev/tagRulesUpdateSample.ts | 98 -------- .../samples/v1/javascript/README.md | 92 ------- .../v1/javascript/accountsListSample.js | 58 ----- .../monitorsCreateOrUpdateSample.js | 77 ------ .../v1/javascript/monitorsDeleteSample.js | 62 ----- .../monitorsGetMetricRulesSample.js | 54 ---- .../monitorsGetMetricStatusSample.js | 59 ----- .../v1/javascript/monitorsGetSample.js | 35 --- .../monitorsListAppServicesSample.js | 65 ----- .../monitorsListByResourceGroupSample.js | 37 --- .../monitorsListBySubscriptionSample.js | 36 --- .../v1/javascript/monitorsListHostsSample.js | 66 ----- .../monitorsListMonitoredResourcesSample.js | 58 ----- .../javascript/monitorsSwitchBillingSample.js | 66 ----- .../v1/javascript/monitorsUpdateSample.js | 69 ------ .../javascript/monitorsVMHostPayloadSample.js | 52 ---- .../v1/javascript/operationsListSample.js | 56 ----- .../v1/javascript/organizationsListSample.js | 58 ----- .../samples/v1/javascript/package.json | 32 --- .../samples/v1/javascript/plansListSample.js | 57 ----- .../samples/v1/javascript/sample.env | 4 - .../tagRulesCreateOrUpdateSample.js | 90 ------- .../v1/javascript/tagRulesDeleteSample.js | 62 ----- .../v1/javascript/tagRulesGetSample.js | 54 ---- ...ulesListByNewRelicMonitorResourceSample.js | 64 ----- .../v1/javascript/tagRulesUpdateSample.js | 89 ------- .../samples/v1/typescript/README.md | 105 -------- .../samples/v1/typescript/package.json | 41 ---- .../samples/v1/typescript/sample.env | 4 - .../v1/typescript/src/accountsListSample.ts | 62 ----- .../src/monitorsCreateOrUpdateSample.ts | 84 ------- .../v1/typescript/src/monitorsDeleteSample.ts | 68 ------ .../src/monitorsGetMetricRulesSample.ts | 71 ------ .../src/monitorsGetMetricStatusSample.ts | 76 ------ .../v1/typescript/src/monitorsGetSample.ts | 39 --- .../src/monitorsListAppServicesSample.ts | 82 ------- .../src/monitorsListByResourceGroupSample.ts | 43 ---- .../src/monitorsListBySubscriptionSample.ts | 39 --- .../typescript/src/monitorsListHostsSample.ts | 83 ------- .../monitorsListMonitoredResourcesSample.ts | 70 ------ .../src/monitorsSwitchBillingSample.ts | 83 ------- .../v1/typescript/src/monitorsUpdateSample.ts | 80 ------ .../src/monitorsVMHostPayloadSample.ts | 64 ----- .../v1/typescript/src/operationsListSample.ts | 60 ----- .../typescript/src/organizationsListSample.ts | 62 ----- .../v1/typescript/src/plansListSample.ts | 64 ----- .../src/tagRulesCreateOrUpdateSample.ts | 99 -------- .../v1/typescript/src/tagRulesDeleteSample.ts | 68 ------ .../v1/typescript/src/tagRulesGetSample.ts | 68 ------ ...ulesListByNewRelicMonitorResourceSample.ts | 70 ------ .../v1/typescript/src/tagRulesUpdateSample.ts | 98 -------- .../samples/v1/typescript/tsconfig.json | 17 -- .../src/models/index.ts | 116 ++++++++- .../src/models/mappers.ts | 231 ++++++++++++++++++ .../src/models/parameters.ts | 16 +- .../src/newRelicObservability.ts | 12 +- .../src/operations/billingInfo.ts | 72 ++++++ .../operations/connectedPartnerResources.ts | 197 +++++++++++++++ .../src/operations/index.ts | 2 + .../src/operationsInterfaces/billingInfo.ts | 27 ++ .../connectedPartnerResources.ts | 30 +++ .../src/operationsInterfaces/index.ts | 2 + ...icobservability_operations_test.spec.ts.ts | 68 ------ .../test/sampleTest.ts | 43 ++++ .../arm-newrelicobservability/tsconfig.json | 10 +- 93 files changed, 969 insertions(+), 4822 deletions(-) delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/assets.json delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples-dev/accountsListSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsCreateOrUpdateSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsDeleteSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsGetMetricRulesSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsGetMetricStatusSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsGetSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsListAppServicesSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsListByResourceGroupSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsListBySubscriptionSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsListHostsSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsListMonitoredResourcesSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsSwitchBillingSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsUpdateSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsVMHostPayloadSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples-dev/operationsListSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples-dev/organizationsListSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples-dev/plansListSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples-dev/tagRulesCreateOrUpdateSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples-dev/tagRulesDeleteSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples-dev/tagRulesGetSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples-dev/tagRulesListByNewRelicMonitorResourceSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples-dev/tagRulesUpdateSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/README.md delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/accountsListSample.js delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsCreateOrUpdateSample.js delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsDeleteSample.js delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsGetMetricRulesSample.js delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsGetMetricStatusSample.js delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsGetSample.js delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsListAppServicesSample.js delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsListByResourceGroupSample.js delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsListBySubscriptionSample.js delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsListHostsSample.js delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsListMonitoredResourcesSample.js delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsSwitchBillingSample.js delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsUpdateSample.js delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsVMHostPayloadSample.js delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/operationsListSample.js delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/organizationsListSample.js delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/package.json delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/plansListSample.js delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/sample.env delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/tagRulesCreateOrUpdateSample.js delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/tagRulesDeleteSample.js delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/tagRulesGetSample.js delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/tagRulesListByNewRelicMonitorResourceSample.js delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/tagRulesUpdateSample.js delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/README.md delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/package.json delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/sample.env delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/accountsListSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsCreateOrUpdateSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsDeleteSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsGetMetricRulesSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsGetMetricStatusSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsGetSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsListAppServicesSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsListByResourceGroupSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsListBySubscriptionSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsListHostsSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsListMonitoredResourcesSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsSwitchBillingSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsUpdateSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsVMHostPayloadSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/operationsListSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/organizationsListSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/plansListSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/tagRulesCreateOrUpdateSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/tagRulesDeleteSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/tagRulesGetSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/tagRulesListByNewRelicMonitorResourceSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/tagRulesUpdateSample.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/tsconfig.json create mode 100644 sdk/newrelicobservability/arm-newrelicobservability/src/operations/billingInfo.ts create mode 100644 sdk/newrelicobservability/arm-newrelicobservability/src/operations/connectedPartnerResources.ts create mode 100644 sdk/newrelicobservability/arm-newrelicobservability/src/operationsInterfaces/billingInfo.ts create mode 100644 sdk/newrelicobservability/arm-newrelicobservability/src/operationsInterfaces/connectedPartnerResources.ts delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/test/newrelicobservability_operations_test.spec.ts.ts create mode 100644 sdk/newrelicobservability/arm-newrelicobservability/test/sampleTest.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 270ac1d12aa9..d5464a4bb432 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -1828,6 +1828,16 @@ packages: lodash: 4.17.21 dev: false + /@microsoft/api-extractor-model@7.28.2(@types/node@14.18.63): + resolution: {integrity: sha512-vkojrM2fo3q4n4oPh4uUZdjJ2DxQ2+RnDQL/xhTWSRUNPF6P4QyrvY357HBxbnltKcYu+nNNolVqc6TIGQ73Ig==} + dependencies: + '@microsoft/tsdoc': 0.14.2 + '@microsoft/tsdoc-config': 0.16.2 + '@rushstack/node-core-library': 3.61.0(@types/node@14.18.63) + transitivePeerDependencies: + - '@types/node' + dev: false + /@microsoft/api-extractor-model@7.28.2(@types/node@16.18.55): resolution: {integrity: sha512-vkojrM2fo3q4n4oPh4uUZdjJ2DxQ2+RnDQL/xhTWSRUNPF6P4QyrvY357HBxbnltKcYu+nNNolVqc6TIGQ73Ig==} dependencies: @@ -1838,6 +1848,26 @@ packages: - '@types/node' dev: false + /@microsoft/api-extractor@7.38.0(@types/node@14.18.63): + resolution: {integrity: sha512-e1LhZYnfw+JEebuY2bzhw0imDCl1nwjSThTrQqBXl40hrVo6xm3j/1EpUr89QyzgjqmAwek2ZkIVZbrhaR+cqg==} + hasBin: true + dependencies: + '@microsoft/api-extractor-model': 7.28.2(@types/node@14.18.63) + '@microsoft/tsdoc': 0.14.2 + '@microsoft/tsdoc-config': 0.16.2 + '@rushstack/node-core-library': 3.61.0(@types/node@14.18.63) + '@rushstack/rig-package': 0.5.1 + '@rushstack/ts-command-line': 4.16.1 + colors: 1.2.5 + lodash: 4.17.21 + resolve: 1.22.6 + semver: 7.5.4 + source-map: 0.6.1 + typescript: 5.0.4 + transitivePeerDependencies: + - '@types/node' + dev: false + /@microsoft/api-extractor@7.38.0(@types/node@16.18.55): resolution: {integrity: sha512-e1LhZYnfw+JEebuY2bzhw0imDCl1nwjSThTrQqBXl40hrVo6xm3j/1EpUr89QyzgjqmAwek2ZkIVZbrhaR+cqg==} hasBin: true @@ -2486,6 +2516,24 @@ packages: rollup: 3.29.4 dev: false + /@rushstack/node-core-library@3.61.0(@types/node@14.18.63): + resolution: {integrity: sha512-tdOjdErme+/YOu4gPed3sFS72GhtWCgNV9oDsHDnoLY5oDfwjKUc9Z+JOZZ37uAxcm/OCahDHfuu2ugqrfWAVQ==} + peerDependencies: + '@types/node': '*' + peerDependenciesMeta: + '@types/node': + optional: true + dependencies: + '@types/node': 14.18.63 + colors: 1.2.5 + fs-extra: 7.0.1 + import-lazy: 4.0.0 + jju: 1.4.0 + resolve: 1.22.6 + semver: 7.5.4 + z-schema: 5.0.5 + dev: false + /@rushstack/node-core-library@3.61.0(@types/node@16.18.55): resolution: {integrity: sha512-tdOjdErme+/YOu4gPed3sFS72GhtWCgNV9oDsHDnoLY5oDfwjKUc9Z+JOZZ37uAxcm/OCahDHfuu2ugqrfWAVQ==} peerDependencies: @@ -4018,7 +4066,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: @@ -4270,7 +4318,7 @@ packages: dependencies: semver: 7.5.4 shelljs: 0.8.5 - typescript: 5.3.0-dev.20231011 + typescript: 5.3.0-dev.20231015 dev: false /eastasianwidth@0.2.0: @@ -8841,6 +8889,37 @@ packages: code-block-writer: 12.0.0 dev: false + /ts-node@10.9.1(@types/node@14.18.63)(typescript@5.0.4): + resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.9 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 14.18.63 + acorn: 8.10.0 + acorn-walk: 8.2.0 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 5.0.4 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + dev: false + /ts-node@10.9.1(@types/node@16.18.55)(typescript@5.0.4): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true @@ -9014,8 +9093,8 @@ packages: hasBin: true dev: false - /typescript@5.3.0-dev.20231011: - resolution: {integrity: sha512-qpyUI7J37X3Xj7/bPWSNPUvmJ8yDGVnkQ8665xD4+LVWKUX7vwO7n2E1CUuQzeQIF4y369iPaz1d396rTW5LfA==} + /typescript@5.3.0-dev.20231015: + resolution: {integrity: sha512-JAygGSVZ9qp1MlY8UH49GiUIM+R7P7QUu23/IymTR1fgnWypMnR354jHIJSr8bD2uDQfVsEV/SezM9PZshwEyQ==} engines: {node: '>=14.17'} hasBin: true dev: false @@ -14347,32 +14426,34 @@ packages: dev: false file:projects/arm-newrelicobservability.tgz: - resolution: {integrity: sha512-HKV9+LQ5JrY3qlsZXu4KOxq89IGzI0mH46LxeQ0FtiOpKuonIwSbQ6obes1RuV9CZY7mQv+mkncwNt87QthT1Q==, tarball: file:projects/arm-newrelicobservability.tgz} + resolution: {integrity: sha512-xHjtKwSV1pXmYtr3KEFXUITeFFIwA/QxYzgg1s5mOBEXyBoi9QRyrqjF1XmUApPa9EQ+E5UTHGe3SX0EIsBE3g==, tarball: file:projects/arm-newrelicobservability.tgz} name: '@rush-temp/arm-newrelicobservability' version: 0.0.0 dependencies: - '@microsoft/api-extractor': 7.38.0(@types/node@16.18.55) + '@azure/identity': 2.1.0 + '@microsoft/api-extractor': 7.38.0(@types/node@14.18.63) '@rollup/plugin-commonjs': 24.1.0(rollup@2.79.1) '@rollup/plugin-json': 6.0.0(rollup@2.79.1) '@rollup/plugin-multi-entry': 6.0.0(rollup@2.79.1) '@rollup/plugin-node-resolve': 13.3.0(rollup@2.79.1) '@types/chai': 4.3.6 - '@types/node': 16.18.55 + '@types/node': 14.18.63 chai: 4.3.10 cross-env: 7.0.3 dotenv: 16.3.1 mkdirp: 2.1.6 - mocha: 10.2.0 - rimraf: 3.0.2 + mocha: 7.2.0 + rimraf: 5.0.5 rollup: 2.79.1 - rollup-plugin-sourcemaps: 0.6.3(@types/node@16.18.55)(rollup@2.79.1) - ts-node: 10.9.1(@types/node@16.18.55)(typescript@5.0.4) + rollup-plugin-sourcemaps: 0.6.3(@types/node@14.18.63)(rollup@2.79.1) + ts-node: 10.9.1(@types/node@14.18.63)(typescript@5.0.4) tslib: 2.6.2 typescript: 5.0.4 uglify-js: 3.17.4 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' + - supports-color dev: false file:projects/arm-nginx.tgz: @@ -17290,7 +17371,7 @@ packages: dev: false file:projects/communication-sms.tgz: - resolution: {integrity: sha512-Zy9WPrxVxDAuq5iLYpiy+HF8IQkHW5qHW8lvszMJ0eKWAWOgTgtr60bcu7A83DWz2vWBXRsGUWKaNqS3yUqOmA==, tarball: file:projects/communication-sms.tgz} + resolution: {integrity: sha512-HPqBjVlUjJug38F2I1GghNK4OH69dfIymbHuB2zKRL+PPuX3EaSSDLRPoJm9FLQke6nSh15tekNMhtT0Mzbr1g==, tarball: file:projects/communication-sms.tgz} name: '@rush-temp/communication-sms' version: 0.0.0 dependencies: @@ -18785,7 +18866,7 @@ packages: '@azure/msal-browser': 3.2.0 '@azure/msal-common': 13.3.0 '@azure/msal-node': 2.2.0 - '@microsoft/api-extractor': 7.38.0(@types/node@16.18.58) + '@microsoft/api-extractor': 7.38.0(@types/node@16.18.55) '@types/chai': 4.3.6 '@types/jsonwebtoken': 9.0.3 '@types/jws': 3.2.6 diff --git a/sdk/newrelicobservability/arm-newrelicobservability/CHANGELOG.md b/sdk/newrelicobservability/arm-newrelicobservability/CHANGELOG.md index 3c0b00c6721d..5ef82c894593 100644 --- a/sdk/newrelicobservability/arm-newrelicobservability/CHANGELOG.md +++ b/sdk/newrelicobservability/arm-newrelicobservability/CHANGELOG.md @@ -1,15 +1,27 @@ # Release History + +## 1.1.0-beta.1 (2023-10-16) + +**Features** -## 1.0.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added operation group BillingInfo + - Added operation group ConnectedPartnerResources + - Added Interface BillingInfoGetOptionalParams + - Added Interface BillingInfoResponse + - Added Interface ConnectedPartnerResourceProperties + - Added Interface ConnectedPartnerResourcesListFormat + - Added Interface ConnectedPartnerResourcesListNextOptionalParams + - Added Interface ConnectedPartnerResourcesListOptionalParams + - Added Interface ConnectedPartnerResourcesListResponse + - Added Interface ErrorDetailAutoGenerated + - Added Interface ErrorResponseAutoGenerated + - Added Interface MarketplaceSaaSInfo + - Added Interface PartnerBillingEntity + - Added Type Alias BillingInfoGetResponse + - Added Type Alias ConnectedPartnerResourcesListNextResponse + - Added Type Alias ConnectedPartnerResourcesListOperationResponse + + ## 1.0.0 (2023-05-06) -The package of @azure/arm-newrelicobservability is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart ). +The package of @azure/arm-newrelicobservability 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/newrelicobservability/arm-newrelicobservability/README.md b/sdk/newrelicobservability/arm-newrelicobservability/README.md index 68f2751a122f..b29bb1990eda 100644 --- a/sdk/newrelicobservability/arm-newrelicobservability/README.md +++ b/sdk/newrelicobservability/arm-newrelicobservability/README.md @@ -6,7 +6,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/newrelicobservability/arm-newrelicobservability) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-newrelicobservability) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-newrelicobservability) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-newrelicobservability?view=azure-node-preview) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started diff --git a/sdk/newrelicobservability/arm-newrelicobservability/_meta.json b/sdk/newrelicobservability/arm-newrelicobservability/_meta.json index b15387f6aefe..8175920d11d3 100644 --- a/sdk/newrelicobservability/arm-newrelicobservability/_meta.json +++ b/sdk/newrelicobservability/arm-newrelicobservability/_meta.json @@ -1,8 +1,8 @@ { - "commit": "3c639105c011765893db51cbb0dda056e34dc994", + "commit": "a3f2b85d3e0239d99b4ccdd2f7427ec6ccbf1b13", "readme": "specification/newrelic/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\\newrelic\\resource-manager\\readme.md --use=@autorest/typescript@6.0.1 --generate-sample=true", + "autorest_command": "autorest --version=3.9.7 --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/newrelic/resource-manager/readme.md --use=@autorest/typescript@^6.0.4", "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.2", + "use": "@autorest/typescript@^6.0.4" } \ No newline at end of file diff --git a/sdk/newrelicobservability/arm-newrelicobservability/assets.json b/sdk/newrelicobservability/arm-newrelicobservability/assets.json deleted file mode 100644 index 04a76f76358b..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/assets.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "AssetsRepo": "Azure/azure-sdk-assets", - "AssetsRepoPrefixPath": "js", - "TagPrefix": "js/newrelicobservability/arm-newrelicobservability", - "Tag": "js/newrelicobservability/arm-newrelicobservability_189517b525" -} diff --git a/sdk/newrelicobservability/arm-newrelicobservability/package.json b/sdk/newrelicobservability/arm-newrelicobservability/package.json index 7cb072bd53b6..1ae90f81bea1 100644 --- a/sdk/newrelicobservability/arm-newrelicobservability/package.json +++ b/sdk/newrelicobservability/arm-newrelicobservability/package.json @@ -3,17 +3,17 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for NewRelicObservability.", - "version": "1.0.1", + "version": "1.1.0-beta.1", "engines": { - "node": ">=16.0.0" + "node": ">=14.0.0" }, "dependencies": { - "@azure/core-lro": "^2.5.0", + "@azure/core-lro": "^2.5.4", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", "@azure/core-client": "^1.7.0", "@azure/core-auth": "^1.3.0", - "@azure/core-rest-pipeline": "^1.8.0", + "@azure/core-rest-pipeline": "^1.12.0", "tslib": "^2.2.0" }, "keywords": [ @@ -38,18 +38,18 @@ "rollup-plugin-sourcemaps": "^0.6.3", "typescript": "~5.0.0", "uglify-js": "^3.4.9", - "rimraf": "^3.0.0", + "rimraf": "^5.0.0", "dotenv": "^16.0.0", - "@azure/identity": "^3.3.0", + "@azure/identity": "^2.0.1", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", - "mocha": "^10.0.0", + "mocha": "^7.1.1", "@types/chai": "^4.2.8", "chai": "^4.2.0", "cross-env": "^7.0.2", - "@types/node": "^16.0.0", - "@azure/dev-tool": "^1.0.0", - "ts-node": "^10.0.0" + "@types/node": "^14.0.0", + "ts-node": "^10.0.0", + "@azure/dev-tool": "^1.0.0" }, "repository": { "type": "git", @@ -84,7 +84,7 @@ "extract-api": "api-extractor run --local", "lint": "echo skipped", "audit": "echo skipped", - "clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log", + "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "build:node": "echo skipped", "build:browser": "echo skipped", "build:test": "echo skipped", @@ -112,13 +112,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/newrelicobservability/arm-newrelicobservability", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-newrelicobservability?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/newrelicobservability/arm-newrelicobservability" +} \ No newline at end of file diff --git a/sdk/newrelicobservability/arm-newrelicobservability/review/arm-newrelicobservability.api.md b/sdk/newrelicobservability/arm-newrelicobservability/review/arm-newrelicobservability.api.md index 043b7a2c0e82..6ecee3ae0a05 100644 --- a/sdk/newrelicobservability/arm-newrelicobservability/review/arm-newrelicobservability.api.md +++ b/sdk/newrelicobservability/arm-newrelicobservability/review/arm-newrelicobservability.api.md @@ -83,9 +83,65 @@ export interface AppServicesListResponse { // @public export type BillingCycle = string; +// @public +export interface BillingInfo { + get(resourceGroupName: string, monitorName: string, options?: BillingInfoGetOptionalParams): Promise; +} + +// @public +export interface BillingInfoGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BillingInfoGetResponse = BillingInfoResponse; + +// @public +export interface BillingInfoResponse { + marketplaceSaasInfo?: MarketplaceSaaSInfo; + partnerBillingEntity?: PartnerBillingEntity; +} + // @public export type BillingSource = string; +// @public +export interface ConnectedPartnerResourceProperties { + accountId?: string; + accountName?: string; + azureResourceId?: string; + location?: string; +} + +// @public +export interface ConnectedPartnerResources { + list(resourceGroupName: string, monitorName: string, options?: ConnectedPartnerResourcesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ConnectedPartnerResourcesListFormat { + properties?: ConnectedPartnerResourceProperties; +} + +// @public +export interface ConnectedPartnerResourcesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConnectedPartnerResourcesListNextResponse = ConnectedPartnerResourcesListResponse; + +// @public +export type ConnectedPartnerResourcesListOperationResponse = ConnectedPartnerResourcesListResponse; + +// @public +export interface ConnectedPartnerResourcesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface ConnectedPartnerResourcesListResponse { + nextLink?: string; + value?: ConnectedPartnerResourcesListFormat[]; +} + // @public export type CreatedByType = string; @@ -104,11 +160,25 @@ export interface ErrorDetail { readonly target?: string; } +// @public +export interface ErrorDetailAutoGenerated { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetailAutoGenerated[]; + readonly message?: string; + readonly target?: string; +} + // @public export interface ErrorResponse { error?: ErrorDetail; } +// @public +export interface ErrorResponseAutoGenerated { + error?: ErrorDetailAutoGenerated; +} + // @public export interface FilteringTag { action?: TagAction; @@ -294,6 +364,15 @@ export interface ManagedServiceIdentity { // @public export type ManagedServiceIdentityType = string; +// @public +export interface MarketplaceSaaSInfo { + billedAzureSubscriptionId?: string; + marketplaceResourceId?: string; + marketplaceStatus?: string; + marketplaceSubscriptionId?: string; + marketplaceSubscriptionName?: string; +} + // @public export type MarketplaceSubscriptionStatus = string; @@ -562,6 +641,10 @@ export class NewRelicObservability extends coreClient.ServiceClient { // (undocumented) apiVersion: string; // (undocumented) + billingInfo: BillingInfo; + // (undocumented) + connectedPartnerResources: ConnectedPartnerResources; + // (undocumented) monitors: Monitors; // (undocumented) operations: Operations; @@ -675,6 +758,12 @@ export type OrgCreationSource = string; // @public export type Origin = string; +// @public +export interface PartnerBillingEntity { + organizationId?: string; + organizationName?: string; +} + // @public export interface PlanData { billingCycle?: BillingCycle; diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/accountsListSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/accountsListSample.ts deleted file mode 100644 index 99f3702cf446..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/accountsListSample.ts +++ /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. -import { NewRelicObservability } from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List all the existing accounts - * - * @summary List all the existing accounts - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Accounts_List_MaximumSet_Gen.json - */ -async function accountsListMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "nqmcgifgaqlf"; - const userEmail = "ruxvg@xqkmdhrnoo.hlmbpm"; - const location = "egh"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.accounts.list(userEmail, location)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List all the existing accounts - * - * @summary List all the existing accounts - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Accounts_List_MinimumSet_Gen.json - */ -async function accountsListMinimumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "nqmcgifgaqlf"; - const userEmail = "ruxvg@xqkmdhrnoo.hlmbpm"; - const location = "egh"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.accounts.list(userEmail, location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - accountsListMaximumSetGen(); - accountsListMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsCreateOrUpdateSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsCreateOrUpdateSample.ts deleted file mode 100644 index a16060bfd228..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsCreateOrUpdateSample.ts +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - NewRelicMonitorResource, - NewRelicObservability -} from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a NewRelicMonitorResource - * - * @summary Create a NewRelicMonitorResource - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_CreateOrUpdate_MaximumSet_Gen.json - */ -async function monitorsCreateOrUpdateMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "hfmjmpyqgezxkp"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgNewRelic"; - const monitorName = "cdlymktqw"; - const resource: NewRelicMonitorResource = { - accountCreationSource: "LIFTR", - liftrResourceCategory: "Unknown", - location: "k", - marketplaceSubscriptionStatus: "Active", - monitoringStatus: "Enabled", - newRelicAccountProperties: { - accountInfo: { - accountId: "xhqmg", - ingestionKey: "wltnimmhqt", - region: "ljcf" - }, - organizationInfo: { organizationId: "k" }, - singleSignOnProperties: { - enterpriseAppId: "kwiwfz", - provisioningState: "Accepted", - singleSignOnState: "Initial", - singleSignOnUrl: "kvseueuljsxmfwpqctz" - }, - userId: "vcscxlncofcuduadesd" - }, - orgCreationSource: "LIFTR", - planData: { - billingCycle: "YEARLY", - effectiveDate: new Date("2022-12-05T14:11:37.786Z"), - planDetails: "tbbiaga", - usageType: "PAYG" - }, - provisioningState: "Accepted", - tags: { key6976: "oaxfhf" }, - userInfo: { - country: "hslqnwdanrconqyekwbnttaetv", - emailAddress: "%6%@4-g.N1.3F-kI1.Ue-.lJso", - firstName: "vdftzcggirefejajwahhwhyibutramdaotvnuf", - lastName: "bcsztgqovdlmzfkjdrngidwzqsevagexzzilnlc", - phoneNumber: "krf" - } - }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.monitors.beginCreateOrUpdateAndWait( - resourceGroupName, - monitorName, - resource - ); - console.log(result); -} - -async function main() { - monitorsCreateOrUpdateMaximumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsDeleteSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsDeleteSample.ts deleted file mode 100644 index f9880c76a3cf..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsDeleteSample.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 { NewRelicObservability } from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a NewRelicMonitorResource - * - * @summary Delete a NewRelicMonitorResource - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_Delete_MaximumSet_Gen.json - */ -async function monitorsDeleteMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const userEmail = "ruxvg@xqkmdhrnoo.hlmbpm"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.monitors.beginDeleteAndWait( - resourceGroupName, - userEmail, - monitorName - ); - console.log(result); -} - -/** - * This sample demonstrates how to Delete a NewRelicMonitorResource - * - * @summary Delete a NewRelicMonitorResource - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_Delete_MinimumSet_Gen.json - */ -async function monitorsDeleteMinimumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const userEmail = "ruxvg@xqkmdhrnoo.hlmbpm"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.monitors.beginDeleteAndWait( - resourceGroupName, - userEmail, - monitorName - ); - console.log(result); -} - -async function main() { - monitorsDeleteMaximumSetGen(); - monitorsDeleteMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsGetMetricRulesSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsGetMetricRulesSample.ts deleted file mode 100644 index a25ff34b59a7..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsGetMetricRulesSample.ts +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - MetricsRequest, - NewRelicObservability -} from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get metric rules - * - * @summary Get metric rules - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_GetMetricRules_MaximumSet_Gen.json - */ -async function monitorsGetMetricRulesMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "nqmcgifgaqlf"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgNewRelic"; - const monitorName = "fhcjxnxumkdlgpwanewtkdnyuz"; - const request: MetricsRequest = { userEmail: "ruxvg@xqkmdhrnoo.hlmbpm" }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.monitors.getMetricRules( - resourceGroupName, - monitorName, - request - ); - console.log(result); -} - -/** - * This sample demonstrates how to Get metric rules - * - * @summary Get metric rules - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_GetMetricRules_MinimumSet_Gen.json - */ -async function monitorsGetMetricRulesMinimumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "nqmcgifgaqlf"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgNewRelic"; - const monitorName = "fhcjxnxumkdlgpwanewtkdnyuz"; - const request: MetricsRequest = { userEmail: "ruxvg@xqkmdhrnoo.hlmbpm" }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.monitors.getMetricRules( - resourceGroupName, - monitorName, - request - ); - console.log(result); -} - -async function main() { - monitorsGetMetricRulesMaximumSetGen(); - monitorsGetMetricRulesMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsGetMetricStatusSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsGetMetricStatusSample.ts deleted file mode 100644 index 5df6ca2a184e..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsGetMetricStatusSample.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - MetricsStatusRequest, - NewRelicObservability -} from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get metric status - * - * @summary Get metric status - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_GetMetricStatus_MaximumSet_Gen.json - */ -async function monitorsGetMetricStatusMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "nqmcgifgaqlf"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgNewRelic"; - const monitorName = "fhcjxnxumkdlgpwanewtkdnyuz"; - const request: MetricsStatusRequest = { - azureResourceIds: ["enfghpfw"], - userEmail: "ruxvg@xqkmdhrnoo.hlmbpm" - }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.monitors.getMetricStatus( - resourceGroupName, - monitorName, - request - ); - console.log(result); -} - -/** - * This sample demonstrates how to Get metric status - * - * @summary Get metric status - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_GetMetricStatus_MinimumSet_Gen.json - */ -async function monitorsGetMetricStatusMinimumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "nqmcgifgaqlf"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgNewRelic"; - const monitorName = "fhcjxnxumkdlgpwanewtkdnyuz"; - const request: MetricsStatusRequest = { - userEmail: "ruxvg@xqkmdhrnoo.hlmbpm" - }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.monitors.getMetricStatus( - resourceGroupName, - monitorName, - request - ); - console.log(result); -} - -async function main() { - monitorsGetMetricStatusMaximumSetGen(); - monitorsGetMetricStatusMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsGetSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsGetSample.ts deleted file mode 100644 index 736fe637f7db..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsGetSample.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 { NewRelicObservability } from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a NewRelicMonitorResource - * - * @summary Get a NewRelicMonitorResource - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_Get_MaximumSet_Gen.json - */ -async function monitorsGetMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "hfmjmpyqgezxkp"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgNewRelic"; - const monitorName = "cdlymktqw"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.monitors.get(resourceGroupName, monitorName); - console.log(result); -} - -async function main() { - monitorsGetMaximumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsListAppServicesSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsListAppServicesSample.ts deleted file mode 100644 index 04dcf08713ba..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsListAppServicesSample.ts +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - AppServicesGetRequest, - NewRelicObservability -} from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List the app service resources currently being monitored by the NewRelic resource. - * - * @summary List the app service resources currently being monitored by the NewRelic resource. - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListAppServices_MaximumSet_Gen.json - */ -async function monitorsListAppServicesMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "nqmcgifgaqlf"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgNewRelic"; - const monitorName = "fhcjxnxumkdlgpwanewtkdnyuz"; - const request: AppServicesGetRequest = { - azureResourceIds: ["pvzrksrmzowobuhxpwiotnpcvjbu"], - userEmail: "ruxvg@xqkmdhrnoo.hlmbpm" - }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.monitors.listAppServices( - resourceGroupName, - monitorName, - request - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List the app service resources currently being monitored by the NewRelic resource. - * - * @summary List the app service resources currently being monitored by the NewRelic resource. - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListAppServices_MinimumSet_Gen.json - */ -async function monitorsListAppServicesMinimumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "nqmcgifgaqlf"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgNewRelic"; - const monitorName = "fhcjxnxumkdlgpwanewtkdnyuz"; - const request: AppServicesGetRequest = { - userEmail: "ruxvg@xqkmdhrnoo.hlmbpm" - }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.monitors.listAppServices( - resourceGroupName, - monitorName, - request - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - monitorsListAppServicesMaximumSetGen(); - monitorsListAppServicesMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsListByResourceGroupSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsListByResourceGroupSample.ts deleted file mode 100644 index f4915e862368..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsListByResourceGroupSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NewRelicObservability } from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List NewRelicMonitorResource resources by resource group - * - * @summary List NewRelicMonitorResource resources by resource group - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListByResourceGroup_MaximumSet_Gen.json - */ -async function monitorsListByResourceGroupMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "hfmjmpyqgezxkp"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgNewRelic"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.monitors.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - monitorsListByResourceGroupMaximumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsListBySubscriptionSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsListBySubscriptionSample.ts deleted file mode 100644 index 4a6cdd813248..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsListBySubscriptionSample.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 { NewRelicObservability } from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List NewRelicMonitorResource resources by subscription ID - * - * @summary List NewRelicMonitorResource resources by subscription ID - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListBySubscription_MaximumSet_Gen.json - */ -async function monitorsListBySubscriptionMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "hfmjmpyqgezxkp"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.monitors.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - monitorsListBySubscriptionMaximumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsListHostsSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsListHostsSample.ts deleted file mode 100644 index bdb591af2de1..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsListHostsSample.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - HostsGetRequest, - NewRelicObservability -} from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List the compute vm resources currently being monitored by the NewRelic resource. - * - * @summary List the compute vm resources currently being monitored by the NewRelic resource. - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListHosts_MaximumSet_Gen.json - */ -async function monitorsListHostsMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const request: HostsGetRequest = { - userEmail: "ruxvg@xqkmdhrnoo.hlmbpm", - vmIds: ["xzphvxvfmvjrnsgyns"] - }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.monitors.listHosts( - resourceGroupName, - monitorName, - request - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List the compute vm resources currently being monitored by the NewRelic resource. - * - * @summary List the compute vm resources currently being monitored by the NewRelic resource. - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListHosts_MinimumSet_Gen.json - */ -async function monitorsListHostsMinimumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const request: HostsGetRequest = { - userEmail: "ruxvg@xqkmdhrnoo.hlmbpm", - vmIds: ["xzphvxvfmvjrnsgyns"] - }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.monitors.listHosts( - resourceGroupName, - monitorName, - request - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - monitorsListHostsMaximumSetGen(); - monitorsListHostsMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsListMonitoredResourcesSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsListMonitoredResourcesSample.ts deleted file mode 100644 index d25abd9a0214..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsListMonitoredResourcesSample.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NewRelicObservability } from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List the resources currently being monitored by the NewRelic monitor resource. - * - * @summary List the resources currently being monitored by the NewRelic monitor resource. - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListMonitoredResources_MaximumSet_Gen.json - */ -async function monitorsListMonitoredResourcesMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.monitors.listMonitoredResources( - resourceGroupName, - monitorName - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List the resources currently being monitored by the NewRelic monitor resource. - * - * @summary List the resources currently being monitored by the NewRelic monitor resource. - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListMonitoredResources_MinimumSet_Gen.json - */ -async function monitorsListMonitoredResourcesMinimumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.monitors.listMonitoredResources( - resourceGroupName, - monitorName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - monitorsListMonitoredResourcesMaximumSetGen(); - monitorsListMonitoredResourcesMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsSwitchBillingSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsSwitchBillingSample.ts deleted file mode 100644 index c72eb08c245f..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsSwitchBillingSample.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - SwitchBillingRequest, - NewRelicObservability -} from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Switches the billing for NewRelic monitor resource. - * - * @summary Switches the billing for NewRelic monitor resource. - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_SwitchBilling_MaximumSet_Gen.json - */ -async function monitorsSwitchBillingMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "nqmcgifgaqlf"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgNewRelic"; - const monitorName = "fhcjxnxumkdlgpwanewtkdnyuz"; - const request: SwitchBillingRequest = { - azureResourceId: "enfghpfw", - organizationId: "k", - planData: { - billingCycle: "YEARLY", - effectiveDate: new Date("2022-12-05T14:11:37.786Z"), - planDetails: "tbbiaga", - usageType: "PAYG" - }, - userEmail: "ruxvg@xqkmdhrnoo.hlmbpm" - }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.monitors.switchBilling( - resourceGroupName, - monitorName, - request - ); - console.log(result); -} - -/** - * This sample demonstrates how to Switches the billing for NewRelic monitor resource. - * - * @summary Switches the billing for NewRelic monitor resource. - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_SwitchBilling_MinimumSet_Gen.json - */ -async function monitorsSwitchBillingMinimumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "nqmcgifgaqlf"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgNewRelic"; - const monitorName = "fhcjxnxumkdlgpwanewtkdnyuz"; - const request: SwitchBillingRequest = { - userEmail: "ruxvg@xqkmdhrnoo.hlmbpm" - }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.monitors.switchBilling( - resourceGroupName, - monitorName, - request - ); - console.log(result); -} - -async function main() { - monitorsSwitchBillingMaximumSetGen(); - monitorsSwitchBillingMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsUpdateSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsUpdateSample.ts deleted file mode 100644 index 9086f6911dfc..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsUpdateSample.ts +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - NewRelicMonitorResourceUpdate, - NewRelicObservability -} from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update a NewRelicMonitorResource - * - * @summary Update a NewRelicMonitorResource - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_Update_MaximumSet_Gen.json - */ -async function monitorsUpdateMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "hfmjmpyqgezxkp"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgNewRelic"; - const monitorName = "cdlymktqw"; - const properties: NewRelicMonitorResourceUpdate = { - accountCreationSource: "LIFTR", - identity: { type: "None", userAssignedIdentities: { key8903: {} } }, - newRelicAccountProperties: { - accountInfo: { - accountId: "xhqmg", - ingestionKey: "wltnimmhqt", - region: "ljcf" - }, - organizationInfo: { organizationId: "k" }, - singleSignOnProperties: { - enterpriseAppId: "kwiwfz", - provisioningState: "Accepted", - singleSignOnState: "Initial", - singleSignOnUrl: "kvseueuljsxmfwpqctz" - }, - userId: "vcscxlncofcuduadesd" - }, - orgCreationSource: "LIFTR", - planData: { - billingCycle: "YEARLY", - effectiveDate: new Date("2022-12-05T14:11:37.786Z"), - planDetails: "tbbiaga", - usageType: "PAYG" - }, - tags: { key164: "jqakdrrmmyzytqu" }, - userInfo: { - country: "hslqnwdanrconqyekwbnttaetv", - emailAddress: "%6%@4-g.N1.3F-kI1.Ue-.lJso", - firstName: "vdftzcggirefejajwahhwhyibutramdaotvnuf", - lastName: "bcsztgqovdlmzfkjdrngidwzqsevagexzzilnlc", - phoneNumber: "krf" - } - }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.monitors.update( - resourceGroupName, - monitorName, - properties - ); - console.log(result); -} - -async function main() { - monitorsUpdateMaximumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsVMHostPayloadSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsVMHostPayloadSample.ts deleted file mode 100644 index 9e04ef9c8f3b..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsVMHostPayloadSample.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NewRelicObservability } from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM. - * - * @summary Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM. - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_VmHostPayload_MaximumSet_Gen.json - */ -async function monitorsVMHostPayloadMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.monitors.vmHostPayload( - resourceGroupName, - monitorName - ); - console.log(result); -} - -/** - * This sample demonstrates how to Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM. - * - * @summary Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM. - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_VmHostPayload_MinimumSet_Gen.json - */ -async function monitorsVMHostPayloadMinimumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.monitors.vmHostPayload( - resourceGroupName, - monitorName - ); - console.log(result); -} - -async function main() { - monitorsVMHostPayloadMaximumSetGen(); - monitorsVMHostPayloadMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/operationsListSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/operationsListSample.ts deleted file mode 100644 index 7901f82878ec..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/operationsListSample.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NewRelicObservability } from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List the operations for the provider - * - * @summary List the operations for the provider - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Operations_List_MaximumSet_Gen.json - */ -async function operationsListMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List the operations for the provider - * - * @summary List the operations for the provider - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Operations_List_MinimumSet_Gen.json - */ -async function operationsListMinimumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - operationsListMaximumSetGen(); - operationsListMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/organizationsListSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/organizationsListSample.ts deleted file mode 100644 index 1cf2432c023b..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/organizationsListSample.ts +++ /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. -import { NewRelicObservability } from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List all the existing organizations - * - * @summary List all the existing organizations - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Organizations_List_MaximumSet_Gen.json - */ -async function organizationsListMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "nqmcgifgaqlf"; - const userEmail = "ruxvg@xqkmdhrnoo.hlmbpm"; - const location = "egh"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.organizations.list(userEmail, location)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List all the existing organizations - * - * @summary List all the existing organizations - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Organizations_List_MinimumSet_Gen.json - */ -async function organizationsListMinimumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "nqmcgifgaqlf"; - const userEmail = "ruxvg@xqkmdhrnoo.hlmbpm"; - const location = "egh"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.organizations.list(userEmail, location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - organizationsListMaximumSetGen(); - organizationsListMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/plansListSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/plansListSample.ts deleted file mode 100644 index c74ca81bd59d..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/plansListSample.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PlansListOptionalParams, - NewRelicObservability -} from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List plans data - * - * @summary List plans data - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Plans_List_MaximumSet_Gen.json - */ -async function plansListMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "hfmjmpyqgezxkp"; - const accountId = "pwuxgvrmkk"; - const organizationId = "hilawwjz"; - const options: PlansListOptionalParams = { accountId, organizationId }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.plans.list(options)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List plans data - * - * @summary List plans data - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Plans_List_MinimumSet_Gen.json - */ -async function plansListMinimumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "nqmcgifgaqlf"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.plans.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - plansListMaximumSetGen(); - plansListMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/tagRulesCreateOrUpdateSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/tagRulesCreateOrUpdateSample.ts deleted file mode 100644 index f2b5ff1b9981..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/tagRulesCreateOrUpdateSample.ts +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagRule, - NewRelicObservability -} from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a TagRule - * - * @summary Create a TagRule - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_CreateOrUpdate_MaximumSet_Gen.json - */ -async function tagRulesCreateOrUpdateMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const ruleSetName = "bxcantgzggsepbhqmedjqyrqeezmfb"; - const resource: TagRule = { - logRules: { - filteringTags: [ - { - name: "saokgpjvdlorciqbjmjxazpee", - action: "Include", - value: "sarxrqsxouhdjwsrqqicbeirdb" - } - ], - sendAadLogs: "Enabled", - sendActivityLogs: "Enabled", - sendSubscriptionLogs: "Enabled" - }, - metricRules: { - filteringTags: [ - { - name: "saokgpjvdlorciqbjmjxazpee", - action: "Include", - value: "sarxrqsxouhdjwsrqqicbeirdb" - } - ], - userEmail: "test@testing.com" - }, - provisioningState: "Accepted" - }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.tagRules.beginCreateOrUpdateAndWait( - resourceGroupName, - monitorName, - ruleSetName, - resource - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create a TagRule - * - * @summary Create a TagRule - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_CreateOrUpdate_MinimumSet_Gen.json - */ -async function tagRulesCreateOrUpdateMinimumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const ruleSetName = "bxcantgzggsepbhqmedjqyrqeezmfb"; - const resource: TagRule = {}; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.tagRules.beginCreateOrUpdateAndWait( - resourceGroupName, - monitorName, - ruleSetName, - resource - ); - console.log(result); -} - -async function main() { - tagRulesCreateOrUpdateMaximumSetGen(); - tagRulesCreateOrUpdateMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/tagRulesDeleteSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/tagRulesDeleteSample.ts deleted file mode 100644 index dcdb3bf905a7..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/tagRulesDeleteSample.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 { NewRelicObservability } from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a TagRule - * - * @summary Delete a TagRule - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_Delete_MaximumSet_Gen.json - */ -async function tagRulesDeleteMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const ruleSetName = "bxcantgzggsepbhqmedjqyrqeezmfb"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.tagRules.beginDeleteAndWait( - resourceGroupName, - monitorName, - ruleSetName - ); - console.log(result); -} - -/** - * This sample demonstrates how to Delete a TagRule - * - * @summary Delete a TagRule - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_Delete_MinimumSet_Gen.json - */ -async function tagRulesDeleteMinimumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const ruleSetName = "bxcantgzggsepbhqmedjqyrqeezmfb"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.tagRules.beginDeleteAndWait( - resourceGroupName, - monitorName, - ruleSetName - ); - console.log(result); -} - -async function main() { - tagRulesDeleteMaximumSetGen(); - tagRulesDeleteMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/tagRulesGetSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/tagRulesGetSample.ts deleted file mode 100644 index 046a6f4173f3..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/tagRulesGetSample.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 { NewRelicObservability } from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a TagRule - * - * @summary Get a TagRule - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_Get_MaximumSet_Gen.json - */ -async function tagRulesGetMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const ruleSetName = "bxcantgzggsepbhqmedjqyrqeezmfb"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.tagRules.get( - resourceGroupName, - monitorName, - ruleSetName - ); - console.log(result); -} - -/** - * This sample demonstrates how to Get a TagRule - * - * @summary Get a TagRule - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_Get_MinimumSet_Gen.json - */ -async function tagRulesGetMinimumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const ruleSetName = "bxcantgzggsepbhqmedjqyrqeezmfb"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.tagRules.get( - resourceGroupName, - monitorName, - ruleSetName - ); - console.log(result); -} - -async function main() { - tagRulesGetMaximumSetGen(); - tagRulesGetMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/tagRulesListByNewRelicMonitorResourceSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/tagRulesListByNewRelicMonitorResourceSample.ts deleted file mode 100644 index 011ed0a27f33..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/tagRulesListByNewRelicMonitorResourceSample.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NewRelicObservability } from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List TagRule resources by NewRelicMonitorResource - * - * @summary List TagRule resources by NewRelicMonitorResource - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_ListByNewRelicMonitorResource_MaximumSet_Gen.json - */ -async function tagRulesListByNewRelicMonitorResourceMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.tagRules.listByNewRelicMonitorResource( - resourceGroupName, - monitorName - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List TagRule resources by NewRelicMonitorResource - * - * @summary List TagRule resources by NewRelicMonitorResource - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_ListByNewRelicMonitorResource_MinimumSet_Gen.json - */ -async function tagRulesListByNewRelicMonitorResourceMinimumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.tagRules.listByNewRelicMonitorResource( - resourceGroupName, - monitorName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - tagRulesListByNewRelicMonitorResourceMaximumSetGen(); - tagRulesListByNewRelicMonitorResourceMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/tagRulesUpdateSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/tagRulesUpdateSample.ts deleted file mode 100644 index 12b176a63e2b..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/tagRulesUpdateSample.ts +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagRuleUpdate, - NewRelicObservability -} from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update a TagRule - * - * @summary Update a TagRule - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_Update_MaximumSet_Gen.json - */ -async function tagRulesUpdateMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const ruleSetName = "bxcantgzggsepbhqmedjqyrqeezmfb"; - const properties: TagRuleUpdate = { - logRules: { - filteringTags: [ - { - name: "saokgpjvdlorciqbjmjxazpee", - action: "Include", - value: "sarxrqsxouhdjwsrqqicbeirdb" - } - ], - sendAadLogs: "Enabled", - sendActivityLogs: "Enabled", - sendSubscriptionLogs: "Enabled" - }, - metricRules: { - filteringTags: [ - { - name: "saokgpjvdlorciqbjmjxazpee", - action: "Include", - value: "sarxrqsxouhdjwsrqqicbeirdb" - } - ], - userEmail: "test@testing.com" - } - }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.tagRules.update( - resourceGroupName, - monitorName, - ruleSetName, - properties - ); - console.log(result); -} - -/** - * This sample demonstrates how to Update a TagRule - * - * @summary Update a TagRule - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_Update_MinimumSet_Gen.json - */ -async function tagRulesUpdateMinimumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const ruleSetName = "bxcantgzggsepbhqmedjqyrqeezmfb"; - const properties: TagRuleUpdate = {}; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.tagRules.update( - resourceGroupName, - monitorName, - ruleSetName, - properties - ); - console.log(result); -} - -async function main() { - tagRulesUpdateMaximumSetGen(); - tagRulesUpdateMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/README.md b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/README.md deleted file mode 100644 index 30a0763ee738..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/README.md +++ /dev/null @@ -1,92 +0,0 @@ -# client library samples for JavaScript - -These sample programs show how to use the JavaScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [accountsListSample.js][accountslistsample] | List all the existing accounts x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Accounts_List_MaximumSet_Gen.json | -| [monitorsCreateOrUpdateSample.js][monitorscreateorupdatesample] | Create a NewRelicMonitorResource x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_CreateOrUpdate_MaximumSet_Gen.json | -| [monitorsDeleteSample.js][monitorsdeletesample] | Delete a NewRelicMonitorResource x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_Delete_MaximumSet_Gen.json | -| [monitorsGetMetricRulesSample.js][monitorsgetmetricrulessample] | Get metric rules x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_GetMetricRules_MaximumSet_Gen.json | -| [monitorsGetMetricStatusSample.js][monitorsgetmetricstatussample] | Get metric status x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_GetMetricStatus_MaximumSet_Gen.json | -| [monitorsGetSample.js][monitorsgetsample] | Get a NewRelicMonitorResource x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_Get_MaximumSet_Gen.json | -| [monitorsListAppServicesSample.js][monitorslistappservicessample] | List the app service resources currently being monitored by the NewRelic resource. x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListAppServices_MaximumSet_Gen.json | -| [monitorsListByResourceGroupSample.js][monitorslistbyresourcegroupsample] | List NewRelicMonitorResource resources by resource group x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListByResourceGroup_MaximumSet_Gen.json | -| [monitorsListBySubscriptionSample.js][monitorslistbysubscriptionsample] | List NewRelicMonitorResource resources by subscription ID x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListBySubscription_MaximumSet_Gen.json | -| [monitorsListHostsSample.js][monitorslisthostssample] | List the compute vm resources currently being monitored by the NewRelic resource. x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListHosts_MaximumSet_Gen.json | -| [monitorsListMonitoredResourcesSample.js][monitorslistmonitoredresourcessample] | List the resources currently being monitored by the NewRelic monitor resource. x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListMonitoredResources_MaximumSet_Gen.json | -| [monitorsSwitchBillingSample.js][monitorsswitchbillingsample] | Switches the billing for NewRelic monitor resource. x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_SwitchBilling_MaximumSet_Gen.json | -| [monitorsUpdateSample.js][monitorsupdatesample] | Update a NewRelicMonitorResource x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_Update_MaximumSet_Gen.json | -| [monitorsVMHostPayloadSample.js][monitorsvmhostpayloadsample] | Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM. x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_VmHostPayload_MaximumSet_Gen.json | -| [operationsListSample.js][operationslistsample] | List the operations for the provider x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Operations_List_MaximumSet_Gen.json | -| [organizationsListSample.js][organizationslistsample] | List all the existing organizations x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Organizations_List_MaximumSet_Gen.json | -| [plansListSample.js][planslistsample] | List plans data x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Plans_List_MaximumSet_Gen.json | -| [tagRulesCreateOrUpdateSample.js][tagrulescreateorupdatesample] | Create a TagRule x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_CreateOrUpdate_MaximumSet_Gen.json | -| [tagRulesDeleteSample.js][tagrulesdeletesample] | Delete a TagRule x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_Delete_MaximumSet_Gen.json | -| [tagRulesGetSample.js][tagrulesgetsample] | Get a TagRule x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_Get_MaximumSet_Gen.json | -| [tagRulesListByNewRelicMonitorResourceSample.js][tagruleslistbynewrelicmonitorresourcesample] | List TagRule resources by NewRelicMonitorResource x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_ListByNewRelicMonitorResource_MaximumSet_Gen.json | -| [tagRulesUpdateSample.js][tagrulesupdatesample] | Update a TagRule x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_Update_MaximumSet_Gen.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 accountsListSample.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 NEWRELICOBSERVABILITY_SUBSCRIPTION_ID="" NEWRELICOBSERVABILITY_SUBSCRIPTION_ID="" node accountsListSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[accountslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/accountsListSample.js -[monitorscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsCreateOrUpdateSample.js -[monitorsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsDeleteSample.js -[monitorsgetmetricrulessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsGetMetricRulesSample.js -[monitorsgetmetricstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsGetMetricStatusSample.js -[monitorsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsGetSample.js -[monitorslistappservicessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsListAppServicesSample.js -[monitorslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsListByResourceGroupSample.js -[monitorslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsListBySubscriptionSample.js -[monitorslisthostssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsListHostsSample.js -[monitorslistmonitoredresourcessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsListMonitoredResourcesSample.js -[monitorsswitchbillingsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsSwitchBillingSample.js -[monitorsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsUpdateSample.js -[monitorsvmhostpayloadsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsVMHostPayloadSample.js -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/operationsListSample.js -[organizationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/organizationsListSample.js -[planslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/plansListSample.js -[tagrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/tagRulesCreateOrUpdateSample.js -[tagrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/tagRulesDeleteSample.js -[tagrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/tagRulesGetSample.js -[tagruleslistbynewrelicmonitorresourcesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/tagRulesListByNewRelicMonitorResourceSample.js -[tagrulesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/tagRulesUpdateSample.js -[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-newrelicobservability?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/newrelicobservability/arm-newrelicobservability/README.md diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/accountsListSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/accountsListSample.js deleted file mode 100644 index e2e566eaf33b..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/accountsListSample.js +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NewRelicObservability } = require("@azure/arm-newrelicobservability"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List all the existing accounts - * - * @summary List all the existing accounts - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Accounts_List_MaximumSet_Gen.json - */ -async function accountsListMaximumSetGen() { - const subscriptionId = process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "nqmcgifgaqlf"; - const userEmail = "ruxvg@xqkmdhrnoo.hlmbpm"; - const location = "egh"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.accounts.list(userEmail, location)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List all the existing accounts - * - * @summary List all the existing accounts - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Accounts_List_MinimumSet_Gen.json - */ -async function accountsListMinimumSetGen() { - const subscriptionId = process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "nqmcgifgaqlf"; - const userEmail = "ruxvg@xqkmdhrnoo.hlmbpm"; - const location = "egh"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.accounts.list(userEmail, location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - accountsListMaximumSetGen(); - accountsListMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsCreateOrUpdateSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsCreateOrUpdateSample.js deleted file mode 100644 index 7bfaf53c40de..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsCreateOrUpdateSample.js +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { NewRelicObservability } = require("@azure/arm-newrelicobservability"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a NewRelicMonitorResource - * - * @summary Create a NewRelicMonitorResource - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_CreateOrUpdate_MaximumSet_Gen.json - */ -async function monitorsCreateOrUpdateMaximumSetGen() { - const subscriptionId = process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "hfmjmpyqgezxkp"; - const resourceGroupName = process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgNewRelic"; - const monitorName = "cdlymktqw"; - const resource = { - accountCreationSource: "LIFTR", - liftrResourceCategory: "Unknown", - location: "k", - marketplaceSubscriptionStatus: "Active", - monitoringStatus: "Enabled", - newRelicAccountProperties: { - accountInfo: { - accountId: "xhqmg", - ingestionKey: "wltnimmhqt", - region: "ljcf", - }, - organizationInfo: { organizationId: "k" }, - singleSignOnProperties: { - enterpriseAppId: "kwiwfz", - provisioningState: "Accepted", - singleSignOnState: "Initial", - singleSignOnUrl: "kvseueuljsxmfwpqctz", - }, - userId: "vcscxlncofcuduadesd", - }, - orgCreationSource: "LIFTR", - planData: { - billingCycle: "YEARLY", - effectiveDate: new Date("2022-12-05T14:11:37.786Z"), - planDetails: "tbbiaga", - usageType: "PAYG", - }, - provisioningState: "Accepted", - tags: { key6976: "oaxfhf" }, - userInfo: { - country: "hslqnwdanrconqyekwbnttaetv", - emailAddress: "%6%@4-g.N1.3F-kI1.Ue-.lJso", - firstName: "vdftzcggirefejajwahhwhyibutramdaotvnuf", - lastName: "bcsztgqovdlmzfkjdrngidwzqsevagexzzilnlc", - phoneNumber: "krf", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.monitors.beginCreateOrUpdateAndWait( - resourceGroupName, - monitorName, - resource - ); - console.log(result); -} - -async function main() { - monitorsCreateOrUpdateMaximumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsDeleteSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsDeleteSample.js deleted file mode 100644 index c2cb4dbfafa0..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsDeleteSample.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 { NewRelicObservability } = require("@azure/arm-newrelicobservability"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete a NewRelicMonitorResource - * - * @summary Delete a NewRelicMonitorResource - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_Delete_MaximumSet_Gen.json - */ -async function monitorsDeleteMaximumSetGen() { - const subscriptionId = process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const userEmail = "ruxvg@xqkmdhrnoo.hlmbpm"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.monitors.beginDeleteAndWait( - resourceGroupName, - userEmail, - monitorName - ); - console.log(result); -} - -/** - * This sample demonstrates how to Delete a NewRelicMonitorResource - * - * @summary Delete a NewRelicMonitorResource - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_Delete_MinimumSet_Gen.json - */ -async function monitorsDeleteMinimumSetGen() { - const subscriptionId = process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const userEmail = "ruxvg@xqkmdhrnoo.hlmbpm"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.monitors.beginDeleteAndWait( - resourceGroupName, - userEmail, - monitorName - ); - console.log(result); -} - -async function main() { - monitorsDeleteMaximumSetGen(); - monitorsDeleteMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsGetMetricRulesSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsGetMetricRulesSample.js deleted file mode 100644 index 7d56c078a221..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsGetMetricRulesSample.js +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NewRelicObservability } = require("@azure/arm-newrelicobservability"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get metric rules - * - * @summary Get metric rules - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_GetMetricRules_MaximumSet_Gen.json - */ -async function monitorsGetMetricRulesMaximumSetGen() { - const subscriptionId = process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "nqmcgifgaqlf"; - const resourceGroupName = process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgNewRelic"; - const monitorName = "fhcjxnxumkdlgpwanewtkdnyuz"; - const request = { userEmail: "ruxvg@xqkmdhrnoo.hlmbpm" }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.monitors.getMetricRules(resourceGroupName, monitorName, request); - console.log(result); -} - -/** - * This sample demonstrates how to Get metric rules - * - * @summary Get metric rules - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_GetMetricRules_MinimumSet_Gen.json - */ -async function monitorsGetMetricRulesMinimumSetGen() { - const subscriptionId = process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "nqmcgifgaqlf"; - const resourceGroupName = process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgNewRelic"; - const monitorName = "fhcjxnxumkdlgpwanewtkdnyuz"; - const request = { userEmail: "ruxvg@xqkmdhrnoo.hlmbpm" }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.monitors.getMetricRules(resourceGroupName, monitorName, request); - console.log(result); -} - -async function main() { - monitorsGetMetricRulesMaximumSetGen(); - monitorsGetMetricRulesMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsGetMetricStatusSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsGetMetricStatusSample.js deleted file mode 100644 index cb635951047a..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsGetMetricStatusSample.js +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NewRelicObservability } = require("@azure/arm-newrelicobservability"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get metric status - * - * @summary Get metric status - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_GetMetricStatus_MaximumSet_Gen.json - */ -async function monitorsGetMetricStatusMaximumSetGen() { - const subscriptionId = process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "nqmcgifgaqlf"; - const resourceGroupName = process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgNewRelic"; - const monitorName = "fhcjxnxumkdlgpwanewtkdnyuz"; - const request = { - azureResourceIds: ["enfghpfw"], - userEmail: "ruxvg@xqkmdhrnoo.hlmbpm", - }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.monitors.getMetricStatus(resourceGroupName, monitorName, request); - console.log(result); -} - -/** - * This sample demonstrates how to Get metric status - * - * @summary Get metric status - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_GetMetricStatus_MinimumSet_Gen.json - */ -async function monitorsGetMetricStatusMinimumSetGen() { - const subscriptionId = process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "nqmcgifgaqlf"; - const resourceGroupName = process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgNewRelic"; - const monitorName = "fhcjxnxumkdlgpwanewtkdnyuz"; - const request = { - userEmail: "ruxvg@xqkmdhrnoo.hlmbpm", - }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.monitors.getMetricStatus(resourceGroupName, monitorName, request); - console.log(result); -} - -async function main() { - monitorsGetMetricStatusMaximumSetGen(); - monitorsGetMetricStatusMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsGetSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsGetSample.js deleted file mode 100644 index e1e9f1fe6851..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsGetSample.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 { NewRelicObservability } = require("@azure/arm-newrelicobservability"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a NewRelicMonitorResource - * - * @summary Get a NewRelicMonitorResource - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_Get_MaximumSet_Gen.json - */ -async function monitorsGetMaximumSetGen() { - const subscriptionId = process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "hfmjmpyqgezxkp"; - const resourceGroupName = process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgNewRelic"; - const monitorName = "cdlymktqw"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.monitors.get(resourceGroupName, monitorName); - console.log(result); -} - -async function main() { - monitorsGetMaximumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsListAppServicesSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsListAppServicesSample.js deleted file mode 100644 index 98f891ee8c43..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsListAppServicesSample.js +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { NewRelicObservability } = require("@azure/arm-newrelicobservability"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List the app service resources currently being monitored by the NewRelic resource. - * - * @summary List the app service resources currently being monitored by the NewRelic resource. - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListAppServices_MaximumSet_Gen.json - */ -async function monitorsListAppServicesMaximumSetGen() { - const subscriptionId = process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "nqmcgifgaqlf"; - const resourceGroupName = process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgNewRelic"; - const monitorName = "fhcjxnxumkdlgpwanewtkdnyuz"; - const request = { - azureResourceIds: ["pvzrksrmzowobuhxpwiotnpcvjbu"], - userEmail: "ruxvg@xqkmdhrnoo.hlmbpm", - }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.monitors.listAppServices(resourceGroupName, monitorName, request)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List the app service resources currently being monitored by the NewRelic resource. - * - * @summary List the app service resources currently being monitored by the NewRelic resource. - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListAppServices_MinimumSet_Gen.json - */ -async function monitorsListAppServicesMinimumSetGen() { - const subscriptionId = process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "nqmcgifgaqlf"; - const resourceGroupName = process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgNewRelic"; - const monitorName = "fhcjxnxumkdlgpwanewtkdnyuz"; - const request = { - userEmail: "ruxvg@xqkmdhrnoo.hlmbpm", - }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.monitors.listAppServices(resourceGroupName, monitorName, request)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - monitorsListAppServicesMaximumSetGen(); - monitorsListAppServicesMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsListByResourceGroupSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsListByResourceGroupSample.js deleted file mode 100644 index 2c306b0ec25d..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsListByResourceGroupSample.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 { NewRelicObservability } = require("@azure/arm-newrelicobservability"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List NewRelicMonitorResource resources by resource group - * - * @summary List NewRelicMonitorResource resources by resource group - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListByResourceGroup_MaximumSet_Gen.json - */ -async function monitorsListByResourceGroupMaximumSetGen() { - const subscriptionId = process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "hfmjmpyqgezxkp"; - const resourceGroupName = process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgNewRelic"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.monitors.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - monitorsListByResourceGroupMaximumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsListBySubscriptionSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsListBySubscriptionSample.js deleted file mode 100644 index e798459a5aad..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsListBySubscriptionSample.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 { NewRelicObservability } = require("@azure/arm-newrelicobservability"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List NewRelicMonitorResource resources by subscription ID - * - * @summary List NewRelicMonitorResource resources by subscription ID - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListBySubscription_MaximumSet_Gen.json - */ -async function monitorsListBySubscriptionMaximumSetGen() { - const subscriptionId = process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "hfmjmpyqgezxkp"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.monitors.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - monitorsListBySubscriptionMaximumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsListHostsSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsListHostsSample.js deleted file mode 100644 index 5c54c7a3633d..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsListHostsSample.js +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { NewRelicObservability } = require("@azure/arm-newrelicobservability"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List the compute vm resources currently being monitored by the NewRelic resource. - * - * @summary List the compute vm resources currently being monitored by the NewRelic resource. - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListHosts_MaximumSet_Gen.json - */ -async function monitorsListHostsMaximumSetGen() { - const subscriptionId = process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const request = { - userEmail: "ruxvg@xqkmdhrnoo.hlmbpm", - vmIds: ["xzphvxvfmvjrnsgyns"], - }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.monitors.listHosts(resourceGroupName, monitorName, request)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List the compute vm resources currently being monitored by the NewRelic resource. - * - * @summary List the compute vm resources currently being monitored by the NewRelic resource. - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListHosts_MinimumSet_Gen.json - */ -async function monitorsListHostsMinimumSetGen() { - const subscriptionId = process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const request = { - userEmail: "ruxvg@xqkmdhrnoo.hlmbpm", - vmIds: ["xzphvxvfmvjrnsgyns"], - }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.monitors.listHosts(resourceGroupName, monitorName, request)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - monitorsListHostsMaximumSetGen(); - monitorsListHostsMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsListMonitoredResourcesSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsListMonitoredResourcesSample.js deleted file mode 100644 index 95fcc4aa1984..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsListMonitoredResourcesSample.js +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NewRelicObservability } = require("@azure/arm-newrelicobservability"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List the resources currently being monitored by the NewRelic monitor resource. - * - * @summary List the resources currently being monitored by the NewRelic monitor resource. - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListMonitoredResources_MaximumSet_Gen.json - */ -async function monitorsListMonitoredResourcesMaximumSetGen() { - const subscriptionId = process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.monitors.listMonitoredResources(resourceGroupName, monitorName)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List the resources currently being monitored by the NewRelic monitor resource. - * - * @summary List the resources currently being monitored by the NewRelic monitor resource. - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListMonitoredResources_MinimumSet_Gen.json - */ -async function monitorsListMonitoredResourcesMinimumSetGen() { - const subscriptionId = process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.monitors.listMonitoredResources(resourceGroupName, monitorName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - monitorsListMonitoredResourcesMaximumSetGen(); - monitorsListMonitoredResourcesMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsSwitchBillingSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsSwitchBillingSample.js deleted file mode 100644 index b2772841604d..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsSwitchBillingSample.js +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { NewRelicObservability } = require("@azure/arm-newrelicobservability"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Switches the billing for NewRelic monitor resource. - * - * @summary Switches the billing for NewRelic monitor resource. - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_SwitchBilling_MaximumSet_Gen.json - */ -async function monitorsSwitchBillingMaximumSetGen() { - const subscriptionId = process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "nqmcgifgaqlf"; - const resourceGroupName = process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgNewRelic"; - const monitorName = "fhcjxnxumkdlgpwanewtkdnyuz"; - const request = { - azureResourceId: "enfghpfw", - organizationId: "k", - planData: { - billingCycle: "YEARLY", - effectiveDate: new Date("2022-12-05T14:11:37.786Z"), - planDetails: "tbbiaga", - usageType: "PAYG", - }, - userEmail: "ruxvg@xqkmdhrnoo.hlmbpm", - }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.monitors.switchBilling(resourceGroupName, monitorName, request); - console.log(result); -} - -/** - * This sample demonstrates how to Switches the billing for NewRelic monitor resource. - * - * @summary Switches the billing for NewRelic monitor resource. - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_SwitchBilling_MinimumSet_Gen.json - */ -async function monitorsSwitchBillingMinimumSetGen() { - const subscriptionId = process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "nqmcgifgaqlf"; - const resourceGroupName = process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgNewRelic"; - const monitorName = "fhcjxnxumkdlgpwanewtkdnyuz"; - const request = { - userEmail: "ruxvg@xqkmdhrnoo.hlmbpm", - }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.monitors.switchBilling(resourceGroupName, monitorName, request); - console.log(result); -} - -async function main() { - monitorsSwitchBillingMaximumSetGen(); - monitorsSwitchBillingMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsUpdateSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsUpdateSample.js deleted file mode 100644 index 17facaad9caa..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsUpdateSample.js +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { NewRelicObservability } = require("@azure/arm-newrelicobservability"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Update a NewRelicMonitorResource - * - * @summary Update a NewRelicMonitorResource - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_Update_MaximumSet_Gen.json - */ -async function monitorsUpdateMaximumSetGen() { - const subscriptionId = process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "hfmjmpyqgezxkp"; - const resourceGroupName = process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgNewRelic"; - const monitorName = "cdlymktqw"; - const properties = { - accountCreationSource: "LIFTR", - identity: { type: "None", userAssignedIdentities: { key8903: {} } }, - newRelicAccountProperties: { - accountInfo: { - accountId: "xhqmg", - ingestionKey: "wltnimmhqt", - region: "ljcf", - }, - organizationInfo: { organizationId: "k" }, - singleSignOnProperties: { - enterpriseAppId: "kwiwfz", - provisioningState: "Accepted", - singleSignOnState: "Initial", - singleSignOnUrl: "kvseueuljsxmfwpqctz", - }, - userId: "vcscxlncofcuduadesd", - }, - orgCreationSource: "LIFTR", - planData: { - billingCycle: "YEARLY", - effectiveDate: new Date("2022-12-05T14:11:37.786Z"), - planDetails: "tbbiaga", - usageType: "PAYG", - }, - tags: { key164: "jqakdrrmmyzytqu" }, - userInfo: { - country: "hslqnwdanrconqyekwbnttaetv", - emailAddress: "%6%@4-g.N1.3F-kI1.Ue-.lJso", - firstName: "vdftzcggirefejajwahhwhyibutramdaotvnuf", - lastName: "bcsztgqovdlmzfkjdrngidwzqsevagexzzilnlc", - phoneNumber: "krf", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.monitors.update(resourceGroupName, monitorName, properties); - console.log(result); -} - -async function main() { - monitorsUpdateMaximumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsVMHostPayloadSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsVMHostPayloadSample.js deleted file mode 100644 index 94394396e532..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/monitorsVMHostPayloadSample.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 { NewRelicObservability } = require("@azure/arm-newrelicobservability"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM. - * - * @summary Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM. - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_VmHostPayload_MaximumSet_Gen.json - */ -async function monitorsVMHostPayloadMaximumSetGen() { - const subscriptionId = process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.monitors.vmHostPayload(resourceGroupName, monitorName); - console.log(result); -} - -/** - * This sample demonstrates how to Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM. - * - * @summary Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM. - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_VmHostPayload_MinimumSet_Gen.json - */ -async function monitorsVMHostPayloadMinimumSetGen() { - const subscriptionId = process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.monitors.vmHostPayload(resourceGroupName, monitorName); - console.log(result); -} - -async function main() { - monitorsVMHostPayloadMaximumSetGen(); - monitorsVMHostPayloadMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/operationsListSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/operationsListSample.js deleted file mode 100644 index 26539e6fdac5..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/operationsListSample.js +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { NewRelicObservability } = require("@azure/arm-newrelicobservability"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List the operations for the provider - * - * @summary List the operations for the provider - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Operations_List_MaximumSet_Gen.json - */ -async function operationsListMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List the operations for the provider - * - * @summary List the operations for the provider - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Operations_List_MinimumSet_Gen.json - */ -async function operationsListMinimumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - operationsListMaximumSetGen(); - operationsListMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/organizationsListSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/organizationsListSample.js deleted file mode 100644 index 445d4d53ecb5..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/organizationsListSample.js +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NewRelicObservability } = require("@azure/arm-newrelicobservability"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List all the existing organizations - * - * @summary List all the existing organizations - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Organizations_List_MaximumSet_Gen.json - */ -async function organizationsListMaximumSetGen() { - const subscriptionId = process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "nqmcgifgaqlf"; - const userEmail = "ruxvg@xqkmdhrnoo.hlmbpm"; - const location = "egh"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.organizations.list(userEmail, location)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List all the existing organizations - * - * @summary List all the existing organizations - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Organizations_List_MinimumSet_Gen.json - */ -async function organizationsListMinimumSetGen() { - const subscriptionId = process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "nqmcgifgaqlf"; - const userEmail = "ruxvg@xqkmdhrnoo.hlmbpm"; - const location = "egh"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.organizations.list(userEmail, location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - organizationsListMaximumSetGen(); - organizationsListMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/package.json b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/package.json deleted file mode 100644 index 3598e088e7f5..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "@azure-samples/arm-newrelicobservability-js", - "private": true, - "version": "1.0.0", - "description": " client library samples for JavaScript", - "engines": { - "node": ">=16.0.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/newrelicobservability/arm-newrelicobservability" - }, - "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/newrelicobservability/arm-newrelicobservability", - "dependencies": { - "@azure/arm-newrelicobservability": "latest", - "dotenv": "latest", - "@azure/identity": "^2.0.1" - } -} diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/plansListSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/plansListSample.js deleted file mode 100644 index 79f896df026e..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/plansListSample.js +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NewRelicObservability } = require("@azure/arm-newrelicobservability"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List plans data - * - * @summary List plans data - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Plans_List_MaximumSet_Gen.json - */ -async function plansListMaximumSetGen() { - const subscriptionId = process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "hfmjmpyqgezxkp"; - const accountId = "pwuxgvrmkk"; - const organizationId = "hilawwjz"; - const options = { accountId, organizationId }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.plans.list(options)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List plans data - * - * @summary List plans data - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Plans_List_MinimumSet_Gen.json - */ -async function plansListMinimumSetGen() { - const subscriptionId = process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "nqmcgifgaqlf"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.plans.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - plansListMaximumSetGen(); - plansListMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/sample.env b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/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/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/tagRulesCreateOrUpdateSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/tagRulesCreateOrUpdateSample.js deleted file mode 100644 index 0fb3342e1470..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/tagRulesCreateOrUpdateSample.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 { NewRelicObservability } = require("@azure/arm-newrelicobservability"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a TagRule - * - * @summary Create a TagRule - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_CreateOrUpdate_MaximumSet_Gen.json - */ -async function tagRulesCreateOrUpdateMaximumSetGen() { - const subscriptionId = process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const ruleSetName = "bxcantgzggsepbhqmedjqyrqeezmfb"; - const resource = { - logRules: { - filteringTags: [ - { - name: "saokgpjvdlorciqbjmjxazpee", - action: "Include", - value: "sarxrqsxouhdjwsrqqicbeirdb", - }, - ], - sendAadLogs: "Enabled", - sendActivityLogs: "Enabled", - sendSubscriptionLogs: "Enabled", - }, - metricRules: { - filteringTags: [ - { - name: "saokgpjvdlorciqbjmjxazpee", - action: "Include", - value: "sarxrqsxouhdjwsrqqicbeirdb", - }, - ], - userEmail: "test@testing.com", - }, - provisioningState: "Accepted", - }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.tagRules.beginCreateOrUpdateAndWait( - resourceGroupName, - monitorName, - ruleSetName, - resource - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create a TagRule - * - * @summary Create a TagRule - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_CreateOrUpdate_MinimumSet_Gen.json - */ -async function tagRulesCreateOrUpdateMinimumSetGen() { - const subscriptionId = process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const ruleSetName = "bxcantgzggsepbhqmedjqyrqeezmfb"; - const resource = {}; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.tagRules.beginCreateOrUpdateAndWait( - resourceGroupName, - monitorName, - ruleSetName, - resource - ); - console.log(result); -} - -async function main() { - tagRulesCreateOrUpdateMaximumSetGen(); - tagRulesCreateOrUpdateMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/tagRulesDeleteSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/tagRulesDeleteSample.js deleted file mode 100644 index 17654f6db990..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/tagRulesDeleteSample.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 { NewRelicObservability } = require("@azure/arm-newrelicobservability"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete a TagRule - * - * @summary Delete a TagRule - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_Delete_MaximumSet_Gen.json - */ -async function tagRulesDeleteMaximumSetGen() { - const subscriptionId = process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const ruleSetName = "bxcantgzggsepbhqmedjqyrqeezmfb"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.tagRules.beginDeleteAndWait( - resourceGroupName, - monitorName, - ruleSetName - ); - console.log(result); -} - -/** - * This sample demonstrates how to Delete a TagRule - * - * @summary Delete a TagRule - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_Delete_MinimumSet_Gen.json - */ -async function tagRulesDeleteMinimumSetGen() { - const subscriptionId = process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const ruleSetName = "bxcantgzggsepbhqmedjqyrqeezmfb"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.tagRules.beginDeleteAndWait( - resourceGroupName, - monitorName, - ruleSetName - ); - console.log(result); -} - -async function main() { - tagRulesDeleteMaximumSetGen(); - tagRulesDeleteMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/tagRulesGetSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/tagRulesGetSample.js deleted file mode 100644 index 538e6a383544..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/tagRulesGetSample.js +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NewRelicObservability } = require("@azure/arm-newrelicobservability"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a TagRule - * - * @summary Get a TagRule - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_Get_MaximumSet_Gen.json - */ -async function tagRulesGetMaximumSetGen() { - const subscriptionId = process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const ruleSetName = "bxcantgzggsepbhqmedjqyrqeezmfb"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.tagRules.get(resourceGroupName, monitorName, ruleSetName); - console.log(result); -} - -/** - * This sample demonstrates how to Get a TagRule - * - * @summary Get a TagRule - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_Get_MinimumSet_Gen.json - */ -async function tagRulesGetMinimumSetGen() { - const subscriptionId = process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const ruleSetName = "bxcantgzggsepbhqmedjqyrqeezmfb"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.tagRules.get(resourceGroupName, monitorName, ruleSetName); - console.log(result); -} - -async function main() { - tagRulesGetMaximumSetGen(); - tagRulesGetMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/tagRulesListByNewRelicMonitorResourceSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/tagRulesListByNewRelicMonitorResourceSample.js deleted file mode 100644 index 1a086c8fdd50..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/tagRulesListByNewRelicMonitorResourceSample.js +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NewRelicObservability } = require("@azure/arm-newrelicobservability"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List TagRule resources by NewRelicMonitorResource - * - * @summary List TagRule resources by NewRelicMonitorResource - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_ListByNewRelicMonitorResource_MaximumSet_Gen.json - */ -async function tagRulesListByNewRelicMonitorResourceMaximumSetGen() { - const subscriptionId = process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.tagRules.listByNewRelicMonitorResource( - resourceGroupName, - monitorName - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List TagRule resources by NewRelicMonitorResource - * - * @summary List TagRule resources by NewRelicMonitorResource - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_ListByNewRelicMonitorResource_MinimumSet_Gen.json - */ -async function tagRulesListByNewRelicMonitorResourceMinimumSetGen() { - const subscriptionId = process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.tagRules.listByNewRelicMonitorResource( - resourceGroupName, - monitorName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - tagRulesListByNewRelicMonitorResourceMaximumSetGen(); - tagRulesListByNewRelicMonitorResourceMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/tagRulesUpdateSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/tagRulesUpdateSample.js deleted file mode 100644 index 1456048f33a1..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/javascript/tagRulesUpdateSample.js +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { NewRelicObservability } = require("@azure/arm-newrelicobservability"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Update a TagRule - * - * @summary Update a TagRule - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_Update_MaximumSet_Gen.json - */ -async function tagRulesUpdateMaximumSetGen() { - const subscriptionId = process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const ruleSetName = "bxcantgzggsepbhqmedjqyrqeezmfb"; - const properties = { - logRules: { - filteringTags: [ - { - name: "saokgpjvdlorciqbjmjxazpee", - action: "Include", - value: "sarxrqsxouhdjwsrqqicbeirdb", - }, - ], - sendAadLogs: "Enabled", - sendActivityLogs: "Enabled", - sendSubscriptionLogs: "Enabled", - }, - metricRules: { - filteringTags: [ - { - name: "saokgpjvdlorciqbjmjxazpee", - action: "Include", - value: "sarxrqsxouhdjwsrqqicbeirdb", - }, - ], - userEmail: "test@testing.com", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.tagRules.update( - resourceGroupName, - monitorName, - ruleSetName, - properties - ); - console.log(result); -} - -/** - * This sample demonstrates how to Update a TagRule - * - * @summary Update a TagRule - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_Update_MinimumSet_Gen.json - */ -async function tagRulesUpdateMinimumSetGen() { - const subscriptionId = process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const ruleSetName = "bxcantgzggsepbhqmedjqyrqeezmfb"; - const properties = {}; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.tagRules.update( - resourceGroupName, - monitorName, - ruleSetName, - properties - ); - console.log(result); -} - -async function main() { - tagRulesUpdateMaximumSetGen(); - tagRulesUpdateMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/README.md b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/README.md deleted file mode 100644 index d5875a4b7651..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/README.md +++ /dev/null @@ -1,105 +0,0 @@ -# client library samples for TypeScript - -These sample programs show how to use the TypeScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [accountsListSample.ts][accountslistsample] | List all the existing accounts x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Accounts_List_MaximumSet_Gen.json | -| [monitorsCreateOrUpdateSample.ts][monitorscreateorupdatesample] | Create a NewRelicMonitorResource x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_CreateOrUpdate_MaximumSet_Gen.json | -| [monitorsDeleteSample.ts][monitorsdeletesample] | Delete a NewRelicMonitorResource x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_Delete_MaximumSet_Gen.json | -| [monitorsGetMetricRulesSample.ts][monitorsgetmetricrulessample] | Get metric rules x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_GetMetricRules_MaximumSet_Gen.json | -| [monitorsGetMetricStatusSample.ts][monitorsgetmetricstatussample] | Get metric status x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_GetMetricStatus_MaximumSet_Gen.json | -| [monitorsGetSample.ts][monitorsgetsample] | Get a NewRelicMonitorResource x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_Get_MaximumSet_Gen.json | -| [monitorsListAppServicesSample.ts][monitorslistappservicessample] | List the app service resources currently being monitored by the NewRelic resource. x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListAppServices_MaximumSet_Gen.json | -| [monitorsListByResourceGroupSample.ts][monitorslistbyresourcegroupsample] | List NewRelicMonitorResource resources by resource group x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListByResourceGroup_MaximumSet_Gen.json | -| [monitorsListBySubscriptionSample.ts][monitorslistbysubscriptionsample] | List NewRelicMonitorResource resources by subscription ID x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListBySubscription_MaximumSet_Gen.json | -| [monitorsListHostsSample.ts][monitorslisthostssample] | List the compute vm resources currently being monitored by the NewRelic resource. x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListHosts_MaximumSet_Gen.json | -| [monitorsListMonitoredResourcesSample.ts][monitorslistmonitoredresourcessample] | List the resources currently being monitored by the NewRelic monitor resource. x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListMonitoredResources_MaximumSet_Gen.json | -| [monitorsSwitchBillingSample.ts][monitorsswitchbillingsample] | Switches the billing for NewRelic monitor resource. x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_SwitchBilling_MaximumSet_Gen.json | -| [monitorsUpdateSample.ts][monitorsupdatesample] | Update a NewRelicMonitorResource x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_Update_MaximumSet_Gen.json | -| [monitorsVMHostPayloadSample.ts][monitorsvmhostpayloadsample] | Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM. x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_VmHostPayload_MaximumSet_Gen.json | -| [operationsListSample.ts][operationslistsample] | List the operations for the provider x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Operations_List_MaximumSet_Gen.json | -| [organizationsListSample.ts][organizationslistsample] | List all the existing organizations x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Organizations_List_MaximumSet_Gen.json | -| [plansListSample.ts][planslistsample] | List plans data x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Plans_List_MaximumSet_Gen.json | -| [tagRulesCreateOrUpdateSample.ts][tagrulescreateorupdatesample] | Create a TagRule x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_CreateOrUpdate_MaximumSet_Gen.json | -| [tagRulesDeleteSample.ts][tagrulesdeletesample] | Delete a TagRule x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_Delete_MaximumSet_Gen.json | -| [tagRulesGetSample.ts][tagrulesgetsample] | Get a TagRule x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_Get_MaximumSet_Gen.json | -| [tagRulesListByNewRelicMonitorResourceSample.ts][tagruleslistbynewrelicmonitorresourcesample] | List TagRule resources by NewRelicMonitorResource x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_ListByNewRelicMonitorResource_MaximumSet_Gen.json | -| [tagRulesUpdateSample.ts][tagrulesupdatesample] | Update a TagRule x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_Update_MaximumSet_Gen.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/accountsListSample.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 NEWRELICOBSERVABILITY_SUBSCRIPTION_ID="" NEWRELICOBSERVABILITY_SUBSCRIPTION_ID="" node dist/accountsListSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[accountslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/accountsListSample.ts -[monitorscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsCreateOrUpdateSample.ts -[monitorsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsDeleteSample.ts -[monitorsgetmetricrulessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsGetMetricRulesSample.ts -[monitorsgetmetricstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsGetMetricStatusSample.ts -[monitorsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsGetSample.ts -[monitorslistappservicessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsListAppServicesSample.ts -[monitorslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsListByResourceGroupSample.ts -[monitorslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsListBySubscriptionSample.ts -[monitorslisthostssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsListHostsSample.ts -[monitorslistmonitoredresourcessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsListMonitoredResourcesSample.ts -[monitorsswitchbillingsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsSwitchBillingSample.ts -[monitorsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsUpdateSample.ts -[monitorsvmhostpayloadsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsVMHostPayloadSample.ts -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/operationsListSample.ts -[organizationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/organizationsListSample.ts -[planslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/plansListSample.ts -[tagrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/tagRulesCreateOrUpdateSample.ts -[tagrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/tagRulesDeleteSample.ts -[tagrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/tagRulesGetSample.ts -[tagruleslistbynewrelicmonitorresourcesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/tagRulesListByNewRelicMonitorResourceSample.ts -[tagrulesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/tagRulesUpdateSample.ts -[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-newrelicobservability?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/newrelicobservability/arm-newrelicobservability/README.md -[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/package.json b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/package.json deleted file mode 100644 index 71ec38035f76..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "@azure-samples/arm-newrelicobservability-ts", - "private": true, - "version": "1.0.0", - "description": " client library samples for TypeScript", - "engines": { - "node": ">=16.0.0" - }, - "scripts": { - "build": "tsc", - "prebuild": "rimraf dist/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/newrelicobservability/arm-newrelicobservability" - }, - "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/newrelicobservability/arm-newrelicobservability", - "dependencies": { - "@azure/arm-newrelicobservability": "latest", - "dotenv": "latest", - "@azure/identity": "^2.0.1" - }, - "devDependencies": { - "@types/node": "^16.0.0", - "typescript": "~5.0.0", - "rimraf": "latest" - } -} diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/sample.env b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/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/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/accountsListSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/accountsListSample.ts deleted file mode 100644 index 99f3702cf446..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/accountsListSample.ts +++ /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. -import { NewRelicObservability } from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List all the existing accounts - * - * @summary List all the existing accounts - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Accounts_List_MaximumSet_Gen.json - */ -async function accountsListMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "nqmcgifgaqlf"; - const userEmail = "ruxvg@xqkmdhrnoo.hlmbpm"; - const location = "egh"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.accounts.list(userEmail, location)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List all the existing accounts - * - * @summary List all the existing accounts - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Accounts_List_MinimumSet_Gen.json - */ -async function accountsListMinimumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "nqmcgifgaqlf"; - const userEmail = "ruxvg@xqkmdhrnoo.hlmbpm"; - const location = "egh"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.accounts.list(userEmail, location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - accountsListMaximumSetGen(); - accountsListMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsCreateOrUpdateSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsCreateOrUpdateSample.ts deleted file mode 100644 index a16060bfd228..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsCreateOrUpdateSample.ts +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - NewRelicMonitorResource, - NewRelicObservability -} from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a NewRelicMonitorResource - * - * @summary Create a NewRelicMonitorResource - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_CreateOrUpdate_MaximumSet_Gen.json - */ -async function monitorsCreateOrUpdateMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "hfmjmpyqgezxkp"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgNewRelic"; - const monitorName = "cdlymktqw"; - const resource: NewRelicMonitorResource = { - accountCreationSource: "LIFTR", - liftrResourceCategory: "Unknown", - location: "k", - marketplaceSubscriptionStatus: "Active", - monitoringStatus: "Enabled", - newRelicAccountProperties: { - accountInfo: { - accountId: "xhqmg", - ingestionKey: "wltnimmhqt", - region: "ljcf" - }, - organizationInfo: { organizationId: "k" }, - singleSignOnProperties: { - enterpriseAppId: "kwiwfz", - provisioningState: "Accepted", - singleSignOnState: "Initial", - singleSignOnUrl: "kvseueuljsxmfwpqctz" - }, - userId: "vcscxlncofcuduadesd" - }, - orgCreationSource: "LIFTR", - planData: { - billingCycle: "YEARLY", - effectiveDate: new Date("2022-12-05T14:11:37.786Z"), - planDetails: "tbbiaga", - usageType: "PAYG" - }, - provisioningState: "Accepted", - tags: { key6976: "oaxfhf" }, - userInfo: { - country: "hslqnwdanrconqyekwbnttaetv", - emailAddress: "%6%@4-g.N1.3F-kI1.Ue-.lJso", - firstName: "vdftzcggirefejajwahhwhyibutramdaotvnuf", - lastName: "bcsztgqovdlmzfkjdrngidwzqsevagexzzilnlc", - phoneNumber: "krf" - } - }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.monitors.beginCreateOrUpdateAndWait( - resourceGroupName, - monitorName, - resource - ); - console.log(result); -} - -async function main() { - monitorsCreateOrUpdateMaximumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsDeleteSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsDeleteSample.ts deleted file mode 100644 index f9880c76a3cf..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsDeleteSample.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 { NewRelicObservability } from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a NewRelicMonitorResource - * - * @summary Delete a NewRelicMonitorResource - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_Delete_MaximumSet_Gen.json - */ -async function monitorsDeleteMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const userEmail = "ruxvg@xqkmdhrnoo.hlmbpm"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.monitors.beginDeleteAndWait( - resourceGroupName, - userEmail, - monitorName - ); - console.log(result); -} - -/** - * This sample demonstrates how to Delete a NewRelicMonitorResource - * - * @summary Delete a NewRelicMonitorResource - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_Delete_MinimumSet_Gen.json - */ -async function monitorsDeleteMinimumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const userEmail = "ruxvg@xqkmdhrnoo.hlmbpm"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.monitors.beginDeleteAndWait( - resourceGroupName, - userEmail, - monitorName - ); - console.log(result); -} - -async function main() { - monitorsDeleteMaximumSetGen(); - monitorsDeleteMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsGetMetricRulesSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsGetMetricRulesSample.ts deleted file mode 100644 index a25ff34b59a7..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsGetMetricRulesSample.ts +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - MetricsRequest, - NewRelicObservability -} from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get metric rules - * - * @summary Get metric rules - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_GetMetricRules_MaximumSet_Gen.json - */ -async function monitorsGetMetricRulesMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "nqmcgifgaqlf"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgNewRelic"; - const monitorName = "fhcjxnxumkdlgpwanewtkdnyuz"; - const request: MetricsRequest = { userEmail: "ruxvg@xqkmdhrnoo.hlmbpm" }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.monitors.getMetricRules( - resourceGroupName, - monitorName, - request - ); - console.log(result); -} - -/** - * This sample demonstrates how to Get metric rules - * - * @summary Get metric rules - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_GetMetricRules_MinimumSet_Gen.json - */ -async function monitorsGetMetricRulesMinimumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "nqmcgifgaqlf"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgNewRelic"; - const monitorName = "fhcjxnxumkdlgpwanewtkdnyuz"; - const request: MetricsRequest = { userEmail: "ruxvg@xqkmdhrnoo.hlmbpm" }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.monitors.getMetricRules( - resourceGroupName, - monitorName, - request - ); - console.log(result); -} - -async function main() { - monitorsGetMetricRulesMaximumSetGen(); - monitorsGetMetricRulesMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsGetMetricStatusSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsGetMetricStatusSample.ts deleted file mode 100644 index 5df6ca2a184e..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsGetMetricStatusSample.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - MetricsStatusRequest, - NewRelicObservability -} from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get metric status - * - * @summary Get metric status - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_GetMetricStatus_MaximumSet_Gen.json - */ -async function monitorsGetMetricStatusMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "nqmcgifgaqlf"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgNewRelic"; - const monitorName = "fhcjxnxumkdlgpwanewtkdnyuz"; - const request: MetricsStatusRequest = { - azureResourceIds: ["enfghpfw"], - userEmail: "ruxvg@xqkmdhrnoo.hlmbpm" - }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.monitors.getMetricStatus( - resourceGroupName, - monitorName, - request - ); - console.log(result); -} - -/** - * This sample demonstrates how to Get metric status - * - * @summary Get metric status - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_GetMetricStatus_MinimumSet_Gen.json - */ -async function monitorsGetMetricStatusMinimumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "nqmcgifgaqlf"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgNewRelic"; - const monitorName = "fhcjxnxumkdlgpwanewtkdnyuz"; - const request: MetricsStatusRequest = { - userEmail: "ruxvg@xqkmdhrnoo.hlmbpm" - }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.monitors.getMetricStatus( - resourceGroupName, - monitorName, - request - ); - console.log(result); -} - -async function main() { - monitorsGetMetricStatusMaximumSetGen(); - monitorsGetMetricStatusMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsGetSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsGetSample.ts deleted file mode 100644 index 736fe637f7db..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsGetSample.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 { NewRelicObservability } from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a NewRelicMonitorResource - * - * @summary Get a NewRelicMonitorResource - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_Get_MaximumSet_Gen.json - */ -async function monitorsGetMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "hfmjmpyqgezxkp"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgNewRelic"; - const monitorName = "cdlymktqw"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.monitors.get(resourceGroupName, monitorName); - console.log(result); -} - -async function main() { - monitorsGetMaximumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsListAppServicesSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsListAppServicesSample.ts deleted file mode 100644 index 04dcf08713ba..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsListAppServicesSample.ts +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - AppServicesGetRequest, - NewRelicObservability -} from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List the app service resources currently being monitored by the NewRelic resource. - * - * @summary List the app service resources currently being monitored by the NewRelic resource. - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListAppServices_MaximumSet_Gen.json - */ -async function monitorsListAppServicesMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "nqmcgifgaqlf"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgNewRelic"; - const monitorName = "fhcjxnxumkdlgpwanewtkdnyuz"; - const request: AppServicesGetRequest = { - azureResourceIds: ["pvzrksrmzowobuhxpwiotnpcvjbu"], - userEmail: "ruxvg@xqkmdhrnoo.hlmbpm" - }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.monitors.listAppServices( - resourceGroupName, - monitorName, - request - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List the app service resources currently being monitored by the NewRelic resource. - * - * @summary List the app service resources currently being monitored by the NewRelic resource. - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListAppServices_MinimumSet_Gen.json - */ -async function monitorsListAppServicesMinimumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "nqmcgifgaqlf"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgNewRelic"; - const monitorName = "fhcjxnxumkdlgpwanewtkdnyuz"; - const request: AppServicesGetRequest = { - userEmail: "ruxvg@xqkmdhrnoo.hlmbpm" - }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.monitors.listAppServices( - resourceGroupName, - monitorName, - request - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - monitorsListAppServicesMaximumSetGen(); - monitorsListAppServicesMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsListByResourceGroupSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsListByResourceGroupSample.ts deleted file mode 100644 index f4915e862368..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsListByResourceGroupSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NewRelicObservability } from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List NewRelicMonitorResource resources by resource group - * - * @summary List NewRelicMonitorResource resources by resource group - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListByResourceGroup_MaximumSet_Gen.json - */ -async function monitorsListByResourceGroupMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "hfmjmpyqgezxkp"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgNewRelic"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.monitors.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - monitorsListByResourceGroupMaximumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsListBySubscriptionSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsListBySubscriptionSample.ts deleted file mode 100644 index 4a6cdd813248..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsListBySubscriptionSample.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 { NewRelicObservability } from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List NewRelicMonitorResource resources by subscription ID - * - * @summary List NewRelicMonitorResource resources by subscription ID - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListBySubscription_MaximumSet_Gen.json - */ -async function monitorsListBySubscriptionMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "hfmjmpyqgezxkp"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.monitors.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - monitorsListBySubscriptionMaximumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsListHostsSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsListHostsSample.ts deleted file mode 100644 index bdb591af2de1..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsListHostsSample.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - HostsGetRequest, - NewRelicObservability -} from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List the compute vm resources currently being monitored by the NewRelic resource. - * - * @summary List the compute vm resources currently being monitored by the NewRelic resource. - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListHosts_MaximumSet_Gen.json - */ -async function monitorsListHostsMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const request: HostsGetRequest = { - userEmail: "ruxvg@xqkmdhrnoo.hlmbpm", - vmIds: ["xzphvxvfmvjrnsgyns"] - }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.monitors.listHosts( - resourceGroupName, - monitorName, - request - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List the compute vm resources currently being monitored by the NewRelic resource. - * - * @summary List the compute vm resources currently being monitored by the NewRelic resource. - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListHosts_MinimumSet_Gen.json - */ -async function monitorsListHostsMinimumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const request: HostsGetRequest = { - userEmail: "ruxvg@xqkmdhrnoo.hlmbpm", - vmIds: ["xzphvxvfmvjrnsgyns"] - }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.monitors.listHosts( - resourceGroupName, - monitorName, - request - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - monitorsListHostsMaximumSetGen(); - monitorsListHostsMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsListMonitoredResourcesSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsListMonitoredResourcesSample.ts deleted file mode 100644 index d25abd9a0214..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsListMonitoredResourcesSample.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NewRelicObservability } from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List the resources currently being monitored by the NewRelic monitor resource. - * - * @summary List the resources currently being monitored by the NewRelic monitor resource. - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListMonitoredResources_MaximumSet_Gen.json - */ -async function monitorsListMonitoredResourcesMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.monitors.listMonitoredResources( - resourceGroupName, - monitorName - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List the resources currently being monitored by the NewRelic monitor resource. - * - * @summary List the resources currently being monitored by the NewRelic monitor resource. - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListMonitoredResources_MinimumSet_Gen.json - */ -async function monitorsListMonitoredResourcesMinimumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.monitors.listMonitoredResources( - resourceGroupName, - monitorName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - monitorsListMonitoredResourcesMaximumSetGen(); - monitorsListMonitoredResourcesMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsSwitchBillingSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsSwitchBillingSample.ts deleted file mode 100644 index c72eb08c245f..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsSwitchBillingSample.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - SwitchBillingRequest, - NewRelicObservability -} from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Switches the billing for NewRelic monitor resource. - * - * @summary Switches the billing for NewRelic monitor resource. - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_SwitchBilling_MaximumSet_Gen.json - */ -async function monitorsSwitchBillingMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "nqmcgifgaqlf"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgNewRelic"; - const monitorName = "fhcjxnxumkdlgpwanewtkdnyuz"; - const request: SwitchBillingRequest = { - azureResourceId: "enfghpfw", - organizationId: "k", - planData: { - billingCycle: "YEARLY", - effectiveDate: new Date("2022-12-05T14:11:37.786Z"), - planDetails: "tbbiaga", - usageType: "PAYG" - }, - userEmail: "ruxvg@xqkmdhrnoo.hlmbpm" - }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.monitors.switchBilling( - resourceGroupName, - monitorName, - request - ); - console.log(result); -} - -/** - * This sample demonstrates how to Switches the billing for NewRelic monitor resource. - * - * @summary Switches the billing for NewRelic monitor resource. - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_SwitchBilling_MinimumSet_Gen.json - */ -async function monitorsSwitchBillingMinimumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "nqmcgifgaqlf"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgNewRelic"; - const monitorName = "fhcjxnxumkdlgpwanewtkdnyuz"; - const request: SwitchBillingRequest = { - userEmail: "ruxvg@xqkmdhrnoo.hlmbpm" - }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.monitors.switchBilling( - resourceGroupName, - monitorName, - request - ); - console.log(result); -} - -async function main() { - monitorsSwitchBillingMaximumSetGen(); - monitorsSwitchBillingMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsUpdateSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsUpdateSample.ts deleted file mode 100644 index 9086f6911dfc..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsUpdateSample.ts +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - NewRelicMonitorResourceUpdate, - NewRelicObservability -} from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update a NewRelicMonitorResource - * - * @summary Update a NewRelicMonitorResource - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_Update_MaximumSet_Gen.json - */ -async function monitorsUpdateMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "hfmjmpyqgezxkp"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgNewRelic"; - const monitorName = "cdlymktqw"; - const properties: NewRelicMonitorResourceUpdate = { - accountCreationSource: "LIFTR", - identity: { type: "None", userAssignedIdentities: { key8903: {} } }, - newRelicAccountProperties: { - accountInfo: { - accountId: "xhqmg", - ingestionKey: "wltnimmhqt", - region: "ljcf" - }, - organizationInfo: { organizationId: "k" }, - singleSignOnProperties: { - enterpriseAppId: "kwiwfz", - provisioningState: "Accepted", - singleSignOnState: "Initial", - singleSignOnUrl: "kvseueuljsxmfwpqctz" - }, - userId: "vcscxlncofcuduadesd" - }, - orgCreationSource: "LIFTR", - planData: { - billingCycle: "YEARLY", - effectiveDate: new Date("2022-12-05T14:11:37.786Z"), - planDetails: "tbbiaga", - usageType: "PAYG" - }, - tags: { key164: "jqakdrrmmyzytqu" }, - userInfo: { - country: "hslqnwdanrconqyekwbnttaetv", - emailAddress: "%6%@4-g.N1.3F-kI1.Ue-.lJso", - firstName: "vdftzcggirefejajwahhwhyibutramdaotvnuf", - lastName: "bcsztgqovdlmzfkjdrngidwzqsevagexzzilnlc", - phoneNumber: "krf" - } - }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.monitors.update( - resourceGroupName, - monitorName, - properties - ); - console.log(result); -} - -async function main() { - monitorsUpdateMaximumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsVMHostPayloadSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsVMHostPayloadSample.ts deleted file mode 100644 index 9e04ef9c8f3b..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/monitorsVMHostPayloadSample.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NewRelicObservability } from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM. - * - * @summary Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM. - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_VmHostPayload_MaximumSet_Gen.json - */ -async function monitorsVMHostPayloadMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.monitors.vmHostPayload( - resourceGroupName, - monitorName - ); - console.log(result); -} - -/** - * This sample demonstrates how to Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM. - * - * @summary Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM. - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_VmHostPayload_MinimumSet_Gen.json - */ -async function monitorsVMHostPayloadMinimumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.monitors.vmHostPayload( - resourceGroupName, - monitorName - ); - console.log(result); -} - -async function main() { - monitorsVMHostPayloadMaximumSetGen(); - monitorsVMHostPayloadMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/operationsListSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/operationsListSample.ts deleted file mode 100644 index 7901f82878ec..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/operationsListSample.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NewRelicObservability } from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List the operations for the provider - * - * @summary List the operations for the provider - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Operations_List_MaximumSet_Gen.json - */ -async function operationsListMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List the operations for the provider - * - * @summary List the operations for the provider - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Operations_List_MinimumSet_Gen.json - */ -async function operationsListMinimumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - operationsListMaximumSetGen(); - operationsListMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/organizationsListSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/organizationsListSample.ts deleted file mode 100644 index 1cf2432c023b..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/organizationsListSample.ts +++ /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. -import { NewRelicObservability } from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List all the existing organizations - * - * @summary List all the existing organizations - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Organizations_List_MaximumSet_Gen.json - */ -async function organizationsListMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "nqmcgifgaqlf"; - const userEmail = "ruxvg@xqkmdhrnoo.hlmbpm"; - const location = "egh"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.organizations.list(userEmail, location)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List all the existing organizations - * - * @summary List all the existing organizations - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Organizations_List_MinimumSet_Gen.json - */ -async function organizationsListMinimumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "nqmcgifgaqlf"; - const userEmail = "ruxvg@xqkmdhrnoo.hlmbpm"; - const location = "egh"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.organizations.list(userEmail, location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - organizationsListMaximumSetGen(); - organizationsListMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/plansListSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/plansListSample.ts deleted file mode 100644 index c74ca81bd59d..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/plansListSample.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PlansListOptionalParams, - NewRelicObservability -} from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List plans data - * - * @summary List plans data - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Plans_List_MaximumSet_Gen.json - */ -async function plansListMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "hfmjmpyqgezxkp"; - const accountId = "pwuxgvrmkk"; - const organizationId = "hilawwjz"; - const options: PlansListOptionalParams = { accountId, organizationId }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.plans.list(options)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List plans data - * - * @summary List plans data - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Plans_List_MinimumSet_Gen.json - */ -async function plansListMinimumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "nqmcgifgaqlf"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.plans.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - plansListMaximumSetGen(); - plansListMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/tagRulesCreateOrUpdateSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/tagRulesCreateOrUpdateSample.ts deleted file mode 100644 index f2b5ff1b9981..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/tagRulesCreateOrUpdateSample.ts +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagRule, - NewRelicObservability -} from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a TagRule - * - * @summary Create a TagRule - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_CreateOrUpdate_MaximumSet_Gen.json - */ -async function tagRulesCreateOrUpdateMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const ruleSetName = "bxcantgzggsepbhqmedjqyrqeezmfb"; - const resource: TagRule = { - logRules: { - filteringTags: [ - { - name: "saokgpjvdlorciqbjmjxazpee", - action: "Include", - value: "sarxrqsxouhdjwsrqqicbeirdb" - } - ], - sendAadLogs: "Enabled", - sendActivityLogs: "Enabled", - sendSubscriptionLogs: "Enabled" - }, - metricRules: { - filteringTags: [ - { - name: "saokgpjvdlorciqbjmjxazpee", - action: "Include", - value: "sarxrqsxouhdjwsrqqicbeirdb" - } - ], - userEmail: "test@testing.com" - }, - provisioningState: "Accepted" - }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.tagRules.beginCreateOrUpdateAndWait( - resourceGroupName, - monitorName, - ruleSetName, - resource - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create a TagRule - * - * @summary Create a TagRule - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_CreateOrUpdate_MinimumSet_Gen.json - */ -async function tagRulesCreateOrUpdateMinimumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const ruleSetName = "bxcantgzggsepbhqmedjqyrqeezmfb"; - const resource: TagRule = {}; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.tagRules.beginCreateOrUpdateAndWait( - resourceGroupName, - monitorName, - ruleSetName, - resource - ); - console.log(result); -} - -async function main() { - tagRulesCreateOrUpdateMaximumSetGen(); - tagRulesCreateOrUpdateMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/tagRulesDeleteSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/tagRulesDeleteSample.ts deleted file mode 100644 index dcdb3bf905a7..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/tagRulesDeleteSample.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 { NewRelicObservability } from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a TagRule - * - * @summary Delete a TagRule - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_Delete_MaximumSet_Gen.json - */ -async function tagRulesDeleteMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const ruleSetName = "bxcantgzggsepbhqmedjqyrqeezmfb"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.tagRules.beginDeleteAndWait( - resourceGroupName, - monitorName, - ruleSetName - ); - console.log(result); -} - -/** - * This sample demonstrates how to Delete a TagRule - * - * @summary Delete a TagRule - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_Delete_MinimumSet_Gen.json - */ -async function tagRulesDeleteMinimumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const ruleSetName = "bxcantgzggsepbhqmedjqyrqeezmfb"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.tagRules.beginDeleteAndWait( - resourceGroupName, - monitorName, - ruleSetName - ); - console.log(result); -} - -async function main() { - tagRulesDeleteMaximumSetGen(); - tagRulesDeleteMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/tagRulesGetSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/tagRulesGetSample.ts deleted file mode 100644 index 046a6f4173f3..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/tagRulesGetSample.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 { NewRelicObservability } from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a TagRule - * - * @summary Get a TagRule - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_Get_MaximumSet_Gen.json - */ -async function tagRulesGetMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const ruleSetName = "bxcantgzggsepbhqmedjqyrqeezmfb"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.tagRules.get( - resourceGroupName, - monitorName, - ruleSetName - ); - console.log(result); -} - -/** - * This sample demonstrates how to Get a TagRule - * - * @summary Get a TagRule - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_Get_MinimumSet_Gen.json - */ -async function tagRulesGetMinimumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const ruleSetName = "bxcantgzggsepbhqmedjqyrqeezmfb"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.tagRules.get( - resourceGroupName, - monitorName, - ruleSetName - ); - console.log(result); -} - -async function main() { - tagRulesGetMaximumSetGen(); - tagRulesGetMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/tagRulesListByNewRelicMonitorResourceSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/tagRulesListByNewRelicMonitorResourceSample.ts deleted file mode 100644 index 011ed0a27f33..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/tagRulesListByNewRelicMonitorResourceSample.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NewRelicObservability } from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List TagRule resources by NewRelicMonitorResource - * - * @summary List TagRule resources by NewRelicMonitorResource - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_ListByNewRelicMonitorResource_MaximumSet_Gen.json - */ -async function tagRulesListByNewRelicMonitorResourceMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.tagRules.listByNewRelicMonitorResource( - resourceGroupName, - monitorName - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List TagRule resources by NewRelicMonitorResource - * - * @summary List TagRule resources by NewRelicMonitorResource - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_ListByNewRelicMonitorResource_MinimumSet_Gen.json - */ -async function tagRulesListByNewRelicMonitorResourceMinimumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.tagRules.listByNewRelicMonitorResource( - resourceGroupName, - monitorName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - tagRulesListByNewRelicMonitorResourceMaximumSetGen(); - tagRulesListByNewRelicMonitorResourceMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/tagRulesUpdateSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/tagRulesUpdateSample.ts deleted file mode 100644 index 12b176a63e2b..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/src/tagRulesUpdateSample.ts +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagRuleUpdate, - NewRelicObservability -} from "@azure/arm-newrelicobservability"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update a TagRule - * - * @summary Update a TagRule - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_Update_MaximumSet_Gen.json - */ -async function tagRulesUpdateMaximumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const ruleSetName = "bxcantgzggsepbhqmedjqyrqeezmfb"; - const properties: TagRuleUpdate = { - logRules: { - filteringTags: [ - { - name: "saokgpjvdlorciqbjmjxazpee", - action: "Include", - value: "sarxrqsxouhdjwsrqqicbeirdb" - } - ], - sendAadLogs: "Enabled", - sendActivityLogs: "Enabled", - sendSubscriptionLogs: "Enabled" - }, - metricRules: { - filteringTags: [ - { - name: "saokgpjvdlorciqbjmjxazpee", - action: "Include", - value: "sarxrqsxouhdjwsrqqicbeirdb" - } - ], - userEmail: "test@testing.com" - } - }; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.tagRules.update( - resourceGroupName, - monitorName, - ruleSetName, - properties - ); - console.log(result); -} - -/** - * This sample demonstrates how to Update a TagRule - * - * @summary Update a TagRule - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_Update_MinimumSet_Gen.json - */ -async function tagRulesUpdateMinimumSetGen() { - const subscriptionId = - process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] || "ddqonpqwjr"; - const resourceGroupName = - process.env["NEWRELICOBSERVABILITY_RESOURCE_GROUP"] || "rgopenapi"; - const monitorName = "ipxmlcbonyxtolzejcjshkmlron"; - const ruleSetName = "bxcantgzggsepbhqmedjqyrqeezmfb"; - const properties: TagRuleUpdate = {}; - const credential = new DefaultAzureCredential(); - const client = new NewRelicObservability(credential, subscriptionId); - const result = await client.tagRules.update( - resourceGroupName, - monitorName, - ruleSetName, - properties - ); - console.log(result); -} - -async function main() { - tagRulesUpdateMaximumSetGen(); - tagRulesUpdateMinimumSetGen(); -} - -main().catch(console.error); diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/tsconfig.json b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/typescript/tsconfig.json deleted file mode 100644 index e26ce2a6d8f7..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1/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/newrelicobservability/arm-newrelicobservability/src/models/index.ts b/sdk/newrelicobservability/arm-newrelicobservability/src/models/index.ts index d36e90eaf8e5..d4d9f574849a 100644 --- a/sdk/newrelicobservability/arm-newrelicobservability/src/models/index.ts +++ b/sdk/newrelicobservability/arm-newrelicobservability/src/models/index.ts @@ -198,7 +198,7 @@ export interface AccountInfo { * This value contains a credential. Consider obscuring before showing to users */ ingestionKey?: string; - /** NewRelic account region */ + /** Region where New Relic account is present */ region?: string; } @@ -438,6 +438,97 @@ export interface MonitoredResource { reasonForLogsStatus?: string; } +/** Marketplace Subscription and Organization details to which resource gets billed into. */ +export interface BillingInfoResponse { + /** Marketplace Subscription details */ + marketplaceSaasInfo?: MarketplaceSaaSInfo; + /** Partner Billing Entity details: Organization Info */ + partnerBillingEntity?: PartnerBillingEntity; +} + +/** Marketplace SAAS Info of the resource. */ +export interface MarketplaceSaaSInfo { + /** Marketplace Subscription Id. This is a GUID-formatted string. */ + marketplaceSubscriptionId?: string; + /** Marketplace Subscription Details: SAAS Name */ + marketplaceSubscriptionName?: string; + /** Marketplace Subscription Details: Resource URI */ + marketplaceResourceId?: string; + /** Marketplace Subscription Details: SaaS Subscription Status */ + marketplaceStatus?: string; + /** The Azure Subscription ID to which the Marketplace Subscription belongs and gets billed into. */ + billedAzureSubscriptionId?: string; +} + +/** Partner Billing details associated with the resource. */ +export interface PartnerBillingEntity { + /** The New Relic Organization Id. */ + organizationId?: string; + /** The New Relic Organization Name. */ + organizationName?: string; +} + +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ +export interface ErrorResponseAutoGenerated { + /** The error object. */ + error?: ErrorDetailAutoGenerated; +} + +/** The error detail. */ +export interface ErrorDetailAutoGenerated { + /** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * The error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * The error target. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; + /** + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly details?: ErrorDetailAutoGenerated[]; + /** + * The error additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** List of all active newrelic deployments. */ +export interface ConnectedPartnerResourcesListResponse { + /** Results of a list operation. */ + value?: ConnectedPartnerResourcesListFormat[]; + /** Link to the next set of results, if any. */ + nextLink?: string; +} + +/** Connected Partner Resources List Format */ +export interface ConnectedPartnerResourcesListFormat { + /** Connected Partner Resource Properties */ + properties?: ConnectedPartnerResourceProperties; +} + +/** Connected Partner Resource Properties */ +export interface ConnectedPartnerResourceProperties { + /** NewRelic account name */ + accountName?: string; + /** NewRelic Account Id */ + accountId?: string; + /** The azure resource Id of the deployment. */ + azureResourceId?: string; + /** The location of the deployment. */ + location?: string; +} + /** The response of a TagRule list operation. */ export interface TagRuleListResult { /** The TagRule items on this page */ @@ -524,7 +615,7 @@ export interface AccountResource extends ProxyResource { accountId?: string; /** account name */ accountName?: string; - /** region */ + /** Region where New Relic account is present */ region?: string; } @@ -1250,6 +1341,27 @@ export interface PlansListNextOptionalParams /** Contains response data for the listNext operation. */ export type PlansListNextResponse = PlanDataListResponse; +/** Optional parameters. */ +export interface BillingInfoGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type BillingInfoGetResponse = BillingInfoResponse; + +/** Optional parameters. */ +export interface ConnectedPartnerResourcesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type ConnectedPartnerResourcesListOperationResponse = ConnectedPartnerResourcesListResponse; + +/** Optional parameters. */ +export interface ConnectedPartnerResourcesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ConnectedPartnerResourcesListNextResponse = ConnectedPartnerResourcesListResponse; + /** Optional parameters. */ export interface TagRulesListByNewRelicMonitorResourceOptionalParams extends coreClient.OperationOptions {} diff --git a/sdk/newrelicobservability/arm-newrelicobservability/src/models/mappers.ts b/sdk/newrelicobservability/arm-newrelicobservability/src/models/mappers.ts index 0c88745701c4..13e433adee87 100644 --- a/sdk/newrelicobservability/arm-newrelicobservability/src/models/mappers.ts +++ b/sdk/newrelicobservability/arm-newrelicobservability/src/models/mappers.ts @@ -1142,6 +1142,237 @@ export const MonitoredResource: coreClient.CompositeMapper = { } }; +export const BillingInfoResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BillingInfoResponse", + modelProperties: { + marketplaceSaasInfo: { + serializedName: "marketplaceSaasInfo", + type: { + name: "Composite", + className: "MarketplaceSaaSInfo" + } + }, + partnerBillingEntity: { + serializedName: "partnerBillingEntity", + type: { + name: "Composite", + className: "PartnerBillingEntity" + } + } + } + } +}; + +export const MarketplaceSaaSInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MarketplaceSaaSInfo", + modelProperties: { + marketplaceSubscriptionId: { + serializedName: "marketplaceSubscriptionId", + type: { + name: "String" + } + }, + marketplaceSubscriptionName: { + serializedName: "marketplaceSubscriptionName", + type: { + name: "String" + } + }, + marketplaceResourceId: { + serializedName: "marketplaceResourceId", + type: { + name: "String" + } + }, + marketplaceStatus: { + serializedName: "marketplaceStatus", + type: { + name: "String" + } + }, + billedAzureSubscriptionId: { + serializedName: "billedAzureSubscriptionId", + type: { + name: "String" + } + } + } + } +}; + +export const PartnerBillingEntity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PartnerBillingEntity", + modelProperties: { + organizationId: { + serializedName: "organizationId", + type: { + name: "String" + } + }, + organizationName: { + serializedName: "organizationName", + type: { + name: "String" + } + } + } + } +}; + +export const ErrorResponseAutoGenerated: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorResponseAutoGenerated", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetailAutoGenerated" + } + } + } + } +}; + +export const ErrorDetailAutoGenerated: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorDetailAutoGenerated", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String" + } + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String" + } + }, + details: { + serializedName: "details", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorDetailAutoGenerated" + } + } + } + }, + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } + } + } + } + } + } +}; + +export const ConnectedPartnerResourcesListResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConnectedPartnerResourcesListResponse", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConnectedPartnerResourcesListFormat" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ConnectedPartnerResourcesListFormat: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConnectedPartnerResourcesListFormat", + modelProperties: { + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ConnectedPartnerResourceProperties" + } + } + } + } +}; + +export const ConnectedPartnerResourceProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConnectedPartnerResourceProperties", + modelProperties: { + accountName: { + serializedName: "accountName", + type: { + name: "String" + } + }, + accountId: { + serializedName: "accountId", + type: { + name: "String" + } + }, + azureResourceId: { + serializedName: "azureResourceId", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + export const TagRuleListResult: coreClient.CompositeMapper = { type: { name: "Composite", diff --git a/sdk/newrelicobservability/arm-newrelicobservability/src/models/parameters.ts b/sdk/newrelicobservability/arm-newrelicobservability/src/models/parameters.ts index 2cae3884655e..12824491b175 100644 --- a/sdk/newrelicobservability/arm-newrelicobservability/src/models/parameters.ts +++ b/sdk/newrelicobservability/arm-newrelicobservability/src/models/parameters.ts @@ -50,7 +50,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-07-01", + defaultValue: "2023-10-01-preview", isConstant: true, serializedName: "api-version", type: { @@ -200,6 +200,20 @@ export const organizationId: OperationQueryParameter = { } }; +export const monitorName1: OperationURLParameter = { + parameterPath: "monitorName", + mapper: { + constraints: { + Pattern: new RegExp("^.*$") + }, + serializedName: "monitorName", + required: true, + type: { + name: "String" + } + } +}; + export const ruleSetName: OperationURLParameter = { parameterPath: "ruleSetName", mapper: { diff --git a/sdk/newrelicobservability/arm-newrelicobservability/src/newRelicObservability.ts b/sdk/newrelicobservability/arm-newrelicobservability/src/newRelicObservability.ts index 90b13e7e6ae9..76eb542e2ed2 100644 --- a/sdk/newrelicobservability/arm-newrelicobservability/src/newRelicObservability.ts +++ b/sdk/newrelicobservability/arm-newrelicobservability/src/newRelicObservability.ts @@ -20,6 +20,8 @@ import { MonitorsImpl, OrganizationsImpl, PlansImpl, + BillingInfoImpl, + ConnectedPartnerResourcesImpl, TagRulesImpl } from "./operations"; import { @@ -28,6 +30,8 @@ import { Monitors, Organizations, Plans, + BillingInfo, + ConnectedPartnerResources, TagRules } from "./operationsInterfaces"; import { NewRelicObservabilityOptionalParams } from "./models"; @@ -64,7 +68,7 @@ export class NewRelicObservability extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-newrelicobservability/1.0.1`; + const packageDetails = `azsdk-js-arm-newrelicobservability/1.1.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -117,12 +121,14 @@ export class NewRelicObservability extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-07-01"; + this.apiVersion = options.apiVersion || "2023-10-01-preview"; this.operations = new OperationsImpl(this); this.accounts = new AccountsImpl(this); this.monitors = new MonitorsImpl(this); this.organizations = new OrganizationsImpl(this); this.plans = new PlansImpl(this); + this.billingInfo = new BillingInfoImpl(this); + this.connectedPartnerResources = new ConnectedPartnerResourcesImpl(this); this.tagRules = new TagRulesImpl(this); this.addCustomApiVersionPolicy(options.apiVersion); } @@ -160,5 +166,7 @@ export class NewRelicObservability extends coreClient.ServiceClient { monitors: Monitors; organizations: Organizations; plans: Plans; + billingInfo: BillingInfo; + connectedPartnerResources: ConnectedPartnerResources; tagRules: TagRules; } diff --git a/sdk/newrelicobservability/arm-newrelicobservability/src/operations/billingInfo.ts b/sdk/newrelicobservability/arm-newrelicobservability/src/operations/billingInfo.ts new file mode 100644 index 000000000000..d00973928396 --- /dev/null +++ b/sdk/newrelicobservability/arm-newrelicobservability/src/operations/billingInfo.ts @@ -0,0 +1,72 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { BillingInfo } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { NewRelicObservability } from "../newRelicObservability"; +import { + BillingInfoGetOptionalParams, + BillingInfoGetResponse +} from "../models"; + +/** Class containing BillingInfo operations. */ +export class BillingInfoImpl implements BillingInfo { + private readonly client: NewRelicObservability; + + /** + * Initialize a new instance of the class BillingInfo class. + * @param client Reference to the service client + */ + constructor(client: NewRelicObservability) { + this.client = client; + } + + /** + * Get marketplace info mapped to the given monitor. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource + * @param options The options parameters. + */ + get( + resourceGroupName: string, + monitorName: string, + options?: BillingInfoGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, monitorName, options }, + getOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/getBillingInfo", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.BillingInfoResponse + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.monitorName1 + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/newrelicobservability/arm-newrelicobservability/src/operations/connectedPartnerResources.ts b/sdk/newrelicobservability/arm-newrelicobservability/src/operations/connectedPartnerResources.ts new file mode 100644 index 000000000000..07eef0e84ef2 --- /dev/null +++ b/sdk/newrelicobservability/arm-newrelicobservability/src/operations/connectedPartnerResources.ts @@ -0,0 +1,197 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { ConnectedPartnerResources } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { NewRelicObservability } from "../newRelicObservability"; +import { + ConnectedPartnerResourcesListFormat, + ConnectedPartnerResourcesListNextOptionalParams, + ConnectedPartnerResourcesListOptionalParams, + ConnectedPartnerResourcesListOperationResponse, + ConnectedPartnerResourcesListNextResponse +} from "../models"; + +/// +/** Class containing ConnectedPartnerResources operations. */ +export class ConnectedPartnerResourcesImpl + implements ConnectedPartnerResources { + private readonly client: NewRelicObservability; + + /** + * Initialize a new instance of the class ConnectedPartnerResources class. + * @param client Reference to the service client + */ + constructor(client: NewRelicObservability) { + this.client = client; + } + + /** + * List of all active deployments that are associated with the marketplace subscription linked to the + * given monitor. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + monitorName: string, + options?: ConnectedPartnerResourcesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, monitorName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + monitorName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + monitorName: string, + options?: ConnectedPartnerResourcesListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ConnectedPartnerResourcesListOperationResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, monitorName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + monitorName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + monitorName: string, + options?: ConnectedPartnerResourcesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + monitorName, + options + )) { + yield* page; + } + } + + /** + * List of all active deployments that are associated with the marketplace subscription linked to the + * given monitor. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + monitorName: string, + options?: ConnectedPartnerResourcesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, monitorName, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + monitorName: string, + nextLink: string, + options?: ConnectedPartnerResourcesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, monitorName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/listConnectedPartnerResources", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ConnectedPartnerResourcesListResponse + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.monitorName1 + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ConnectedPartnerResourcesListResponse + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated + } + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.monitorName1 + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/newrelicobservability/arm-newrelicobservability/src/operations/index.ts b/sdk/newrelicobservability/arm-newrelicobservability/src/operations/index.ts index 82c1c5ac8be6..302e145d83ba 100644 --- a/sdk/newrelicobservability/arm-newrelicobservability/src/operations/index.ts +++ b/sdk/newrelicobservability/arm-newrelicobservability/src/operations/index.ts @@ -11,4 +11,6 @@ export * from "./accounts"; export * from "./monitors"; export * from "./organizations"; export * from "./plans"; +export * from "./billingInfo"; +export * from "./connectedPartnerResources"; export * from "./tagRules"; diff --git a/sdk/newrelicobservability/arm-newrelicobservability/src/operationsInterfaces/billingInfo.ts b/sdk/newrelicobservability/arm-newrelicobservability/src/operationsInterfaces/billingInfo.ts new file mode 100644 index 000000000000..b565b2a3a643 --- /dev/null +++ b/sdk/newrelicobservability/arm-newrelicobservability/src/operationsInterfaces/billingInfo.ts @@ -0,0 +1,27 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { + BillingInfoGetOptionalParams, + BillingInfoGetResponse +} from "../models"; + +/** Interface representing a BillingInfo. */ +export interface BillingInfo { + /** + * Get marketplace info mapped to the given monitor. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource + * @param options The options parameters. + */ + get( + resourceGroupName: string, + monitorName: string, + options?: BillingInfoGetOptionalParams + ): Promise; +} diff --git a/sdk/newrelicobservability/arm-newrelicobservability/src/operationsInterfaces/connectedPartnerResources.ts b/sdk/newrelicobservability/arm-newrelicobservability/src/operationsInterfaces/connectedPartnerResources.ts new file mode 100644 index 000000000000..2cabba6d3759 --- /dev/null +++ b/sdk/newrelicobservability/arm-newrelicobservability/src/operationsInterfaces/connectedPartnerResources.ts @@ -0,0 +1,30 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + ConnectedPartnerResourcesListFormat, + ConnectedPartnerResourcesListOptionalParams +} from "../models"; + +/// +/** Interface representing a ConnectedPartnerResources. */ +export interface ConnectedPartnerResources { + /** + * List of all active deployments that are associated with the marketplace subscription linked to the + * given monitor. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource + * @param options The options parameters. + */ + list( + resourceGroupName: string, + monitorName: string, + options?: ConnectedPartnerResourcesListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/newrelicobservability/arm-newrelicobservability/src/operationsInterfaces/index.ts b/sdk/newrelicobservability/arm-newrelicobservability/src/operationsInterfaces/index.ts index 82c1c5ac8be6..302e145d83ba 100644 --- a/sdk/newrelicobservability/arm-newrelicobservability/src/operationsInterfaces/index.ts +++ b/sdk/newrelicobservability/arm-newrelicobservability/src/operationsInterfaces/index.ts @@ -11,4 +11,6 @@ export * from "./accounts"; export * from "./monitors"; export * from "./organizations"; export * from "./plans"; +export * from "./billingInfo"; +export * from "./connectedPartnerResources"; export * from "./tagRules"; diff --git a/sdk/newrelicobservability/arm-newrelicobservability/test/newrelicobservability_operations_test.spec.ts.ts b/sdk/newrelicobservability/arm-newrelicobservability/test/newrelicobservability_operations_test.spec.ts.ts deleted file mode 100644 index 53d650efd0b1..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/test/newrelicobservability_operations_test.spec.ts.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. - */ - -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 { NewRelicObservability } from "../src/newRelicObservability"; - -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("NewRelicObservability test", () => { - let recorder: Recorder; - let subscriptionId: string; - let client: NewRelicObservability; - let location: string; - let resourceGroup: string; - let resourcename: 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 NewRelicObservability(credential, subscriptionId, recorder.configureClientOptions({})); - location = "eastus"; - resourceGroup = "myjstest"; - resourcename = "resourcetest"; - - }); - - afterEach(async function () { - await recorder.stop(); - }); - - it("operations list test", async function () { - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - }); - -}) diff --git a/sdk/newrelicobservability/arm-newrelicobservability/test/sampleTest.ts b/sdk/newrelicobservability/arm-newrelicobservability/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/newrelicobservability/arm-newrelicobservability/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/newrelicobservability/arm-newrelicobservability/tsconfig.json b/sdk/newrelicobservability/arm-newrelicobservability/tsconfig.json index d5412a5206c2..3e6ae96443f3 100644 --- a/sdk/newrelicobservability/arm-newrelicobservability/tsconfig.json +++ b/sdk/newrelicobservability/arm-newrelicobservability/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-newrelicobservability": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"