Files
2026-03-13 10:59:23 +08:00

30 lines
857 B
TypeScript

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { DurableTaskClient } from "@azure/arm-durabletask";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to list the operations for the provider
*
* @summary list the operations for the provider
* x-ms-original-file: 2026-02-01/Operations_List.json
*/
async function operationsList(): Promise<void> {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new DurableTaskClient(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);