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 { NetworkManagementClient } = require("@azure/arm-network");
  const { DefaultAzureCredential } = require("@azure/identity");
  
  /**
   * This sample demonstrates how to Creates or updates a network profile.
   *
   * @summary Creates or updates a network profile.
   * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkProfileCreateConfigOnly.json
   */
  async function createNetworkProfileDefaults() {
    const subscriptionId = "subid";
    const resourceGroupName = "rg1";
    const networkProfileName = "networkProfile1";
    const parameters = {
      containerNetworkInterfaceConfigurations: [
        {
          name: "eth1",
          ipConfigurations: [
            {
              name: "ipconfig1",
              subnet: {
                id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/networkProfileVnet/subnets/networkProfileSubnet1",
              },
            },
          ],
        },
      ],
      location: "westus",
    };
    const credential = new DefaultAzureCredential();
    const client = new NetworkManagementClient(credential, subscriptionId);
    const result = await client.networkProfiles.createOrUpdate(
      resourceGroupName,
      networkProfileName,
      parameters
    );
    console.log(result);
  }
  
  createNetworkProfileDefaults().catch(console.error);
  