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 update an extension.
   *
   * @summary The operation to update an extension.
   * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/stable/2021-11-01/examples/compute/VirtualMachineScaleSetExtensions_Update_MaximumSet_Gen.json
   */
  const { ComputeManagementClient } = require("@azure/arm-compute");
  const { DefaultAzureCredential } = require("@azure/identity");
  
  async function virtualMachineScaleSetExtensionsUpdateMaximumSetGen() {
    const subscriptionId = "{subscription-id}";
    const resourceGroupName = "rgcompute";
    const vmScaleSetName = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
    const vmssExtensionName = "aaaa";
    const extensionParameters = {
      typePropertiesType: "{extension-Type}",
      autoUpgradeMinorVersion: true,
      enableAutomaticUpgrade: true,
      forceUpdateTag: "aaaaaaaaa",
      protectedSettings: {},
      provisionAfterExtensions: ["aa"],
      publisher: "{extension-Publisher}",
      settings: {},
      suppressFailures: true,
      typeHandlerVersion: "{handler-version}",
    };
    const credential = new DefaultAzureCredential();
    const client = new ComputeManagementClient(credential, subscriptionId);
    const result = await client.virtualMachineScaleSetExtensions.beginUpdateAndWait(
      resourceGroupName,
      vmScaleSetName,
      vmssExtensionName,
      extensionParameters
    );
    console.log(result);
  }
  
  virtualMachineScaleSetExtensionsUpdateMaximumSetGen().catch(console.error);
  