Files
ac7615b9bd [AutoPR @azure-arm-networkfunction]-generated-from-SDK Generation - JS-6485336 (#38972)
Configurations:
'specification/networkfunction/resource-manager/Microsoft.NetworkFunction/TrafficCollector/tspconfig.yaml',
API Version: 2022-11-01, SDK Release Type: beta, and CommitSHA:
'3e0c16b4e69111860b9cb246f0eb64bd67ae6db1' in SpecRepo:
'https://github.com/Azure/azure-rest-api-specs' Pipeline run:
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6485336
Refer to
https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites
to prepare for SDK release.

---------

Co-authored-by: Jiao Di (MSFT) <[email protected]>
2026-06-26 14:44:44 +08:00

28 lines
981 B
TypeScript

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { AzureTrafficCollectorClient } from "../src/index.js";
import { DefaultAzureCredential, InteractiveBrowserCredential } from "@azure/identity";
import { setLogLevel } from "@azure/logger";
import { describe, it } from "vitest";
describe("snippets", () => {
it("ReadmeSampleCreateClient_Node", async () => {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new AzureTrafficCollectorClient(new DefaultAzureCredential(), subscriptionId);
});
it("ReadmeSampleCreateClient_Browser", async () => {
const credential = new InteractiveBrowserCredential({
tenantId: "<YOUR_TENANT_ID>",
clientId: "<YOUR_CLIENT_ID>",
});
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new AzureTrafficCollectorClient(credential, subscriptionId);
});
it("SetLogLevel", async () => {
setLogLevel("info");
});
});