mirror of
https://github.com/hanzoai/azure-sdk-for-js.git
synced 2026-10-30 19:51:51 +00:00
31 lines
919 B
TypeScript
31 lines
919 B
TypeScript
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT License.
|
|
|
|
/**
|
|
* This sample demonstrates how to list the operations for the provider
|
|
*
|
|
* @summary list the operations for the provider
|
|
* x-ms-original-file: 2024-01-15-preview/Operations_List_MaximumSet_Gen.json
|
|
*/
|
|
|
|
import { ProgrammableConnectivityClient } from "@azure/arm-programmableconnectivity";
|
|
import { DefaultAzureCredential } from "@azure/identity";
|
|
|
|
async function operationsList(): Promise<void> {
|
|
const credential = new DefaultAzureCredential();
|
|
const subscriptionId = "00000000-0000-0000-0000-00000000000";
|
|
const client = new ProgrammableConnectivityClient(credential, subscriptionId);
|
|
const resArray = new Array();
|
|
for await (const item of client.operations.list()) {
|
|
resArray.push(item);
|
|
}
|
|
|
|
console.log(resArray);
|
|
}
|
|
|
|
async function main(): Promise<void> {
|
|
await operationsList();
|
|
}
|
|
|
|
main().catch(console.error);
|