From 5aaae28398ae0664f4acd28e13f602e18fbb708b Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 1 Aug 2023 20:53:00 +0000 Subject: [PATCH] CodeGen from PR 25088 in Azure/azure-rest-api-specs Merge 70092bbac05c025eb4b7d3c9f66b5bc99a0db101 into 0b18643d5c21cb1ddb57cbb1503f1d9269c337a7 --- .../arm-newrelicobservability/CHANGELOG.md | 15 --- .../arm-newrelicobservability/_meta.json | 8 +- .../arm-newrelicobservability/assets.json | 6 - .../arm-newrelicobservability/package.json | 14 +-- .../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 --- ...icobservability_operations_test.spec.ts.ts | 68 ------------ .../test/sampleTest.ts | 43 +++++++ .../arm-newrelicobservability/tsconfig.json | 10 +- 80 files changed, 52 insertions(+), 4797 deletions(-) delete mode 100644 sdk/newrelicobservability/arm-newrelicobservability/CHANGELOG.md 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 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/sdk/newrelicobservability/arm-newrelicobservability/CHANGELOG.md b/sdk/newrelicobservability/arm-newrelicobservability/CHANGELOG.md deleted file mode 100644 index 1ad664cbcb00..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/CHANGELOG.md +++ /dev/null @@ -1,15 +0,0 @@ -# Release History - -## 1.0.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 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/js-track2-quickstart). diff --git a/sdk/newrelicobservability/arm-newrelicobservability/_meta.json b/sdk/newrelicobservability/arm-newrelicobservability/_meta.json index b15387f6aefe..d22db7a56abb 100644 --- a/sdk/newrelicobservability/arm-newrelicobservability/_meta.json +++ b/sdk/newrelicobservability/arm-newrelicobservability/_meta.json @@ -1,8 +1,8 @@ { - "commit": "3c639105c011765893db51cbb0dda056e34dc994", + "commit": "9d171f5580576db60b1ea835a3f0b90fd453464e", "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.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/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.1", + "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 cfddffe75949..2e567f68138d 100644 --- a/sdk/newrelicobservability/arm-newrelicobservability/package.json +++ b/sdk/newrelicobservability/arm-newrelicobservability/package.json @@ -8,7 +8,7 @@ "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", @@ -111,13 +111,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/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 24fddbb90488..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": ">=14.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 3b9f6c180cff..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": ">=14.0.0" - }, - "scripts": { - "build": "tsc", - "prebuild": "rimraf dist/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/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": "^14.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/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"