text: /*
   * 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 { DeviceUpdate } = require("@azure/arm-deviceupdate");
  const { DefaultAzureCredential } = require("@azure/identity");
  
  /**
   * This sample demonstrates how to List all private link resources in a device update account.
   *
   * @summary List all private link resources in a device update account.
   * x-ms-original-file: specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2022-04-01-preview/examples/PrivateLinkResources/PrivateLinkResources_ListByAccount.json
   */
  async function privateLinkResourcesList() {
    const subscriptionId = "00000000-0000-0000-0000-000000000000";
    const resourceGroupName = "test-rg";
    const accountName = "contoso";
    const credential = new DefaultAzureCredential();
    const client = new DeviceUpdate(credential, subscriptionId);
    const resArray = new Array();
    for await (let item of client.privateLinkResources.listByAccount(
      resourceGroupName,
      accountName
    )) {
      resArray.push(item);
    }
    console.log(resArray);
  }
  
  privateLinkResourcesList().catch(console.error);
  