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.
  /**
   * This sample demonstrates how to Lists all the encryption scopes available under the specified storage account.
   *
   * @summary Lists all the encryption scopes available under the specified storage account.
   * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-08-01/examples/StorageAccountEncryptionScopeList.json
   */
  const { StorageManagementClient } = require("@azure/arm-storage");
  const { DefaultAzureCredential } = require("@azure/identity");
  
  async function storageAccountEncryptionScopeList() {
    const subscriptionId = "{subscription-id}";
    const resourceGroupName = "resource-group-name";
    const accountName = "{storage-account-name}";
    const credential = new DefaultAzureCredential();
    const client = new StorageManagementClient(credential, subscriptionId);
    const resArray = new Array();
    for await (let item of client.encryptionScopes.list(resourceGroupName, accountName)) {
      resArray.push(item);
    }
    console.log(resArray);
  }
  
  storageAccountEncryptionScopeList().catch(console.error);
  