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 { ComputeManagementClient } = require("@azure/arm-compute");
  const { DefaultAzureCredential } = require("@azure/identity");
  
  /**
   * This sample demonstrates how to Updates (patches) a snapshot.
   *
   * @summary Updates (patches) a snapshot.
   * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/stable/2021-12-01/examples/UpdateASnapshotWithAcceleratedNetwork.json
   */
  async function updateASnapshotWithAcceleratedNetworking() {
    const subscriptionId = "{subscription-id}";
    const resourceGroupName = "myResourceGroup";
    const snapshotName = "mySnapshot";
    const snapshot = {
      diskSizeGB: 20,
      supportedCapabilities: { acceleratedNetwork: false },
      tags: { department: "Development", project: "UpdateSnapshots" },
    };
    const credential = new DefaultAzureCredential();
    const client = new ComputeManagementClient(credential, subscriptionId);
    const result = await client.snapshots.beginUpdateAndWait(
      resourceGroupName,
      snapshotName,
      snapshot
    );
    console.log(result);
  }
  
  updateASnapshotWithAcceleratedNetworking().catch(console.error);
  
  /**
   * This sample demonstrates how to Updates (patches) a snapshot.
   *
   * @summary Updates (patches) a snapshot.
   * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/stable/2021-12-01/examples/UpdateASnapshot.json
   */
  async function updateASnapshot() {
    const subscriptionId = "{subscription-id}";
    const resourceGroupName = "myResourceGroup";
    const snapshotName = "mySnapshot";
    const snapshot = {
      diskSizeGB: 20,
      tags: { department: "Development", project: "UpdateSnapshots" },
    };
    const credential = new DefaultAzureCredential();
    const client = new ComputeManagementClient(credential, subscriptionId);
    const result = await client.snapshots.beginUpdateAndWait(
      resourceGroupName,
      snapshotName,
      snapshot
    );
    console.log(result);
  }
  
  updateASnapshot().catch(console.error);
  