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 { StorageCacheManagementClient } = require("@azure/arm-storagecache");
  const { DefaultAzureCredential } = require("@azure/identity");
  
  /**
   * This sample demonstrates how to Schedules a Cache for deletion.
   *
   * @summary Schedules a Cache for deletion.
   * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/Caches_Delete.json
   */
  async function cachesDelete() {
    const subscriptionId = "00000000-0000-0000-0000-000000000000";
    const resourceGroupName = "scgroup";
    const cacheName = "sc";
    const credential = new DefaultAzureCredential();
    const client = new StorageCacheManagementClient(credential, subscriptionId);
    const result = await client.caches.beginDeleteAndWait(resourceGroupName, cacheName);
    console.log(result);
  }
  
  cachesDelete().catch(console.error);
  