69 строки
2.2 KiB
TypeScript
69 строки
2.2 KiB
TypeScript
/*
|
|
* Copyright (c) Microsoft Corporation.
|
|
* Licensed under the MIT License.
|
|
*
|
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
*/
|
|
|
|
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT License.
|
|
import {
|
|
PlansListOptionalParams,
|
|
NewRelicObservability,
|
|
} from "@azure/arm-newrelicobservability";
|
|
import { DefaultAzureCredential } from "@azure/identity";
|
|
import * as dotenv from "dotenv";
|
|
|
|
dotenv.config();
|
|
|
|
/**
|
|
* This sample demonstrates how to List plans data
|
|
*
|
|
* @summary List plans data
|
|
* x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/Plans_List_MaximumSet_Gen.json
|
|
*/
|
|
async function plansListMaximumSetGen() {
|
|
const subscriptionId =
|
|
process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] ||
|
|
"00000000-0000-0000-0000-000000000000";
|
|
const accountId = "pwuxgvrmkk";
|
|
const organizationId = "hilawwjz";
|
|
const options: PlansListOptionalParams = { accountId, organizationId };
|
|
const credential = new DefaultAzureCredential();
|
|
const client = new NewRelicObservability(credential, subscriptionId);
|
|
const resArray = new Array();
|
|
for await (let item of client.plans.list(options)) {
|
|
resArray.push(item);
|
|
}
|
|
console.log(resArray);
|
|
}
|
|
|
|
/**
|
|
* This sample demonstrates how to List plans data
|
|
*
|
|
* @summary List plans data
|
|
* x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/Plans_List_MinimumSet_Gen.json
|
|
*/
|
|
async function plansListMinimumSetGen() {
|
|
const subscriptionId =
|
|
process.env["NEWRELICOBSERVABILITY_SUBSCRIPTION_ID"] ||
|
|
"00000000-0000-0000-0000-000000000000";
|
|
const organizationId = "hilawwjz";
|
|
const options: PlansListOptionalParams = { 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);
|
|
}
|
|
|
|
async function main() {
|
|
plansListMaximumSetGen();
|
|
plansListMinimumSetGen();
|
|
}
|
|
|
|
main().catch(console.error);
|