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 The operation to create or update the extension.
   *
   * @summary The operation to create or update the extension.
   * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/stable/2021-11-01/examples/compute/VirtualMachineExtensions_CreateOrUpdate_MinimumSet_Gen.json
   */
  const { ComputeManagementClient } = require("@azure/arm-compute");
  const { DefaultAzureCredential } = require("@azure/identity");
  
  async function virtualMachineExtensionsCreateOrUpdateMinimumSetGen() {
    const subscriptionId = "{subscription-id}";
    const resourceGroupName = "rgcompute";
    const vmName = "aaaa";
    const vmExtensionName = "aaaaaaaaaaaaaaaaaaaaaaaa";
    const extensionParameters = { location: "westus" };
    const credential = new DefaultAzureCredential();
    const client = new ComputeManagementClient(credential, subscriptionId);
    const result = await client.virtualMachineExtensions.beginCreateOrUpdateAndWait(
      resourceGroupName,
      vmName,
      vmExtensionName,
      extensionParameters
    );
    console.log(result);
  }
  
  virtualMachineExtensionsCreateOrUpdateMinimumSetGen().catch(console.error);
  