diff --git a/sdk/newrelicobservability/arm-newrelicobservability/CHANGELOG.md b/sdk/newrelicobservability/arm-newrelicobservability/CHANGELOG.md deleted file mode 100644 index 6204cb254f7d..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/CHANGELOG.md +++ /dev/null @@ -1,5 +0,0 @@ -# Release History - -## 1.0.0-beta.1 (2023-03-23) - -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 6464f30a32e1..8afecb673072 100644 --- a/sdk/newrelicobservability/arm-newrelicobservability/_meta.json +++ b/sdk/newrelicobservability/arm-newrelicobservability/_meta.json @@ -1,8 +1,8 @@ { - "commit": "fc450164d4c1ed7944efd86df569fcc118cb8fbc", + "commit": "1ad0ec31608334d10202b3d1f861f8cfc4400316", "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.0-rc.10 --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.0-rc.10", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.6.2", + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.0", "use": "@autorest/typescript@6.0.0-rc.10" } \ No newline at end of file diff --git a/sdk/newrelicobservability/arm-newrelicobservability/package.json b/sdk/newrelicobservability/arm-newrelicobservability/package.json index d4741121dd8c..376f5e3071bc 100644 --- a/sdk/newrelicobservability/arm-newrelicobservability/package.json +++ b/sdk/newrelicobservability/arm-newrelicobservability/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for NewRelicObservability.", - "version": "1.0.0-beta.1", + "version": "1.0.0-beta.2", "engines": { "node": ">=14.0.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/recordings/node/newrelicobservability_test/recording_operations_list_test.json b/sdk/newrelicobservability/arm-newrelicobservability/recordings/node/newrelicobservability_test/recording_operations_list_test.json deleted file mode 100644 index bb7fa0aafca3..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/recordings/node/newrelicobservability_test/recording_operations_list_test.json +++ /dev/null @@ -1,282 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://management.azure.com/providers/NewRelic.Observability/operations?api-version=2022-07-01-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-arm-newrelicobservability/1.0.0-beta.1 core-rest-pipeline/1.10.3 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "5331f479-3bfc-4a5d-96d7-8ffa1ec2acc1" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 24 Mar 2023 03:08:04 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": "Accept-Encoding", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "cdd26872-fbe1-4860-9f54-e57fecbb2feb", - "x-ms-providerhub-traffic": "True", - "x-ms-ratelimit-remaining-tenant-reads": "11999", - "x-ms-request-id": "391c7706-dfb4-4e40-8d73-11cc6201ff77", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230324T030805Z:cdd26872-fbe1-4860-9f54-e57fecbb2feb" - }, - "ResponseBody": { - "value": [ - { - "name": "NewRelic.Observability/monitors/read", - "isDataAction": false, - "display": { - "provider": "NewRelic.Observability", - "resource": "Monitors", - "operation": "Get/List monitor resources", - "description": "Read monitors" - }, - "properties": null - }, - { - "name": "NewRelic.Observability/monitors/write", - "isDataAction": false, - "display": { - "provider": "NewRelic.Observability", - "resource": "Monitors", - "operation": "Create/Update monitor resources", - "description": "Write monitors" - }, - "properties": null - }, - { - "name": "NewRelic.Observability/monitors/delete", - "isDataAction": false, - "display": { - "provider": "NewRelic.Observability", - "resource": "Monitors", - "operation": "Delete monitor resources", - "description": "Delete monitors" - }, - "properties": null - }, - { - "name": "NewRelic.Observability/monitors/tagRules/read", - "isDataAction": false, - "display": { - "provider": "NewRelic.Observability", - "resource": "TagRules", - "operation": "Get tag rules resource", - "description": "Read tag rules" - }, - "properties": null - }, - { - "name": "NewRelic.Observability/monitors/tagRules/write", - "isDataAction": false, - "display": { - "provider": "NewRelic.Observability", - "resource": "TagRules", - "operation": "Create/Update tag rules resource", - "description": "Write tag rules" - }, - "properties": null - }, - { - "name": "NewRelic.Observability/monitors/monitoredResources/action", - "isDataAction": false, - "display": { - "provider": "NewRelic.Observability", - "resource": "ListMonitoredResources", - "operation": "List monitored resources", - "description": "List all resources that are being monitored by the monitor resource" - }, - "properties": null - }, - { - "name": "NewRelic.Observability/registeredSubscriptions/read", - "isDataAction": false, - "display": { - "provider": "NewRelic.Observability", - "resource": "RegisteredSubscriptions", - "operation": "Get registered subscriptions", - "description": "Get registered subscription details" - }, - "properties": null - }, - { - "name": "NewRelic.Observability/locations/read", - "isDataAction": false, - "display": { - "provider": "NewRelic.Observability", - "resource": "Locations", - "operation": "Get locations", - "description": "Get locations" - }, - "properties": null - }, - { - "name": "NewRelic.Observability/locations/operationStatuses/read", - "isDataAction": false, - "display": { - "provider": "NewRelic.Observability", - "resource": "OperationStatuses", - "operation": "Get operation statuses", - "description": "Get operation statuses" - }, - "properties": null - }, - { - "name": "NewRelic.Observability/locations/operationStatuses/write", - "isDataAction": false, - "display": { - "provider": "NewRelic.Observability", - "resource": "OperationStatuses", - "operation": "Write operation statuses", - "description": "Write operation statuses" - }, - "properties": null - }, - { - "name": "NewRelic.Observability/operations/read", - "isDataAction": false, - "display": { - "provider": "NewRelic.Observability", - "resource": "operations", - "operation": "List available Operations in NewRelic.Observability", - "description": "List available Operations in NewRelic.Observability" - }, - "properties": null - }, - { - "name": "NewRelic.Observability/register/action", - "isDataAction": false, - "display": { - "provider": "NewRelic.Observability", - "resource": "register", - "operation": "Registers NewRelic.Observability Resource provider", - "description": "Registers NewRelic.Observability Resource provider" - }, - "properties": null - }, - { - "name": "NewRelic.Observability/unregister/action", - "isDataAction": false, - "display": { - "provider": "NewRelic.Observability", - "resource": "unregister", - "operation": "Unregisters NewRelic.Observability Resource provider", - "description": "Unregisters NewRelic.Observability Resource provider" - }, - "properties": null - }, - { - "name": "NewRelic.Observability/monitors/vmHostPayloads/action", - "isDataAction": false, - "display": { - "provider": "NewRelic.Observability", - "resource": "VMHostPayload", - "operation": "Payload for VM Host", - "description": "The payload to be sent for installing NewRelic agent on VM" - }, - "properties": null - }, - { - "name": "NewRelic.Observability/monitors/listAppServices/action", - "isDataAction": false, - "display": { - "provider": "NewRelic.Observability", - "resource": "listAppServices", - "operation": "List App services", - "description": "List all the app services that have NewRelic agent installed" - }, - "properties": null - }, - { - "name": "NewRelic.Observability/monitors/listHosts/action", - "isDataAction": false, - "display": { - "provider": "NewRelic.Observability", - "resource": "ListHosts", - "operation": "List VM Hosts", - "description": "List all VMs that are sending compute logs for a monitor" - }, - "properties": null - }, - { - "name": "NewRelic.Observability/monitors/getMetricRules/action", - "isDataAction": false, - "display": { - "provider": "NewRelic.Observability", - "resource": "getMetricRules", - "operation": "Get Metric Rules", - "description": "Get Metric rules for a NewRelic resource" - }, - "properties": null - }, - { - "name": "NewRelic.Observability/monitors/getMetricStatus/action", - "isDataAction": false, - "display": { - "provider": "NewRelic.Observability", - "resource": "getMetricStatus", - "operation": "Get Metric Status", - "description": "Get Metric status for resources" - }, - "properties": null - }, - { - "name": "NewRelic.Observability/accounts/read", - "isDataAction": false, - "display": { - "provider": "NewRelic.Observability", - "resource": "ListAccounts", - "operation": "List Accounts", - "description": "List all Accounts that for a user" - }, - "properties": null - }, - { - "name": "NewRelic.Observability/organizations/read", - "isDataAction": false, - "display": { - "provider": "NewRelic.Observability", - "resource": "Listorganizations", - "operation": "List organizations", - "description": "List all organizations for a user" - }, - "properties": null - }, - { - "name": "NewRelic.Observability/monitors/switchBilling/action", - "isDataAction": false, - "display": { - "provider": "NewRelic.Observability", - "resource": "switchBilling", - "operation": "Switch Billing", - "description": "Switches billing for NewRelic monitor resource to Azure" - }, - "properties": null - }, - { - "name": "NewRelic.Observability/plans/read", - "isDataAction": false, - "display": { - "provider": "NewRelic.Observability", - "resource": "ListPlandata", - "operation": "List plandata", - "description": "List plan data for a account or organization" - }, - "properties": null - } - ] - } - } - ], - "Variables": {} -} 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 208ad3ee9cae..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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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 7cce25718f33..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples-dev/monitorsCreateOrUpdateSample.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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/preview/2022-07-01-preview/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", - identity: { type: "None", userAssignedIdentities: { key8903: {} } }, - 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 283370cf6294..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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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 8e5d136c836d..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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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 b2fca29948a8..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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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 68241b5669fb..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/preview/2022-07-01-preview/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 411b40954e7f..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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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 e5032038b0cd..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/preview/2022-07-01-preview/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 c3c26e0d8239..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/preview/2022-07-01-preview/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 0b90e9833558..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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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 eca9e7191e0a..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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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 15b772d305aa..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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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 7f7938b2f50f..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/preview/2022-07-01-preview/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 7b89f18d1e36..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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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 7f1e5314d7a0..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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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 1ba01c2ab7e9..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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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 20546217c608..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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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 d6b7502a2589..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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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 dae01463241d..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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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 1b12978e2757..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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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 4db5c4e70e0d..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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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 4b652335c660..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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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-beta/javascript/README.md b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/README.md deleted file mode 100644 index 9294586009e2..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/README.md +++ /dev/null @@ -1,92 +0,0 @@ -# client library samples for JavaScript (Beta) - -These sample programs show how to use the JavaScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| --------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| [accountsListSample.js][accountslistsample] | List all the existing accounts x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Accounts_List_MaximumSet_Gen.json | -| [monitorsCreateOrUpdateSample.js][monitorscreateorupdatesample] | Create a NewRelicMonitorResource x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Monitors_CreateOrUpdate_MaximumSet_Gen.json | -| [monitorsDeleteSample.js][monitorsdeletesample] | Delete a NewRelicMonitorResource x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Monitors_Delete_MaximumSet_Gen.json | -| [monitorsGetMetricRulesSample.js][monitorsgetmetricrulessample] | Get metric rules x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Monitors_GetMetricRules_MaximumSet_Gen.json | -| [monitorsGetMetricStatusSample.js][monitorsgetmetricstatussample] | Get metric status x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Monitors_GetMetricStatus_MaximumSet_Gen.json | -| [monitorsGetSample.js][monitorsgetsample] | Get a NewRelicMonitorResource x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/examples/Monitors_SwitchBilling_MaximumSet_Gen.json | -| [monitorsUpdateSample.js][monitorsupdatesample] | Update a NewRelicMonitorResource x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/examples/Operations_List_MaximumSet_Gen.json | -| [organizationsListSample.js][organizationslistsample] | List all the existing organizations x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Organizations_List_MaximumSet_Gen.json | -| [plansListSample.js][planslistsample] | List plans data x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Plans_List_MaximumSet_Gen.json | -| [tagRulesCreateOrUpdateSample.js][tagrulescreateorupdatesample] | Create a TagRule x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/TagRules_CreateOrUpdate_MaximumSet_Gen.json | -| [tagRulesDeleteSample.js][tagrulesdeletesample] | Delete a TagRule x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/TagRules_Delete_MaximumSet_Gen.json | -| [tagRulesGetSample.js][tagrulesgetsample] | Get a TagRule x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/TagRules_Get_MaximumSet_Gen.json | -| [tagRulesListByNewRelicMonitorResourceSample.js][tagruleslistbynewrelicmonitorresourcesample] | List TagRule resources by NewRelicMonitorResource x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/TagRules_ListByNewRelicMonitorResource_MaximumSet_Gen.json | -| [tagRulesUpdateSample.js][tagrulesupdatesample] | Update a TagRule x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/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-beta/javascript/accountsListSample.js -[monitorscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/monitorsCreateOrUpdateSample.js -[monitorsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/monitorsDeleteSample.js -[monitorsgetmetricrulessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/monitorsGetMetricRulesSample.js -[monitorsgetmetricstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/monitorsGetMetricStatusSample.js -[monitorsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/monitorsGetSample.js -[monitorslistappservicessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/monitorsListAppServicesSample.js -[monitorslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/monitorsListByResourceGroupSample.js -[monitorslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/monitorsListBySubscriptionSample.js -[monitorslisthostssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/monitorsListHostsSample.js -[monitorslistmonitoredresourcessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/monitorsListMonitoredResourcesSample.js -[monitorsswitchbillingsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/monitorsSwitchBillingSample.js -[monitorsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/monitorsUpdateSample.js -[monitorsvmhostpayloadsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/monitorsVMHostPayloadSample.js -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/operationsListSample.js -[organizationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/organizationsListSample.js -[planslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/plansListSample.js -[tagrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/tagRulesCreateOrUpdateSample.js -[tagrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/tagRulesDeleteSample.js -[tagrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/tagRulesGetSample.js -[tagruleslistbynewrelicmonitorresourcesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/tagRulesListByNewRelicMonitorResourceSample.js -[tagrulesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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-beta/javascript/accountsListSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/accountsListSample.js deleted file mode 100644 index 790fc05e5f47..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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-beta/javascript/monitorsCreateOrUpdateSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/monitorsCreateOrUpdateSample.js deleted file mode 100644 index 8db8d335484b..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/monitorsCreateOrUpdateSample.js +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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/preview/2022-07-01-preview/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", - identity: { type: "None", userAssignedIdentities: { key8903: {} } }, - 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-beta/javascript/monitorsDeleteSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/monitorsDeleteSample.js deleted file mode 100644 index bc3b8bbcd1f6..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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-beta/javascript/monitorsGetMetricRulesSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/monitorsGetMetricRulesSample.js deleted file mode 100644 index ba08fa815df3..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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-beta/javascript/monitorsGetMetricStatusSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/monitorsGetMetricStatusSample.js deleted file mode 100644 index 866a6487646c..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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-beta/javascript/monitorsGetSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/monitorsGetSample.js deleted file mode 100644 index 7af222ee06f8..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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-beta/javascript/monitorsListAppServicesSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/monitorsListAppServicesSample.js deleted file mode 100644 index d48ae57ebd64..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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-beta/javascript/monitorsListByResourceGroupSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/monitorsListByResourceGroupSample.js deleted file mode 100644 index 5241a49cb093..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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-beta/javascript/monitorsListBySubscriptionSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/monitorsListBySubscriptionSample.js deleted file mode 100644 index bae3b772f448..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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-beta/javascript/monitorsListHostsSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/monitorsListHostsSample.js deleted file mode 100644 index 79c0b32e7a4b..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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-beta/javascript/monitorsListMonitoredResourcesSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/monitorsListMonitoredResourcesSample.js deleted file mode 100644 index be3459d3e7de..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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-beta/javascript/monitorsSwitchBillingSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/monitorsSwitchBillingSample.js deleted file mode 100644 index 9ee83b8b1989..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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-beta/javascript/monitorsUpdateSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/monitorsUpdateSample.js deleted file mode 100644 index e13e966afdb0..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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-beta/javascript/monitorsVMHostPayloadSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/monitorsVMHostPayloadSample.js deleted file mode 100644 index bb3be5d00b88..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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-beta/javascript/operationsListSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/operationsListSample.js deleted file mode 100644 index 343cee7ee5db..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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-beta/javascript/organizationsListSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/organizationsListSample.js deleted file mode 100644 index 533644a9e1fc..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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-beta/javascript/package.json b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/package.json deleted file mode 100644 index 27f8e9feb722..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "@azure-samples/arm-newrelicobservability-js-beta", - "private": true, - "version": "1.0.0", - "description": " client library samples for JavaScript (Beta)", - "engines": { - "node": ">=14.0.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/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": "next", - "dotenv": "latest", - "@azure/identity": "^2.0.1" - } -} diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/plansListSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/plansListSample.js deleted file mode 100644 index 8d6d0073331f..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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-beta/javascript/sample.env b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/tagRulesCreateOrUpdateSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/tagRulesCreateOrUpdateSample.js deleted file mode 100644 index d58c40207978..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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-beta/javascript/tagRulesDeleteSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/tagRulesDeleteSample.js deleted file mode 100644 index 9379b7ad906c..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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-beta/javascript/tagRulesGetSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/tagRulesGetSample.js deleted file mode 100644 index 9074b79fa1b6..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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-beta/javascript/tagRulesListByNewRelicMonitorResourceSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/tagRulesListByNewRelicMonitorResourceSample.js deleted file mode 100644 index 8173873c7c11..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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-beta/javascript/tagRulesUpdateSample.js b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/javascript/tagRulesUpdateSample.js deleted file mode 100644 index 4b96ada87f67..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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-beta/typescript/README.md b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/README.md deleted file mode 100644 index d24f1775abb3..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/README.md +++ /dev/null @@ -1,105 +0,0 @@ -# client library samples for TypeScript (Beta) - -These sample programs show how to use the TypeScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| --------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| [accountsListSample.ts][accountslistsample] | List all the existing accounts x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Accounts_List_MaximumSet_Gen.json | -| [monitorsCreateOrUpdateSample.ts][monitorscreateorupdatesample] | Create a NewRelicMonitorResource x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Monitors_CreateOrUpdate_MaximumSet_Gen.json | -| [monitorsDeleteSample.ts][monitorsdeletesample] | Delete a NewRelicMonitorResource x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Monitors_Delete_MaximumSet_Gen.json | -| [monitorsGetMetricRulesSample.ts][monitorsgetmetricrulessample] | Get metric rules x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Monitors_GetMetricRules_MaximumSet_Gen.json | -| [monitorsGetMetricStatusSample.ts][monitorsgetmetricstatussample] | Get metric status x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Monitors_GetMetricStatus_MaximumSet_Gen.json | -| [monitorsGetSample.ts][monitorsgetsample] | Get a NewRelicMonitorResource x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/examples/Monitors_SwitchBilling_MaximumSet_Gen.json | -| [monitorsUpdateSample.ts][monitorsupdatesample] | Update a NewRelicMonitorResource x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/examples/Operations_List_MaximumSet_Gen.json | -| [organizationsListSample.ts][organizationslistsample] | List all the existing organizations x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Organizations_List_MaximumSet_Gen.json | -| [plansListSample.ts][planslistsample] | List plans data x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Plans_List_MaximumSet_Gen.json | -| [tagRulesCreateOrUpdateSample.ts][tagrulescreateorupdatesample] | Create a TagRule x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/TagRules_CreateOrUpdate_MaximumSet_Gen.json | -| [tagRulesDeleteSample.ts][tagrulesdeletesample] | Delete a TagRule x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/TagRules_Delete_MaximumSet_Gen.json | -| [tagRulesGetSample.ts][tagrulesgetsample] | Get a TagRule x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/TagRules_Get_MaximumSet_Gen.json | -| [tagRulesListByNewRelicMonitorResourceSample.ts][tagruleslistbynewrelicmonitorresourcesample] | List TagRule resources by NewRelicMonitorResource x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/TagRules_ListByNewRelicMonitorResource_MaximumSet_Gen.json | -| [tagRulesUpdateSample.ts][tagrulesupdatesample] | Update a TagRule x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/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-beta/typescript/src/accountsListSample.ts -[monitorscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/monitorsCreateOrUpdateSample.ts -[monitorsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/monitorsDeleteSample.ts -[monitorsgetmetricrulessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/monitorsGetMetricRulesSample.ts -[monitorsgetmetricstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/monitorsGetMetricStatusSample.ts -[monitorsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/monitorsGetSample.ts -[monitorslistappservicessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/monitorsListAppServicesSample.ts -[monitorslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/monitorsListByResourceGroupSample.ts -[monitorslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/monitorsListBySubscriptionSample.ts -[monitorslisthostssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/monitorsListHostsSample.ts -[monitorslistmonitoredresourcessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/monitorsListMonitoredResourcesSample.ts -[monitorsswitchbillingsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/monitorsSwitchBillingSample.ts -[monitorsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/monitorsUpdateSample.ts -[monitorsvmhostpayloadsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/monitorsVMHostPayloadSample.ts -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/operationsListSample.ts -[organizationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/organizationsListSample.ts -[planslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/plansListSample.ts -[tagrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/tagRulesCreateOrUpdateSample.ts -[tagrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/tagRulesDeleteSample.ts -[tagrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/tagRulesGetSample.ts -[tagruleslistbynewrelicmonitorresourcesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/tagRulesListByNewRelicMonitorResourceSample.ts -[tagrulesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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-beta/typescript/package.json b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/package.json deleted file mode 100644 index 8d0bbbaca031..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "@azure-samples/arm-newrelicobservability-ts-beta", - "private": true, - "version": "1.0.0", - "description": " client library samples for TypeScript (Beta)", - "engines": { - "node": ">=14.0.0" - }, - "scripts": { - "build": "tsc", - "prebuild": "rimraf dist/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/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": "next", - "dotenv": "latest", - "@azure/identity": "^2.0.1" - }, - "devDependencies": { - "@types/node": "^14.0.0", - "typescript": "~4.8.0", - "rimraf": "latest" - } -} diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/sample.env b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/accountsListSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/accountsListSample.ts deleted file mode 100644 index 208ad3ee9cae..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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-beta/typescript/src/monitorsCreateOrUpdateSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/monitorsCreateOrUpdateSample.ts deleted file mode 100644 index 7cce25718f33..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/monitorsCreateOrUpdateSample.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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/preview/2022-07-01-preview/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", - identity: { type: "None", userAssignedIdentities: { key8903: {} } }, - 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-beta/typescript/src/monitorsDeleteSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/monitorsDeleteSample.ts deleted file mode 100644 index 283370cf6294..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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-beta/typescript/src/monitorsGetMetricRulesSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/monitorsGetMetricRulesSample.ts deleted file mode 100644 index 8e5d136c836d..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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-beta/typescript/src/monitorsGetMetricStatusSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/monitorsGetMetricStatusSample.ts deleted file mode 100644 index b2fca29948a8..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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-beta/typescript/src/monitorsGetSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/monitorsGetSample.ts deleted file mode 100644 index 68241b5669fb..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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-beta/typescript/src/monitorsListAppServicesSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/monitorsListAppServicesSample.ts deleted file mode 100644 index 411b40954e7f..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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-beta/typescript/src/monitorsListByResourceGroupSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/monitorsListByResourceGroupSample.ts deleted file mode 100644 index e5032038b0cd..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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-beta/typescript/src/monitorsListBySubscriptionSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/monitorsListBySubscriptionSample.ts deleted file mode 100644 index c3c26e0d8239..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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-beta/typescript/src/monitorsListHostsSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/monitorsListHostsSample.ts deleted file mode 100644 index 0b90e9833558..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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-beta/typescript/src/monitorsListMonitoredResourcesSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/monitorsListMonitoredResourcesSample.ts deleted file mode 100644 index eca9e7191e0a..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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-beta/typescript/src/monitorsSwitchBillingSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/monitorsSwitchBillingSample.ts deleted file mode 100644 index 15b772d305aa..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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-beta/typescript/src/monitorsUpdateSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/monitorsUpdateSample.ts deleted file mode 100644 index 7f7938b2f50f..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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-beta/typescript/src/monitorsVMHostPayloadSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/monitorsVMHostPayloadSample.ts deleted file mode 100644 index 7b89f18d1e36..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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-beta/typescript/src/operationsListSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/operationsListSample.ts deleted file mode 100644 index 7f1e5314d7a0..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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-beta/typescript/src/organizationsListSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/organizationsListSample.ts deleted file mode 100644 index 1ba01c2ab7e9..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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-beta/typescript/src/plansListSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/plansListSample.ts deleted file mode 100644 index 20546217c608..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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-beta/typescript/src/tagRulesCreateOrUpdateSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/tagRulesCreateOrUpdateSample.ts deleted file mode 100644 index d6b7502a2589..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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-beta/typescript/src/tagRulesDeleteSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/tagRulesDeleteSample.ts deleted file mode 100644 index dae01463241d..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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-beta/typescript/src/tagRulesGetSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/tagRulesGetSample.ts deleted file mode 100644 index 1b12978e2757..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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-beta/typescript/src/tagRulesListByNewRelicMonitorResourceSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/tagRulesListByNewRelicMonitorResourceSample.ts deleted file mode 100644 index 4db5c4e70e0d..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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-beta/typescript/src/tagRulesUpdateSample.ts b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/src/tagRulesUpdateSample.ts deleted file mode 100644 index 4b652335c660..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/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/preview/2022-07-01-preview/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/preview/2022-07-01-preview/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-beta/typescript/tsconfig.json b/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/tsconfig.json deleted file mode 100644 index e26ce2a6d8f7..000000000000 --- a/sdk/newrelicobservability/arm-newrelicobservability/samples/v1-beta/typescript/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2020", - "module": "commonjs", - "moduleResolution": "node", - "resolveJsonModule": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "alwaysStrict": true, - "outDir": "dist", - "rootDir": "src" - }, - "include": [ - "src/**.ts" - ] -} diff --git a/sdk/newrelicobservability/arm-newrelicobservability/src/newRelicObservability.ts b/sdk/newrelicobservability/arm-newrelicobservability/src/newRelicObservability.ts index 945f5c562214..a07e2f37c2fe 100644 --- a/sdk/newrelicobservability/arm-newrelicobservability/src/newRelicObservability.ts +++ b/sdk/newrelicobservability/arm-newrelicobservability/src/newRelicObservability.ts @@ -64,7 +64,7 @@ export class NewRelicObservability extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-newrelicobservability/1.0.0-beta.1`; + const packageDetails = `azsdk-js-arm-newrelicobservability/1.0.0-beta.2`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` 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"