docs: def create_vmss(access_token, subscription_id, resource_group, vmss_name, vm_size, capacity,
                  publisher, offer, sku, version, subnet_id, location, be_pool_id=None,
                  lb_pool_id=None, storage_type='Standard_LRS', username='azure', password=None,
                  public_key=None, overprovision=True, upgrade_policy='Manual',
                  public_ip_per_vm=False):
      '''Create virtual machine scale set.
  
      Args:
          access_token (str): A valid Azure authentication token.
          subscription_id (str): Azure subscription id.
          resource_group (str): Azure resource group name.
          vmss_name (str): Name of the new scale set.
          vm_size (str): Size of virtual machine, e.g. 'Standard_D1_v2'.
          capacity (int): Number of VMs in the scale set. 0-1000.
          publisher (str): VM image publisher. E.g. 'MicrosoftWindowsServer'.
          offer (str): VM image offer. E.g. 'WindowsServer'.
          sku (str): VM image sku. E.g. '2016-Datacenter'.
          version (str): VM image version. E.g. 'latest'.
          subnet_id (str): Resource id of a subnet.
          location (str): Azure data center location. E.g. westus.
          be_pool_id (str): Resource id of a backend NAT pool.
          lb_pool_id (str): Resource id of a load balancer pool.
          storage_type (str): Optional storage type. Default 'Standard_LRS'.
          username (str): Optional user name. Default is 'azure'.
          password (str): Optional password. Default is None (not required if using public_key).
          public_key (str): Optional public key. Default is None (not required if using password,
              e.g. on Windows).
          overprovision (bool): Optional. Enable overprovisioning of VMs. Default True.
          upgrade_policy (str): Optional. Set upgrade policy to Automatic, Manual or Rolling.
              Default 'Manual'.
          public_ip_per_vm (bool): Optional. Set public IP per VM. Default False.
  
      Returns:
          HTTP response. JSON body of the virtual machine scale set properties.
      '''
      endpoint = ''.join([get_rm_endpoint(),
                          '/subscriptions/', subscription_id,
                          '/resourceGroups/', resource_group,
                          '/providers/Microsoft.Compute/virtualMachineScaleSets/', vmss_name,
                          '?api-version=', COMP_API])
  
      vmss_body = {'location': location}
      vmss_sku = {'name': vm_size, 'tier': 'Standard', 'capacity': capacity}
      vmss_body['sku'] = vmss_sku
      properties = {'overprovision': overprovision}
      properties['upgradePolicy'] = {'mode': upgrade_policy}
      os_profile = {'computerNamePrefix': vmss_name}
      os_profile['adminUsername'] = username
      if password is not None:
          os_profile['adminPassword'] = password
      if public_key is not None:
          if password is None:
              disable_pswd = True
          else:
              disable_pswd = False
          linux_config = {'disablePasswordAuthentication': disable_pswd}
          pub_key = {'path': '/home/' + username + '/.ssh/authorized_keys'}
          pub_key['keyData'] = public_key
          linux_config['ssh'] = {'publicKeys': [pub_key]}
          os_profile['linuxConfiguration'] = linux_config
      vm_profile = {'osProfile': os_profile}
      os_disk = {'createOption': 'fromImage'}
      os_disk['managedDisk'] = {'storageAccountType': storage_type}
      os_disk['caching'] = 'ReadWrite'
      storage_profile = {'osDisk': os_disk}
      storage_profile['imageReference'] = \
          {'publisher': publisher, 'offer': offer, 'sku': sku, 'version': version}
      vm_profile['storageProfile'] = storage_profile
      nic = {'name': vmss_name}
      ip_config = {'name': vmss_name}
      ip_properties = {'subnet': {'id': subnet_id}}
      if be_pool_id is not None:
          ip_properties['loadBalancerBackendAddressPools'] = [{'id': be_pool_id}]
      if lb_pool_id is not None:
          ip_properties['loadBalancerInboundNatPools'] = [{'id': lb_pool_id}]
      if public_ip_per_vm is True:
          ip_properties['publicIpAddressConfiguration'] = {
              'name': 'pubip', 'properties': {'idleTimeoutInMinutes': 15}}
      ip_config['properties'] = ip_properties
      nic['properties'] = {'primary': True, 'ipConfigurations': [ip_config]}
      network_profile = {'networkInterfaceConfigurations': [nic]}
      vm_profile['networkProfile'] = network_profile
      properties['virtualMachineProfile'] = vm_profile
      vmss_body['properties'] = properties
  
      body = json.dumps(vmss_body)
      return do_put(endpoint, body, access_token)